diff --git a/src/pages/palletLabel/bindPalletLabel.vue b/src/pages/palletLabel/bindPalletLabel.vue index 7780210c..f8f94275 100644 --- a/src/pages/palletLabel/bindPalletLabel.vue +++ b/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 + "]") }