Browse Source

YT-571采购收货,任务如果允许编辑,左滑要有编辑按钮,并且实现编辑功能

intex_online20241111
zhang_li 3 weeks ago
parent
commit
d97952e14b
  1. 25
      src/pages/purchaseReceipt/job/receiptDetail.vue

25
src/pages/purchaseReceipt/job/receiptDetail.vue

@ -307,8 +307,6 @@
if (this.scanMessage) { if (this.scanMessage) {
this.$refs.scanPopup.simulateScan(this.scanMessage); this.$refs.scanPopup.simulateScan(this.scanMessage);
} }
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
} }
@ -319,11 +317,12 @@
}) })
}, },
getScanResult(result) { getScanResult(result) {
if(this.managementType == 'BY_BATCH'){ this.balanceInfo = result.balance
this.getScanResultAfterBatch(result) if(this.managementType == 'BY_BATCH'){
}else{ this.getScanResultAfterBatch(result)
this.getScanResultAfter(result) }else{
} this.getScanResultAfter(result)
}
}, },
// //
getScanResultAfter(result){ getScanResultAfter(result){
@ -457,6 +456,7 @@
item.scaned = true; item.scaned = true;
itemDetail.scanDate = new Date(); itemDetail.scanDate = new Date();
item.handleQty = calc.add(item.handleQty,result.label.qty) item.handleQty = calc.add(item.handleQty,result.label.qty)
item.balanceQty = balanceInfo.qty;
item.toLocationCode = this.toLocationCode; item.toLocationCode = this.toLocationCode;
}) })
// calcHandleQty(this.detailSource); // calcHandleQty(this.detailSource);
@ -507,6 +507,7 @@
pack.labelQty = Number(result.label.qty); pack.labelQty = Number(result.label.qty);
} }
} }
itemDetail.balanceQty = balanceInfo.qty;
calcTreeHandleQty(this.detailSource); calcTreeHandleQty(this.detailSource);
itemDetail.packList.sort(compareDesc('scanDate')); // itemDetail.packList.sort(compareDesc('scanDate')); //
this.$forceUpdate() this.$forceUpdate()
@ -538,6 +539,7 @@
console.log(itemDetail.handleQty) console.log(itemDetail.handleQty)
itemDetail.toLocationCode = this.toLocationCode; itemDetail.toLocationCode = this.toLocationCode;
itemDetail.labelQty = Number(result.label.qty); itemDetail.labelQty = Number(result.label.qty);
itemDetail.balanceQty = balanceInfo.qty;
itemDetail.packList.forEach(pac => { itemDetail.packList.forEach(pac => {
pac.scaned = true pac.scaned = true
pac.scanDate = new Date(); pac.scanDate = new Date();
@ -568,7 +570,10 @@
}, },
updateData() { updateData() {
if(this.managementType == 'BY_BATCH'){
}else{
calcTreeHandleQty(this.detailSource) calcTreeHandleQty(this.detailSource)
}
// calcHandleQty(this.detailSource); // calcHandleQty(this.detailSource);
}, },
@ -710,6 +715,7 @@
var params = this.setParams(); var params = this.setParams();
let that = this let that = this
console.log(params) console.log(params)
return
purchaseReceiptJobSubmit(params).then(res => { purchaseReceiptJobSubmit(params).then(res => {
if (res.data) { if (res.data) {
let isCheckPrint = getSwitchInfoByCode(this.switchCode)// let isCheckPrint = getSwitchInfoByCode(this.switchCode)//
@ -816,7 +822,7 @@
var subList = [] var subList = []
var createTime = getCurrDateTime(); var createTime = getCurrDateTime();
var creator = this.$store.state.user.id var creator = this.$store.state.user.id
console.log(8787,this.detailSource)
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
// if (!detail.scaned) { // if (!detail.scaned) {
@ -828,8 +834,7 @@
} }
}) })
detail.toLocationCode = this.toLocationCode ? this.toLocationCode :this.jobToLocationCode detail.toLocationCode = this.toLocationCode ? this.toLocationCode :this.jobToLocationCode
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 = info.packingNumber;
detail.packingNumber = info.packingNumber; detail.packingNumber = info.packingNumber;
detail.formPackingNumber = info.packingNumber; detail.formPackingNumber = info.packingNumber;

Loading…
Cancel
Save