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. 28
      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>
<view style="word-break: break-all"> <view style="word-break: break-all">
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack> <pack v-if="isShowPack&&detail.packingNumber" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch> <batch v-if="isShowBatch&&detail.batch" :batch="detail.batch"></batch>
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location> <location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location>
</view> </view>
</view> </view>

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

@ -3,11 +3,11 @@
<!-- <requiredLocation title="需求库位" :locationCode="dataContent.toLocationCode" <!-- <requiredLocation title="需求库位" :locationCode="dataContent.toLocationCode"
:isShowEdit="dataContent.allowModifyLocation==1"></requiredLocation> --> :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 ref="swipeAction" :class="item.scaned? 'scan_view':''">
<uni-swipe-action-item <uni-swipe-action-item
:right-options="(item.scaned&&isEdit)?editAndRemoveOptions : item.scaned? removeOptions:options" :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> <item-qty :dataContent="item" :handleQty="item.handleQty" :isShowBalanceQty="false"></item-qty>
<location :locationCode="item.fromLocationCode"></location> <location :locationCode="item.fromLocationCode"></location>
<recommendBalanceBatch style='margin-left: 20px;' :detail="item" :isShowLocation="false" <recommendBalanceBatch style='margin-left: 20px;' :detail="item" :isShowLocation="false"
@ -129,7 +129,6 @@ import {
}); });
}, },
confirm(val) { confirm(val) {
console.log(44,this.editItem)
this.editItem.handleQty = Number(val); this.editItem.handleQty = Number(val);
this.$emit('updateData', this.editItem) this.$emit('updateData', this.editItem)
} }

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

@ -305,7 +305,7 @@
let packingCode = label.packingNumber; let packingCode = label.packingNumber;
let lot = label.batch; let lot = label.batch;
let item = that.toLocation.find(r => r.itemCode == itemCode); 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); let fromLocation = that.toLocation.find(l => l.fromLocationCode == that.fromLocationCode);
// -- // --
if(!fromLocation){ if(!fromLocation){
@ -334,7 +334,6 @@
item.Locations.push(fromLocation) item.Locations.push(fromLocation)
} }
if (fromLocation != undefined) { if (fromLocation != undefined) {
console.log(34444)
let batch = fromLocation.batch; let batch = fromLocation.batch;
if (batch != undefined) { if (batch != undefined) {
that.addRecord(item.batch, label, balance, packageInfo) that.addRecord(item.batch, label, balance, packageInfo)
@ -405,8 +404,12 @@
scaned: true, scaned: true,
itemCode: label.itemCode, itemCode: label.itemCode,
packingNumber: label.packingNumber, packingNumber: label.packingNumber,
parentPackingNumber: packageInfo.parentNumber,
batch: label.batch, batch: label.batch,
qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty), // 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, uom: balance.uom,
inventoryStatus: balance.inventoryStatus, inventoryStatus: balance.inventoryStatus,
balance: balance, balance: balance,
@ -414,15 +417,14 @@
supplierCode: label.supplierCode, supplierCode: label.supplierCode,
packUnit: packageInfo.packUnit, packUnit: packageInfo.packUnit,
packQty: packageInfo.packQty, packQty: packageInfo.packQty,
singlePrice:balance.singlePrice, fromLocationCode:balance.locationCode,
amount:balance.amount
} }
return record; return record;
}, },
calcBatchHandleQty(batch,label,balance) { calcBatchHandleQty(batch,label,balance) {
this.dataContent.subList.forEach(item => { 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 = item.handleQty || 0
item.handleQty = calc.add(item.handleQty, label.qty); item.handleQty = calc.add(item.handleQty, label.qty);
} }
@ -430,8 +432,22 @@
}, },
addRecord(batch, label, balance, packageInfo) { addRecord(batch, label, balance, packageInfo) {
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.calcBatchHandleQty(batch,label,balance);
this.getfocus(); 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() { getfocus() {

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

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

Loading…
Cancel
Save