| | |
| | | <template> |
| | | <div class="capacity-scope"> |
| | | <div class="search"> |
| | | <div> |
| | | <el-form :model="queryParams" ref="queryParams" size="small" :inline="true"> |
| | | <el-form-item label="模板名称" prop="name"> |
| | | <el-input v-model="queryParams.name" clearable placeholder="请输入" size="small" |
| | | @keyup.enter.native="refreshTable($event)"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" size="mini" @click="refreshTable">查询</el-button> |
| | | <el-button size="mini" @click="refresh">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div class="search_box"> |
| | | <div class="search_item"> |
| | | <span class="search_label">检验项目</span> |
| | | <el-input v-model="queryParams.name" clearable placeholder="请输入" size="small" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </div> |
| | | <div class="search_button"> |
| | | <el-button type="primary" size="mini" @click="refreshTable">查询</el-button> |
| | | <el-button size="mini" @click="refresh">重置</el-button> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <el-button v-if="checkPermi(['standard:model:add'])" size="small" type="primary" @click="openAdd">新增</el-button> |
| | |
| | | <el-dialog :before-close="closeCopyTem" :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :visible.sync="isShowCopyTem" :title="title" width="35%" :modal-append-to-body="false"> |
| | | <el-form ref="copyForm" :model="copyForm" :rules="copyFormRules" label-position="right" label-width="80px"> |
| | | <el-form-item label="模版编号" prop="number"> |
| | | <el-form-item label="检验依据" prop="number"> |
| | | <el-input v-model="copyForm.number" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="模版名称" prop="name"> |
| | | <el-form-item label="检验项目" prop="name"> |
| | | <el-input v-model="copyForm.name" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input v-model="copyForm.remark" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="价格(元)" prop="price"> |
| | | <el-input v-model="copyForm.price" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | |
| | | number: "", |
| | | name: "", |
| | | remark: "", |
| | | price: "", |
| | | id: "", |
| | | }, |
| | | copyFormRules: { |
| | | name: [{ required: true, message: "请输入模版名称", trigger: "blur" }], |
| | | name: [{ required: true, message: "请输入检验项目", trigger: "blur" }], |
| | | }, |
| | | queryParams: { |
| | | name: null, |
| | | }, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "模板编号", prop: "number" }, |
| | | { label: "模板名称", prop: "name" }, |
| | | { label: "检验依据", prop: "number" }, |
| | | { label: "检验项目", prop: "name" }, |
| | | { label: "备注", prop: "remark" }, |
| | | { label: "价格(元)", prop: "price" }, |
| | | { label: "创建用户", prop: "createUserName" }, |
| | | { label: "创建时间", prop: "createTime", width: "160" }, |
| | | { label: "更新用户", prop: "updateUserName" }, |
| | |
| | | name: this.copyForm.name, |
| | | number: this.copyForm.number, |
| | | remark: this.copyForm.remark, |
| | | price: this.copyForm.price === "" || this.copyForm.price == null ? null : this.copyForm.price, |
| | | }; |
| | | switch (this.title) { |
| | | case "新增": |
| | |
| | | this.isShowCopyTem = false; |
| | | this.submitCopyInfoLoading = false; |
| | | this.$message.success("新增成功"); |
| | | this.refreshTable("page"); |
| | | this.getList(); |
| | | }) |
| | | .catch((err) => { |
| | | console.log("copyTemplate----", err); |
| | |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | .search_box { |
| | | display: flex; |
| | | } |
| | | .search_item { |
| | | margin-bottom: 18px; |
| | | margin-right: 10px; |
| | | display: flex; |
| | | align-items: center; |
| | | line-height: 32px; |
| | | } |
| | | .search_label { |
| | | width: 88px; |
| | | font-size: 14px; |
| | | font-weight: 700; |
| | | color: #606266; |
| | | } |
| | | .search_button { |
| | | line-height: 26px; |
| | | } |
| | | </style> |