<template>
|
<div class="app-container">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
<el-row>
|
<el-col :span="7">
|
<el-form-item label="汇总人员" prop="tollCollectorId" style="display: flex;">
|
<el-select v-model="queryParams.tollCollectorId" filterable
|
placeholder="请选择汇总人员" clearable @clear="getCompanyList">
|
<el-option v-for="dict in CompanyList" :key="dict.userId" :label="dict.nickName"
|
:value="dict.userId" />
|
</el-select>
|
</el-form-item>
|
</el-col>
|
<!-- <el-form-item label="起始时间" prop="accountBeginTime">
|
<el-date-picker v-model="queryParams.accountBeginTime" type="datetime" placeholder="选择起始时间">
|
</el-date-picker>
|
</el-form-item>
|
<el-form-item label="截止时间" prop="accountEndTime">
|
<el-date-picker v-model="queryParams.accountEndTime" type="datetime" placeholder="选择截止时间">
|
</el-date-picker>
|
</el-form-item> -->
|
<el-col :span="7">
|
<el-form-item>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</el-form>
|
|
<el-row :gutter="10" class="mb8">
|
<el-col :span="1.5">
|
<el-button icon="el-icon-edit" size="mini" @click="handleDelete" :disabled="single">撤销</el-button>
|
</el-col>
|
<el-col :span="1.5">
|
<el-button icon="el-icon-edit" size="mini" @click="handledocument" :disabled="single">补打单据</el-button>
|
</el-col>
|
</el-row>
|
|
<el-table v-loading="loading" :data="tableData" @selection-change="handleSelect" ref="multipleTable" border>
|
<el-table-column type="selection" width="40" align="center" />
|
<!-- <el-table-column label="序号" width="55" align="center" prop="id" /> -->
|
<el-table-column label="汇总单号" align="center" prop="hzCard" :show-overflow-tooltip="true" />
|
<el-table-column label="汇总人" align="center" prop="hzName" :show-overflow-tooltip="true" />
|
<el-table-column label="汇总事件" align="center" prop="hzSj" :show-overflow-tooltip="true" />
|
<el-table-column label="收费金额" align="center" prop="amountReceived" :show-overflow-tooltip="true" />
|
<el-table-column label="退费金额" align="center" prop="refundAmount" :show-overflow-tooltip="true" />
|
<el-table-column label="应交款" align="center" prop="payable" :show-overflow-tooltip="true" />
|
<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-s-order" title="详情" @click="handleUpdate(scope.row)"
|
v-hasPermi="['hosp:water:edit']"></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-drawer :title="title" :visible.sync="drawer" size="60%">
|
<div style="margin: 10px 20px;display: flex;">
|
<div>汇总人:{{ formIn.hzName }}</div>
|
<div style="margin: 0px 20px;display: flex;">汇总金额:{{ formIn.amountReceived }}元</div>
|
<div>汇总时间:{{ formIn.updateTime }}</div>
|
</div>
|
|
|
<div style="margin: 10px 20px;">
|
<el-table style="width: 94%" :data="collectorList" ref="multipleTable" border max-height="700px">
|
<el-table-column label="交款员" align="center" prop="tollCollector" width="90" />
|
<el-table-column label="收费金额" align="center" prop="amountReceived" width="90" />
|
<el-table-column label="退费金额" align="center" prop="refundAmount" width="90" />
|
<el-table-column label="应交款" align="center" prop="payable" width="90" />
|
<el-table-column label="交账时间" align="center" prop="createTime" />
|
<el-table-column label="起始时间" align="center" prop="accountBeginTime" />
|
<el-table-column label="截止时间" align="center" prop="accountEndTime" />
|
</el-table>
|
|
</div>
|
|
</el-drawer>
|
|
</div>
|
</template>
|
|
<script>
|
import { getTjSummaryList, getdatalist, removeTjSummaryById } from "@/api/hosp/water";
|
import { getInfo } from "@/api/login";
|
import moment from "moment";
|
|
export default {
|
name: "Water",
|
data() {
|
return {
|
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]);
|
},
|
},
|
],
|
},
|
// 遮罩层
|
drawer: false,
|
loading: true,
|
tableData: [],
|
selectList: [],
|
allList: [],
|
disabled: true,
|
value1: [],
|
CompanyList: [],
|
collectorList: [],
|
time: "",
|
id: "",
|
title: "",
|
tollCollectorId: "",
|
// 非单个禁用
|
single: true,
|
formIn: {},
|
closeList: 0,
|
tollCollectorId: "",
|
machiningTimeList: 0,
|
debugTimeList: 0,
|
// 非多个禁用
|
multiple: true,
|
// 显示搜索条件
|
showSearch: true,
|
// 总条数
|
total: 0,
|
userId: "",
|
// 弹出层标题
|
title: "",
|
// 是否显示弹出层
|
open: false,
|
accountId: "",
|
// 查询参数
|
queryParams: {
|
pageNum: 1,
|
pageSize: 10,
|
tollCollectorId: null,
|
accountBeginTime: null,
|
accountEndTime: null,
|
},
|
// 表单参数
|
form: {},
|
};
|
},
|
created() {
|
this.getList();
|
this.getCompanyList();
|
|
},
|
methods: {
|
// 下拉框显示
|
getCompanyList() {
|
this.loading = true;
|
getdatalist().then((response) => {
|
this.CompanyList = response.data;
|
this.loading = false;
|
});
|
},
|
/** 查询体检流水列表 */
|
getList() {
|
if (this.queryParams.accountBeginTime != null) {
|
this.queryParams.accountBeginTime = moment(this.queryParams.accountBeginTime).format("YYYY-MM-DD HH:mm:ss")
|
this.queryParams.accountEndTime = moment(this.queryParams.accountEndTime).format("YYYY-MM-DD HH:mm:ss")
|
}
|
getTjSummaryList(this.queryParams).then((res) => {
|
this.tableData = res.data;
|
|
});
|
},
|
|
|
// 搜索
|
handleQuery() {
|
this.queryParams.pageNum = 1;
|
this.getList();
|
},
|
handleUpdate(row) {
|
this.formIn = row
|
this.collectorList = row.collectorList
|
this.drawer = true
|
this.title = "汇总单据明细"
|
},
|
|
handledocument() {
|
let accountId = this.accountId
|
const viewNum = "872704875763019776";
|
const params = { viewNum, accountId };
|
this.$tab.openPage("汇总结账单", "/report/settlement", params);
|
},
|
|
// 表格单选
|
handleSelect(selection, val) {
|
this.single = selection.length !== 1
|
selection.forEach(element => {
|
this.accountId = element.hzCard
|
this.id = element.id
|
this.tollCollectorId = element.hzUserId
|
});
|
},
|
|
handleDelete() {
|
let data = {
|
id: this.id,
|
tollCollectorId: this.tollCollectorId,
|
};
|
removeTjSummaryById(data).then((res) => {
|
this.$message({
|
showClose: true,
|
message: "该账单已成功撤销",
|
type: "success",
|
});
|
this.getList();
|
});
|
},
|
},
|
};
|
</script>
|
|
<style>
|
.el-table__header-wrapper .el-checkbox {
|
display: none;
|
}
|
|
.pag {
|
width: 100%;
|
display: flex;
|
justify-content: center;
|
}
|
|
.pag1 {
|
width: 30%;
|
}
|
|
.el-table__body tr.current-row>td {
|
background-color: #f19944 !important;
|
/* color: #f19944; */
|
/* 设置文字颜色,可以选择不设置 */
|
}
|
|
.el-table .warning-row {
|
background: #e5f3ff !important;
|
}
|
</style>
|