diff --git a/mycomponents/qty/CountQtyEdit.vue b/mycomponents/qty/CountQtyEdit.vue
index 32e5e5dd..72bc32e6 100644
--- a/mycomponents/qty/CountQtyEdit.vue
+++ b/mycomponents/qty/CountQtyEdit.vue
@@ -38,14 +38,13 @@
数量 :
+ @mousedown="mousedown" @input="checkNum" :maxlength="maxlength" />
-
+
库存数量 :
{{Number(dataContent.balanceQty)}}
@@ -57,7 +56,7 @@
style="align-items: center; padding-left: 30rpx;">
库存状态 :
-
@@ -150,7 +149,7 @@
if (dot > -1) {
this.maxlength = dot + 7; //长度是小数点后两位
if (value.length > dot + 7) {
-
+
}
}
if (reg.test(value)) { //如果是正整数不包含小数点
@@ -209,20 +208,21 @@
}, 1000)
},
calcQty(val) {
- if(val>0){
+ if (val > 0) {
this.allQty = val * Number(this.dataContent.stdPackQty);
}
},
+
setValue() {
this.dataContent.handleQty = Number(this.allQty)
- this.$emit("confirm");
+ this.$emit("confirm", Number(this.allQty), this.inventoryStatus);
this.closeEditPopup();
},
updateStatus(value) {
this.inventoryStatus = value
- console.log(this.inventoryStatus)
},
+
getStdPackUnitInfo(value) {
return getStdPackUnitInfo(value).name
}
diff --git a/mycomponents/scan/winComScan.vue b/mycomponents/scan/winComScan.vue
index e75af61e..81671bdd 100644
--- a/mycomponents/scan/winComScan.vue
+++ b/mycomponents/scan/winComScan.vue
@@ -144,12 +144,6 @@
that.losefocus();
let content = uni.$u.trim(that.scanMsg)
if (content == "") {
- //消息框弹出位置不正确
- // this.$refs.comMessage.showErrorMessage('扫描的内容为空', res => {
- // if (res) {
- // that.getfocus();
- // }
- // })
that.getfocus();
return;
}
@@ -158,7 +152,12 @@
that.scanList.unshift(content);
}
+ uni.showLoading({
+ title:'解析中...',
+ mask:true
+ })
getLabelInfo(content,this.headerType, callback => {
+ uni.hideLoading();
let scanResult = callback;
if (scanResult.success) {
that.clear();
@@ -171,7 +170,7 @@
that.getfocus();
}
})
- }
+ }
});
}, 500);
}
diff --git a/mycomponents/scan/winScanPackAndLocation.vue b/mycomponents/scan/winScanPackAndLocation.vue
index 1e95e325..ba0c8903 100644
--- a/mycomponents/scan/winScanPackAndLocation.vue
+++ b/mycomponents/scan/winScanPackAndLocation.vue
@@ -72,7 +72,7 @@
} from '@/common/directory.js';
export default {
name: 'winScanPack',
- emits: ["getResult", "close"],
+ emits: ["getResult", "close", "getCountScanResult"],
components: {
winComScan,
comMessage,
@@ -225,6 +225,10 @@
} else {
if (result.label != null) {
this.scanResult = result;
+ uni.showLoading({
+ title: '查询中...',
+ mask: true
+ })
getBalanceByManagementPrecision(result.label, this.fromLocationCode, this.fromInventoryStatuses,
res => {
if (res.success) {
@@ -235,7 +239,7 @@
this.packGetFocus();
})
}
-
+ uni.hideLoading();
});
}
}
diff --git a/mycomponents/status/balanceStatus.vue b/mycomponents/status/balanceStatus.vue
index 19564c36..1cca06d4 100644
--- a/mycomponents/status/balanceStatus.vue
+++ b/mycomponents/status/balanceStatus.vue
@@ -3,7 +3,8 @@
{{statusDesc(status) }}
-
+
+
diff --git a/pages/count/job/countDetail.vue b/pages/count/job/countDetail.vue
index cb409033..ff6b163f 100644
--- a/pages/count/job/countDetail.vue
+++ b/pages/count/job/countDetail.vue
@@ -50,8 +50,8 @@
-
+
@@ -111,7 +111,10 @@
subList: [], //接口返回的任务subList
detailSource: [], //绑定在页面上的数据源
itemEditInfo: {},
- balance: {} //库存余额
+ balance: {}, //库存余额
+ editInventoryStatus: false,
+ package: {}, //包装
+ label: {} //标签
};
},
onLoad(option) {
@@ -148,7 +151,6 @@
} else {
uni.navigateBack();
}
-
return true;
}
},
@@ -268,11 +270,10 @@
updateData() {
this.calcHandleQty();
},
-
- editConfirm() {
- this.calcHandleQty();
- this.scanPopupGetFocus();
- },
+ // editConfirm() {
+ // this.calcHandleQty();
+ // this.scanPopupGetFocus();
+ // },
openScanPopup() {
let fromlocationCode = '';
@@ -295,6 +296,7 @@
}
this.$refs.scanPopup.openScanPopupForJob(fromlocationCode, fromlocationList, this.jobContent);
},
+
closeScanPopup() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup();
@@ -307,84 +309,183 @@
}
},
+ scanPopupLoseFocus() {
+ if (this.$refs.scanPopup != undefined) {
+ this.$refs.scanPopup.packLoseFocus();
+ }
+ },
+
+
//明盘
- getOpenScanResult(result) {
+ getScanResult(result) {
try {
- let label = result.label;
- this.balance = result.balance[0];
- //盘点了没有库存余额的数据,直接编辑盘点数量和盘点状态
- if (result.balance.length == 0) {
+ 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;
+ }
+ })
- return;
+ if (subItem != undefined && subItem.scaned) {
+ this.$refs.comMessage.showQuestionMessage("箱码【" + packingNumber +
+ "】已经完成盘点,是否要编辑数量",
+ res => {
+ if (res) {
+ this.$refs.countQtyEdit.openEditPopup(subItem,
+ item.subList);
+ } else {
+ this.scanPopupGetFocus();
+ }
+ })
} else {
-
+ 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 = Number(that.label.qty);
+ item.handleQty = Number(that.label.qty);
+ item.balanceQty = 0;
+ item.inventoryStatus = "OK";
+ this.balance = item;
+ that.$refs.countQtyEdit.openEditPopup(item,
+ null);
+ } else {
+ //继续扫描
+ that.scanPopupGetFocus();
+ }
+ })
+ } else if (result.balance.length == 1) {
+ this.balance = result.balance[0];
+ that.$refs.countQtyEdit.openEditPopup(this.balance,
+ null);
+ }
}
+ return;
+ // var packingNumber = that.label.packingNumber;
+ // var batch = that.label.batch;
+ // var itemCode = that.label.itemCode;
+ // var balanceQty = 0;
+ // var inventoryStatus = "OK"
+
+ // var detail = this.detailSource.find(r => r.itemCode == itemCode);
+ // var itemEditInfo;
+ // //检查物料号是否存在
+ // if (detail == undefined) {
+ // //物料号不存在,创建物料号数据添加到列表。设置为已经扫描
+ // this.addNewItemCodeToList(result)
+ // } else {
+ // if (result.balance.length == 0) {
+ // this.balance = label;
+ // this.balanceQty = 0;
+ // this.inventoryStatus = "OK";
+ // this.editInventoryStatus = true;
+
+ // //物料号存在,查询是否在任务列表中
+ // itemEditInfo = detail.subList.find(item => {
+ // if (item.packingNumber == packingNumber &&
+ // item.batch == batch) {
+ // return item;
+ // }
+ // })
+ // } else {
+ // this.balance = result.balance[0];
+ // balanceQty = this.balance.qty;
+ // inventoryStatus = this.balance.inventoryStatus;
+ // //物料号存在,查询是否在任务列表中
+ // itemEditInfo = detail.subList.find(item => {
+ // if (item.packingNumber == packingNumber &&
+ // item.batch == batch &&
+ // item.inventoryStatus == inventoryStatus) {
+ // return item;
+ // }
+ // })
+ // }
+
+ // if (itemEditInfo == undefined) {
+ // //不在任务列表中,提示是否添加到列表
+ // this.addExistItemCodeToList(detail, result);
+
+ // } else {
+ // //在列表中,更新已扫描状态,
+ // if (itemEditInfo.scaned) {
+ // this.$refs.comMessage.showQuestionMessage("箱码【" + packingNumber +
+ // "】已经完成盘点,是否要编辑数量",
+ // res => {
+ // if (res) {
+ // this.$refs.countQtyEdit.openEditPopup(itemEditInfo,
+ // detail.subList);
+ // } else {
+ // this.scanPopupGetFocus();
+ // }
+ // })
+
+ // } else {
+ // itemEditInfo.scaned = true;
+ // itemEditInfo.handleQty = balanceQty;
+ // itemEditInfo.balanceQty = balanceQty;
+ // itemEditInfo.stdPackQty = result.package.stdPackQty;
+ // itemEditInfo.stdPackUnit = result.package.stdPackUnit;
+ // this.$refs.countQtyEdit.openEditPopupShowSeconds(itemEditInfo, detail
+ // .subList);
+ // this.updateData()
+ // }
+ // }
+ // }
+ } catch (e) {
+ this.showErrorMessage(e.message)
+ }
+ },
+ editConfirm(qty, inventoryStatus) {
+ let that = this;
+ var detail = this.detailSource.find(r => r.itemCode == that.package.itemCode);
- this.balance = result.balance[0];
-
- var packingNumber = label.packingNumber;
- var batch = label.batch;
- var itemCode = label.itemCode;
-
- var balanceQty = this.balance.qty;
- var inventoryStatus = this.balance.inventoryStatus;
+ //检查物料号是否存在
+ if (detail == undefined) {
+ //物料号不存在,创建物料号数据添加到列表。设置为已经扫描
+ this.addNewItemCodeToList(result)
+ } else {
+ var itemEditInfo = detail.subList.find(item => {
+ if (item.packingNumber == that.package.number &&
+ item.batch == that.package.batch &&
+ item.inventoryStatus == inventoryStatus) {
+ return item;
+ }
+ })
- var detail = this.detailSource.find(r => r.itemCode == itemCode);
- var itemEditInfo;
- //检查物料号是否存在
- if (detail == undefined) {
- //物料号不存在,创建物料号数据添加到列表。设置为已经扫描
- this.addNewItemCodeToList(result)
+ if (itemEditInfo == undefined) {
+ //不在任务列表中,提示是否添加到列表
+ this.addExistItemCodeToList(detail);
} else {
- //物料号存在,查询是否在任务列表中
- itemEditInfo = detail.subList.find(item => {
- if (item.packingNumber == packingNumber &&
- item.batch == batch &&
- item.inventoryStatus == inventoryStatus) {
- return item;
- }
- })
-
- if (itemEditInfo == undefined) {
- //不在任务列表中,提示是否添加到列表
- this.addExistItemCodeToList(detail, result);
-
- } else {
- //在列表中,更新已扫描状态,
- if (itemEditInfo.scaned) {
- this.$refs.comMessage.showSelectMessageModal("箱码【" + packingNumber +
- "】已经完成盘点,是否要编辑数量",
- res => {
- if (res) {
- this.$refs.countQtyEdit.openEditPopup(itemEditInfo,
- detail.subList);
- } else {
- this.scanPopupGetFocus();
- }
- })
-
- } else {
- itemEditInfo.scaned = true;
- itemEditInfo.handleQty = balanceQty;
- itemEditInfo.balanceQty = balanceQty;
- itemEditInfo.stdPackQty = result.package.stdPackQty;
- itemEditInfo.stdPackUnit = result.package.stdPackUnit;
- this.$refs.countQtyEdit.openEditPopupShowSeconds(itemEditInfo, detail
- .subList);
- this.updateData()
- }
- }
+ itemEditInfo.scaned = true;
+ itemEditInfo.handleQty = qty;
+ itemEditInfo.balanceQty = this.balance.qty;
+ itemEditInfo.stdPackQty = this.package.stdPackQty;
+ itemEditInfo.stdPackUnit = this.package.stdPackUnit;
+ this.$refs.countQtyEdit.openEditPopupShowSeconds(itemEditInfo, detail
+ .subList);
+ this.updateData()
}
- } catch (e) {
- this.showErrorMessage(e.message)
+
+ this.calcHandleQty();
+ this.scanPopupGetFocus();
}
},
//盲盘
getUnOpenScanResult(result) {
try {
- debugger;
//盘点了没有库存余额的数据
if (result.balance.length == 0) {
@@ -422,7 +523,7 @@
} else {
//在列表中,更新已扫描状态,
if (itemEditInfo.scaned) {
- this.$refs.comMessage.showSelectMessageModal("箱码【" + packingNumber +
+ this.$refs.comMessage.showQuestionMessage("箱码【" + packingNumber +
"】已经完成盘点,是否要编辑数量",
res => {
if (res) {
@@ -450,15 +551,12 @@
}
},
-
-
-
- addNewItemCodeToList(result) {
- this.$refs.comMessage.showSelectMessageModal("物料[" + this.balance.itemCode + "]不在列表中,是否添加到列表?",
+ addNewItemCodeToList() {
+ this.$refs.comMessage.showQuestionMessage("物料[" + this.package.itemCode + "]不在列表中,是否添加到列表?",
res => {
if (res) {
- var item = this.createAddItemInfo(this.balance, result.package);
- let newDetail = this.createAddDetailInfo(this.balance, result.package); //
+ var item = this.createAddItemInfo(this.balance, this.package);
+ let newDetail = this.createAddDetailInfo(this.balance, this.package); //
item.subList.push(newDetail);
this.detailSource.push(item)
this.updateData()
@@ -467,13 +565,12 @@
},
- addExistItemCodeToList(detail, result) {
- this.$refs.comMessage.showSelectMessageModal("箱码[" + this.balance.packingNumber +
- "]不在列表中,是否添加到列表?",
+ addExistItemCodeToList(detail) {
+ this.$refs.comMessage.showQuestionMessage("盘点明细不在列表中,是否添加到列表?",
res => {
if (res) {
detail.qty = calc.add(detail.qty, detail.qty)
- let newDetail = this.createAddDetailInfo(this.balance, result.package); //
+ let newDetail = this.createAddDetailInfo(this.balance, this.package); //
detail.subList.push(newDetail);
this.updateData()
@@ -483,7 +580,7 @@
createAddItemInfo(balance, pack) {
let item = {
- itemCode: balance.itemCode,
+ itemCode: pack.itemCode,
itemName: pack.itemName,
stdPackQty: pack.stdPackQty,
stdPackUnit: pack.stdPackUnit,
@@ -502,9 +599,9 @@
scaned: true,
countDetailNumber: "",
ownerCode: balance.ownerCode,
- packingNumber: balance.packingNumber,
- containerNumber: pack.containerNumber,
- batch: balance.batch,
+ packingNumber: pack.packingNumber,
+ containerNumber: balance.containerNumber,
+ batch: pack.batch,
inventoryStatus: balance.inventoryStatus,
itemCode: pack.itemCode,
itemName: pack.itemName,
@@ -523,7 +620,7 @@
stdPackUnit: pack.stdPackUnit,
creator: this.$store.state.user.id
}
-
+ debugger;
return detail;
},
diff --git a/static/config.json b/static/config.json
index 4fb72ee7..c47cdf8a 100644
--- a/static/config.json
+++ b/static/config.json
@@ -18,7 +18,7 @@
"request_url": {
"name": "request_url",
- "value": "http://192.168.0.178:12080/admin-api",
+ "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",