修改bug
							parent
							
								
									4ce83ce80e
								
							
						
					
					
						commit
						7ce0a0c483
					
				| @ -0,0 +1,470 @@ | |||||||
|  | <template> | ||||||
|  |   <div> | ||||||
|  |     <el-card class="el-card"> | ||||||
|  |       <div> | ||||||
|  |         <el-form v-if="queryList && queryList.length > 0" :model="filterQuery" size="mini" label-width="125px" v-show="showSearch"> | ||||||
|  | 
 | ||||||
|  |           <el-row style=" display:flex;  flex-wrap: wrap; "> | ||||||
|  |             <template v-for="(item, index) in queryList" > | ||||||
|  |               <el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id"> | ||||||
|  |                 <el-input | ||||||
|  |                   v-model="filterQuery[item.columnName]" | ||||||
|  |                   :placeholder="item.columnDesc" | ||||||
|  |                   :disabled="executeEval(null,item.disabledFuc,false)" | ||||||
|  |                   @keyup.enter.native="executeFuc($event,'5',item.clickFuc)" | ||||||
|  |                   clearable | ||||||
|  |                 ></el-input> | ||||||
|  |               </el-form-item> | ||||||
|  |               <el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`"> | ||||||
|  |                 <el-select v-model="filterQuery[item.columnName]" | ||||||
|  |                            :placeholder="item.columnDesc" | ||||||
|  |                            :disabled="executeEval(null,item.disabledFuc,false)" | ||||||
|  |                            clearable> | ||||||
|  |                   <el-option | ||||||
|  |                     v-for="dict in item.lableRuleObj" | ||||||
|  |                     :key="dict.value" | ||||||
|  |                     :label="dict.label" | ||||||
|  |                     :value="dict.value" | ||||||
|  |                   /> | ||||||
|  |                 </el-select> | ||||||
|  |               </el-form-item> | ||||||
|  |               <el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`"> | ||||||
|  |                 <el-select | ||||||
|  |                   v-model="filterQuery[item.columnName]" | ||||||
|  |                   :placeholder="item.columnDesc" | ||||||
|  |                   @change="executeFuc($event,'5',item.checkRules)" | ||||||
|  |                   :disabled="executeEval(null,item.disabledFuc,false)" | ||||||
|  |                   filterable | ||||||
|  |                   remote | ||||||
|  |                   :remote-method="(query) => executeFuc(query,'5',item.clickFuc)" | ||||||
|  |                   clearable> | ||||||
|  |                   <el-option | ||||||
|  |                     v-for="item in options[item.clickFuc]" | ||||||
|  |                     :key="item.code" | ||||||
|  |                     :label="item.label" | ||||||
|  |                     :value="item.code" | ||||||
|  |                   /> | ||||||
|  |                 </el-select> | ||||||
|  |               </el-form-item> | ||||||
|  |               <el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`"> | ||||||
|  |                 <el-date-picker | ||||||
|  |                   :picker-options="pickerOptions" | ||||||
|  |                   v-model="actDateRange" | ||||||
|  |                   type="daterange" | ||||||
|  |                   format="yyyy 年 MM 月 dd 日" | ||||||
|  |                   value-format="yyyy-MM-dd" | ||||||
|  |                   range-separator="至" | ||||||
|  |                   start-placeholder="开始日期" | ||||||
|  |                   end-placeholder="结束日期" | ||||||
|  |                 ></el-date-picker> | ||||||
|  |               </el-form-item> | ||||||
|  |               <el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`"> | ||||||
|  |                 <el-date-picker | ||||||
|  |                   v-model="filterQuery[item.columnName]" | ||||||
|  |                   :style="`width:${item.width+'px'}`" | ||||||
|  |                   value-format="yyyy-MM-dd" | ||||||
|  |                   :disabled="executeEval(null,item.disabledFuc,false)" | ||||||
|  |                   type="date" | ||||||
|  |                   :placeholder="item.columnDesc" | ||||||
|  |                 ></el-date-picker> | ||||||
|  |               </el-form-item> | ||||||
|  |             </template> | ||||||
|  |           </el-row> | ||||||
|  |         </el-form> | ||||||
|  |         <div class="top-right-btn"> | ||||||
|  |           <el-button-group> | ||||||
|  |             <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="searchList">查询</el-button> | ||||||
|  |             <el-button type="primary" icon="el-icon-bottom-left" @click="checkCombine" | ||||||
|  |                        :loading="combineLoading" | ||||||
|  |             >选入 | ||||||
|  |             </el-button | ||||||
|  |             > | ||||||
|  |           </el-button-group> | ||||||
|  |         </div> | ||||||
|  |         <el-divider style="margin: 15px"></el-divider> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |         <el-table | ||||||
|  |           :data="udidlList" | ||||||
|  |           style="width: 100%" | ||||||
|  |           border | ||||||
|  |           v-loading="loading" | ||||||
|  |           highlight-current-row="true" | ||||||
|  |           :row-class-name="tableRowClassName" | ||||||
|  |           @current-change="handleErpChange" | ||||||
|  |           @selection-change="handleSelectionUdiChange" | ||||||
|  |         > | ||||||
|  |           <template v-for="(item, index) in tableHeader"> | ||||||
|  |             <el-table-column | ||||||
|  |               v-if="item.columnType == 'id' && executeEval(row,item.expression,true)" | ||||||
|  |               type="index" :label="item.columnDesc"></el-table-column> | ||||||
|  |             <el-table-column | ||||||
|  |               v-if="item.columnType == 'selection'" | ||||||
|  |               type="selection" | ||||||
|  |               :width="item.width" | ||||||
|  |               :selectable="(row,number) => executeFuc(row,'3',item.clickFuc)" | ||||||
|  |             ></el-table-column> | ||||||
|  | 
 | ||||||
|  |             <el-table-column | ||||||
|  |               v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)" | ||||||
|  |               :prop="item.columnName" | ||||||
|  |               :label="item.columnDesc" | ||||||
|  |               :sortable="item.sort" | ||||||
|  |               :width="item.width" | ||||||
|  |               :show-overflow-tooltip="item.tooltip" | ||||||
|  |               :key="item.columnName" | ||||||
|  |             > | ||||||
|  |               <template  slot-scope="scope"> | ||||||
|  |                 <el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio> | ||||||
|  |               </template> | ||||||
|  |             </el-table-column> | ||||||
|  |             <el-table-column | ||||||
|  |               v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)" | ||||||
|  |               :prop="item.columnName" | ||||||
|  |               :label="item.columnDesc" | ||||||
|  |               :sortable="item.sort" | ||||||
|  |               :width="item.width" | ||||||
|  |               :show-overflow-tooltip="item.tooltip" | ||||||
|  |               :key="item.columnName" | ||||||
|  |             > | ||||||
|  |               <template   slot-scope="scope"> | ||||||
|  |                 <span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{ item.lableRuleObj[scope.row[item.columnName]] }}</span> | ||||||
|  |               </template> | ||||||
|  |             </el-table-column> | ||||||
|  |             <el-table-column | ||||||
|  |               v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)" | ||||||
|  |               :prop="item.columnName" | ||||||
|  |               :label="item.columnDesc" | ||||||
|  |               :sortable="item.sort" | ||||||
|  |               :width="item.width" | ||||||
|  |               :show-overflow-tooltip="item.tooltip" | ||||||
|  |               :key="item.columnName" | ||||||
|  |             > | ||||||
|  |               <template   slot-scope="scope"> | ||||||
|  |                 <el-tag :type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])"> | ||||||
|  |                   <span>{{ item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName] }}</span> | ||||||
|  |                 </el-tag> | ||||||
|  |               </template> | ||||||
|  |             </el-table-column> | ||||||
|  |             <el-table-column | ||||||
|  |               v-if="item.columnType == 'button' && executeEval(row,item.expression,true)" | ||||||
|  |               :prop="item.columnName" | ||||||
|  |               :label="item.columnDesc" | ||||||
|  |               :width="item.width" | ||||||
|  |               :key="item.columnName" | ||||||
|  |               fixed="right" | ||||||
|  |             > | ||||||
|  |               <template slot-scope="scope"> | ||||||
|  |                 <el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj" | ||||||
|  |                            :type="buttonItem.type" | ||||||
|  |                            :size="buttonItem.size" | ||||||
|  |                            :style="buttonItem.style" | ||||||
|  |                            :key="buttonItem" | ||||||
|  |                            v-if="executeEval(scope.row,buttonItem.hasPermi,true)" | ||||||
|  |                            :disabled="executeEval(scope.row,buttonItem.disabledFuc,false)" | ||||||
|  |                            @click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)" | ||||||
|  |                 >{{ buttonItem.name }} | ||||||
|  |                 </el-button> | ||||||
|  |               </template> | ||||||
|  |             </el-table-column> | ||||||
|  |             <el-table-column | ||||||
|  |               v-if="item.columnType == 'text' && executeEval(row,item.expression,true)" | ||||||
|  |               :prop="item.columnName" | ||||||
|  |               :label="item.columnDesc" | ||||||
|  |               :sortable="item.sort" | ||||||
|  |               :width="item.width" | ||||||
|  |               :show-overflow-tooltip="item.tooltip" | ||||||
|  |               :key="item.columnName" | ||||||
|  |             > | ||||||
|  |               <template slot-scope="scope"> | ||||||
|  |                 <span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ scope.row[item.columnName] }}</span> | ||||||
|  |               </template> | ||||||
|  |             </el-table-column> | ||||||
|  |           </template> | ||||||
|  | 
 | ||||||
|  |         </el-table> | ||||||
|  |         <pagination | ||||||
|  |           v-show="total>0" | ||||||
|  |           :total="total" | ||||||
|  |           :page.sync="filterQuery.page" | ||||||
|  |           :limit.sync="filterQuery.limit" | ||||||
|  |           @pagination="getList" | ||||||
|  |         /> | ||||||
|  |       </div> | ||||||
|  |     </el-card> | ||||||
|  | 
 | ||||||
|  |     <el-dialog | ||||||
|  |       :title="formCertMap[formCertName]" | ||||||
|  |       :visible.sync="orderMutiSetCertVisible" | ||||||
|  |       :before-close="close" | ||||||
|  |       width="60%" | ||||||
|  |       v-if="orderMutiSetCertVisible" | ||||||
|  |       @close='closeCertDialog' | ||||||
|  |       :close-on-click-modal="false" | ||||||
|  |       :close-on-press-escape="false" | ||||||
|  |       :append-to-body="true" | ||||||
|  | 
 | ||||||
|  |     > | ||||||
|  |       <ylqxzczhManuDialog | ||||||
|  |         :closeDialog="closeCertDialog" | ||||||
|  |         :inputQuery="inputCertQuery" | ||||||
|  |         :formName="formCertName" | ||||||
|  |       ></ylqxzczhManuDialog> | ||||||
|  |     </el-dialog> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import {filterMyAuth,batchAddAuth} from "@/api/sup/userCert"; | ||||||
|  | import {executeFuc, getHead} from "@/utils/customConfig"; | ||||||
|  | import ylqxzczhManuDialog from "./certDialog"; | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   name: "closeDialog", | ||||||
|  |   props: { | ||||||
|  |     closeDialog: { | ||||||
|  |       type: Function, | ||||||
|  |       required: true, | ||||||
|  |     }, | ||||||
|  |     formName: { | ||||||
|  |       type: Object, | ||||||
|  |       required: true, | ||||||
|  |     }, | ||||||
|  |     inputQuery: { | ||||||
|  |       type: Object, | ||||||
|  |       required: true, | ||||||
|  |     }, | ||||||
|  |   }, | ||||||
|  | 
 | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       formCertName: 3, | ||||||
|  |       formCertMap: { | ||||||
|  |         3: "资质详情", | ||||||
|  |       }, | ||||||
|  |       inputCertQuery:{}, | ||||||
|  |       orderMutiSetCertVisible: false, | ||||||
|  |       filterQuery: { | ||||||
|  |         page: 1, | ||||||
|  |         limit: 10, | ||||||
|  |       }, | ||||||
|  |       cpmctymc1: "", | ||||||
|  |       combineLoading: false, | ||||||
|  |       combineQuery: { | ||||||
|  |         productId: null, | ||||||
|  |         ids: [], | ||||||
|  |       }, | ||||||
|  |       checked: true, | ||||||
|  |       udidlList: [], | ||||||
|  |       erpList: [], | ||||||
|  |       pageTotal: 0, | ||||||
|  |       total: 0, | ||||||
|  |       tableHeader:[], | ||||||
|  |       queryList:[], | ||||||
|  |       fromList:[], | ||||||
|  |       currentRow: null, | ||||||
|  |       fromOptions: [], | ||||||
|  |       loading: false, | ||||||
|  |       erpLloading: false, | ||||||
|  |       multipleUdiSelection: [], | ||||||
|  |       selectDialog: false, | ||||||
|  |       diDetails: null, | ||||||
|  |       showSearch: true, | ||||||
|  |     }; | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  | 
 | ||||||
|  |     onReset() { | ||||||
|  |       this.$router.push({ | ||||||
|  |         path: "", | ||||||
|  |       }); | ||||||
|  |       this.filterQuery = { | ||||||
|  |         page: 1, | ||||||
|  |         limit: 10, | ||||||
|  |       }; | ||||||
|  |       this.actDateRange = []; | ||||||
|  |       this.udidlList = []; | ||||||
|  |     }, | ||||||
|  |     clear() { | ||||||
|  |       this.filterQuery = { | ||||||
|  |         page: 1, | ||||||
|  |         limit: 10, | ||||||
|  |       }; | ||||||
|  |     }, | ||||||
|  |     searchList() { | ||||||
|  |       this.filterQuery.page = 1; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     getList() { | ||||||
|  |       this.filterQuery.businessId = this.inputQuery.corpId; | ||||||
|  |       this.loading = true; | ||||||
|  |       filterMyAuth(this.filterQuery) | ||||||
|  |         .then((response) => { | ||||||
|  |           this.loading = false; | ||||||
|  |           if (response.code == 20000) { | ||||||
|  |             this.udidlList = response.data.list || []; | ||||||
|  |             this.total = response.data.total || 0; | ||||||
|  |           } else { | ||||||
|  |             this.$message.error(response.message); | ||||||
|  |           } | ||||||
|  |         }) | ||||||
|  |         .catch(() => { | ||||||
|  |           this.loading = false; | ||||||
|  |           this.udidlList = []; | ||||||
|  |           this.total = 0; | ||||||
|  |         }); | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     hideSearch() { | ||||||
|  |       this.showSearch = !this.showSearch; | ||||||
|  |     }, | ||||||
|  |     closeCertDialog(){ | ||||||
|  |       this.orderMutiSetCertVisible = false; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     detailCertDialog(_this,row){ | ||||||
|  |       _this.formCertName=3; | ||||||
|  |       _this.inputCertQuery=row | ||||||
|  |       _this.orderMutiSetCertVisible = true; | ||||||
|  |     }, | ||||||
|  |     keyup_submit(event) { | ||||||
|  |       this.filterQuery.page = 1; | ||||||
|  |       this.getList(); | ||||||
|  |       event.target.select(); | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     checkSelectable(_this,row) { | ||||||
|  |       return !row.check; | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     diDetail(row) { | ||||||
|  |       this.diDetails = row; | ||||||
|  |       this.selectDialog = true; | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     handleCurrentChange(val) { | ||||||
|  |       this.filterQuery.page = val; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     tableRowClassName({row, rowIndex}) { | ||||||
|  |       if (row.check) return "warning-row"; | ||||||
|  |       return ""; | ||||||
|  |     }, | ||||||
|  |     handleErpChange(val) { | ||||||
|  |       this.cpmctymc1 = val.cpmctymc; | ||||||
|  |       this.currentRow = val; | ||||||
|  |     }, | ||||||
|  |     intentBack() { | ||||||
|  |       this.closeDialog(); | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     checkCombine() { | ||||||
|  |       this.checkedUdi(); | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     checkedUdi() { | ||||||
|  |       let selectData = this.multipleUdiSelection; | ||||||
|  |       let selected = null; | ||||||
|  |       if (this.multipleUdiSelection.length == 0) { | ||||||
|  |         this.$message.warning('请选入资质!'); | ||||||
|  |         return; | ||||||
|  |       } else { | ||||||
|  |         selectData.forEach((obj) => { | ||||||
|  |           if (obj.check) { | ||||||
|  |             selected = obj; | ||||||
|  |           } | ||||||
|  |           this.combineQuery.ids.push(obj.id); | ||||||
|  |         }); | ||||||
|  |       } | ||||||
|  |       if (selected != null) { | ||||||
|  |         this.$message.warning("资质:" + selected.name + "已被选入"); | ||||||
|  |         return; | ||||||
|  |       } | ||||||
|  |       this.combineLoading = true; | ||||||
|  |       this.combine(); | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     combine() { | ||||||
|  |       this.combineQuery.corpId = this.inputQuery.corpId; | ||||||
|  |       batchAddAuth(this.combineQuery) | ||||||
|  |         .then((response) => { | ||||||
|  |           this.combineLoading = false; | ||||||
|  |           if (response.code == 20000) { | ||||||
|  |             this.intentBack(); | ||||||
|  |           } else { | ||||||
|  |             this.$message.error(response.message); | ||||||
|  |             this.intentBack(); | ||||||
|  |           } | ||||||
|  |         }) | ||||||
|  |         .catch(() => { | ||||||
|  |           this.combineLoading = false; | ||||||
|  | 
 | ||||||
|  |           this.$emit("closeUdi", false); | ||||||
|  |         }); | ||||||
|  | 
 | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     handleSelectionUdiChange(val) { | ||||||
|  |       this.multipleUdiSelection = val; | ||||||
|  |     }, | ||||||
|  |     executeFuc(row,type,clickFuc,value){ | ||||||
|  |       return executeFuc(this,row,type,clickFuc,value); | ||||||
|  |     }, | ||||||
|  |     executeEval(row,expression,defaultRet){ | ||||||
|  |       if(expression){ | ||||||
|  |         return eval(expression); | ||||||
|  |       } | ||||||
|  |       return defaultRet; | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   components: { | ||||||
|  |     ylqxzczhManuDialog | ||||||
|  |   }, | ||||||
|  |   created() { | ||||||
|  |     console.log(this.inputQuery) | ||||||
|  |     getHead("supcert-auth","1").then((re) => { | ||||||
|  |       // 处理返回的数据 | ||||||
|  |       this.tableObj = re.data; | ||||||
|  |       this.tableHeader = re.data.tableList; | ||||||
|  |       this.queryList = re.data.queryList; | ||||||
|  |       this.fromList = re.data.fromList; | ||||||
|  |       this.getList(); | ||||||
|  |     }); | ||||||
|  |   } | ||||||
|  | }; | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <style scoped> | ||||||
|  | .checkitemTag { | ||||||
|  |   float: left; | ||||||
|  |   text-align: left; | ||||||
|  |   margin-top: 5px; | ||||||
|  |   width: 100%; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | div /deep/ .el-table .warning-row { | ||||||
|  |   background: #bebebe; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | div /deep/ .el-table .success-row { | ||||||
|  |   background: #ffffff; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .el-card { | ||||||
|  |   margin-right: 20px; | ||||||
|  |   /*transition: all .5s;*/ | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .query-form-item { | ||||||
|  |   display: block !important; | ||||||
|  |   margin-right: 10px; | ||||||
|  |   margin-bottom: 5px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | </style> | ||||||
| @ -0,0 +1,469 @@ | |||||||
|  | <template> | ||||||
|  |   <div> | ||||||
|  |     <el-card class="el-card"> | ||||||
|  |       <div> | ||||||
|  |         <el-form v-if="queryList && queryList.length > 0" :model="filterQuery" size="mini" label-width="125px" v-show="showSearch"> | ||||||
|  | 
 | ||||||
|  |           <el-row style=" display:flex;  flex-wrap: wrap; "> | ||||||
|  |             <template v-for="(item, index) in queryList" > | ||||||
|  |               <el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id"> | ||||||
|  |                 <el-input | ||||||
|  |                   v-model="filterQuery[item.columnName]" | ||||||
|  |                   :placeholder="item.columnDesc" | ||||||
|  |                   :disabled="executeEval(null,item.disabledFuc,false)" | ||||||
|  |                   @keyup.enter.native="executeFuc($event,'5',item.clickFuc)" | ||||||
|  |                   clearable | ||||||
|  |                 ></el-input> | ||||||
|  |               </el-form-item> | ||||||
|  |               <el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`"> | ||||||
|  |                 <el-select v-model="filterQuery[item.columnName]" | ||||||
|  |                            :placeholder="item.columnDesc" | ||||||
|  |                            :disabled="executeEval(null,item.disabledFuc,false)" | ||||||
|  |                            clearable> | ||||||
|  |                   <el-option | ||||||
|  |                     v-for="dict in item.lableRuleObj" | ||||||
|  |                     :key="dict.value" | ||||||
|  |                     :label="dict.label" | ||||||
|  |                     :value="dict.value" | ||||||
|  |                   /> | ||||||
|  |                 </el-select> | ||||||
|  |               </el-form-item> | ||||||
|  |               <el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`"> | ||||||
|  |                 <el-select | ||||||
|  |                   v-model="filterQuery[item.columnName]" | ||||||
|  |                   :placeholder="item.columnDesc" | ||||||
|  |                   @change="executeFuc($event,'5',item.checkRules)" | ||||||
|  |                   :disabled="executeEval(null,item.disabledFuc,false)" | ||||||
|  |                   filterable | ||||||
|  |                   remote | ||||||
|  |                   :remote-method="(query) => executeFuc(query,'5',item.clickFuc)" | ||||||
|  |                   clearable> | ||||||
|  |                   <el-option | ||||||
|  |                     v-for="item in options[item.clickFuc]" | ||||||
|  |                     :key="item.code" | ||||||
|  |                     :label="item.label" | ||||||
|  |                     :value="item.code" | ||||||
|  |                   /> | ||||||
|  |                 </el-select> | ||||||
|  |               </el-form-item> | ||||||
|  |               <el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`"> | ||||||
|  |                 <el-date-picker | ||||||
|  |                   :picker-options="pickerOptions" | ||||||
|  |                   v-model="actDateRange" | ||||||
|  |                   type="daterange" | ||||||
|  |                   format="yyyy 年 MM 月 dd 日" | ||||||
|  |                   value-format="yyyy-MM-dd" | ||||||
|  |                   range-separator="至" | ||||||
|  |                   start-placeholder="开始日期" | ||||||
|  |                   end-placeholder="结束日期" | ||||||
|  |                 ></el-date-picker> | ||||||
|  |               </el-form-item> | ||||||
|  |               <el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`"> | ||||||
|  |                 <el-date-picker | ||||||
|  |                   v-model="filterQuery[item.columnName]" | ||||||
|  |                   :style="`width:${item.width+'px'}`" | ||||||
|  |                   value-format="yyyy-MM-dd" | ||||||
|  |                   :disabled="executeEval(null,item.disabledFuc,false)" | ||||||
|  |                   type="date" | ||||||
|  |                   :placeholder="item.columnDesc" | ||||||
|  |                 ></el-date-picker> | ||||||
|  |               </el-form-item> | ||||||
|  |             </template> | ||||||
|  |           </el-row> | ||||||
|  |         </el-form> | ||||||
|  |         <div class="top-right-btn"> | ||||||
|  |           <el-button-group> | ||||||
|  |             <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="searchList">查询</el-button> | ||||||
|  |             <el-button type="primary" icon="el-icon-bottom-left" @click="checkCombine" | ||||||
|  |                        :loading="combineLoading" | ||||||
|  |             >选入 | ||||||
|  |             </el-button | ||||||
|  |             > | ||||||
|  |           </el-button-group> | ||||||
|  |         </div> | ||||||
|  |         <el-divider style="margin: 15px"></el-divider> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |         <el-table | ||||||
|  |           :data="udidlList" | ||||||
|  |           style="width: 100%" | ||||||
|  |           border | ||||||
|  |           v-loading="loading" | ||||||
|  |           highlight-current-row="true" | ||||||
|  |           :row-class-name="tableRowClassName" | ||||||
|  |           @current-change="handleErpChange" | ||||||
|  |           @selection-change="handleSelectionUdiChange" | ||||||
|  |         > | ||||||
|  |           <template v-for="(item, index) in tableHeader"> | ||||||
|  |             <el-table-column | ||||||
|  |               v-if="item.columnType == 'id' && executeEval(row,item.expression,true)" | ||||||
|  |               type="index" :label="item.columnDesc"></el-table-column> | ||||||
|  |             <el-table-column | ||||||
|  |               v-if="item.columnType == 'selection'" | ||||||
|  |               type="selection" | ||||||
|  |               :width="item.width" | ||||||
|  |               :selectable="(row,number) => executeFuc(row,'3',item.clickFuc)" | ||||||
|  |             ></el-table-column> | ||||||
|  | 
 | ||||||
|  |             <el-table-column | ||||||
|  |               v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)" | ||||||
|  |               :prop="item.columnName" | ||||||
|  |               :label="item.columnDesc" | ||||||
|  |               :sortable="item.sort" | ||||||
|  |               :width="item.width" | ||||||
|  |               :show-overflow-tooltip="item.tooltip" | ||||||
|  |               :key="item.columnName" | ||||||
|  |             > | ||||||
|  |               <template  slot-scope="scope"> | ||||||
|  |                 <el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio> | ||||||
|  |               </template> | ||||||
|  |             </el-table-column> | ||||||
|  |             <el-table-column | ||||||
|  |               v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)" | ||||||
|  |               :prop="item.columnName" | ||||||
|  |               :label="item.columnDesc" | ||||||
|  |               :sortable="item.sort" | ||||||
|  |               :width="item.width" | ||||||
|  |               :show-overflow-tooltip="item.tooltip" | ||||||
|  |               :key="item.columnName" | ||||||
|  |             > | ||||||
|  |               <template   slot-scope="scope"> | ||||||
|  |                 <span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{ item.lableRuleObj[scope.row[item.columnName]] }}</span> | ||||||
|  |               </template> | ||||||
|  |             </el-table-column> | ||||||
|  |             <el-table-column | ||||||
|  |               v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)" | ||||||
|  |               :prop="item.columnName" | ||||||
|  |               :label="item.columnDesc" | ||||||
|  |               :sortable="item.sort" | ||||||
|  |               :width="item.width" | ||||||
|  |               :show-overflow-tooltip="item.tooltip" | ||||||
|  |               :key="item.columnName" | ||||||
|  |             > | ||||||
|  |               <template   slot-scope="scope"> | ||||||
|  |                 <el-tag :type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])"> | ||||||
|  |                   <span>{{ item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName] }}</span> | ||||||
|  |                 </el-tag> | ||||||
|  |               </template> | ||||||
|  |             </el-table-column> | ||||||
|  |             <el-table-column | ||||||
|  |               v-if="item.columnType == 'button' && executeEval(row,item.expression,true)" | ||||||
|  |               :prop="item.columnName" | ||||||
|  |               :label="item.columnDesc" | ||||||
|  |               :width="item.width" | ||||||
|  |               :key="item.columnName" | ||||||
|  |               fixed="right" | ||||||
|  |             > | ||||||
|  |               <template slot-scope="scope"> | ||||||
|  |                 <el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj" | ||||||
|  |                            :type="buttonItem.type" | ||||||
|  |                            :size="buttonItem.size" | ||||||
|  |                            :style="buttonItem.style" | ||||||
|  |                            :key="buttonItem" | ||||||
|  |                            v-if="executeEval(scope.row,buttonItem.hasPermi,true)" | ||||||
|  |                            :disabled="executeEval(scope.row,buttonItem.disabledFuc,false)" | ||||||
|  |                            @click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)" | ||||||
|  |                 >{{ buttonItem.name }} | ||||||
|  |                 </el-button> | ||||||
|  |               </template> | ||||||
|  |             </el-table-column> | ||||||
|  |             <el-table-column | ||||||
|  |               v-if="item.columnType == 'text' && executeEval(row,item.expression,true)" | ||||||
|  |               :prop="item.columnName" | ||||||
|  |               :label="item.columnDesc" | ||||||
|  |               :sortable="item.sort" | ||||||
|  |               :width="item.width" | ||||||
|  |               :show-overflow-tooltip="item.tooltip" | ||||||
|  |               :key="item.columnName" | ||||||
|  |             > | ||||||
|  |               <template slot-scope="scope"> | ||||||
|  |                 <span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ scope.row[item.columnName] }}</span> | ||||||
|  |               </template> | ||||||
|  |             </el-table-column> | ||||||
|  |           </template> | ||||||
|  | 
 | ||||||
|  |         </el-table> | ||||||
|  |         <pagination | ||||||
|  |           v-show="total>0" | ||||||
|  |           :total="total" | ||||||
|  |           :page.sync="filterQuery.page" | ||||||
|  |           :limit.sync="filterQuery.limit" | ||||||
|  |           @pagination="getList" | ||||||
|  |         /> | ||||||
|  |       </div> | ||||||
|  |     </el-card> | ||||||
|  | 
 | ||||||
|  |     <el-dialog | ||||||
|  |       :title="formCertMap[formCertName]" | ||||||
|  |       :visible.sync="orderMutiSetCertVisible" | ||||||
|  |       :before-close="close" | ||||||
|  |       width="60%" | ||||||
|  |       v-if="orderMutiSetCertVisible" | ||||||
|  |       @close='closeCertDialog' | ||||||
|  |       :close-on-click-modal="false" | ||||||
|  |       :close-on-press-escape="false" | ||||||
|  |       :append-to-body="true" | ||||||
|  | 
 | ||||||
|  |     > | ||||||
|  |       <ylqxzczhManuDialog | ||||||
|  |         :closeDialog="closeCertDialog" | ||||||
|  |         :inputQuery="inputCertQuery" | ||||||
|  |         :formName="formCertName" | ||||||
|  |       ></ylqxzczhManuDialog> | ||||||
|  |     </el-dialog> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import {filterMyAuth,batchAddAuth} from "@/api/purchase/supCert"; | ||||||
|  | import {executeFuc, getHead} from "@/utils/customConfig"; | ||||||
|  | import ylqxzczhManuDialog from "./ylqxzczhManuDialog"; | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   name: "closeDialog", | ||||||
|  |   props: { | ||||||
|  |     closeDialog: { | ||||||
|  |       type: Function, | ||||||
|  |       required: true, | ||||||
|  |     }, | ||||||
|  |     formName: { | ||||||
|  |       type: Object, | ||||||
|  |       required: true, | ||||||
|  |     }, | ||||||
|  |     inputQuery: { | ||||||
|  |       type: Object, | ||||||
|  |       required: true, | ||||||
|  |     }, | ||||||
|  |   }, | ||||||
|  | 
 | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       formCertName: 3, | ||||||
|  |       formCertMap: { | ||||||
|  |         3: "资质详情", | ||||||
|  |       }, | ||||||
|  |       inputCertQuery:{}, | ||||||
|  |       orderMutiSetCertVisible: false, | ||||||
|  |       filterQuery: { | ||||||
|  |         page: 1, | ||||||
|  |         limit: 10, | ||||||
|  |       }, | ||||||
|  |       cpmctymc1: "", | ||||||
|  |       combineLoading: false, | ||||||
|  |       combineQuery: { | ||||||
|  |         productId: null, | ||||||
|  |         ids: [], | ||||||
|  |       }, | ||||||
|  |       checked: true, | ||||||
|  |       udidlList: [], | ||||||
|  |       erpList: [], | ||||||
|  |       pageTotal: 0, | ||||||
|  |       total: 0, | ||||||
|  |       tableHeader:[], | ||||||
|  |       queryList:[], | ||||||
|  |       fromList:[], | ||||||
|  |       currentRow: null, | ||||||
|  |       fromOptions: [], | ||||||
|  |       loading: false, | ||||||
|  |       erpLloading: false, | ||||||
|  |       multipleUdiSelection: [], | ||||||
|  |       selectDialog: false, | ||||||
|  |       diDetails: null, | ||||||
|  |       showSearch: true, | ||||||
|  |     }; | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  | 
 | ||||||
|  |     onReset() { | ||||||
|  |       this.$router.push({ | ||||||
|  |         path: "", | ||||||
|  |       }); | ||||||
|  |       this.filterQuery = { | ||||||
|  |         page: 1, | ||||||
|  |         limit: 10, | ||||||
|  |       }; | ||||||
|  |       this.actDateRange = []; | ||||||
|  |       this.udidlList = []; | ||||||
|  |     }, | ||||||
|  |     clear() { | ||||||
|  |       this.filterQuery = { | ||||||
|  |         page: 1, | ||||||
|  |         limit: 10, | ||||||
|  |       }; | ||||||
|  |     }, | ||||||
|  |     searchList() { | ||||||
|  |       this.filterQuery.page = 1; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     getList() { | ||||||
|  |       this.filterQuery.productIdFk = this.inputQuery.productIdFk; | ||||||
|  |       this.loading = true; | ||||||
|  |       filterMyAuth(this.filterQuery) | ||||||
|  |         .then((response) => { | ||||||
|  |           this.loading = false; | ||||||
|  |           if (response.code == 20000) { | ||||||
|  |             this.udidlList = response.data.list || []; | ||||||
|  |             this.total = response.data.total || 0; | ||||||
|  |           } else { | ||||||
|  |             this.$message.error(response.message); | ||||||
|  |           } | ||||||
|  |         }) | ||||||
|  |         .catch(() => { | ||||||
|  |           this.loading = false; | ||||||
|  |           this.udidlList = []; | ||||||
|  |           this.total = 0; | ||||||
|  |         }); | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     hideSearch() { | ||||||
|  |       this.showSearch = !this.showSearch; | ||||||
|  |     }, | ||||||
|  |     closeCertDialog(){ | ||||||
|  |       this.orderMutiSetCertVisible = false; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     detailCertDialog(_this,row){ | ||||||
|  |       _this.formCertName=3; | ||||||
|  |       _this.inputCertQuery=row | ||||||
|  |       _this.orderMutiSetCertVisible = true; | ||||||
|  |     }, | ||||||
|  |     keyup_submit(event) { | ||||||
|  |       this.filterQuery.page = 1; | ||||||
|  |       this.getList(); | ||||||
|  |       event.target.select(); | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     checkSelectable(_this,row) { | ||||||
|  |       return !row.check; | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     diDetail(row) { | ||||||
|  |       this.diDetails = row; | ||||||
|  |       this.selectDialog = true; | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     handleCurrentChange(val) { | ||||||
|  |       this.filterQuery.page = val; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     tableRowClassName({row, rowIndex}) { | ||||||
|  |       if (row.check) return "warning-row"; | ||||||
|  |       return ""; | ||||||
|  |     }, | ||||||
|  |     handleErpChange(val) { | ||||||
|  |       this.cpmctymc1 = val.cpmctymc; | ||||||
|  |       this.currentRow = val; | ||||||
|  |     }, | ||||||
|  |     intentBack() { | ||||||
|  |       this.closeDialog(); | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     checkCombine() { | ||||||
|  |       this.checkedUdi(); | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     checkedUdi() { | ||||||
|  |       let selectData = this.multipleUdiSelection; | ||||||
|  |       let selected = null; | ||||||
|  |       if (this.multipleUdiSelection.length == 0) { | ||||||
|  |         this.$message.warning('请选入资质!'); | ||||||
|  |         return; | ||||||
|  |       } else { | ||||||
|  |         selectData.forEach((obj) => { | ||||||
|  |           if (obj.check) { | ||||||
|  |             selected = obj; | ||||||
|  |           } | ||||||
|  |           this.combineQuery.ids.push(obj.id); | ||||||
|  |         }); | ||||||
|  |       } | ||||||
|  |       if (selected != null) { | ||||||
|  |         this.$message.warning("资质:" + selected.name + "已被选入"); | ||||||
|  |         return; | ||||||
|  |       } | ||||||
|  |       this.combineLoading = true; | ||||||
|  |       this.combine(); | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     combine() { | ||||||
|  |       this.combineQuery.productId = this.inputQuery.productIdFk; | ||||||
|  |       batchAddAuth(this.combineQuery) | ||||||
|  |         .then((response) => { | ||||||
|  |           this.combineLoading = false; | ||||||
|  |           if (response.code == 20000) { | ||||||
|  |             this.intentBack(); | ||||||
|  |           } else { | ||||||
|  |             this.$message.error(response.message); | ||||||
|  |             this.intentBack(); | ||||||
|  |           } | ||||||
|  |         }) | ||||||
|  |         .catch(() => { | ||||||
|  |           this.combineLoading = false; | ||||||
|  | 
 | ||||||
|  |           this.$emit("closeUdi", false); | ||||||
|  |         }); | ||||||
|  | 
 | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     handleSelectionUdiChange(val) { | ||||||
|  |       this.multipleUdiSelection = val; | ||||||
|  |     }, | ||||||
|  |     executeFuc(row,type,clickFuc,value){ | ||||||
|  |       return executeFuc(this,row,type,clickFuc,value); | ||||||
|  |     }, | ||||||
|  |     executeEval(row,expression,defaultRet){ | ||||||
|  |       if(expression){ | ||||||
|  |         return eval(expression); | ||||||
|  |       } | ||||||
|  |       return defaultRet; | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   components: { | ||||||
|  |     ylqxzczhManuDialog | ||||||
|  |   }, | ||||||
|  |   created() { | ||||||
|  |     getHead("supcert-auth","1").then((re) => { | ||||||
|  |       // 处理返回的数据 | ||||||
|  |       this.tableObj = re.data; | ||||||
|  |       this.tableHeader = re.data.tableList; | ||||||
|  |       this.queryList = re.data.queryList; | ||||||
|  |       this.fromList = re.data.fromList; | ||||||
|  |       this.getList(); | ||||||
|  |     }); | ||||||
|  |   } | ||||||
|  | }; | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <style scoped> | ||||||
|  | .checkitemTag { | ||||||
|  |   float: left; | ||||||
|  |   text-align: left; | ||||||
|  |   margin-top: 5px; | ||||||
|  |   width: 100%; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | div /deep/ .el-table .warning-row { | ||||||
|  |   background: #bebebe; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | div /deep/ .el-table .success-row { | ||||||
|  |   background: #ffffff; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .el-card { | ||||||
|  |   margin-right: 20px; | ||||||
|  |   /*transition: all .5s;*/ | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .query-form-item { | ||||||
|  |   display: block !important; | ||||||
|  |   margin-right: 10px; | ||||||
|  |   margin-bottom: 5px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | </style> | ||||||
					Loading…
					
					
				
		Reference in New Issue