|
@ -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,16 +104,15 @@ |
|
|
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(); |
|
|
this.getDetail(); |
|
|
// })); |
|
|
})); |
|
|
// } else { |
|
|
} else { |
|
|
// this.getDetail(); |
|
|
|
|
|
// } |
|
|
|
|
|
this.getDetail(); |
|
|
this.getDetail(); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
//返回首页 |
|
|
//返回首页 |
|
|
onNavigationBarButtonTap(e) { |
|
|
onNavigationBarButtonTap(e) { |
|
@ -268,7 +266,7 @@ |
|
|
']不一致,是否继续上架?', 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 |
|
@ -280,7 +278,7 @@ |
|
|
}); |
|
|
}); |
|
|
} 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 |
|
@ -337,7 +335,7 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
async submitJob() { |
|
|
submitJob() { |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "提交中....", |
|
|
title: "提交中....", |
|
|
mask: true |
|
|
mask: true |
|
@ -358,19 +356,17 @@ |
|
|
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,8 +383,11 @@ |
|
|
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) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -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) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|