解决商品新增的时候商品条码出现不连号的bug
This commit is contained in:
@@ -409,8 +409,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.maxBarCodeAction();
|
this.loadParseMaterialProperty()
|
||||||
this.loadParseMaterialProperty();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取所有的editableTable实例
|
// 获取所有的editableTable实例
|
||||||
@@ -438,6 +437,7 @@
|
|||||||
this.activeKey = '1'
|
this.activeKey = '1'
|
||||||
this.manySkuSelected = 0
|
this.manySkuSelected = 0
|
||||||
this.barCodeSwitch = false
|
this.barCodeSwitch = false
|
||||||
|
this.maxBarCodeInfo = ''
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
if(JSON.stringify(record) === '{}') {
|
if(JSON.stringify(record) === '{}') {
|
||||||
this.fileList = []
|
this.fileList = []
|
||||||
@@ -698,13 +698,6 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
maxBarCodeAction(){
|
|
||||||
getMaxBarCode({}).then((res)=> {
|
|
||||||
if (res && res.code === 200) {
|
|
||||||
this.maxBarCodeInfo = res.data.barCode - 0
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
loadTreeData(){
|
loadTreeData(){
|
||||||
let that = this;
|
let that = this;
|
||||||
let params = {};
|
let params = {};
|
||||||
@@ -840,8 +833,18 @@
|
|||||||
if(this.unitStatus == false) {
|
if(this.unitStatus == false) {
|
||||||
unit = this.form.getFieldValue('unit')
|
unit = this.form.getFieldValue('unit')
|
||||||
}
|
}
|
||||||
|
if(this.maxBarCodeInfo === '') {
|
||||||
|
getMaxBarCode({}).then((res)=> {
|
||||||
|
if (res && res.code === 200) {
|
||||||
|
this.maxBarCodeInfo = res.data.barCode - 0
|
||||||
this.maxBarCodeInfo = this.maxBarCodeInfo + 1
|
this.maxBarCodeInfo = this.maxBarCodeInfo + 1
|
||||||
target.setValues([{rowKey: row.id, values: {barCode: this.maxBarCodeInfo, commodityUnit: unit?unit:''}}])
|
target.setValues([{rowKey: row.id, values: {barCode: this.maxBarCodeInfo, commodityUnit: unit?unit:''}}])
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.maxBarCodeInfo = this.maxBarCodeInfo + 1
|
||||||
|
target.setValues([{rowKey: row.id, values: {barCode: this.maxBarCodeInfo, commodityUnit: unit?unit:''}}])
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onDeleted(value) {
|
onDeleted(value) {
|
||||||
this.meDeleteIdList = (value)
|
this.meDeleteIdList = (value)
|
||||||
|
|||||||
Reference in New Issue
Block a user