From 301a4a7dd5c8156a541dbb380a87f93b98573cb8 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Mon, 7 Mar 2022 09:33:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E6=8D=AE=E7=B1=BB=E5=9E=8B=EF=BC=8C?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E5=8D=95=E6=8D=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/basic/BussinessTypeModify.vue | 20 ++- src/views/inventory/DialogInvProduct.vue | 6 +- src/views/warehouse/stockHospOrderNew.vue | 123 ++++-------------- .../warehouse/stockOrderEditDistribution.vue | 58 ++++++++- src/views/warehouse/stockOrderEditor.vue | 6 +- 5 files changed, 103 insertions(+), 110 deletions(-) diff --git a/src/views/basic/BussinessTypeModify.vue b/src/views/basic/BussinessTypeModify.vue index 60c8593..28dd9bc 100644 --- a/src/views/basic/BussinessTypeModify.vue +++ b/src/views/basic/BussinessTypeModify.vue @@ -136,7 +136,7 @@
- 补单单据类型:  + 内部进出平衡补单: 
-->
- 需要选择业务单据校验的来源类型(一次复核) + 需要选择业务单据校验的来源类型(一次复核)
@@ -249,7 +249,9 @@
- 需要单据复核的来源类型(二次复核) + 需要单据复核的来源类型(二次复核) +
@@ -340,6 +342,7 @@ export default { value: '2', label: '客户信息' }], + twoCheck: false, } }, @@ -371,11 +374,20 @@ export default { .catch(() => { }); }, + oneCheck(type) { + console.log(type); + if (!type) { + this.twoCheck = true; + this.inputQuery.secCheckEnable = false; + }else + this.twoCheck = false; + }, //获取单据类型 getOrderType() { this.orderTypeList = []; let query = { - mainAction: this.inputQuery.mainAction + mainAction: this.inputQuery.mainAction, + curAction:this.inputQuery.supplementOrderType, }; getCandidateBussinessType(query).then((response) => { this.orderTypeList = response.data || []; diff --git a/src/views/inventory/DialogInvProduct.vue b/src/views/inventory/DialogInvProduct.vue index 5a05bbe..e80b9c8 100644 --- a/src/views/inventory/DialogInvProduct.vue +++ b/src/views/inventory/DialogInvProduct.vue @@ -118,6 +118,10 @@ export default { type: Function, required: true, }, + invQueryData:{ + type: Object, + required: true, + } }, data() { return { @@ -343,7 +347,7 @@ export default { created() { this.getBusType(); let query = this.$route.query; - this.filterQuery.invStorageCode = this.data.formData.locStorageCode; + this.filterQuery.invStorageCode = this.invQueryData.locStorageCode; this.filterQuery = Object.assign(this.filterQuery, query); this.filterQuery.limit = parseInt(this.filterQuery.limit); // 加载表格数据 diff --git a/src/views/warehouse/stockHospOrderNew.vue b/src/views/warehouse/stockHospOrderNew.vue index 696fef7..be4a1fc 100644 --- a/src/views/warehouse/stockHospOrderNew.vue +++ b/src/views/warehouse/stockHospOrderNew.vue @@ -69,9 +69,6 @@ - - - + v-if="curAction.corpType ==0"> - - - - + 禁用--> + v-if="!(curAction.mainAction=='WareHouseIn' && curAction.corpType == 0)"> 允许无库存出库 @@ -491,6 +485,7 @@
@@ -544,7 +539,7 @@ export default { page: 1, limit: 10, }, - formData: {noInvOut: false,}, + formData: {noInvOut: false, locStorageCode: null}, formRules: { corpName: [ {required: true, message: "请输入供应商", trigger: "blur"} @@ -603,6 +598,7 @@ export default { selectInvProductVisible: false, thisData: {}, storageList: [], + invQueryData: {}, }; }, components: { @@ -618,7 +614,6 @@ export default { this.currentRow = {}; this.selectedIndex = ""; this.iCount = 0; - this.$refs["dataForm"].validate(valid => { if (valid) { if (this.codeArray.length < 1) { @@ -710,7 +705,6 @@ export default { filterAll() .then((response) => { this.storageList = response.data || []; - // this.formData.locStorageCode = this.storageList[0]; }) .catch(() => { }); @@ -820,17 +814,24 @@ export default { } this.thisData.stockOrderLists = this.codeArray; this.thisData.formData = this.formData; - - let item = this.getActionItem(this.formData.billType); - console.log(item.mainAction + "----" + this.formData.noInvOut); - if (item.mainAction == 'WareHouseOut' && this.formData.noInvOut != true)//内部单 - { + if (item.mainAction == 'WareHouseOut' && this.formData.noInvOut != true) { + this.invQueryData = { + locStorageCode: this.formData.locStorageCode, + }; + this.selectInvProductVisible = true; + } else if (item.mainAction == "WareHouseIn" && this.curAction.corpType == 1 && this.formData.noInvOut != true) { + + this.invQueryData = { + locStorageCode: this.formData.corpId, + }; + console.log("his.invQueryData " + this.invQueryData.locStorageCode); this.selectInvProductVisible = true; } else { this.selectProductVisible = true; } + return; } this.code = this.code.trim(); @@ -872,35 +873,6 @@ export default { }).catch(() => { this.loading = false; }); - - // let tQuery2 = { - // id: response.data.getId - // }; - // if (this.orderEditor) { - // tQuery2.orderId = this.formData.id; - // console.log(tQuery2) - // addStockOrderDetailFromCodeById(tQuery2).then((response) => { - // this.loading = false; - // if (response.code === 20000) { - // this.closeDialogC2(response); - // } else { - // this.$message.error(response.message); - // } - // }).catch(() => { - // this.loading = false; - // }); - // } else { - // getStockOrderDetailInstrumentById(tQuery2).then((response) => { - // this.loading = false; - // if (response.code === 20000) { - // this.closeDialogC2(response.data); - // } else { - // this.$message.error(response.message); - // } - // }).catch(() => { - // this.loading = false; - // }); - // } } else { this.thisData = response.data; this.thisData.code = this.code; @@ -931,23 +903,9 @@ export default { this.thisData = {}; if (this.$isNotBlank(rData)) { - console.log(rData) - // for (let i = 0; i < this.codeArray.length; i++) { - // let obj = this.codeArray[i]; - // if (obj.batchNo == rData[0].batchNo) { - // obj.count = parseInt(obj.count) + parseInt(this.iCount); - // return; - // } - // } this.codeArray = []; rData.forEach((obj, index) => { - // this.codeArray.push(obj); this.codeArray.unshift(obj); - // if (this.codeArray.length === 0) { - // this.codeArray.push(obj); - // } else { - // this.codeArray.unshift(obj); - // } }); console.log(this.codeArray); this.$refs.multipleTable.setCurrentRow(this.codeArray[0]); @@ -956,37 +914,6 @@ export default { this.focusNext('iCount'); 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; @@ -1059,8 +986,6 @@ export default { count: this.iCount, code: this.code, }; - - //012693548470801311200226172302271020022632100025 if (this.orderEditor) { addStockOrderDetailFromCode(tQuery).then((response) => { this.loading = false; @@ -1317,10 +1242,13 @@ export default { actionChange(item) { this.curAction = this.getActionItem(item); this.formData.locStorageCode = this.curAction.storageCode; - console.log(this.curAction.corpType + "---" + this.curAction.genUnit + "-----" + this.curAction.action); - // this.formData.corpName = ''; - // this.formData.corpId = ''; + console.log(this.curAction.corpType + "---" + this.formData.locStorageCode + "-----" + this.curAction.action); }, + locInChange(item) { + console.log(item); + this.formData.locStorageCode = item; + this.$forceUpdate(); + } }, filters: {}, mounted() { @@ -1345,12 +1273,9 @@ export default { } else { this.formData = { billdate: "", - // corpName: store.getters.companyName, customerId: store.getters.customerId, - // billType: "deliveryNote", billType: "", type: "2", - // type: "", }; this.iCount = 0; this.orderEditor = false; diff --git a/src/views/warehouse/stockOrderEditDistribution.vue b/src/views/warehouse/stockOrderEditDistribution.vue index 5351c1c..beecafd 100644 --- a/src/views/warehouse/stockOrderEditDistribution.vue +++ b/src/views/warehouse/stockOrderEditDistribution.vue @@ -390,6 +390,37 @@ + + + + + + + + + @@ -418,7 +449,7 @@ import store from "../../store"; import stockOrderNewSelectProduct from "./stockOrderNewSelectProduct"; import {getBasicUnitMaintains, getBasicUnitMaintains2} from "../../api/basic/basicUnitMaintain"; import {getBussinessType} from "../../api/basic/bussinessType"; -import {getLocalBusType} from "../../api/basic/busLocalType"; +import {getLocalBusType, getLocalJoinBusType} from "../../api/basic/busLocalType"; import {filterAll} from "@/api/basic/invWarehouse"; export default { @@ -497,6 +528,7 @@ export default { currentRow: {}, selectedIndex: "", selectProductVisible: false, + selectInvProductVisible:false, thisData: {}, storageList: [], }; @@ -619,7 +651,9 @@ export default { if (event == null) { this.$refs.inputRef.focus(); - } else event.target.select(); + } else { + event.target.select(); + } if (this.$isBlank(event)) { this.code = ""; this.$refs.multipleTable.setCurrentRow(); @@ -632,7 +666,18 @@ export default { if (this.orderEditor) { this.thisData.orderId = this.formData.id } + this.thisData.stockOrderLists = this.codeArray; + this.thisData.formData = this.formData; this.selectProductVisible = true; + let item = this.getActionItem(this.formData.billType); + console.log(item.mainAction + "----" + this.formData.noInvOut); + if (item.mainAction == 'WareHouseOut' && this.formData.noInvOut != true)//内部单 + { + this.selectInvProductVisible = true; + } else { + this.selectProductVisible = true; + } + return; } this.code = this.code.trim(); @@ -1089,7 +1134,7 @@ export default { let query = { enabled: true, }; - getLocalBusType(query) + getLocalJoinBusType(query) .then((response) => { this.busTypes = response.data.list || []; }) @@ -1112,6 +1157,13 @@ export default { } } }, + getActionItem(action) { + for (let i = 0; i < this.busTypes.length; i++) { + if (this.busTypes[i].localAction === action) { + return this.busTypes[i]; + } + } + }, findStorageMethod(query) { console.log(query); this.fromStorageOptions = []; diff --git a/src/views/warehouse/stockOrderEditor.vue b/src/views/warehouse/stockOrderEditor.vue index 5e434e8..9992134 100644 --- a/src/views/warehouse/stockOrderEditor.vue +++ b/src/views/warehouse/stockOrderEditor.vue @@ -502,9 +502,9 @@ export default { data() { return { query: { - billType:null, - corpName:null, - locStorageCode:null, + billType: null, + corpName: null, + locStorageCode: null, billNo: "", status: "2", startTime: "",