From 8edb785fdef1c912eadb1075388e7f9009f00f8e Mon Sep 17 00:00:00 2001 From: anthonyywj2 <353682448@qq.com> Date: Sat, 25 Jun 2022 22:31:54 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A6=85=E9=81=93bug=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=8C=E8=87=AA=E5=8A=A9=E5=90=8C=E6=AD=A5=E5=88=B0UDI?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/config.json | 8 +- src/views/basic/BasicEntrutsRece.vue | 11 +- src/views/basic/invWarehouse.vue | 23 +- src/views/business/DialogcChangeNewOrder.vue | 123 +- src/views/business/stockOrder.vue | 16 + src/views/business/stockOrderDelSearch.vue | 17 +- .../business/stockOrderEditDistribution.vue | 136 +- src/views/business/stockOrderEditor.vue | 49 +- src/views/business/stockOrderNew.vue | 14 + .../business/stockOrderNewDistribution.vue | 221 +-- src/views/business/stockOrderSearch.vue | 15 +- src/views/business/stockOrderWaitCheck.vue | 1625 +++++++++-------- src/views/home/index.vue | 15 +- src/views/inout/IOAdditionalOrder.vue | 45 +- src/views/inout/IOCheckErrorOrder.vue | 15 +- src/views/inout/IOCheckWaitOrder.vue | 28 +- src/views/inout/IOErrorOrder.vue | 1 + src/views/inout/IOFinishOrder.vue | 15 +- src/views/inout/IONewOrder.vue | 72 +- src/views/inventory/InvProductsDetail.vue | 3 + src/views/inventory/InvStatistics.vue | 32 +- src/views/inventory/invPreInProducts.vue | 39 +- src/views/inventory/invPreProducts.vue | 7 +- 23 files changed, 1431 insertions(+), 1099 deletions(-) diff --git a/public/config.json b/public/config.json index 21a12b0..615974c 100644 --- a/public/config.json +++ b/public/config.json @@ -1,7 +1,7 @@ { - "UDI_SYNC_SERVER_IP": "http://192.168.0.109:9995/", - "BASE_URL":"http://139.9.178.73:8080/UDI_WMS_MC/", - "SERVER_IP": "http://139.9.178.73:8080/", - "WEBSOCKET_URL": "ws://192.168.0.109:9991/UDI_WMS_MC/api/websocket/", + "UDI_SYNC_SERVER_IP": "http://192.168.0.106:9995/", + "BASE_URL":"http://192.168.0.106:9991", + "SERVER_IP": "http://192.168.0.106:9991/", + "WEBSOCKET_URL": "ws://192.168.0.106:9991/UDI_WMS_MC/api/websocket/", "hosp_name": "平和县医院" } diff --git a/src/views/basic/BasicEntrutsRece.vue b/src/views/basic/BasicEntrutsRece.vue index 7440138..d8a9cc1 100644 --- a/src/views/basic/BasicEntrutsRece.vue +++ b/src/views/basic/BasicEntrutsRece.vue @@ -201,11 +201,20 @@ export default { this.$message.error("请输入接受委托仓库!"); return; } - if (this.$isBlank(this.inputQuery.entrustInv)) { + if (this.$isBlank(this.inputQuery.entrustUser)) { this.$message.error("请输入接受委托人!"); return; } + if (this.$isBlank(this.inputQuery.invWarehouseCode)) { + this.$message.error("当前分库不能为空!"); + return; + } + if (this.$isBlank(this.inputQuery.entrustSubInv)) { + this.$message.error("请输入接受委托分库!"); + return; + } + insertEntrustRece(this.inputQuery) .then((response) => { this.loading = false; diff --git a/src/views/basic/invWarehouse.vue b/src/views/basic/invWarehouse.vue index 8faac80..6c3560f 100644 --- a/src/views/basic/invWarehouse.vue +++ b/src/views/basic/invWarehouse.vue @@ -227,13 +227,13 @@ min-width="30%" > @@ -194,6 +224,7 @@ import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain"; import {parseTime} from "@/filtres"; import {getLocalJoinByUser} from "@/api/basic/busLocalType"; import {stockOrderChange, stockOrderDetail} from "@/api/inout/stockOrder"; +import {filterSubByInv} from "@/api/basic/invSubWarehouse"; export default { name: "DialogcChangeNewOrder", @@ -219,14 +250,23 @@ export default { actDate: new Date(), action: null, locStorageCode: null, + fromSubInvCode: null, + invWarehouseCode: null, + mainAction: null }, fromStorageOptions: [], + fromSubStorageOptions: [], curAction: { corpType: 0, genUnit: false, }, busTypes: [], fromOptions: [], + loading: false, + detailList: [], + storageList: [], + detailLoading: false, + subInvList: [], } }, @@ -245,16 +285,38 @@ export default { this.$message.error('当前往来单位不能为空'); return; } + if (this.detailList.length == 0) { + this.$message.error("产品列表不能为空"); + return; + } + let products = []; + this.detailList.forEach(item => { + let product = { + relId: item.relId, + batchNo: item.batchNo + }; + products.push(product); + }); + + this.busTypes.forEach(item => { + if (item.action === this.formData.action) { + this.formData.mainAction = item.mainAction; + } + }) let tQuery = { stockOrderId: this.curRow.id, locStorageCode: this.formData.locStorageCode, action: this.formData.action, + mainAction: this.formData.mainAction, fromCorp: this.formData.fromCorp, fromCorpId: this.formData.fromCorpId, - } + invWarehouseCode: this.formData.invWarehouseCode, + fromSubInvCode: this.formData.fromSubInvCode, + + products: products + }; stockOrderChange(tQuery) .then((response) => { - console.log(response) if (response.code === 20000) { this.$message.success("提交成功"); this.closeDialog(); @@ -267,7 +329,26 @@ export default { locCHange() { + + if (this.$isNotBlank(this.formData.invWarehouseCode)) { + this.formData.invWarehouseCode = ""; + } this.findStorageMethod(); + this.findSubInvByInv(this.formData.locStorageCode); + }, + + + findSubInvByInv(invCode) { + this.subInvList = []; + let query = { + pcode: invCode + }; + filterSubByInv(query) + .then((response) => { + this.subInvList = response.data || []; + }) + .catch(() => { + }); }, findStorageMethod(query) { @@ -284,9 +365,19 @@ export default { .catch(() => { }); }, - + findSubStorageMethod() { + let cQuery = { + pcode: this.formData.fromCorpId, + filter: 2, + }; + filterSubByInv(cQuery) + .then((response) => { + this.fromSubStorageOptions = response.data || []; + }) + .catch(() => { + }); + }, findMethod(query) { - console.log(query); this.fromOptions = []; let cQuery = { key: query, @@ -326,10 +417,10 @@ export default { storageChange(row) { this.formData.fromCorpId = row.code; this.formData.fromCorp = row.name; + this.findSubStorageMethod(); }, unitChange(row) { - console.log(row); this.formData.fromCorpId = row.erpId; this.formData.fromCorp = row.name; }, @@ -338,6 +429,13 @@ export default { // this.formData.locStorageCode = this.curAction.storageCode; this.findMethod(); }, + getActionItem(action) { + for (let i = 0; i < this.busTypes.length; i++) { + if (this.busTypes[i].action === action) { + return this.busTypes[i]; + } + } + }, getBusType() { let query = { enabled: true, @@ -381,7 +479,6 @@ export default { } } } - }, created() { if (this.$isBlank(this.formData.corpOrderId)) { diff --git a/src/views/business/stockOrder.vue b/src/views/business/stockOrder.vue index afb1c21..8d4b528 100644 --- a/src/views/business/stockOrder.vue +++ b/src/views/business/stockOrder.vue @@ -124,6 +124,11 @@ {{ getStorageName(scope.row.locStorageCode) }} + + + @@ -776,6 +781,16 @@ export default { } } }, + + + getSubStorageName(code) { + for (let i = 0; i < this.subInvList.length; i++) { + if (this.subInvList[i].code === code) { + return this.subInvList[i].name; + } + } + }, + getStorage() { this.storageList = []; filterAllByUser() @@ -791,6 +806,7 @@ export default { }, invChange() { + this.query.invWarehouseCode = ""; this.subInvList = []; let query = { pcode: this.query.locStorageCode diff --git a/src/views/business/stockOrderDelSearch.vue b/src/views/business/stockOrderDelSearch.vue index f6aedc4..0198398 100644 --- a/src/views/business/stockOrderDelSearch.vue +++ b/src/views/business/stockOrderDelSearch.vue @@ -102,11 +102,17 @@ {{ getActionName(scope.row.billType) }} - + + + + + @@ -137,7 +143,6 @@ + + - + + + + +
+ 当前分库: +
+
+ + + + + + {{ item.name }} + + + + + @@ -290,6 +318,7 @@ import {getBasicUnitMaintains, getBasicUnitMaintains2} from "../../api/basic/bas import {getBussinessType} from "../../api/basic/bussinessType"; import {getLocalBusType, getLocalJoinBusType} from "../../api/basic/busLocalType"; import {filterAll, filterAllByUser} from "@/api/basic/invWarehouse"; +import {filterSubByInv} from "@/api/basic/invSubWarehouse"; export default { name: "idQuery", @@ -366,6 +395,7 @@ export default { selectInvProductVisible: false, thisData: {}, storageList: [], + subInvList: [], }; }, components: { @@ -400,11 +430,11 @@ export default { this.submitFunction(status); } else { for (let i = 0; i < this.codeArray.length; i++) { - if (this.$isBlank(this.codeArray[i].batchNo)) { - if (!this.codeArray[i].allowNoBatch) { - return this.$message.error('批次号不能为空'); - } - } + // if (this.$isBlank(this.codeArray[i].batchNo)) { + // if (!this.codeArray[i].allowNoBatch) { + // return this.$message.error('批次号不能为空'); + // } + // } if (this.$isBlank(this.codeArray[i].productDate) && this.$isBlank(this.codeArray[i].expireDate)) { return this.$message.error('生产日期与失效日期不能全部为空'); } @@ -629,37 +659,6 @@ export default { // this.closeConfirmFunction(true); } - // if (this.orderEditor) { - // this.getStockOrderDetailList(); - // if (this.$isNotBlank(rData)) { - // this.$refs.multipleTable.setCurrentRow(this.codeArray[0]); - // this.currentRow = this.codeArray[0]; - // this.selectedIndex = 0; - // this.focusNext('iCount'); - // } - // } else { - // if (this.$isNotBlank(rData)) { - // // for (let i = 0; i < this.codeArray.length; i++) { - // // if (this.codeArray[i].productId === rData.productId) { - // // this.$alert("已添加", '提示', { - // // confirmButtonText: '确定', - // // type: 'warning', - // // closeOnClickModal: true, - // // callback: action => { - // // this.$refs.inputRef.focus(); - // // } - // // }); - // // break; - // // } - // // if (i + 1 === this.codeArray.length) { - // // this.codeArray.push(rData); - // // this.$refs.multipleTable.setCurrentRow(this.codeArray[0]); - // // this.currentRow = this.codeArray[0]; - // // this.selectedIndex = 0; - // // } - // // } - // } - // } }, rowChange(val) { this.currentRow = val; @@ -668,22 +667,8 @@ export default { this.focusNext('iCount'); - // let sc = this.selectedIndex + 'reCount'; - // const _this = this; - // this.$nextTick(() => { - // setTimeout(function() { - // console.log(sc); - // console.log(_this.$refs[sc]); - // console.log(_this.$refs[sc].focus()); - // _this.$refs[sc].focus(); - // }, 1) - // // this.$refs['inputBatchNoRef'][0].focus() - // }) }, iCountChange() { - // console.log(this.iCount) - // this.currentRow.count = this.iCount; - // this.currentRow.reCount = this.iCount; }, iCountEnterFunction() { if (this.$isNotBlank(this.currentRow)) { @@ -755,7 +740,6 @@ export default { code: this.code, }; - //012693548470801311200226172302271020022632100025 if (this.orderEditor) { addStockOrderDetailFromCode(tQuery).then((response) => { this.loading = false; @@ -838,6 +822,36 @@ export default { } }); }, + // saveCodeArray(index, row) { + // if (this.$isBlank(row.batchNo)) { + // return this.$message.error('批次号不能为空'); + // } + // if (this.$isBlank(row.productDate)) { + // return this.$message.error('生产日期不能为空'); + // } + // if (this.$isBlank(row.expireDate)) { + // return this.$message.error('失效日期不能为空'); + // } + // + // this.$refs.multipleTable.setCurrentRow(); + // this.currentRow = {}; + // this.selectedIndex = ""; + // this.iCount = 0; + // + // this.detailLoading = true; + // // row.count = row.reCount; + // let tQuery = row; + // uploadStockOrderDetail(tQuery).then((response) => { + // this.detailLoading = false; + // if (response.code === 20000) { + // this.$message.success("修改完成"); + // this.getStockOrderDetailList(); + // this.$refs.inputRef.focus(); + // } else { + // this.$message.error(response.message); + // } + // }); + // }, deleteCodeArray(index, row) { this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", { confirmButtonText: "确定", @@ -988,6 +1002,19 @@ export default { .catch(() => { }); }, + invChange() { + // this.formData.invWarehouseCode = ""; + this.subInvList = []; + let query = { + pcode: this.formData.locStorageCode + }; + filterSubByInv(query) + .then((response) => { + this.subInvList = response.data || []; + }) + .catch(() => { + }); + }, getActionName(action) { for (let i = 0; i < this.busTypes.length; i++) { if (this.busTypes[i].action === action) { @@ -1036,6 +1063,9 @@ export default { this.orderEditor = true; this.sValue = this.formData.corpName; this.getStockOrderDetailList(); + + + this.invChange(); } else { this.formData = { billdate: "", @@ -1050,6 +1080,8 @@ export default { this.orderEditor = false; this.generateBillNo(); } + + }, }; diff --git a/src/views/business/stockOrderEditor.vue b/src/views/business/stockOrderEditor.vue index c47febb..a5a24d8 100644 --- a/src/views/business/stockOrderEditor.vue +++ b/src/views/business/stockOrderEditor.vue @@ -104,11 +104,18 @@ {{ getActionName(scope.row.billType) }}
- + + + + + + @@ -385,10 +392,19 @@ + + + + + + + + + + @@ -407,6 +423,14 @@ :disabled="false"> + + + + + + + + @@ -435,6 +459,17 @@ auto-complete="off" :disabled="false"> + + + + + + + + + + +