|
@ -42,7 +42,7 @@ |
|
|
打印设置 |
|
|
打印设置 |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
<print ref="printService" @printCode="printCode" @templateCode="templateCode"></print> |
|
|
<!-- <print ref="printService" @printCode="printCode" @templateCode="templateCode"></print> --> |
|
|
</uni-collapse-item> |
|
|
</uni-collapse-item> |
|
|
</uni-collapse> |
|
|
</uni-collapse> |
|
|
</div> |
|
|
</div> |
|
@ -106,7 +106,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' |
|
|
// import print from '@/mycomponents/print/print.vue' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: 'issueDetail', |
|
|
name: 'issueDetail', |
|
@ -117,7 +117,7 @@ |
|
|
comScanPackagePack, |
|
|
comScanPackagePack, |
|
|
jobTop, |
|
|
jobTop, |
|
|
workStation, |
|
|
workStation, |
|
|
print |
|
|
// print |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
@ -129,8 +129,8 @@ |
|
|
scanOptions: [], |
|
|
scanOptions: [], |
|
|
jobStatus: "", |
|
|
jobStatus: "", |
|
|
|
|
|
|
|
|
printDeafult: {}, //默认打印机 |
|
|
// printDeafult: {}, //默认打印机 |
|
|
templateDeafult: {} //默认的模板 |
|
|
// templateDeafult: {} //默认的模板 |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -229,18 +229,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(() => { |
|
|
// this.$nextTick(() => { |
|
|
if (uni.getStorageSync('overPackageJobDetailPointParams')) { |
|
|
// if (uni.getStorageSync('overPackageJobDetailPointParams')) { |
|
|
const overPackageJobDetailPointParams = uni.getStorageSync( |
|
|
// const overPackageJobDetailPointParams = uni.getStorageSync( |
|
|
'overPackageJobDetailPointParams') |
|
|
// 'overPackageJobDetailPointParams') |
|
|
this.jobContent.printerUuid = overPackageJobDetailPointParams |
|
|
// this.jobContent.printerUuid = overPackageJobDetailPointParams |
|
|
.printDeafult.value; |
|
|
// .printDeafult.value; |
|
|
this.jobContent.modelCode = overPackageJobDetailPointParams |
|
|
// this.jobContent.modelCode = overPackageJobDetailPointParams |
|
|
.templateDeafult.value; |
|
|
// .templateDeafult.value; |
|
|
this.$refs.printService.setDefaultData(overPackageJobDetailPointParams |
|
|
// this.$refs.printService.setDefaultData(overPackageJobDetailPointParams |
|
|
.printDeafult, overPackageJobDetailPointParams.templateDeafult) |
|
|
// .printDeafult, overPackageJobDetailPointParams.templateDeafult) |
|
|
} |
|
|
// } |
|
|
}) |
|
|
// }) |
|
|
setTimeout(r => { |
|
|
setTimeout(r => { |
|
|
that.resizeCollapse(); |
|
|
that.resizeCollapse(); |
|
|
}, 100) |
|
|
}, 100) |
|
@ -290,14 +290,14 @@ |
|
|
// }, |
|
|
// }, |
|
|
|
|
|
|
|
|
submit() { |
|
|
submit() { |
|
|
if(!this.jobContent.printerUuid){ |
|
|
// if(!this.jobContent.printerUuid){ |
|
|
this.showErrorMessage("请选择打印机") |
|
|
// this.showErrorMessage("请选择打印机") |
|
|
return; |
|
|
// return; |
|
|
} |
|
|
// } |
|
|
if(!this.jobContent.modelCode){ |
|
|
// if(!this.jobContent.modelCode){ |
|
|
this.showErrorMessage("请选择打印模板") |
|
|
// this.showErrorMessage("请选择打印模板") |
|
|
return; |
|
|
// return; |
|
|
} |
|
|
// } |
|
|
//目前任务只到一个库位 |
|
|
//目前任务只到一个库位 |
|
|
var itemCodes = [] |
|
|
var itemCodes = [] |
|
|
let locationCode = this.detailSource[0].toLocationCode |
|
|
let locationCode = this.detailSource[0].toLocationCode |
|
@ -364,52 +364,41 @@ |
|
|
console.log(params); |
|
|
console.log(params); |
|
|
overPageSubmit(params).then(res => { |
|
|
overPageSubmit(params).then(res => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
if (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.data) |
|
|
|
|
|
} |
|
|
|
|
|
// if(res.data){ |
|
|
|
|
|
// this.showCommitSuccessMessage(res.data) |
|
|
// this.showCommitSuccessMessage(res.data) |
|
|
// const overPackageJobDetailPointParams = { |
|
|
// const overPackageJobDetailPointParams = { |
|
|
// printDeafult: this.printDeafult, |
|
|
// printDeafult: this.printDeafult, |
|
|
// templateDeafult: this.templateDeafult, |
|
|
// templateDeafult: this.templateDeafult, |
|
|
// } |
|
|
// } |
|
|
// uni.setStorageSync('overPackageJobDetailPointParams', overPackageJobDetailPointParams) |
|
|
// uni.setStorageSync('overPackageJobDetailPointParams', overPackageJobDetailPointParams) |
|
|
|
|
|
|
|
|
// } else { |
|
|
// } else { |
|
|
// this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
// this.showErrorMessage(res.data) |
|
|
// } |
|
|
// } |
|
|
// if (res.data) { |
|
|
if (res.data) { |
|
|
// let list = []; |
|
|
let list = []; |
|
|
// res.data.forEach(item => { |
|
|
res.data.forEach(item => { |
|
|
// list.push({ |
|
|
list.push({ |
|
|
// itemCode: item.itemCode, // 物品代码 |
|
|
itemCode: item.itemCode, // 物品代码 |
|
|
// itemName: item.itemName, // 物品名称 |
|
|
itemName: item.itemName, // 物品名称 |
|
|
// packName: item.packName, // 包装名称 |
|
|
packName: item.packName, // 包装名称 |
|
|
// packageCode: item.number, // 包装号 |
|
|
packageCode: item.number, // 包装号 |
|
|
// batch: item.batch, //批次 |
|
|
batch: item.batch, //批次 |
|
|
// parentNumber: item.parentNumber, //父包装号 |
|
|
parentNumber: item.parentNumber, //父包装号 |
|
|
// itemType: item.itemType, //物料类型 |
|
|
itemType: item.itemType, //物料类型 |
|
|
// asnNumber: item.asnNumber, //ASN |
|
|
asnNumber: item.asnNumber, //ASN |
|
|
// supplierCode: item.supplierCode, // 供应商 |
|
|
supplierCode: item.supplierCode, // 供应商 |
|
|
// qty: item.qty, // 数量 |
|
|
qty: item.qty, // 数量 |
|
|
// printTimes: getCurrDateTime(), // 打印时间 |
|
|
printTimes: getCurrDateTime(), // 打印时间 |
|
|
// productionLineCode: item.productionLineCode, //生产线 |
|
|
productionLineCode: item.productionLineCode, //生产线 |
|
|
// barcodeString: item.barcodeString, // 标签信息 |
|
|
barcodeString: item.barcodeString, // 标签信息 |
|
|
// barcodeBase64: '', |
|
|
barcodeBase64: '', |
|
|
// }) |
|
|
}) |
|
|
// }) |
|
|
}) |
|
|
// this.showCommitSuccessMessage("提交成功<br>生成翻包记录<br>", list) |
|
|
this.showCommitSuccessMessage("提交成功<br>生成翻包记录<br>", list) |
|
|
|
|
|
|
|
|
// } else { |
|
|
} else { |
|
|
// this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
// } |
|
|
} |
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.showErrorMessage(error) |
|
|
this.showErrorMessage(error) |
|
@ -498,14 +487,14 @@ |
|
|
this.jobContent.creator = creator; |
|
|
this.jobContent.creator = creator; |
|
|
return this.jobContent; |
|
|
return this.jobContent; |
|
|
}, |
|
|
}, |
|
|
printCode(e) { |
|
|
// printCode(e) { |
|
|
this.jobContent.printerUuid = e.value; |
|
|
// this.jobContent.printerUuid = e.value; |
|
|
this.printDeafult = e |
|
|
// this.printDeafult = e |
|
|
}, |
|
|
// }, |
|
|
templateCode(e) { |
|
|
// templateCode(e) { |
|
|
this.jobContent.modelCode = e.value; |
|
|
// this.jobContent.modelCode = e.value; |
|
|
this.templateDeafult = e |
|
|
// this.templateDeafult = e |
|
|
}, |
|
|
// }, |
|
|
cancel() { |
|
|
cancel() { |
|
|
let that = this; |
|
|
let that = this; |
|
|
this.$refs.comMessage.showQuestionMessage('是否要清空已扫描的物料和目标库位信息?', res => { |
|
|
this.$refs.comMessage.showQuestionMessage('是否要清空已扫描的物料和目标库位信息?', res => { |
|
|