Browse Source

修改扫描忙条

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

19
mycomponents/scan/winComScan.vue

@ -10,7 +10,7 @@
@input="handelScanMsg" :cursor="cursorIndex"></textarea>
</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">
<image src="/static/icons/icons_camera.svg" alt="" />
</view> -->
@ -84,7 +84,7 @@
type: Boolean,
default: true
},
headerType:{
headerType: {
type: String,
default: 'HPQ' //HLB HMQ HCQ HPQ
}
@ -103,7 +103,7 @@
}
},
mounted() {
if(document.querySelector('textarea')!=null){
if (document.querySelector('textarea') != null) {
document.querySelector('textarea').setAttribute('inputmode', 'none')
}
// if (this.$el.querySelector('textarea') != null) {
@ -134,9 +134,12 @@
this.handelScanMsg();
},
handelScanMsg() {
let that = this;
//
uni.showLoading({
title: '解析中...',
mask: true
})
let that = this;
let index = that.scanMsg.indexOf('\n');
if (index > 0) {
// that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50';
@ -152,11 +155,7 @@
that.scanList.unshift(content);
}
uni.showLoading({
title:'解析中...',
mask:true
})
getLabelInfo(content,this.headerType, callback => {
getLabelInfo(content, this.headerType, callback => {
uni.hideLoading();
let scanResult = callback;
if (scanResult.success) {

66
pages/count/job/countDetail.vue

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

Loading…
Cancel
Save