优化序列号和批次商品的逻辑

This commit is contained in:
季圣华
2021-09-29 19:45:20 +08:00
parent ecb0edca29
commit 7ae0c1585c
18 changed files with 345 additions and 22 deletions

View File

@@ -104,7 +104,21 @@ export const BillModalMixin = {
for(let i=0; i<columns.length; i++){
if(columns[i].key === key) {
if(type){
columns[i].type = FormTypes.input //显示
if(key === 'snList' || key === 'batchNumber') {
if(this.prefixNo === 'XSCK' || this.prefixNo === 'CGTH') {
columns[i].type = FormTypes.popupJsh //显示
} else {
columns[i].type = FormTypes.input //显示
}
} else if(key === 'expirationDate') {
if(this.prefixNo === 'CGRK' || this.prefixNo === 'XSTH') {
columns[i].type = FormTypes.date //显示
} else {
columns[i].type = FormTypes.input //显示
}
} else {
columns[i].type = FormTypes.input //显示
}
} else {
columns[i].type = FormTypes.hidden //隐藏
}
@@ -240,6 +254,13 @@ export const BillModalMixin = {
if(mInfo.sku) {
this.changeFormTypes(this.materialTable.columns, 'sku', 1)
}
if(mInfo.enableSerialNumber === "1") {
this.changeFormTypes(this.materialTable.columns, 'snList', 1)
}
if(mInfo.enableBatchNumber === "1") {
this.changeFormTypes(this.materialTable.columns, 'batchNumber', 1)
this.changeFormTypes(this.materialTable.columns, 'expirationDate', 1)
}
let mObj = this.parseInfoToObj(mInfo)
mObj.depotId = mInfo.depotId
mObj.stock = mInfo.stock
@@ -261,6 +282,13 @@ export const BillModalMixin = {
if(mInfo.sku) {
this.changeFormTypes(this.materialTable.columns, 'sku', 1)
}
if(mInfo.enableSerialNumber === "1") {
this.changeFormTypes(this.materialTable.columns, 'snList', 1)
}
if(mInfo.enableBatchNumber === "1") {
this.changeFormTypes(this.materialTable.columns, 'batchNumber', 1)
this.changeFormTypes(this.materialTable.columns, 'expirationDate', 1)
}
let mObj = {
rowKey: row.id,
values: this.parseInfoToObj(mInfo)