|  |  |  | @ -18,6 +18,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |                     </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-form-item class="query-form-item"> | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-select v-model="filterQuery.invWarehouseCode" placeholder="请选择当前分库" clearable="true" | 
			
		
	
		
			
				
					|  |  |  |  |                                    @change="invWarehouseChange" | 
			
		
	
		
			
				
					|  |  |  |  |                                    :disabled="invWarehouseDisabled" | 
			
		
	
		
			
				
					|  |  |  |  |                                    size="mini"> | 
			
		
	
		
			
				
					|  |  |  |  |                             <el-option | 
			
		
	
	
		
			
				
					|  |  |  | @ -29,6 +30,19 @@ | 
			
		
	
		
			
				
					|  |  |  |  |                             </el-option> | 
			
		
	
		
			
				
					|  |  |  |  |                         </el-select> | 
			
		
	
		
			
				
					|  |  |  |  |                     </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-form-item class="query-form-item"> | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-select v-model="filterQuery.invSpaceCode" placeholder="请选择当前货位" clearable="true" | 
			
		
	
		
			
				
					|  |  |  |  |                                    :disabled="invSpaceDisabled" | 
			
		
	
		
			
				
					|  |  |  |  |                                    size="mini"> | 
			
		
	
		
			
				
					|  |  |  |  |                             <el-option | 
			
		
	
		
			
				
					|  |  |  |  |                                 v-for="item in spaceCodeList" | 
			
		
	
		
			
				
					|  |  |  |  |                                 :key="item.name" | 
			
		
	
		
			
				
					|  |  |  |  |                                 :label="item.name" | 
			
		
	
		
			
				
					|  |  |  |  |                                 :value="item.code"> | 
			
		
	
		
			
				
					|  |  |  |  |                                 <span style="float: left">{{ item.name }}</span> | 
			
		
	
		
			
				
					|  |  |  |  |                             </el-option> | 
			
		
	
		
			
				
					|  |  |  |  |                         </el-select> | 
			
		
	
		
			
				
					|  |  |  |  |                     </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-button-group> | 
			
		
	
		
			
				
					|  |  |  |  |                             <el-button | 
			
		
	
	
		
			
				
					|  |  |  | @ -44,33 +58,55 @@ | 
			
		
	
		
			
				
					|  |  |  |  |                     </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-row> | 
			
		
	
		
			
				
					|  |  |  |  |             </el-form> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table v-loading="loading" :data="list" style="width: 100%"> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table v-loading="loading" :data="list" style="width: 100%" | 
			
		
	
		
			
				
					|  |  |  |  |                       highlight-current-row="true" | 
			
		
	
		
			
				
					|  |  |  |  |                       @current-change="handleChange" | 
			
		
	
		
			
				
					|  |  |  |  |             > | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="序号" type="index"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="产品标识" prop="nameCode" width="120"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="产品名称" prop="cpmctymc" width="180"> | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="规格型号" prop="ggxh" width="180" show-overflow-tooltip> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="盘点单号" prop="orderId" width="180"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="仓库" prop="invStorageName" width="180"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="分库" prop="invSubStorageName" width="180" | 
			
		
	
		
			
				
					|  |  |  |  |                                  show-overflow-tooltip></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="货位" prop="invSpaceName" width="120"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="盘点人" prop="createUser" width="120"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="盘点时间" prop="createTime" width="150"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="状态" prop="status" width="120"> | 
			
		
	
		
			
				
					|  |  |  |  |                     <template slot-scope="scope"> | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-tag> | 
			
		
	
		
			
				
					|  |  |  |  |                             {{ statusMap[scope.row.status] }} | 
			
		
	
		
			
				
					|  |  |  |  |                         </el-tag> | 
			
		
	
		
			
				
					|  |  |  |  |                     </template> | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="批次号" prop="batchNo" width="120"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="生产日期" prop="productionDate" width="120"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="入库数量" prop="inCount" width="120"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="出库数量" prop="outCount" width="120"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             </el-table> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             <el-pagination | 
			
		
	
		
			
				
					|  |  |  |  |                 :page-size="filterQuery.limit" | 
			
		
	
		
			
				
					|  |  |  |  |                 @current-change="handleCurrentChange" | 
			
		
	
		
			
				
					|  |  |  |  |                 layout="prev, pager, next" | 
			
		
	
		
			
				
					|  |  |  |  |                 :total="total" | 
			
		
	
		
			
				
					|  |  |  |  |             ></el-pagination> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-card> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="结余数量" prop="reCount" width="120"> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-card> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table v-loading="loading" :data="detailList" style="width: 100%"> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="序号" type="index"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="盘点单号" prop="orderIdFk" width="180"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="产品名称" prop="productName" width="180"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="批次号" prop="batchNo" width="180" | 
			
		
	
		
			
				
					|  |  |  |  |                                  show-overflow-tooltip></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="生产日期" prop="produceDate" width="120"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="盘点数量" prop="countNum" width="150"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="账面数量" prop="invNum" width="150"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="盘盈数量" prop="profitNum" width="150"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="盘亏数量" prop="lossNum" width="150"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="盈亏状态" prop="status" width="100"> | 
			
		
	
		
			
				
					|  |  |  |  |                     <template slot-scope="scope"> | 
			
		
	
		
			
				
					|  |  |  |  |                         {{ (scope.row.inCount - scope.row.outCount) }} | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-tag> | 
			
		
	
		
			
				
					|  |  |  |  |                             {{ countStatusMap[scope.row.status] }} | 
			
		
	
		
			
				
					|  |  |  |  |                         </el-tag> | 
			
		
	
		
			
				
					|  |  |  |  |                     </template> | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="生产厂家" prop="ylqxzcrbarmc" v-if="showSup" show-overflow-tooltip | 
			
		
	
		
			
				
					|  |  |  |  |                                  width="120"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="供应商" prop="companyName" v-if="showSup" show-overflow-tooltip | 
			
		
	
		
			
				
					|  |  |  |  |                                  width="120"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="仓库" prop="invStorageName" v-if="showSup" | 
			
		
	
		
			
				
					|  |  |  |  |                                  show-overflow-tooltip width="120"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="分库" prop="invSubStorageName" v-if="showSup" | 
			
		
	
		
			
				
					|  |  |  |  |                                  show-overflow-tooltip width="120"></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="操作" width="120" fixed="right"> | 
			
		
	
		
			
				
					|  |  |  |  |                     <template slot-scope="scope"> | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-button | 
			
		
	
	
		
			
				
					|  |  |  | @ -80,25 +116,32 @@ | 
			
		
	
		
			
				
					|  |  |  |  |                         >详情 | 
			
		
	
		
			
				
					|  |  |  |  |                         </el-button | 
			
		
	
		
			
				
					|  |  |  |  |                         > | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-button | 
			
		
	
		
			
				
					|  |  |  |  |                             type="text" | 
			
		
	
		
			
				
					|  |  |  |  |                             size="small" | 
			
		
	
		
			
				
					|  |  |  |  |                             @click.native.stop="deleteDialog(scope.row.id)" | 
			
		
	
		
			
				
					|  |  |  |  |                         >删除 | 
			
		
	
		
			
				
					|  |  |  |  |                         </el-button | 
			
		
	
		
			
				
					|  |  |  |  |                         > | 
			
		
	
		
			
				
					|  |  |  |  |                     </template> | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             </el-table> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             <el-pagination | 
			
		
	
		
			
				
					|  |  |  |  |                 :page-size="detailQuery.limit" | 
			
		
	
		
			
				
					|  |  |  |  |                 @current-change="handleCurrentDetailChange" | 
			
		
	
		
			
				
					|  |  |  |  |                 layout="prev, pager, next" | 
			
		
	
		
			
				
					|  |  |  |  |                 :total="detailTotal" | 
			
		
	
		
			
				
					|  |  |  |  |             ></el-pagination> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-card> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         <el-pagination | 
			
		
	
		
			
				
					|  |  |  |  |             :page-size="filterQuery.limit" | 
			
		
	
		
			
				
					|  |  |  |  |             @current-change="handleCurrentChange" | 
			
		
	
		
			
				
					|  |  |  |  |             layout="prev, pager, next" | 
			
		
	
		
			
				
					|  |  |  |  |             :total="total" | 
			
		
	
		
			
				
					|  |  |  |  |         ></el-pagination> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-dialog | 
			
		
	
		
			
				
					|  |  |  |  |             title="码详情" | 
			
		
	
		
			
				
					|  |  |  |  |             :visible.sync="codesVisible" | 
			
		
	
		
			
				
					|  |  |  |  |             width="70%" | 
			
		
	
		
			
				
					|  |  |  |  |             :close-on-click-modal="false" | 
			
		
	
		
			
				
					|  |  |  |  |             :close-on-press-escape="false" | 
			
		
	
		
			
				
					|  |  |  |  |             v-if="codesVisible" | 
			
		
	
		
			
				
					|  |  |  |  |             append-to-body | 
			
		
	
		
			
				
					|  |  |  |  |         > | 
			
		
	
		
			
				
					|  |  |  |  |             <countOrderCodes | 
			
		
	
		
			
				
					|  |  |  |  |                 :codeQuery="codeQuery" | 
			
		
	
		
			
				
					|  |  |  |  |             ></countOrderCodes> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-dialog> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     </div> | 
			
		
	
		
			
				
					|  |  |  |  | </template> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -108,7 +151,14 @@ import {filterUplLocInv} from "@/api/basic/invWarehouse"; | 
			
		
	
		
			
				
					|  |  |  |  | import {filterSubByInv} from "@/api/basic/invSubWarehouse"; | 
			
		
	
		
			
				
					|  |  |  |  | import {userInfo} from "@/api/auth/login"; | 
			
		
	
		
			
				
					|  |  |  |  | import {isBlank} from "@/utils/strUtil"; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | import { | 
			
		
	
		
			
				
					|  |  |  |  |     getCountOrderList, | 
			
		
	
		
			
				
					|  |  |  |  |     getCountOrderDetailList, | 
			
		
	
		
			
				
					|  |  |  |  |     deleteCountOrder, | 
			
		
	
		
			
				
					|  |  |  |  |     updateCountOrderStatus | 
			
		
	
		
			
				
					|  |  |  |  | } from "@/api/inventory/invCountOrder"; | 
			
		
	
		
			
				
					|  |  |  |  | import {getSpaceCodeList} from "@/api/inventory/invSpace"; | 
			
		
	
		
			
				
					|  |  |  |  | import countOrderCodes from "@/views/inventory/countOrderCodes"; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | export default { | 
			
		
	
		
			
				
					|  |  |  |  |     data() { | 
			
		
	
	
		
			
				
					|  |  |  | @ -116,17 +166,43 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |             filterQuery: { | 
			
		
	
		
			
				
					|  |  |  |  |                 invWarehouseCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |                 invStorageCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |                 invSpaceCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |                 status: 2, | 
			
		
	
		
			
				
					|  |  |  |  |                 page: 1, | 
			
		
	
		
			
				
					|  |  |  |  |                 limit: 20, | 
			
		
	
		
			
				
					|  |  |  |  |                 customerId: null, | 
			
		
	
		
			
				
					|  |  |  |  |             }, | 
			
		
	
		
			
				
					|  |  |  |  |             detailQuery: { | 
			
		
	
		
			
				
					|  |  |  |  |                 orderIdFk: null, | 
			
		
	
		
			
				
					|  |  |  |  |                 page: 1, | 
			
		
	
		
			
				
					|  |  |  |  |                 limit: 20 | 
			
		
	
		
			
				
					|  |  |  |  |             }, | 
			
		
	
		
			
				
					|  |  |  |  |             list: [], | 
			
		
	
		
			
				
					|  |  |  |  |             detailList: [], | 
			
		
	
		
			
				
					|  |  |  |  |             storageList: [], | 
			
		
	
		
			
				
					|  |  |  |  |             subInvList: [], | 
			
		
	
		
			
				
					|  |  |  |  |             spaceCodeList: [], | 
			
		
	
		
			
				
					|  |  |  |  |             codeDetailVisible: false, | 
			
		
	
		
			
				
					|  |  |  |  |             total: 0, | 
			
		
	
		
			
				
					|  |  |  |  |             detailTotal: 0, | 
			
		
	
		
			
				
					|  |  |  |  |             loading: true, | 
			
		
	
		
			
				
					|  |  |  |  |             invWarehouseDisabled: true, | 
			
		
	
		
			
				
					|  |  |  |  |             invSpaceDisabled: true, | 
			
		
	
		
			
				
					|  |  |  |  |             statusMap: { | 
			
		
	
		
			
				
					|  |  |  |  |                 0: "未提交", | 
			
		
	
		
			
				
					|  |  |  |  |                 1: "未审核", | 
			
		
	
		
			
				
					|  |  |  |  |                 2: "已审核" | 
			
		
	
		
			
				
					|  |  |  |  |             }, | 
			
		
	
		
			
				
					|  |  |  |  |             countStatusMap: { | 
			
		
	
		
			
				
					|  |  |  |  |                 0: '亏损', | 
			
		
	
		
			
				
					|  |  |  |  |                 1: '盈利' | 
			
		
	
		
			
				
					|  |  |  |  |             }, | 
			
		
	
		
			
				
					|  |  |  |  |             codeQuery: { | 
			
		
	
		
			
				
					|  |  |  |  |                 orderIdFk: null, | 
			
		
	
		
			
				
					|  |  |  |  |                 productId: null, | 
			
		
	
		
			
				
					|  |  |  |  |                 edit: false | 
			
		
	
		
			
				
					|  |  |  |  |             }, | 
			
		
	
		
			
				
					|  |  |  |  |             codesVisible: false | 
			
		
	
		
			
				
					|  |  |  |  |         }; | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     methods: { | 
			
		
	
	
		
			
				
					|  |  |  | @ -138,31 +214,78 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |                 customerId: null, | 
			
		
	
		
			
				
					|  |  |  |  |                 invWarehouseCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |                 invStorageCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |                 invSpaceCode: null, | 
			
		
	
		
			
				
					|  |  |  |  |                 status: 1, | 
			
		
	
		
			
				
					|  |  |  |  |                 page: 1, | 
			
		
	
		
			
				
					|  |  |  |  |                 limit: 20, | 
			
		
	
		
			
				
					|  |  |  |  |             }; | 
			
		
	
		
			
				
					|  |  |  |  |             this.onRestDetail(); | 
			
		
	
		
			
				
					|  |  |  |  |             this.invChange(); | 
			
		
	
		
			
				
					|  |  |  |  |             this.getList(); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         onRestDetail() { | 
			
		
	
		
			
				
					|  |  |  |  |             this.detailQuery = { | 
			
		
	
		
			
				
					|  |  |  |  |                 orderIdFk: null, | 
			
		
	
		
			
				
					|  |  |  |  |                 page: 1, | 
			
		
	
		
			
				
					|  |  |  |  |                 limit: 20 | 
			
		
	
		
			
				
					|  |  |  |  |             }; | 
			
		
	
		
			
				
					|  |  |  |  |             this.detailList = []; | 
			
		
	
		
			
				
					|  |  |  |  |             this.detailTotal = 0; | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         onSubmit() { | 
			
		
	
		
			
				
					|  |  |  |  |             this.loading = true; | 
			
		
	
		
			
				
					|  |  |  |  |             this.filterQuery.page = 1; | 
			
		
	
		
			
				
					|  |  |  |  |             this.getList(); | 
			
		
	
		
			
				
					|  |  |  |  |             this.onRestDetail(); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         handleCurrentChange(val) { | 
			
		
	
		
			
				
					|  |  |  |  |             this.filterQuery.page = val; | 
			
		
	
		
			
				
					|  |  |  |  |             this.getList(); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         handleCurrentDetailChange(val) { | 
			
		
	
		
			
				
					|  |  |  |  |             this.detailQuery.page = val; | 
			
		
	
		
			
				
					|  |  |  |  |             this.getCountOrderDetailList(); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         getList() { | 
			
		
	
		
			
				
					|  |  |  |  |             this.loading = true; | 
			
		
	
		
			
				
					|  |  |  |  |             this.filterQuery.customerId = store.getters.customerId; | 
			
		
	
		
			
				
					|  |  |  |  |             getCountOrderList(this.filterQuery).then((res) => { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |                 if (res.code === 20000) { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.list = res.data.list || []; | 
			
		
	
		
			
				
					|  |  |  |  |                     this.total = res.data.total || 0; | 
			
		
	
		
			
				
					|  |  |  |  |                 } else { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.list = []; | 
			
		
	
		
			
				
					|  |  |  |  |                     this.total = 0; | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |             }).catch((error) => { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |                 this.list = []; | 
			
		
	
		
			
				
					|  |  |  |  |                 this.total = 0; | 
			
		
	
		
			
				
					|  |  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         getCountOrderDetailList() { | 
			
		
	
		
			
				
					|  |  |  |  |             getCountOrderDetailList(this.detailQuery).then((res) => { | 
			
		
	
		
			
				
					|  |  |  |  |                 if (res.code === 20000) { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.detailList = res.data.list || []; | 
			
		
	
		
			
				
					|  |  |  |  |                     this.detailTotal = res.data.total || 0; | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |             }).catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         deleteOrders(data) { | 
			
		
	
		
			
				
					|  |  |  |  |             this.loading = true; | 
			
		
	
		
			
				
					|  |  |  |  |             let query = { | 
			
		
	
		
			
				
					|  |  |  |  |                 id: data, | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             deleteCountOrder(query).then((res) => { | 
			
		
	
		
			
				
					|  |  |  |  |                 if (res.code === 20000) { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.$message.success("删除成功"); | 
			
		
	
		
			
				
					|  |  |  |  |                     this.getList(); | 
			
		
	
		
			
				
					|  |  |  |  |                 } else { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.$message.error(res.message()); | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |             }) | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         deleteDialog(rowId) { | 
			
		
	
	
		
			
				
					|  |  |  | @ -186,11 +309,12 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |                 .catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         invChange() { | 
			
		
	
		
			
				
					|  |  |  |  |             this.filterQuery.invWarehouseCode = ""; | 
			
		
	
		
			
				
					|  |  |  |  |             this.filterQuery.invWarehouseCode = null; | 
			
		
	
		
			
				
					|  |  |  |  |             this.filterQuery.invSpaceCode = null; | 
			
		
	
		
			
				
					|  |  |  |  |             this.subInvList = []; | 
			
		
	
		
			
				
					|  |  |  |  |             if (this.filterQuery.invStorageCode != null && this.filterQuery.invStorageCode != "") { | 
			
		
	
		
			
				
					|  |  |  |  |             this.spaceCodeList = []; | 
			
		
	
		
			
				
					|  |  |  |  |             if (!isBlank(this.filterQuery.invStorageCode)) { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.invWarehouseDisabled = false; | 
			
		
	
		
			
				
					|  |  |  |  |                 let query = { | 
			
		
	
		
			
				
					|  |  |  |  |                     pcode: this.filterQuery.invStorageCode | 
			
		
	
	
		
			
				
					|  |  |  | @ -205,27 +329,86 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.invWarehouseDisabled = true; | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         invWarehouseChange() { | 
			
		
	
		
			
				
					|  |  |  |  |             this.invSpaceDisabled = false; | 
			
		
	
		
			
				
					|  |  |  |  |             this.filterQuery.invSpaceCode = null; | 
			
		
	
		
			
				
					|  |  |  |  |             if (!isBlank(this.filterQuery.invWarehouseCode) && !isBlank(this.filterQuery.invStorageCode)) { | 
			
		
	
		
			
				
					|  |  |  |  |                 //查询货位列表 | 
			
		
	
		
			
				
					|  |  |  |  |                 let params = { | 
			
		
	
		
			
				
					|  |  |  |  |                     invStorageCode: this.filterQuery.invStorageCode, | 
			
		
	
		
			
				
					|  |  |  |  |                     invWarehouseCode: this.filterQuery.invWarehouseCode | 
			
		
	
		
			
				
					|  |  |  |  |                 }; | 
			
		
	
		
			
				
					|  |  |  |  |                 getSpaceCodeList(params).then((res) => { | 
			
		
	
		
			
				
					|  |  |  |  |                     if (res.code === 20000) { | 
			
		
	
		
			
				
					|  |  |  |  |                         this.spaceCodeList = res.data || []; | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |                 }) | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         handleChange(row) { | 
			
		
	
		
			
				
					|  |  |  |  |             this.detailQuery.orderIdFk = row.orderId; | 
			
		
	
		
			
				
					|  |  |  |  |             this.detailQuery.page = 1; | 
			
		
	
		
			
				
					|  |  |  |  |             this.getCountOrderDetailList(); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         intentDetail(row) { | 
			
		
	
		
			
				
					|  |  |  |  |             this.codeQuery = { | 
			
		
	
		
			
				
					|  |  |  |  |                 orderIdFk: row.orderIdFk, | 
			
		
	
		
			
				
					|  |  |  |  |                 productId: row.productId, | 
			
		
	
		
			
				
					|  |  |  |  |                 edit: false | 
			
		
	
		
			
				
					|  |  |  |  |             }; | 
			
		
	
		
			
				
					|  |  |  |  |             this.codesVisible = true; | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         auditCountOrder(row) { | 
			
		
	
		
			
				
					|  |  |  |  |             let params = { | 
			
		
	
		
			
				
					|  |  |  |  |                 id: row.id, | 
			
		
	
		
			
				
					|  |  |  |  |                 status: null | 
			
		
	
		
			
				
					|  |  |  |  |             }; | 
			
		
	
		
			
				
					|  |  |  |  |             this.$confirm('请选择审核意见', '提示', { | 
			
		
	
		
			
				
					|  |  |  |  |                 confirmButtonText: '通过', | 
			
		
	
		
			
				
					|  |  |  |  |                 cancelButtonText: '驳回', | 
			
		
	
		
			
				
					|  |  |  |  |                 type: 'warning', | 
			
		
	
		
			
				
					|  |  |  |  |                 center: true | 
			
		
	
		
			
				
					|  |  |  |  |             }).then(() => { | 
			
		
	
		
			
				
					|  |  |  |  |                 params.status = 2; //审核通过 | 
			
		
	
		
			
				
					|  |  |  |  |                 updateCountOrderStatus(params).then((res) => { | 
			
		
	
		
			
				
					|  |  |  |  |                     if (res.code === 20000) { | 
			
		
	
		
			
				
					|  |  |  |  |                         this.$message.success("审核通过"); | 
			
		
	
		
			
				
					|  |  |  |  |                         this.getList(); | 
			
		
	
		
			
				
					|  |  |  |  |                         this.onRestDetail(); | 
			
		
	
		
			
				
					|  |  |  |  |                     } else { | 
			
		
	
		
			
				
					|  |  |  |  |                         this.$message.error(res.data.message); | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |                 }).catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |  |             }).catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |                 params.status = 0; //驳回到上一个状态 | 
			
		
	
		
			
				
					|  |  |  |  |                 updateCountOrderStatus(params).then((res) => { | 
			
		
	
		
			
				
					|  |  |  |  |                     if (res.code === 20000) { | 
			
		
	
		
			
				
					|  |  |  |  |                         this.$message.success("审核通过"); | 
			
		
	
		
			
				
					|  |  |  |  |                         this.$message.success("已驳回"); | 
			
		
	
		
			
				
					|  |  |  |  |                         this.getList(); | 
			
		
	
		
			
				
					|  |  |  |  |                         this.onRestDetail(); | 
			
		
	
		
			
				
					|  |  |  |  |                     } else { | 
			
		
	
		
			
				
					|  |  |  |  |                         this.$message.error(res.data.message); | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |                 }).catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     mounted() { | 
			
		
	
		
			
				
					|  |  |  |  |         document.body.ondrop = function (event) { | 
			
		
	
		
			
				
					|  |  |  |  |             event.preventDefault(); | 
			
		
	
		
			
				
					|  |  |  |  |             event.stopPropagation(); | 
			
		
	
		
			
				
					|  |  |  |  |         }; | 
			
		
	
		
			
				
					|  |  |  |  |     components: { | 
			
		
	
		
			
				
					|  |  |  |  |         countOrderCodes | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     created() { | 
			
		
	
		
			
				
					|  |  |  |  |         this.getStorage(); | 
			
		
	
		
			
				
					|  |  |  |  |         this.findMethod(); | 
			
		
	
		
			
				
					|  |  |  |  |         let query = this.$route.query; | 
			
		
	
		
			
				
					|  |  |  |  |         this.filterQuery = Object.assign(this.filterQuery, query); | 
			
		
	
		
			
				
					|  |  |  |  |         this.filterQuery.limit = parseInt(this.filterQuery.limit); | 
			
		
	
		
			
				
					|  |  |  |  |         // 加载表格数据 | 
			
		
	
		
			
				
					|  |  |  |  |         //获取用户默认仓库信息 | 
			
		
	
		
			
				
					|  |  |  |  |         userInfo().then((res) => { | 
			
		
	
		
			
				
					|  |  |  |  |             if (res.code === 20000) { | 
			
		
	
		
			
				
					|  |  |  |  |                 if (!isBlank(res.data.locInvCode)) { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.filterQuery.invStorageCode = res.data.locInvCode; | 
			
		
	
		
			
				
					|  |  |  |  |                     this.invChange(); | 
			
		
	
		
			
				
					|  |  |  |  |                     this.filterQuery.invWarehouseCode = res.data.locSubInvCode; | 
			
		
	
		
			
				
					|  |  |  |  |                     this.invChange(); | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |                 this.getList(); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
	
		
			
				
					|  |  |  | 
 |