Browse Source

修改绑定托标签提交

master_hella
李俊城 12 hours ago
parent
commit
8ef99439aa
  1. 39
      src/pages/palletLabel/bindPalletLabel.vue

39
src/pages/palletLabel/bindPalletLabel.vue

@ -68,7 +68,8 @@
import {
getPackingNumberAndBatchByList,
deepCopyData
deepCopyData,
getCurrDateTime
} from '@/common/basic.js';
import {
@ -265,13 +266,13 @@
});
},
updateData() {
calcHandleQty(this.detailSource);
for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i];
if (item.qty == 0) {
this.detailSource.splice(i, 1)
}
}
this.calacQty();
},
removePack() {
@ -292,9 +293,12 @@
}
}
},
showCommitSuccessMessage(hint) {
showCommitSuccessMessage(hint,pointData) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData()
uni.navigateTo({
url: `/pages/point/index?points=${JSON.stringify(pointData)}`
});
})
},
clearData() {
@ -344,16 +348,35 @@
var params = this.setParams(palletLabelInfo)
//
if ( params.qty > params.packQty) {
this.showErrorMessage("合托的总数量[" + params.qty + "]不能大于托包装的标包数量[" + params.packQty + "]")
uni.hideLoading()
this.showErrorMessage("合托的总数量[" + params.qty + "]大于托包装的标包数量[" + params.packQty + "]")
return;
}
return;
console.log("提交", JSON.stringify(params))
palletLabelBindSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功\n生成" + this.title + "\n" +
res.data)
let list = []
res.data.list.forEach(item => {
list.push({
itemCode: item.itemCode, //
itemName: item.itemName, //
packName: item.packName, //
packageCode: item.toPackingNumber, //
batch: item.toBatch, //
parentNumber: item.parentNumber, //
itemType: item.itemType, //
asnNumber: item.asnNumber, //ASN
supplierCode: item.supplierCode, //
qty: item.qty, //
printTimes: getCurrDateTime(), //
productionLineCode: item.productionLineCode, //线
barcodeString: item.barcodeString, //
barcodeBase64: '',
})
})
this.showCommitSuccessMessage("提交成功\n生成" + this.title + "记录\n" +
res.data.number,list)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}

Loading…
Cancel
Save