Browse Source

YT-816直接发料,扫描箱码应是标签数量

intex_online20241111
zhang_li 3 weeks ago
parent
commit
1a830ff8af
  1. 16
      src/common/record.js
  2. 2
      src/mycomponents/package/packageCard.vue
  3. 2
      src/mycomponents/scan/winComScan.vue
  4. 5
      src/pages/issue/record/directIssueByBatch.vue
  5. 6
      src/pages/purchaseReceipt/job/receiptDetail.vue

16
src/common/record.js

@ -48,7 +48,23 @@ export function createDetailInfo(balance, pack) {
return detail; return detail;
} }
export function createDetailInfoForLabel(balance, pack,label) {
balance.scaned = true;
// data.toInventoryStatus = this.toInventoryStatus == "" ? data.inventoryStatus : this.toInventoryStatus;
// data.inventoryStatus = data.inventoryStatus;
let detail = deepCopyData(balance);
detail.balanceQty = new Decimal(detail.qty).toNumber()
detail.qty = new Decimal(detail.qty).toNumber();
detail.packQty = pack.packQty ? new Decimal(pack.packQty).toNumber() : 0
detail.packUnit = pack.packUnit
console.log(988,label.qty)
detail.handleQty = new Decimal(label.qty).toNumber();
detail.package = pack;
detail.productionlineCode = pack.productionLineCode; // 制品回收记录需要加的
detail.toInventoryStatus = balance.inventoryStatus; // 制品回收记录需要加的
return detail;
}
export function createDetailByPackInfo(pack) { export function createDetailByPackInfo(pack) {

2
src/mycomponents/package/packageCard.vue

@ -6,7 +6,7 @@
<view style="word-break: break-all;"> <view style="word-break: break-all;">
<!-- <container v-if="isShowContainer&&dataContent.containerNumber!=null" :container="dataContent.containerNumber"> <!-- <container v-if="isShowContainer&&dataContent.containerNumber!=null" :container="dataContent.containerNumber">
</container> --> </container> -->
<pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack> <pack :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch && dataContent.batch!=null" :batch="dataContent.batch"></batch> <batch v-if="isShowBatch && dataContent.batch!=null" :batch="dataContent.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode"> <location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode">
</location> </location>

2
src/mycomponents/scan/winComScan.vue

@ -155,11 +155,9 @@
// title: '...', // title: '...',
// mask: true // mask: true
// }) // })
console.log(222)
let that = this; let that = this;
// if(index==-1){ // if(index==-1){
// that.sc // that.sc
console.log(that.scanMsg.includes('\n'))
if (that.scanMsg.includes('\n')) { if (that.scanMsg.includes('\n')) {
// that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50'; // that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50';
setTimeout(() => { setTimeout(() => {

5
src/pages/issue/record/directIssueByBatch.vue

@ -81,6 +81,7 @@
createItemInfo, createItemInfo,
createDetailInfo, createDetailInfo,
calcHandleQty, calcHandleQty,
createDetailInfoForLabel
} from '@/common/record.js'; } from '@/common/record.js';
import { import {
@ -251,7 +252,7 @@
}) })
if (item == undefined) { if (item == undefined) {
var itemp = createItemInfo(balance, pack); var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfoForLabel(balance, pack,label);
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
} else { } else {
@ -263,7 +264,7 @@
} }
}) })
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfoForLabel(balance, pack,label);
item.subList.push(newDetail); item.subList.push(newDetail);
} else { } else {
detail.handleQty =calc.add(detail.handleQty, result.label.qty) detail.handleQty =calc.add(detail.handleQty, result.label.qty)

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

@ -467,6 +467,7 @@
} }
} }
} else if (result.label.labelType == "PurchaseLabel") { } else if (result.label.labelType == "PurchaseLabel") {
debugger
var packingNumber = result.package.number; var packingNumber = result.package.number;
var parentpackingNumber = result.package.parentNumber; var parentpackingNumber = result.package.parentNumber;
var batch = result.label.batch; var batch = result.label.batch;
@ -492,7 +493,7 @@
} else { } else {
let isScan = false let isScan = false
if(packingNumber){ if(packingNumber){
isScan = this.packingNumberList.some(item=>item == packingNumber) isScan = this.packList.some(item=>item == packingNumber)
}else{ }else{
isScan = false isScan = false
} }
@ -502,7 +503,8 @@
pack.handleQty = calc.add(pack.handleQty,result.label.qty) pack.handleQty = calc.add(pack.handleQty,result.label.qty)
} else { } else {
this.packingNumberList.push(packingNumber) this.packList.push(packingNumber)
pack.packList.push(packingNumber)
pack.scaned = true pack.scaned = true
pack.scanDate = new Date(); pack.scanDate = new Date();
pack.handleQty = Number(result.label.qty); pack.handleQty = Number(result.label.qty);

Loading…
Cancel
Save