Browse Source

修改扫描功能

wms3.0_pda
niexiting 10 months ago
parent
commit
30831cb114
  1. 11
      mycomponents/scan/winComScan.vue
  2. 29
      pages/count/job/countDetail.vue

11
mycomponents/scan/winComScan.vue

@ -135,10 +135,10 @@
}, },
handelScanMsg() { handelScanMsg() {
// //
uni.showLoading({ // uni.showLoading({
title: '解析中...', // title: '...',
mask: true // mask: true
}) // })
let that = this; let that = this;
let index = that.scanMsg.indexOf('\n'); let index = that.scanMsg.indexOf('\n');
if (index > 0) { if (index > 0) {
@ -154,9 +154,8 @@
if (that.isShowHistory) { if (that.isShowHistory) {
that.scanList.unshift(content); that.scanList.unshift(content);
} }
getLabelInfo(content, this.headerType, callback => { getLabelInfo(content, this.headerType, callback => {
uni.hideLoading(); // uni.hideLoading();
let scanResult = callback; let scanResult = callback;
if (scanResult.success) { if (scanResult.success) {
that.clear(); that.clear();

29
pages/count/job/countDetail.vue

@ -462,7 +462,7 @@
if (itemEditInfo == undefined) { if (itemEditInfo == undefined) {
// //
this.addExistItemCodeToList(detail, result); this.addExistItemCodeToList(detail);
} else { } else {
// //
@ -509,13 +509,12 @@
}, },
addExistItemCodeToList(detail) { addExistItemCodeToList(detail, qty, inventoryStatus) {
this.$refs.comMessage.showQuestionMessage("盘点明细不在列表中,是否添加到列表?", this.$refs.comMessage.showQuestionMessage("盘点明细不在列表中,是否添加到列表?",
res => { res => {
if (res) { if (res) {
detail.qty = calc.add(detail.qty, detail.qty) detail.qty = calc.add(qty, qty)
//this.balance, this.package, let newDetail = this.createAddDetailInfo(qty, inventoryStatus); //
let newDetail = this.createAddDetailInfo(); //
detail.subList.push(newDetail); detail.subList.push(newDetail);
this.updateData() this.updateData()
@ -537,31 +536,31 @@
return item; return item;
}, },
createAddDetailInfo() { createAddDetailInfo(qty, inventoryStatus) {
var detail = { var detail = {
id: "0", id: "0",
scaned: true, scaned: true,
countDetailNumber: "", countDetailNumber: "",
ownerCode: this.balance.ownerCode, ownerCode: this.balance.ownerCode,
packingNumber: pack.number, packingNumber: this.package.number,
containerNumber: this.balance.containerNumber, containerNumber: this.balance.containerNumber,
batch: pack.batch, batch: this.package.batch,
inventoryStatus:this. balance.inventoryStatus, inventoryStatus: inventoryStatus,
itemCode: this.package.itemCode, itemCode: this.package.itemCode,
itemName: this.package.itemName, itemName: this.package.itemName,
itemDesc1: this.package.itemDesc1, itemDesc1: this.package.itemDesc1,
itemDesc2: this.package.itemDesc2, itemDesc2: this.package.itemDesc2,
stdPackQty: this.package.stdPackQty,
stdPackUnit: this.package.stdPackUnit,
projectCode: "", projectCode: "",
qty: 0, qty: 0,
handleQty: this.balance.qty, handleQty: qty,
uom: balance.uom, uom: this.package.uom,
number: this.jobContent.number, number: this.jobContent.number,
remark: "", remark: "",
countQty: this.balance.qty, countQty: qty,
balanceQty:this. balance.qty, balanceQty: this.balance.qty,
fromLocationCode: this.balance.locationCode, fromLocationCode: this.balance.locationCode,
stdPackQty: this.package.stdPackQty,
stdPackUnit: this.package.stdPackUnit,
creator: this.$store.state.user.id creator: this.$store.state.user.id
} }
return detail; return detail;

Loading…
Cancel
Save