更新
This commit is contained in:
@@ -327,18 +327,28 @@ export default {
|
||||
},
|
||||
// 保存行价格
|
||||
saveRowPrice() {
|
||||
this.count = 0
|
||||
for (let i = 0; i < this.tableData2.length; i++) {
|
||||
if (this.checkBox[i] === false) {
|
||||
this.count = this.count + 1
|
||||
}
|
||||
}
|
||||
if (this.tableData2.length === 0) {
|
||||
this.$message.error('请选择零件')
|
||||
} else {
|
||||
this.a = 0
|
||||
for (let i = 0; i < this.tableData2.length; i++) {
|
||||
saveRowPrice(this.tableData2[i].工序流水号, 0, this.tableData2[i].工艺计划流水号, 0).then(response => {
|
||||
this.a += parseInt(response.data[0].result)
|
||||
if (this.a === this.tableData2.length) {
|
||||
this.$message.success('保存成功')
|
||||
this.searchTable()
|
||||
}
|
||||
})
|
||||
if (this.count !== this.tableData2.length) {
|
||||
this.a = 0
|
||||
for (let i = 0; i < this.tableData2.length; i++) {
|
||||
saveRowPrice(this.tableData2[i].工序流水号, 0, this.tableData2[i].工艺计划流水号, 0).then(response => {
|
||||
this.a += parseInt(response.data[0].result)
|
||||
if (this.a === this.tableData2.length) {
|
||||
this.$message.success('保存成功')
|
||||
this.searchTable()
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.error('请选择需要外协工序')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user