diff --git a/src/views/Assembly/MakeColdWorkPlan/index.vue b/src/views/Assembly/MakeColdWorkPlan/index.vue
index 2c720a9a..7123edef 100644
--- a/src/views/Assembly/MakeColdWorkPlan/index.vue
+++ b/src/views/Assembly/MakeColdWorkPlan/index.vue
@@ -3,7 +3,7 @@
机床编号:
-
+
+ 机床信息
@@ -98,8 +99,8 @@
确定
编辑
- 取消
- 删除
+ 取消
+ 删除
@@ -144,9 +145,12 @@ export default {
})
},
groupChange(row, index) {
- if (row.组件流水号 !== '') {
+ this.groupNumberValue = ''
+ this.tableData2[index].任务名称 = ''
+ if (row.组件流水号 !== '' && row.组件流水号 !== null) {
searchgroupName(row.组件流水号).then(response => {
- this.groupNumberValue = row.组号
+ console.log(row, 22222)
+ this.groupNumberValue = response.data[0].组号
this.tableData2[index].任务名称 = response.data[0].组件名称
})
}
@@ -173,23 +177,32 @@ export default {
})
}
})
+ this.getFileData(this.machineNumberValue)
},
confirmEdit(row) {
editData(row.计划流水号, row.组件流水号, this.groupNumberValue, row.任务名称, row.计划工时).then(response => {
- if (response.data[0].response === 1) {
+ if (response.data[0].result === '1') {
+ row.edit = false
+ this.searchTable2()
this.$message.success('编辑成功')
} else {
this.$message.error('编辑失败')
}
})
},
+ cancel(row) {
+ row.edit = !row.edit
+ this.searchTable2()
+ },
deleteData(row) {
+ console.log(row.计划流水号)
this.deleteRow(deletedata, row.计划流水号, function() { this.searchTable2() })
},
addTable() {
if (this.machineNumberValue !== '') {
addData(this.machineNumberValue, 3).then(response => {
- if (response.data[0].response === 1) {
+ console.log(response)
+ if (response.data[0].result === '1') {
this.searchTable2()
this.$message.success('增加成功')
} else {
@@ -219,19 +232,18 @@ export default {
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) {
this.check2 = 1
searchTable2(this.machineNumberValue, 3).then(response => {
- console.log(response.data, 111)
- this.tableData2 = response.data
- this.tableData2.map(v => {
- if (v.是否工作 === null || v.是否工作 === 0) {
- this.$set(v, 'buttonStatus', 1)
- } else if (v.是否工作 === 1) {
- this.$set(v, 'buttonStatus', 2)
- } else {
- this.$set(v, 'buttonStatus', 3)
- }
- return v
- })
+ for (let i = 0; i < response.data.length; i++) {
+ this.tableData2.push({
+ 计划流水号: response.data[i].计划流水号,
+ 组件流水号: response.data[i].组件流水号,
+ 组号: response.data[i].组号,
+ 任务名称: response.data[i].任务名称,
+ 计划工时: response.data[i].计划工时,
+ edit: false
+ })
+ }
})
+ console.log(this.tableData2, 222222)
} else { this.check2 = 0 }
}
}
diff --git a/src/views/Assembly/MakeElectricalAssembly/index.vue b/src/views/Assembly/MakeElectricalAssembly/index.vue
index aa49e19a..74f7c566 100644
--- a/src/views/Assembly/MakeElectricalAssembly/index.vue
+++ b/src/views/Assembly/MakeElectricalAssembly/index.vue
@@ -3,7 +3,7 @@
机床编号:
-
+
+ 机床信息
@@ -98,8 +99,8 @@
确定
编辑
- 取消
- 删除
+ 取消
+ 删除
@@ -144,9 +145,12 @@ export default {
})
},
groupChange(row, index) {
- if (row.组件流水号 !== '') {
+ this.groupNumberValue = ''
+ this.tableData2[index].任务名称 = ''
+ if (row.组件流水号 !== '' && row.组件流水号 !== null) {
searchgroupName(row.组件流水号).then(response => {
- this.groupNumberValue = row.组号
+ console.log(row, 22222)
+ this.groupNumberValue = response.data[0].组号
this.tableData2[index].任务名称 = response.data[0].组件名称
})
}
@@ -173,23 +177,32 @@ export default {
})
}
})
+ this.getFileData(this.machineNumberValue)
},
confirmEdit(row) {
editData(row.计划流水号, row.组件流水号, this.groupNumberValue, row.任务名称, row.计划工时).then(response => {
- if (response.data[0].response === 1) {
+ if (response.data[0].result === '1') {
+ row.edit = false
+ this.searchTable2()
this.$message.success('编辑成功')
} else {
this.$message.error('编辑失败')
}
})
},
+ cancel(row) {
+ row.edit = !row.edit
+ this.searchTable2()
+ },
deleteData(row) {
+ console.log(row.计划流水号)
this.deleteRow(deletedata, row.计划流水号, function() { this.searchTable2() })
},
addTable() {
if (this.machineNumberValue !== '') {
addData(this.machineNumberValue, 2).then(response => {
- if (response.data[0].response === 1) {
+ console.log(response)
+ if (response.data[0].result === '1') {
this.searchTable2()
this.$message.success('增加成功')
} else {
@@ -219,19 +232,18 @@ export default {
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) {
this.check2 = 1
searchTable2(this.machineNumberValue, 2).then(response => {
- console.log(response.data, 111)
- this.tableData2 = response.data
- this.tableData2.map(v => {
- if (v.是否工作 === null || v.是否工作 === 0) {
- this.$set(v, 'buttonStatus', 1)
- } else if (v.是否工作 === 1) {
- this.$set(v, 'buttonStatus', 2)
- } else {
- this.$set(v, 'buttonStatus', 3)
- }
- return v
- })
+ for (let i = 0; i < response.data.length; i++) {
+ this.tableData2.push({
+ 计划流水号: response.data[i].计划流水号,
+ 组件流水号: response.data[i].组件流水号,
+ 组号: response.data[i].组号,
+ 任务名称: response.data[i].任务名称,
+ 计划工时: response.data[i].计划工时,
+ edit: false
+ })
+ }
})
+ console.log(this.tableData2, 222222)
} else { this.check2 = 0 }
}
}
diff --git a/src/views/Assembly/MakePaintPlan/index.vue b/src/views/Assembly/MakePaintPlan/index.vue
index 91160118..92bc2249 100644
--- a/src/views/Assembly/MakePaintPlan/index.vue
+++ b/src/views/Assembly/MakePaintPlan/index.vue
@@ -3,7 +3,7 @@
机床编号:
-
+
+ 机床信息
@@ -98,8 +99,8 @@
确定
编辑
- 取消
- 删除
+ 取消
+ 删除
@@ -144,9 +145,12 @@ export default {
})
},
groupChange(row, index) {
- if (row.组件流水号 !== '') {
+ this.groupNumberValue = ''
+ this.tableData2[index].任务名称 = ''
+ if (row.组件流水号 !== '' && row.组件流水号 !== null) {
searchgroupName(row.组件流水号).then(response => {
- this.groupNumberValue = row.组号
+ console.log(row, 22222)
+ this.groupNumberValue = response.data[0].组号
this.tableData2[index].任务名称 = response.data[0].组件名称
})
}
@@ -173,23 +177,32 @@ export default {
})
}
})
+ this.getFileData(this.machineNumberValue)
},
confirmEdit(row) {
editData(row.计划流水号, row.组件流水号, this.groupNumberValue, row.任务名称, row.计划工时).then(response => {
- if (response.data[0].response === 1) {
+ if (response.data[0].result === '1') {
+ row.edit = false
+ this.searchTable2()
this.$message.success('编辑成功')
} else {
this.$message.error('编辑失败')
}
})
},
+ cancel(row) {
+ row.edit = !row.edit
+ this.searchTable2()
+ },
deleteData(row) {
+ console.log(row.计划流水号)
this.deleteRow(deletedata, row.计划流水号, function() { this.searchTable2() })
},
addTable() {
if (this.machineNumberValue !== '') {
addData(this.machineNumberValue, 4).then(response => {
- if (response.data[0].response === 1) {
+ console.log(response)
+ if (response.data[0].result === '1') {
this.searchTable2()
this.$message.success('增加成功')
} else {
@@ -219,19 +232,18 @@ export default {
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) {
this.check2 = 1
searchTable2(this.machineNumberValue, 4).then(response => {
- console.log(response.data, 111)
- this.tableData2 = response.data
- this.tableData2.map(v => {
- if (v.是否工作 === null || v.是否工作 === 0) {
- this.$set(v, 'buttonStatus', 1)
- } else if (v.是否工作 === 1) {
- this.$set(v, 'buttonStatus', 2)
- } else {
- this.$set(v, 'buttonStatus', 3)
- }
- return v
- })
+ for (let i = 0; i < response.data.length; i++) {
+ this.tableData2.push({
+ 计划流水号: response.data[i].计划流水号,
+ 组件流水号: response.data[i].组件流水号,
+ 组号: response.data[i].组号,
+ 任务名称: response.data[i].任务名称,
+ 计划工时: response.data[i].计划工时,
+ edit: false
+ })
+ }
})
+ console.log(this.tableData2, 222222)
} else { this.check2 = 0 }
}
}