From ae500bc78d4e883772fea800cfb06e2b341ef9b1 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Fri, 1 Jul 2022 15:38:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=89=AB=E7=A0=81=E5=8D=95?= =?UTF-8?q?=E6=8D=AE=E6=97=B6=E6=97=A0=E5=BA=8F=E5=88=97=E5=8F=B7=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E7=9B=B4=E6=8E=A5=E8=BE=93=E5=85=A5=E6=95=B0=E9=87=8F?= =?UTF-8?q?=EF=BC=8C=E4=B8=9A=E5=8A=A1=E5=8D=95=E6=8D=AE=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E5=88=86=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/warehouse/addHosOrder.vue | 4 -- src/views/warehouse/addOrder.vue | 1 + src/views/warehouse/editCode.vue | 17 ++++- src/views/warehouse/stockHospOrderNew.vue | 83 ++++++++++++++++++++--- 4 files changed, 92 insertions(+), 13 deletions(-) diff --git a/src/views/warehouse/addHosOrder.vue b/src/views/warehouse/addHosOrder.vue index 1d31565..123f313 100644 --- a/src/views/warehouse/addHosOrder.vue +++ b/src/views/warehouse/addHosOrder.vue @@ -1150,13 +1150,9 @@ export default { // 将参数拷贝进查询对象 let query = this.$route.query; this.orderNo = query.id; - this.query = Object.assign(this.query, query); this.query.limit = parseInt(this.query.limit); this.query.corpOrderId = query.id; - - // 加载表格数据 - // this.getCodeList(); } this.formData.invWarehouseCode = this.$store.getters.locSubInvCode; this.formData.locStorageCode = this.$store.getters.locInvCode; diff --git a/src/views/warehouse/addOrder.vue b/src/views/warehouse/addOrder.vue index affc05a..135d735 100644 --- a/src/views/warehouse/addOrder.vue +++ b/src/views/warehouse/addOrder.vue @@ -375,6 +375,7 @@ export default { produceDate: null, expireDate: null, serialNo: null, + count:null, }, formRules: { temp: [ diff --git a/src/views/warehouse/editCode.vue b/src/views/warehouse/editCode.vue index b720f8a..c7a7a04 100644 --- a/src/views/warehouse/editCode.vue +++ b/src/views/warehouse/editCode.vue @@ -63,11 +63,26 @@ - + + + + +
+ 数量: +
+
+ + + + + +
diff --git a/src/views/warehouse/stockHospOrderNew.vue b/src/views/warehouse/stockHospOrderNew.vue index 56245ea..9f26b83 100644 --- a/src/views/warehouse/stockHospOrderNew.vue +++ b/src/views/warehouse/stockHospOrderNew.vue @@ -136,6 +136,20 @@ }} + + + + {{ item.name }} + {{ item.code }} + + + + @@ -426,7 +440,19 @@ export default { page: 1, limit: 10, }, - formData: {noInvOut: false, locStorageCode: null, invWarehouseCode: null}, + formData: { + noInvOut: false, + locStorageCode: null, + invWarehouseCode: null, + fromSubInvCode: null, + billNo: null, + billdate: "", + customerId: store.getters.customerId, + billType: "", + type: null, + corpName: "", + corpId: "", + }, formRules: { corpName: [ {required: true, message: "请输入供应商", trigger: "blur"} @@ -448,6 +474,7 @@ export default { codeArray: [], fromOptions: [], fromStorageOptions: [], + fromSubStorageOptions: [], total: 0, loading: false, index: null, @@ -587,9 +614,12 @@ export default { }); }, storageChange(row) { - console.log(row); + if (this.formData.fromSubInvCode != null) + this.formData.fromSubInvCode = ""; this.formData.corpId = row.code; this.formData.corpName = row.name; + this.findSubStorageMethod(); + }, getStorage(event) { this.storageList = []; @@ -630,6 +660,37 @@ export default { .catch(() => { }); }, + + findSubStorageMethod() { + let cQuery = { + pcode: this.formData.corpId, + filter: 2, + }; + filterSubByInv(cQuery) + .then((response) => { + this.fromSubStorageOptions = response.data || []; + }) + .catch(() => { + }); + }, + + findSubInvByInv(invCode) { + this.subInvList = []; + let query = { + pcode: invCode + }; + filterSubByInv(query) + .then((response) => { + this.subInvList = response.data || []; + if (this.subInvList != null && this.subInvList.length == 1) { + this.formData.invWarehouseCode = this.subInvList[0].code; + } + }) + .catch(() => { + }); + }, + + submitFunction(status) { let tMessage = status === '501' ? '保存' : '提交'; this.loading = true; @@ -1099,14 +1160,16 @@ export default { // } // }); // }, - getBusType(invCode) { + getBusType() { let query = { enabled: true, - // code: invCode, }; getLocalJoinByUser(query) .then((response) => { this.busTypes = response.data.list || []; + if (this.$isNotBlank(this.formData.billType)) { + this.curAction = this.getActionItem(this.formData.billType); + } }) .catch(() => { }); @@ -1207,10 +1270,6 @@ export default { }; }, created() { - this.getBusType("NOCODE"); - this.getStorage(); - this.codeArray = []; - this.closeConfirmFunction(false); if (this.$isNotBlank(this.idQuery.id)) { this.query.limit = 100; this.query.orderIdFk = this.idQuery.id; @@ -1218,6 +1277,7 @@ export default { this.orderEditor = true; this.sValue = this.formData.corpName; this.getStockOrderDetailList(); + } else { this.formData = { billNo: null, @@ -1236,6 +1296,13 @@ export default { this.formData.billdate = new Date(); // this.generateBillNo(); } + + this.getBusType(); + this.getStorage(); + this.findSubInvByInv(); + this.findSubStorageMethod(); + this.codeArray = []; + this.closeConfirmFunction(false); }, };