opt:手工出库优化

This commit is contained in:
zhangzq
2024-05-15 11:07:09 +08:00
parent cd42f6cc4e
commit ebe8a836da
7 changed files with 56 additions and 13 deletions

View File

@@ -5,8 +5,8 @@
"author": "Zheng Jie",
"license": "Apache-2.0",
"scripts": {
"dev": "vue-cli-service serve",
"build:prod": "vue-cli-service build",
"dev": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
"build:prod": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src",

View File

@@ -387,8 +387,8 @@ export default {
},
tableChanged2(row) {
for (let i = 0; i < this.form.tableData.length; i++) {
if (this.form.tableData[i].material_id === row.material_id) {
this.crud.notify('不允许添加相同物料!')
if (this.form.tableData[i].material_id === row.material_id && this.form.tableData[i].pcsn === row.pcsn) {
this.crud.notify('不允许添加批次相同物料!')
return false
}
}
@@ -437,6 +437,12 @@ export default {
return false
}
for (let i = 0; i < this.form.tableData.length; i++) {
for (let j = i+1; j < this.form.tableData.length; j++) {
if (this.form.tableData[i].material_id === this.form.tableData[j].material_id && this.form.tableData[i].pcsn === this.form.tableData[j].pcsn) {
this.crud.notify('不允许添加相同批次物料!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
}
if (!this.form.tableData[i].edit) {
this.crud.notify('尚有未完成编辑的物料明细序号' + (i + 1) + ',请检查!')
return false