Browse Source

YT-403pda 扫描2个批次,没有区分批次显示

intex_online20241111
zhang_li 1 month ago
parent
commit
da92619f9a
  1. 4
      src/mycomponents/balance/recommendBalanceBatch.vue
  2. 5
      src/pages/deliver/coms/comDeliverDetailCardBatch.vue
  3. 54
      src/pages/deliver/coms/comScanDeliverPackBatch.vue
  4. 3
      src/pages/deliver/job/deliverDetailBatch.vue

4
src/mycomponents/balance/recommendBalanceBatch.vue

@ -6,8 +6,8 @@
推荐
</view>
<view style="word-break: break-all">
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
<pack v-if="isShowPack&&detail.packingNumber" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch&&detail.batch" :batch="detail.batch"></batch>
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location>
</view>
</view>

5
src/pages/deliver/coms/comDeliverDetailCardBatch.vue

@ -3,11 +3,11 @@
<!-- <requiredLocation title="需求库位" :locationCode="dataContent.toLocationCode"
:isShowEdit="dataContent.allowModifyLocation==1"></requiredLocation> -->
<view v-for="(item,index) in dataContent.subList">
<view v-for="(item,index) in dataContent.subList" style="margin-bottom: 20rpx;">
<uni-swipe-action ref="swipeAction" :class="item.scaned? 'scan_view':''">
<uni-swipe-action-item
:right-options="(item.scaned&&isEdit)?editAndRemoveOptions : item.scaned? removeOptions:options"
@click="swipeClick($event,item,index)" style='padding:0px 0px 5px 0px;align-items: center;'>
@click="swipeClick($event,item,index)" style='padding:20rpx 0px 5px 0px;align-items: center;'>
<item-qty :dataContent="item" :handleQty="item.handleQty" :isShowBalanceQty="false"></item-qty>
<location :locationCode="item.fromLocationCode"></location>
<recommendBalanceBatch style='margin-left: 20px;' :detail="item" :isShowLocation="false"
@ -129,7 +129,6 @@ import {
});
},
confirm(val) {
console.log(44,this.editItem)
this.editItem.handleQty = Number(val);
this.$emit('updateData', this.editItem)
}

54
src/pages/deliver/coms/comScanDeliverPackBatch.vue

@ -305,7 +305,7 @@
let packingCode = label.packingNumber;
let lot = label.batch;
let item = that.toLocation.find(r => r.itemCode == itemCode);
item.scaned =true
// item.scaned =true
let fromLocation = that.toLocation.find(l => l.fromLocationCode == that.fromLocationCode);
// --
if(!fromLocation){
@ -334,7 +334,6 @@
item.Locations.push(fromLocation)
}
if (fromLocation != undefined) {
console.log(34444)
let batch = fromLocation.batch;
if (batch != undefined) {
that.addRecord(item.batch, label, balance, packageInfo)
@ -402,27 +401,30 @@
balance.packQty = packageInfo.packQty
balance.packUnit = packageInfo.packUnit
let record = {
scaned: true,
itemCode: label.itemCode,
packingNumber: label.packingNumber,
batch: label.batch,
qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty),
uom: balance.uom,
inventoryStatus: balance.inventoryStatus,
balance: balance,
toLocationCode: this.toLocationCode,
supplierCode: label.supplierCode,
packUnit: packageInfo.packUnit,
packQty: packageInfo.packQty,
singlePrice:balance.singlePrice,
amount:balance.amount
scaned: true,
itemCode: label.itemCode,
packingNumber: label.packingNumber,
parentPackingNumber: packageInfo.parentNumber,
batch: label.batch,
// qty: Number(balance.qty),
// qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty),
qty: Number(balance.qty),
handleQty:0,
uom: balance.uom,
inventoryStatus: balance.inventoryStatus,
balance: balance,
toLocationCode: this.toLocationCode,
supplierCode: label.supplierCode,
packUnit: packageInfo.packUnit,
packQty: packageInfo.packQty,
fromLocationCode:balance.locationCode,
}
return record;
},
calcBatchHandleQty(batch,label,balance) {
this.dataContent.subList.forEach(item => {
if(item.itemCode == balance.itemCode&&item.batch == batch){
if(item.itemCode == label.itemCode&&item.batch == label.batch){
item.handleQty = item.handleQty || 0
item.handleQty = calc.add(item.handleQty, label.qty);
}
@ -430,8 +432,22 @@
},
addRecord(batch, label, balance, packageInfo) {
this.calcBatchHandleQty(batch,label,balance);
this.getfocus();
var checkData = this.dataContent.subList.find(r => {
if (r.batch == balance.batch) {
return r;
}
})
if (checkData) {
checkData.scaned = true
this.calcBatchHandleQty(batch,label,balance);
this.getfocus();
} else {
let record = this.creatRecord(label, balance, packageInfo);
this.dataContent.subList.push(record);
this.calcBatchHandleQty(batch,label,balance);
this.getfocus();
this.$emit("afterScan");
}
},
getfocus() {

3
src/pages/deliver/job/deliverDetailBatch.vue

@ -312,7 +312,7 @@
}
subItem.recordList = []
let record = {};
record.handleQty = r.qty;
record.handleQty = r.handleQty;
record.toContainerNumber = r.ContainerNumber;
record.toInventoryStatus = r.inventoryStatus;
record.toLocationCode = subItem.toLocationCode;
@ -438,7 +438,6 @@
var datacontent = {}
//
// Object.assign(datacontent, this.detailSource);
console.log(2323)
this.$refs.comScanIssuePack.openScanPopup(this.detailSource, this.jobContent);
},
closeScanPopup() {

Loading…
Cancel
Save