默认提交
Showing
7 changed files
with
91 additions
and
687 deletions
... | @@ -12,11 +12,6 @@ export default { | ... | @@ -12,11 +12,6 @@ export default { |
12 | type: Boolean, | 12 | type: Boolean, |
13 | default: true, | 13 | default: true, |
14 | }, | 14 | }, |
15 | // 取消按钮回调方法 | ||
16 | close: { | ||
17 | type: Function, | ||
18 | default: null | ||
19 | }, | ||
20 | // 确认文案 | 15 | // 确认文案 |
21 | confirmText: { | 16 | confirmText: { |
22 | type: String, | 17 | type: String, |
... | @@ -27,21 +22,6 @@ export default { | ... | @@ -27,21 +22,6 @@ export default { |
27 | type: String, | 22 | type: String, |
28 | default: "取消", | 23 | default: "取消", |
29 | }, | 24 | }, |
30 | // 确定按钮回调方法 | ||
31 | confirm: { | ||
32 | type: Function, | ||
33 | default: null | ||
34 | }, | ||
35 | // 取消按钮回调方法 | ||
36 | cancel: { | ||
37 | type: Function, | ||
38 | default: null | ||
39 | }, | ||
40 | // 点击蒙层回调方法 | ||
41 | overlay: { | ||
42 | type: Function, | ||
43 | default: null | ||
44 | }, | ||
45 | 25 | ||
46 | // 传入数据 | 26 | // 传入数据 |
47 | items: { | 27 | items: { |
... | @@ -66,27 +46,20 @@ export default { | ... | @@ -66,27 +46,20 @@ export default { |
66 | methods: { | 46 | methods: { |
67 | // 点击关闭 | 47 | // 点击关闭 |
68 | onCloseHandler() { | 48 | onCloseHandler() { |
69 | if (this.close) { | 49 | this.$emit("close"); |
70 | this.close(); | ||
71 | } | ||
72 | }, | 50 | }, |
73 | // 点击取消 | 51 | // 点击取消 |
74 | onCancelHandler() { | 52 | onCancelHandler() { |
75 | if (this.close) { | 53 | this.$emit("close"); |
76 | this.close(); | ||
77 | } | ||
78 | }, | 54 | }, |
79 | // 点击蒙层 | 55 | // 点击蒙层 |
80 | onOverLayHandler() { | 56 | onOverLayHandler() { |
81 | if (this.overlay) { | 57 | // this.$emit("close"); |
82 | this.overlay(); | ||
83 | } | ||
84 | }, | 58 | }, |
85 | // 点击确认 | 59 | // 点击确认 |
86 | onConfirmHandler() { | 60 | onConfirmHandler() { |
87 | if (this.confirm) { | 61 | this.$emit("close"); |
88 | this.confirm(this.checkList); | 62 | this.$emit("confirm", this.checkList); |
89 | } | ||
90 | }, | 63 | }, |
91 | initData() {} | 64 | initData() {} |
92 | }, | 65 | }, | ... | ... |
1 | import { mapState } from "vuex"; | 1 | import { |
2 | mapState | ||
3 | } from "vuex"; | ||
2 | import api from '@/api/api' | 4 | import api from '@/api/api' |
3 | import { | 5 | import { |
4 | httpGet, | 6 | httpGet, |
5 | httpPost | 7 | httpPost |
6 | } from '@/api/fetch-api.js' | 8 | } from '@/api/fetch-api.js' |
7 | 9 | ||
8 | import Auth from '@components/auth/auth.vue'; | 10 | import Auth from '@components/auth/auth.vue'; |
9 | import ECorrespondenceHeadList from "./e-correspondence-head-list.vue"; | 11 | import ECorrespondenceHeadList from "./e-correspondence-head-list.vue"; |
10 | 12 | ||
11 | import { formatMoney, getInsuredPeriod, getBenefitType, getPayPeriod, getPayType, getMoneyName, getPayMode, getPolicyName } from "@/utils/biz.js"; | 13 | import { |
14 | formatMoney, | ||
15 | getInsuredPeriod, | ||
16 | getBenefitType, | ||
17 | getPayPeriod, | ||
18 | getPayType, | ||
19 | getMoneyName, | ||
20 | getPayMode, | ||
21 | getPolicyName | ||
22 | } from "@/utils/biz.js"; | ||
12 | 23 | ||
13 | export default { | 24 | export default { |
14 | name: "ECorrespondenceEnquiry", | 25 | name: "ECorrespondenceEnquiry", |
15 | data() { | 26 | data() { |
16 | return { | 27 | return { |
17 | showForm: false, | 28 | showForm: false, |
18 | dataForm: null, | 29 | dataForm: null, |
19 | insuranceForm: { | 30 | insuranceForm: { |
20 | f1: true, | 31 | f1: true, |
21 | f2: true, | 32 | f2: true, |
22 | f3: true, | 33 | f3: true, |
23 | f4: true, | 34 | f4: true, |
24 | f5: true, | 35 | f5: true, |
25 | }, | 36 | }, |
26 | policy: null, | 37 | policy: null, |
27 | } | 38 | } |
28 | }, | 39 | }, |
29 | methods: { | 40 | methods: { |
30 | handlePolicySelect(data) { | 41 | handlePolicySelect() { |
31 | let submitData = { | ||
32 | policyId: data[0].id, | ||
33 | policyCode: data[0].code | ||
34 | } | ||
35 | this.policy = submitData; | ||
36 | this.dataForm = null; | ||
37 | httpPost({ url: api.policyDetail, sid: true, data: submitData }).then(res => { | ||
38 | this.dataForm = res; | ||
39 | |||
40 | 42 | ||
41 | if (this.dataForm.clientNameCn) { | 43 | }, |
42 | let userInfo = JSON.parse(JSON.stringify(this.userInfo)); | 44 | userLogout() { |
43 | userInfo.name = this.dataForm.clientNameCn | 45 | this.showForm = false; |
44 | this.$store.commit("SET_USER_INFO", userInfo); | 46 | }, |
45 | } | 47 | userLogin(data) { |
46 | }).catch(err => { | 48 | this.showForm = true; |
47 | if (err.code == 404) { | 49 | } |
48 | this.$refs.auth.noAuth(); | 50 | }, |
49 | } | 51 | computed: { |
50 | }); | 52 | ...mapState({ |
51 | }, | 53 | userInfo: state => state.userInfo |
52 | toMoneyCode(moneyCode) { | 54 | }), |
53 | switch (moneyCode) { | 55 | i18n() { |
54 | case "USD": | 56 | return this.$i18n.messages && this.$i18n.locale ? this.$i18n.messages[this.$i18n.locale] : {}; |
55 | return "$"; | 57 | }, |
56 | default: | 58 | }, |
57 | return "HK$"; | 59 | components: { |
58 | } | 60 | Auth, |
59 | }, | 61 | ECorrespondenceHeadList, |
60 | toMoneyCodeName(moneyCode) { | 62 | }, |
61 | switch (moneyCode) { | ||
62 | case "USD": | ||
63 | return "美元"; | ||
64 | default: | ||
65 | return "港币"; | ||
66 | } | ||
67 | }, | ||
68 | toModifyPage(type, toContact) { | ||
69 | // 1=受保人;2=投保人 | ||
70 | if (!this.policy || !this.dataForm) { | ||
71 | return; | ||
72 | } | ||
73 | let data = encodeURIComponent(JSON.stringify({ id: this.policy.policyId, code: this.policy.policyCode })); | ||
74 | sessionStorage.setItem("_hklife_policy", data); | ||
75 | if (type == 1) { | ||
76 | this.$router.push({ path: "/custom/service", query: { q: "m43", u: 2 } }); | ||
77 | } else { | ||
78 | if (1 == toContact) { | ||
79 | this.$router.push({ path: "/custom/service", query: { q: "m42" } }); | ||
80 | } else { | ||
81 | this.$router.push({ path: "/custom/service", query: { q: "m43", u: 1 } }); | ||
82 | } | ||
83 | } | ||
84 | }, | ||
85 | formatMoney(s, t) { | ||
86 | if (typeof t == "undefined") { | ||
87 | t = 1; | ||
88 | } | ||
89 | return formatMoney(s, t); | ||
90 | }, | ||
91 | // 保障年限,保n年 | ||
92 | formatInsuredPeriod(t, v) { | ||
93 | return getInsuredPeriod(this.$i18n.locale, t, v); | ||
94 | }, | ||
95 | formatBenefitType(t) { | ||
96 | return getBenefitType(this.$i18n.locale, t); | ||
97 | }, | ||
98 | // 缴费方式,交n年 | ||
99 | formatPayPeriod(t, v) { | ||
100 | return getPayPeriod(this.$i18n.locale, t, v); | ||
101 | }, | ||
102 | // 支付方式,支票xxx | ||
103 | formatPayMode(v) { | ||
104 | return getPayMode(this.$i18n.locale, v); | ||
105 | }, | ||
106 | // 缴费频率 | ||
107 | formatPayType(v) { | ||
108 | return getPayType(this.$i18n.locale, v); | ||
109 | }, | ||
110 | // 钱的名字 | ||
111 | formatMoneyName(c) { | ||
112 | return getMoneyName(this.$i18n.locale, c); | ||
113 | }, | ||
114 | formatPanduPayPeriod(y, p) { | ||
115 | switch (this.$i18n.locale) { | ||
116 | case "zh": | ||
117 | case "tc": | ||
118 | return "第" + y + "年第" + p + "期"; | ||
119 | default: | ||
120 | return this.formatNumber(p) + " payment in " + this.formatNumber(y) + " year"; | ||
121 | } | ||
122 | }, | ||
123 | formatPolicyName(c, n) { | ||
124 | return getPolicyName(this.$i18n.locale, c, c); | ||
125 | }, | ||
126 | formatNumber(p) { | ||
127 | let pmod = p % 4; | ||
128 | let pstr = p + ""; | ||
129 | switch (pmod) { | ||
130 | case 0: | ||
131 | pstr += "th"; | ||
132 | break; | ||
133 | case 1: | ||
134 | pstr += "st"; | ||
135 | break; | ||
136 | case 2: | ||
137 | pstr += "nd"; | ||
138 | break; | ||
139 | case 3: | ||
140 | pstr += "rd"; | ||
141 | break; | ||
142 | default: | ||
143 | pstr += "th"; | ||
144 | break; | ||
145 | } | ||
146 | return pstr; | ||
147 | }, | ||
148 | userLogout() { | ||
149 | this.showForm = false; | ||
150 | }, | ||
151 | userLogin(data) { | ||
152 | this.showForm = true; | ||
153 | } | ||
154 | }, | ||
155 | computed: { | ||
156 | ...mapState({ | ||
157 | userInfo: state => state.userInfo | ||
158 | }), | ||
159 | i18n() { | ||
160 | return this.$i18n.messages && this.$i18n.locale ? this.$i18n.messages[this.$i18n.locale] : {}; | ||
161 | }, | ||
162 | }, | ||
163 | components: { | ||
164 | Auth, | ||
165 | ECorrespondenceHeadList, | ||
166 | }, | ||
167 | } | 63 | } | ... | ... |
... | @@ -6,265 +6,6 @@ | ... | @@ -6,265 +6,6 @@ |
6 | <!-- 保单列表 --> | 6 | <!-- 保单列表 --> |
7 | <e-correspondence-head-list :multiSelectable="false" @onSelect="handlePolicySelect"></e-correspondence-head-list> | 7 | <e-correspondence-head-list :multiSelectable="false" @onSelect="handlePolicySelect"></e-correspondence-head-list> |
8 | 8 | ||
9 | <!-- 保单详情 --> | ||
10 | <!-- <template v-if="dataForm"> | ||
11 | <div class="cell-group"> | ||
12 | <div class="table-header"> | ||
13 | <div class="normal-header"> | ||
14 | <div class="title">{{$t('customService.insuranceQuery.t2Title')}}</div> | ||
15 | <div class="guide" :class="{rotate180 : !insuranceForm.f1}" @click="insuranceForm.f1 = !insuranceForm.f1"></div> | ||
16 | </div> | ||
17 | </div> | ||
18 | <div class="table-content" :class="{hide : !insuranceForm.f1}"> | ||
19 | <div class="data-line"> | ||
20 | <div class="cell1"> | ||
21 | <div class="label">{{$t('customService.insuranceQuery.t2n1')}}</div> | ||
22 | <div class="label">{{formatPolicyName(dataForm.productCode, dataForm.productName)}}</div> | ||
23 | </div> | ||
24 | <div class="separator-v"></div> | ||
25 | <div class="cell1"> | ||
26 | <div class="label">{{$t('customService.insuranceQuery.t2n2')}}</div> | ||
27 | <div class="label">{{dataForm.moneyMark}} {{formatMoney(dataForm.amount,0)}}</div> | ||
28 | </div> | ||
29 | </div> | ||
30 | |||
31 | <div class="separator-h"></div> | ||
32 | <div class="data-line"> | ||
33 | <div class="cell1"> | ||
34 | <div class="label">{{$t('customService.insuranceQuery.t2n9k')}}</div> | ||
35 | <div class="label">{{$t('customService.insuranceQuery.t2n9v')}}</div> | ||
36 | </div> | ||
37 | <div class="separator-v"></div> | ||
38 | <div class="cell1"> | ||
39 | <div class="label">{{$t('customService.insuranceQuery.t2n3')}}</div> | ||
40 | <div class="label">{{dataForm.activeDate?dataForm.activeDate.split(" ")[0]:""}}</div> | ||
41 | </div> | ||
42 | </div> | ||
43 | |||
44 | <div class="separator-h"></div> | ||
45 | <div class="data-line"> | ||
46 | <div class="cell1"> | ||
47 | <div class="label">{{$t('customService.insuranceQuery.t2n4')}}</div> | ||
48 | <div class="label">{{formatInsuredPeriod(dataForm.periodType,dataForm.periodValue)}}</div> | ||
49 | </div> | ||
50 | <div class="separator-v"></div> | ||
51 | <div class="cell1"> | ||
52 | <div class="label">{{$t('customService.insuranceQuery.t2n5')}} | ||
53 | <span @click="toModifyPage(1)">{{$t('customService.insuranceQuery.modify')}}</span> | ||
54 | </div> | ||
55 | <div class="label">{{dataForm.insuredNameCn}}</div> | ||
56 | </div> | ||
57 | </div> | ||
58 | <div class="separator-h"></div> | ||
59 | <div class="data-line"> | ||
60 | <div class="cell1"> | ||
61 | <div class="label">{{$t('customService.insuranceQuery.t2n6')}} | ||
62 | <span @click="toModifyPage(1)">{{$t('customService.insuranceQuery.modify')}}</span> | ||
63 | </div> | ||
64 | <div class="label">{{dataForm.insuredNameEn}}</div> | ||
65 | </div> | ||
66 | <div class="separator-v"></div> | ||
67 | <div class="cell1"> | ||
68 | <div class="label">{{$t('customService.insuranceQuery.t2n7')}}</div> | ||
69 | <div class="label">{{dataForm.insuredBirthday?dataForm.insuredBirthday.split(" ")[0]:""}}</div> | ||
70 | </div> | ||
71 | </div> | ||
72 | |||
73 | <div class="separator-h"></div> | ||
74 | <div class="data-line"> | ||
75 | <div class="cell1"> | ||
76 | <div class="label">{{$t('customService.insuranceQuery.t2n8')}} | ||
77 | <span @click="toModifyPage(1)">{{$t('customService.insuranceQuery.modify')}}</span> | ||
78 | </div> | ||
79 | <div class="label">{{dataForm.insuredIdNumber}}</div> | ||
80 | </div> | ||
81 | |||
82 | <div class="separator-v"></div> | ||
83 | <div class="cell1"> | ||
84 | <div class="label"></div> | ||
85 | <div class="label"></div> | ||
86 | </div> | ||
87 | </div> | ||
88 | </div> | ||
89 | </div> | ||
90 | |||
91 | <div class="cell-group"> | ||
92 | <div class="table-header"> | ||
93 | <div class="normal-header"> | ||
94 | <div class="title">{{$t('customService.insuranceQuery.t3Title')}}</div> | ||
95 | <div class="guide" :class="{rotate180 : !insuranceForm.f2}" @click="insuranceForm.f2 = !insuranceForm.f2"></div> | ||
96 | </div> | ||
97 | </div> | ||
98 | <div class="table-content" :class="{hide : !insuranceForm.f2}"> | ||
99 | <div class="data-line"> | ||
100 | <div class="cell1"> | ||
101 | <div class="label">{{$t('customService.insuranceQuery.t3n1')}} | ||
102 | <span @click="toModifyPage(2)">{{$t('customService.insuranceQuery.modify')}}</span> | ||
103 | </div> | ||
104 | <div class="label">{{dataForm.clientNameCn}}</div> | ||
105 | </div> | ||
106 | <div class="separator-v"></div> | ||
107 | <div class="cell1"> | ||
108 | <div class="label">{{$t('customService.insuranceQuery.t3n2')}} | ||
109 | <span @click="toModifyPage(2)">{{$t('customService.insuranceQuery.modify')}}</span> | ||
110 | </div> | ||
111 | <div class="label">{{dataForm.clientNameEn}}</div> | ||
112 | </div> | ||
113 | </div> | ||
114 | <div class="separator-h"></div> | ||
115 | <div class="data-line"> | ||
116 | <div class="cell1"> | ||
117 | <div class="label">{{$t('customService.insuranceQuery.t3n3')}}</div> | ||
118 | <div class="label">{{dataForm.clientBirthday?dataForm.clientBirthday.split(" ")[0]:""}}</div> | ||
119 | </div> | ||
120 | <div class="separator-v"></div> | ||
121 | <div class="cell1"> | ||
122 | <div class="label">{{$t('customService.insuranceQuery.t3n4')}} | ||
123 | <span @click="toModifyPage(2)">{{$t('customService.insuranceQuery.modify')}}</span> | ||
124 | </div> | ||
125 | <div class="label">{{dataForm.clientIdNumber}}</div> | ||
126 | </div> | ||
127 | </div> | ||
128 | <div class="separator-h"></div> | ||
129 | <div class="data-line"> | ||
130 | <div class="cell1"> | ||
131 | <div class="label">{{$t('customService.insuranceQuery.t3n5')}} | ||
132 | <span @click="toModifyPage(2,1)">{{$t('customService.insuranceQuery.modify')}}</span> | ||
133 | </div> | ||
134 | <div class="label"> {{dataForm.clientContactAddress}}</div> | ||
135 | </div> | ||
136 | <div class="separator-v"></div> | ||
137 | <div class="cell1"> | ||
138 | <div class="label">{{$t('customService.insuranceQuery.t3n6')}} | ||
139 | <span @click="toModifyPage(2,1)">{{$t('customService.insuranceQuery.modify')}}</span> | ||
140 | </div> | ||
141 | <div class="label"> {{dataForm.clientLivingAddress}}</div> | ||
142 | </div> | ||
143 | </div> | ||
144 | <div class="separator-h"></div> | ||
145 | <div class="data-line"> | ||
146 | <div class="cell1"> | ||
147 | <div class="label">{{$t('customService.insuranceQuery.t3n7')}} | ||
148 | <span @click="toModifyPage(2,1)">{{$t('customService.insuranceQuery.modify')}}</span> | ||
149 | </div> | ||
150 | <div class="label">{{dataForm.clientMobileNo}}</div> | ||
151 | </div> | ||
152 | <div class="separator-v"></div> | ||
153 | <div class="cell1"> | ||
154 | <div class="label">{{$t('customService.insuranceQuery.t3n8')}} | ||
155 | <span @click="toModifyPage(2,1)">{{$t('customService.insuranceQuery.modify')}}</span> | ||
156 | </div> | ||
157 | <div class="label">{{dataForm.clientEmail}}</div> | ||
158 | </div> | ||
159 | </div> | ||
160 | |||
161 | </div> | ||
162 | </div> | ||
163 | |||
164 | <div class="cell-group cell-between"> | ||
165 | <div class="table-header"> | ||
166 | <div class="normal-header"> | ||
167 | <div class="title">{{$t('customService.insuranceQuery.t4Title')}}</div> | ||
168 | <div class="guide" :class="{rotate180 : !insuranceForm.f3}" @click="insuranceForm.f3 = !insuranceForm.f3"></div> | ||
169 | </div> | ||
170 | </div> | ||
171 | <div class="table-content" :class="{hide : !insuranceForm.f3}"> | ||
172 | <div class="data-line"> | ||
173 | <div class="td w2">{{$t('customService.insuranceQuery.t4NameCn')}}</div> | ||
174 | <div class="td w2">{{$t('customService.insuranceQuery.t4NameEn')}}</div> | ||
175 | <div class="td w2">{{$t('customService.insuranceQuery.t4Relation')}}</div> | ||
176 | <div class="td w2">{{$t('customService.insuranceQuery.t4Allocation')}}</div> | ||
177 | </div> | ||
178 | <div class="separator-h"></div> | ||
179 | |||
180 | <div v-for="(item,index) in dataForm.benefitList" :key="index"> | ||
181 | <div class="data-line"> | ||
182 | <div class="td w2">{{item.name}}</div> | ||
183 | <div class="td w2">{{item.nameEn}}</div> | ||
184 | <div class="td w2">{{formatBenefitType(item.relationshipWithLA)}}</div> | ||
185 | <div class="td w2">{{item.benefitRate}}</div> | ||
186 | </div> | ||
187 | <div class="separator-h" v-if="index < dataForm.benefitList.length - 1"></div> | ||
188 | </div> | ||
189 | </div> | ||
190 | </div> | ||
191 | |||
192 | <div class="cell-group"> | ||
193 | <div class="table-header"> | ||
194 | <div class="normal-header"> | ||
195 | <div class="title">{{$t('customService.insuranceQuery.t5Title')}}</div> | ||
196 | <div class="guide" :class="{rotate180 : !insuranceForm.f4}" @click="insuranceForm.f4 = !insuranceForm.f4"></div> | ||
197 | </div> | ||
198 | </div> | ||
199 | <div class="table-content" :class="{hide : !insuranceForm.f4}"> | ||
200 | <div class="data-line"> | ||
201 | <div class="cell1"> | ||
202 | <div class="label">{{$t('customService.insuranceQuery.t5PaymentPeriod')}}</div> | ||
203 | <div class="label">{{formatPayPeriod(dataForm.payPeriodType,dataForm.payPeriodValue)}}</div> | ||
204 | </div> | ||
205 | <div class="separator-v"></div> | ||
206 | <div class="cell1"> | ||
207 | <div class="label">{{$t('customService.insuranceQuery.t5PaymentMethod')}}</div> | ||
208 | <div class="label">{{formatPayMode(dataForm.payMode)}}</div> | ||
209 | </div> | ||
210 | </div> | ||
211 | <div class="separator-h"></div> | ||
212 | |||
213 | <div class="data-line"> | ||
214 | <div class="cell1"> | ||
215 | <div class="label">{{$t('customService.insuranceQuery.t5PaymentCurrency')}}</div> | ||
216 | <div class="label">{{formatMoneyName(dataForm.moneyId)}}</div> | ||
217 | </div> | ||
218 | <div class="separator-v"></div> | ||
219 | <div class="cell1"> | ||
220 | <div class="label">{{$t('customService.insuranceQuery.t5CurrentPremium')}}</div> | ||
221 | <div class="label">{{dataForm.moneyMark}} {{formatMoney(dataForm.premium)}}</div> | ||
222 | </div> | ||
223 | </div> | ||
224 | <div class="separator-h"></div> | ||
225 | |||
226 | <div class="data-line"> | ||
227 | <div class="cell1"> | ||
228 | <div class="label">{{$t('customService.insuranceQuery.t5PaymentBank')}}</div> | ||
229 | <div class="label">{{dataForm.bankName}}</div> | ||
230 | </div> | ||
231 | <div class="separator-v"></div> | ||
232 | <div class="cell1"> | ||
233 | <div class="label">{{$t('customService.insuranceQuery.t5PaymentAccount')}}</div> | ||
234 | <div class="label">{{dataForm.bankAccount}}</div> | ||
235 | </div> | ||
236 | </div> | ||
237 | <div class="separator-h"></div> | ||
238 | </div> | ||
239 | </div> | ||
240 | |||
241 | <div class="cell-group cell-between"> | ||
242 | <div class="table-header"> | ||
243 | <div class="normal-header"> | ||
244 | <div class="title">{{$t('customService.insuranceQuery.t6Title')}}</div> | ||
245 | <div class="guide" :class="{rotate180 : !insuranceForm.f5}" @click="insuranceForm.f5 = !insuranceForm.f5"></div> | ||
246 | </div> | ||
247 | </div> | ||
248 | <div class="table-content" :class="{hide : !insuranceForm.f5}"> | ||
249 | <div class="data-line"> | ||
250 | <div class="td w2">{{$t('customService.insuranceQuery.t6PaymentPeriod')}}</div> | ||
251 | <div class="td w2">{{$t('customService.insuranceQuery.t6PaymentMethod')}}</div> | ||
252 | <div class="td w2">{{$t('customService.insuranceQuery.t6ClosingDate')}}</div> | ||
253 | <div class="td w2">{{$t('customService.insuranceQuery.t6PaymentAmount')}}</div> | ||
254 | </div> | ||
255 | <div class="separator-h"></div> | ||
256 | <div v-for="(item,index) in dataForm.pandupList" :key="index"> | ||
257 | <div class="data-line"> | ||
258 | <div class="td w2">{{formatPanduPayPeriod(item.policyYear,item.policyPeriod)}}</div> | ||
259 | <div class="td w2">{{formatPayMode(dataForm.payMode)}}</div> | ||
260 | <div class="td w2">{{item.receiptDate?item.receiptDate.split(" ")[0]:""}}</div> | ||
261 | <div class="td w2">{{dataForm.moneyMark}} {{formatMoney(item.totalPremium)}}</div> | ||
262 | </div> | ||
263 | <div class="separator-h" v-if="index < dataForm.pandupList.length - 1"></div> | ||
264 | </div> | ||
265 | </div> | ||
266 | </div> | ||
267 | </template> --> | ||
268 | </div> | 9 | </div> |
269 | </div> | 10 | </div> |
270 | </template> | 11 | </template> | ... | ... |
... | @@ -64,220 +64,27 @@ export default { | ... | @@ -64,220 +64,27 @@ export default { |
64 | let child = event.currentTarget.childNodes[0]; | 64 | let child = event.currentTarget.childNodes[0]; |
65 | child.style.display = "none"; | 65 | child.style.display = "none"; |
66 | }, | 66 | }, |
67 | toContactUs() { | ||
68 | this.$router.push({ | ||
69 | path: "/custom/service", | ||
70 | query: { | ||
71 | q: "m1" | ||
72 | } | ||
73 | }); | ||
74 | }, | ||
75 | queryList() { | ||
76 | if (this.policyList && this.policyList.length > 0) { | ||
77 | this.myPolicyList = this.policyList; | ||
78 | this.myPolicyList = this.myPolicyList.slice(0, 5); | ||
79 | this.myPolicyList.forEach(element => { | ||
80 | element.activity = false; | ||
81 | }) | ||
82 | this.initSelected(); | ||
83 | } else { | ||
84 | this.checkCustomer().then(() => { | ||
85 | httpPost({ | ||
86 | url: api.policyList, | ||
87 | sid: true | ||
88 | }).then(res => { | ||
89 | if (!res || res.length == 0) { | ||
90 | this.myPolicyList = null; | ||
91 | } else { | ||
92 | res.forEach(element => { | ||
93 | element.activity = false; | ||
94 | // let len = element.policyCode.length; | ||
95 | // element.policyCodeStr = element.policyCode && len > 5 ? | ||
96 | // element.policyCode.substring(0, 2) + "**********" | ||
97 | // + element.policyCode.substring(len - 4, len) : element.policyCode; | ||
98 | }); | ||
99 | this.$store.commit("CACHE_POLICY_LIST", res); | ||
100 | this.myPolicyList = res; | ||
101 | } | ||
102 | this.initSelected(); | ||
103 | }).catch(e => { | ||
104 | this.myPolicyList = null; | ||
105 | switch (e.code) { | ||
106 | case "2002": | ||
107 | // 不是客户,没有购买保单 | ||
108 | break; | ||
109 | } | ||
110 | }); | ||
111 | }); | ||
112 | |||
113 | } | ||
114 | }, | ||
115 | initSelected() { | ||
116 | let selectPolicy = null; | ||
117 | try { | ||
118 | let data = sessionStorage.getItem("_hklife_policy"); | ||
119 | if (data) { | ||
120 | sessionStorage.removeItem("_hklife_policy"); | ||
121 | selectPolicy = JSON.parse(decodeURIComponent(data)); | ||
122 | if (selectPolicy) { | ||
123 | if (this.multiSelectable) { | ||
124 | this.selectPolicyCodes[selectPolicy.code] = selectPolicy; | ||
125 | } else { | ||
126 | this.selectPolicyCode = selectPolicy.code; | ||
127 | } | ||
128 | this.$emit("onSelect", [selectPolicy]); | ||
129 | |||
130 | // 判断最大显示 | ||
131 | let index = -1; | ||
132 | for (let i = 0; i < this.myPolicyList.length; i++) { | ||
133 | if (selectPolicy.code == this.myPolicyList[i].policyCode) { | ||
134 | this.myPolicyList[i].activity = true; | ||
135 | index = i; | ||
136 | } | ||
137 | } | ||
138 | this.$set(this, "myPolicyList", this.myPolicyList); | ||
139 | if (index > 2) { | ||
140 | this.maxShow = this.myPolicyList.length; | ||
141 | } | ||
142 | } | ||
143 | } | ||
144 | } catch (e) { | ||
145 | |||
146 | } | ||
147 | if (!selectPolicy) { | ||
148 | let firstPolicy = this.myPolicyList[0]; | ||
149 | this.myPolicyList[0].activity = true; | ||
150 | selectPolicy = { | ||
151 | id: firstPolicy.policyId, | ||
152 | code: firstPolicy.policyCode | ||
153 | }; | ||
154 | if (this.multiSelectable) { | ||
155 | this.selectPolicyCodes[selectPolicy.code] = selectPolicy; | ||
156 | } else { | ||
157 | this.selectPolicyCode = selectPolicy.code; | ||
158 | } | ||
159 | this.$emit("onSelect", [selectPolicy]); | ||
160 | } | ||
161 | }, | ||
162 | handlePolicySelect(item, index) { | ||
163 | let code = item.policyCode; | ||
164 | if (this.multiSelectable) { | ||
165 | let c = this.selectPolicyCodes[code]; | ||
166 | if (!c || typeof c == "undefined") { | ||
167 | item.activity = true; | ||
168 | this.selectPolicyCodes[code] = { | ||
169 | code: code, | ||
170 | id: item.policyId | ||
171 | }; | ||
172 | } else { | ||
173 | item.activity = false; | ||
174 | delete this.selectPolicyCodes[code]; | ||
175 | } | ||
176 | // this.$set(this, 'myPolicyList', this.myPolicyList); | ||
177 | let data = []; | ||
178 | for (let key in this.selectPolicyCodes) { | ||
179 | data.push(this.selectPolicyCodes[key]); | ||
180 | } | ||
181 | this.$emit("onSelect", data); | ||
182 | } else { | ||
183 | if (code != this.selectPolicyCode) { | ||
184 | this.selectPolicyCode = code; | ||
185 | this.$emit("onSelect", [{ | ||
186 | code: code, | ||
187 | id: item.policyId | ||
188 | }]); | ||
189 | } | ||
190 | } | ||
191 | }, | ||
192 | isPolicySelect(item, index) { | ||
193 | let code = item.policyCode; | ||
194 | if (this.multiSelectable) { | ||
195 | let c = this.selectPolicyCodes[code]; | ||
196 | if (!c || typeof c == "undefined") { | ||
197 | return false; | ||
198 | } else { | ||
199 | return true; | ||
200 | } | ||
201 | } | ||
202 | return false; | ||
203 | }, | ||
204 | checkCustomer() { | ||
205 | return new Promise(resolve => { | ||
206 | resolve(); | ||
207 | // httpPost({ url: api.profile, sid: true }).then(res => { | ||
208 | // if (res.isCustomer == 1) { | ||
209 | // resolve(); | ||
210 | // } else { | ||
211 | // this.gotoCustomerAuthPage(); | ||
212 | // } | ||
213 | // }).catch(res => { | ||
214 | |||
215 | // }); | ||
216 | }); | ||
217 | }, | ||
218 | gotoCustomerAuthPage() { | ||
219 | let c = this.$route.fullPath; | ||
220 | this.$router.push({ | ||
221 | name: "customerAuth", | ||
222 | query: { | ||
223 | c: c | ||
224 | } | ||
225 | }); | ||
226 | }, | ||
227 | formatMoney(s, t) { | ||
228 | if (typeof t == "undefined") { | ||
229 | t = 1; | ||
230 | } | ||
231 | return formatMoney(s, t); | ||
232 | }, | ||
233 | // 保障年限,保n年 | ||
234 | formatInsuredPeriod(t, v) { | ||
235 | return getInsuredPeriod(this.$i18n.locale, t, v); | ||
236 | }, | ||
237 | formatInsuredState(c) { | ||
238 | return getInsuredState(this.$i18n.locale, c); | ||
239 | }, | ||
240 | formatPolicyName(c, n) { | ||
241 | return getPolicyName(this.$i18n.locale, c, n); | ||
242 | }, | ||
243 | downloadPolicy(policy) { | ||
244 | if (policy) { | ||
245 | httpPost({ | ||
246 | url: api.getDownloadPath, | ||
247 | sid: true, | ||
248 | data: { | ||
249 | policyCode: policy.policyCode | ||
250 | } | ||
251 | }).then(res => { | ||
252 | if (res) { | ||
253 | let url = requestDomain() + api.downloadPolicy + "/" + res; | ||
254 | window.open(url); | ||
255 | } else { | ||
256 | this.showDownloadError = true; | ||
257 | } | ||
258 | }); | ||
259 | } | ||
260 | }, | ||
261 | // 过滤筛选 | 67 | // 过滤筛选 |
262 | onFilterHandler(idx) { | 68 | onFilterHandler(idx) { |
263 | this.checkList = [] | 69 | this.checkList = [] |
70 | this.checkList = [ | ||
71 | "复选框 A", | ||
72 | "复选框 B", | ||
73 | "复选框 C", | ||
74 | "复选框 D", | ||
75 | "复选框 E", | ||
76 | "复选框 F", | ||
77 | "复选框 G", | ||
78 | "复选框 H", | ||
79 | "复选框 I", | ||
80 | "复选框 J", | ||
81 | "复选框 K", | ||
82 | "复选框 L", | ||
83 | ] | ||
264 | switch (idx) { | 84 | switch (idx) { |
265 | // 保单号码 | 85 | // 保单号码 |
266 | case 1: | 86 | case 1: |
267 | this.checkList = [ | 87 | |
268 | "复选框 A", | ||
269 | "复选框 B", | ||
270 | "复选框 C", | ||
271 | "复选框 D", | ||
272 | "复选框 E", | ||
273 | "复选框 F", | ||
274 | "复选框 G", | ||
275 | "复选框 H", | ||
276 | "复选框 I", | ||
277 | "复选框 J", | ||
278 | "复选框 K", | ||
279 | "复选框 L", | ||
280 | ] | ||
281 | break; | 88 | break; |
282 | // 通知书类型 | 89 | // 通知书类型 |
283 | case 2: | 90 | case 2: |
... | @@ -304,14 +111,12 @@ export default { | ... | @@ -304,14 +111,12 @@ export default { |
304 | * 多选确认 | 111 | * 多选确认 |
305 | */ | 112 | */ |
306 | onCheckConfirmHandler(evt) { | 113 | onCheckConfirmHandler(evt) { |
307 | console.log("checkList evt:", evt); | 114 | console.log("checkList evt :", evt); |
308 | } | 115 | } |
309 | }, | 116 | }, |
310 | components: { | 117 | components: { |
311 | Modal2Comp, | 118 | Modal2Comp, |
312 | FilterComp | 119 | FilterComp |
313 | }, | 120 | }, |
314 | mounted() { | 121 | mounted() {}, |
315 | this.queryList(); | ||
316 | }, | ||
317 | } | 122 | } | ... | ... |
1 | <template> | 1 | <template> |
2 | <div class="list-container"> | 2 | <div class="list-container"> |
3 | <modal2-comp :visible="showDownloadError" :close="()=>{showDownloadError = false}" :content="$t('glbalTips.sysError')"></modal2-comp> | 3 | <modal2-comp :visible="showDownloadError" :close="()=>{showDownloadError = false}" :content="$t('glbalTips.sysError')"></modal2-comp> |
4 | <filter-comp :items="checkList" :confirm="onCheckConfirmHandler" :visible="filterVisible" :close="()=>{filterVisible = false}" ></filter-comp> | 4 | <filter-comp :items="checkList" @confirm="onCheckConfirmHandler" :visible="filterVisible" @close="filterVisible = false"></filter-comp> |
5 | <div class="cell-group"> | 5 | <div class="cell-group"> |
6 | <div class="table-contaner"> | 6 | <div class="table-contaner"> |
7 | <div class="table-header orange new"> | 7 | <div class="table-header orange new"> |
... | @@ -26,35 +26,22 @@ | ... | @@ -26,35 +26,22 @@ |
26 | </div> | 26 | </div> |
27 | <div class="table-content" :class="{hide : hide}"> | 27 | <div class="table-content" :class="{hide : hide}"> |
28 | <template v-if="myPolicyList"> | 28 | <template v-if="myPolicyList"> |
29 | <div v-for="(item,index) in myPolicyList" :key="index"> | 29 | <div v-for="(item,index) in 5" :key="index"> |
30 | <template v-if="index < maxShow"> | 30 | <template v-if="index < maxShow"> |
31 | <div class="data-line" @click="handlePolicySelect(item,index)"> | 31 | <div class="data-line" @click="handlePolicySelect(item,index)"> |
32 | <div class="td w1 pointer"> | 32 | <div class="td w1">P388888880772</div> |
33 | <template v-if="multiSelectable"> | 33 | <div class="td w1">保單繕發及冷靜期通知書</div> |
34 | <img v-if="item.activity" class="icon-check pointer" src="@/assets/images/insurance-query/check.png"> | 34 | <div class="td w2">2020-3-1</div> |
35 | <img v-else class="icon-check pointer" src="@/assets/images/insurance-query/un-check.png"> | 35 | <div class="td w2 pointer"> |
36 | <span class="sp" :class="{ac: item.activity}">{{item.policyCode}}</span> | 36 | <div class="download" @mouseover="onShowTipsOverHandler($event,item,index)" @mouseout="onShowTipsOutHandler($event,item,index)" @click="downloadPolicy(item)"> |
37 | </template> | 37 | <div class="download-tips"> |
38 | <template v-else> | 38 | <div class="cont">{{$t('customService.insuranceQuery.downloadClick')}}</div> |
39 | <template v-if="model != 'download'"> | 39 | </div> |
40 | <img v-if="selectPolicyCode == item.policyCode" class="icon-check pointer" src="@/assets/images/insurance-query/check.png"> | 40 | <img class="icon-download" src="@/assets/images/insurance-query/icon-down-load.png" alt=""> |
41 | <img v-else class="icon-check pointer" src="@/assets/images/insurance-query/un-check.png"> | 41 | </div> |
42 | </template> | 42 | 下載文檔 |
43 | <span class="sp" :class="{ac: selectPolicyCode == item.policyCode}">{{item.policyCode}}</span> | ||
44 | <template v-if="model == 'download'"> | ||
45 | <div class="download" @mouseover="onShowTipsOverHandler($event,item,index)" @mouseout="onShowTipsOutHandler($event,item,index)" @click="downloadPolicy(item)"> | ||
46 | <div class="download-tips"> | ||
47 | <div class="cont">{{$t('customService.insuranceQuery.downloadClick')}}</div> | ||
48 | </div> | ||
49 | <img class="icon-download" src="@/assets/images/insurance-query/icon-down-load.png" alt=""> | ||
50 | </div> | ||
51 | </template> | ||
52 | </template> | ||
53 | </div> | 43 | </div> |
54 | <div class="td w1">{{formatInsuredState(item.policyState)}}</div> | 44 | <div class="td w2">已閱讀</div> |
55 | <div class="td w2">{{item.activeDate?item.activeDate.split(" ")[0]:""}}</div> | ||
56 | <div class="td w2">{{formatPolicyName(item.productCode, item.productName)}}</div> | ||
57 | <div class="td w2">{{formatInsuredPeriod(item.insuredPeriodType,item.insuredPeriodValue)}}</div> | ||
58 | </div> | 45 | </div> |
59 | <div class="separator-h" v-if="index < myPolicyList.length - 1 && index < maxShow - 1"></div> | 46 | <div class="separator-h" v-if="index < myPolicyList.length - 1 && index < maxShow - 1"></div> |
60 | </template> | 47 | </template> | ... | ... |
... | @@ -38,7 +38,6 @@ export default { | ... | @@ -38,7 +38,6 @@ export default { |
38 | size: 999999 | 38 | size: 999999 |
39 | } | 39 | } |
40 | }).then((result) => { | 40 | }).then((result) => { |
41 | console.log("result:", result); | ||
42 | let lang = this.$i18n.locale; | 41 | let lang = this.$i18n.locale; |
43 | let dataList = []; | 42 | let dataList = []; |
44 | result.forEach(element => { | 43 | result.forEach(element => { | ... | ... |
-
Please register or sign in to post a comment