Browse Source

修改扫描忙条

wms3.0_pda
niexiting 10 months ago
parent
commit
0d90011cf5
  1. 25
      mycomponents/scan/winComScan.vue
  2. 66
      pages/count/job/countDetail.vue

25
mycomponents/scan/winComScan.vue

@ -10,7 +10,7 @@
@input="handelScanMsg" :cursor="cursorIndex"></textarea> @input="handelScanMsg" :cursor="cursorIndex"></textarea>
</view> </view>
<view class="uni-flex uni-row space-between u-col-center" > <view class="uni-flex uni-row space-between u-col-center">
<!-- <view class="paizhao" @click="scanQRCode()" v-if="true"> <!-- <view class="paizhao" @click="scanQRCode()" v-if="true">
<image src="/static/icons/icons_camera.svg" alt="" /> <image src="/static/icons/icons_camera.svg" alt="" />
</view> --> </view> -->
@ -84,7 +84,7 @@
type: Boolean, type: Boolean,
default: true default: true
}, },
headerType:{ headerType: {
type: String, type: String,
default: 'HPQ' //HLB HMQ HCQ HPQ default: 'HPQ' //HLB HMQ HCQ HPQ
} }
@ -103,7 +103,7 @@
} }
}, },
mounted() { mounted() {
if(document.querySelector('textarea')!=null){ if (document.querySelector('textarea') != null) {
document.querySelector('textarea').setAttribute('inputmode', 'none') document.querySelector('textarea').setAttribute('inputmode', 'none')
} }
// if (this.$el.querySelector('textarea') != null) { // if (this.$el.querySelector('textarea') != null) {
@ -134,9 +134,12 @@
this.handelScanMsg(); this.handelScanMsg();
}, },
handelScanMsg() { handelScanMsg() {
let that = this;
// //
uni.showLoading({
title: '解析中...',
mask: true
})
let that = this;
let index = that.scanMsg.indexOf('\n'); let index = that.scanMsg.indexOf('\n');
if (index > 0) { if (index > 0) {
// that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50'; // that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50';
@ -147,16 +150,12 @@
that.getfocus(); that.getfocus();
return; return;
} }
if (that.isShowHistory) { if (that.isShowHistory) {
that.scanList.unshift(content); that.scanList.unshift(content);
} }
uni.showLoading({ getLabelInfo(content, this.headerType, callback => {
title:'解析中...',
mask:true
})
getLabelInfo(content,this.headerType, callback => {
uni.hideLoading(); uni.hideLoading();
let scanResult = callback; let scanResult = callback;
if (scanResult.success) { if (scanResult.success) {
@ -170,7 +169,7 @@
that.getfocus(); that.getfocus();
} }
}) })
} }
}); });
}, 500); }, 500);
} }

66
pages/count/job/countDetail.vue

@ -380,12 +380,12 @@
editConfirm(qty, inventoryStatus, mode) { editConfirm(qty, inventoryStatus, mode) {
let that = this; let that = this;
var detail = this.detailSource.find(r => r.itemCode == that.package.itemCode); var detail = that.detailSource.find(r => r.itemCode == that.package.itemCode);
// //
if (detail == undefined) { if (detail == undefined) {
// //
this.addNewItemCodeToList(result) that.addNewItemCodeToList()
} else { } else {
var itemEditInfo = detail.subList.find(item => { var itemEditInfo = detail.subList.find(item => {
if (item.packingNumber == that.package.number && if (item.packingNumber == that.package.number &&
@ -397,23 +397,23 @@
if (itemEditInfo == undefined) { if (itemEditInfo == undefined) {
// //
this.addExistItemCodeToList(detail); that.addExistItemCodeToList(detail, qty, inventoryStatus);
} else { } else {
itemEditInfo.scaned = true; itemEditInfo.scaned = true;
itemEditInfo.handleQty = qty; itemEditInfo.handleQty = qty;
itemEditInfo.balanceQty = this.balance.qty; itemEditInfo.balanceQty = that.balance.qty;
itemEditInfo.stdPackQty = this.package.stdPackQty; itemEditInfo.stdPackQty = that.package.stdPackQty;
itemEditInfo.stdPackUnit = this.package.stdPackUnit; itemEditInfo.stdPackUnit = that.package.stdPackUnit;
this.$refs.countQtyEdit.openEditPopupShowSeconds(itemEditInfo, detail this.$refs.countQtyEdit.openEditPopupShowSeconds(itemEditInfo, detail
.subList); .subList);
this.updateData() that.updateData()
} }
//, //,
if (mode == 'edit') { if (mode == 'edit') {
this.currentEditItem.handleQty = 0; that.currentEditItem.handleQty = 0;
this.currentEditItem.scaned = false; that.currentEditItem.scaned = false;
this.currentEditItem = {}; that.currentEditItem = {};
} }
setTimeout(r => { setTimeout(r => {
@ -449,7 +449,7 @@
// //
if (detail == undefined) { if (detail == undefined) {
// //
this.addNewItemCodeToList(result) this.addNewItemCodeToList()
} else { } else {
// //
itemEditInfo = detail.subList.find(item => { itemEditInfo = detail.subList.find(item => {
@ -514,7 +514,8 @@
res => { res => {
if (res) { if (res) {
detail.qty = calc.add(detail.qty, detail.qty) detail.qty = calc.add(detail.qty, detail.qty)
let newDetail = this.createAddDetailInfo(this.balance, this.package); // //this.balance, this.package,
let newDetail = this.createAddDetailInfo(); //
detail.subList.push(newDetail); detail.subList.push(newDetail);
this.updateData() this.updateData()
@ -522,46 +523,45 @@
}) })
}, },
createAddItemInfo(balance, pack) { createAddItemInfo() {
let item = { let item = {
itemCode: pack.itemCode, itemCode: this.package.itemCode,
itemName: pack.itemName, itemName: this.package.itemName,
stdPackQty: pack.stdPackQty, stdPackQty: this.package.stdPackQty,
stdPackUnit: pack.stdPackUnit, stdPackUnit: this.package.stdPackUnit,
qty: Number(balance.qty), qty: Number(qty),
handleQty: 0, handleQty: 0,
uom: pack.uom, uom: pack.uom,
subList: [], subList: [],
} }
return item; return item;
}, },
createAddDetailInfo(balance, pack) { createAddDetailInfo() {
var detail = { var detail = {
id: "0", id: "0",
scaned: true, scaned: true,
countDetailNumber: "", countDetailNumber: "",
ownerCode: balance.ownerCode, ownerCode: this.balance.ownerCode,
packingNumber: pack.number, packingNumber: pack.number,
containerNumber: balance.containerNumber, containerNumber: this.balance.containerNumber,
batch: pack.batch, batch: pack.batch,
inventoryStatus: balance.inventoryStatus, inventoryStatus:this. balance.inventoryStatus,
itemCode: pack.itemCode, itemCode: this.package.itemCode,
itemName: pack.itemName, itemName: this.package.itemName,
itemDesc1: pack.itemDesc1, itemDesc1: this.package.itemDesc1,
itemDesc2: pack.itemDesc2, itemDesc2: this.package.itemDesc2,
projectCode: "", projectCode: "",
qty: 0, qty: 0,
handleQty: balance.qty, handleQty: this.balance.qty,
uom: balance.uom, uom: balance.uom,
number: this.jobContent.number, number: this.jobContent.number,
remark: "", remark: "",
countQty: balance.qty, countQty: this.balance.qty,
balanceQty: balance.qty, balanceQty:this. balance.qty,
fromLocationCode: balance.locationCode, fromLocationCode: this.balance.locationCode,
stdPackQty: pack.stdPackQty, stdPackQty: this.package.stdPackQty,
stdPackUnit: pack.stdPackUnit, stdPackUnit: this.package.stdPackUnit,
creator: this.$store.state.user.id creator: this.$store.state.user.id
} }
return detail; return detail;

Loading…
Cancel
Save