|  |  |  | @ -154,6 +154,35 @@ | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-col> | 
			
		
	
		
			
				
					|  |  |  |  |             </el-row> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-form> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         <el-table v-loading="detailLoading" | 
			
		
	
		
			
				
					|  |  |  |  |                   :data="detailList" | 
			
		
	
		
			
				
					|  |  |  |  |                   @selection-change="changeFun" | 
			
		
	
		
			
				
					|  |  |  |  |                   style="width: 100%; margin-top: 20px;"> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="产品通用名" width="200" prop="productName"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="包装规格" width="200" prop="spec"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="批次号" width="100" prop="batchNo"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="生产日期" width="120" prop="productDate"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="失效日期" width="120" prop="expireDate"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="单据数量" width="100" prop="count"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="实际数量" width="100" prop="reCount"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="价格" width="120" prop="price"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="销售清单号(第二票)" width="180" prop="secSalesListNo"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="销售发票号(第一票)" width="180" prop="firstSalesInvNo"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="销售发票号(第二票)" width="180" prop="secSalesInvNo"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="发票日期" width="150" prop="invoiceDate"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table-column label="操作" width="100" prop="price" fixed="right"> | 
			
		
	
		
			
				
					|  |  |  |  |                 <template slot-scope="scope"> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-button | 
			
		
	
		
			
				
					|  |  |  |  |                         type="text" | 
			
		
	
		
			
				
					|  |  |  |  |                         size="small" | 
			
		
	
		
			
				
					|  |  |  |  |                         @click="deleteOrderDetail(scope.$index, scope.row)" | 
			
		
	
		
			
				
					|  |  |  |  |                     >删除 | 
			
		
	
		
			
				
					|  |  |  |  |                     </el-button> | 
			
		
	
		
			
				
					|  |  |  |  |                 </template> | 
			
		
	
		
			
				
					|  |  |  |  |             </el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-table> | 
			
		
	
		
			
				
					|  |  |  |  |     </div> | 
			
		
	
		
			
				
					|  |  |  |  | </template> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -163,7 +192,7 @@ import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain"; | 
			
		
	
		
			
				
					|  |  |  |  | import {parseTime} from "@/filtres"; | 
			
		
	
		
			
				
					|  |  |  |  | import {getLocalJoinByUser} from "@/api/basic/busLocalType"; | 
			
		
	
		
			
				
					|  |  |  |  | import {submitOrderWeb} from "@/api/warehouse/order"; | 
			
		
	
		
			
				
					|  |  |  |  | import {stockOrderChange} from "@/api/warehouse/stockOrder"; | 
			
		
	
		
			
				
					|  |  |  |  | import {stockOrderChange, stockOrderDetail} from "@/api/warehouse/stockOrder"; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | export default { | 
			
		
	
		
			
				
					|  |  |  |  |     name: "DialogcChangeNewOrder", | 
			
		
	
	
		
			
				
					|  |  |  | @ -189,6 +218,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |                 actDate: new Date(), | 
			
		
	
		
			
				
					|  |  |  |  |                 action: null, | 
			
		
	
		
			
				
					|  |  |  |  |                 locStorageCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |                 mainAction: null | 
			
		
	
		
			
				
					|  |  |  |  |             }, | 
			
		
	
		
			
				
					|  |  |  |  |             fromStorageOptions: [], | 
			
		
	
		
			
				
					|  |  |  |  |             curAction: { | 
			
		
	
	
		
			
				
					|  |  |  | @ -198,7 +228,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |             busTypes: [], | 
			
		
	
		
			
				
					|  |  |  |  |             fromOptions: [], | 
			
		
	
		
			
				
					|  |  |  |  |             loading:false, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             detailList: [] | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     methods: { | 
			
		
	
	
		
			
				
					|  |  |  | @ -216,16 +246,35 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.$message.error('当前往来单位不能为空'); | 
			
		
	
		
			
				
					|  |  |  |  |                 return; | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             if (this.detailList.length == 0) { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.$message.error("产品列表不能为空"); | 
			
		
	
		
			
				
					|  |  |  |  |                 return; | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             let products = []; | 
			
		
	
		
			
				
					|  |  |  |  |             this.detailList.forEach(item => { | 
			
		
	
		
			
				
					|  |  |  |  |                 let product = { | 
			
		
	
		
			
				
					|  |  |  |  |                     relId: item.relId, | 
			
		
	
		
			
				
					|  |  |  |  |                     batchNo: item.batchNo | 
			
		
	
		
			
				
					|  |  |  |  |                 }; | 
			
		
	
		
			
				
					|  |  |  |  |                 products.push(product); | 
			
		
	
		
			
				
					|  |  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             this.busTypes.forEach(item => { | 
			
		
	
		
			
				
					|  |  |  |  |                 if (item.action === this.formData.action) { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.formData.mainAction = item.mainAction; | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |             }) | 
			
		
	
		
			
				
					|  |  |  |  |             let tQuery = { | 
			
		
	
		
			
				
					|  |  |  |  |                 stockOrderId: this.curRow.id, | 
			
		
	
		
			
				
					|  |  |  |  |                 locStorageCode: this.formData.locStorageCode, | 
			
		
	
		
			
				
					|  |  |  |  |                 action: this.formData.action, | 
			
		
	
		
			
				
					|  |  |  |  |                 mainAction: this.formData.mainAction, | 
			
		
	
		
			
				
					|  |  |  |  |                 fromCorp: this.formData.fromCorp, | 
			
		
	
		
			
				
					|  |  |  |  |                 fromCorpId: this.formData.fromCorpId, | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |                 products: products | 
			
		
	
		
			
				
					|  |  |  |  |             }; | 
			
		
	
		
			
				
					|  |  |  |  |             stockOrderChange(tQuery) | 
			
		
	
		
			
				
					|  |  |  |  |                 .then((response) => { | 
			
		
	
		
			
				
					|  |  |  |  |                     console.log(response) | 
			
		
	
		
			
				
					|  |  |  |  |                     if (response.code === 20000) { | 
			
		
	
		
			
				
					|  |  |  |  |                         this.$message.success("提交成功"); | 
			
		
	
		
			
				
					|  |  |  |  |                         this.closeDialog(); | 
			
		
	
	
		
			
				
					|  |  |  | @ -257,7 +306,6 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         findMethod(query) { | 
			
		
	
		
			
				
					|  |  |  |  |             console.log(query); | 
			
		
	
		
			
				
					|  |  |  |  |             this.fromOptions = []; | 
			
		
	
		
			
				
					|  |  |  |  |             let cQuery = { | 
			
		
	
		
			
				
					|  |  |  |  |                 key: query, | 
			
		
	
	
		
			
				
					|  |  |  | @ -300,7 +348,6 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         unitChange(row) { | 
			
		
	
		
			
				
					|  |  |  |  |             console.log(row); | 
			
		
	
		
			
				
					|  |  |  |  |             this.formData.fromCorpId = row.erpId; | 
			
		
	
		
			
				
					|  |  |  |  |             this.formData.fromCorp = row.name; | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
	
		
			
				
					|  |  |  | @ -337,7 +384,28 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |                 .catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         getStockOrderDetailList(orderId) { | 
			
		
	
		
			
				
					|  |  |  |  |             let query = { | 
			
		
	
		
			
				
					|  |  |  |  |                 orderIdFk: orderId | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             stockOrderDetail(query) | 
			
		
	
		
			
				
					|  |  |  |  |                 .then((response) => { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.detailLoading = false; | 
			
		
	
		
			
				
					|  |  |  |  |                     this.detailList = response.data.list || []; | 
			
		
	
		
			
				
					|  |  |  |  |                 }) | 
			
		
	
		
			
				
					|  |  |  |  |                 .catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.detailLoading = false; | 
			
		
	
		
			
				
					|  |  |  |  |                     this.detailList = []; | 
			
		
	
		
			
				
					|  |  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         deleteOrderDetail(index) { | 
			
		
	
		
			
				
					|  |  |  |  |             for (let i = 0; i < this.detailList.length; i++) { | 
			
		
	
		
			
				
					|  |  |  |  |                 if (index === i) { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.detailList.splice(index, 1); | 
			
		
	
		
			
				
					|  |  |  |  |                     break | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     created() { | 
			
		
	
		
			
				
					|  |  |  |  |         if (this.$isBlank(this.formData.corpOrderId)) { | 
			
		
	
	
		
			
				
					|  |  |  | @ -346,6 +414,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |         this.getBusType(); | 
			
		
	
		
			
				
					|  |  |  |  |         this.getStorage(); | 
			
		
	
		
			
				
					|  |  |  |  |         this.getStockOrderDetailList(this.curRow.id); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | </script> | 
			
		
	
	
		
			
				
					|  |  |  | 
 |