From a9ab66c0aa997327d1f1321e25b9b6241c479f83 Mon Sep 17 00:00:00 2001 From: x_z Date: Thu, 30 Jun 2022 09:38:57 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E5=8D=95=E6=8D=AE=E9=85=8D?= =?UTF-8?q?=E8=B4=A7=E7=AE=A1=E7=90=86=EF=BC=8C=E7=BC=96=E8=BE=91=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E5=8D=95=E6=8D=AE=E6=97=B6=E9=97=B4=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=97=B6=E5=88=86=E7=A7=92=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=202.=E4=BF=AE=E6=94=B9=E5=88=A4?= =?UTF-8?q?=E7=A9=BA=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/strUtil.js | 6 +++++- src/views/warehouse/DialogcChangeNewOrder.vue | 8 ++++++++ src/views/warehouse/IONewOrder.vue | 3 +-- src/views/warehouse/addOrder.vue | 2 ++ src/views/warehouse/editCode.vue | 20 ++++++++++--------- src/views/warehouse/stockHospOrderNew.vue | 18 ++++++----------- .../warehouse/stockOrderEditDistribution.vue | 4 ++-- src/views/warehouse/stockOrderEditor.vue | 1 - 8 files changed, 35 insertions(+), 27 deletions(-) diff --git a/src/utils/strUtil.js b/src/utils/strUtil.js index 255ec28..c5a88ce 100644 --- a/src/utils/strUtil.js +++ b/src/utils/strUtil.js @@ -1,7 +1,11 @@ //封装字符串相关的方法 export function isBlank(value) { + if (value === "" || value === null) { + return true; + } + value = value.trim(); - if (value === "" || value === null || value === "string") { + if (value === "string" || value === "undefined") { return true; } } diff --git a/src/views/warehouse/DialogcChangeNewOrder.vue b/src/views/warehouse/DialogcChangeNewOrder.vue index 0785326..5895be6 100644 --- a/src/views/warehouse/DialogcChangeNewOrder.vue +++ b/src/views/warehouse/DialogcChangeNewOrder.vue @@ -286,6 +286,14 @@ export default { this.$message.error('当前往来单位不能为空'); return; } + if (this.$isBlank(this.formData.invWarehouseCode)) { + this.$message.error("当前分库不能为空"); + return; + } + if (this.curAction.corpType === 1 && this.$isBlank(this.formData.fromSubInvCode)) { + this.$message.error('往来单位分库不能为空'); + return; + } if (this.detailList.length == 0) { this.$message.error("产品列表不能为空"); return; diff --git a/src/views/warehouse/IONewOrder.vue b/src/views/warehouse/IONewOrder.vue index 743890b..b8bc7e0 100644 --- a/src/views/warehouse/IONewOrder.vue +++ b/src/views/warehouse/IONewOrder.vue @@ -640,14 +640,13 @@ export default { orderId: "", }; idQuery.orderId = data; - console.log(idQuery); - console.log(this.list); commitOrder(idQuery) .then((response) => { this.loading = false; if (response.code == 20000) { this.$message.success(response.data); for (let i = 0; i < this.list.length; i++) { + debugger if (idQuery.orderId === this.list[i].id) { this.list.splice(i, 1); break; diff --git a/src/views/warehouse/addOrder.vue b/src/views/warehouse/addOrder.vue index 2f00665..affc05a 100644 --- a/src/views/warehouse/addOrder.vue +++ b/src/views/warehouse/addOrder.vue @@ -277,6 +277,7 @@ :visible.sync="editCodeVisible" append-to-body width="70%" v-if="editCodeVisible" + @close="getCodeList" >
- +
@@ -10,7 +10,7 @@ @@ -25,7 +25,7 @@ - @@ -38,7 +38,7 @@ - @@ -54,7 +54,7 @@ - + @@ -64,7 +64,7 @@ - + @@ -108,17 +108,19 @@ export default { type: Object, required: true, }, + editData: null }, methods: { saveCode() { if (this.editTye == 1) { this.repeatAddCode(); } else { - saveCode(this.codeDetail) + saveCode(this.editData) .then((response) => { console.log(response) if (response.code === 20000) { this.$message.success("提交成功"); + this.codeDetail = this.editData; this.closeCodeDialog(); } else { this.$message.error(response.message); @@ -132,7 +134,7 @@ export default { this.closeCodeDialog(); }, findByCode() { - let query = {udiCode: this.codeDetail.code}; + let query = {udiCode: this.editData.code}; findByCode(query) .then((response) => { if (response.code === 20000) { @@ -145,7 +147,7 @@ export default { }, created() { - + this.editData = JSON.parse(JSON.stringify(this.codeDetail)); }, } diff --git a/src/views/warehouse/stockHospOrderNew.vue b/src/views/warehouse/stockHospOrderNew.vue index 40ff373..0c1b419 100644 --- a/src/views/warehouse/stockHospOrderNew.vue +++ b/src/views/warehouse/stockHospOrderNew.vue @@ -401,6 +401,7 @@ import {getLocalBusType, getLocalJoinBusType, getLocalJoinByUser} from "../../ap import {filterAll, filterAllByLoc, filterAllByUser} from "@/api/basic/invWarehouse"; import dialogInvProduct from "../inventory/DialogInvProduct" import {filterSubByInv} from "@/api/basic/invSubWarehouse"; +import {isBlank} from "@/utils/strUtil"; export default { name: "idQuery", @@ -1163,22 +1164,15 @@ export default { } }, actionChange(item) { - // console.log("item = " + item); - // if (item == '') { - // this.formData.locStorageCode == null; - // } else { this.curAction = this.getActionItem(item); - - - if (this.curAction.storageCode != null) - this.formData.locStorageCode = this.curAction.storageCode; - + this.formData.locStorageCode = this.curAction.storageCode; + this.locInChange(this.formData.locStorageCode); this.findMethod(); - // } - }, locInChange(item) { - console.log(item); + if (isBlank(item)) { + this.formData.invWarehouseCode = null; + } this.formData.locStorageCode = item; this.$forceUpdate(); this.getBusType(item); diff --git a/src/views/warehouse/stockOrderEditDistribution.vue b/src/views/warehouse/stockOrderEditDistribution.vue index 925e0de..1dd8653 100644 --- a/src/views/warehouse/stockOrderEditDistribution.vue +++ b/src/views/warehouse/stockOrderEditDistribution.vue @@ -43,11 +43,11 @@ diff --git a/src/views/warehouse/stockOrderEditor.vue b/src/views/warehouse/stockOrderEditor.vue index 6a0795e..878a91f 100644 --- a/src/views/warehouse/stockOrderEditor.vue +++ b/src/views/warehouse/stockOrderEditor.vue @@ -697,7 +697,6 @@ export default { }, distributionForm(index, row) { this.idQuery.id = ''; - console.log("row = " + row.invWarehouseCode); if (this.$isNotBlank(row.id)) { this.idQuery.id = row.id; this.idQuery.formData = row;