|  |  |  | @ -17,7 +17,9 @@ | 
			
		
	
		
			
				
					|  |  |  |  |                                 :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> | 
			
		
	
		
			
				
					|  |  |  |  |                                 <span style="float: right; color: #8492a6; font-size: 13px">{{ | 
			
		
	
		
			
				
					|  |  |  |  |                                         item.warehouseName | 
			
		
	
		
			
				
					|  |  |  |  |                                     }}</span> | 
			
		
	
		
			
				
					|  |  |  |  |                             </el-option> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                         </el-select> | 
			
		
	
	
		
			
				
					|  |  |  | @ -35,7 +37,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-select v-model="inputQuery.action" placeholder="请选择" clearable> | 
			
		
	
		
			
				
					|  |  |  |  |                             <el-option | 
			
		
	
		
			
				
					|  |  |  |  |                                 v-for="item in busTypes" | 
			
		
	
		
			
				
					|  |  |  |  |                                 :key="item.action" | 
			
		
	
		
			
				
					|  |  |  |  |                                 :key="item.localAction" | 
			
		
	
		
			
				
					|  |  |  |  |                                 :label="item.name" | 
			
		
	
		
			
				
					|  |  |  |  |                                 :value="item.localAction"> | 
			
		
	
		
			
				
					|  |  |  |  |                                 <span style="float: left">{{ item.localName }}</span> | 
			
		
	
	
		
			
				
					|  |  |  | @ -59,7 +61,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |                             <span>接受委托仓库: </span> | 
			
		
	
		
			
				
					|  |  |  |  |                         </div> | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-select v-model="inputQuery.entrustSubInv" placeholder="接受委托仓库" | 
			
		
	
		
			
				
					|  |  |  |  |                                    @change="entrustSubInvChange" | 
			
		
	
		
			
				
					|  |  |  |  |                                    @change="subInvChangeMeg" | 
			
		
	
		
			
				
					|  |  |  |  |                                    filterable | 
			
		
	
		
			
				
					|  |  |  |  |                                    clearable> | 
			
		
	
		
			
				
					|  |  |  |  |                             <el-option | 
			
		
	
	
		
			
				
					|  |  |  | @ -68,7 +70,9 @@ | 
			
		
	
		
			
				
					|  |  |  |  |                                 :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> | 
			
		
	
		
			
				
					|  |  |  |  |                                 <span style="float: right; color: #8492a6; font-size: 13px">{{ | 
			
		
	
		
			
				
					|  |  |  |  |                                         item.warehouseName | 
			
		
	
		
			
				
					|  |  |  |  |                                     }}</span> | 
			
		
	
		
			
				
					|  |  |  |  |                             </el-option> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                         </el-select> | 
			
		
	
	
		
			
				
					|  |  |  | @ -86,7 +90,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |                         <div class="itemTag"> | 
			
		
	
		
			
				
					|  |  |  |  |                             <span>生成单据类型: </span> | 
			
		
	
		
			
				
					|  |  |  |  |                         </div> | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-select v-model="inputQuery.entrustAction" placeholder="单据类型" @change="entrustSubInvChange2" clearable> | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-select v-model="inputQuery.entrustAction" placeholder="单据类型" clearable> | 
			
		
	
		
			
				
					|  |  |  |  |                             <el-option | 
			
		
	
		
			
				
					|  |  |  |  |                                 v-for="item in entrustBusArray" | 
			
		
	
		
			
				
					|  |  |  |  |                                 :key="item.action" | 
			
		
	
	
		
			
				
					|  |  |  | @ -167,6 +171,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |                 action: [ | 
			
		
	
		
			
				
					|  |  |  |  |                     {required: true, message: "请输入扫码单据类型", trigger: "blur"} | 
			
		
	
		
			
				
					|  |  |  |  |                 ], | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 entrustInv: [ | 
			
		
	
		
			
				
					|  |  |  |  |                     {required: true, message: "请输入委托验收人仓库", trigger: "blur"} | 
			
		
	
		
			
				
					|  |  |  |  |                 ], | 
			
		
	
	
		
			
				
					|  |  |  | @ -197,12 +202,13 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |                     this.localTypes = []; | 
			
		
	
		
			
				
					|  |  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         findSubInvByInv() { | 
			
		
	
		
			
				
					|  |  |  |  |             this.subInvList = []; | 
			
		
	
		
			
				
					|  |  |  |  |             let query = { | 
			
		
	
		
			
				
					|  |  |  |  |                 pcode: this.inputQuery.curInv, | 
			
		
	
		
			
				
					|  |  |  |  |                 filter: 3 | 
			
		
	
		
			
				
					|  |  |  |  |             }; | 
			
		
	
		
			
				
					|  |  |  |  |             filterSubByInv(query) | 
			
		
	
	
		
			
				
					|  |  |  | @ -215,20 +221,33 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         findEntrustSubInvByInv(code) { | 
			
		
	
		
			
				
					|  |  |  |  |         findEntrustSubInvByInv() { | 
			
		
	
		
			
				
					|  |  |  |  |             this.entrustSubInvList = []; | 
			
		
	
		
			
				
					|  |  |  |  |             let query = { | 
			
		
	
		
			
				
					|  |  |  |  |                 code: this.inputQuery.invWarehouseCode, | 
			
		
	
		
			
				
					|  |  |  |  |                 filter: 2, | 
			
		
	
		
			
				
					|  |  |  |  |             }; | 
			
		
	
		
			
				
					|  |  |  |  |             filterSub(query) | 
			
		
	
		
			
				
					|  |  |  |  |                 .then((response) => { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.entrustSubInvList = response.data || []; | 
			
		
	
		
			
				
					|  |  |  |  |                     this.entrustSubInvChange(code); | 
			
		
	
		
			
				
					|  |  |  |  |                     this.entrustSubInvChange(); | 
			
		
	
		
			
				
					|  |  |  |  |                 }) | 
			
		
	
		
			
				
					|  |  |  |  |                 .catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         getEntrustStorage() { | 
			
		
	
		
			
				
					|  |  |  |  |             this.entrustStorageList = []; | 
			
		
	
		
			
				
					|  |  |  |  |             let nextQuery = {pcode: this.inputQuery.curInv}; | 
			
		
	
		
			
				
					|  |  |  |  |             filterNext(nextQuery) | 
			
		
	
		
			
				
					|  |  |  |  |                 .then((response) => { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.entrustStorageList = response.data || []; | 
			
		
	
		
			
				
					|  |  |  |  |                     this.findEntrustSubInvByInv(); | 
			
		
	
		
			
				
					|  |  |  |  |                 }) | 
			
		
	
		
			
				
					|  |  |  |  |                 .catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         getOrderType() { | 
			
		
	
		
			
				
					|  |  |  |  |             let query = { | 
			
		
	
		
			
				
					|  |  |  |  |                 locSubInvCode: this.inputQuery.invWarehouseCode | 
			
		
	
	
		
			
				
					|  |  |  | @ -239,24 +258,47 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             }) | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         invChange() { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             this.findSubInvByInv(); | 
			
		
	
		
			
				
					|  |  |  |  |             this.inputQuery.invWarehouseCode = null; | 
			
		
	
		
			
				
					|  |  |  |  |             this.$set(this.inputQuery, "entrustUser", ""); | 
			
		
	
		
			
				
					|  |  |  |  |             this.$set(this.inputQuery, "entrustInv", ""); | 
			
		
	
		
			
				
					|  |  |  |  |             this.getEntrustStorage(); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         subInvChange() { | 
			
		
	
		
			
				
					|  |  |  |  |             this.getOrderType(); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         entrustInvChange(code) { | 
			
		
	
		
			
				
					|  |  |  |  |             this.inputQuery.curInv= this.subInvList.find(item => item.code == code).parentId | 
			
		
	
		
			
				
					|  |  |  |  |             this.$set(this.inputQuery, "action", ""); | 
			
		
	
		
			
				
					|  |  |  |  |             this.$set(this.inputQuery, "entrustSubInv", ""); | 
			
		
	
		
			
				
					|  |  |  |  |             this.getOrderType(); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         entrustInvChange() { | 
			
		
	
		
			
				
					|  |  |  |  |             this.subInvList.forEach(item => { | 
			
		
	
		
			
				
					|  |  |  |  |                 if (item.code === this.inputQuery.invWarehouseCode) { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.inputQuery.curInv = item.parentId; | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |             }) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             // 置空接受委托仓库和分库参数 | 
			
		
	
		
			
				
					|  |  |  |  |             this.inputQuery.entrustSubInv = null; | 
			
		
	
		
			
				
					|  |  |  |  |             this.inputQuery.entrustInv = null; | 
			
		
	
		
			
				
					|  |  |  |  |             this.findEntrustSubInvByInv(); | 
			
		
	
		
			
				
					|  |  |  |  |             this.getOrderType(); | 
			
		
	
		
			
				
					|  |  |  |  |             this.$forceUpdate(); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         entrustSubInvChange(code) { | 
			
		
	
		
			
				
					|  |  |  |  |             this.inputQuery.entrustInv= this.entrustSubInvList.find(item => item.code == code).parentId | 
			
		
	
		
			
				
					|  |  |  |  |         entrustSubInvChange() { | 
			
		
	
		
			
				
					|  |  |  |  |             // 赋值接收委托仓库 | 
			
		
	
		
			
				
					|  |  |  |  |             this.entrustSubInvList.forEach(item => { | 
			
		
	
		
			
				
					|  |  |  |  |                 if (item.code === this.inputQuery.entrustSubInv) { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.inputQuery.entrustInv = item.parentId; | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |             }) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             let query = { | 
			
		
	
		
			
				
					|  |  |  |  |                 code: this.inputQuery.entrustSubInv, | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             //加载用户数据 | 
			
		
	
		
			
				
					|  |  |  |  |             warehouseUserList(query).then((res) => { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.entrustUserArray = []; | 
			
		
	
	
		
			
				
					|  |  |  | @ -273,13 +315,21 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.$message.error("单据类型数据加载失败") | 
			
		
	
		
			
				
					|  |  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         entrustSubInvChange2(code) { | 
			
		
	
		
			
				
					|  |  |  |  |             this.inputQuery.entrustInv= this.entrustSubInvList.find(item => item.code == code).parentId | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         subInvChangeMeg() { | 
			
		
	
		
			
				
					|  |  |  |  |             this.$set(this.inputQuery, "entrustAction", ""); | 
			
		
	
		
			
				
					|  |  |  |  |             this.$set(this.inputQuery, "entrustUser", ""); | 
			
		
	
		
			
				
					|  |  |  |  |             // 赋值接收委托仓库 | 
			
		
	
		
			
				
					|  |  |  |  |             this.entrustSubInvList.forEach(item => { | 
			
		
	
		
			
				
					|  |  |  |  |                 if (item.code === this.inputQuery.entrustSubInv) { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.inputQuery.entrustInv = item.parentId; | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |             }) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             let query = { | 
			
		
	
		
			
				
					|  |  |  |  |                 code: this.inputQuery.entrustSubInv, | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             //加载用户数据 | 
			
		
	
		
			
				
					|  |  |  |  |             warehouseUserList(query).then((res) => { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.entrustUserArray = []; | 
			
		
	
	
		
			
				
					|  |  |  | @ -296,9 +346,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.$message.error("单据类型数据加载失败") | 
			
		
	
		
			
				
					|  |  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         entrustActionChange() { | 
			
		
	
		
			
				
					|  |  |  |  |             this.inputQuery.entrustUser = ""; | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     computed: { | 
			
		
	
	
		
			
				
					|  |  |  | @ -309,14 +357,11 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     created() { | 
			
		
	
		
			
				
					|  |  |  |  |         this.getList(); | 
			
		
	
		
			
				
					|  |  |  |  |         this.findSubInvByInv(); | 
			
		
	
		
			
				
					|  |  |  |  |         if(this.inputQuery.entrustSubInv!=null && this.inputQuery.entrustSubInv!=undefined){ | 
			
		
	
		
			
				
					|  |  |  |  |             this.findEntrustSubInvByInv(this.inputQuery.entrustSubInv); | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         this.getEntrustStorage(); | 
			
		
	
		
			
				
					|  |  |  |  |         // if (this.$isNotBlank(this.inputQuery.entrustInv)) { | 
			
		
	
		
			
				
					|  |  |  |  |         //     this.findEntrustSubInvByInv(); | 
			
		
	
		
			
				
					|  |  |  |  |         //     this.entrustInvChange(this.inputQuery.entrustInv); | 
			
		
	
		
			
				
					|  |  |  |  |         // } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
	
		
			
				
					|  |  |  | 
 |