diff --git a/src/views/basic/BasicEntrutsReceModify.vue b/src/views/basic/BasicEntrutsReceModify.vue index 8dfaa67..eb42657 100644 --- a/src/views/basic/BasicEntrutsReceModify.vue +++ b/src/views/basic/BasicEntrutsReceModify.vue @@ -194,7 +194,7 @@ export default { }, storageList: [], subInvList: [], - entrustSubInvList:[], + entrustSubInvList: [], entrustStorageList: [], orderTypeList: [], fromSpecialOptions: [], @@ -270,7 +270,8 @@ export default { findEntrustSubInvByInv() { this.entrustSubInvList = []; let query = { - pcode: this.inputQuery.entrustInv + pcode: this.inputQuery.entrustInv, + filter: 2, }; filterSubByInv(query) .then((response) => { @@ -312,7 +313,7 @@ export default { this.getEntrustStorage(); }, - subInvChange(){ + subInvChange() { this.getOrderType(); }, @@ -323,7 +324,7 @@ export default { }, - entrustSubInvChange(){ + entrustSubInvChange() { let query = { code: this.inputQuery.entrustSubInv, diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 0566d87..c0f9a77 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -422,7 +422,9 @@ export default { filterSubByInv(query) .then((response) => { this.subInvList = response.data || []; - + if (this.subInvList != null && this.subInvList.length == 1) { + this.userInfo.locSubInvCode = this.subInvList[0]; + } }) .catch(() => { }); diff --git a/src/views/warehouse/addHosOrder.vue b/src/views/warehouse/addHosOrder.vue index b1bd81e..e20bfc9 100644 --- a/src/views/warehouse/addHosOrder.vue +++ b/src/views/warehouse/addHosOrder.vue @@ -965,6 +965,9 @@ export default { filterSubByInv(query) .then((response) => { this.subInvList = response.data || []; + if (this.subInvList != null && this.subInvList.length == 1) { + this.formData.invWarehouseCode = this.subInvList[0]; + } }) .catch(() => { }); diff --git a/src/views/warehouse/addOrder.vue b/src/views/warehouse/addOrder.vue index d9523f7..a40dc26 100644 --- a/src/views/warehouse/addOrder.vue +++ b/src/views/warehouse/addOrder.vue @@ -365,7 +365,7 @@ export default { fromCorp: "医院", fromType: null, locStorageCode: null, - invWarehouseCode:null, + invWarehouseCode: null, actDate: new Date(), billType: null, preCheck: false, @@ -455,6 +455,10 @@ export default { this.$message.error('当前仓库不能为空'); return; } + if (this.formData.invWarehouseCode == null || this.formData.invWarehouseCode == '') { + this.$message.error('当前分库不能为空'); + return; + } let tQuery = Object.assign(JSON.parse(JSON.stringify(this.formData))); tQuery.orderId = this.idQuery.id; tQuery.actDate = parseTime(this.formData.actDate, '{y}-{m}-{d} {h}:{i}:{s}'); @@ -580,6 +584,10 @@ export default { this.$message.error('当前仓库不能为空'); return; } + if (this.formData.invWarehouseCode == null || this.formData.invWarehouseCode == '') { + this.$message.error('当前分库不能为空'); + return; + } this.formData.corpOrderId = this.formData.corpOrderId.trim(); if (this.$isBlank(this.formData.corpOrderId)) { let date = new Date(); @@ -764,6 +772,9 @@ export default { filterSubByInv(query) .then((response) => { this.subInvList = response.data || []; + if (this.subInvList != null && this.subInvList.length == 1) { + this.formData.invWarehouseCode = this.subInvList[0]; + } }) .catch(() => { }); diff --git a/src/views/warehouse/stockHospOrderNew.vue b/src/views/warehouse/stockHospOrderNew.vue index 6114c86..23569ec 100644 --- a/src/views/warehouse/stockHospOrderNew.vue +++ b/src/views/warehouse/stockHospOrderNew.vue @@ -1193,6 +1193,9 @@ export default { filterSubByInv(query) .then((response) => { this.subInvList = response.data || []; + if(this.subInvList!=null && this.subInvList.length==1){ + this.formData.invWarehouseCode = this.subInvList[0]; + } }) .catch(() => { }); diff --git a/src/views/warehouse/stockOrderNewDistribution.vue b/src/views/warehouse/stockOrderNewDistribution.vue index 88251cc..b54f85a 100644 --- a/src/views/warehouse/stockOrderNewDistribution.vue +++ b/src/views/warehouse/stockOrderNewDistribution.vue @@ -130,8 +130,8 @@ - - + { this.subInvList = response.data || []; + if(this.subInvList!=null && this.subInvList.length==1){ + this.formData.invWarehouseCode = this.subInvList[0]; + } }) .catch(() => { });