From 8985ed091a96ab26a21fcdfc9bb3817fd34be17a Mon Sep 17 00:00:00 2001
From: niexiting <85552560@qq.com>
Date: Sat, 25 May 2024 11:47:26 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=AB=E6=8F=8F=E7=BB=84?=
=?UTF-8?q?=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.development | 2 +-
.../scan/winScanPackAndLocationNoBalance.vue | 179 ++----------------
src/pages/putaway/job/putawayDetail.vue | 4 +-
src/pages/putaway/job/putawayJob.vue | 110 ++++++-----
4 files changed, 76 insertions(+), 219 deletions(-)
diff --git a/.env.development b/.env.development
index 805318a5..7c04b5cd 100644
--- a/.env.development
+++ b/.env.development
@@ -1 +1 @@
-VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api
VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/api/admin-api
# 租户配置
VITE_TENANT='[{"text":"长春","value":1},{"text":"成都","value":2}]'
\ No newline at end of file
+VITE_BASE_URL=http://172.21.32.14:81/api/admin-api
VITE_BASE_URL_IMAGE=http://172.21.32.14:81/api/admin-api
# 租户配置
VITE_TENANT='[{"text":"长春","value":1},{"text":"成都","value":2}]'
\ No newline at end of file
diff --git a/src/mycomponents/scan/winScanPackAndLocationNoBalance.vue b/src/mycomponents/scan/winScanPackAndLocationNoBalance.vue
index 9c1b4781..726e0cbe 100644
--- a/src/mycomponents/scan/winScanPackAndLocationNoBalance.vue
+++ b/src/mycomponents/scan/winScanPackAndLocationNoBalance.vue
@@ -28,7 +28,7 @@
+ style='height: 30rpx;border:1px solid #fff ;'>
@@ -45,7 +45,7 @@
-
+
@@ -120,7 +120,7 @@
inventoryStatus: [],
managementPrecision: '',
fromInventoryStatuses: "",
- isCheck:false
+ isCheck: false
}
},
created() {
@@ -171,7 +171,8 @@
},
- scanLocation(scanResult) {
+ getScanResult(scanResult) {
+ this.scanResult = scanResult;
var isCheck = false;
if (this.fromLocationCode == '') {
this.showErrorMessage('来源库位不能为空', callback => {
@@ -179,10 +180,10 @@
})
return;
}
-
- if(this.fromLocationList.length>0){
- if(!this.isInLocationList(this.fromLocationCode)){
- this.showErrorMessage("扫描库位【"+this.fromLocationCode+'】不在任务来源库位中', callback => {
+
+ if (this.fromLocationList.length > 0) {
+ if (!this.isInLocationList(this.fromLocationCode)) {
+ this.showErrorMessage("扫描库位【" + this.fromLocationCode + '】不在任务来源库位中', callback => {
this.locationGetFocus();
})
return;
@@ -193,6 +194,7 @@
title: '扫描中...',
mask: true
});
+
getBasicLocationByCode(this.fromLocationCode).then(res => {
if (res.data.total > 0) {
let result = res.data.list[0];
@@ -201,8 +203,7 @@
if (available == "TRUE") {
if (checkDirectoryItemExist(this.fromLocationTypeArray, type)) {
this.location = result;
- // this.packGetFocus();
- this.checkPackage(scanResult);
+ this.packCallBack();
} else {
uni.hideLoading();
var hint = getListLocationTypeDesc(this.fromLocationTypeArray);
@@ -212,11 +213,11 @@
})
}
} else {
- uni.hideLoading();
this.showErrorMessage("扫描库位[" + this.fromLocationCode + "]不可用", res => {
this.locationGetFocus();
})
}
+ uni.hideLoading();
} else {
uni.hideLoading();
this.showErrorMessage('未查询到库位[' + this.fromLocationCode + ']', res => {
@@ -231,131 +232,13 @@
})
},
- getScanResult(result) {
- // console.log("扫描", result)
- // if (this.fromLocationCode == '' || this.fromLocationCode == null) {
- // this.showMessage('请先扫描来源库位', callback => {
- // this.locationGetFocus();
- // })
- // return;
- // } else
- this.scanLocation(result);
- // debugger
- // if(this.isCheck){
- // this.checkPackage(result);
- // }
- },
-
- checkPackage(result){
- if (result.label != null) {
- this.scanResult = result;
- // uni.showLoading({
- // title: '查询中...',
- // mask: true
- // })
- getBalanceByManagementPrecision(result.label, this.fromLocationCode, this.fromInventoryStatuses,
- res => {
- uni.hideLoading();
- if (res.success) {
- this.managementPrecision = res.managementPrecision
- this.afterQueryBalance(res.data.list);
- } else {
- this.showErrorMessage(res.message, res => {
- this.packGetFocus();
- })
- }
- // uni.hideLoading();
- });
- }
- },
-
-
- afterQueryBalance(datas) {
- if (this.allowNullBalance) {
- this.allowNoneBalance(datas);
- } else if (this.noShowBalanceMessage) {
- this.countCallBack(datas);
- } else {
- this.mustHavaBalance(datas);
- }
- uni.hideLoading();
- },
-
- //允许无库存
- allowNoneBalance(datas) {
- this.packCallBack(null);
- // if (datas.length == 0) {
- // this.packCallBack(null);
- // } else {
- // this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],已经查找到该包装的库存记录,请重新扫描', res => {
- // this.packGetFocus();
- // })
- // }
- },
-
- //必须有库存
- mustHavaBalance(datas) {
- if (datas.length == 0) {
- this.showErrorMessage(this.getQueryCondition() + '
未查找到库存记录', res => {
- this.packGetFocus();
- })
- } else if (datas.length == 1) {
- let balance = datas[0];
- this.packCallBack(balance);
-
- //因为盘点时有负库存,暂时去掉判断 2023年12月28日
-
- // if (balance.qty > 0) {
- // this.packCallBack(balance);
- // } else {
- // this.showErrorMessage(this.getQueryCondition() + '
查找到库存记录数量为[' + balance.qty + "],
不可以进行操作",
- // res => {
- // this.packGetFocus();
- // })
- // }
- } else {
- this.showBalanceSelect(datas);
- }
- },
-
- showBalanceSelect(items) {
- this.$refs.balanceSelect.openPopup(items);
- },
-
- selectBalanceItem(balance) {
- this.packCallBack(balance);
- //因为盘点时有负库存,暂时去掉判断 2023年12月28日
- // if (balance.qty > 0) {
- // this.packCallBack(balance);
- // } else {
- // this.showErrorMessage(this.getQueryCondition() + '
查找到库存记录数量为[' + balance.qty + "],不可以进行操作",
- // res => {
- // this.packGetFocus();
- // })
- // }
- },
-
- //盘点回调
- countCallBack(datas) {
+ packCallBack() {
this.$refs.comscan.clear();
//返回标签信息、库存信息和管理模式
let data = {
label: this.scanResult.label,
package: this.scanResult.package,
- balance: datas,
- fromLocationCode: this.fromLocationCode,
- }
- this.packGetFocus();
- this.$emit("getCountScanResult", data);
- },
-
- packCallBack(item) {
- this.$refs.comscan.clear();
- //返回标签信息、库存信息和管理模式
- let data = {
- label: this.scanResult.label,
- package: this.scanResult.package,
- balance: item,
+ balance: null,
fromLocationCode: this.fromLocationCode,
}
this.packGetFocus();
@@ -379,36 +262,6 @@
this.locationOnFocus = true;
},
- getQueryCondition() {
- let condition = '按照以下条件:
';
- let label = this.scanResult.label;
- let status = getInventoryStatusDesc(this.inventoryStatus);
- switch (this.managementPrecision) {
- case 'BY_PACKAGING':
- condition = condition + '物料号=[' + label.itemCode + ']
箱码=[' + label.packingNumber +
- ']
批次=[' +
- label.batch +
- ']
库位=[' + this.fromLocationCode + ']'
-
- break;
- case 'BY_BATCH':
- condition = condition + '物料号=[' + label.itemCode + ']
批次=[' +
- label.batch +
- ']
库位=[' + this.fromLocationCode + ']'
- break;
- case 'BY_QUANTITY':
- condition = condition + '物料号=[' + label.itemCode + ']
库位=[' + this.fromLocationCode + ']'
- break;
- case 'BY_UNIQUEID':
- condition = condition + '物料号=[' + label.itemCode + ']'
- break;
- }
- if (this.inventoryStatus.length > 0) {
- condition = condition + '
库存状态=[' + status + ']'
- }
- return condition;
- },
-
showMessage(message, callback) {
setTimeout(r => {
@@ -428,9 +281,7 @@
this.show = e.show
},
isInLocationList(location) {
-
var item = this.fromLocationList.find(res => res == location)
-
if (item = undefined) {
return false
}
@@ -451,4 +302,4 @@
height: auto;
max-height: 300rpx;
}
-
+
\ No newline at end of file
diff --git a/src/pages/putaway/job/putawayDetail.vue b/src/pages/putaway/job/putawayDetail.vue
index 312c60f2..86e7a61d 100644
--- a/src/pages/putaway/job/putawayDetail.vue
+++ b/src/pages/putaway/job/putawayDetail.vue
@@ -282,7 +282,7 @@
var qty = result.label.qty;
var itemCode = result.label.itemCode;
var locationCode = result.fromLocationCode;
- var inventoryStatus = "OK";
+ // var inventoryStatus = "OK";
var detail = this.detailSource.find(r => r.itemCode == itemCode);
if (detail == undefined) {
@@ -339,7 +339,7 @@
itemDetail.scaned = true;
this.detailSource[0].subList.sort(compareAsc('scaned')); //按扫描信息排序
itemDetail.handleQty = result.label.qty;
- itemDetail.toInventoryStatus = "OK"
+ // itemDetail.toInventoryStatus = "OK"
itemDetail.packList.forEach(pac => {
pac.scaned = true
pac.handleQty = Number(pac.qty);
diff --git a/src/pages/putaway/job/putawayJob.vue b/src/pages/putaway/job/putawayJob.vue
index f205df59..16c11d51 100644
--- a/src/pages/putaway/job/putawayJob.vue
+++ b/src/pages/putaway/job/putawayJob.vue
@@ -5,12 +5,11 @@
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday"
:checkedWaitTask="checkedWaitTask">
-
+
-
@@ -20,21 +19,21 @@
-
+
-
+
-
+