<template>
|
<div class="app-container">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-row>
|
<el-col>
|
<el-form-item label="姓名" prop="name">
|
<el-input style="width: 120px" v-model="queryParams.name" placeholder="请输入姓名" clearable
|
@keyup.enter.native="handleQuery" />
|
</el-form-item>
|
<el-form-item label="身份证号" prop="idCard">
|
<el-input v-model="queryParams.idCard" placeholder="请输入身份证号" clearable @keyup.enter.native="handleQuery" />
|
</el-form-item>
|
|
<el-form-item label="单位名称" prop="company">
|
<el-select :remote-method="getRemoteData" v-model="queryParams.company" remote default-first-option
|
allow-create filterable style="width: 200px" placeholder="请选择单位名称" clearable @change="idFn1">
|
<el-option v-for="dict in CompanyList" :key="dict.cnName" :label="dict.cnName"
|
:value="dict.drugManufacturerId" />
|
</el-select>
|
<i class="el-icon-circle-plus-outline" @click="handleAdd1"></i>
|
</el-form-item>
|
|
<el-form-item label="结算时间">
|
<el-date-picker clearable v-model="queryParams.reservationTime" type="date" value-format="yyyy-MM-dd"
|
placeholder="请选择结算时间">
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
<el-col>
|
<el-form-item label="联系电话" prop="phoe">
|
<el-input v-model="queryParams.phoe" placeholder="请输入联系电话" clearable @keyup.enter.native="handleQuery"
|
style="width: 140px" />
|
</el-form-item>
|
<el-form-item label="结算状态" prop="isExpire">
|
<el-select v-model="queryParams.isExpire" placeholder="请选择是否超期" clearable style="width: 140px">
|
<el-option v-for="dict in options" :key="dict.value" :label="dict.label" :value="dict.value" />
|
</el-select>
|
</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-col>
|
</el-row>
|
</el-form>
|
<el-row :gutter="10" style="margin: 10px 15px">
|
<el-col :span="1.5">
|
<el-button type="primary" size="mini" :disabled="multiple" @click="batch">结算</el-button>
|
<!-- v-hasPermi="['reservation:reservation:remove']" -->
|
</el-col>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
</el-row>
|
|
<el-table border v-loading="loading" :data="reservationList" @selection-change="handleSelectionChange"
|
:default-sort="{ prop: 'reservationTime', order: 'descending' }" highlight-current-row style="margin-left: 15px">
|
<el-table-column type="selection" width="40px" align="center" fixed="left" :selectable="selectHandle" />
|
<el-table-column label="姓名" align="center" prop="name" width="90px" :show-overflow-tooltip="true" fixed="left" />
|
<el-table-column label="性别" align="center" prop="sex" width="60px" :show-overflow-tooltip="true">
|
<template slot-scope="scope">
|
<span v-if="scope.row.sex == '0'">男</span>
|
<span v-if="scope.row.sex == '1'">女</span>
|
<span v-if="scope.row.sex == '2'">未知</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="年龄" align="center" prop="age" width="60px" :show-overflow-tooltip="true" />
|
<el-table-column label="身份证号" align="center" prop="idCard" width="170px" :show-overflow-tooltip="true" />
|
<el-table-column label="出生日期" align="center" prop="birthday" width="100px" :show-overflow-tooltip="true">
|
<template slot-scope="scope">
|
<span>{{ parseTime(scope.row.birthday, "{y}-{m}-{d}") }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="联系电话" align="center" prop="phoe" width="110px" :show-overflow-tooltip="true" />
|
<el-table-column label="单位名称" align="center" prop="company" :show-overflow-tooltip="true" />
|
<el-table-column label="收费金额" align="center" prop="email" width="160px" />
|
<el-table-column label="登记时间" align="center" prop="reservationTime" width="100px" :show-overflow-tooltip="true"
|
sortable>
|
<template slot-scope="scope">
|
<span>{{ parseTime(scope.row.reservationTime, "{y}-{m}-{d}") }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="结算时间" align="center" prop="reservationTime" width="100px" :show-overflow-tooltip="true"
|
sortable>
|
<template slot-scope="scope">
|
<span>{{ parseTime(scope.row.reservationTime, "{y}-{m}-{d}") }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="结算状态" align="center" prop="tjType" width="80px" :show-overflow-tooltip="true">
|
<template slot-scope="scope">
|
<dict-tag :options="dict.type.dict_team" :value="scope.row.tjType" />
|
</template>
|
</el-table-column>
|
<el-table-column label="体检状态" align="center" prop="tjType" width="80px" :show-overflow-tooltip="true">
|
<template slot-scope="scope">
|
<dict-tag :options="dict.type.dict_team" :value="scope.row.tjType" />
|
</template>
|
</el-table-column>
|
|
|
|
<el-table-column label="操作" align="center" width="90px" fixed="right">
|
<template slot-scope="scope">
|
<el-button size="mini" type="text" icon="el-icon-s-order" @click="handleUpdate1(scope.row)"
|
title="结算"></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="open1" width="1000px" append-to-body>
|
<el-form ref="form1" :model="form1" :rules="rules1" label-width="100px" :inline="true">
|
<el-form-item label="单位名称" prop="cnName">
|
<el-input v-model="form1.cnName" placeholder="请输入中文名称" />
|
</el-form-item>
|
<el-form-item label="联系人" prop="contactPerson">
|
<el-input v-model="form1.contactPerson" placeholder="请输入联系人" />
|
</el-form-item>
|
<el-form-item label="联系电话" prop="contactPhone">
|
<el-input v-model="form1.contactPhone" placeholder="请输入联系电话" />
|
</el-form-item>
|
<el-form-item label="税号" prop="taxNumber">
|
<el-input v-model="form1.taxNumber" placeholder="请输入税号" />
|
</el-form-item>
|
<el-form-item label="法人" prop="legalPerson">
|
<el-input v-model="form1.legalPerson" placeholder="请输入法人" />
|
</el-form-item>
|
<el-form-item label="注册地址" prop="registerAddress">
|
<el-input v-model="form1.registerAddress" placeholder="请输入注册地址" />
|
</el-form-item>
|
<el-form-item label="通讯地址" prop="mailingAddress">
|
<el-input v-model="form1.mailingAddress" placeholder="请输入通讯地址" />
|
</el-form-item>
|
<el-form-item label="开户银行" prop="bankAccount">
|
<el-input v-model="form1.bankAccount" placeholder="请输入开户银行" />
|
</el-form-item>
|
<el-form-item label="银行账户" prop="countNum">
|
<el-input v-model="form1.countNum" placeholder="请输入银行账户" />
|
</el-form-item>
|
<el-form-item label="邮箱" prop="email">
|
<el-input v-model="form1.email" placeholder="请输入邮箱" />
|
</el-form-item>
|
<el-form-item label="负责人" prop="principal">
|
<el-input v-model="form1.principal" placeholder="请输入负责人" />
|
</el-form-item>
|
<el-form-item label="网址" prop="url">
|
<el-input v-model="form1.url" placeholder="请输入网址" />
|
</el-form-item>
|
<el-form-item label="传真" prop="faxNumber">
|
<el-input v-model="form1.faxNumber" placeholder="请输入传真" />
|
</el-form-item>
|
<el-form-item label="行政区划名称" prop="areaName">
|
<el-input v-model="form1.areaName" placeholder="请输入行政区划名称" />
|
</el-form-item>
|
<el-form-item label="排序" prop="orderNum">
|
<el-input v-model="form1.orderNum" placeholder="请输入排序" />
|
</el-form-item>
|
<el-form-item label="有效时间" prop="validTime">
|
<el-date-picker clearable v-model="form1.validTime" type="date" value-format="yyyy-MM-dd"
|
placeholder="请选择有效时间">
|
</el-date-picker> </el-form-item><br />
|
<el-form-item label="备注" prop="remark">
|
<el-input v-model="form1.remark" type="textarea" placeholder="请输入内容" :rows="2" label-width="400px"
|
style="width: 830px" resize="none"></el-input>
|
</el-form-item>
|
</el-form>
|
<div slot="footer" class="dialog-footer2">
|
<el-button type="primary" @click="submitFormS">确 定</el-button>
|
<el-button @click="cancel1">取 消</el-button>
|
</div>
|
</el-dialog>
|
</div>
|
</template>
|
|
<script>
|
import { addComp } from "@/api/system/comp";
|
import {
|
listReservation,
|
} from "@/api/reservation/reservation";
|
import {
|
getconfigKey,
|
} from "@/api/system/tijian";
|
import { getCompany, queryCompany } from "@/api/team/tuanti";
|
import VTreeTransfer from "../../system/tijian/TreeTransfer.vue";
|
export default {
|
components: {
|
VTreeTransfer,
|
},
|
name: "Reservation",
|
dicts: [
|
"dict_user_national",
|
"dict_user_national",
|
"dict_user_marry",
|
"sys_yes_no",
|
"sys_user_sex",
|
"dict_team",
|
"tj_time_region",
|
"dict_tjtype",
|
"dict_job",
|
"dict_user_cardtype",
|
"dict_ageunit",
|
],
|
data() {
|
let checkPhoneNum = (rule, value, callback) => {
|
let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/);
|
if (value == "" && value == undefined && !value) {
|
return callback("");
|
} else if (value != undefined && value != "") {
|
return callback();
|
} else if (!patter.test(value)) {
|
return callback("");
|
}
|
};
|
return {
|
index: 0,
|
proIds: "",
|
alue: "2",
|
pacName: "",
|
url: "",
|
list: [],
|
// 遮罩层
|
loading: false,
|
size: "",
|
tcShow: false,
|
// 搜索套餐名字
|
name: "",
|
// 选中数组
|
ids: [],
|
// 非单个禁用
|
single: true,
|
// 非多个禁用
|
multiple: true,
|
// 是否显示弹出层
|
|
pacId: "",
|
cusIds: [],
|
createTimeList: "",
|
startTime: "",
|
proIds: [],
|
// 显示搜索条件
|
showSearch: true,
|
// 树状形状
|
data: [],
|
// 查询参数
|
queryParam: {
|
pageNum: 1,
|
pageSize: 10,
|
pacName: null,
|
pacRemark: null,
|
},
|
socket: null,
|
value: 1,
|
sendFlag: 0,
|
sector: 0,
|
// 查询参数
|
queryParams: {
|
pageNum: 1,
|
pageSize: 10,
|
},
|
|
fmobj: {},
|
// 表单校验
|
form1: {},
|
open1: false,
|
rules1: {
|
cnName: [{ required: true, trigger: "blur" }],
|
contactPerson: [{ required: true, trigger: "blur" }],
|
contactPhone: [
|
{
|
required: true,
|
trigger: "blur",
|
},
|
{
|
pattern: /^1[3-9]\d{9}$/,
|
trigger: "blur",
|
},
|
],
|
},
|
rules: {
|
cusName: [
|
{ required: true, validator: checkPhoneNum, trigger: "blur" },
|
],
|
cusSex: [
|
{ required: true, validator: checkPhoneNum, trigger: "change" },
|
],
|
cusBrithday: [
|
{ required: true, validator: checkPhoneNum, trigger: "blur" },
|
],
|
cusPhone: [
|
{ required: true, validator: checkPhoneNum, trigger: "blur" },
|
],
|
reservationTime: [
|
{ required: true, validator: checkPhoneNum, trigger: "change" },
|
],
|
timeRegion: [
|
{ required: true, validator: checkPhoneNum, trigger: "blur" },
|
],
|
},
|
options: [
|
{
|
value: "1",
|
label: "已结算",
|
},
|
{
|
value: "2",
|
label: "未结算",
|
},
|
],
|
CompanyList: [],
|
// 遮罩层
|
loading: true,
|
// 选中数组
|
ids: [],
|
// 非单个禁用
|
single: true,
|
// 非多个禁用
|
multiple: true,
|
// 显示搜索条件
|
showSearch: true,
|
// 总条数
|
total: 0,
|
// 体检预约表格数据
|
reservationList: [],
|
// 弹出层标题
|
title: "",
|
// 查询参数
|
queryParams: {
|
pageNum: 1,
|
pageSize: 10,
|
orderByColumn: "reservationTime",
|
isAsc: "desc",
|
name: null,
|
reservationTime: null,
|
idCard: null,
|
phoe: null,
|
email: null,
|
tjType: null,
|
company: null,
|
reservationTime: null,
|
isExpire: null,
|
},
|
// 表单参数
|
form: {},
|
// 表单校验
|
rules: {
|
name: [
|
{
|
required: true,
|
validator: checkPhoneNum,
|
trigger: "blur",
|
},
|
],
|
idCard: [
|
{
|
required: true,
|
validator: checkPhoneNum,
|
trigger: "blur",
|
},
|
],
|
phoe: [
|
{
|
required: true,
|
validator: checkPhoneNum,
|
trigger: "blur",
|
},
|
],
|
|
},
|
pickerOptions: {
|
shortcuts: [
|
{
|
text: "最近一周",
|
onClick(picker) {
|
const end = new Date();
|
const start = new Date(new Date().setHours(0, 0, 0, 0));
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
picker.$emit("pick", [start, end]);
|
},
|
},
|
{
|
text: "最近一个月",
|
onClick(picker) {
|
const end = new Date();
|
const start = new Date(new Date().setHours(0, 0, 0, 0));
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
picker.$emit("pick", [start, end]);
|
},
|
},
|
{
|
text: "最近三个月",
|
onClick(picker) {
|
const end = new Date();
|
const start = new Date(new Date().setHours(0, 0, 0, 0));
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
picker.$emit("pick", [start, end]);
|
},
|
},
|
],
|
},
|
};
|
},
|
created() {
|
this.getList();
|
},
|
methods: {
|
|
getCompanyList() {
|
this.loading = true;
|
getconfigKey("team_reservation_default_day").then((res) => {
|
this.queryParams.yxts = res.msg;
|
});
|
getCompany(this.queryParam).then((response) => {
|
this.CompanyList = response.data;
|
this.total = response.total;
|
this.loading = false;
|
});
|
},
|
cancel1() {
|
this.open1 = false;
|
this.reset1();
|
},
|
submitFormS() {
|
this.$refs["form1"].validate((valid) => {
|
if (valid) {
|
addComp(this.form1).then((response) => {
|
this.$modal.msgSuccess("新增成功");
|
this.open1 = false;
|
this.getCompanyList();
|
});
|
}
|
});
|
},
|
reset1() {
|
this.form1 = {
|
company: "",
|
payType: "",
|
name: "",
|
phoe: "",
|
signingPic: "",
|
};
|
},
|
handleAdd1() {
|
this.reset1();
|
this.open1 = true;
|
this.title = "添加体检单位信息维护";
|
},
|
idFn1(value) {
|
if (value) {
|
this.form.dictCompId = value;
|
this.CompanyList.forEach((item) => {
|
if (item.drugManufacturerId == this.form.dictCompId) {
|
this.form.compName = item.cnName;
|
this.queryParams.company = item.cnName;
|
}
|
});
|
}
|
},
|
/** 查询体检预约列表 */
|
getList() {
|
this.loading = true;
|
listReservation(this.queryParams).then((response) => {
|
this.reservationList = 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;
|
});
|
// 获取单位信息集合
|
getCompany(this.queryParam).then((response) => {
|
this.CompanyList = response.data;
|
});
|
},
|
// 取消按钮
|
cancel() {
|
this.open = false;
|
this.reset();
|
},
|
// 体检公司拼音搜索
|
getRemoteData(query) {
|
if (query) {
|
let compName = query;
|
queryCompany(compName).then((response) => {
|
this.CompanyList = response.data;
|
});
|
}
|
},
|
// 表单重置
|
reset() {
|
this.form = {
|
id: null,
|
name: null,
|
sex: null,
|
age: null,
|
idCard: null,
|
birthday: null,
|
phoe: null,
|
email: null,
|
address: null,
|
marriage: null,
|
nation: null,
|
tjCategory: null,
|
tjType: null,
|
proIds: null,
|
pacId: null,
|
company: null,
|
companyId: null,
|
jobNo: null,
|
department: null,
|
departmentId: null,
|
position: null,
|
createTime: null,
|
createBy: null,
|
updateTime: null,
|
updateBy: null,
|
reservationTime: null,
|
isExpire: null,
|
deleted: null,
|
payType: null,
|
};
|
this.resetForm("form");
|
},
|
/** 搜索按钮操作 */
|
handleQuery() {
|
this.queryParams.pageNum = 1;
|
this.getList();
|
},
|
/** 重置按钮操作 */
|
resetQuery() {
|
this.startTime = [];
|
this.createTimeList = [];
|
this.resetForm("queryForm");
|
this.queryParams = {
|
pageNum: 1,
|
pageSize: 10,
|
cusName: null,
|
cusSex: null,
|
cusBrithday: null,
|
cusAddr: null,
|
cusPhone: null,
|
yykssj: "", // 预约开始时间
|
yyjssj: "", // 预约结束时间
|
cusPostcode: null,
|
cusEmail: null,
|
indexCard: null,
|
cusNational: null,
|
cusMarryStatus: null,
|
cusIdcard: null,
|
cusIntroduce: null,
|
cusNumber: null,
|
cusIsvip: null,
|
};
|
this.handleQuery();
|
},
|
// 多选框选中数据
|
handleSelectionChange(selection) {
|
this.cusIds = selection.map((item) => item.idCard);
|
selection.forEach((item) => {
|
this.fmobj = item;
|
});
|
this.ids = selection.map((item) => item.id);
|
this.single = selection.length !== 1;
|
this.multiple = !selection.length;
|
},
|
selectHandle(row, index) {
|
if (row.isExpire === 1) {
|
return false;
|
} else {
|
return true;
|
}
|
},
|
/** 结算 */
|
handleUpdate1(row) {
|
|
},
|
|
batch() {
|
|
},
|
},
|
};
|
</script>
|
<style scoped>
|
.pag {
|
width: 100%;
|
display: flex;
|
justify-content: center;
|
}
|
|
.pag1 {
|
width: 30%;
|
}
|
|
.el-table .el-table__body tr:hover td {
|
background-color: #e5f3ff;
|
}
|
|
.el-table__header-wrapper .el-checkbox {
|
display: none;
|
}
|
|
|
.tab {
|
display: flex;
|
width: 100%;
|
}
|
|
.dialog-footer2 {
|
width: 960px;
|
height: 36px;
|
display: flex;
|
justify-content: center;
|
}
|
</style>
|