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
<template>
<div>
<a-table
class="mar-bottom10"
size="small"
:columns="columns"
:locale="{ emptyText: 'No Data' }"
:data-source="conditionList"
row-key="id"
:pagination="false"
></a-table>
</div>
</template>
<script>
export default {
props: {
formData: {
default: {},
},
},
data() {
const columns = [
{ title: "条件类型", dataIndex: "frequencyDesc" },
{ title: "条件内容", dataIndex: "limitDesc" },
// { title: "最小值", dataIndex: "minValue" },
{ title: "福利限制", dataIndex: "maxValue", customRender: (val, row) => {
if (row.limitCode.indexOf('07') === 0) {
return val + '%'
}
for(let i = 0; i < this.currencyCode.length; i ++) {
if (this.currencyCode[i].refcd === row.currency) {
return val + this.currencyCode[i].descCh
}
}
return val + row.currency
}},
{ title: "剩余金额", dataIndex: "leftValue" },
{ title: "备注", dataIndex: "remark" }
];
return {
columns,
conditionList: [],
};
},
mounted() {
this._getRefcdByRefgrp()
this._getConditionList();
},
methods: {
_getConditionList() {
const {
planCode,
payorCode,
coverageCode,
corpCode,
benefitCode,
conditionType,
} = this.formData;
const data = {
planCode,
payorCode,
coverageCode,
corpCode,
benefitCode,
conditionType,
};
this.$apis.GETCONDITIONLIST(data).then((res) => {
this.conditionList = res.content || [];
});
},
// 获取币种列表
_getRefcdByRefgrp() {
this.$apis.GETREFCDBYREFGRP({
modid: "CI",
refgrp: "CURRENCY_TYPE"
}).then((res) => {
this.currencyCode = res.content || [];
});
},
},
};
</script>
<style></style>