Browse Source

修改盘点扫描

wms3.0_pda
niexiting 10 months ago
parent
commit
39686e18a3
  1. 2
      pages/count/coms/comCountDetailCard.vue
  2. 44
      pages/count/job/countDetail.vue
  3. 2
      static/config.json

2
pages/count/coms/comCountDetailCard.vue

@ -7,7 +7,7 @@
<uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions">
<!-- 明盘 -->
<item-qty v-if="settingParam.isOpenCount=='TRUE'" :dataContent="dataContent"
:handleQty="dataContent.handleQty">
:handleQty="dataContent.handleQty" :showItemQty="settingParam.isOpenCount=='FALSE'">
</item-qty>
<!-- 盲盘 -->
<item v-else :dataContent="dataContent"></item>

44
pages/count/job/countDetail.vue

@ -260,7 +260,8 @@
item.handleQty = 0;
for (let detail of item.subList) {
if (detail != undefined && detail.scaned) {
item.handleQty = calc.add(item.handleQty, detail.qty)
item.handleQty = calc.add(Number(item.handleQty), Number(detail.handleQty));
// item.handleQty = item.handleQty + detail.handleQty;
}
}
}
@ -321,9 +322,10 @@
let that = this;
that.package = result.package;
that.label = result.label;
//,
var item = this.detailSource.find(r => r.itemCode == that.package.itemCode);
if (item == undefined) {
that.scanByBalance(result);
} else {
let subItem = item.subList.find(item => {
if (item.packingNumber == that.label.packingNumber &&
item.batch == that.label.batch) {
@ -343,6 +345,16 @@
}
})
} else {
that.scanByBalance(result);
}
}
} catch (e) {
this.showErrorMessage(e.message)
}
},
scanByBalance(result) {
let that = this;
if (result.balance.length == 0) {
that.scanPopupLoseFocus()
that.$refs.comMessage.showQuestionMessage("该包装在来源库位[" + that.fromLocationCode +
@ -352,7 +364,7 @@
that.editInventoryStatus = true;
let item = that.package;
item.packingNumber = that.label.packingNumber;
item.qty = Number(that.label.qty);
item.qty = 0
item.handleQty = Number(that.label.qty);
item.balanceQty = 0;
item.inventoryStatus = "OK";
@ -366,16 +378,14 @@
})
} else if (result.balance.length == 1) {
that.balance = result.balance[0];
that.balance.qty = 0
that.balance.handleQty = Number(that.label.qty);
that.balance.balanceQty = that.balance.qty;
that.balance.stdPackQty = that.package.stdPackQty;
that.balance.stdPackUnit = that.package.stdPackUnit;
that.$refs.countQtyEdit.openEditPopupShowSeconds(that.balance,
null);
}
}
} catch (e) {
this.showErrorMessage(e.message)
}
},
editConfirm(qty, inventoryStatus, mode) {
@ -385,7 +395,7 @@
//
if (detail == undefined) {
//
that.addNewItemCodeToList()
that.addNewItemCodeToList(qty, inventoryStatus)
} else {
var itemEditInfo = detail.subList.find(item => {
if (item.packingNumber == that.package.number &&
@ -433,18 +443,19 @@
this.scanPopupGetFocus();
},
addNewItemCodeToList() {
addNewItemCodeToList(qty, inventoryStatus) {
this.$refs.comMessage.showQuestionMessage("物料[" + this.package.itemCode + "]不在列表中,是否添加到列表?",
res => {
if (res) {
var item = this.createAddItemInfo(this.balance, this.package);
let newDetail = this.createAddDetailInfo(this.balance, this.package); //
let newDetail = this.createAddDetailInfo(qty, inventoryStatus); //
item.subList.push(newDetail);
this.detailSource.push(item)
this.showMessage('添加成功');
this.updateData()
this.scanPopupGetFocus();
}
})
},
addExistItemCodeToList(detail, qty, inventoryStatus) {
@ -453,9 +464,10 @@
this.$refs.comMessage.showQuestionMessage("盘点结果不在明细列表中,是否添加到列表?",
res => {
if (res) {
detail.qty = calc.add(qty, qty)
// detail.qty = calc.add(qty, qty)
let newDetail = that.createAddDetailInfo(qty, inventoryStatus); //
detail.subList.push(newDetail);
this.showMessage('添加成功');
that.updateData()
}
that.scanPopupGetFocus();
@ -468,14 +480,16 @@
itemName: this.package.itemName,
stdPackQty: this.package.stdPackQty,
stdPackUnit: this.package.stdPackUnit,
qty: Number(qty),
// qty: Number(qty),
qty: 0,
handleQty: 0,
uom: pack.uom,
uom: this.package.uom,
subList: [],
}
return item;
},
//
createAddDetailInfo(qty, inventoryStatus) {
var detail = {
id: "0", //

2
static/config.json

@ -21,7 +21,7 @@
"value": "http://192.168.0.158:12080/admin-api",
"dev2": "http://192.168.0.157:12080/admin-api",
"chefang": "http://192.168.0.176:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api",
"chenxinming": "http://192.179.0.230:12080/admin-api",
"liuchen": "http://192.168.0.157:12080/admin-api",
"xuebing": "http://192.168.0.106:12080/admin-api",
"dev": "http://dev.ccwin-in.com:25100/api/admin-api",

Loading…
Cancel
Save