<template>
|
<div class="app-container">
|
<div class="grid-content bg-purple">
|
<el-form
|
:inline="true"
|
ref="form"
|
:model="form"
|
:label-position="labelPosition"
|
class="demo-form-inline"
|
>
|
<el-form-item label="体检号" prop="tjNum">
|
<el-input
|
ref="inputName"
|
v-model="form.tjNum"
|
placeholder="请输入体检号"
|
/>
|
</el-form-item>
|
<el-form-item label="姓名" prop="tjName">
|
<el-input v-model="form.tjName" placeholder="请输入姓名" />
|
</el-form-item>
|
<el-form-item label="联系电话" prop="tjPhone">
|
<el-input v-model="form.tjPhone" placeholder="请输入联系电话" />
|
</el-form-item>
|
<el-form-item>
|
<el-button
|
style="margin-left: 50px"
|
type="primary"
|
size="mini"
|
@click="handle"
|
>搜索</el-button
|
>
|
<el-button
|
style="margin-left: 10px"
|
type="primary"
|
size="mini"
|
@click="resetQuery"
|
>重置</el-button
|
>
|
</el-form-item>
|
</el-form>
|
</div>
|
|
<template>
|
<el-table
|
id="sig"
|
:data="customerList"
|
height="240"
|
style="width: 100%; margin-bottom: 20px"
|
border
|
@selection-change="handleSelection"
|
tooltip-effect="dark"
|
ref="multipleTable"
|
>
|
<el-table-column type="selection" width="55"> </el-table-column>
|
<el-table-column
|
prop="tjName"
|
label="姓名"
|
width="100px"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
</el-table-column>
|
<el-table-column
|
prop="tjPhone"
|
label="联系电话"
|
align="center"
|
width="150px"
|
:show-overflow-tooltip="true"
|
>
|
</el-table-column>
|
<el-table-column
|
prop="tjComp"
|
label="单位"
|
align="center"
|
width="250px"
|
:show-overflow-tooltip="true"
|
>
|
</el-table-column>
|
<el-table-column
|
prop="tjType"
|
label="体检类型"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
</el-table-column>
|
<el-table-column
|
prop="tjNumber"
|
label="体检号"
|
align="center"
|
width="250px"
|
:show-overflow-tooltip="true"
|
>
|
</el-table-column>
|
<el-table-column
|
prop="totalAmount"
|
label="总费用"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
</el-table-column>
|
<el-table-column
|
label="登记时间"
|
align="center"
|
prop="registerTime"
|
width="155px"
|
height="10px"
|
:show-overflow-tooltip="true"
|
>
|
<template slot-scope="scope">
|
<span>{{ parseTime(scope.row.registerTime) }}</span>
|
</template>
|
</el-table-column>
|
<!-- <el-table-column label="报告时间" align="center" prop="reportTime" width="155px" height="10px" :show-overflow-tooltip="true">
|
<template slot-scope="scope">
|
<span>{{ parseTime(scope.row.reportTime) }}</span>
|
</template>
|
</el-table-column> -->
|
<el-table-column
|
label="开票时间"
|
align="center"
|
prop="drawerTime"
|
width="180"
|
:show-overflow-tooltip="true"
|
>
|
<template slot-scope="scope">
|
<span>{{ parseTime(scope.row.drawerTime, "{y}-{m}-{d}") }}</span>
|
</template>
|
</el-table-column>
|
</el-table>
|
</template>
|
|
<el-row :gutter="10" class="mb8">
|
<el-col :span="16">
|
<el-form
|
:inline="true"
|
:model="formInline"
|
class="demo-form-inline"
|
style="margin: 0px 4px"
|
>
|
<el-form-item label="已选择退费共计:">
|
<el-input
|
v-model="formInline.price"
|
placeholder="请输入金额"
|
></el-input>
|
</el-form-item>
|
<el-form-item label="退费类型">
|
<el-select
|
style="width: 120px"
|
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-button
|
icon="el-icon-document-delete"
|
size="small"
|
v-hasPermi="['hosp:order:export']"
|
@click="handleRefund"
|
style="margin-top: 3px"
|
>退费</el-button
|
>
|
</el-form>
|
</el-col>
|
</el-row>
|
|
<template>
|
<el-table
|
:data="numberList"
|
height="260"
|
v-loading="loading"
|
style="width: 100%; margin-top: 20px"
|
border
|
@selection-change="handleSelectionChange"
|
>
|
<el-table-column type="selection" width="55"> </el-table-column>
|
<el-table-column
|
prop="proName"
|
label="项目名称"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
</el-table-column>
|
<el-table-column
|
prop="price"
|
label="单价"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
</el-table-column>
|
<el-table-column
|
prop="count"
|
label="数量"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
</el-table-column>
|
<el-table-column
|
prop="netReceipts"
|
label="实收"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
</el-table-column>
|
<el-table-column
|
prop="tollCollector"
|
label="收费人员"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
</el-table-column>
|
<el-table-column
|
label="收费时间"
|
align="center"
|
prop="collectFeesTime"
|
:show-overflow-tooltip="true"
|
>
|
<template slot-scope="scope">
|
<span>{{ parseTime(scope.row.collectFeesTime) }}</span>
|
</template>
|
</el-table-column>
|
</el-table>
|
</template>
|
</div>
|
</template>
|
|
<script>
|
import { getTjRefundList, getTjList, getTjRefund } from "@/api/hosp/customer";
|
|
export default {
|
dicts: [
|
"dict_user_national",
|
"dict_user_marry",
|
"sys_yes_no",
|
"sys_user_sex",
|
"dict_team",
|
"dict_pay_type",
|
],
|
name: "Tijian",
|
|
data() {
|
return {
|
idList: [],
|
waterId: "",
|
mobanId: "",
|
tjnumber: "",
|
formInline: {
|
price: 0,
|
payType: "0",
|
},
|
tjOrderId: "",
|
orderIds: "",
|
list: [],
|
// 遮罩层
|
loading: false,
|
labelPosition: "right",
|
size: "",
|
multipleSelection: [],
|
// 套餐提交按钮
|
confirm: false,
|
TotalPrice1: 0,
|
customerList: [],
|
copewith: "",
|
DataList: [],
|
tjFlowingWater: {},
|
// 搜索套餐名字
|
name: "",
|
// 选中数组
|
ids: [],
|
// 非单个禁用
|
single: true,
|
// 非多个禁用
|
multiple: true,
|
nodeobj: {},
|
// 是否显示弹出层
|
Seachopen: false,
|
pacId: "",
|
// 结果
|
result: "",
|
// 显示搜索条件
|
showSearch: true,
|
// 树状形状
|
data: [],
|
tjSerialNumber: "",
|
formPacId: "",
|
refundPros: [],
|
tollCollectorName: "",
|
waterId: "",
|
customer: {},
|
numberList: [],
|
// 表单参数
|
form: {
|
tjNum: "",
|
tjName: "",
|
tjPhone: "",
|
},
|
};
|
},
|
created() {
|
this.getList();
|
},
|
methods: {
|
getList() {
|
this.$nextTick(() => {
|
this.$refs.inputName.focus();
|
});
|
},
|
|
/** 搜索操作 */
|
handle() {
|
this.loading = true;
|
getTjRefundList(this.form).then((response) => {
|
this.customerList = response.data;
|
this.customerList.forEach((item1) => {
|
this.tjnumber = item1.tjNumber;
|
});
|
if (this.customerList.length != 0) {
|
this.$nextTick(() => {
|
this.$refs.multipleTable.toggleRowSelection(
|
this.customerList[0],
|
true
|
);
|
});
|
} else {
|
this.$refs.multipleTable.clearSelection();
|
}
|
this.customerList.forEach((item) => {
|
if (item.isAdditionCollectFees === "N") {
|
item.isAdditionCollectFees = "否";
|
} else {
|
item.isAdditionCollectFees = "是";
|
}
|
if (item.tjType === "1") {
|
item.tjType = "团队";
|
} else {
|
item.tjType = "个人";
|
}
|
});
|
this.total = response.total;
|
this.loading = false;
|
});
|
},
|
|
//重置按钮
|
resetQuery() {
|
this.$tab.refreshPage();
|
},
|
|
// 表格单选
|
handleSelection(selection, val) {
|
if (selection) {
|
if (selection.length > 1) {
|
let del_row = selection.shift();
|
this.$refs.multipleTable.toggleRowSelection(del_row, false);
|
}
|
}
|
this.DataList = this.$refs.multipleTable.selection;
|
this.DataList.forEach((item) => {
|
this.tjOrderId = item.tjOrderId;
|
});
|
this.loading = true;
|
let data = {
|
orderId: this.tjOrderId,
|
};
|
getTjList(data).then((res) => {
|
this.numberList = res.data;
|
this.loading = false;
|
});
|
},
|
|
// 多选
|
handleSelectionChange(val) {
|
this.multipleSelection = val;
|
this.refundPros = [];
|
this.refundPros = this.multipleSelection;
|
this.formInline.price = "";
|
this.multipleSelection.forEach((item) => {
|
this.tollCollectorName = item.tollCollector;
|
if (this.formInline.price) {
|
this.formInline.price += item.netReceipts;
|
} else {
|
this.formInline.price = item.netReceipts;
|
}
|
});
|
},
|
|
// 退费
|
handleRefund() {
|
this.customerList.forEach((item) => {
|
(this.orderIds = item.tjFlowingWater.orderId),
|
(this.copewith = item.totalAmount);
|
this.waterId = item.tjFlowingWater.waterId;
|
this.tjSerialNumber = item.tjFlowingWater.tjSerialNumber;
|
this.customer = {
|
cusName: item.tjName,
|
createBy: item.tjFlowingWater.createBy,
|
createTime: item.tjFlowingWater.createTime,
|
cusPhone: item.tjPhone,
|
tjStatus: item.tjFlowingWater.payStasus,
|
tjType: item.tjFlowingWater.payType,
|
tjNumber: item.tjNumber,
|
};
|
});
|
|
if (this.refundPros.length > 0) {
|
var data = {
|
orderId: this.orderIds,
|
refundPrice: this.formInline.price,
|
payType: this.formInline.payType,
|
customer: this.customer,
|
tollCollectorName: this.tollCollectorName,
|
waterId: this.waterId,
|
tjSerialNumber: this.tjSerialNumber,
|
refundPros: this.refundPros,
|
copewith: this.copewith,
|
discount: "/",
|
};
|
} else {
|
this.$message({
|
type: "warning ",
|
message: "请选择退费项目!",
|
});
|
return;
|
}
|
getTjRefund(data).then((res) => {
|
this.tjnumber = res.data.waterId;
|
this.mobanId = res.data.mobanId;
|
if (res.code === 200) {
|
this.$modal.msgSuccess("退费成功");
|
// this.handle();
|
// this.$forceUpdate();
|
this.idList = res.data;
|
const tjnumber = this.tjnumber;
|
const viewNum = this.mobanId;
|
const params = { viewNum, tjnumber };
|
this.$tab.openPage("退款小票", "/report/charge", params);
|
}
|
});
|
},
|
},
|
};
|
</script>
|
|
<style>
|
#sig .el-table__header-wrapper .el-checkbox {
|
display: none;
|
}
|
</style>
|