Commit 87045f68 authored by 张海景's avatar 张海景

update:包装标签逻辑加上判断条件

parent edabc44b
...@@ -311,6 +311,9 @@ export default { ...@@ -311,6 +311,9 @@ export default {
this.handleQuery(); this.handleQuery();
}, },
handleSave() { handleSave() {
if(!this.validSelect()) {
return
}
updatePackagePrintRecord(this.tablePackageList).then((response) => { updatePackagePrintRecord(this.tablePackageList).then((response) => {
console.log(response, 'response') console.log(response, 'response')
if (response.code === 200) { if (response.code === 200) {
...@@ -319,6 +322,9 @@ export default { ...@@ -319,6 +322,9 @@ export default {
}); });
}, },
handleProduce() { handleProduce() {
if(!this.validSelect()) {
return
}
const params = { const params = {
"checkBy": this.produceForm.checkBy, "checkBy": this.produceForm.checkBy,
"inputBy": this.produceForm.inputBy, "inputBy": this.produceForm.inputBy,
...@@ -336,6 +342,9 @@ export default { ...@@ -336,6 +342,9 @@ export default {
}); });
}, },
handleChooseTemplate() { handleChooseTemplate() {
if (!this.validSelect()) {
return
}
if (this.selectPackageTable.length === 0) { if (this.selectPackageTable.length === 0) {
this.$message.warning('请至少选择一条数据') this.$message.warning('请至少选择一条数据')
return return
...@@ -370,6 +379,13 @@ export default { ...@@ -370,6 +379,13 @@ export default {
} }
}); });
}, },
validSelect() {
if (this.selectedItemId) {
return true
}
this.$message.warning('请选择生产工单')
return false
},
handleCurrentChange(row) { handleCurrentChange(row) {
console.log(row, 'row88') console.log(row, 'row88')
this.produceForm = Object.assign({},row) this.produceForm = Object.assign({},row)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment