|  |  | @ -83,18 +83,8 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                     <el-col :span="7"> |  |  |  |                     <el-col :span="7"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                         <el-form-item prop="locStorageCode"> |  |  |  |                         <el-form-item prop="locStorageCode"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                             <el-select v-model="formData.locStorageCode" placeholder="采购仓库信息" @change="locInChange" |  |  |  | 
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                        style="width: 50%" |  |  |  |                             <el-select v-model="formData.invWarehouseCode" auto-complete="" @change="setLocStorageCode" filterable placeholder="采购分库信息" style="width: 100%" | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                        clearable> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 <el-option |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                     v-for="item in storageList" |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                     :key="item.name" |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                     :label="item.name" |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                     :value="item.code"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                     <span style="float: left">{{ item.name }}</span> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 </el-option> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                             </el-select> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                             <el-select v-model="formData.invWarehouseCode" placeholder="采购分库信息" style="width: 50%" |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                                        clearable> |  |  |  |                                        clearable> | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 <el-option |  |  |  |                                 <el-option | 
			
		
	
		
		
			
				
					
					|  |  |  |                                     v-for="item in subInvList" |  |  |  |                                     v-for="item in subInvList" | 
			
		
	
	
		
		
			
				
					|  |  | @ -102,12 +92,16 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |                                     :label="item.name" |  |  |  |                                     :label="item.name" | 
			
		
	
		
		
			
				
					
					|  |  |  |                                     :value="item.code"> |  |  |  |                                     :value="item.code"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                                     <span style="float: left">{{ item.name }}</span> |  |  |  |                                     <span style="float: left">{{ item.name }}</span> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                     <span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 </el-option> |  |  |  |                                 </el-option> | 
			
		
	
		
		
			
				
					
					|  |  |  |                             </el-select> |  |  |  |                             </el-select> | 
			
		
	
		
		
			
				
					
					|  |  |  |                         </el-form-item> |  |  |  |                         </el-form-item> | 
			
		
	
		
		
			
				
					
					|  |  |  |                     </el-col> |  |  |  |                     </el-col> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 </el-row> | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 <el-row :gutter="20" style="margin-top: -10px"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                     <el-col :span="3"> |  |  |  |                     <el-col :span="3"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                         <div class="ao-text"> |  |  |  |                         <div class="ao-text"> | 
			
		
	
		
		
			
				
					
					|  |  |  |                             <span>采购说明:</span> |  |  |  |                             <span>采购说明:</span> | 
			
		
	
	
		
		
			
				
					|  |  | @ -364,13 +358,11 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |                         if (this.formData.billDate == "" || this.formData.billDate == null) { |  |  |  |                         if (this.formData.billDate == "" || this.formData.billDate == null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                             return this.$message.error("单据日期不能为空!"); |  |  |  |                             return this.$message.error("单据日期不能为空!"); | 
			
		
	
		
		
			
				
					
					|  |  |  |                         } |  |  |  |                         } | 
			
		
	
		
		
			
				
					
					|  |  |  |                         // if (this.formData.billType == "" || this.formData.billType == null) { |  |  |  |                         if(this.formData.billType=="" || this.formData.billType==null){ | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         //     return this.$message.error("采购类型不能为空!"); |  |  |  |                             return this.$message.error("采购类型不能为空!"); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         // } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                         if (this.formData.locStorageCode == "" || this.formData.locStorageCode == null) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                             return this.$message.error("采购仓库不能为空!"); |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                         } |  |  |  |                         } | 
			
		
	
		
		
			
				
					
					|  |  |  |                         if (this.formData.invWarehouseCode == "" || this.formData.invWarehouseCode == null) { |  |  |  | 
 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         if(this.formData.invWarehouseCode=="" || this.formData.invWarehouseCode==null){ | 
			
		
	
		
		
			
				
					
					|  |  |  |                             return this.$message.error("采购分库不能为空!"); |  |  |  |                             return this.$message.error("采购分库不能为空!"); | 
			
		
	
		
		
			
				
					
					|  |  |  |                         } |  |  |  |                         } | 
			
		
	
		
		
			
				
					
					|  |  |  |                         for (let i = 0; i < this.codeArray.length; i++) { |  |  |  |                         for (let i = 0; i < this.codeArray.length; i++) { | 
			
		
	
	
		
		
			
				
					|  |  | @ -422,6 +414,9 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |             this.thisData.stockOrderLists = this.codeArray; |  |  |  |             this.thisData.stockOrderLists = this.codeArray; | 
			
		
	
		
		
			
				
					
					|  |  |  |             this.selectProductVisible = true; |  |  |  |             this.selectProductVisible = true; | 
			
		
	
		
		
			
				
					
					|  |  |  |         }, |  |  |  |         }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         setLocStorageCode(obj){ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |              this.formData.locStorageCode= this.subInvList.find(item => item.code == obj).parentId; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         }, | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         selectApply() { |  |  |  |         selectApply() { | 
			
		
	
		
		
			
				
					
					|  |  |  |             this.selectApplyVisible = true; |  |  |  |             this.selectApplyVisible = true; | 
			
		
	
	
		
		
			
				
					|  |  | @ -519,26 +514,10 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     this.total = 0; |  |  |  |                     this.total = 0; | 
			
		
	
		
		
			
				
					
					|  |  |  |                 }); |  |  |  |                 }); | 
			
		
	
		
		
			
				
					
					|  |  |  |         }, |  |  |  |         }, | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         getStorage() { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             this.storageList = []; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             filterAllByUser() |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 .then((response) => { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     this.storageList = response.data || []; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     if (this.storageList != null && this.storageList.length == 1) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                         this.formData.locStorageCode = this.storageList[0].code; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     this.findSubInvs(); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 }) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 .catch(() => { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 }); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         }, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         findSubInvs() { |  |  |  |         findSubInvs() { | 
			
		
	
		
		
			
				
					
					|  |  |  |             this.subInvList = []; |  |  |  |             this.subInvList = []; | 
			
		
	
		
		
			
				
					
					|  |  |  |             let query = { |  |  |  |             let query = { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 pcode: this.formData.locStorageCode |  |  |  |                 filter:3 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             }; |  |  |  |             }; | 
			
		
	
		
		
			
				
					
					|  |  |  |             filterSubByInv(query) |  |  |  |             filterSubByInv(query) | 
			
		
	
		
		
			
				
					
					|  |  |  |                 .then((response) => { |  |  |  |                 .then((response) => { | 
			
		
	
	
		
		
			
				
					|  |  | @ -550,13 +529,6 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 .catch(() => { |  |  |  |                 .catch(() => { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 }); |  |  |  |                 }); | 
			
		
	
		
		
			
				
					
					|  |  |  |         }, |  |  |  |         }, | 
			
		
	
		
		
			
				
					
					|  |  |  |         locInChange(item) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (this.formData.invWarehouseCode != null) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 this.formData.invWarehouseCode = ""; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             this.formData.locStorageCode = item; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             this.findSubInvs(); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         }, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         getBusType() { |  |  |  |         getBusType() { | 
			
		
	
		
		
			
				
					
					|  |  |  |             let query = { |  |  |  |             let query = { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 enable: false, |  |  |  |                 enable: false, | 
			
		
	
	
		
		
			
				
					|  |  | @ -598,7 +570,7 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |             }; |  |  |  |             }; | 
			
		
	
		
		
			
				
					
					|  |  |  |             this.orderEditor = false; |  |  |  |             this.orderEditor = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         this.getStorage(); |  |  |  |         this.findSubInvs(); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         this.getBusType(); |  |  |  |         this.getBusType(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         this.codeArray = []; |  |  |  |         this.codeArray = []; | 
			
		
	
		
		
			
				
					
					|  |  |  |     }, |  |  |  |     }, | 
			
		
	
	
		
		
			
				
					|  |  | 
 |