|
@ -14,14 +14,14 @@ |
|
|
</scroll-view> |
|
|
</scroll-view> |
|
|
</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, |
|
@ -53,12 +52,12 @@ |
|
|
getDirectoryItemArray, |
|
|
getDirectoryItemArray, |
|
|
getInventoryStatusName |
|
|
getInventoryStatusName |
|
|
} from '@/common/directory.js'; |
|
|
} from '@/common/directory.js'; |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
getManagementPrecisions |
|
|
getManagementPrecisions |
|
|
} from '@/common/balance.js'; |
|
|
} from '@/common/balance.js'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
getDataSource, |
|
|
getDataSource, |
|
|
createRecordInfo, |
|
|
createRecordInfo, |
|
@ -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(); |
|
|
this.getDetail(); |
|
|
// })); |
|
|
})); |
|
|
// } else { |
|
|
} else { |
|
|
// this.getDetail(); |
|
|
this.getDetail(); |
|
|
// } |
|
|
} |
|
|
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 |
|
@ -347,7 +345,7 @@ |
|
|
this.detailSource.forEach(item => { |
|
|
this.detailSource.forEach(item => { |
|
|
itemCodes.push(item.itemCode) |
|
|
itemCodes.push(item.itemCode) |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
var param = { |
|
|
var param = { |
|
|
itemCode: itemCodes, |
|
|
itemCode: itemCodes, |
|
|
locationCode: this.toLocationCode |
|
|
locationCode: this.toLocationCode |
|
@ -355,22 +353,20 @@ |
|
|
getManagementPrecisions(itemCodes, this.toLocationCode, res => { |
|
|
getManagementPrecisions(itemCodes, this.toLocationCode, res => { |
|
|
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); |
|
@ -381,30 +377,33 @@ |
|
|
setParams() { |
|
|
setParams() { |
|
|
var subList = [] |
|
|
var subList = [] |
|
|
var creator = this.$store.state.user.id |
|
|
var creator = this.$store.state.user.id |
|
|
|
|
|
|
|
|
this.detailSource.forEach(item => { |
|
|
this.detailSource.forEach(item => { |
|
|
item.subList.forEach(detail => { |
|
|
item.subList.forEach(detail => { |
|
|
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(); |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
return isPass = false; |
|
|
return isPass = false; |
|
|
} |
|
|
} |
|
|
return isPass; |
|
|
return isPass; |
|
@ -448,7 +447,7 @@ |
|
|
scanPopupLoseFocus() { |
|
|
scanPopupLoseFocus() { |
|
|
this.$refs.scanPopup.packLoseFocus(); |
|
|
this.$refs.scanPopup.packLoseFocus(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
showQuestionMessage(message, callback) { |
|
|
showQuestionMessage(message, callback) { |
|
|
setTimeout(r => { |
|
|
setTimeout(r => { |
|
|
this.scanPopupLoseFocus(); |
|
|
this.scanPopupLoseFocus(); |
|
@ -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) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|