|
@ -275,43 +275,30 @@ |
|
|
console.log(JSON.stringify(params)) |
|
|
console.log(JSON.stringify(params)) |
|
|
|
|
|
|
|
|
let list = [] |
|
|
let list = [] |
|
|
try { |
|
|
var planData = await planReceiptSubmit(params) |
|
|
var planData = await planReceiptSubmit(params) |
|
|
console.log('planData', planData) |
|
|
console.log('planData', planData) |
|
|
if (planData.data && planData.data.length > 0) { |
|
|
if (planData.data) { |
|
|
planData.data.forEach(item => { |
|
|
|
|
|
list.push({ |
|
|
planData.data.forEach(item => { |
|
|
itemCode: item.itemCode, // 物品代码 |
|
|
list.push({ |
|
|
itemName: item.itemName, // 物品名称 |
|
|
itemCode: item.itemCode, // 物品代码 |
|
|
packName: item.packName, // 包装名称 |
|
|
itemName: item.itemName, // 物品名称 |
|
|
packageCode: item.toPackingNumber, // 包装号 |
|
|
packName: item.packName, // 包装名称 |
|
|
batch: item.toBatch, //批次 |
|
|
packageCode: item.toPackingNumber, // 包装号 |
|
|
parentNumber: item.parentNumber, //父包装号 |
|
|
batch: item.toBatch, //批次 |
|
|
itemType: item.itemType, //物料类型 |
|
|
parentNumber: item.parentNumber, //父包装号 |
|
|
asnNumber: item.asnNumber, //ASN |
|
|
itemType: item.itemType, //物料类型 |
|
|
supplierCode: item.supplierCode, // 供应商 |
|
|
asnNumber: item.asnNumber, //ASN |
|
|
qty: item.qty, // 数量 |
|
|
supplierCode: item.supplierCode, // 供应商 |
|
|
printTimes: getCurrDateTime(), // 打印时间 |
|
|
qty: item.qty, // 数量 |
|
|
productionLineCode: item.productionLineCode, //生产线 |
|
|
printTimes: getCurrDateTime(), // 打印时间 |
|
|
barcodeString: item.barcodeString, // 标签信息 |
|
|
productionLineCode: item.productionLineCode, //生产线 |
|
|
barcodeBase64: '', |
|
|
barcodeString: item.barcodeString, // 标签信息 |
|
|
requestNumber: item.requestNumber |
|
|
barcodeBase64: '', |
|
|
|
|
|
requestNumber: item.requestNumber |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
}) |
|
|
throw new Error("提交失败") |
|
|
} else { |
|
|
} |
|
|
throw new Error("提交失败") |
|
|
} catch (error) { |
|
|
|
|
|
console.log('异常', error) |
|
|
|
|
|
if (error.indexOf('请返回开工阶段') > -1) { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
this.showErrorMessage('计划已完成') |
|
|
|
|
|
this.clearData() |
|
|
|
|
|
this.openFg(); |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//装配收货记录 生成后 创建 制品上架申请 |
|
|
//装配收货记录 生成后 创建 制品上架申请 |
|
@ -324,15 +311,17 @@ |
|
|
// } |
|
|
// } |
|
|
//创建上架申请和检验申请 |
|
|
//创建上架申请和检验申请 |
|
|
if (createProductputawaySwitch) { |
|
|
if (createProductputawaySwitch) { |
|
|
createPutawayRequestByPlan(list[0].requestNumber).then(res => { |
|
|
if (list.length > 0 && list[0].requestNumber) { |
|
|
createInspectRequestByPlan(list[0].requestNumber) |
|
|
createPutawayRequestByPlan(list[0].requestNumber).then(res => { |
|
|
}) |
|
|
createInspectRequestByPlan(list[0].requestNumber) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} else { //创建检验申请 |
|
|
} else { //创建检验申请 |
|
|
createInspectRequestByPlan(list[0].requestNumber) |
|
|
if (list.length > 0 && list[0].requestNumber) { |
|
|
|
|
|
createInspectRequestByPlan(list[0].requestNumber) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var queryParams = { |
|
|
var queryParams = { |
|
|
filters: [{ |
|
|
filters: [{ |
|
|
column: "number", |
|
|
column: "number", |
|
@ -375,15 +364,24 @@ |
|
|
this.index = 1; |
|
|
this.index = 1; |
|
|
this.dataContent.handleQty = 0; |
|
|
this.dataContent.handleQty = 0; |
|
|
} |
|
|
} |
|
|
|
|
|
var hintMsg ="提交成功\n生成装配收货记录\n"; |
|
|
|
|
|
if(list.length>0&&list[0].requestNumber){ |
|
|
|
|
|
hintMsg += list[0].requestNumber |
|
|
|
|
|
} |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
|
this.showCommitSuccessMessage("提交成功\n生成装配收货记录\n" + list[0].requestNumber, list) |
|
|
this.showCommitSuccessMessage(hintMsg, list) |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
var hint = error.message ? error.message : error |
|
|
var hint = error.message ? error.message : error |
|
|
this.showErrorMessage(hint) |
|
|
if (hint.indexOf('请返回开工阶段') > -1) { |
|
|
|
|
|
this.showErrorMessage('计划已完成') |
|
|
|
|
|
this.clearData() |
|
|
|
|
|
this.openFg(); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showErrorMessage(hint) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
@ -490,7 +488,7 @@ |
|
|
batchPrintingLable(number).then(resLable => { |
|
|
batchPrintingLable(number).then(resLable => { |
|
|
console.log('batchPrintingLable', resLable) |
|
|
console.log('batchPrintingLable', resLable) |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
if(resLable.data){ |
|
|
if (resLable.data) { |
|
|
const webUrl = `${import.meta.env.VITE_JMREPORT_BASE_URL}/jmreport/view/922734157577715712` |
|
|
const webUrl = `${import.meta.env.VITE_JMREPORT_BASE_URL}/jmreport/view/922734157577715712` |
|
|
const webData = { |
|
|
const webData = { |
|
|
token: storage.getStorage(storage.constant.token), |
|
|
token: storage.getStorage(storage.constant.token), |
|
@ -499,8 +497,8 @@ |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: `/pages/pointProductReceipt/webview?url=${webUrl}&webData=${JSON.stringify(webData)}` |
|
|
url: `/pages/pointProductReceipt/webview?url=${webUrl}&webData=${JSON.stringify(webData)}` |
|
|
}); |
|
|
}); |
|
|
}else { |
|
|
} else { |
|
|
_this.showErrorMessage(number+"批量打印标签 H5失败") |
|
|
_this.showErrorMessage(number + "批量打印标签 H5失败") |
|
|
} |
|
|
} |
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
@ -527,22 +525,22 @@ |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title:"正在获取打印信息", |
|
|
title: "正在获取打印信息", |
|
|
mask:true |
|
|
mask: true |
|
|
}) |
|
|
}) |
|
|
getBalanceToPackage({ |
|
|
getBalanceToPackage({ |
|
|
packingNumber: packingNumber.join(',') |
|
|
packingNumber: packingNumber.join(',') |
|
|
}).then(res => { |
|
|
}).then(res => { |
|
|
console.log('PC打印', res) |
|
|
console.log('PC打印', res) |
|
|
if(res.data&&res.data.number){ |
|
|
if (res.data && res.data.number) { |
|
|
_this.getH5BatchPrintingLable(res.data.number) |
|
|
_this.getH5BatchPrintingLable(res.data.number) |
|
|
}else { |
|
|
} else { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
var hint ="" |
|
|
var hint = "" |
|
|
packingNumber.forEach(item=>{ |
|
|
packingNumber.forEach(item => { |
|
|
hint+=item |
|
|
hint += item |
|
|
}) |
|
|
}) |
|
|
hint+"根据库存余额获取包装信息" |
|
|
hint + "根据库存余额获取包装信息" |
|
|
_this.showErrorMessage(hint) |
|
|
_this.showErrorMessage(hint) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|