Merge remote-tracking branch 'origin/master'
						commit
						23c7cd4afd
					
				| @ -0,0 +1,56 @@ | ||||
| import axios from "@/utils/request"; | ||||
| 
 | ||||
| 
 | ||||
| export function filterRlCompany(query) { | ||||
|   return axios( | ||||
|     { | ||||
|       url: "/udi/basic/rel/filter", | ||||
|       method: "get", | ||||
|       params: query | ||||
|     } | ||||
|   ) | ||||
| } | ||||
| 
 | ||||
| export function filterByUuid(query) { | ||||
|   return axios( | ||||
|     { | ||||
|       url: "/udiwms/udiinfo/local/filterByUuid", | ||||
|       method: "get", | ||||
|       params: query | ||||
|     } | ||||
|   ) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| export function seachCompany(query) { | ||||
|   return axios( | ||||
|     { | ||||
|       url: "/udi/auth/user/comapny/search", | ||||
|       method: "get", | ||||
|       params: query | ||||
|     } | ||||
|   ) | ||||
| } | ||||
| 
 | ||||
| export function deleteRel(query) { | ||||
|   return axios({ | ||||
|     url: "/udi/basic/rel/delete", | ||||
|     method: "post", | ||||
|     data: query | ||||
|   }); | ||||
| } | ||||
| 
 | ||||
| export function batchCombine(query) { | ||||
|   return axios({ | ||||
|     url: "/udi/basic/rel/batch/save", | ||||
|     method: "post", | ||||
|     data: query | ||||
|   }); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @ -0,0 +1,424 @@ | ||||
| <template> | ||||
|   <div> | ||||
|     <el-card> | ||||
|       <el-form :model="filterQuery" label-width="120px" v-show="showSearch"> | ||||
|         <el-row> | ||||
|           <el-col :span="6"> | ||||
|             <el-form-item label="注册企业:"> | ||||
|               <el-select | ||||
|                 v-model="filterQuery.companyIdFk" | ||||
|                 style="width: 90%" | ||||
|                 filterable | ||||
|                 remote | ||||
|                 clearable="true" | ||||
|                 reserve-keyword | ||||
|                 placeholder="请选择注册企业" | ||||
|                 :remote-method="findMethod" | ||||
|                 :loading="loading" | ||||
|               > | ||||
|                 <el-option | ||||
|                   v-for="item in fromOptions" | ||||
|                   :key="item.companyName" | ||||
|                   :label="item.companyName" | ||||
|                   :value="item.id" | ||||
|                 > | ||||
|                   <span style="float: left">{{ item.companyName }}</span> | ||||
|                 </el-option> | ||||
|               </el-select> | ||||
|             </el-form-item> | ||||
|           </el-col> | ||||
|           <el-col :span="6"> | ||||
|             <el-form-item label="产品编码:"> | ||||
|               <el-input v-model="filterQuery.unionCode" style="width: 90%" placeholder="请输入DI/医保编码/商品条码" | ||||
|                         clearable="true"></el-input> | ||||
|             </el-form-item> | ||||
|           </el-col> | ||||
|           <el-col :span="6"> | ||||
|             <el-form-item label="产品名称:"> | ||||
|               <el-input v-model="filterQuery.cpmctymc" style="width: 90%" placeholder="请输入物资名称" | ||||
|                         clearable="true"></el-input> | ||||
|             </el-form-item> | ||||
|           </el-col> | ||||
|           <el-col :span="6"> | ||||
|             <el-form-item label="规格型号:"> | ||||
|               <el-input v-model="filterQuery.ggxh" style="width: 90%" placeholder="请输入规格型号" clearable="true"></el-input> | ||||
|             </el-form-item> | ||||
|           </el-col> | ||||
|         </el-row> | ||||
| 
 | ||||
|         <el-row> | ||||
|           <el-col :span="6"> | ||||
|             <el-form-item label="注册备案号:"> | ||||
|               <el-input v-model="filterQuery.zczbhhzbapzbh" style="width: 90%" placeholder="请输入注册备案号" | ||||
|                         clearable="true"></el-input> | ||||
|             </el-form-item> | ||||
|           </el-col> | ||||
|           <el-col :span="6"> | ||||
|             <el-form-item label="生产企业:"> | ||||
|               <el-input v-model="filterQuery.ylqxzcrbarmc" style="width: 90%" placeholder="请输入生产企业/注册备案人" | ||||
|                         clearable="true"></el-input> | ||||
|             </el-form-item> | ||||
|           </el-col> | ||||
|         </el-row> | ||||
|       </el-form> | ||||
|       <div class="top-right-btn"> | ||||
|         <el-button-group style="display:flex;"> | ||||
|           <el-button icon="el-icon-view" type="primary" @click="hideSearch">显示/隐藏搜索栏</el-button> | ||||
|           <el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button> | ||||
|           <el-button type="primary" icon="el-icon-search" @click="search">查询</el-button> | ||||
|           <el-button type="primary" icon="el-icon-bottom-right" @click="selectProduct()">选入产品</el-button> | ||||
|         </el-button-group> | ||||
|       </div> | ||||
|       <el-divider style="margin: 15px"></el-divider> | ||||
| 
 | ||||
|       <el-table v-loading="loading" :data="list" key="1" style="width: 100%" | ||||
|                 border> | ||||
|         <el-table-column label="序号" type="index"></el-table-column> | ||||
|         <el-table-column label="注册企业" prop="companyName" show-overflow-tooltip></el-table-column> | ||||
|         <el-table-column label="企业类型" prop="companyName" show-overflow-tooltip> | ||||
| 
 | ||||
|           <template slot-scope="scope"> | ||||
|             <span>{{ companyTypeMap[scope.row.companyType] }}</span> | ||||
|           </template> | ||||
| 
 | ||||
|         </el-table-column> | ||||
|         <el-table-column label="最小销售产品标识" prop="nameCode" show-overflow-tooltip></el-table-column> | ||||
|         <el-table-column label="产品名称" prop="cpmctymc" show-overflow-tooltip></el-table-column> | ||||
|         <el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column> | ||||
|         <el-table-column label="生产企业" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column> | ||||
|         <el-table-column label="注册/备案号" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column> | ||||
|         <el-table-column width="120" label="操作"> | ||||
|           <template slot-scope="scope"> | ||||
|             <el-button type="text" @click.native.stop="handleModifyClick(scope.row)">详情</el-button> | ||||
|             <el-button type="text" @click.native.stop="deleteDialog(scope.row)">删除</el-button> | ||||
|           </template> | ||||
|         </el-table-column> | ||||
|       </el-table> | ||||
| 
 | ||||
|       <el-dialog | ||||
|         title="产品信息详情" | ||||
|         :visible.sync="editDialogVisible" | ||||
|         :close-on-click-modal="false" | ||||
|         :close-on-press-escape="false" | ||||
|         width="60%" | ||||
|         v-if="editDialogVisible" | ||||
|       > | ||||
|         <selectDetail | ||||
|           :detailQuery="detailQuery" | ||||
|           :checked="checked" | ||||
|           @closeUdi="closeUdi" | ||||
|         > | ||||
|         </selectDetail> | ||||
|       </el-dialog> | ||||
| 
 | ||||
|       <el-dialog | ||||
|         title="选入医疗器械信息" | ||||
|         :visible.sync="selectProductVisible" | ||||
|         width="85%" | ||||
|         :close-on-click-modal="false" | ||||
|         :close-on-press-escape="false" | ||||
|         v-if="selectProductVisible" | ||||
|       > | ||||
|         <selectLocalUdi | ||||
|           :closeDialog="closeDialog" | ||||
|           :companyId="filterQuery.companyIdFk" | ||||
|         ></selectLocalUdi> | ||||
|       </el-dialog> | ||||
| 
 | ||||
|       <pagination | ||||
|         v-show="total>0" | ||||
|         :total="total" | ||||
|         :limit.sync="filterQuery.limit" | ||||
|         :page.sync="filterQuery.page" | ||||
|         @pagination="handleCurrentChange" | ||||
|       ></pagination> | ||||
| 
 | ||||
|     </el-card> | ||||
|   </div> | ||||
| </template> | ||||
| 
 | ||||
| <script> | ||||
| import selectProduct from "./basicCompanyProductsImport"; | ||||
| import selectUdi from "./udiInfoRelevance.vue"; | ||||
| import selectErp from "./udiInfoselectErpUdi"; | ||||
| import selectLocalUdi from "./UdiInfoSelectLocalUdi"; | ||||
| import selectDetail from "./udilnfoManageSpDetail"; | ||||
| import {filterRlCompany, seachCompany, deleteRel} from "../../../api/basic/udiRlCompany"; | ||||
| 
 | ||||
| export default { | ||||
|   data() { | ||||
|     return { | ||||
|       showSearch: true, | ||||
|       filterQuery: { | ||||
|         unionCode: null, | ||||
|         udiCode: null, | ||||
|         ylqxzcrbarmc: "", | ||||
|         cpmctymc: "", | ||||
|         nameCode: "", | ||||
|         ggxh: null, | ||||
|         page: 1, | ||||
|         limit: 20, | ||||
|         addType: 1, | ||||
|         thrPiId: null, | ||||
|         filterType: null, | ||||
|         companyName: null, | ||||
|         companyIdFk: null, | ||||
|       }, | ||||
|       fromOptions: [], | ||||
|       editQuery: null, | ||||
|       detailQuery: null, | ||||
|       defaultSys: null, | ||||
|       isImport: false, | ||||
|       isImportUdi: false, | ||||
|       isUploadSmp: false, | ||||
|       isSpCombine: false, | ||||
|       isImportFile: false, | ||||
|       uploadFileUrl: null, | ||||
|       checked: false, | ||||
|       list: [], | ||||
|       detailList: [], | ||||
|       sysList: [], | ||||
|       filterList: [], | ||||
|       total: 0, | ||||
|       thirdNo: "", | ||||
|       uuid: "111", | ||||
|       originUuid: null, | ||||
|       thirdId: null, | ||||
|       relId: "", | ||||
|       thisData: { | ||||
|         nameCode: null, | ||||
|         cpmctymc: null, | ||||
|         ggxh: null | ||||
|       }, | ||||
|       selectProductVisible: false, | ||||
|       multipleSelection: [], | ||||
|       editDialogVisible: false,       //详情 | ||||
|       selectUdiDialogVisible: false,  //关联选入 | ||||
|       selectErpDialogVisible: false,  //选入ERP产品 | ||||
|       selectLocalVisible: false,      //关联UDI | ||||
|       selectVersionVisible: false, | ||||
|       isUseDyCheck: false, | ||||
|       loading: false, | ||||
|       activeNames: ['1'], | ||||
|       companyTypeMap: { | ||||
|         1: "生产企业", | ||||
|         2: "代理商", | ||||
|         3: "购买方", | ||||
|       }, | ||||
|     }; | ||||
|   }, | ||||
| 
 | ||||
|   methods: { | ||||
|     onReset() { | ||||
|       this.$router.push({ | ||||
|         path: "", | ||||
|       }); | ||||
|       this.filterQuery = { | ||||
|         lockStatus: null, | ||||
|         unionCode: null, | ||||
|         udiCode: null, | ||||
|         ylqxzcrbarmc: "", | ||||
|         cpmctymc: "", | ||||
|         thrPiId: null, | ||||
|         nameCode: "", | ||||
|         ggxh: null, | ||||
|         page: 1, | ||||
|         limit: 20, | ||||
|         addType: 1, | ||||
|       }; | ||||
|       this.total = 0; | ||||
|       this.list = []; | ||||
|       this.getList(); | ||||
|     }, | ||||
|     search() { | ||||
|       this.filterQuery.page = 1; | ||||
|       this.getList(); | ||||
|     }, | ||||
|     hideSearch() { | ||||
|       this.showSearch = !this.showSearch; | ||||
|     }, | ||||
|     getList() { | ||||
|       this.loading = true; | ||||
|       filterRlCompany(this.filterQuery) | ||||
|         .then((response) => { | ||||
|           this.loading = false; | ||||
|           this.list = response.data.list || []; | ||||
|           this.total = response.data.total || 0; | ||||
|         }) | ||||
|         .catch(() => { | ||||
|           this.loading = false; | ||||
|           this.list = []; | ||||
|           this.total = 0; | ||||
|         }); | ||||
|     }, | ||||
|     keyup_submit(event) { | ||||
|       this.filterQuery.page = 1; | ||||
|       this.getList(); | ||||
|       event.target.select(); | ||||
|     }, | ||||
|     handleDetail(row) { | ||||
|       this.editQuery = row; | ||||
|     }, | ||||
|     deleteOrders(data) { | ||||
|       this.loading = true; | ||||
|       let tquery = { | ||||
|         id: data.id + "", | ||||
|       }; | ||||
| 
 | ||||
|       deleteRel(tquery) | ||||
|         .then((response) => { | ||||
|           this.loading = false; | ||||
|           if (response.code == 20000) { | ||||
|             this.getList(); | ||||
|             this.$message({ | ||||
|               type: "success", | ||||
|               message: "删除成功!", | ||||
|             }); | ||||
|           } else { | ||||
|             this.$message.error(response.message); | ||||
|           } | ||||
|         }) | ||||
|         .catch(() => { | ||||
|         }); | ||||
|     }, | ||||
| 
 | ||||
|     deleteDialog(rowId) { | ||||
|       this.$confirm("此操作将永久删除该产品信息, 是否继续?", "提示", { | ||||
|         confirmButtonText: "确定", | ||||
|         cancelButtonText: "取消", | ||||
|         type: "warning", | ||||
|       }) | ||||
|         .then(() => { | ||||
|           this.deleteOrders(rowId); | ||||
|         }) | ||||
|         .catch(() => { | ||||
|         }); | ||||
|     }, | ||||
|     selectProduct() { | ||||
|       if (this.$isBlank(this.filterQuery.companyIdFk)) { | ||||
|         this.$message.error("请先选择注册企业!"); | ||||
|         return; | ||||
|       } | ||||
|       this.selectProductVisible = true; | ||||
|     }, | ||||
| 
 | ||||
|     cancelDialog() { | ||||
|       this.editDialogVisible = false; | ||||
|     }, | ||||
|     handleCurrentChange(val) { | ||||
|       this.filterQuery.page = val.page; | ||||
|       this.getList(); | ||||
|     }, | ||||
|     handleModifyClick(row) { | ||||
|       this.uuid = row.uuid; | ||||
|       this.isImport = false; | ||||
|       this.thisData = row; | ||||
|       this.editDialogVisible = true; | ||||
|       this.detailQuery = row; | ||||
|       this.checked = row.isUseDy == 1; | ||||
|     }, | ||||
| 
 | ||||
|     closeUdi(val) { | ||||
|       this.selectUdiDialogVisible = false; | ||||
|       this.selectErpDialogVisible = false; | ||||
|       this.selectLocalVisible = false; | ||||
|       this.getList(); | ||||
|     }, | ||||
| 
 | ||||
|     selectVersion() { | ||||
|       this.selectVersionVisible = true; | ||||
|       this.uuid = this.editQuery.uuid; | ||||
|       this.originUuid = this.editQuery.originUuid; | ||||
|     }, | ||||
|     closeDialog() { | ||||
|       this.selectErpDialogVisible = false; | ||||
|       this.selectLocalVisible = false; | ||||
|       this.selectVersionVisible = false; | ||||
|       this.selectProductVisible = false; | ||||
|       this.getList(); | ||||
|     }, | ||||
| 
 | ||||
| 
 | ||||
|     findMethod(query) { | ||||
|       this.fromOptions = []; | ||||
|       let cQuery = { | ||||
|         searchKey: query, | ||||
|         page: 1, | ||||
|         limit: 10, | ||||
|       }; | ||||
|       seachCompany(cQuery) | ||||
|         .then((response) => { | ||||
|           this.loading = false; | ||||
|           this.fromOptions = response.data || []; | ||||
|         }) | ||||
|         .catch(() => { | ||||
|           this.loading = false; | ||||
|           this.fromOptions = []; | ||||
|         }); | ||||
|     }, | ||||
|   } | ||||
|   , | ||||
|   mounted() { | ||||
|   } | ||||
|   , | ||||
|   components: { | ||||
|     selectUdi, | ||||
|     selectErp, | ||||
|     selectLocalUdi, | ||||
|     selectProduct, | ||||
|     selectDetail | ||||
|   } | ||||
|   , | ||||
|   created() { | ||||
|     this.getList(); | ||||
|     this.findMethod(); | ||||
|   } | ||||
|   , | ||||
| } | ||||
| ; | ||||
| </script> | ||||
| <style scoped> | ||||
| 
 | ||||
| 
 | ||||
| .el-table .cell.el-tooltip { | ||||
|   white-space: pre-wrap; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| .itemTag { | ||||
|   float: left; | ||||
|   text-align: left; | ||||
|   margin-top: 10px; | ||||
|   width: 25%; | ||||
| } | ||||
| 
 | ||||
| .text { | ||||
|   font-size: 13px; | ||||
|   font-family: "Microsoft YaHei"; | ||||
| } | ||||
| 
 | ||||
| .query-form-item { | ||||
|   display: block !important; | ||||
|   margin-right: 10px; | ||||
|   margin-bottom: 5px; | ||||
| } | ||||
| 
 | ||||
| .el-row { | ||||
|   display: flex; | ||||
|   flex-wrap: wrap; | ||||
| } | ||||
| 
 | ||||
| .el-col { | ||||
|   border-radius: 4px; | ||||
|   flex-wrap: wrap; | ||||
| } | ||||
| 
 | ||||
| .form-title { | ||||
|   font-size: 16px; | ||||
|   font-family: Noto Sans SC; | ||||
|   font-weight: bold; | ||||
|   color: #303133; | ||||
|   padding-bottom: 17px; | ||||
|   padding-top: 17px; | ||||
| } | ||||
| </style> | ||||
					Loading…
					
					
				
		Reference in New Issue