项目管理
This commit is contained in:
@@ -188,7 +188,13 @@
|
||||
<el-table-column min-width="100px" label="组号" align="center">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<el-input v-model="scope.row.组号" size="mini" style="width: 100%"/>
|
||||
<el-select v-model="scope.row.组件流水号" filterable clearable size="small" style="width: 100px" @change="groupChange(scope.row, scope.$index)">
|
||||
<el-option
|
||||
v-for="item in groupNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.组号 }}
|
||||
@@ -257,7 +263,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="实际完成时间" align="center" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<template v-if="scope.row.edit && !scope.row.组件流水号">
|
||||
<el-date-picker v-model="scope.row.实际完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
@@ -289,7 +295,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getProject, getCustomerName, getToolNum, searchtable, editTable, searchTable2, editTable2, Delete, addTable } from '@/api/ManufacturingCenter/ProjectPlanningManagement'
|
||||
import { getProject, getCustomerName, getToolNum, searchtable, editTable, searchTable2, editTable2, Delete, addTable, searchgroup, searchgroupName } from '@/api/ManufacturingCenter/ProjectPlanningManagement'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -309,6 +315,7 @@ export default {
|
||||
CustomerName: [], // 客户名称
|
||||
toolNumValue: '',
|
||||
toolNum: [], // 机床
|
||||
groupNum: [],
|
||||
loading: false,
|
||||
tableData: [], // 表格数据
|
||||
total: null, // 总条数
|
||||
@@ -349,6 +356,15 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
groupChange(row, index) {
|
||||
console.log(row.组件流水号)
|
||||
if (row.组件流水号 !== '') {
|
||||
searchgroupName(row.组件流水号).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableData2[index].任务名称 = response.data[0].组件名称
|
||||
})
|
||||
}
|
||||
},
|
||||
getCustomerName() {
|
||||
this.CustomerNameValue = ''
|
||||
this.CustomerName = []
|
||||
@@ -459,6 +475,15 @@ export default {
|
||||
} else if (this.code === 5) {
|
||||
this.title = '装配'
|
||||
}
|
||||
this.groupNum = []
|
||||
searchgroup(row.机床流水号).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.groupNum.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
searchTable2(row.机床流水号, this.code).then(response => {
|
||||
this.jichuang = row.机床流水号
|
||||
if (response.data.length === 0) {
|
||||
@@ -484,6 +509,7 @@ export default {
|
||||
edit: false,
|
||||
组件计划流水号: response.data[i].组件计划流水号,
|
||||
机床流水号: response.data[i].机床流水号,
|
||||
组件流水号: response.data[i].组件流水号,
|
||||
组号: response.data[i].组号,
|
||||
任务名称: response.data[i].任务名称,
|
||||
负责人: response.data[i].负责人,
|
||||
@@ -538,6 +564,7 @@ export default {
|
||||
edit: false,
|
||||
组件计划流水号: response.data[i].组件计划流水号,
|
||||
机床流水号: response.data[i].机床流水号,
|
||||
组件流水号: response.data[i].组件流水号,
|
||||
组号: response.data[i].组号,
|
||||
任务名称: response.data[i].任务名称,
|
||||
负责人: response.data[i].负责人,
|
||||
@@ -556,7 +583,7 @@ export default {
|
||||
},
|
||||
// 表格2保存
|
||||
confirmEdit2(row) {
|
||||
editTable2(row.组件计划流水号, row.组号, row.任务名称, row.负责人, row.接收任务时间, row.任务开始时间, row.计划完成时间, row.货期, row.实际完成时间, row.备注).then(response => {
|
||||
editTable2(row.组件计划流水号, row.组件流水号, row.任务名称, row.负责人, row.接收任务时间, row.任务开始时间, row.计划完成时间, row.货期, row.实际完成时间, row.备注).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
row.edit = false
|
||||
this.$notify({
|
||||
|
||||
Reference in New Issue
Block a user