New file |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | size="small" |
| | | :inline="true" |
| | | v-show="showSearch" |
| | | label-width="68px" |
| | | > |
| | | <el-form-item label="单位名称" prop="cnName"> |
| | | <el-input |
| | | v-model="queryParams.cnName" |
| | | placeholder="请输入单位名称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="联系人" prop="contactPerson"> |
| | | <el-input |
| | | v-model="queryParams.contactPerson" |
| | | placeholder="请输入联系人" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="联系电话" prop="contactPhone"> |
| | | <el-input |
| | | v-model="queryParams.contactPhone" |
| | | placeholder="请输入联系电话" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="体检类别" prop="tjPacType"> |
| | | <el-select |
| | | v-model="queryParams.tjPacType" |
| | | placeholder="请选择体检类别" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="dict in dict.type.dict_tjtype" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="预约时间"> |
| | | <el-date-picker |
| | | v-model="daterangeTjTime" |
| | | style="width: 240px" |
| | | value-format="yyyy-MM-dd" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >搜索</el-button |
| | | > |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
| | | >重置</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <!-- <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['hosp:teamAppLog:add']" |
| | | >新增 |
| | | </el-button> |
| | | </el-col> --> |
| | | <!-- <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['hosp:teamAppLog:edit']" |
| | | >修改 |
| | | </el-button> |
| | | </el-col> --> |
| | | <!-- <el-col :span="1.5"> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="el-icon-delete" |
| | | size="mini" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['hosp:teamAppLog:remove']" |
| | | >删除 |
| | | </el-button> |
| | | </el-col> --> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['hosp:teamAppLog:export']" |
| | | >导出 |
| | | </el-button> |
| | | </el-col> |
| | | <right-toolbar |
| | | :showSearch.sync="showSearch" |
| | | @queryTable="getList" |
| | | ></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="teamAppLogList" |
| | | @selection-change="handleSelectionChange" |
| | | border |
| | | > |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="序号" align="center" prop="newID" :show-overflow-tooltip="true"/> |
| | | <el-table-column label="单位名称" align="center" prop="cnName" :show-overflow-tooltip="true"/> |
| | | <el-table-column label="税号" align="center" prop="taxNumber" :show-overflow-tooltip="true"/> |
| | | <el-table-column label="联系人" align="center" prop="contactPerson" :show-overflow-tooltip="true"/> |
| | | <el-table-column label="联系电话" align="center" prop="contactPhone" :show-overflow-tooltip="true"/> |
| | | <el-table-column label="通讯地址" align="center" prop="mailingAddress" :show-overflow-tooltip="true"/> |
| | | <el-table-column label="邮箱" align="center" prop="email" :show-overflow-tooltip="true"/> |
| | | <el-table-column label="体检人数" align="center" prop="count" :show-overflow-tooltip="true"/> |
| | | <el-table-column label="体检类别" align="center" prop="tjPacType" :show-overflow-tooltip="true"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.dict_tjtype" :value="scope.row.tjPacType"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="预约时间" align="center" prop="tjTime" width="180" :show-overflow-tooltip="true"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.tjTime, "{y}-{m}-{d}") }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="所选套餐" align="center" prop="pacId" :show-overflow-tooltip="true"/> |
| | | <el-table-column label="套餐名称" align="center" prop="pacName" :show-overflow-tooltip="true"/> |
| | | <el-table-column label="来源" align="center" prop="fromBy" :show-overflow-tooltip="true"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.tj_from_by" :value="scope.row.fromBy"/> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column |
| | | label="操作" |
| | | align="center" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['hosp:teamAppLog:edit']" |
| | | >修改 |
| | | </el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['hosp:teamAppLog:remove']" |
| | | >删除 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> --> |
| | | </el-table> |
| | | |
| | | <div class="pag"> |
| | | <div class="pag1"> |
| | | <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" @pagination="getList" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 添加或修改小程序团队预约记录对话框 --> |
| | | <!-- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="单位名称" prop="cnName"> |
| | | <el-input v-model="form.cnName" placeholder="请输入单位名称" /> |
| | | </el-form-item> |
| | | <el-form-item label="税号" prop="taxNumber"> |
| | | <el-input v-model="form.taxNumber" placeholder="请输入税号" /> |
| | | </el-form-item> |
| | | <el-form-item label="联系人" prop="contactPerson"> |
| | | <el-input v-model="form.contactPerson" placeholder="请输入联系人" /> |
| | | </el-form-item> |
| | | <el-form-item label="联系电话" prop="contactPhone"> |
| | | <el-input v-model="form.contactPhone" placeholder="请输入联系电话" /> |
| | | </el-form-item> |
| | | <el-form-item label="通讯地址" prop="mailingAddress"> |
| | | <el-input |
| | | v-model="form.mailingAddress" |
| | | placeholder="请输入通讯地址" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="邮箱" prop="email"> |
| | | <el-input v-model="form.email" placeholder="请输入邮箱" /> |
| | | </el-form-item> |
| | | <el-form-item label="体检人数" prop="count"> |
| | | <el-input v-model="form.count" placeholder="请输入体检人数" /> |
| | | </el-form-item> |
| | | <el-form-item label="体检类别" prop="tjPacType"> |
| | | <el-select |
| | | v-model="form.tjPacType" |
| | | placeholder="请选择体检类别(字典)" |
| | | > |
| | | <el-option |
| | | v-for="dict in dict.type.dict_tjtype" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="预约时间" prop="tjTime"> |
| | | <el-date-picker |
| | | clearable |
| | | v-model="form.tjTime" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="请选择预约时间" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="所选套餐" prop="pacId"> |
| | | <el-input v-model="form.pacId" placeholder="请输入所选套餐" /> |
| | | </el-form-item> |
| | | <el-form-item label="套餐名称" prop="pacName"> |
| | | <el-input v-model="form.pacName" placeholder="请输入套餐名称" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> --> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | listTeamAppLog, |
| | | getTeamAppLog, |
| | | delTeamAppLog, |
| | | addTeamAppLog, |
| | | updateTeamAppLog, |
| | | } from "@/api/hosp/teamAppLog"; |
| | | |
| | | export default { |
| | | name: "TeamAppLog", |
| | | dicts: ["dict_tjtype","tj_from_by"], |
| | | data() { |
| | | return { |
| | | // 遮罩层 |
| | | loading: true, |
| | | // 选中数组 |
| | | ids: [], |
| | | // 非单个禁用 |
| | | single: true, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | // 显示搜索条件 |
| | | showSearch: true, |
| | | // 总条数 |
| | | total: 0, |
| | | // 小程序团队预约记录表格数据 |
| | | teamAppLogList: [], |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | // 来源时间范围 |
| | | daterangeTjTime: [], |
| | | // 查询参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | cnName: null, |
| | | contactPerson: null, |
| | | contactPhone: null, |
| | | tjPacType: null, |
| | | tjTime: null, |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | | // 表单校验 |
| | | rules: { |
| | | cnName: [ |
| | | { |
| | | required: true, |
| | | message: "单位名称不能为空", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | contactPhone: [ |
| | | { |
| | | required: true, |
| | | message: "联系电话不能为空", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | count: [ |
| | | { |
| | | required: true, |
| | | message: "体检人数不能为空", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | createTime: [ |
| | | { |
| | | required: true, |
| | | message: "创建时间不能为空", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | deleted: [ |
| | | { |
| | | required: true, |
| | | message: "删除标记不能为空", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** 查询小程序团队预约记录列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | this.queryParams.params = {}; |
| | | if (null != this.daterangeTjTime && "" != this.daterangeTjTime) { |
| | | this.queryParams.params["beginTjTime"] = this.daterangeTjTime[0]; |
| | | this.queryParams.params["endTjTime"] = this.daterangeTjTime[1]; |
| | | } |
| | | listTeamAppLog(this.queryParams).then((response) => { |
| | | this.teamAppLogList = response.rows; |
| | | response.rows.forEach((item, index) => { |
| | | item.newID = |
| | | (this.queryParams.pageNum - 1) * this.queryParams.pageSize + |
| | | index + |
| | | 1; |
| | | }); |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表单重置 |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | cnName: null, |
| | | taxNumber: null, |
| | | contactPerson: null, |
| | | contactPhone: null, |
| | | mailingAddress: null, |
| | | email: null, |
| | | count: null, |
| | | tjPacType: null, |
| | | tjTime: null, |
| | | pacId: null, |
| | | pacName: null, |
| | | fromBy: null, |
| | | createBy: null, |
| | | createTime: null, |
| | | updateBy: null, |
| | | updateTime: null, |
| | | deleted: null, |
| | | createId: null, |
| | | updateId: null, |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | | this.daterangeTjTime = []; |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map((item) => item.id); |
| | | this.single = selection.length !== 1; |
| | | this.multiple = !selection.length; |
| | | }, |
| | | // /** 新增按钮操作 */ |
| | | // handleAdd() { |
| | | // this.reset(); |
| | | // this.open = true; |
| | | // this.title = "添加小程序团队预约记录"; |
| | | // }, |
| | | // /** 修改按钮操作 */ |
| | | // handleUpdate(row) { |
| | | // this.reset(); |
| | | // const id = row.id || this.ids |
| | | // getTeamAppLog(id).then(response => { |
| | | // this.form = response.data; |
| | | // this.open = true; |
| | | // this.title = "修改小程序团队预约记录"; |
| | | // }); |
| | | // }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | this.download( |
| | | "hosp/teamAppLog/export", |
| | | { |
| | | ...this.queryParams, |
| | | }, |
| | | `hosp_${new Date().getTime()}.xlsx` |
| | | ); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .pag { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .pag1 { |
| | | width: 30%; |
| | | } |
| | | </style> |