|  |  |  | @ -168,7 +168,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-button | 
			
		
	
		
			
				
					|  |  |  |  |                             type="text" | 
			
		
	
		
			
				
					|  |  |  |  |                             size="small" :disabled="!configParms.basicInv" | 
			
		
	
		
			
				
					|  |  |  |  |                             @click.native.stop="addBussinessType(scope.row)" | 
			
		
	
		
			
				
					|  |  |  |  |                             @click.native.stop="selsectBussinessType(scope.row)" | 
			
		
	
		
			
				
					|  |  |  |  |                         >管理单据类型 | 
			
		
	
		
			
				
					|  |  |  |  |                         </el-button | 
			
		
	
		
			
				
					|  |  |  |  |                         > | 
			
		
	
	
		
			
				
					|  |  |  | @ -346,6 +346,53 @@ | 
			
		
	
		
			
				
					|  |  |  |  |             </div> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         </el-dialog> | 
			
		
	
		
			
				
					|  |  |  |  |          | 
			
		
	
		
			
				
					|  |  |  |  |         <!--添加单据类型弹窗----> | 
			
		
	
		
			
				
					|  |  |  |  |  <!--添加单据类型弹窗--> | 
			
		
	
		
			
				
					|  |  |  |  |  <el-dialog | 
			
		
	
		
			
				
					|  |  |  |  |             title="仓库关联单据类型" | 
			
		
	
		
			
				
					|  |  |  |  |             :close-on-click-modal="false" | 
			
		
	
		
			
				
					|  |  |  |  |             :close-on-press-escape="false" | 
			
		
	
		
			
				
					|  |  |  |  |             :visible.sync="userBussinessTypeFormVisible" | 
			
		
	
		
			
				
					|  |  |  |  |         > | 
			
		
	
		
			
				
					|  |  |  |  |         <el-row type="flex" justify="end"> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px"> | 
			
		
	
		
			
				
					|  |  |  |  |                     <el-button | 
			
		
	
		
			
				
					|  |  |  |  |                         type="primary" | 
			
		
	
		
			
				
					|  |  |  |  |                         @click.native="addBussinessType()" | 
			
		
	
		
			
				
					|  |  |  |  |                         :loading="loading" | 
			
		
	
		
			
				
					|  |  |  |  |                     >选入 | 
			
		
	
		
			
				
					|  |  |  |  |                     </el-button | 
			
		
	
		
			
				
					|  |  |  |  |                     > | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-button-group> | 
			
		
	
		
			
				
					|  |  |  |  |             </el-row> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-table v-loading="loading" :data="userBussinessTypeList" ref="typeList" | 
			
		
	
		
			
				
					|  |  |  |  |                       style="width: 100%"> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="单据类型编码" prop="action" fixed></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="单据类型名称" prop="name" fixed></el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-table-column label="操作" fixed="right"> | 
			
		
	
		
			
				
					|  |  |  |  |                     <template slot-scope="scope"> | 
			
		
	
		
			
				
					|  |  |  |  |                         <el-button | 
			
		
	
		
			
				
					|  |  |  |  |                             type="text" | 
			
		
	
		
			
				
					|  |  |  |  |                             size="small" | 
			
		
	
		
			
				
					|  |  |  |  |                             :disabled="!configParms.basicInv" | 
			
		
	
		
			
				
					|  |  |  |  |                             @click.native.stop="delWarehouseBussinessType(scope.row.id)" | 
			
		
	
		
			
				
					|  |  |  |  |                         >移除 | 
			
		
	
		
			
				
					|  |  |  |  |                         </el-button | 
			
		
	
		
			
				
					|  |  |  |  |                         > | 
			
		
	
		
			
				
					|  |  |  |  |                     </template> | 
			
		
	
		
			
				
					|  |  |  |  |                   | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |             </el-table> | 
			
		
	
		
			
				
					|  |  |  |  |             <div slot="footer" class="dialog-footer"> | 
			
		
	
		
			
				
					|  |  |  |  |                 <el-button @click.native="userBussinessTypeFormVisible = !userBussinessTypeFormVisible" | 
			
		
	
		
			
				
					|  |  |  |  |                 >取消 | 
			
		
	
		
			
				
					|  |  |  |  |                 </el-button | 
			
		
	
		
			
				
					|  |  |  |  |                 > | 
			
		
	
		
			
				
					|  |  |  |  |             </div> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         </el-dialog> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         <!--表单界面--> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-dialog | 
			
		
	
		
			
				
					|  |  |  |  |             :title="formMap[formName]" | 
			
		
	
	
		
			
				
					|  |  |  | @ -727,7 +774,7 @@ import { | 
			
		
	
		
			
				
					|  |  |  |  |     warehouseUserList, saveWarehouseBussinessType, | 
			
		
	
		
			
				
					|  |  |  |  |     saveWarehouseUser, updateDirector, disableWarehouse, | 
			
		
	
		
			
				
					|  |  |  |  |     deleteWarehouseBussinessType, | 
			
		
	
		
			
				
					|  |  |  |  |     bindThrWarehouse, unbindThrWarehouse, filterThridSubByInv, getThrsysDetail | 
			
		
	
		
			
				
					|  |  |  |  |     bindThrWarehouse, unbindThrWarehouse, filterThridSubByInv, getThrsysDetail,delWarehouseBussinessType | 
			
		
	
		
			
				
					|  |  |  |  | } from "../../api/basic/invWarehouse"; | 
			
		
	
		
			
				
					|  |  |  |  | import { | 
			
		
	
		
			
				
					|  |  |  |  |     filterSubAll, saveSubWarehouse, deleteSubWarehouse, | 
			
		
	
	
		
			
				
					|  |  |  | @ -831,6 +878,8 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |             currentSubId: null, | 
			
		
	
		
			
				
					|  |  |  |  |             thrWareHouseVisible: false, | 
			
		
	
		
			
				
					|  |  |  |  |             thrSubWareHouseVisible: false, | 
			
		
	
		
			
				
					|  |  |  |  |             userBussinessTypeList:[], | 
			
		
	
		
			
				
					|  |  |  |  |             userBussinessTypeFormVisible:false, | 
			
		
	
		
			
				
					|  |  |  |  |             sysList: [], | 
			
		
	
		
			
				
					|  |  |  |  |             sysSubList: [], | 
			
		
	
		
			
				
					|  |  |  |  |             checkThrWarehouseRow: null, | 
			
		
	
	
		
			
				
					|  |  |  | @ -877,7 +926,8 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |             bussinessTypeQuery: { | 
			
		
	
		
			
				
					|  |  |  |  |                 enabled: true, | 
			
		
	
		
			
				
					|  |  |  |  |                 page: 1, | 
			
		
	
		
			
				
					|  |  |  |  |                 limit: 10 | 
			
		
	
		
			
				
					|  |  |  |  |                 limit: 10, | 
			
		
	
		
			
				
					|  |  |  |  |                 ids:"" | 
			
		
	
		
			
				
					|  |  |  |  |             }, | 
			
		
	
		
			
				
					|  |  |  |  |             bussinessTypeTotal: 0, | 
			
		
	
		
			
				
					|  |  |  |  |             curSeleUser: null, | 
			
		
	
	
		
			
				
					|  |  |  | @ -1355,10 +1405,15 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |                 }) | 
			
		
	
		
			
				
					|  |  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         getBussinessType(val) { | 
			
		
	
		
			
				
					|  |  |  |  |         getBussinessType(val,obj) { | 
			
		
	
		
			
				
					|  |  |  |  |             if (val != null) { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.bussinessTypeQuery.page = val; | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             if(obj!=undefined){ | 
			
		
	
		
			
				
					|  |  |  |  |                 var action=obj.toString(); | 
			
		
	
		
			
				
					|  |  |  |  |                 this.bussinessTypeQuery.ids=action; | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             | 
			
		
	
		
			
				
					|  |  |  |  |             this.bussinessTypeQuery.code=this.busQuery.code; | 
			
		
	
		
			
				
					|  |  |  |  |             getJoinBussinessType(this.bussinessTypeQuery).then((res) => { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.selectBussinessTypeList = []; | 
			
		
	
	
		
			
				
					|  |  |  | @ -1435,20 +1490,42 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         // addBussinessType(row) { | 
			
		
	
		
			
				
					|  |  |  |  |         //     this.currentCode = row.code; | 
			
		
	
		
			
				
					|  |  |  |  |         //     this.currentRow = row; | 
			
		
	
		
			
				
					|  |  |  |  |         //     this.loadLinkData(row); | 
			
		
	
		
			
				
					|  |  |  |  |         //     if (this.currentCode == null || this.currentCode == '') { | 
			
		
	
		
			
				
					|  |  |  |  |         //         this.$message.error('请先选择仓库'); | 
			
		
	
		
			
				
					|  |  |  |  |         //     } else if (this.currentCode != row.code) { | 
			
		
	
		
			
				
					|  |  |  |  |         //         this.$message.error("请先选择当前分库!") | 
			
		
	
		
			
				
					|  |  |  |  |         //     } else { | 
			
		
	
		
			
				
					|  |  |  |  |         //         this.bussinessTypeFormVisible = true; | 
			
		
	
		
			
				
					|  |  |  |  |         //         this.bussinessTypeQuery.page = 1; | 
			
		
	
		
			
				
					|  |  |  |  |         //         this.getBussinessType(); | 
			
		
	
		
			
				
					|  |  |  |  |         //     } | 
			
		
	
		
			
				
					|  |  |  |  |         // }, | 
			
		
	
		
			
				
					|  |  |  |  |         addBussinessType(row) { | 
			
		
	
		
			
				
					|  |  |  |  |             this.currentCode = row.code; | 
			
		
	
		
			
				
					|  |  |  |  |             this.currentRow = row; | 
			
		
	
		
			
				
					|  |  |  |  |             this.loadLinkData(row); | 
			
		
	
		
			
				
					|  |  |  |  |             if (this.currentCode == null || this.currentCode == '') { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.$message.error('请先选择仓库'); | 
			
		
	
		
			
				
					|  |  |  |  |             } else if (this.currentCode != row.code) { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.$message.error("请先选择当前分库!") | 
			
		
	
		
			
				
					|  |  |  |  |             } else { | 
			
		
	
		
			
				
					|  |  |  |  |             var action=[]; | 
			
		
	
		
			
				
					|  |  |  |  |                 for(var i=0;i<this.userBussinessTypeList.length;i++){ | 
			
		
	
		
			
				
					|  |  |  |  |                     action.push(this.userBussinessTypeList[i].action); | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |                 this.bussinessTypeFormVisible = true; | 
			
		
	
		
			
				
					|  |  |  |  |                 this.bussinessTypeQuery.page = 1; | 
			
		
	
		
			
				
					|  |  |  |  |                 this.getBussinessType(); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |                 this.getBussinessType(1,action); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         selsectBussinessType(row){ | 
			
		
	
		
			
				
					|  |  |  |  |           var busQuery = { | 
			
		
	
		
			
				
					|  |  |  |  |                       code: this.currentCode, | 
			
		
	
		
			
				
					|  |  |  |  |                       page: 1, | 
			
		
	
		
			
				
					|  |  |  |  |                       limit: 10000 | 
			
		
	
		
			
				
					|  |  |  |  |                   } | 
			
		
	
		
			
				
					|  |  |  |  |           warehouseBussinessTypeList(busQuery).then((res) => { | 
			
		
	
		
			
				
					|  |  |  |  |                   this.userBussinessTypeList = res.data.list; | 
			
		
	
		
			
				
					|  |  |  |  |               }).catch((error) => { | 
			
		
	
		
			
				
					|  |  |  |  |                   this.$message.error("单据类型数据加载失败") | 
			
		
	
		
			
				
					|  |  |  |  |               }); | 
			
		
	
		
			
				
					|  |  |  |  |           this.userBussinessTypeFormVisible = true; | 
			
		
	
		
			
				
					|  |  |  |  |       }, | 
			
		
	
		
			
				
					|  |  |  |  |         addBussinessTypeData() { | 
			
		
	
		
			
				
					|  |  |  |  |             // if (this.selectBussinessTypeList.length == 0) { | 
			
		
	
		
			
				
					|  |  |  |  |             //     this.$message.error("请选择单据类型") | 
			
		
	
	
		
			
				
					|  |  |  | @ -1475,6 +1552,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |                         this.bussinessTypeData = []; | 
			
		
	
		
			
				
					|  |  |  |  |                         this.busTotal = 0; | 
			
		
	
		
			
				
					|  |  |  |  |                     }); | 
			
		
	
		
			
				
					|  |  |  |  |                     this.selectWhouseBussinessType(); | 
			
		
	
		
			
				
					|  |  |  |  |                 } else { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.$message.error(res.message); | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
	
		
			
				
					|  |  |  | @ -1484,6 +1562,17 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |  |             // } | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         selectWhouseBussinessType(){ | 
			
		
	
		
			
				
					|  |  |  |  |             var busQuery = { | 
			
		
	
		
			
				
					|  |  |  |  |                         code: this.currentCode, | 
			
		
	
		
			
				
					|  |  |  |  |                         page: 1, | 
			
		
	
		
			
				
					|  |  |  |  |                         limit: 100000 | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |                     warehouseBussinessTypeList(busQuery).then((res) => { | 
			
		
	
		
			
				
					|  |  |  |  |                         this.userBussinessTypeList = res.data.list || []; | 
			
		
	
		
			
				
					|  |  |  |  |                     }).catch((error) => { | 
			
		
	
		
			
				
					|  |  |  |  |                     }); | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |         updateDirector(row) { | 
			
		
	
		
			
				
					|  |  |  |  |             row.director = !row.director; | 
			
		
	
		
			
				
					|  |  |  |  |             updateDirector(row).then((res) => { | 
			
		
	
	
		
			
				
					|  |  |  | @ -1506,20 +1595,55 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |             this.curSeleUser = row; | 
			
		
	
		
			
				
					|  |  |  |  |             this.relBusUserVisile = true; | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  |        //删除仓库关联单据 | 
			
		
	
		
			
				
					|  |  |  |  |        handleUserSubDel(row){ | 
			
		
	
		
			
				
					|  |  |  |  |             if (row.id) { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.$confirm("确认移除单据吗?", "提示", { | 
			
		
	
		
			
				
					|  |  |  |  |                     type: "warning", | 
			
		
	
		
			
				
					|  |  |  |  |                 }) | 
			
		
	
		
			
				
					|  |  |  |  |                     .then(() => { | 
			
		
	
		
			
				
					|  |  |  |  |                         this.deleteLoading = true; | 
			
		
	
		
			
				
					|  |  |  |  |                         let para = {id: row.id}; | 
			
		
	
		
			
				
					|  |  |  |  |                         deleteSubWarehouse(para) | 
			
		
	
		
			
				
					|  |  |  |  |                             .then((response) => { | 
			
		
	
		
			
				
					|  |  |  |  |                                 this.deleteLoading = false; | 
			
		
	
		
			
				
					|  |  |  |  |                                 if (response.code !== 20000) { | 
			
		
	
		
			
				
					|  |  |  |  |                                     this.$message.error(response.message); | 
			
		
	
		
			
				
					|  |  |  |  |                                     return false; | 
			
		
	
		
			
				
					|  |  |  |  |                                 } | 
			
		
	
		
			
				
					|  |  |  |  |                                 this.$message.success("删除成功"); | 
			
		
	
		
			
				
					|  |  |  |  |                                 this.loadSubData(row.parentId); | 
			
		
	
		
			
				
					|  |  |  |  |                             }) | 
			
		
	
		
			
				
					|  |  |  |  |                             .catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |                                 this.deleteLoading = false; | 
			
		
	
		
			
				
					|  |  |  |  |                             }); | 
			
		
	
		
			
				
					|  |  |  |  |                     }) | 
			
		
	
		
			
				
					|  |  |  |  |                     .catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |                         this.$message.info("取消删除"); | 
			
		
	
		
			
				
					|  |  |  |  |                     }); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |         }, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         delWarehouseBussinessType(id) { | 
			
		
	
		
			
				
					|  |  |  |  |             let params = {id: id}; | 
			
		
	
		
			
				
					|  |  |  |  |             deleteWarehouseBussinessType(params).then((res) => { | 
			
		
	
		
			
				
					|  |  |  |  |                 if (res.code == 20000) { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.$message.success("已移除"); | 
			
		
	
		
			
				
					|  |  |  |  |                     for (let i = 0; i < this.bussinessTypeData.length; i++) { | 
			
		
	
		
			
				
					|  |  |  |  |                         if (this.bussinessTypeData[i].id == id) { | 
			
		
	
		
			
				
					|  |  |  |  |                             this.bussinessTypeData.splice(i, 1); | 
			
		
	
		
			
				
					|  |  |  |  |                             return; | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |                     this.bussinessTypeData = []; | 
			
		
	
		
			
				
					|  |  |  |  |                     this.selectWhouseBussinessType(); | 
			
		
	
		
			
				
					|  |  |  |  |               var busQuerys = { | 
			
		
	
		
			
				
					|  |  |  |  |                         code: this.currentCode, | 
			
		
	
		
			
				
					|  |  |  |  |                         page: 1, | 
			
		
	
		
			
				
					|  |  |  |  |                         limit: 10 | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |             warehouseBussinessTypeList(busQuerys).then((res) => { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.bussinessTypeData = res.data.list; | 
			
		
	
		
			
				
					|  |  |  |  |                 }).catch((error) => { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.$message.error("单据类型数据加载失败") | 
			
		
	
		
			
				
					|  |  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 } else { | 
			
		
	
		
			
				
					|  |  |  |  |                     this.$message.error("移除失败"); | 
			
		
	
		
			
				
					|  |  |  |  |                     this.$message.error(res.message); | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |             }).catch((error) => { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.$message.error("移除失败"); | 
			
		
	
	
		
			
				
					|  |  |  | 
 |