<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="company">
|
<el-select :remote-method="getRemoteData" v-model="queryParams.company" value-key="drugManufacturerId" remote
|
filterable placeholder="请选择单位名称" clearable @change="searchSelect">
|
<el-option v-for="dict in CompanyList" :key="dict.drugManufacturerId" :label="dict.cnName"
|
:value="dict.drugManufacturerId" />
|
</el-select>
|
</el-form-item>
|
<!-- <el-form-item label="交易金额" prop="transactionAmount">
|
<el-input v-model="queryParams.transactionAmount" placeholder="请输入交易金额" clearable
|
@keyup.enter.native="handleQuery" />
|
</el-form-item>
|
<el-form-item label="支付方式" prop="paymentMethod">
|
<el-input v-model="queryParams.paymentMethod" placeholder="请输入支付方式" clearable
|
@keyup.enter.native="handleQuery" />
|
</el-form-item>
|
<el-form-item label="卡号" prop="cardNo">
|
<el-select v-model="queryParams.cardNo" placeholder="请选择卡号(微信/支付宝填手机号;其他填银行卡号)" clearable>
|
<el-option v-for="dict in dict.type.dict_pay_type" :key="dict.value" :label="dict.label"
|
:value="dict.value" />
|
</el-select>
|
</el-form-item>
|
<el-form-item label="交款人" prop="payer">
|
<el-input v-model="queryParams.payer" placeholder="请输入交款人" clearable @keyup.enter.native="handleQuery" />
|
</el-form-item>
|
<el-form-item label="收款人" prop="payee">
|
<el-input v-model="queryParams.payee" placeholder="请输入收款人" clearable @keyup.enter.native="handleQuery" />
|
</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="['system:info: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="['system:info: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="['system:info:remove']">删除
|
</el-button>
|
</el-col>
|
<el-col :span="1.5">
|
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
v-hasPermi="['system:info:export']">导出
|
</el-button>
|
</el-col>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
</el-row> -->
|
|
<el-table id="sig" v-loading="loading" :data="infoList" @selection-change="handleSelectionChange" border ref="tb"
|
max-height="260px">
|
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column label="部门" align="center" prop="pacName" />
|
<el-table-column label="预检人数" align="center" prop="count" />
|
<el-table-column label="实检人数" align="center" prop="sjCount" />
|
<el-table-column label="应收金额" align="center" prop="copeWith" />
|
<el-table-column label="签约金额" align="center" prop="signingPrice">
|
</el-table-column>
|
<el-table-column label="已付金额" align="center" prop="transactionAmount" />
|
<el-table-column label="差额" align="center" prop="difference" />
|
<el-table-column label="签约人" align="center" prop="payer" />
|
<el-table-column label="预约时间" align="center" prop="createTime" />
|
</el-table>
|
|
<el-row :gutter="10" class="mb8">
|
<el-col :span="16" :xs="24">
|
<el-form :inline="true" :model="formInline" class="demo-form-inline" style="margin: 12px 6px">
|
<el-form-item label="单位负责人">
|
<el-input style="width: 120px" v-model="formInline.payer" placeholder="单位负责人"></el-input>
|
</el-form-item>
|
<el-form-item label="交易金额">
|
<el-input style="width: 90px" v-model="formInline.price" placeholder="金额"></el-input>
|
</el-form-item>
|
<el-form-item label="交易类型" prop="payType">
|
<el-select style="width: 160px" v-model="formInline.payType" placeholder="请选择交易类型">
|
<el-option v-for="dict in dict.type.dict_pay_type" :key="dict.value" :label="dict.label"
|
:value="dict.value"></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item>
|
<el-button style="margin-left: 15px" type="primary" size="mini" @click="SubmitEvent">收费</el-button>
|
</el-form-item>
|
<el-form-item>
|
<el-button style="margin-left: 15px" type="primary" size="mini" @click="handleDelete">退费</el-button>
|
</el-form-item>
|
</el-form>
|
</el-col>
|
</el-row>
|
<el-row :gutter="20">
|
<el-col :span="12" :xs="24">
|
<div class="tj">
|
<span class="tj_txt">已缴费记录</span>
|
</div>
|
|
<el-table v-loading="loading" :data="dataList" border max-height="260px">
|
<el-table-column label="交易金额" align="center" prop="transactionAmount" />
|
<el-table-column label="交易方式" align="center" prop="paymentMethod" />
|
<el-table-column label="交易人员" align="center" prop="payer" />
|
<el-table-column label="操作人员" align="center" prop="payee">
|
</el-table-column>
|
<el-table-column label="操作时间" align="center" prop="createTime" />
|
</el-table>
|
</el-col>
|
<el-col :span="12" :xs="24" style="padding: 0px 20px;">
|
<div class="tj">
|
<span class="tj_txt">体检人员情况表</span>
|
</div>
|
|
<el-table v-loading="loading" :data="peopleList" border max-height="260px">
|
<el-table-column label="序号" align="center" prop="newID" />
|
<el-table-column label="姓名" align="center" prop="name" />
|
<el-table-column label="状态" align="center" prop="tjStatus" />
|
<el-table-column label="体检时间" align="center" prop="tjTime">
|
</el-table-column>
|
</el-table>
|
</el-col>
|
</el-row>
|
</div>
|
</template>
|
|
<script>
|
import { getInfo } from "@/api/login";
|
import { getCompany, queryCompany, getTeamTjPeopleList } from "@/api/team/tuanti";
|
|
import {
|
listInfo,
|
getpay,
|
delInfo,
|
addInfo,
|
updateInfo,
|
} from "@/api/system/info";
|
|
export default {
|
name: "Info",
|
dicts: ["dict_pay_type"],
|
data() {
|
return {
|
// 绑定单选按钮
|
tjStatus: "0",
|
formInline: {
|
payer: "",
|
price: "",
|
},
|
// 遮罩层
|
loading: true,
|
// 选中数组
|
ids: [],
|
// 非单个禁用
|
single: true,
|
// 非多个禁用
|
multiple: true,
|
// 显示搜索条件
|
showSearch: true,
|
tjCompPayId: "",
|
// 总条数
|
total: 0,
|
// 体检单位缴费明细表格数据
|
infoList: [],
|
copeWith: "",
|
transactionAmount: "",
|
dataList: [],
|
tableList: [],
|
peopleList: [],
|
// 弹出层标题
|
title: "",
|
CompanyList: [],
|
// 是否显示弹出层
|
open: false,
|
compId: "",
|
teamNo: "",
|
// 登陆人名字
|
tollCollectorName: "",
|
// 查询参数
|
queryParams: {
|
pageNum: 1,
|
pageSize: 10,
|
company: null,
|
transactionAmount: null,
|
paymentMethod: null,
|
cardNo: null,
|
payer: null,
|
payee: null,
|
},
|
// 表单参数
|
form: {},
|
// 表单校验
|
rules: {},
|
};
|
},
|
created() {
|
this.getList();
|
},
|
methods: {
|
/** 查询体检单位缴费明细列表 */
|
getList() {
|
// this.loading = true;
|
// listInfo(this.queryParams).then(response => {
|
// this.infoList = response.data;
|
// this.loading = false;
|
// });
|
|
// 获取单位信息集合
|
getCompany(this.queryParam).then((response) => {
|
this.CompanyList = response.data;
|
this.loading = false;
|
});
|
// 获取登录人信息
|
getInfo().then((response) => {
|
this.tollCollectorName = response.user.nickName;
|
this.loading = false;
|
});
|
},
|
|
// 选框数据
|
searchSelect(val) {
|
this.compId = val;
|
},
|
|
// 体检公司拼音搜索
|
getRemoteData(query) {
|
if (query) {
|
let compName = query;
|
queryCompany(compName).then((response) => {
|
this.CompanyList = response.data;
|
});
|
}
|
},
|
// 表单重置
|
reset() {
|
this.form = {
|
id: null,
|
tjCompPayId: null,
|
transactionAmount: null,
|
paymentMethod: null,
|
cardNo: null,
|
payer: null,
|
payee: null,
|
createTime: null,
|
createBy: null,
|
updateTime: null,
|
updateBy: null,
|
deleted: null,
|
};
|
this.resetForm("form");
|
},
|
/** 搜索按钮操作 */
|
handleQuery() {
|
this.loading = true;
|
listInfo(this.compId).then((response) => {
|
this.infoList = response.data;
|
if (this.infoList.length != 0) {
|
this.infoList.forEach((item) => {
|
this.$nextTick(() => {
|
this.$refs.tb.toggleRowSelection(item, true);
|
});
|
});
|
} else {
|
this.$refs.tb.clearSelection();
|
}
|
this.infoList.forEach((item) => {
|
this.copeWith = item.copeWith;
|
this.transactionAmount = item.transactionAmount;
|
this.formInline.price = item.copeWith - item.transactionAmount;
|
if (item.payInfo != null) {
|
this.tjCompPayId = item.payInfo.tjCompPayId;
|
}
|
|
this.formInline.payer = item.payer;
|
if (item.payInfoList != null) {
|
this.dataList = item.payInfoList;
|
this.dataList.forEach((item) => {
|
if (item.paymentMethod === 0) {
|
item.paymentMethod = "现金支付";
|
} else if (item.paymentMethod === 1) {
|
item.paymentMethod = "刷卡支付";
|
} else if (item.paymentMethod === 2) {
|
item.paymentMethod = "支付宝";
|
} else if (item.paymentMethod === 3) {
|
item.paymentMethod = "微信";
|
} else if (item.paymentMethod === 4) {
|
item.paymentMethod = "云闪付";
|
}
|
});
|
}
|
});
|
this.loading = false;
|
});
|
},
|
/** 重置按钮操作 */
|
resetQuery() {
|
this.resetForm("queryForm");
|
this.handleQuery();
|
},
|
// 多选框选中数据
|
handleSelectionChange(selection) {
|
this.tableList = selection;
|
this.teamNo = ""
|
this.tableList.forEach((item) => {
|
this.teamNo = item.teamNo
|
this.copeWith = item.copeWith;
|
this.transactionAmount = item.transactionAmount;
|
this.formInline.price = item.copeWith - item.transactionAmount;
|
if (item.payInfo != null) {
|
this.tjCompPayId = item.payInfo.tjCompPayId;
|
}
|
if (item.payInfoList != null) {
|
this.dataList = item.payInfoList;
|
this.dataList.forEach((item) => {
|
if (item.paymentMethod === 0) {
|
item.paymentMethod = "现金支付";
|
} else if (item.paymentMethod === 1) {
|
item.paymentMethod = "刷卡支付";
|
} else if (item.paymentMethod === 2) {
|
item.paymentMethod = "支付宝";
|
} else if (item.paymentMethod === 3) {
|
item.paymentMethod = "微信";
|
} else if (item.paymentMethod === 4) {
|
item.paymentMethod = "云闪付";
|
}
|
});
|
}
|
});
|
if (this.teamNo) {
|
getTeamTjPeopleList(this.teamNo).then(res => {
|
if (res.data) {
|
this.peopleList = res.data
|
res.data.forEach((item, index) => {
|
item.newID =
|
(this.queryParams.pageNum - 1) * this.queryParams.pageSize +
|
index +
|
1;
|
});
|
}
|
|
})
|
}
|
if (selection.length > 1) {
|
let del_row = selection.shift();
|
this.$refs.tb.toggleRowSelection(del_row, false); //设置这一行取消选中
|
}
|
this.ids = selection.map((item) => item.id);
|
this.single = selection.length !== 1;
|
this.multiple = !selection.length;
|
},
|
/** 新增按钮操作 */
|
// handleAdd() {
|
// this.reset();
|
// this.open = true;
|
// this.title = "添加体检单位缴费明细";
|
// },
|
|
// 单选按钮
|
radioChange(val) { },
|
|
/** 收费提交按钮 */
|
SubmitEvent() {
|
if (this.formInline.price != 0) {
|
|
let data = {
|
paymentMethod: this.formInline.payType,
|
transactionAmount: this.formInline.price,
|
payee: this.tollCollectorName, // 收款人
|
tjCompPayId: this.tjCompPayId,
|
payer: this.formInline.payer,
|
};
|
getpay(data).then((response) => {
|
this.$modal.msgSuccess("操作成功");
|
this.handleQuery();
|
const tjnumber = this.waterId;
|
const viewNum = this.mobanId;
|
const params = { viewNum, tjnumber };
|
this.$tab.openPage("团检小票", "/report/charge", params);
|
});
|
|
} else {
|
this.$message.error("交易金额不能为0");
|
}
|
},
|
|
/** 退费按钮操作 */
|
handleDelete() {
|
if (this.formInline.price != 0) {
|
if (this.formInline.price < this.transactionAmount) {
|
let data = {
|
paymentMethod: this.formInline.payType,
|
transactionAmount: this.formInline.price,
|
payee: this.tollCollectorName, // 收款人
|
tjCompPayId: this.tjCompPayId,
|
payer: this.formInline.payer,
|
};
|
addInfo(data).then((response) => {
|
this.$modal.msgSuccess("操作成功");
|
this.handleQuery();
|
});
|
} else {
|
this.$message.error("超出已付金额,退费失败");
|
}
|
} else {
|
this.$message.error("退费金额不能为0");
|
}
|
},
|
/** 导出按钮操作 */
|
handleExport() { },
|
},
|
};
|
</script>
|
|
<style>
|
#sig .el-table__header-wrapper .el-checkbox {
|
display: none;
|
}
|
|
.mb8 {
|
margin-top: 10px;
|
}
|
|
.tj {
|
margin-top: 8px;
|
}
|
|
.tj_txt {
|
display: flex;
|
justify-content: center;
|
margin-bottom: 15px;
|
}
|
</style>
|