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