Browse Source

修改采购退货数量汇总

hella_online_20240911
lijuncheng 3 months ago
parent
commit
a45813976d
  1. 2
      src/pages/purchaseReturn/coms/comReturnDetailCard.vue
  2. 1
      src/pages/purchaseReturn/coms/comScanReturnPack.vue
  3. 70
      src/pages/purchaseReturn/job/returnDetail.vue

2
src/pages/purchaseReturn/coms/comReturnDetailCard.vue

@ -12,7 +12,7 @@
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="itemCoceClick($event,item,index)"
:right-options="removeOptions">
<item-qty :dataContent="item" :handleQty="item.handleQty"></item-qty>
<item-qty :dataContent="item" :isShowBalanceQty="false" :handleQty="item.handleQty"></item-qty>
</uni-swipe-action-item>
</uni-swipe-action>
<!-- <com-issue-request-info :workShopCode="dataContent.workShopCode" :dataContent="dataContent">

1
src/pages/purchaseReturn/coms/comScanReturnPack.vue

@ -497,6 +497,7 @@
batch.Records.push(record);
this.issueRecord.unshift(record)
this.calcBatchHandleQty(batch);
this.$emit('updateData', "");
this.getfocus();
},

70
src/pages/purchaseReturn/job/returnDetail.vue

@ -236,6 +236,8 @@
},
updateData(record) {
if(record){
let requestLocation = this.detailSource.find(r => r.toLocationCode == record.toLocationCode);
let item = requestLocation.Items.find(r => r.itemCode == record.itemCode);
let itemHandleQty = 0;
@ -253,8 +255,34 @@
itemHandleQty = calc.add(itemHandleQty, handleQty)
}
})
item.handleQty=itemHandleQty;
}
this.$forceUpdate()
}else {
//
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(record){
var handleQty =record.qty?record.qty:0
totalQty = calc.add(totalQty,handleQty)
}
// item.handleQty=itemHandleQty;
})
})
})
//
item.handleQty =totalQty
})
})
}
//
},
submit(){
@ -280,50 +308,18 @@
checkCount(){
let str=""
let commitHint=""
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(this.jobContent.allowPartialComplete=="FALSE"){
if(item.taskQty!=item.totalQty){
str += `物料号【${item.itemCode}任务数量【${item.taskQty}】与实际提交数量【${item.totalQty}】不一致\n`
if(item.taskQty!=item.handleQty){
str += `物料号【${item.itemCode}】实际提交数量【${item.handleQty}】与任务数量【${item.taskQty}】不一致\n`
}
}else {
//
if(item.taskQty!=item.totalQty){
commitHint += `物料号【${item.itemCode}任务数量【${item.taskQty}】与实际提交数量【${item.totalQty}】不一致,是否提交\n`
if(item.taskQty!=item.handleQty){
commitHint += `物料号【${item.itemCode}】实际提交数量【${item.handleQty}】与任务数量【${item.taskQty}】不一致,是否提交?\n`
}
}
})

Loading…
Cancel
Save