From 262bbeb7b0726d37eb14ef5d1141f5fb94c6fef0 Mon Sep 17 00:00:00 2001
From: niexiting <85552560@qq.com>
Date: Wed, 27 Dec 2023 11:13:52 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BA=93=E5=AD=98=E8=BD=AC?=
=?UTF-8?q?=E7=A7=BB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/record.js | 7 +-
mycomponents/balance/moveStatus.vue | 2 +-
pages/inventoryMove/coms/comMoveRecord.vue | 130 +++---
.../inventoryMove/coms/comMoveRecordCard.vue | 1 -
pages/inventoryMove/coms/comMovebalance.vue | 2 +-
pages/inventoryMove/record/okToHoldRecord.vue | 2 +-
.../record/mergePackageRecord.vue.b17252 | 425 -----------------
.../record/mergePackageRecord.vue.y17252 | 429 ------------------
static/config.json | 2 +-
9 files changed, 82 insertions(+), 918 deletions(-)
delete mode 100644 pages/package/record/mergePackageRecord.vue.b17252
delete mode 100644 pages/package/record/mergePackageRecord.vue.y17252
diff --git a/common/record.js b/common/record.js
index f931a55c..8de7084b 100644
--- a/common/record.js
+++ b/common/record.js
@@ -23,13 +23,14 @@ export function createItemInfo(balance, pack) {
export function createDetailInfo(data, pack) {
data.scaned = true;
// data.toInventoryStatus = this.toInventoryStatus == "" ? data.inventoryStatus : this.toInventoryStatus;
+ data.inventoryStatus = data.inventoryStatus;
let detail = {};
Object.assign(detail, data)
detail.balanceQty = Number(detail.qty)
detail.stdPackQty = Number(pack.stdPackQty)
detail.stdPackUnit = pack.stdPackUnit
detail.package = pack;
-
+
return detail;
}
@@ -51,8 +52,8 @@ export function getBusinessType(typeCode, callback) {
businessType: '',
fromlocationTypeList: '',
tolocationTypeList: '',
- fromInventoryStatuses:'',
- toInventoryStatuses:'',
+ fromInventoryStatuses: '',
+ toInventoryStatuses: '',
message: ''
};
getBusinesstypeByCode(typeCode).then(res => {
diff --git a/mycomponents/balance/moveStatus.vue b/mycomponents/balance/moveStatus.vue
index a0c785c5..6e23abe1 100644
--- a/mycomponents/balance/moveStatus.vue
+++ b/mycomponents/balance/moveStatus.vue
@@ -1,7 +1,7 @@
-
+
—>
diff --git a/pages/inventoryMove/coms/comMoveRecord.vue b/pages/inventoryMove/coms/comMoveRecord.vue
index 07d38a1c..d206bac8 100644
--- a/pages/inventoryMove/coms/comMoveRecord.vue
+++ b/pages/inventoryMove/coms/comMoveRecord.vue
@@ -14,7 +14,6 @@
:allowEditStatus="allowEditStatus">
-
@@ -23,8 +22,8 @@
-
+
@@ -35,7 +34,7 @@
-
@@ -52,6 +51,7 @@
import comMessage from '@/mycomponents/common/comMessage.vue'
import {
inventoryMoveRecordSubmit,
+ getBasicLocationByCode,
} from '@/api/request2.js';
import {
@@ -105,15 +105,16 @@
type: String,
default: "Move"
}, //业务类型
- toLocationCode: {
- type: String,
- default: ""
- },
+ // toLocationCode: {
+ // type: String,
+ // default: ""
+ // },
},
data() {
return {
fromLocationCode: "",
- // toLocationCode: "",
+ fromLocationInfo: {},
+ toLocationCode: "",
toLocationInfo: {},
toLocationTypeArray: [],
toInventoryStatus: "",
@@ -121,7 +122,6 @@
detailSource: [], //绑定在页面上的数据源
title: "",
dataContent: {},
- toWarehouseCode: "",
fromlocationTypeList: [],
tolocationTypeList: [],
}
@@ -138,33 +138,58 @@
this.showErrorMessage(res.message)
}
});
- this.updateTitle();
+ this.initData();
},
onLoad() {
+ if (this.toLocationCode != '') {
+ getBasicLocationByCode(this.toLocationCode).then(res => {
+ if (res.data.total > 0) {
+ let result = res.data.list[0];
+ var type = result.type;
+ var available = result.available;
+ if (available == "TRUE") {
+ this.toLocationInfo = res.data.list[0];
+ } else {
+ this.showErrorMessage("扫描库位[" + this.code + "]不可用")
+ }
+ } else {
+ this.showErrorMessage('库位[' + this.toLocationCode + ']不存在')
+ }
+ }).catch(error => {
+ uni.hideLoading();
+ this.showErrorMessage(error)
+ })
+ }
},
methods: {
- updateTitle() {
+ initData() {
if (this.businessTypeCode == "Move") {
this.title = "库存转移记录";
this.toInventoryStatus = "OK"
+ this.toLocationCode = ""
} else if (this.businessTypeCode == "HoldToOk") {
this.title = "隔离转合格记录";
this.toInventoryStatus = "OK"
+ this.toLocationCode = "OK"
} else if (this.businessTypeCode == "HoldToScrap") {
this.title = "隔离转报废记录";
this.toInventoryStatus = "SCRAP"
+ this.toLocationCode = "SCRAP"
} else if (this.businessTypeCode == "OkToHold") {
this.title = "合格转隔离记录";
this.toInventoryStatus = "HOLD"
+ this.toLocationCode = "HOLD"
} else if (this.businessTypeCode == "OktoScrap") {
this.title = "合格转报废记录";
this.toInventoryStatus = "SCRAP"
+ this.toLocationCode = "HOLD"
} else if (this.businessTypeCode == "ScrapToHold") {
this.title = "报废转隔离记录";
this.toInventoryStatus = "HOLD"
+ this.toLocationCode = "HOLD"
}
uni.setNavigationBarTitle({
title: this.title
@@ -181,24 +206,17 @@
this.$nextTick(() => {
this.$refs.scanFromLocationCode.openScanPopup();
})
-
- },
- getLocation(location) {
- this.getfromLocationCode(location)
},
- getfromLocationCode(location) {
+ getFromLocation(location) {
this.fromLocationCode = location.code;
+ this.fromLocationInfo = location;
this.openScanPopup();
},
- getToLocationCode(location, code) {
- this.toWarehouseCode = location.warehouseCode
+ getToLocation(location, code) {
this.toLocationCode = code;
+ this.toLocationInfo = location;
},
getScanResult(result) {
- this.getDataSource(result)
- },
-
- getDataSource(result) {
var balance = result.balance;
var pack = result.package;
var item = this.detailSource.find(res => {
@@ -208,9 +226,10 @@
})
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
- let newDetail = createDetailInfo(balance, pack); //
- newDetail.inventoryStatus = balance.inventoryStatus;
+ let newDetail = createDetailInfo(balance, pack);
+ // newDetail.inventoryStatus = balance.inventoryStatus;
newDetail.toInventoryStatus = this.toInventoryStatus;
+ newDetail.toLocationCode = this.toLocationCode;
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
@@ -226,8 +245,9 @@
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
- newDetail.inventoryStatus = balance.inventoryStatus;
- newDetail.toInventoryStatus = this.toInventoryStatus
+ // newDetail.inventoryStatus = balance.inventoryStatus;
+ newDetail.toInventoryStatus = this.toInventoryStatus;
+ newDetail.toLocationCode = this.toLocationCode;
item.subList.push(newDetail);
} else {
this.showErrorMessage(balance.packingNumber + "已经在列表中")
@@ -236,8 +256,6 @@
calcHandleQty(this.detailSource);
},
-
-
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
@@ -288,7 +306,7 @@
},
commit() {
if (this.toLocationCode == "") {
- this.showMessage("请先选择目标库位")
+ this.showErrorMessage("请先选择目标库位")
return;
}
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
@@ -336,7 +354,10 @@
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
- detail.toLocationCode = this.toLocationCode;
+ if (detail.toLocationCode == '')
+ {
+ detail.toLocationCode = this.toLocationCode;
+ }
var filterResult = itemList.filter(res => {
if (res.itemCode == item.itemCode &&
detail.toLocationCode == res.locationCode) {
@@ -365,45 +386,42 @@
if (detail.scaned) {
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
detail.packingNumber, detail.toLocationCode, detail.batch);
- detail.itemCode = detail.itemCode;
- detail.itemName = detail.package.itemName;
- detail.itemDesc1 = detail.package.itemDesc1;
- detail.itemDesc2 = detail.package.itemDesc2;
+ var subItem = {};
+ Object.assign(subItem, detail)
+ subItem.itemCode = detail.itemCode;
+ subItem.itemName = detail.package.itemName;
+ subItem.itemDesc1 = detail.package.itemDesc1;
+ subItem.itemDesc2 = detail.package.itemDesc2;
- detail.fromInventoryStatus = detail.inventoryStatus;
+ subItem.fromInventoryStatus = detail.inventoryStatus;
+ subItem.toInventoryStatus = detail.toInventoryStatus;
- detail.fromPackingNumber = info.packingNumber;
- detail.toPackingNumber = info.packingNumber;
+ subItem.fromPackingNumber = info.packingNumber;
+ subItem.toPackingNumber = info.packingNumber;
- detail.fromContainerNumber = detail.containerNumber;
- detail.toContainerNumber = detail.containerNumber
+ subItem.fromContainerNumber = detail.containerNumber;
+ subItem.toContainerNumber = detail.containerNumber
- detail.fromBatch = info.batch;
- detail.toBatch = info.batch;
+ subItem.fromBatch = info.batch;
+ subItem.toBatch = info.batch;
- detail.fromLocationCode = detail.locationCode;
+ subItem.fromLocationCode = detail.locationCode;
+ subItem.toLocationCode = detail.toLocationCode;
- // if (this.businessType != '') {
- // detail.toLocationCode = this.toLocationCode;
- // detail.toInventoryStatus = this.toInventoryStatus;
- // }
+ subItem.package = null;
+ subItem.Records = null;
- subList.push(detail)
+ subList.push(subItem)
}
})
})
this.dataContent.subList = subList;
this.dataContent.creator = creator;
- this.dataContent.fromWarehouseCode = this.detailSource[0].subList[0].warehouseCode;
- this.dataContent.toWarehouseCode = this.toWarehouseCode;
+ this.dataContent.fromWarehouseCode = this.fromLocationInfo.warehouseCode;
+ this.dataContent.toWarehouseCode = this.toLocationInfo.warehouseCode;
this.dataContent.businessType = this.businessTypeCode;
return this.dataContent;
- },
-
-
-
-
-
+ }
}
}
diff --git a/pages/inventoryMove/coms/comMoveRecordCard.vue b/pages/inventoryMove/coms/comMoveRecordCard.vue
index 5a7f90e3..6217e99b 100644
--- a/pages/inventoryMove/coms/comMoveRecordCard.vue
+++ b/pages/inventoryMove/coms/comMoveRecordCard.vue
@@ -171,7 +171,6 @@
});
},
confirm(qty) {
- this.editItem.qty = qty;
this.editItem.handleQty = qty;
this.$emit('updateData')
}
diff --git a/pages/inventoryMove/coms/comMovebalance.vue b/pages/inventoryMove/coms/comMovebalance.vue
index ec725afb..e04d8923 100644
--- a/pages/inventoryMove/coms/comMovebalance.vue
+++ b/pages/inventoryMove/coms/comMovebalance.vue
@@ -9,7 +9,7 @@
-
-
+
diff --git a/pages/package/record/mergePackageRecord.vue.b17252 b/pages/package/record/mergePackageRecord.vue.b17252
deleted file mode 100644
index 8afcfbbe..00000000
--- a/pages/package/record/mergePackageRecord.vue.b17252
+++ /dev/null
@@ -1,425 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/package/record/mergePackageRecord.vue.y17252 b/pages/package/record/mergePackageRecord.vue.y17252
deleted file mode 100644
index 7b01c114..00000000
--- a/pages/package/record/mergePackageRecord.vue.y17252
+++ /dev/null
@@ -1,429 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/static/config.json b/static/config.json
index 5ff11180..310a012c 100644
--- a/static/config.json
+++ b/static/config.json
@@ -18,7 +18,7 @@
"request_url": {
"name": "request_url",
- "value": "http://192.168.0.230:12080/admin-api",
+ "value": "http://192.168.0.176: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",