|
@ -329,7 +329,9 @@ |
|
|
overPageSubmit(params).then(res => { |
|
|
overPageSubmit(params).then(res => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
if (res.data) { |
|
|
if (res.data) { |
|
|
this.showCommitSuccessMessage("提交成功<br>生成翻包记录<br>",res.data.map(item=>({ |
|
|
let list = []; |
|
|
|
|
|
res.data.forEach(item => { |
|
|
|
|
|
list.push({ |
|
|
itemNumber: item.itemCode, // 物品代码 |
|
|
itemNumber: item.itemCode, // 物品代码 |
|
|
itemName: item.itemName, // 物品名称 |
|
|
itemName: item.itemName, // 物品名称 |
|
|
referenceOrderRow: item.poLine, // 订单行 |
|
|
referenceOrderRow: item.poLine, // 订单行 |
|
@ -337,9 +339,12 @@ |
|
|
supplierCode: item.supplierCode, // 供应商 |
|
|
supplierCode: item.supplierCode, // 供应商 |
|
|
packageCode: item.number, // 包装号 |
|
|
packageCode: item.number, // 包装号 |
|
|
amount: item.qty, // 数量 |
|
|
amount: item.qty, // 数量 |
|
|
barcodeString: '', // 标签信息 |
|
|
barcodeString: item.barcodeString, // 标签信息 |
|
|
barcodeBase64: '' |
|
|
barcodeBase64: '' |
|
|
}))) |
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
this.showCommitSuccessMessage("提交成功<br>生成翻包记录<br>", list) |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
} |
|
|
} |
|
@ -519,26 +524,58 @@ |
|
|
this.$refs.comMessage.showCommitSuccess(); |
|
|
this.$refs.comMessage.showCommitSuccess(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
showCommitSuccessMessage(hint,pointData) { |
|
|
showCommitSuccessMessage(hint, pointData) { |
|
|
Promise.all(pointData.map(item=>{ |
|
|
|
|
|
return getPackageLabel(item.packageCode) |
|
|
|
|
|
})).then(res=>{ |
|
|
|
|
|
res.forEach(item=>{ |
|
|
|
|
|
const point = pointData.find(pointItem=>pointItem.packageCode==item.data.list[0].relateNumber) |
|
|
|
|
|
point.barcodeString = item.data.list[0].barcodeString |
|
|
|
|
|
}) |
|
|
|
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
|
|
|
if (pointData.length > 0) { |
|
|
if(pointData.length>0){ |
|
|
|
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: `/pages/point/index?points=${JSON.stringify(pointData)}` |
|
|
url: `/pages/point/index?points=${JSON.stringify(pointData)}` |
|
|
}); |
|
|
}); |
|
|
}else{ |
|
|
} else { |
|
|
navigateBack(1) |
|
|
navigateBack(1) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
}) |
|
|
|
|
|
// let packageResult = [] |
|
|
|
|
|
// pointData.forEach( async (item) => { |
|
|
|
|
|
// let res = await getPackageLabel(item.packageCode) |
|
|
|
|
|
// packageResult.push(res) |
|
|
|
|
|
// if(packageResult.length==pointData.length){ |
|
|
|
|
|
// packageResult.forEach(item => { |
|
|
|
|
|
// const point = pointData.find(pointItem => pointItem.packageCode == item.data.list[0] |
|
|
|
|
|
// .relateNumber) |
|
|
|
|
|
// point.barcodeString = item.data.list[0].barcodeString |
|
|
|
|
|
// }) |
|
|
|
|
|
// this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
|
|
|
// if (pointData.length > 0) { |
|
|
|
|
|
// uni.navigateTo({ |
|
|
|
|
|
// url: `/pages/point/index?points=${JSON.stringify(pointData)}` |
|
|
|
|
|
// }); |
|
|
|
|
|
// } else { |
|
|
|
|
|
// navigateBack(1) |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
|
|
// Promise.all(pointData.map(item => { |
|
|
|
|
|
// return getPackageLabel(item.packageCode) |
|
|
|
|
|
// })).then(res => { |
|
|
|
|
|
// res.forEach(item => { |
|
|
|
|
|
// const point = pointData.find(pointItem => pointItem.packageCode == item.data.list[ |
|
|
|
|
|
// 0].relateNumber) |
|
|
|
|
|
// point.barcodeString = item.data.list[0].barcodeString |
|
|
|
|
|
// }) |
|
|
|
|
|
// this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
|
|
|
|
|
|
|
|
|
// if (pointData.length > 0) { |
|
|
|
|
|
// uni.navigateTo({ |
|
|
|
|
|
// url: `/pages/point/index?points=${JSON.stringify(pointData)}` |
|
|
|
|
|
// }); |
|
|
|
|
|
// } else { |
|
|
|
|
|
// navigateBack(1) |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
// }) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
showRescanMessage(message) { |
|
|
showRescanMessage(message) { |
|
|