Browse Source

补料记录提交时校验已经扫描数量

wms3.0_pda
lijuncheng 10 months ago
parent
commit
c85407c5db
  1. 5
      pages/repleinsh/coms/comRepleinshRequestPopup.vue
  2. 29
      pages/repleinsh/record/repleinshRecord.vue

5
pages/repleinsh/coms/comRepleinshRequestPopup.vue

@ -135,6 +135,11 @@
type: Array, type: Array,
default: [] default: []
}, },
itemCodeTypeList: {
type: Array,
default: []
},
}, },
mounted() { mounted() {

29
pages/repleinsh/record/repleinshRecord.vue

@ -342,6 +342,10 @@
}, },
submit() { submit() {
if(this.getScanCount()==0){
this.showErrorMessage("当前扫描数为0,请先扫描在提交");
return
}
uni.showLoading({ uni.showLoading({
title: "提交中....", title: "提交中....",
mask: true mask: true
@ -440,6 +444,31 @@
return this.dataContent; return this.dataContent;
}, },
getScanCount(){
var scanCount = 0;
var subList = []
this.detailSource.forEach(toLocationCode => {
toLocationCode.Items.forEach(item => {
item.Locations.forEach(fromLocation => {
fromLocation.Batchs.forEach(batch => {
let subItem = batch.detail;
subItem.recordList = [];
if (batch.Records.length > 0) {
batch.Records.forEach(r => {
let record = {};
record.handleQty = r.qty;
subItem.recordList.push(record);
})
subList.push(subItem);
}
})
})
})
})
return scanCount =subList.length;
},
showMessage(message) { showMessage(message) {
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {

Loading…
Cancel
Save