|
|
@ -27,7 +27,7 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="page-main"> |
|
|
|
<scroll-view scroll-y="true" class=""> |
|
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
|
<view v-for="(toLocation, index) in detailSource"> |
|
|
|
<comDeliverDetailCard ref='comIssueDetailCard' |
|
|
|
:dataContent="toLocation" |
|
|
@ -37,14 +37,18 @@ |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<div class="btn_bottom"> |
|
|
|
<view class="" style="display: flex;flex-direction: row;"> |
|
|
|
|
|
|
|
<view class="page-footer"> |
|
|
|
<view class="uni-flex u-col-center space-between padding_10" |
|
|
|
style="background-color:ghostwhite; width: 100%; "> |
|
|
|
<view class=""> |
|
|
|
<button class="btn_commit" hover-class="btn_commit_after" @click="submit()">提交</button> |
|
|
|
</view> |
|
|
|
<view class=" uni-flex uni-row"> |
|
|
|
<button class="btn_single_commit" hover-class="btn_commit_after" @click="submit()">提交</button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</div> |
|
|
|
</view> |
|
|
|
|
|
|
|
<win-scan-button @goScan='openScanDetailPopup'></win-scan-button> |
|
|
|
<comScanDeliverPack ref="comScanIssuePack" @closeScan='closeScan' @updateData='updateData'> |
|
|
|
</comScanDeliverPack> |
|
|
@ -244,6 +248,58 @@ |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
checkCount(){ |
|
|
|
let str="" |
|
|
|
this.detailSource.forEach(detail => { |
|
|
|
detail.Items.forEach(item => { |
|
|
|
var taskQty =0; |
|
|
|
item.taskQty =calc.add(taskQty,item.qty) |
|
|
|
var totalQty =0; |
|
|
|
item.Locations.forEach(lco => { |
|
|
|
lco.Batchs.forEach(batch => { |
|
|
|
batch.Records.forEach(record => { |
|
|
|
// if (batch.qty != record.qty) { |
|
|
|
// var tempHandleQty = 0 |
|
|
|
// if (record.qty) { |
|
|
|
// tempHandleQty = record.qty |
|
|
|
// } else { |
|
|
|
// tempHandleQty = 0 |
|
|
|
// } |
|
|
|
// if (batch.qty != 0) { |
|
|
|
// str += |
|
|
|
// `包装号【${record.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${batch.qty}】不一致\n` |
|
|
|
// } |
|
|
|
// } |
|
|
|
if(record){ |
|
|
|
var hanleQty =record.qty?record.qty:0 |
|
|
|
totalQty = calc.add(totalQty,hanleQty) |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
item.totalQty =totalQty |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
this.detailSource.forEach(detail=>{ |
|
|
|
detail.Items.forEach(item=>{ |
|
|
|
if(item.taskQty!=item.totalQty){ |
|
|
|
str += `物料号【${item.itemCode}】提交数量【${item.totalQty}】与任务物料数量【${item.taskQty}】不一致\n` |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
if(str){ |
|
|
|
str = '任务明细未全部完成,请全部扫描后提交\n' + str |
|
|
|
this.showErrorMessage(str) |
|
|
|
} |
|
|
|
|
|
|
|
return str?false:true |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
submitJob() { |
|
|
|
var params = this.setParams() |
|
|
@ -254,6 +310,12 @@ |
|
|
|
this.$refs.comMessage.showConfirmMessageModal('请扫描箱码') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if(!this.checkCount()){ |
|
|
|
uni.hideLoading() |
|
|
|
return ; |
|
|
|
} |
|
|
|
|
|
|
|
deliverJobSubmit(params).then(res => { |
|
|
|
uni.hideLoading() |
|
|
|
if (res.data) { |
|
|
@ -417,9 +479,6 @@ |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
}, |
|
|
|
|
|
|
|
showScanMessage(message) { |
|
|
|
this.$refs.comMessage.showScanMessage(message); |
|
|
|
}, |
|
|
|
|
|
|
|
closeScanMessage() { |
|
|
|
this.scanPopupGetFocus(); |
|
|
|