|
@ -15,13 +15,13 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="page-footer"> |
|
|
<view class="page-footer"> |
|
|
<view class="uni-flex u-col-center space-between padding_10" |
|
|
<view class="uni-flex u-col-center space-between padding_10" |
|
|
style="background-color:ghostwhite; width: 100%; "> |
|
|
style="background-color:ghostwhite; width: 100%; "> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<requiredLocation title="目标库位" :locationCode="toLocationCode" :isShowEdit="jobContent.allowModifyLocation==1" |
|
|
<requiredLocation title="目标库位" :locationCode="toLocationCode" |
|
|
@getLocation='scanLocationCode' :locationTypeList="tolocationTypeList"></requiredLocation> |
|
|
:isShowEdit="jobContent.allowModifyLocation==1" @getLocation='scanLocationCode' |
|
|
|
|
|
:locationTypeList="tolocationTypeList"></requiredLocation> |
|
|
</view> |
|
|
</view> |
|
|
<view class=" uni-flex uni-row"> |
|
|
<view class=" uni-flex uni-row"> |
|
|
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> |
|
|
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> |
|
@ -37,7 +37,6 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
getProductionReturnJobDetail, |
|
|
getProductionReturnJobDetail, |
|
|
productionReturnJobSubmit, |
|
|
productionReturnJobSubmit, |
|
@ -105,15 +104,14 @@ |
|
|
this.id = option.id; |
|
|
this.id = option.id; |
|
|
if (this.id != undefined) { |
|
|
if (this.id != undefined) { |
|
|
// //新建的任务自动接收 |
|
|
// //新建的任务自动接收 |
|
|
// if (option.status == "JOB_PENDING") { |
|
|
if (option.status == "1") { |
|
|
// this.receive((callback => { |
|
|
this.receive((callback => { |
|
|
// this.received = true; |
|
|
this.received = true; |
|
|
// this.getDetail(); |
|
|
|
|
|
// })); |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.getDetail(); |
|
|
|
|
|
// } |
|
|
|
|
|
this.getDetail(); |
|
|
this.getDetail(); |
|
|
|
|
|
})); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.getDetail(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
//返回首页 |
|
|
//返回首页 |
|
@ -268,11 +266,11 @@ |
|
|
']不一致,是否继续上架?', res => { |
|
|
']不一致,是否继续上架?', res => { |
|
|
if (res) { |
|
|
if (res) { |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.handleQty = Number(result.label.qty)>Number(result.balance.qty)?Number(result.balance.qty):Number(result.label.qty); |
|
|
itemDetail.handleQty = Number(result.balance.qty) |
|
|
itemDetail.balance = result.balance; |
|
|
itemDetail.balance = result.balance; |
|
|
itemDetail.balance.balanceQty = result.balance.qty; |
|
|
itemDetail.balance.balanceQty = result.balance.qty; |
|
|
itemDetail.balance.stdPackQty =result.package.stdPackQty |
|
|
itemDetail.balance.stdPackQty = result.package.stdPackQty |
|
|
itemDetail.balance.stdPackUnit =result.package.stdPackUnit |
|
|
itemDetail.balance.stdPackUnit = result.package.stdPackUnit |
|
|
this.calcHandleQty(); |
|
|
this.calcHandleQty(); |
|
|
} else { |
|
|
} else { |
|
|
this.scanPopupGetFocus(); |
|
|
this.scanPopupGetFocus(); |
|
@ -280,11 +278,11 @@ |
|
|
}); |
|
|
}); |
|
|
} else { |
|
|
} else { |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.handleQty = Number(result.label.qty)>Number(result.balance.qty)?Number(result.balance.qty):Number(result.label.qty); |
|
|
itemDetail.handleQty = Number(result.balance.qty) |
|
|
itemDetail.balance = result.balance; |
|
|
itemDetail.balance = result.balance; |
|
|
itemDetail.balance.balanceQty = result.balance.qty; |
|
|
itemDetail.balance.balanceQty = result.balance.qty; |
|
|
itemDetail.balance.stdPackQty =result.package.stdPackQty |
|
|
itemDetail.balance.stdPackQty = result.package.stdPackQty |
|
|
itemDetail.balance.stdPackUnit =result.package.stdPackUnit |
|
|
itemDetail.balance.stdPackUnit = result.package.stdPackUnit |
|
|
this.calcHandleQty(); |
|
|
this.calcHandleQty(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -337,7 +335,7 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
async submitJob() { |
|
|
submitJob() { |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "提交中....", |
|
|
title: "提交中....", |
|
|
mask: true |
|
|
mask: true |
|
@ -356,21 +354,19 @@ |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|
this.managementList = res.list; |
|
|
this.managementList = res.list; |
|
|
var params = this.setParams() |
|
|
var params = this.setParams() |
|
|
console.log("提交参数",JSON.stringify(params)); |
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
|
|
|
|
|
|
// productionReturnJobSubmit(this.id, params).then(res => { |
|
|
productionReturnJobSubmit(params).then(res => { |
|
|
// uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
// if (res.data) { |
|
|
if (res.data) { |
|
|
// var hint = res.data.Number; |
|
|
this.showCommitSuccessMessage("提交成功<br>生成生产退料记录:" + res.data) |
|
|
// this.showCommitSuccessMessage("提交成功" + hint) |
|
|
} else { |
|
|
|
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
// } else { |
|
|
} |
|
|
// this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
}).catch(error => { |
|
|
// } |
|
|
uni.hideLoading() |
|
|
// }).catch(error => { |
|
|
this.showErrorMessage(error) |
|
|
// uni.hideLoading() |
|
|
}) |
|
|
// this.showErrorMessage(error) |
|
|
|
|
|
// }) |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
this.showErrorMessage(res.message); |
|
|
this.showErrorMessage(res.message); |
|
@ -387,20 +383,23 @@ |
|
|
if (detail.scaned) { |
|
|
if (detail.scaned) { |
|
|
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, |
|
|
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, |
|
|
detail.packingNumber, detail.batch); |
|
|
detail.packingNumber, detail.batch); |
|
|
detail.toPackingNumber =info.packingNumber; |
|
|
detail.toPackingNumber = detail.packingNumber; |
|
|
detail.toBatch =info.batch; |
|
|
detail.toContainerNumber = detail.containerNumber; |
|
|
|
|
|
detail.toBatch = detail.batch; |
|
|
|
|
|
|
|
|
|
|
|
detail.toLocationCode = detail.toLocationCode; |
|
|
subList.push(detail) |
|
|
subList.push(detail) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
this.jobContent.subList = subList |
|
|
this.jobContent.subList = subList |
|
|
this.jobContent.creator =creator; |
|
|
this.jobContent.creator = creator; |
|
|
return this.jobContent; |
|
|
return this.jobContent; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
checkLocation() { |
|
|
checkLocation() { |
|
|
var isPass = true; |
|
|
var isPass = true; |
|
|
if (this.toLocationCode == ""||this.toLocationCode == null) { |
|
|
if (this.toLocationCode == "" || this.toLocationCode == null) { |
|
|
this.showMessageHint('请扫描收货库位', callback => { |
|
|
this.showMessageHint('请扫描收货库位', callback => { |
|
|
this.$refs.comScanLocation.showLocation(); |
|
|
this.$refs.comScanLocation.showLocation(); |
|
|
}) |
|
|
}) |
|
@ -463,13 +462,10 @@ |
|
|
|
|
|
|
|
|
showCommitSuccessMessage(hint) { |
|
|
showCommitSuccessMessage(hint) { |
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: './returnJob' |
|
|
url: './returnJob' |
|
|
}) |
|
|
}) |
|
|
}, 3000) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|