回销回执
Showing
14 changed files
with
74 additions
and
32 deletions
... | @@ -58,6 +58,10 @@ module.exports = { | ... | @@ -58,6 +58,10 @@ module.exports = { |
58 | idPicUpload : "/pingan_hklife_webapi/policy/idPicUpload", | 58 | idPicUpload : "/pingan_hklife_webapi/policy/idPicUpload", |
59 | // 回销回执 | 59 | // 回销回执 |
60 | policyReceipt : "/pingan_hklife_webapi/policy/policyReceipt", | 60 | policyReceipt : "/pingan_hklife_webapi/policy/policyReceipt", |
61 | // 获取电子保单下载code | ||
62 | getDownloadPath : "/pingan_hklife_webapi/policy/getDownloadPath", | ||
63 | // 下载电子保单 | ||
64 | downloadPolicy : "/pingan_hklife_webapi/policy/d", | ||
61 | 65 | ||
62 | 66 | ||
63 | // cms相关 | 67 | // cms相关 | ... | ... |
... | @@ -50,9 +50,11 @@ function Toast(msg) { | ... | @@ -50,9 +50,11 @@ function Toast(msg) { |
50 | // let base = process.env.REQUEST_DOMAIN || "http://localhost:9101"; | 50 | // let base = process.env.REQUEST_DOMAIN || "http://localhost:9101"; |
51 | // let base = COM.baseUrl; | 51 | // let base = COM.baseUrl; |
52 | // console.log(process.env); | 52 | // console.log(process.env); |
53 | let base = ""; | 53 | let base = process.env.VUE_APP_BASE_URL; |
54 | // let baseURL = "http://localhost:9101"; | ||
54 | const axios = axiosIns.create({ | 55 | const axios = axiosIns.create({ |
55 | baseURL: process.env.VUE_APP_BASE_URL, | 56 | // baseURL: process.env.VUE_APP_BASE_URL, |
57 | baseURL: baseURL, | ||
56 | timeout: 10000 | 58 | timeout: 10000 |
57 | }) | 59 | }) |
58 | 60 | ||
... | @@ -193,7 +195,7 @@ export const httpGet = params => { | ... | @@ -193,7 +195,7 @@ export const httpGet = params => { |
193 | } | 195 | } |
194 | } | 196 | } |
195 | } | 197 | } |
196 | return axios.get(`${base}${url}`, { | 198 | return axios.get(`${url}`, { |
197 | params: data | 199 | params: data |
198 | }, headers).then(res => res.data.content); | 200 | }, headers).then(res => res.data.content); |
199 | } | 201 | } |
... | @@ -225,7 +227,7 @@ export const httpPost = params => { | ... | @@ -225,7 +227,7 @@ export const httpPost = params => { |
225 | } | 227 | } |
226 | } | 228 | } |
227 | } | 229 | } |
228 | return axios.post(`${base}${url}`, data, headers).then(res => res.data.content); | 230 | return axios.post(`${url}`, data, headers).then(res => res.data.content); |
229 | } | 231 | } |
230 | 232 | ||
231 | /** | 233 | /** |
... | @@ -257,5 +259,9 @@ export const formdata = params => { | ... | @@ -257,5 +259,9 @@ export const formdata = params => { |
257 | let sessionId = state.userInfo && state.userInfo.sid ? state.userInfo.sid : ""; | 259 | let sessionId = state.userInfo && state.userInfo.sid ? state.userInfo.sid : ""; |
258 | headers.headers.sid = sessionId; | 260 | headers.headers.sid = sessionId; |
259 | } | 261 | } |
260 | return axios.post(`${base}${url}`, formData, headers).then(res => res.data); | 262 | return axios.post(`${url}`, formData, headers).then(res => res.data); |
263 | } | ||
264 | |||
265 | export const requestDomain = () => { | ||
266 | return baseURL; | ||
261 | } | 267 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -61,12 +61,11 @@ module.exports = { | ... | @@ -61,12 +61,11 @@ module.exports = { |
61 | path: "/product/introduction", | 61 | path: "/product/introduction", |
62 | list: [{ | 62 | list: [{ |
63 | name: "VHIS", | 63 | name: "VHIS", |
64 | path: "", | 64 | path: "/vhis?p=VHIS001" |
65 | value: "gotoVHIS" | ||
66 | }, | 65 | }, |
67 | { | 66 | { |
68 | name: "Insurance with Investment Focus", | 67 | name: "Insurance with Investment Focus", |
69 | path: "/product" | 68 | path: "/vhis?p=endowment" |
70 | }] | 69 | }] |
71 | }, | 70 | }, |
72 | { | 71 | { | ... | ... |
... | @@ -62,12 +62,11 @@ module.exports = { | ... | @@ -62,12 +62,11 @@ module.exports = { |
62 | path: "/product/introduction", | 62 | path: "/product/introduction", |
63 | list: [{ | 63 | list: [{ |
64 | name: "自願醫保計劃", | 64 | name: "自願醫保計劃", |
65 | path: "", | 65 | path: "/vhis?p=VHIS001" |
66 | value: "gotoVHIS" | ||
67 | }, | 66 | }, |
68 | { | 67 | { |
69 | name: "投資成份保險", | 68 | name: "投資成份保險", |
70 | path: "/product" | 69 | path: "/vhis?p=endowment" |
71 | }] | 70 | }] |
72 | }, | 71 | }, |
73 | { | 72 | { | ... | ... |
... | @@ -61,12 +61,11 @@ module.exports = { | ... | @@ -61,12 +61,11 @@ module.exports = { |
61 | path: "/product/introduction", | 61 | path: "/product/introduction", |
62 | list: [{ | 62 | list: [{ |
63 | name: "自愿医保计划", | 63 | name: "自愿医保计划", |
64 | path: "", | 64 | path: "/vhis?p=VHIS001" |
65 | value: "gotoVHIS" | ||
66 | }, | 65 | }, |
67 | { | 66 | { |
68 | name: "投资成份保险", | 67 | name: "投资成份保险", |
69 | path: "/product" | 68 | path: "/vhis?p=endowment" |
70 | }] | 69 | }] |
71 | }, | 70 | }, |
72 | { | 71 | { | ... | ... |
... | @@ -3,7 +3,8 @@ import { mapState } from "vuex"; | ... | @@ -3,7 +3,8 @@ import { mapState } from "vuex"; |
3 | import api from '@/api/api' | 3 | import api from '@/api/api' |
4 | import { | 4 | import { |
5 | httpGet, | 5 | httpGet, |
6 | httpPost | 6 | httpPost, |
7 | requestDomain | ||
7 | } from '@/api/fetch-api.js' | 8 | } from '@/api/fetch-api.js' |
8 | 9 | ||
9 | export default { | 10 | export default { |
... | @@ -26,6 +27,15 @@ export default { | ... | @@ -26,6 +27,15 @@ export default { |
26 | }, | 27 | }, |
27 | methods: { | 28 | methods: { |
28 | initData() { | 29 | initData() { |
30 | if (this.showPolicy) { | ||
31 | let hidePolicy = sessionStorage.getItem("hidePolicy"); | ||
32 | if (hidePolicy) { | ||
33 | this.showPolicy = false; | ||
34 | } | ||
35 | } | ||
36 | if (!this.showPolicy) { | ||
37 | return; | ||
38 | } | ||
29 | if (this.isLogin() && !this.hadLoadPolicy) { | 39 | if (this.isLogin() && !this.hadLoadPolicy) { |
30 | this.ignorePolicyCodes = []; | 40 | this.ignorePolicyCodes = []; |
31 | let temp = sessionStorage.getItem("ignorePolicyCodes"); | 41 | let temp = sessionStorage.getItem("ignorePolicyCodes"); |
... | @@ -132,15 +142,25 @@ export default { | ... | @@ -132,15 +142,25 @@ export default { |
132 | }, | 142 | }, |
133 | // 忽略保单按钮 | 143 | // 忽略保单按钮 |
134 | handleIgnorePolicy() { | 144 | handleIgnorePolicy() { |
135 | console.log(this.policyDetail); | ||
136 | if (this.policyDetail) { | 145 | if (this.policyDetail) { |
137 | this.ignorePolicyCodes.push(this.policyDetail.policyCode); | 146 | this.ignorePolicyCodes.push(this.policyDetail.policyCode); |
138 | sessionStorage.setItem("ignorePolicyCodes", JSON.stringify(this.ignorePolicyCodes)); | 147 | sessionStorage.setItem("ignorePolicyCodes", JSON.stringify(this.ignorePolicyCodes)); |
139 | this.checkIfShowPolicy(); | 148 | this.checkIfShowPolicy(); |
140 | } | 149 | } |
141 | }, | 150 | }, |
151 | downloadPolicy() { | ||
152 | if (this.policyDetail) { | ||
153 | httpPost({ url: api.getDownloadPath, sid: true, data: { policyCode: this.policyDetail.policyCode } }).then(res => { | ||
154 | if (res) { | ||
155 | let url = requestDomain() + api.downloadPolicy + "/" + res; | ||
156 | window.open(url); | ||
157 | } | ||
158 | }); | ||
159 | } | ||
160 | }, | ||
142 | onOverLayHandler() { | 161 | onOverLayHandler() { |
143 | this.showPolicy = false; | 162 | this.showPolicy = false; |
163 | sessionStorage.setItem("hidePolicy", "true"); | ||
144 | }, | 164 | }, |
145 | toContact() { | 165 | toContact() { |
146 | this.showPolicy = false; | 166 | this.showPolicy = false; |
... | @@ -158,6 +178,7 @@ export default { | ... | @@ -158,6 +178,7 @@ export default { |
158 | this.policyDetail = null; | 178 | this.policyDetail = null; |
159 | this.ignorePolicyCodes = []; | 179 | this.ignorePolicyCodes = []; |
160 | sessionStorage.removeItem("ignorePolicyCodes"); | 180 | sessionStorage.removeItem("ignorePolicyCodes"); |
181 | sessionStorage.removeItem("hidePolicy"); | ||
161 | }, | 182 | }, |
162 | isLogin() { | 183 | isLogin() { |
163 | return this.userInfo && this.userInfo.sid; | 184 | return this.userInfo && this.userInfo.sid; | ... | ... |
... | @@ -19,7 +19,7 @@ | ... | @@ -19,7 +19,7 @@ |
19 | <div class="flex-left"><div class="desc">{{$t('vhis.label4')}}:</div><div class="value">{{policyDetail.clientNameCn}}</div></div> | 19 | <div class="flex-left"><div class="desc">{{$t('vhis.label4')}}:</div><div class="value">{{policyDetail.clientNameCn}}</div></div> |
20 | <div class="flex-left"><div class="desc">{{$t('vhis.label5')}}:</div><div class="value">{{policyDetail.insuredNameCn}}</div></div> | 20 | <div class="flex-left"><div class="desc">{{$t('vhis.label5')}}:</div><div class="value">{{policyDetail.insuredNameCn}}</div></div> |
21 | 21 | ||
22 | <div class="download-btn flex-center"><img src="@/assets/images/vhis/vhis-download.png"><span class="btn-name">{{$t('vhis.btn1')}}</span></div> | 22 | <div class="download-btn flex-center" @click="downloadPolicy"><img src="@/assets/images/vhis/vhis-download.png"><span class="btn-name">{{$t('vhis.btn1')}}</span></div> |
23 | </div> | 23 | </div> |
24 | <hr class="default-mt"> | 24 | <hr class="default-mt"> |
25 | <div class="content default-mt"> | 25 | <div class="content default-mt"> | ... | ... |
... | @@ -14,8 +14,6 @@ input { | ... | @@ -14,8 +14,6 @@ input { |
14 | color: #747474; | 14 | color: #747474; |
15 | } | 15 | } |
16 | 16 | ||
17 | .value .ipt-wrap .comp .ipt-wrap .ipt {} | ||
18 | |||
19 | .submit-btn{ | 17 | .submit-btn{ |
20 | background: url("~@assets/images/vhis/vhis-btn.png"); | 18 | background: url("~@assets/images/vhis/vhis-btn.png"); |
21 | background-size: 100% 100%; | 19 | background-size: 100% 100%; | ... | ... |
... | @@ -76,7 +76,7 @@ | ... | @@ -76,7 +76,7 @@ |
76 | padding: 0 2.75rem; | 76 | padding: 0 2.75rem; |
77 | max-height: 41.666667rem; | 77 | max-height: 41.666667rem; |
78 | transition: max-height ease-out 0.3s !important; | 78 | transition: max-height ease-out 0.3s !important; |
79 | overflow: hidden; | 79 | overflow: scroll; |
80 | 80 | ||
81 | .data-line { | 81 | .data-line { |
82 | height: 4.416667rem; | 82 | height: 4.416667rem; | ... | ... |
... | @@ -21,7 +21,7 @@ | ... | @@ -21,7 +21,7 @@ |
21 | <div class="separator-v"></div> | 21 | <div class="separator-v"></div> |
22 | <div class="cell1"> | 22 | <div class="cell1"> |
23 | <div class="label">{{$t('customService.insuranceQuery.t2n2')}}</div> | 23 | <div class="label">{{$t('customService.insuranceQuery.t2n2')}}</div> |
24 | <div class="label">{{toMoneyCode(dataForm.moneyCode)}} {{formatMoney(dataForm.amount,0)}}</div> | 24 | <div class="label">{{dataForm.moneyMark}} {{formatMoney(dataForm.amount,0)}}</div> |
25 | </div> | 25 | </div> |
26 | </div> | 26 | </div> |
27 | <div class="separator-h"></div> | 27 | <div class="separator-h"></div> |
... | @@ -162,7 +162,7 @@ | ... | @@ -162,7 +162,7 @@ |
162 | <div class="data-line"> | 162 | <div class="data-line"> |
163 | <div class="cell1"> | 163 | <div class="cell1"> |
164 | <div class="label">{{$t('customService.insuranceQuery.t5PaymentPeriod')}}</div> | 164 | <div class="label">{{$t('customService.insuranceQuery.t5PaymentPeriod')}}</div> |
165 | <div class="label">{{dataForm.insuredPeriod}}</div> | 165 | <div class="label">{{dataForm.payPeriod}}</div> |
166 | </div> | 166 | </div> |
167 | <div class="separator-v"></div> | 167 | <div class="separator-v"></div> |
168 | <div class="cell1"> | 168 | <div class="cell1"> |
... | @@ -175,12 +175,12 @@ | ... | @@ -175,12 +175,12 @@ |
175 | <div class="data-line"> | 175 | <div class="data-line"> |
176 | <div class="cell1"> | 176 | <div class="cell1"> |
177 | <div class="label">{{$t('customService.insuranceQuery.t5PaymentCurrency')}}</div> | 177 | <div class="label">{{$t('customService.insuranceQuery.t5PaymentCurrency')}}</div> |
178 | <div class="label">{{toMoneyCodeName(dataForm.moneyCode)}}</div> | 178 | <div class="label">{{dataForm.moneyName}}</div> |
179 | </div> | 179 | </div> |
180 | <div class="separator-v"></div> | 180 | <div class="separator-v"></div> |
181 | <div class="cell1"> | 181 | <div class="cell1"> |
182 | <div class="label">{{$t('customService.insuranceQuery.t5CurrentPremium')}}</div> | 182 | <div class="label">{{$t('customService.insuranceQuery.t5CurrentPremium')}}</div> |
183 | <div class="label">{{toMoneyCode(dataForm.moneyCode)}} {{formatMoney(dataForm.premium)}}</div> | 183 | <div class="label">{{dataForm.moneyMark}} {{formatMoney(dataForm.premium)}}</div> |
184 | </div> | 184 | </div> |
185 | </div> | 185 | </div> |
186 | <div class="separator-h"></div> | 186 | <div class="separator-h"></div> |
... | @@ -220,7 +220,7 @@ | ... | @@ -220,7 +220,7 @@ |
220 | <div class="td w2">{{item.paidPeriod}}</div> | 220 | <div class="td w2">{{item.paidPeriod}}</div> |
221 | <div class="td w2">{{item.payType}}</div> | 221 | <div class="td w2">{{item.payType}}</div> |
222 | <div class="td w2">{{item.receiptDate?item.receiptDate.split(" ")[0]:""}}</div> | 222 | <div class="td w2">{{item.receiptDate?item.receiptDate.split(" ")[0]:""}}</div> |
223 | <div class="td w2">{{toMoneyCode(dataForm.moneyCode)}} {{formatMoney(item.totalPremium)}}</div> | 223 | <div class="td w2">{{dataForm.moneyMark}} {{formatMoney(item.totalPremium)}}</div> |
224 | </div> | 224 | </div> |
225 | <div class="separator-h" v-if="index < dataForm.pandupList.length - 1"></div> | 225 | <div class="separator-h" v-if="index < dataForm.pandupList.length - 1"></div> |
226 | </div> | 226 | </div> | ... | ... |
... | @@ -27,7 +27,7 @@ export default { | ... | @@ -27,7 +27,7 @@ export default { |
27 | maxShow: 2, | 27 | maxShow: 2, |
28 | selectPolicyCode: "", | 28 | selectPolicyCode: "", |
29 | selectPolicyCodes: {}, | 29 | selectPolicyCodes: {}, |
30 | hide : false | 30 | hide: false |
31 | } | 31 | } |
32 | }, | 32 | }, |
33 | computed: { | 33 | computed: { |
... | @@ -189,6 +189,16 @@ export default { | ... | @@ -189,6 +189,16 @@ export default { |
189 | } | 189 | } |
190 | return formatMoney(s, t); | 190 | return formatMoney(s, t); |
191 | }, | 191 | }, |
192 | downloadPolicy(policy) { | ||
193 | if (policy) { | ||
194 | httpPost({ url: api.getDownloadPath, sid: true, data: { policyCode: policy.policyCode } }).then(res => { | ||
195 | if (res) { | ||
196 | let url = requestDomain() + api.downloadPolicy + "/" + res; | ||
197 | window.open(url); | ||
198 | } | ||
199 | }); | ||
200 | } | ||
201 | } | ||
192 | }, | 202 | }, |
193 | components: { | 203 | components: { |
194 | }, | 204 | }, | ... | ... |
... | @@ -32,7 +32,7 @@ | ... | @@ -32,7 +32,7 @@ |
32 | </template> | 32 | </template> |
33 | <span class="sp" :class="{ac: selectPolicyCode == item.policyCode}">{{item.policyCode}}</span> | 33 | <span class="sp" :class="{ac: selectPolicyCode == item.policyCode}">{{item.policyCode}}</span> |
34 | <template v-if="model == 'download'"> | 34 | <template v-if="model == 'download'"> |
35 | <img class="icon-download" src="@/assets/images/insurance-query/icon-down-load.png" alt=""> | 35 | <img @click="downloadPolicy(item)" class="icon-download" src="@/assets/images/insurance-query/icon-down-load.png" alt=""> |
36 | </template> | 36 | </template> |
37 | </template> | 37 | </template> |
38 | </div> | 38 | </div> | ... | ... |
... | @@ -204,7 +204,10 @@ export default { | ... | @@ -204,7 +204,10 @@ export default { |
204 | break; | 204 | break; |
205 | case "vhis": | 205 | case "vhis": |
206 | this.$router.push({ | 206 | this.$router.push({ |
207 | path: "/vhis" | 207 | path: "/vhis", |
208 | query: { | ||
209 | p: link | ||
210 | } | ||
208 | }); | 211 | }); |
209 | break; | 212 | break; |
210 | default: | 213 | default: | ... | ... |
... | @@ -60,6 +60,8 @@ export default { | ... | @@ -60,6 +60,8 @@ export default { |
60 | }, | 60 | }, |
61 | gotoVhis() { | 61 | gotoVhis() { |
62 | let url = window.global.vhis; | 62 | let url = window.global.vhis; |
63 | let productCode = this.$route.query.p; | ||
64 | productCode = productCode ? productCode : "VHIS001"; | ||
63 | let lan = this.$i18n.locale; | 65 | let lan = this.$i18n.locale; |
64 | switch (lan) { | 66 | switch (lan) { |
65 | case 'zh': | 67 | case 'zh': |
... | @@ -72,7 +74,8 @@ export default { | ... | @@ -72,7 +74,8 @@ export default { |
72 | url += "?language=zh-hk"; | 74 | url += "?language=zh-hk"; |
73 | break; | 75 | break; |
74 | } | 76 | } |
75 | url += "&partnerId=PA001&productCode=VHIS001"; | 77 | url += "&partnerId=PA001&productCode=" + productCode; |
78 | |||
76 | if (this.information && this.information.idType && this.information.idNo) { | 79 | if (this.information && this.information.idType && this.information.idNo) { |
77 | let data = { | 80 | let data = { |
78 | name: this.information.fullName, | 81 | name: this.information.fullName, |
... | @@ -106,7 +109,7 @@ export default { | ... | @@ -106,7 +109,7 @@ export default { |
106 | // }, 500); | 109 | // }, 500); |
107 | // } | 110 | // } |
108 | 111 | ||
109 | window.removeEventListener("message",function(){}); | 112 | window.removeEventListener("message", function () { }); |
110 | window.addEventListener('message', function (e) { | 113 | window.addEventListener('message', function (e) { |
111 | let height = e.data ? e.data.height : null; | 114 | let height = e.data ? e.data.height : null; |
112 | if (height) { | 115 | if (height) { |
... | @@ -114,9 +117,9 @@ export default { | ... | @@ -114,9 +117,9 @@ export default { |
114 | try { | 117 | try { |
115 | iframe.height = height; | 118 | iframe.height = height; |
116 | iframe.style.height = height + "px"; | 119 | iframe.style.height = height + "px"; |
117 | } catch (ex) {} | 120 | } catch (ex) { } |
118 | } | 121 | } |
119 | }); | 122 | }); |
120 | }, | 123 | }, |
121 | created() {} | 124 | created() { } |
122 | } | 125 | } | ... | ... |
-
Please register or sign in to post a comment