<template>
|
<div>
|
<el-form :model="queryParams" ref="tableList" :inline="true" label-width="76px" style="margin-top: 10px">
|
<el-form-item label="姓名" prop="name">
|
<el-input v-model="queryParams.name" style="width: 120px" placeholder="请输入姓名" clearable
|
@keyup.enter.native="handleQuery"></el-input>
|
</el-form-item>
|
<el-form-item label="体检号" prop="tjNumber">
|
<el-input ref="inputName" v-model="queryParams.tjNumber" style="width: 180px" placeholder="请输入体检号" clearable
|
@keyup.enter.native="submitForm" @blur="hb"></el-input>
|
</el-form-item>
|
<el-form-item label="体检时间" prop="tjTime">
|
<el-date-picker v-model="startTime" type="datetimerange" align="right" :picker-options="pickerOptions"
|
style="width: 310px" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:00:00']"
|
format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" @change="dateChangebirthday1">
|
</el-date-picker> </el-form-item>
|
<el-form-item label="单位名称" prop="tjCompName" style="margin-left: 20px;">
|
<el-select :remote-method="getRemoteData" v-model="queryParams.tjCompName" value-key="drugManufacturerId"
|
style="width: 180px" remote filterable placeholder="请选择单位名称" clearable @change="searchSelect">
|
<el-option v-for="dict in CompanyList" :key="dict.drugManufacturerId" :label="dict.cnName" :value="dict" />
|
</el-select>
|
</el-form-item>
|
<el-form-item>
|
<el-button type="primary" size="mini" @click="submitForm">搜索</el-button>
|
<el-button size="mini" @click="resetQuery">重置</el-button>
|
</el-form-item>
|
</el-form>
|
|
|
<el-row :gutter="10" class="mb8" style="margin-left:14px ;">
|
<el-col :span="1.5">
|
<el-button type="primary" size="mini" @click="radioChange" v-hasPermi="['system:notice:add']">核收</el-button>
|
</el-col>
|
</el-row>
|
|
<template>
|
<el-table v-loading="loading" :data="checkList" ref="table" border @selection-change="handleSelectionChange"
|
style="margin: 20px; width: 98%">
|
<el-table-column type="selection" width="40px" align="center" fixed="left" />
|
<!-- <template slot="empty">数据正在加载中</template> -->
|
<el-table-column label="体检号" align="center" prop="tjNumber" :show-overflow-tooltip="true" width="160px"
|
fixed="left" />
|
<el-table-column label="姓名" align="center" prop="cusName" :show-overflow-tooltip="true" width="100px"
|
fixed="left" />
|
|
<el-table-column label="性别" align="center" prop="cusSex" :show-overflow-tooltip="true" width="55px">
|
<template slot-scope="scope">
|
<span v-if="scope.row.cusSex == '0'">男</span>
|
<span v-if="scope.row.cusSex == '1'">女</span>
|
<span v-if="scope.row.cusSex == '2'">未知</span>
|
<span v-if="scope.row.cusSex == '9'">未说明性别</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="出生日期" align="center" prop="cusBrithday" :show-overflow-tooltip="true" width="110px" />
|
<el-table-column label="电话" align="center" prop="cusPhone" :show-overflow-tooltip="true" width="130px" />
|
|
<el-table-column label="体检时间" align="center" prop="tjTime" :show-overflow-tooltip="true" width="110px" />
|
<el-table-column label="完成时间" align="center" prop="finishTime" :show-overflow-tooltip="true" width="160px" />
|
<el-table-column label="状态" align="center" prop="tjStatus" :show-overflow-tooltip="true" width="50px">
|
<template slot-scope="scope">
|
<span>{{ scope.row.tjStatus == "1" ? "已检" : "未检" }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="单位名称" align="center" prop="tjCompName" :show-overflow-tooltip="true" />
|
</el-table>
|
|
<div class="pag">
|
<div class="pag1">
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.pageSize"
|
@pagination="getList" />
|
</div>
|
</div>
|
</template>
|
</div>
|
</template>
|
|
|
<script>
|
import { getcheckList, heXiaoByIds } from "@/api/doctor/checkAll";
|
import { getCompany, queryCompany } from "@/api/team/tuanti";
|
import ViewPdf from "@/components/ViewPdf";
|
|
export default {
|
components: {
|
ViewPdf,
|
},
|
name: "checkAll",
|
data() {
|
return {
|
remark: "",
|
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]);
|
},
|
},
|
],
|
},
|
// 页面全部数据
|
checkList: [],
|
// 绑定单选按钮
|
tjStatus: "1",
|
total: 0,
|
value2: [],
|
CompanyList: [],
|
CheckBox: {},
|
startTime: [],
|
textarea1: "",
|
loading: true,
|
tjNumber: "",
|
// 点击参数
|
changedate: [],
|
orderIds: [],
|
status: {},
|
// 查询参数
|
queryParams: {
|
page: 1,
|
pageSize: 10,
|
tjNumber: "",
|
beginTime: null,
|
endTime: null,
|
compId: null,
|
name: null,
|
checkStatus: null,
|
},
|
};
|
},
|
|
created() {
|
this.getNowTime();
|
this.getList();
|
},
|
|
mounted() {
|
this.$nextTick(() => {
|
this.$refs.inputName.focus();
|
});
|
},
|
methods: {
|
// / 处理默认选中当前日期
|
getNowTime() {
|
var curDate = new Date().getTime();
|
var dayNum = 7 * 24 * 3600 * 1000;
|
var threeDays = curDate - dayNum;
|
var sDay = this.getLocalTime(threeDays);
|
var end = this.getLocalTime(curDate);
|
this.startTime = [sDay, end];
|
},
|
add0(m) {
|
return m < 10 ? "0" + m : m;
|
},
|
getLocalTime(nS) {
|
var time = new Date(nS);
|
var y = time.getFullYear();
|
var m = time.getMonth() + 1;
|
var d = time.getDate();
|
var h = time.getHours();
|
var mm = time.getMinutes();
|
return (
|
y +
|
"-" +
|
this.add0(m) +
|
"-" +
|
this.add0(d) +
|
" " +
|
this.add0(h) +
|
":" +
|
this.add0(mm)
|
);
|
},
|
getList() {
|
this.loading = true;
|
this.queryParams.compId = this.CheckBox.drugManufacturerId;
|
this.queryParams.checkStatus = this.tjStatus;
|
if (this.startTime) {
|
this.queryParams.beginTime = this.startTime[0];
|
this.queryParams.endTime = this.startTime[1];
|
} else {
|
this.queryParams.beginTime = null;
|
this.queryParams.endTime = null;
|
}
|
|
// 页面数据
|
getcheckList(this.queryParams).then((response) => {
|
if (response.code == 200) {
|
this.loading = false;
|
if (response.data) {
|
if (response.data.date) {
|
this.checkList = response.data.date;
|
} else {
|
this.checkList = response.data.customers;
|
}
|
|
this.total = response.data.total;
|
} else {
|
this.checkList = [];
|
}
|
}
|
|
}),
|
// 获取单位信息集合
|
getCompany(this.queryParam).then((response) => {
|
this.CompanyList = response.data;
|
this.loading = false;
|
});
|
},
|
handleSelectionChange(selection) {
|
this.orderIds = selection.map((item) => item.orderId);
|
this.single = selection.length !== 1;
|
this.multiple = !selection.length;
|
},
|
|
// 单选按钮
|
radioChange() {
|
heXiaoByIds(this.orderIds).then((response) => {
|
this.$modal.msgSuccess("报告已核收!请前往报告打印页面查看!");
|
});
|
},
|
|
// 体检公司拼音搜索
|
getRemoteData(query) {
|
if (query) {
|
let compName = query;
|
queryCompany(compName).then((response) => {
|
this.CompanyList = response.data;
|
});
|
}
|
},
|
|
// 选框数据
|
searchSelect(val) {
|
this.CheckBox = val;
|
},
|
|
// 时间
|
dateChangebirthday1(val) {
|
this.startTime = val;
|
},
|
hb(){
|
console.log(this.queryParams.tjNumber);
|
if (this.queryParams.tjNumber != "") {
|
this.submitForm();
|
}
|
},
|
|
// 搜索
|
submitForm() {
|
this.queryParams.compId = this.CheckBox.drugManufacturerId;
|
this.queryParams.checkStatus = this.tjStatus;
|
if (this.startTime) {
|
this.queryParams.beginTime = this.startTime[0];
|
this.queryParams.endTime = this.startTime[1];
|
} else {
|
this.queryParams.beginTime = null;
|
this.queryParams.endTime = null;
|
}
|
|
// 页面数据
|
getcheckList(this.queryParams).then((response) => {
|
if (response.data.customers != null) {
|
this.checkList = response.data.customers;
|
this.checkList.forEach((item) => {
|
this.tjStatus = item.tjStatus.toString();
|
});
|
this.loading = false;
|
this.total = response.data.total;
|
} else {
|
this.checkList = [];
|
}
|
});
|
},
|
// 重置
|
resetQuery() {
|
this.resetForm("tableList");
|
this.submitForm();
|
},
|
|
change(vale) {
|
// console.log(this.changedate[index].remark);
|
},
|
},
|
};
|
</script>
|
<style scoped>
|
.btn {
|
margin: 20px 0px;
|
}
|
|
.main {
|
height: 700px;
|
overflow: hidden;
|
}
|
|
#printIframe::-webkit-scrollbar {
|
width: 6px;
|
}
|
|
/* 修改 滚动条的 下面 的 样式 */
|
#printIframe::-webkit-scrollbar-track {
|
background-color: white;
|
-webkit-border-radius: 2em;
|
-moz-border-radius: 2em;
|
border-radius: 2em;
|
}
|
|
/* 修改 滑块 */
|
#printIframe::-webkit-scrollbar-thumb {
|
background-color: #dcdfe6;
|
-webkit-border-radius: 2em;
|
-moz-border-radius: 2em;
|
border-radius: 2em;
|
}
|
|
/* .el-dialog {
|
width: 1264px;
|
height: 800px;
|
}
|
|
.el-dialog__header {
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
}
|
|
.el-dialog__body {
|
padding: 0;
|
} */
|
|
.pag {
|
width: 100%;
|
display: flex;
|
justify-content: center;
|
}
|
|
.pag1 {
|
width: 30%;
|
}
|
|
.dialog-footers {
|
/* margin-top: 5px; */
|
margin-left: calc(100% - 15%);
|
}
|
|
textarea {
|
background: #ffffff;
|
border: none;
|
outline: none;
|
}
|
</style>
|
|
|
|