diff --git a/src/views/anno/anncmntDev/index.vue b/src/views/anno/anncmntDev/index.vue index 3080191..6c27f96 100644 --- a/src/views/anno/anncmntDev/index.vue +++ b/src/views/anno/anncmntDev/index.vue @@ -1,7 +1,7 @@ <template> <div> <el-card> - <el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" size="mini" label-width="120px" :inline="true"> + <el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" size="mini" label-width="120px" v-show="showSearch" :inline="true"> <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"> @@ -67,15 +67,24 @@ ></el-date-picker> </el-form-item> </template> - <el-form-item> - <el-button-group> - <el-button type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button> - <el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button> - <el-button type="primary" icon="el-icon-plus" @click="addOrderMuti">新增</el-button> - </el-button-group> - </el-form-item> </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="onSubmit" + >查询 + </el-button + > + <el-button type="primary" icon="el-icon-plus" @click="(event) => addOrderMuti()">新增</el-button> + </el-button-group> + </div> <el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row> <template v-for="(item, index) in tableHeader"> <el-table-column @@ -209,6 +218,7 @@ export default { name: "anncmntDev", data() { return { + showSearch: true, filterQuery: { page: 1, limit: 10, @@ -221,11 +231,51 @@ export default { 1: "新增器械公告", 2: "编辑器械公告", }, + inputQuery:{}, orderMutiSetVisible: false, + actDateRange: [], + pickerOptions: { + shortcuts: [ + { + text: "最近一周", + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); + picker.$emit("pick", [start, end]); + }, + }, + { + text: "最近一个月", + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); + picker.$emit("pick", [start, end]); + }, + }, + { + text: "最近三个月", + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); + picker.$emit("pick", [start, end]); + }, + }, + ], + }, }; }, methods: { onSubmit() { + if (this.actDateRange !== null) { + this.filterQuery.startTime = this.actDateRange[0]; + this.filterQuery.endTime = this.actDateRange[1]; + } else { + this.filterQuery.startTime = null; + this.filterQuery.endTime = null; + } this.filterQuery.page = 1; this.getList(); }, @@ -239,6 +289,9 @@ export default { }; this.getList(); }, + hideSearch() { + this.showSearch = !this.showSearch; + }, handleCurrentChange(val) { this.filterQuery.page = val.page; this.getList(); @@ -249,12 +302,7 @@ export default { }, addOrderMuti(){ this.inputQuery={ - curInv: null, - checkUse: null, - fromCorp: null, - targetAction: null, - remark: null, - updateTime: null, + } this.formName=1; this.orderMutiSetVisible = true; diff --git a/src/views/anno/anncmntDev/indexDialog.vue b/src/views/anno/anncmntDev/indexDialog.vue index cd759a2..541c07d 100644 --- a/src/views/anno/anncmntDev/indexDialog.vue +++ b/src/views/anno/anncmntDev/indexDialog.vue @@ -1,124 +1,311 @@ <template> <div> + <el-form :model="inputQuery" label-width="120px" > <el-card> - <el-form :model="inputQuery" label-width="120px" > - <template v-for="(itemRow, indexRow) in fromList"> + <div style="font-size: 25px;font-weight: bold;margin-bottom: 20px;">产品信息</div> <el-row :gutter="20" class="el-row" type="flex"> - <template v-for="(item, index) in itemRow.list"> - <el-col :span="item.width" class="el-col" type="flex"> - <div class="text item"> - <el-form-item v-if="item.columnType =='input'" :rules="item.checkRulesObj" :prop="item.columnName"> - <span slot="label"> - {{item.columnDesc}} - </span> - <el-input - v-model="inputQuery[item.columnName]" - :style="item.style" - :size="item.size" - :type="item.inputType" - :placeholder="item.columnDesc" - :disabled="item.disabled" - @change="executeFuc($event,item,'2')" - ></el-input> - </el-form-item> + <el-col class="el-col" type="flex"> + <el-form-item prop="productName" label="产品名称:" class="query-form-item"> + <el-input + style="width: 80%" + size="small" + placeholder="请输入产品名称" + v-model="inputQuery.productName" + ></el-input> + </el-form-item> + </el-col> + <el-col class="el-col" type="flex"> + <el-form-item label="产品英文名称:" class="query-form-item"> + <el-input + style="width: 80%" + size="small" + placeholder="请输入产品英文名称" + v-model="inputQuery.enProductName" + ></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row :gutter="20" class="el-row" type="flex"> + <el-col class="el-col" type="flex"> + <el-form-item label="规格型号:" class="query-form-item"> + <el-input + style="width: 80%" + size="small" + placeholder="请输入规格型号" + v-model="inputQuery.modelSpec" + ></el-input> + </el-form-item> + </el-col> + <el-col class="el-col" type="flex"> + <el-form-item label="注册/备案证号:" class="query-form-item"> + <el-input + style="width: 80%" + size="small" + placeholder="请输入注册/备案证号" + v-model="inputQuery.regCertCode" + ></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row :gutter="20" class="el-row" type="flex"> + <el-col class="el-col" type="flex"> + <el-form-item label="生产企业:" class="query-form-item"> + <el-input + style="width: 80%" + size="small" + placeholder="请输入生产企业" + v-model="inputQuery.manuName" + ></el-input> + </el-form-item> + </el-col> + <el-col class="el-col" type="flex"> + <el-form-item label="生产企业英文名称:" class="query-form-item"> + <el-input + style="width: 80%" + size="small" + placeholder="请输入生产企业英文名称" + v-model="inputQuery.enManuName" + ></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row :gutter="20" class="el-row" type="flex"> + <el-col class="el-col" type="flex"> + <el-form-item label="生产企业统一社会信用号:" class="query-form-item"> + <el-input + style="width: 80%" + size="small" + placeholder="请输入生产企业统一社会信用号" + v-model="inputQuery.manuCertCoe" + ></el-input> + </el-form-item> + </el-col> + <el-col class="el-col" type="flex"> + <el-form-item label="代理人名称:" class="query-form-item"> + <el-input + style="width: 80%" + size="small" + placeholder="请输入代理人名称" + v-model="inputQuery.agentName" + ></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row :gutter="20" class="el-row" type="flex"> + <el-col class="el-col" type="flex"> + <el-form-item label="代理人统一社会信用号:" class="query-form-item"> + <el-input + style="width: 80%" + size="small" + placeholder="请输入代理人统一社会信用号" + v-model="inputQuery.agentCertCode" + ></el-input> + </el-form-item> + </el-col> + <el-col class="el-col" type="flex"> + <el-form-item label="最小销售产品标识:" class="query-form-item"> + <el-input + style="width: 80%" + size="small" + placeholder="请输入最小销售产品标识" + v-model="inputQuery.nameCode" + ></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row :gutter="20" class="el-row" type="flex"> + <el-col class="el-col" type="flex"> + <el-form-item label="批次号:" class="query-form-item"> + <el-input + style="width: 80%" + size="small" + placeholder="请输入批次号" + v-model="inputQuery.batchNo" + ></el-input> + </el-form-item> + </el-col> + <el-col class="el-col" type="flex"> + <el-form-item label="生产日期:" class="query-form-item"> + <el-date-picker + v-model="inputQuery.productionDate" + style="width: 80%" + value-format="yyyy-MM-dd" + type="date" + placeholder="请输入生产日期" + ></el-date-picker> + </el-form-item> + </el-col> + </el-row> + <el-row :gutter="10" class="el-row" type="flex"> + <el-col class="el-col" type="flex"> + <el-form-item label="失效日期:" class="query-form-item"> + + <el-date-picker + v-model="inputQuery.expireDate" + style="width: 80%" + value-format="yyyy-MM-dd" + type="date" + placeholder="请输入失效日期" + ></el-date-picker> + </el-form-item> + </el-col> - <el-form-item v-if="item.columnType =='radio'" :prop="item.columnName"> - <span slot="label"> - {{item.columnDesc}} - </span> - <el-radio-group :style="item.style" v-model="inputQuery[item.columnName]"> - <el-radio - v-for="dict in item.lableRuleObj" - :key="parseInt(dict.value)" - :label="parseInt(dict.value)" - :disabled="item.disabled" - >{{dict.label}}</el-radio> - </el-radio-group> - </el-form-item> + </el-row> + </el-card> + <el-card> + <div style="font-size: 25px;font-weight: bold;margin-bottom: 20px;">公告信息</div> + <el-row :gutter="20" class="el-row" type="flex"> + <el-col class="el-col" type="flex"> + <el-form-item label="公告类型:" class="query-form-item"> + <el-select + size="small" + v-model="inputQuery.annType" + style="width: 80%" + placeholder="公告类型" + > + <el-option label="注销注册证公告" value="1"></el-option> + <el-option label="暂停进口、经营和使用公告" value="2"></el-option> + <el-option label="项目整改/停产整改公告" value="3"></el-option> + <el-option label="注销生产许可证公告" value="3"></el-option> + <el-option label="产品召回公告" value="3"></el-option> + </el-select> + </el-form-item> + </el-col> + <el-col class="el-col" type="flex"> + <el-form-item label="检查方式:" class="query-form-item"> + <el-select + size="small" + v-model="inputQuery.checkType" + style="width: 80%" + placeholder="检查方式" + > + <el-option label="远程非现场检查" value="1"></el-option> + <el-option label="监督抽检" value="2"></el-option> + <el-option label="飞行检查" value="3"></el-option> + </el-select> + </el-form-item> + </el-col> - <el-form-item v-if="item.columnType =='select'" :prop="item.columnName"> - <span slot="label"> - {{item.columnDesc}} - </span> - <el-select v-model="inputQuery[item.columnName]" :style="item.style"> - <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'" :prop="item.columnName"> - <span slot="label"> - {{item.columnDesc}} - </span> - <el-select - v-model="inputQuery[item.columnName]" - :placeholder="item.columnDesc" - @change="executeFuc($event,'5',item.clickFuc)" - :disabled="executeEval(null,item.disabledFuc,false)" - filterable - remote - :remote-method="(query) => executeFuc(query,'5',item.dataFuc)" - clearable> - <el-option - v-for="item in options[item.dataFuc]" - :key="item.code" - :label="item.label" - :value="item.code" - > - <span style="float: left">{{ item.label }}</span> - <span style="float: right; color: #8492a6; font-size: 13px">{{ - item.code - }}</span> - </el-option> - </el-select> - </el-form-item> - <el-form-item v-if="item.columnType =='date'" :rules="item.checkRulesObj" :prop="item.columnName"> - <span slot="label"> - {{item.columnDesc}} - </span> - <el-date-picker - v-model="inputQuery[item.columnName]" - :style="item.style" - value-format="yyyy-MM-dd" - type="date" - :placeholder="item.columnDesc" - ></el-date-picker> - </el-form-item> - <el-form-item v-if="item.columnType =='treeCustom'" :prop="item.columnName"> - <span slot="label"> - {{item.columnDesc}} - </span> - <treeselect - v-model="inputQuery[item.columnName]" - :options="menuOptions" - :normalizer="normalizer" - :show-count="true" - :placeholder="item.columnName" - /> - </el-form-item> - </div> - </el-col> - </template> </el-row> - </template> + <el-row :gutter="20" class="el-row" type="flex"> + <el-col class="el-col" type="flex"> + <el-form-item label="公告发布索引号:" class="query-form-item"> + <el-input + style="width: 80%" + size="small" + placeholder="请输入公告发布索引号" + v-model="inputQuery.publicCode" + ></el-input> + </el-form-item> + </el-col> + <el-col class="el-col" type="flex"> + <el-form-item label="发布人:" class="query-form-item"> + <el-input + style="width: 80%" + size="small" + placeholder="请输入发布人" + v-model="inputQuery.publicName" + ></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row :gutter="20" class="el-row" type="flex"> + <el-col class="el-col" type="flex"> + <el-form-item label="发布主题分类:" class="query-form-item"> + <el-input + style="width: 80%" + size="small" + placeholder="请输入发布主题分类" + v-model="inputQuery.publicSubject" + ></el-input> + </el-form-item> + </el-col> + <el-col class="el-col" type="flex"> + <el-form-item label="发布时间:" class="query-form-item"> + <el-date-picker + v-model="inputQuery.publicTime" + style="width: 80%" + value-format="yyyy-MM-dd" + type="date" + placeholder="请输入发布时间" + ></el-date-picker> + </el-form-item> + </el-col> + </el-row> + <el-row :gutter="20" class="el-row" type="flex"> + <el-col class="el-col" type="flex"> + <el-form-item label="发布标题:" class="query-form-item"> + <el-input + style="width: 80%" + size="small" + placeholder="请输入发布标题" + v-model="inputQuery.publicTitle" + ></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row :gutter="20" class="el-row" type="flex"> + <el-col class="el-col" type="flex"> + <el-form-item label="发布来源名称:" class="query-form-item"> + <el-input + style="width: 80%" + size="small" + placeholder="请输入发布来源名称" + v-model="inputQuery.sourceName" + ></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row :gutter="20" class="el-row" type="flex"> + <el-col class="el-col" type="flex"> + <el-form-item label="发布来源地址:" class="query-form-item"> + <el-input + style="width: 80%" + size="small" + placeholder="请输入发布来源地址" + v-model="inputQuery.sourceUrl" + ></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row :gutter="20" class="el-row" type="flex"> + <el-col class="el-col" type="flex"> + <el-form-item label="公告内容:" class="query-form-item"> + <el-input + style="width: 80%" + size="small" + type="textarea" + placeholder="请输入公告内容" + v-model="inputQuery.annContent" + ></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row :gutter="20" class="el-row" type="flex"> + <el-col class="el-col" type="flex"> + <el-form-item label="检查异常信息:" class="query-form-item"> + <el-input + style="width: 80%" + size="small" + type="textarea" + placeholder="请输入检查异常信息" + v-model="inputQuery.errContent" + ></el-input> + </el-form-item> + </el-col> + </el-row> <div style='text-align: center; margin-bottom: 10px;margin-top: 18px ;'> <el-button @click="closeDialog">取消</el-button> <el-button type="primary" @click="submitInv">提交</el-button> </div> - </el-form> </el-card> + </el-form> </div> </template> <script> import {savegg} from "@/api/anno/anncmntDev"; -import { - getHead,executeFuc -} from "@/utils/customConfig"; export default { name: "indexDialog", @@ -138,13 +325,7 @@ export default { }, data() { return { - tableHeader:[], - queryList:[], - fromList:[], - tableObj:[], - options: { - - }, + } }, methods: { @@ -175,25 +356,9 @@ export default { }); } }, - executeFuc(row,type,clickFuc,value){ - return executeFuc(this,row,type,clickFuc,value); - }, - executeEval(row,expression,defaultRet){ - if(expression){ - return eval(expression); - } - return defaultRet; - } }, components: {}, created() { - getHead("anncmntDev","1").then((re) => { - // 处理返回的数据 - this.tableObj = re.data; - this.tableHeader = re.data.tableList; - this.queryList = re.data.queryList; - this.fromList = re.data.fromList; - }); }, } </script>