|  |  |  | @ -66,25 +66,26 @@ | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-col :span="3"> | 
			
		
	
		
			
				
					|  |  |  |  |                     <div class="ao-text"> | 
			
		
	
		
			
				
					|  |  |  |  |                         <span>当前仓库:</span> | 
			
		
	
		
			
				
					|  |  |  |  |                         <span>当前分库:</span> | 
			
		
	
		
			
				
					|  |  |  |  |                     </div> | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-col> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-col :span="8"> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-form-item prop="locStorageCode"> | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" @change="locCHange"> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-form-item prop="invWarehouseCode"> | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-select v-model="formData.invWarehouseCode" placeholder="当前分库信息" @change="findSubStorageMethod" | 
			
		
	
		
			
				
					|  |  |  |  |                         > | 
			
		
	
		
			
				
					|  |  |  |  |                             <el-option | 
			
		
	
		
			
				
					|  |  |  |  |                                 v-for="item in storageList" | 
			
		
	
		
			
				
					|  |  |  |  |                                 v-for="item in subInvList" | 
			
		
	
		
			
				
					|  |  |  |  |                                 :key="item.name" | 
			
		
	
		
			
				
					|  |  |  |  |                                 :label="item.name" | 
			
		
	
		
			
				
					|  |  |  |  |                                 :value="item.code"> | 
			
		
	
		
			
				
					|  |  |  |  |                                 <span style="float: left">{{ item.name }}</span> | 
			
		
	
		
			
				
					|  |  |  |  |                                 <span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span> | 
			
		
	
		
			
				
					|  |  |  |  |                             </el-option> | 
			
		
	
		
			
				
					|  |  |  |  |                         </el-select> | 
			
		
	
		
			
				
					|  |  |  |  |                     </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-col> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             </el-row> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-row :gutter="20"> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -120,28 +121,9 @@ | 
			
		
	
		
			
				
					|  |  |  |  |                     </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-form-item class="query-form-item" prop="fromCorp" | 
			
		
	
		
			
				
					|  |  |  |  |                                   v-if="curAction.corpType ==1"> | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-select | 
			
		
	
		
			
				
					|  |  |  |  |                             v-model="formData.fromCorp" | 
			
		
	
		
			
				
					|  |  |  |  |                             filterable | 
			
		
	
		
			
				
					|  |  |  |  |                             remote | 
			
		
	
		
			
				
					|  |  |  |  |                             clearable="true" | 
			
		
	
		
			
				
					|  |  |  |  |                             reserve-keyword | 
			
		
	
		
			
				
					|  |  |  |  |                             placeholder="请输入仓库信息" | 
			
		
	
		
			
				
					|  |  |  |  |                             :remote-method="findStorageMethod" | 
			
		
	
		
			
				
					|  |  |  |  |                             :loading="loading" | 
			
		
	
		
			
				
					|  |  |  |  |                             @change="storageChange" | 
			
		
	
		
			
				
					|  |  |  |  |                         > | 
			
		
	
		
			
				
					|  |  |  |  |                             <el-option | 
			
		
	
		
			
				
					|  |  |  |  |                                 v-for="item in fromStorageOptions" | 
			
		
	
		
			
				
					|  |  |  |  |                                 :key="item.value" | 
			
		
	
		
			
				
					|  |  |  |  |                                 :label="item.code" | 
			
		
	
		
			
				
					|  |  |  |  |                                 :value="item"> | 
			
		
	
		
			
				
					|  |  |  |  |                                 <span style="float: left">{{ item.name }}</span> | 
			
		
	
		
			
				
					|  |  |  |  |                                 <span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span> | 
			
		
	
		
			
				
					|  |  |  |  |                             </el-option> | 
			
		
	
		
			
				
					|  |  |  |  |                         </el-select> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-select v-model="formData.fromSubInvCode" placeholder="请选择分库" clearable="true" | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-select v-model="formData.fromSubInvCode" placeholder="请选择分库" clearable="true" @change="getFormStorageCode" | 
			
		
	
		
			
				
					|  |  |  |  |                         > | 
			
		
	
		
			
				
					|  |  |  |  |                             <el-option | 
			
		
	
		
			
				
					|  |  |  |  |                                 v-for="item in fromSubStorageOptions" | 
			
		
	
	
		
			
				
					|  |  |  | @ -149,7 +131,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |                                 :label="item.name" | 
			
		
	
		
			
				
					|  |  |  |  |                                 :value="item.code"> | 
			
		
	
		
			
				
					|  |  |  |  |                                 <span style="float: left">{{ item.name }}</span> | 
			
		
	
		
			
				
					|  |  |  |  |                                 <span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span> | 
			
		
	
		
			
				
					|  |  |  |  |                                 <span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span> | 
			
		
	
		
			
				
					|  |  |  |  |                                 <!--<span style="float: right; color: #8492a6; font-size: 13px">{{ item.action }}</span>--> | 
			
		
	
		
			
				
					|  |  |  |  |                             </el-option> | 
			
		
	
		
			
				
					|  |  |  |  |                         </el-select> | 
			
		
	
	
		
			
				
					|  |  |  | @ -164,26 +146,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-col> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-col :span="3"> | 
			
		
	
		
			
				
					|  |  |  |  |                     <div class="ao-text"> | 
			
		
	
		
			
				
					|  |  |  |  |                         <span>当前分库:</span> | 
			
		
	
		
			
				
					|  |  |  |  |                     </div> | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-col> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-col :span="8"> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-form-item prop="invWarehouseCode"> | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-select v-model="formData.invWarehouseCode" placeholder="当前分库信息" | 
			
		
	
		
			
				
					|  |  |  |  |                         > | 
			
		
	
		
			
				
					|  |  |  |  |                             <el-option | 
			
		
	
		
			
				
					|  |  |  |  |                                 v-for="item in subInvList" | 
			
		
	
		
			
				
					|  |  |  |  |                                 :key="item.name" | 
			
		
	
		
			
				
					|  |  |  |  |                                 :label="item.name" | 
			
		
	
		
			
				
					|  |  |  |  |                                 :value="item.code"> | 
			
		
	
		
			
				
					|  |  |  |  |                                 <span style="float: left">{{ item.name }}</span> | 
			
		
	
		
			
				
					|  |  |  |  |                             </el-option> | 
			
		
	
		
			
				
					|  |  |  |  |                         </el-select> | 
			
		
	
		
			
				
					|  |  |  |  |                     </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-col> | 
			
		
	
		
			
				
					|  |  |  |  |             </el-row> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-form> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -277,14 +240,6 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.$message.warning("请选择单据类型!"); | 
			
		
	
		
			
				
					|  |  |  |  |                 return; | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             if (this.$isBlank(this.formData.locStorageCode)) { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.$message.error('当前仓库不能为空'); | 
			
		
	
		
			
				
					|  |  |  |  |                 return; | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             if (this.$isBlank(this.formData.fromCorp)) { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.$message.error('当前往来单位不能为空'); | 
			
		
	
		
			
				
					|  |  |  |  |                 return; | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             if (this.$isBlank(this.formData.invWarehouseCode)) { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.$message.error("当前分库不能为空"); | 
			
		
	
		
			
				
					|  |  |  |  |                 return; | 
			
		
	
	
		
			
				
					|  |  |  | @ -297,6 +252,12 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.$message.error("产品列表不能为空"); | 
			
		
	
		
			
				
					|  |  |  |  |                 return; | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             if (this.formData.locStorageCode === this.formData.fromCorp || this.formData.invWarehouseCode === this.formData.fromSubInvCode) { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.$message.error("当前仓库和往来仓库不能相同!"); | 
			
		
	
		
			
				
					|  |  |  |  |                 return; | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             let products = []; | 
			
		
	
		
			
				
					|  |  |  |  |             this.detailList.forEach(item => { | 
			
		
	
		
			
				
					|  |  |  |  |                 let product = { | 
			
		
	
	
		
			
				
					|  |  |  | @ -334,7 +295,9 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         getFormStorageCode(){ | 
			
		
	
		
			
				
					|  |  |  |  |             // this.formData.locStorageCode= this.subInvList.find(item => item.code == this.formData.invWarehouseCode).parentId | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         locCHange() { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -349,7 +312,8 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |         findSubInvByInv(invCode) { | 
			
		
	
		
			
				
					|  |  |  |  |             this.subInvList = []; | 
			
		
	
		
			
				
					|  |  |  |  |             let query = { | 
			
		
	
		
			
				
					|  |  |  |  |                 pcode: invCode | 
			
		
	
		
			
				
					|  |  |  |  |                 pcode: invCode, | 
			
		
	
		
			
				
					|  |  |  |  |                 filter:3 | 
			
		
	
		
			
				
					|  |  |  |  |             }; | 
			
		
	
		
			
				
					|  |  |  |  |             filterSubByInv(query) | 
			
		
	
		
			
				
					|  |  |  |  |                 .then((response) => { | 
			
		
	
	
		
			
				
					|  |  |  | @ -374,8 +338,9 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         findSubStorageMethod() { | 
			
		
	
		
			
				
					|  |  |  |  |             this.formData.locStorageCode= this.subInvList.find(item => item.code == this.formData.invWarehouseCode).parentId | 
			
		
	
		
			
				
					|  |  |  |  |             let cQuery = { | 
			
		
	
		
			
				
					|  |  |  |  |                 pcode: this.formData.fromCorpId, | 
			
		
	
		
			
				
					|  |  |  |  |                 code: this.formData.invWarehouseCode, | 
			
		
	
		
			
				
					|  |  |  |  |                 filter: 2, | 
			
		
	
		
			
				
					|  |  |  |  |             }; | 
			
		
	
		
			
				
					|  |  |  |  |             filterSubByInv(cQuery) | 
			
		
	
	
		
			
				
					|  |  |  | @ -425,8 +390,12 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |         storageChange(row) { | 
			
		
	
		
			
				
					|  |  |  |  |             this.formData.fromCorpId = row.code; | 
			
		
	
		
			
				
					|  |  |  |  |             this.formData.fromCorp = row.name; | 
			
		
	
		
			
				
					|  |  |  |  |             this.formData.fromSubInvCode = null; | 
			
		
	
		
			
				
					|  |  |  |  |             this.findSubStorageMethod(); | 
			
		
	
		
			
				
					|  |  |  |  |             if (isBlank(this.formData.fromCorp)) { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.fromSubStorageOptions = []; | 
			
		
	
		
			
				
					|  |  |  |  |                 this.formData.fromSubInvCode = null; | 
			
		
	
		
			
				
					|  |  |  |  |             } else { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.findSubStorageMethod(); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         unitChange(row) { | 
			
		
	
	
		
			
				
					|  |  |  | @ -435,11 +404,8 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         actionChange(item) { | 
			
		
	
		
			
				
					|  |  |  |  |             this.curAction = this.getActionItem(item); | 
			
		
	
		
			
				
					|  |  |  |  |             // this.formData.locStorageCode = this.curAction.storageCode; | 
			
		
	
		
			
				
					|  |  |  |  |             //切换单据类型,清空仓库和分仓信息 | 
			
		
	
		
			
				
					|  |  |  |  |             this.formData.locStorageCode = null; | 
			
		
	
		
			
				
					|  |  |  |  |             this.formData.invWarehouseCode = null; | 
			
		
	
		
			
				
					|  |  |  |  |             this.formData.fromCorp = null; | 
			
		
	
		
			
				
					|  |  |  |  |             this.formData.fromSubInvCode = null; | 
			
		
	
		
			
				
					|  |  |  |  |             this.findMethod(); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         getActionItem(action) { | 
			
		
	
	
		
			
				
					|  |  |  | @ -499,6 +465,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |             this.formData.corpOrderId = parseTime(date, '{y}{m}{d}{h}{i}{s}') + Math.ceil(Math.random() * 89 + 10); | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |         this.getBusType(); | 
			
		
	
		
			
				
					|  |  |  |  |         this.findSubInvByInv(this.formData.locStorageCode); | 
			
		
	
		
			
				
					|  |  |  |  |         this.getStorage(); | 
			
		
	
		
			
				
					|  |  |  |  |         this.getStockOrderDetailList(this.curRow.id); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
	
		
			
				
					|  |  |  | 
 |