|
@ -1,5 +1,8 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class="page-wraper"> |
|
|
<view class="page-wraper"> |
|
|
|
|
|
<div style="background: white;"> |
|
|
|
|
|
<print ref="printService" @printCode="printCode" @templateCode="templateCode"></print> |
|
|
|
|
|
</div> |
|
|
<view class="page-header"> |
|
|
<view class="page-header"> |
|
|
<view class="header_job_top"> |
|
|
<view class="header_job_top"> |
|
|
<job-top :dataContent="jobContent"></job-top> |
|
|
<job-top :dataContent="jobContent"></job-top> |
|
@ -96,6 +99,7 @@ |
|
|
import comScanPackagePack from '@/pages/package/coms/comScanPackagePack.vue' |
|
|
import comScanPackagePack from '@/pages/package/coms/comScanPackagePack.vue' |
|
|
import jobTop from '@/mycomponents/job/jobTop.vue' |
|
|
import jobTop from '@/mycomponents/job/jobTop.vue' |
|
|
import workStation from '@/mycomponents/workStation/workStation.vue' |
|
|
import workStation from '@/mycomponents/workStation/workStation.vue' |
|
|
|
|
|
import print from '@/mycomponents/print/print.vue' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: 'issueDetail', |
|
|
name: 'issueDetail', |
|
@ -106,6 +110,7 @@ |
|
|
comScanPackagePack, |
|
|
comScanPackagePack, |
|
|
jobTop, |
|
|
jobTop, |
|
|
workStation, |
|
|
workStation, |
|
|
|
|
|
print |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
@ -115,7 +120,10 @@ |
|
|
detailSource: [], //绑定在页面上的数据源 |
|
|
detailSource: [], //绑定在页面上的数据源 |
|
|
detailOptions: [], |
|
|
detailOptions: [], |
|
|
scanOptions: [], |
|
|
scanOptions: [], |
|
|
jobStatus: "" |
|
|
jobStatus: "", |
|
|
|
|
|
|
|
|
|
|
|
printDeafult: {}, //默认打印机 |
|
|
|
|
|
templateDeafult: {} //默认的模板 |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -138,6 +146,7 @@ |
|
|
this.getDetail(); |
|
|
this.getDetail(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onNavigationBarButtonTap(e) { |
|
|
onNavigationBarButtonTap(e) { |
|
@ -213,7 +222,18 @@ |
|
|
that.jobStatus = res.data.status |
|
|
that.jobStatus = res.data.status |
|
|
that.subList = res.data.subList; |
|
|
that.subList = res.data.subList; |
|
|
that.detailSource = getDataSource(that.detailSource, that.subList) |
|
|
that.detailSource = getDataSource(that.detailSource, that.subList) |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
if (uni.getStorageSync('overPackageJobDetailPointParams')) { |
|
|
|
|
|
const overPackageJobDetailPointParams = uni.getStorageSync( |
|
|
|
|
|
'overPackageJobDetailPointParams') |
|
|
|
|
|
this.jobContent.printerUuid = overPackageJobDetailPointParams |
|
|
|
|
|
.printDeafult.value; |
|
|
|
|
|
this.jobContent.modelCode = overPackageJobDetailPointParams |
|
|
|
|
|
.templateDeafult.value; |
|
|
|
|
|
this.$refs.printService.setDefaultData(overPackageJobDetailPointParams |
|
|
|
|
|
.printDeafult, overPackageJobDetailPointParams.templateDeafult) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
setTimeout(r => { |
|
|
setTimeout(r => { |
|
|
that.resizeCollapse(); |
|
|
that.resizeCollapse(); |
|
|
}, 100) |
|
|
}, 100) |
|
@ -327,34 +347,55 @@ |
|
|
mask: true |
|
|
mask: true |
|
|
}); |
|
|
}); |
|
|
var params = this.setParams() |
|
|
var params = this.setParams() |
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
console.log(params); |
|
|
overPageSubmit(params).then(res => { |
|
|
overPageSubmit(params).then(res => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
if (res.data) { |
|
|
if (res.data == '打印任务已发送,等待打印机处理!') { |
|
|
let list = []; |
|
|
this.showCommitSuccessMessage(res.data) |
|
|
res.data.forEach(item => { |
|
|
const overPackageJobDetailPointParams = { |
|
|
list.push({ |
|
|
printDeafult: this.printDeafult, |
|
|
itemCode: item.itemCode, // 物品代码 |
|
|
templateDeafult: this.templateDeafult, |
|
|
itemName: item.itemName, // 物品名称 |
|
|
} |
|
|
packName: item.packName, // 包装名称 |
|
|
uni.setStorageSync('overPackageJobDetailPointParams', overPackageJobDetailPointParams) |
|
|
packageCode: item.number, // 包装号 |
|
|
|
|
|
batch: item.batch, //批次 |
|
|
|
|
|
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("提交成功<br>生成翻包记录<br>", list) |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
this.showErrorMessage(res.data) |
|
|
} |
|
|
} |
|
|
|
|
|
// if(res.data){ |
|
|
|
|
|
// this.showCommitSuccessMessage(res.data) |
|
|
|
|
|
// const overPackageJobDetailPointParams = { |
|
|
|
|
|
// printDeafult:this.printDeafult, |
|
|
|
|
|
// templateDeafult:this.templateDeafult, |
|
|
|
|
|
// } |
|
|
|
|
|
// uni.setStorageSync('overPackageJobDetailPointParams',overPackageJobDetailPointParams) |
|
|
|
|
|
|
|
|
|
|
|
// }else{ |
|
|
|
|
|
// this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
|
|
|
// } |
|
|
|
|
|
// if (res.data) { |
|
|
|
|
|
// let list = []; |
|
|
|
|
|
// res.data.forEach(item => { |
|
|
|
|
|
// list.push({ |
|
|
|
|
|
// itemCode: item.itemCode, // 物品代码 |
|
|
|
|
|
// itemName: item.itemName, // 物品名称 |
|
|
|
|
|
// packName: item.packName, // 包装名称 |
|
|
|
|
|
// packageCode: item.number, // 包装号 |
|
|
|
|
|
// batch: item.batch, //批次 |
|
|
|
|
|
// 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("提交成功<br>生成翻包记录<br>", list) |
|
|
|
|
|
|
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
|
|
|
// } |
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.showErrorMessage(error) |
|
|
this.showErrorMessage(error) |
|
@ -379,7 +420,8 @@ |
|
|
|
|
|
|
|
|
record.fromPackingNumber = r |
|
|
record.fromPackingNumber = r |
|
|
.packingNumber; |
|
|
.packingNumber; |
|
|
record.fromParentPackingNumber =r.parentPackingNumber; |
|
|
record.fromParentPackingNumber = r |
|
|
|
|
|
.parentPackingNumber; |
|
|
record.fromBatch = r.batch; |
|
|
record.fromBatch = r.batch; |
|
|
record.fromContainerNumber = r |
|
|
record.fromContainerNumber = r |
|
|
.ContainerNumber; |
|
|
.ContainerNumber; |
|
@ -442,7 +484,14 @@ |
|
|
this.jobContent.creator = creator; |
|
|
this.jobContent.creator = creator; |
|
|
return this.jobContent; |
|
|
return this.jobContent; |
|
|
}, |
|
|
}, |
|
|
|
|
|
printCode(e) { |
|
|
|
|
|
this.jobContent.printerUuid = e.value; |
|
|
|
|
|
this.printDeafult = e |
|
|
|
|
|
}, |
|
|
|
|
|
templateCode(e) { |
|
|
|
|
|
this.jobContent.modelCode = e.value; |
|
|
|
|
|
this.templateDeafult = e |
|
|
|
|
|
}, |
|
|
cancel() { |
|
|
cancel() { |
|
|
let that = this; |
|
|
let that = this; |
|
|
this.$refs.comMessage.showQuestionMessage('是否要清空已扫描的物料和目标库位信息?', res => { |
|
|
this.$refs.comMessage.showQuestionMessage('是否要清空已扫描的物料和目标库位信息?', res => { |
|
|