Browse Source

修改盘点扫描

wms3.0_pda
niexiting 10 months ago
parent
commit
39686e18a3
  1. 2
      pages/count/coms/comCountDetailCard.vue
  2. 116
      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>

116
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,56 +322,30 @@
let that = this;
that.package = result.package;
that.label = result.label;
//,
var item = this.detailSource.find(r => r.itemCode == that.package.itemCode);
let subItem = item.subList.find(item => {
if (item.packingNumber == that.label.packingNumber &&
item.batch == that.label.batch) {
return item;
}
})
if (subItem != undefined && subItem.scaned) {
this.$refs.comMessage.showQuestionMessage("箱码【" + that.label.packingNumber +
"】已经完成盘点,是否要编辑盘点结果?",
res => {
if (res) {
this.$refs.countQtyEdit.openEditPopupShowSeconds(subItem,
item.subList);
} else {
this.scanPopupGetFocus();
}
})
if (item == undefined) {
that.scanByBalance(result);
} else {
if (result.balance.length == 0) {
that.scanPopupLoseFocus()
that.$refs.comMessage.showQuestionMessage("该包装在来源库位[" + that.fromLocationCode +
"],未查找到库存,是否继续盘点?",
let subItem = item.subList.find(item => {
if (item.packingNumber == that.label.packingNumber &&
item.batch == that.label.batch) {
return item;
}
})
if (subItem != undefined && subItem.scaned) {
this.$refs.comMessage.showQuestionMessage("箱码【" + that.label.packingNumber +
"】已经完成盘点,是否要编辑盘点结果?",
res => {
if (res) {
that.editInventoryStatus = true;
let item = that.package;
item.packingNumber = that.label.packingNumber;
item.qty = Number(that.label.qty);
item.handleQty = Number(that.label.qty);
item.balanceQty = 0;
item.inventoryStatus = "OK";
that.balance = item;
that.$refs.countQtyEdit.openEditPopupShowSeconds(item,
null);
this.$refs.countQtyEdit.openEditPopupShowSeconds(subItem,
item.subList);
} else {
//
that.scanPopupGetFocus();
this.scanPopupGetFocus();
}
})
} else if (result.balance.length == 1) {
that.balance = result.balance[0];
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);
} else {
that.scanByBalance(result);
}
}
} catch (e) {
@ -378,6 +353,41 @@
}
},
scanByBalance(result) {
let that = this;
if (result.balance.length == 0) {
that.scanPopupLoseFocus()
that.$refs.comMessage.showQuestionMessage("该包装在来源库位[" + that.fromLocationCode +
"],未查找到库存,是否继续盘点?",
res => {
if (res) {
that.editInventoryStatus = true;
let item = that.package;
item.packingNumber = that.label.packingNumber;
item.qty = 0
item.handleQty = Number(that.label.qty);
item.balanceQty = 0;
item.inventoryStatus = "OK";
that.balance = item;
that.$refs.countQtyEdit.openEditPopupShowSeconds(item,
null);
} else {
//
that.scanPopupGetFocus();
}
})
} 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);
}
},
editConfirm(qty, inventoryStatus, mode) {
let that = this;
var detail = that.detailSource.find(r => r.itemCode == that.package.itemCode);
@ -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