Browse Source

修改盘点扫描

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

116
pages/count/job/countDetail.vue

@ -260,7 +260,8 @@
item.handleQty = 0; item.handleQty = 0;
for (let detail of item.subList) { for (let detail of item.subList) {
if (detail != undefined && detail.scaned) { 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; let that = this;
that.package = result.package; that.package = result.package;
that.label = result.label; that.label = result.label;
//,
var item = this.detailSource.find(r => r.itemCode == that.package.itemCode); var item = this.detailSource.find(r => r.itemCode == that.package.itemCode);
let subItem = item.subList.find(item => { if (item == undefined) {
if (item.packingNumber == that.label.packingNumber && that.scanByBalance(result);
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();
}
})
} else { } else {
if (result.balance.length == 0) { let subItem = item.subList.find(item => {
that.scanPopupLoseFocus() if (item.packingNumber == that.label.packingNumber &&
that.$refs.comMessage.showQuestionMessage("该包装在来源库位[" + that.fromLocationCode + item.batch == that.label.batch) {
"],未查找到库存,是否继续盘点?", return item;
}
})
if (subItem != undefined && subItem.scaned) {
this.$refs.comMessage.showQuestionMessage("箱码【" + that.label.packingNumber +
"】已经完成盘点,是否要编辑盘点结果?",
res => { res => {
if (res) { if (res) {
that.editInventoryStatus = true; this.$refs.countQtyEdit.openEditPopupShowSeconds(subItem,
let item = that.package; item.subList);
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);
} else { } else {
// this.scanPopupGetFocus();
that.scanPopupGetFocus();
} }
}) })
} else if (result.balance.length == 1) { } else {
that.balance = result.balance[0]; that.scanByBalance(result);
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) { } 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) { editConfirm(qty, inventoryStatus, mode) {
let that = this; let that = this;
var detail = that.detailSource.find(r => r.itemCode == that.package.itemCode); var detail = that.detailSource.find(r => r.itemCode == that.package.itemCode);
@ -385,7 +395,7 @@
// //
if (detail == undefined) { if (detail == undefined) {
// //
that.addNewItemCodeToList() that.addNewItemCodeToList(qty, inventoryStatus)
} 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 &&
@ -433,18 +443,19 @@
this.scanPopupGetFocus(); this.scanPopupGetFocus();
}, },
addNewItemCodeToList() { addNewItemCodeToList(qty, inventoryStatus) {
this.$refs.comMessage.showQuestionMessage("物料[" + this.package.itemCode + "]不在列表中,是否添加到列表?", this.$refs.comMessage.showQuestionMessage("物料[" + this.package.itemCode + "]不在列表中,是否添加到列表?",
res => { res => {
if (res) { if (res) {
var item = this.createAddItemInfo(this.balance, this.package); 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); item.subList.push(newDetail);
this.detailSource.push(item) this.detailSource.push(item)
this.showMessage('添加成功');
this.updateData() this.updateData()
this.scanPopupGetFocus();
} }
}) })
}, },
addExistItemCodeToList(detail, qty, inventoryStatus) { addExistItemCodeToList(detail, qty, inventoryStatus) {
@ -453,9 +464,10 @@
this.$refs.comMessage.showQuestionMessage("盘点结果不在明细列表中,是否添加到列表?", this.$refs.comMessage.showQuestionMessage("盘点结果不在明细列表中,是否添加到列表?",
res => { res => {
if (res) { if (res) {
detail.qty = calc.add(qty, qty) // detail.qty = calc.add(qty, qty)
let newDetail = that.createAddDetailInfo(qty, inventoryStatus); // let newDetail = that.createAddDetailInfo(qty, inventoryStatus); //
detail.subList.push(newDetail); detail.subList.push(newDetail);
this.showMessage('添加成功');
that.updateData() that.updateData()
} }
that.scanPopupGetFocus(); that.scanPopupGetFocus();
@ -468,14 +480,16 @@
itemName: this.package.itemName, itemName: this.package.itemName,
stdPackQty: this.package.stdPackQty, stdPackQty: this.package.stdPackQty,
stdPackUnit: this.package.stdPackUnit, stdPackUnit: this.package.stdPackUnit,
qty: Number(qty), // qty: Number(qty),
qty: 0,
handleQty: 0, handleQty: 0,
uom: pack.uom, uom: this.package.uom,
subList: [], subList: [],
} }
return item; return item;
}, },
//
createAddDetailInfo(qty, inventoryStatus) { createAddDetailInfo(qty, inventoryStatus) {
var detail = { var detail = {
id: "0", // id: "0", //

2
static/config.json

@ -21,7 +21,7 @@
"value": "http://192.168.0.158:12080/admin-api", "value": "http://192.168.0.158:12080/admin-api",
"dev2": "http://192.168.0.157:12080/admin-api", "dev2": "http://192.168.0.157:12080/admin-api",
"chefang": "http://192.168.0.176: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", "liuchen": "http://192.168.0.157:12080/admin-api",
"xuebing": "http://192.168.0.106:12080/admin-api", "xuebing": "http://192.168.0.106:12080/admin-api",
"dev": "http://dev.ccwin-in.com:25100/api/admin-api", "dev": "http://dev.ccwin-in.com:25100/api/admin-api",

Loading…
Cancel
Save