|
@ -329,17 +329,22 @@ |
|
|
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 = []; |
|
|
itemNumber: item.itemCode, // 物品代码 |
|
|
res.data.forEach(item => { |
|
|
itemName: item.itemName, // 物品名称 |
|
|
list.push({ |
|
|
referenceOrderRow: item.poLine, // 订单行 |
|
|
itemNumber: item.itemCode, // 物品代码 |
|
|
referenceOrderCode: item.poNumber, // 订单号 |
|
|
itemName: item.itemName, // 物品名称 |
|
|
supplierCode: item.supplierCode, // 供应商 |
|
|
referenceOrderRow: item.poLine, // 订单行 |
|
|
packageCode: item.number, // 包装号 |
|
|
referenceOrderCode: item.poNumber, // 订单号 |
|
|
amount: item.qty, // 数量 |
|
|
supplierCode: item.supplierCode, // 供应商 |
|
|
barcodeString: '', // 标签信息 |
|
|
packageCode: item.number, // 包装号 |
|
|
barcodeBase64: '' |
|
|
amount: item.qty, // 数量 |
|
|
}))) |
|
|
barcodeString: item.barcodeString, // 标签信息 |
|
|
|
|
|
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=>{ |
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
return getPackageLabel(item.packageCode) |
|
|
if (pointData.length > 0) { |
|
|
})).then(res=>{ |
|
|
uni.navigateTo({ |
|
|
res.forEach(item=>{ |
|
|
url: `/pages/point/index?points=${JSON.stringify(pointData)}` |
|
|
const point = pointData.find(pointItem=>pointItem.packageCode==item.data.list[0].relateNumber) |
|
|
}); |
|
|
point.barcodeString = item.data.list[0].barcodeString |
|
|
} else { |
|
|
}) |
|
|
navigateBack(1) |
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
} |
|
|
|
|
|
|
|
|
if(pointData.length>0){ |
|
|
|
|
|
uni.navigateTo({ |
|
|
|
|
|
url: `/pages/point/index?points=${JSON.stringify(pointData)}` |
|
|
|
|
|
}); |
|
|
|
|
|
}else{ |
|
|
|
|
|
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) { |
|
|