1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
<template>
<div class="white_bg burt-container">
<!-- form -->
<a-form-model ref="form" layout="vertical" :model="form">
<a-row :gutter="30">
<a-col :lg="6" :sm="12">
<a-form-model-item label="保险公司">
<a-select
v-model="form.payorCode"
placeholder="请选择保险公司"
allowClear
show-search
:filterOption="filterCode"
>
<a-select-option
v-for="item in companyOptions"
:key="item.payorCode"
:value="item.payorCode"
>
{{ item.longName }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="EOB编号">
<a-input v-model="form.eobNo" placeholder="EOB编号" />
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="创建时间">
<a-range-picker
format="YYYY-MM-DD"
v-model="form.dateRange"
:placeholder="['开始时间', '结束时间']"
@change="onSelectVisitTime"
/>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="状态">
<a-select
v-model="form.backStatus"
placeholder="请选择状态"
allowClear
>
<a-select-option
v-for="item in backStatusOptions"
:key="item.value"
:value="item.value"
>
{{ item.name }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="回款金额">
<a-input v-model="form.backAmountCny" placeholder="回款金额" />
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="回款编号">
<a-input v-model="form.backMoneyNo" placeholder="回款编号" />
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="账单编号">
<a-input v-model="form.receiptNo" placeholder="账单编号" />
</a-form-model-item>
</a-col>
<a-col :md="24" class="none-label">
<a-form-model-item label="button">
<a-button class="mar-left10" type="primary" @click="handlerSearch">
<Icon name="ssisearch_active" :size="14" />查询
</a-button>
<a-button
class="mar-left10"
type="primary"
@click.stop="handlerReset"
>
<Icon name="ssireset" :size="14" />重置
</a-button>
<a-button class="mar-left10" type="primary" @click="addNewEvt">
<Icon name="ssiadd" :size="14" />新建回款
</a-button>
<a-button class="mar-left10" type="primary" @click="exportExcel">
<Icon name="ssidaochu" :size="14" />导出
</a-button>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
<!-- table -->
<a-table
:columns="columns"
:data-source="dataList"
:scroll="{ x: true }"
:pagination="false"
>
<template slot="eobSts" slot-scope="text">
{{ text == 1 ? "待回款" : "已回款" }}
</template>
<template slot="operation" slot-scope="text, record, index">
<a-button type="link" @click.stop="editEvt(record, true)"
>修改</a-button
>
<a-button type="link" class="success" @click.stop="editEvt(record)"
>查看</a-button
>
<a-button
v-if="record.backMoneyNo"
type="link"
class="danger"
@click.stop="delRecord(index)"
>删除</a-button
>
</template>
</a-table>
<BurtPagination :pagination="pagination" @pageChange="getData" />
</div>
</template>
<script>
import BurtPagination from "@/components/Customers/pagation";
import moment from "moment";
import { exportFile } from '@/utils/index';
const columns = [
{ title: "回款编号", dataIndex: "backMoneyNo", ellipsis: true, width: 150 },
{ title: "EOB编号", dataIndex: "eobNos", ellipsis: true, width: 140 },
{ title: "保险公司", dataIndex: "payorName", ellipsis: true, width: 110 },
{
title: "回款金额(人民币)",
dataIndex: "backAmountCny",
ellipsis: true,
width: 190,
},
{
title: "未核销余额",
dataIndex: "residueBackAmount",
ellipsis: true,
width: 130,
},
{ title: "EOB备注", dataIndex: "eobRemark", ellipsis: true, width: 140 },
{ title: "创建时间", dataIndex: "createDate", ellipsis: true, width: 110 },
{ title: "状态", dataIndex: "backStatusStr", ellipsis: true, width: 90 },
{
title: "操作",
dataIndex: "operation",
scopedSlots: { customRender: "operation" },
fixed: "right",
width: "200px",
align: "center",
},
];
export default {
data() {
return {
columns,
form: {
payorCode: "",
eobNo: "",
dateRange: [], //创建时间范围
startDate: "",
endDate: "",
backStatus: "0",
backAmountCny: "", // 回款金额
backMoneyNo: "", // 回款编号
receiptNo:"", // 账单编号
},
dataList: [],
companyOptions: [], //保险公司
pagination: {
pageNum: 1,
pageSize: 10,
total: 0,
},
backStatusOptions: [
{ name: '全部', value: '' },
{ name: '已结案', value: '1' },
{ name: '暂存', value: '0' }
],
iscreated: false
};
},
components: {
BurtPagination,
},
created() {
this.iscreated = true
this.getData();
this._getCompanyOptions();
},
activated(){
if(!this.iscreated){
this.getData();
this._getCompanyOptions();
}else{
this.iscreated = false
}
},
methods: {
moment,
pageChange(pager) {
const { current } = pager;
this.pagination.pageNum = current;
this.getData();
},
// 重置
handlerReset() {
this.form = {
payorCode: "",
eobNo: "",
dateRange: [], //创建时间范围
startDate: "",
endDate: "",
backStatus: "0",
receiptNo:"", // 账单编号
};
},
// 选择框筛选
filterCode(input, option) {
return (
option.componentOptions.children[0].text
.toLowerCase()
.indexOf(input.toLowerCase()) >= 0
);
},
// 获取保险公司下拉选项
_getCompanyOptions() {
this.$apis.getCompanyOptions().then((res) => {
this.companyOptions = res.content || [];
});
},
// 选中就诊时间
onSelectVisitTime(date, dateString) {
this.form.startDate = dateString[0] + "";
this.form.endDate = dateString[1] + "";
},
handlerSearch() {
this.pagination.pageNum = 1;
this.getData();
},
getData() {
this.$apis
.queryBackMoneyList({
...this.form,
dateRange: undefined,
pageNum: this.pagination.pageNum,
pageSize: this.pagination.pageSize,
})
.then((res) => {
if (res.returnCode == "0000") {
let content = res.content || {};
this.pagination.total = content.total || 0;
this.dataList = content.list.map(item => {
item.backStatusStr = item.backStatus === '0' ? '暂存' : '已结案'
return item
}) || [];
} else {
this.$message.error(res.returnMsg);
}
});
},
//新建回款
addNewEvt() {
this.$router.push({
path: "/verification/collectionDetail",
query: {
isEdit: true,
},
});
},
//编辑回款
editEvt(record, isEdit) {
const { backMoneyNo } = record;
localStorage.setItem("backMoneyDataDetail", JSON.stringify(record));
console.log(isEdit, record.backStatus)
// 已结案状态,二次确认
if (isEdit && record.backStatus === "1") {
this.$modal.confirm({
title: "修改",
content: "处于已结案状态,是否确定修改该条记录?",
okText: "确认",
cancelText: "取消",
onOk: () => {
this.$router.push({
path: "/verification/collectionDetail",
query: {
backMoneyNo,
isEdit,
},
});
},
onCancel: () => {},
});
return;
}
this.$router.push({
path: "/verification/collectionDetail",
query: {
backMoneyNo,
isEdit,
},
});
},
//删除记录
delRecord(index) {
let content = "确定删除该条记录?"
if(this.dataList[index].backStatus === "1") {
content = "处于已结案状态,确定删除该条记录?"
}
this.$modal.confirm({
title: "删除",
content,
okText: "确认",
cancelText: "取消",
onOk: () => {
this.$apis
.deleteBackMoney({
backMoneyNo: this.dataList[index].backMoneyNo,
})
.then((res) => {
if (res.returnCode == "0000") {
this.$message.success("删除成功");
this.dataList.splice(index, 1);
} else {
this.$message.error(res.returnMsg);
}
});
},
onCancel: () => {},
});
},
//导出报表
exportExcel(){
let filter = {
...this.form,
dateRange: undefined,
}
this.$apis.backMoneyListExport(filter).then(res => {
exportFile(res, '回款列表.xls');
})
}
},
};
</script>
<style lang="less" scoped>
.none-label {
text-align: right;
.ant-form-item-label {
opacity: 0;
}
}
.ant-btn .icon-class {
.mg-r(10);
}
.success.ant-btn-link {
color: #4cd964;
}
.danger.ant-btn-link {
color: #ff3b30;
}
</style>