Merge branch 'master' of 120.27.44.69:dev/pingan-life-index-pro
# Conflicts: # src/components/vhis-modal/vhis-modal.js
Showing
20 changed files
with
339 additions
and
89 deletions
... | @@ -9,7 +9,8 @@ module.exports = { | ... | @@ -9,7 +9,8 @@ module.exports = { |
9 | en: 'English' | 9 | en: 'English' |
10 | }, | 10 | }, |
11 | glbalTips: { | 11 | glbalTips: { |
12 | sessionLost: "为了更好的体验,需要您登录后再进行此操作" | 12 | sessionLost: "Your session has expired. For your account safety, please re-enter and submit again.", |
13 | sysError : "An error occurred, please try again later. " | ||
13 | }, | 14 | }, |
14 | form: { | 15 | form: { |
15 | datePicker: { | 16 | datePicker: { |
... | @@ -860,7 +861,9 @@ module.exports = { | ... | @@ -860,7 +861,9 @@ module.exports = { |
860 | tip2: " confirm the receipt of the above policy on ", | 861 | tip2: " confirm the receipt of the above policy on ", |
861 | tip3: ".", | 862 | tip3: ".", |
862 | tip4: "", | 863 | tip4: "", |
863 | tip5: "Contact Customer Service Hotline" | 864 | tip5: "Contact Customer Service Hotline", |
865 | tip6 : "The policy acknowledgement has been done, to inquire about the policy information or download ePolicy, please click ", | ||
866 | tip7 : "Policy Enquiry" | ||
864 | }, | 867 | }, |
865 | clarms: { | 868 | clarms: { |
866 | title: "File a claim", | 869 | title: "File a claim", | ... | ... |
... | @@ -9,7 +9,8 @@ module.exports = { | ... | @@ -9,7 +9,8 @@ module.exports = { |
9 | en: 'English' | 9 | en: 'English' |
10 | }, | 10 | }, |
11 | glbalTips: { | 11 | glbalTips: { |
12 | sessionLost: "為了更好的體驗,需要您登入後再進行此操作" | 12 | sessionLost: "操作超時,為了您的賬戶安全,請重新輸入並提交", |
13 | sysError : "系統出錯,請稍後再試 " | ||
13 | }, | 14 | }, |
14 | form: { | 15 | form: { |
15 | datePicker: { | 16 | datePicker: { |
... | @@ -832,6 +833,8 @@ module.exports = { | ... | @@ -832,6 +833,8 @@ module.exports = { |
832 | tip3: "收托上述保單。", | 833 | tip3: "收托上述保單。", |
833 | tip4: "我想", | 834 | tip4: "我想", |
834 | tip5: "聯絡客服", | 835 | tip5: "聯絡客服", |
836 | tip6 : "保單已簽收,如需查詢保單資訊或下載電子保單可點擊", | ||
837 | tip7 : "保單查詢" | ||
835 | }, | 838 | }, |
836 | clarms: { | 839 | clarms: { |
837 | title:"索償申請", | 840 | title:"索償申請", | ... | ... |
... | @@ -9,7 +9,8 @@ module.exports = { | ... | @@ -9,7 +9,8 @@ module.exports = { |
9 | en: '英文' | 9 | en: '英文' |
10 | }, | 10 | }, |
11 | glbalTips: { | 11 | glbalTips: { |
12 | sessionLost: "为了更好的体验,需要您登入后再进行此操作" | 12 | sessionLost: "操作超时,为了您的账户安全,请重新输入并提交", |
13 | sysError : "系统异常,请稍后再试" | ||
13 | }, | 14 | }, |
14 | form: { | 15 | form: { |
15 | datePicker: { | 16 | datePicker: { |
... | @@ -854,7 +855,9 @@ module.exports = { | ... | @@ -854,7 +855,9 @@ module.exports = { |
854 | tip2: "现确认于", | 855 | tip2: "现确认于", |
855 | tip3: "受托上述保单。", | 856 | tip3: "受托上述保单。", |
856 | tip4: "我想", | 857 | tip4: "我想", |
857 | tip5: "联络客服" | 858 | tip5: "联络客服", |
859 | tip6 : "保单已签收,如需查询保单信息或下载电子保单可点击", | ||
860 | tip7 : "保单查询" | ||
858 | }, | 861 | }, |
859 | clarms: { | 862 | clarms: { |
860 | title: "索偿申请", | 863 | title: "索偿申请", | ... | ... |
... | @@ -39,6 +39,7 @@ export default { | ... | @@ -39,6 +39,7 @@ export default { |
39 | }, | 39 | }, |
40 | data() { | 40 | data() { |
41 | return { | 41 | return { |
42 | dataInit: false, | ||
42 | showTips: false, | 43 | showTips: false, |
43 | // 候选人所购买的保单可选择的类型 | 44 | // 候选人所购买的保单可选择的类型 |
44 | /** | 45 | /** |
... | @@ -53,7 +54,6 @@ export default { | ... | @@ -53,7 +54,6 @@ export default { |
53 | typeCandidates: ['1', '2', '5', '6', '7'], | 54 | typeCandidates: ['1', '2', '5', '6', '7'], |
54 | // 已经选择的类型, | 55 | // 已经选择的类型, |
55 | typeSelected: [], | 56 | typeSelected: [], |
56 | images: [], | ||
57 | agress: false, | 57 | agress: false, |
58 | data: { | 58 | data: { |
59 | insuredIndex: "", | 59 | insuredIndex: "", |
... | @@ -74,6 +74,8 @@ export default { | ... | @@ -74,6 +74,8 @@ export default { |
74 | HT34Uploading: false, | 74 | HT34Uploading: false, |
75 | HT16Uploading: false, | 75 | HT16Uploading: false, |
76 | 76 | ||
77 | policyDateLegal: false, | ||
78 | |||
77 | }, | 79 | }, |
78 | loading: false, | 80 | loading: false, |
79 | contactDateError: false, | 81 | contactDateError: false, |
... | @@ -135,14 +137,55 @@ export default { | ... | @@ -135,14 +137,55 @@ export default { |
135 | return true; | 137 | return true; |
136 | } | 138 | } |
137 | return false; | 139 | return false; |
138 | } | 140 | }, |
139 | }, | 141 | }, |
140 | methods: { | 142 | methods: { |
141 | initData() { | 143 | initData() { |
144 | let typeSelectedStr = sessionStorage.getItem("clarmTypeSelect"); | ||
145 | sessionStorage.removeItem("clarmTypeSelect"); | ||
146 | let clarmDataFormStr = sessionStorage.getItem("clarmDataForm"); | ||
147 | sessionStorage.removeItem("clarmDataForm"); | ||
148 | |||
149 | |||
150 | if (clarmDataFormStr) { | ||
151 | try { | ||
152 | this.data = JSON.parse(clarmDataFormStr); | ||
153 | } catch (e) { | ||
154 | |||
155 | } | ||
156 | } | ||
157 | |||
158 | if (typeSelectedStr) { | ||
159 | try { | ||
160 | let typeSelected = JSON.parse(typeSelectedStr); | ||
161 | // console.log("typeSelected:", typeSelected); | ||
162 | this.$set(this, "typeSelected", typeSelected) | ||
163 | } catch (e) { | ||
164 | |||
165 | } | ||
166 | } | ||
167 | this.dataInit = true; | ||
142 | // console.log("this.insuredList = ", this.insuredList); | 168 | // console.log("this.insuredList = ", this.insuredList); |
143 | }, | 169 | }, |
144 | datePickCompleteHandler(){ | 170 | cacheData() { |
145 | console.log("datePickCompleteHandler"); | 171 | sessionStorage.setItem("clarmTypeSelect", JSON.stringify(this.typeSelected)); |
172 | sessionStorage.setItem("clarmDataForm", JSON.stringify(this.data)); | ||
173 | |||
174 | this.$refs['HT41'] && this.$refs['HT41'].cacheData(); | ||
175 | this.$refs['HT26'] && this.$refs['HT26'].cacheData(); | ||
176 | this.$refs['HT06'] && this.$refs['HT06'].cacheData(); | ||
177 | this.$refs['HT34'] && this.$refs['HT34'].cacheData(); | ||
178 | this.$refs['HT03'] && this.$refs['HT03'].cacheData(); | ||
179 | }, | ||
180 | clearCache() { | ||
181 | sessionStorage.removeItem("clarmTypeSelect"); | ||
182 | sessionStorage.removeItem("clarmDataForm"); | ||
183 | |||
184 | this.$refs['HT41'] && this.$refs['HT41'].clearCache(); | ||
185 | this.$refs['HT26'] && this.$refs['HT26'].clearCache(); | ||
186 | this.$refs['HT06'] && this.$refs['HT06'].clearCache(); | ||
187 | this.$refs['HT34'] && this.$refs['HT34'].clearCache(); | ||
188 | this.$refs['HT03'] && this.$refs['HT03'].clearCache(); | ||
146 | }, | 189 | }, |
147 | typeClickHandle(t) { | 190 | typeClickHandle(t) { |
148 | let index = this.typeSelected.indexOf(t); | 191 | let index = this.typeSelected.indexOf(t); |
... | @@ -162,7 +205,7 @@ export default { | ... | @@ -162,7 +205,7 @@ export default { |
162 | } | 205 | } |
163 | }, | 206 | }, |
164 | uploadSuccess(data) { | 207 | uploadSuccess(data) { |
165 | // console.log(data); | 208 | console.log("uploadSuccess === ", data); |
166 | switch (data.type) { | 209 | switch (data.type) { |
167 | case "HT41": | 210 | case "HT41": |
168 | this.data.HT41Uploading = false; | 211 | this.data.HT41Uploading = false; |
... | @@ -215,6 +258,7 @@ export default { | ... | @@ -215,6 +258,7 @@ export default { |
215 | this.contactDateError = data.disable; | 258 | this.contactDateError = data.disable; |
216 | }, | 259 | }, |
217 | toContact() { | 260 | toContact() { |
261 | this.cacheData(); | ||
218 | this.$router.push({ | 262 | this.$router.push({ |
219 | path: "/custom/service?q=m1" | 263 | path: "/custom/service?q=m1" |
220 | }); | 264 | }); |
... | @@ -291,12 +335,46 @@ export default { | ... | @@ -291,12 +335,46 @@ export default { |
291 | // 2标记为时间 | 335 | // 2标记为时间 |
292 | this.$emit("showModal", { action: 1, type: 2 }); | 336 | this.$emit("showModal", { action: 1, type: 2 }); |
293 | return false; | 337 | return false; |
294 | } | 338 | }, |
295 | }, | 339 | checkPolicyDateLegal() { |
296 | watch: { | 340 | // 校验日期是否合法 |
297 | "data.insuredIndex": function (v, ov) { | 341 | if (this.contactDateError) { |
342 | return false; | ||
343 | } | ||
344 | if (!this.data.contactDate || !this.data.insuredIndex) { | ||
345 | return false; | ||
346 | } | ||
347 | let insured = this.insuredList[this.data.insuredIndex - 1]; | ||
348 | if (!insured.policyInfoList || insured.policyInfoList.length <= 0) { | ||
349 | return false; | ||
350 | } | ||
351 | var time = new Date(ddMMyyyy2yyyyMMdd(this.data.contactDate).replace(/\-/g, "/") + " 00:00:00").getTime(); | ||
352 | for (let index = 0; index < insured.policyInfoList.length; index++) { | ||
353 | let policy = insured.policyInfoList[index]; | ||
354 | // 有效期为生效日至满期日+60天 | ||
355 | if (policy.activeDate <= time && policy.expireDate + 60 * 24 * 60 * 60 * 1000 >= time) { | ||
356 | return true; | ||
357 | } | ||
358 | } | ||
359 | // 2标记为时间 | ||
360 | return false; | ||
361 | }, | ||
362 | pluginActivityHandler(data) { | ||
363 | if (data.type == "close") { | ||
364 | // this.data.policyDateLegal = ; | ||
365 | this.$set(this.data, 'policyDateLegal', this.checkPolicyDateLegal()); | ||
366 | if (this.data.policyDateLegal) { | ||
367 | this.policyIllegal = false; | ||
368 | } else { | ||
369 | this.policyIllegal = true; | ||
370 | if (this.data.contactDate) { | ||
371 | this.$emit("showModal", { action: 1, type: 2 }); | ||
372 | } | ||
373 | } | ||
374 | } | ||
375 | }, | ||
376 | insuredChange() { | ||
298 | this.typeSelected = []; | 377 | this.typeSelected = []; |
299 | |||
300 | let d = { | 378 | let d = { |
301 | insuredIndex: this.data.insuredIndex, | 379 | insuredIndex: this.data.insuredIndex, |
302 | amount: null, | 380 | amount: null, |
... | @@ -317,19 +395,16 @@ export default { | ... | @@ -317,19 +395,16 @@ export default { |
317 | HT16Uploading: false, | 395 | HT16Uploading: false, |
318 | }; | 396 | }; |
319 | this.$set(this, "data", d); | 397 | this.$set(this, "data", d); |
320 | if (this.checkPolicy()) { | 398 | } |
321 | this.policyIllegal = false; | 399 | }, |
322 | } else { | 400 | watch: { |
323 | this.policyIllegal = true; | 401 | // "data.contactDate": function () { |
324 | } | 402 | // if (this.checkPolicy()) { |
325 | }, | 403 | // this.policyIllegal = false; |
326 | "data.contactDate": function () { | 404 | // } else { |
327 | if (this.checkPolicy()) { | 405 | // this.policyIllegal = true; |
328 | this.policyIllegal = false; | 406 | // } |
329 | } else { | 407 | // }, |
330 | this.policyIllegal = true; | ||
331 | } | ||
332 | }, | ||
333 | 'agree': function () { | 408 | 'agree': function () { |
334 | this.showTips = false; | 409 | this.showTips = false; |
335 | } | 410 | } |
... | @@ -344,9 +419,9 @@ export default { | ... | @@ -344,9 +419,9 @@ export default { |
344 | this.$root.eventBus.$on("_evt_to_account_information", () => { | 419 | this.$root.eventBus.$on("_evt_to_account_information", () => { |
345 | this.$nextTick(() => { | 420 | this.$nextTick(() => { |
346 | // console.log("ccccc:", document.getElementById("sc")); | 421 | // console.log("ccccc:", document.getElementById("sc")); |
347 | let sc = document.getElementById("sc"); | 422 | let sc = document.getElementById("HT34"); |
348 | if (sc) { | 423 | if (sc) { |
349 | document.getElementById("sc").scrollIntoView(); | 424 | document.getElementById("HT34").scrollIntoView(); |
350 | } | 425 | } |
351 | }) | 426 | }) |
352 | }); | 427 | }); | ... | ... |
... | @@ -20,7 +20,7 @@ | ... | @@ -20,7 +20,7 @@ |
20 | <div class="tt t1">{{$t('clarms.step2.label1')}}</div> | 20 | <div class="tt t1">{{$t('clarms.step2.label1')}}</div> |
21 | <div class="tt clarms-border"> | 21 | <div class="tt clarms-border"> |
22 | <div class="down-arrow"></div> | 22 | <div class="down-arrow"></div> |
23 | <el-select style="text-align: center;" class="clarms-select" v-model="data.insuredIndex" :placeholder="''"> | 23 | <el-select style="text-align: center;" class="clarms-select" v-model="data.insuredIndex" :placeholder="''" @change="insuredChange"> |
24 | <template v-if="lan == 'en'"> | 24 | <template v-if="lan == 'en'"> |
25 | <el-option v-for="(item,index) in insuredList" :key="index" :label="item.insuredNameEn?item.insuredNameEn:insuredNameCn" :value="index + 1"> | 25 | <el-option v-for="(item,index) in insuredList" :key="index" :label="item.insuredNameEn?item.insuredNameEn:insuredNameCn" :value="index + 1"> |
26 | </el-option> | 26 | </el-option> |
... | @@ -103,14 +103,14 @@ | ... | @@ -103,14 +103,14 @@ |
103 | <div class="down-arrow"></div> | 103 | <div class="down-arrow"></div> |
104 | <div class="cont"> | 104 | <div class="cont"> |
105 | <div class="ipt-date"> | 105 | <div class="ipt-date"> |
106 | <date-picker v-model="data.contactDate" :datePickComplete="datePickCompleteHandler" :formatter="'dd-MM-yyyy'" :filtModel="['future']" :check="checkDate" :readonly="true" :cusStyle="{border:'none !important','background-color':'transparent !important','height':'58px', 'color':'#ff6839','font-weight':'bold','text-align': 'center'}"></date-picker> | 106 | <date-picker v-model="data.contactDate" :pluginActivity="pluginActivityHandler" :formatter="'dd-MM-yyyy'" :filtModel="['future','today']" :check="checkDate" :readonly="true" :cusStyle="{border:'none !important','background-color':'transparent !important','height':'58px', 'color':'#ff6839','font-weight':'bold','text-align': 'center'}"></date-picker> |
107 | </div> | 107 | </div> |
108 | </div> | 108 | </div> |
109 | </div> | 109 | </div> |
110 | </div> | 110 | </div> |
111 | </div> | 111 | </div> |
112 | 112 | ||
113 | <template v-if="data.contactDate"> | 113 | <template v-if="data.contactDate && data.policyDateLegal"> |
114 | <div class="pure-u-1 form-item-2 form-item-3 mt20"> | 114 | <div class="pure-u-1 form-item-2 form-item-3 mt20"> |
115 | <div class="label"> | 115 | <div class="label"> |
116 | <div class="main-label"> | 116 | <div class="main-label"> |
... | @@ -118,8 +118,8 @@ | ... | @@ -118,8 +118,8 @@ |
118 | </div> | 118 | </div> |
119 | </div> | 119 | </div> |
120 | <div class="value"> | 120 | <div class="value"> |
121 | <clarms-upload :icon="require('@/assets/images/clarms/icon1.png')" :options="{name:$t('clarms.step2.label11'),imageTypeID:'HT41',imageMainTypeID:'HT11',toast:$t('clarms.step2.toast1')}" @success="uploadSuccess" @beforeUpload="beforeUpload"></clarms-upload> | 121 | <clarms-upload ref="HT41" :icon="require('@/assets/images/clarms/icon1.png')" :options="{name:$t('clarms.step2.label11'),imageTypeID:'HT41',imageMainTypeID:'HT11',toast:$t('clarms.step2.toast1')}" @success="uploadSuccess" @beforeUpload="beforeUpload"></clarms-upload> |
122 | <clarms-upload class="mt24" :icon="require('@/assets/images/clarms/icon2.png')" :options="{name:$t('clarms.step2.label12'),imageTypeID:'HT26',imageMainTypeID:'HT06',toast:$t('clarms.step2.toast2')}" @success="uploadSuccess" @beforeUpload="beforeUpload"></clarms-upload> | 122 | <clarms-upload ref="HT26" class="mt24" :icon="require('@/assets/images/clarms/icon2.png')" :options="{name:$t('clarms.step2.label12'),imageTypeID:'HT26',imageMainTypeID:'HT06',toast:$t('clarms.step2.toast2')}" @success="uploadSuccess" @beforeUpload="beforeUpload"></clarms-upload> |
123 | </div> | 123 | </div> |
124 | </div> | 124 | </div> |
125 | 125 | ||
... | @@ -130,14 +130,14 @@ | ... | @@ -130,14 +130,14 @@ |
130 | </div> | 130 | </div> |
131 | </div> | 131 | </div> |
132 | <div class="value"> | 132 | <div class="value"> |
133 | <clarms-upload :icon="require('@/assets/images/clarms/icon3.png')" :options="{name:$t('clarms.step2.label14'),imageTypeID:'HT29',imageMainTypeID:'HT06',toast:$t('clarms.step2.toast3')}" @success="uploadSuccess" @beforeUpload="beforeUpload"></clarms-upload> | 133 | <clarms-upload ref="HT06" :icon="require('@/assets/images/clarms/icon3.png')" :options="{name:$t('clarms.step2.label14'),imageTypeID:'HT29',imageMainTypeID:'HT06',toast:$t('clarms.step2.toast3')}" @success="uploadSuccess" @beforeUpload="beforeUpload"></clarms-upload> |
134 | <clarms-upload id="sc" ref="sc" class="mt24" :icon="require('@/assets/images/clarms/icon4.png')" :options="{name:$t('clarms.step2.label15'),imageTypeID:'HT34',imageMainTypeID:'HT08',toast:$t('clarms.step2.toast4')}" @success="uploadSuccess" @beforeUpload="beforeUpload"></clarms-upload> | 134 | <clarms-upload ref="HT34" id="HT34" class="mt24" :icon="require('@/assets/images/clarms/icon4.png')" :options="{name:$t('clarms.step2.label15'),imageTypeID:'HT34',imageMainTypeID:'HT08',toast:$t('clarms.step2.toast4')}" @success="uploadSuccess" @beforeUpload="beforeUpload"></clarms-upload> |
135 | <clarms-upload class="mt24" :icon="require('@/assets/images/clarms/icon5.png')" :options="{name:$t('clarms.step2.label16'),imageTypeID:'HT16',imageMainTypeID:'HT03',toast:$t('clarms.step2.toast5')}" @success="uploadSuccess" @beforeUpload="beforeUpload"></clarms-upload> | 135 | <clarms-upload ref="HT03" class="mt24" :icon="require('@/assets/images/clarms/icon5.png')" :options="{name:$t('clarms.step2.label16'),imageTypeID:'HT16',imageMainTypeID:'HT03',toast:$t('clarms.step2.toast5')}" @success="uploadSuccess" @beforeUpload="beforeUpload"></clarms-upload> |
136 | </div> | 136 | </div> |
137 | </div> | 137 | </div> |
138 | </template> | 138 | </template> |
139 | </div> | 139 | </div> |
140 | <template v-if="data.contactDate"> | 140 | <template v-if="data.contactDate && data.policyDateLegal"> |
141 | <!-- <template v-if="1>0"> --> | 141 | <!-- <template v-if="1>0"> --> |
142 | <hr class="hr2" v-if="data.amount > 0"> | 142 | <hr class="hr2" v-if="data.amount > 0"> |
143 | <div class="bottom-tip orange mt20">{{$t('clarms.step2.label17')}}</div> | 143 | <div class="bottom-tip orange mt20">{{$t('clarms.step2.label17')}}</div> | ... | ... |
... | @@ -6,8 +6,8 @@ export default { | ... | @@ -6,8 +6,8 @@ export default { |
6 | // 是否显示组件 | 6 | // 是否显示组件 |
7 | // 1、顯示事故類型;2、顯示時間 | 7 | // 1、顯示事故類型;2、顯示時間 |
8 | type: { | 8 | type: { |
9 | type: String, | 9 | type: Number, |
10 | default: "2" | 10 | default: 2 |
11 | }, | 11 | }, |
12 | }, | 12 | }, |
13 | data() { | 13 | data() { |
... | @@ -29,6 +29,7 @@ export default { | ... | @@ -29,6 +29,7 @@ export default { |
29 | this.$emit("close"); | 29 | this.$emit("close"); |
30 | }, | 30 | }, |
31 | toContact() { | 31 | toContact() { |
32 | this.$emit("toContact"); | ||
32 | this.$router.push({ | 33 | this.$router.push({ |
33 | path: "/custom/service?q=m1" | 34 | path: "/custom/service?q=m1" |
34 | }); | 35 | }); | ... | ... |
... | @@ -17,7 +17,7 @@ export default { | ... | @@ -17,7 +17,7 @@ export default { |
17 | // 是否显示组件 | 17 | // 是否显示组件 |
18 | options: { | 18 | options: { |
19 | type: Object, | 19 | type: Object, |
20 | default () { | 20 | default() { |
21 | return { | 21 | return { |
22 | // 名称 | 22 | // 名称 |
23 | name: "", | 23 | name: "", |
... | @@ -68,7 +68,42 @@ export default { | ... | @@ -68,7 +68,42 @@ export default { |
68 | }, | 68 | }, |
69 | methods: { | 69 | methods: { |
70 | initData() { | 70 | initData() { |
71 | for (let index = 0; index < sessionStorage.length; index++) { | ||
72 | let key = sessionStorage.key(index); | ||
73 | if (key.indexOf("clarmImage." + this.options.imageTypeID) == 0) { | ||
74 | let str = sessionStorage.getItem(key); | ||
75 | sessionStorage.removeItem(key); | ||
76 | try { | ||
77 | let d = JSON.parse(str); | ||
78 | this.images.push(d); | ||
79 | } catch (e) { | ||
80 | console.error(e); | ||
81 | } | ||
82 | } | ||
83 | } | ||
84 | }, | ||
85 | cacheData() { | ||
86 | for (let index = 0; index < this.images.length; index++) { | ||
87 | let tmp = this.images[index]; | ||
88 | if (tmp.showMask || !tmp.cacheKey) { continue; } | ||
71 | 89 | ||
90 | let key = "clarmImage." + this.options.imageTypeID + "." + index; | ||
91 | sessionStorage.setItem(key, JSON.stringify({ | ||
92 | fileName: tmp.fileName, | ||
93 | data: tmp.data, | ||
94 | cacheKey: tmp.cacheKey | ||
95 | })); | ||
96 | } | ||
97 | }, | ||
98 | clearCache() { | ||
99 | for (let index = 0; index < sessionStorage.length; index++) { | ||
100 | let key = sessionStorage.key(index); | ||
101 | if (key.indexOf("clarmImage." + this.options.imageTypeID) == 0) { | ||
102 | sessionStorage.removeItem(key); | ||
103 | } | ||
104 | } | ||
105 | this.uploadFiles = 0; | ||
106 | this.images = []; | ||
72 | }, | 107 | }, |
73 | selectMutilFile() { | 108 | selectMutilFile() { |
74 | if (this.uploading) { | 109 | if (this.uploading) { |
... | @@ -83,7 +118,7 @@ export default { | ... | @@ -83,7 +118,7 @@ export default { |
83 | input.setAttribute("type", "file"); | 118 | input.setAttribute("type", "file"); |
84 | input.setAttribute("multiple", "multiple"); | 119 | input.setAttribute("multiple", "multiple"); |
85 | // input.setAttribute("accept", "image/*"); | 120 | // input.setAttribute("accept", "image/*"); |
86 | input.setAttribute("accept", "image/jpeg"); | 121 | input.setAttribute("accept", "image/png,image/jpeg"); |
87 | input.onchange = function (val) { | 122 | input.onchange = function (val) { |
88 | let position = _this.images.length; | 123 | let position = _this.images.length; |
89 | for (let index = 0; index < input.files.length; index++) { | 124 | for (let index = 0; index < input.files.length; index++) { |
... | @@ -98,19 +133,21 @@ export default { | ... | @@ -98,19 +133,21 @@ export default { |
98 | let _this = this; | 133 | let _this = this; |
99 | var reader = new FileReader(); | 134 | var reader = new FileReader(); |
100 | reader.onload = function (e) { | 135 | reader.onload = function (e) { |
101 | let d = { | 136 | _this.compressImage(reader.result, function (data) { |
102 | fileName: "", | 137 | let d = { |
103 | file: file, | 138 | fileName: "", |
104 | data: reader.result, | 139 | file: file, |
105 | cacheKey: "", | 140 | data: data, |
106 | showMask: false, | 141 | cacheKey: "", |
107 | key: _this.randomAesKey(), | 142 | showMask: false, |
108 | intervial: false, | 143 | key: _this.randomAesKey(), |
109 | tips: "", | 144 | intervial: false, |
110 | err: "" | 145 | tips: "", |
111 | }; | 146 | err: "" |
112 | _this.$set(_this.images, index, d); | 147 | }; |
113 | _this.handleFileUpload(d, index); | 148 | _this.$set(_this.images, index, d); |
149 | _this.handleFileUpload(d, index); | ||
150 | }); | ||
114 | } | 151 | } |
115 | reader.readAsDataURL(file); | 152 | reader.readAsDataURL(file); |
116 | }, | 153 | }, |
... | @@ -189,7 +226,11 @@ export default { | ... | @@ -189,7 +226,11 @@ export default { |
189 | }, | 226 | }, |
190 | emitResult() { | 227 | emitResult() { |
191 | if (this.images.length == 0) { | 228 | if (this.images.length == 0) { |
192 | this.$emit("success", []); | 229 | let result = { |
230 | type: this.options.imageTypeID, | ||
231 | list: [] | ||
232 | }; | ||
233 | this.$emit("success", result); | ||
193 | return; | 234 | return; |
194 | } | 235 | } |
195 | if (this.uploading) { | 236 | if (this.uploading) { |
... | @@ -225,6 +266,39 @@ export default { | ... | @@ -225,6 +266,39 @@ export default { |
225 | }, | 266 | }, |
226 | onShowTipsOutHandler(event) { | 267 | onShowTipsOutHandler(event) { |
227 | this.tipsVisible = false; | 268 | this.tipsVisible = false; |
269 | }, | ||
270 | compressImage(src, callback) { | ||
271 | var img = new Image(); | ||
272 | img.src = src; | ||
273 | img.onload = function () { | ||
274 | var that = this; | ||
275 | // 默认按比例压缩 | ||
276 | var w = img.width, | ||
277 | h = img.height, | ||
278 | scale = w / h; | ||
279 | w = w < 50 ? w : 50; | ||
280 | h = (w / scale); | ||
281 | var quality = 0.7; // 默认图片质量为0.7 | ||
282 | //生成canvas | ||
283 | var canvas = document.createElement('canvas'); | ||
284 | var ctx = canvas.getContext('2d'); | ||
285 | // 创建属性节点 | ||
286 | var anw = document.createAttribute("width"); | ||
287 | anw.nodeValue = w; | ||
288 | var anh = document.createAttribute("height"); | ||
289 | anh.nodeValue = h; | ||
290 | canvas.setAttributeNode(anw); | ||
291 | canvas.setAttributeNode(anh); | ||
292 | ctx.drawImage(that, 0, 0, w, h); | ||
293 | // quality值越小,所绘制出的图像越模糊 | ||
294 | var base64 = canvas.toDataURL('image/*', quality); | ||
295 | // console.log(base64.length); | ||
296 | // 回调函数返回base64的值 | ||
297 | callback(base64); | ||
298 | } | ||
299 | }, | ||
300 | datePickCompleteHandler() { | ||
301 | |||
228 | } | 302 | } |
229 | }, | 303 | }, |
230 | watch: { | 304 | watch: { |
... | @@ -233,5 +307,5 @@ export default { | ... | @@ -233,5 +307,5 @@ export default { |
233 | mounted() { | 307 | mounted() { |
234 | this.initData(); | 308 | this.initData(); |
235 | }, | 309 | }, |
236 | created() {} | 310 | created() { } |
237 | } | 311 | } | ... | ... |
... | @@ -32,16 +32,17 @@ export default { | ... | @@ -32,16 +32,17 @@ export default { |
32 | // future : 未来不可选择 | 32 | // future : 未来不可选择 |
33 | // weekend : 周末不可选择 | 33 | // weekend : 周末不可选择 |
34 | // today : 当日不可选择 | 34 | // today : 当日不可选择 |
35 | // holiday : 节假日不可选择 | ||
35 | filtModel: { | 36 | filtModel: { |
36 | type: Array, | 37 | type: Array, |
37 | default () { | 38 | default() { |
38 | return ["history", "weekend", "today"] | 39 | return ["history", "weekend", "today"] |
39 | } | 40 | } |
40 | }, | 41 | }, |
41 | // 需要过滤的日期列表 格式 ["yyyy-MM-dd","yyyy-MM-dd"] | 42 | // 需要过滤的日期列表 格式 ["yyyy-MM-dd","yyyy-MM-dd"] |
42 | filterDates: { | 43 | filterDates: { |
43 | type: Array, | 44 | type: Array, |
44 | default () { | 45 | default() { |
45 | return [] // ["2019-11-26", "2019-11-28"] | 46 | return [] // ["2019-11-26", "2019-11-28"] |
46 | } | 47 | } |
47 | }, | 48 | }, |
... | @@ -70,7 +71,7 @@ export default { | ... | @@ -70,7 +71,7 @@ export default { |
70 | }, | 71 | }, |
71 | cusStyle: { | 72 | cusStyle: { |
72 | type: Object, | 73 | type: Object, |
73 | default () { | 74 | default() { |
74 | return {}; | 75 | return {}; |
75 | } | 76 | } |
76 | }, | 77 | }, |
... | @@ -79,6 +80,11 @@ export default { | ... | @@ -79,6 +80,11 @@ export default { |
79 | type: Function, | 80 | type: Function, |
80 | default: null | 81 | default: null |
81 | }, | 82 | }, |
83 | // 打开或关闭插件 | ||
84 | pluginActivity: { | ||
85 | type: Function, | ||
86 | default: null | ||
87 | } | ||
82 | }, | 88 | }, |
83 | data() { | 89 | data() { |
84 | return { | 90 | return { |
... | @@ -176,7 +182,11 @@ export default { | ... | @@ -176,7 +182,11 @@ export default { |
176 | let date = index + 1; | 182 | let date = index + 1; |
177 | let buildDate = Date.parse(`${year}.${month}.${date}`); | 183 | let buildDate = Date.parse(`${year}.${month}.${date}`); |
178 | if (buildDate) { | 184 | if (buildDate) { |
179 | let nowDate = new Date(); | 185 | let now = new Date(); |
186 | let y = now.getFullYear(); | ||
187 | let m = now.getMonth() + 1; | ||
188 | let d = now.getDate(); | ||
189 | let nowDate = Date.parse(`${y}.${m}.${d}`); | ||
180 | let day = buildDate.getDay(); | 190 | let day = buildDate.getDay(); |
181 | let isWeekend = day == 0 || day == 6; | 191 | let isWeekend = day == 0 || day == 6; |
182 | let disable = false; // 判断是否不可选 | 192 | let disable = false; // 判断是否不可选 |
... | @@ -184,18 +194,17 @@ export default { | ... | @@ -184,18 +194,17 @@ export default { |
184 | disable = isWeekend; | 194 | disable = isWeekend; |
185 | } | 195 | } |
186 | if (!disable && this.filtModel.indexOf("future") >= 0) { | 196 | if (!disable && this.filtModel.indexOf("future") >= 0) { |
187 | buildDate.setHours(23, 59, 59, 999); | 197 | // buildDate.setHours(23, 59, 59, 999); |
188 | disable = buildDate.getTime() > nowDate.getTime() | 198 | disable = buildDate.getTime() > nowDate.getTime() |
189 | } | 199 | } |
190 | if (!disable && this.filtModel.indexOf("history") >= 0) { | ||
191 | buildDate.setHours(0, 0, 0, 0); | ||
192 | disable = buildDate.getTime() < nowDate.getTime() | ||
193 | } | ||
194 | if (!disable && this.filtModel.indexOf("today") >= 0) { | 200 | if (!disable && this.filtModel.indexOf("today") >= 0) { |
195 | buildDate.setHours(0, 0, 0, 0); | ||
196 | nowDate.setHours(0, 0, 0, 0); | 201 | nowDate.setHours(0, 0, 0, 0); |
197 | disable = buildDate.getTime() == nowDate.getTime(); | 202 | disable = buildDate.getTime() == nowDate.getTime(); |
198 | } | 203 | } |
204 | if (!disable && this.filtModel.indexOf("history") >= 0) { | ||
205 | buildDate.setHours(23, 59, 59, 999); | ||
206 | disable = buildDate.getTime() < nowDate.getTime() | ||
207 | } | ||
199 | // disable = isWeekend && !this.weekend; // 判断周末不可选 | 208 | // disable = isWeekend && !this.weekend; // 判断周末不可选 |
200 | let filterDates = this.filterDates; | 209 | let filterDates = this.filterDates; |
201 | filterDates.forEach(element => { | 210 | filterDates.forEach(element => { |
... | @@ -277,7 +286,7 @@ export default { | ... | @@ -277,7 +286,7 @@ export default { |
277 | // this.dateValue = `${year}-${month}-${date}`; | 286 | // this.dateValue = `${year}-${month}-${date}`; |
278 | this.formatDateValue(year, month, date); | 287 | this.formatDateValue(year, month, date); |
279 | this.showCalendar(); | 288 | this.showCalendar(); |
280 | if(this.datePickComplete){ | 289 | if (this.datePickComplete) { |
281 | this.datePickComplete(); | 290 | this.datePickComplete(); |
282 | } | 291 | } |
283 | }, | 292 | }, |
... | @@ -336,6 +345,14 @@ export default { | ... | @@ -336,6 +345,14 @@ export default { |
336 | let yearPage = Math.floor(year / 10); | 345 | let yearPage = Math.floor(year / 10); |
337 | this.yearPage = yearPage; | 346 | this.yearPage = yearPage; |
338 | this.refreshYearList(); | 347 | this.refreshYearList(); |
348 | |||
349 | if (this.pluginActivity) { | ||
350 | let _this = this; | ||
351 | let type = boo ? "show" : "close"; | ||
352 | setTimeout(function () { | ||
353 | _this.pluginActivity({ type: type }); | ||
354 | }, 100); | ||
355 | } | ||
339 | }, | 356 | }, |
340 | getMonthByIndex(index) { | 357 | getMonthByIndex(index) { |
341 | let monthList = this.getMonthList; | 358 | let monthList = this.getMonthList; |
... | @@ -460,7 +477,7 @@ export default { | ... | @@ -460,7 +477,7 @@ export default { |
460 | this.month = curDate.getMonth() + 1; | 477 | this.month = curDate.getMonth() + 1; |
461 | this.date = curDate.getDate(); | 478 | this.date = curDate.getDate(); |
462 | isInit = true; | 479 | isInit = true; |
463 | } catch (error) {} | 480 | } catch (error) { } |
464 | } | 481 | } |
465 | if (!isInit) { | 482 | if (!isInit) { |
466 | let today = Date.today(); | 483 | let today = Date.today(); |
... | @@ -495,7 +512,7 @@ export default { | ... | @@ -495,7 +512,7 @@ export default { |
495 | 512 | ||
496 | } | 513 | } |
497 | }, | 514 | }, |
498 | mounted() {}, | 515 | mounted() { }, |
499 | created() { | 516 | created() { |
500 | this.initData(); | 517 | this.initData(); |
501 | }, | 518 | }, | ... | ... |
... | @@ -25,6 +25,11 @@ export default { | ... | @@ -25,6 +25,11 @@ export default { |
25 | overlay: { | 25 | overlay: { |
26 | type: Function, | 26 | type: Function, |
27 | default: null | 27 | default: null |
28 | }, | ||
29 | // 模板地址 | ||
30 | target: { | ||
31 | type: String, | ||
32 | default: "", | ||
28 | } | 33 | } |
29 | }, | 34 | }, |
30 | data() { | 35 | data() { |
... | @@ -51,8 +56,13 @@ export default { | ... | @@ -51,8 +56,13 @@ export default { |
51 | this.overlay(); | 56 | this.overlay(); |
52 | } | 57 | } |
53 | }, | 58 | }, |
54 | initData() {} | 59 | toTarget() { |
60 | if (this.target) { | ||
61 | this.$emit("targetCallbak", this.target1); | ||
62 | } | ||
63 | }, | ||
64 | initData() { } | ||
55 | }, | 65 | }, |
56 | mounted() {}, | 66 | mounted() { }, |
57 | created() {} | 67 | created() { } |
58 | } | 68 | } | ... | ... |
... | @@ -11,6 +11,7 @@ | ... | @@ -11,6 +11,7 @@ |
11 | </div> | 11 | </div> |
12 | <div class="message" :class="{'lsp':locale != 'en'}"> | 12 | <div class="message" :class="{'lsp':locale != 'en'}"> |
13 | {{content}} | 13 | {{content}} |
14 | <span v-if="target" @click="toTarget">{{target}}</span> | ||
14 | </div> | 15 | </div> |
15 | </div> | 16 | </div> |
16 | </div> | 17 | </div> | ... | ... |
... | @@ -8,6 +8,9 @@ import { | ... | @@ -8,6 +8,9 @@ import { |
8 | requestDomain | 8 | requestDomain |
9 | } from '@/api/fetch-api.js' | 9 | } from '@/api/fetch-api.js' |
10 | 10 | ||
11 | import Modal2Comp from '@/components/modal2-comp/modal2-comp.vue'; | ||
12 | import { getPolicyName } from "@/utils/biz.js"; | ||
13 | |||
11 | export default { | 14 | export default { |
12 | data() { | 15 | data() { |
13 | return { | 16 | return { |
... | @@ -16,10 +19,14 @@ export default { | ... | @@ -16,10 +19,14 @@ export default { |
16 | hadLoadPolicy: false, | 19 | hadLoadPolicy: false, |
17 | ignorePolicyCodes: [], | 20 | ignorePolicyCodes: [], |
18 | // 显示 | 21 | // 显示 |
19 | policyDetail: {} | 22 | policyDetail: null, |
23 | showSuccessTip : false, | ||
24 | showDownloadError:false | ||
20 | } | 25 | } |
21 | }, | 26 | }, |
22 | components: {}, | 27 | components: { |
28 | Modal2Comp | ||
29 | }, | ||
23 | computed: { | 30 | computed: { |
24 | ...mapState({ | 31 | ...mapState({ |
25 | userInfo: state => state.userInfo, | 32 | userInfo: state => state.userInfo, |
... | @@ -28,6 +35,9 @@ export default { | ... | @@ -28,6 +35,9 @@ export default { |
28 | locale() { | 35 | locale() { |
29 | return this.$i18n.locale || 'tc'; | 36 | return this.$i18n.locale || 'tc'; |
30 | }, | 37 | }, |
38 | i18n() { | ||
39 | return this.$i18n.messages && this.$i18n.locale ? this.$i18n.messages[this.$i18n.locale] : {}; | ||
40 | }, | ||
31 | }, | 41 | }, |
32 | methods: { | 42 | methods: { |
33 | initData() { | 43 | initData() { |
... | @@ -138,6 +148,7 @@ export default { | ... | @@ -138,6 +148,7 @@ export default { |
138 | let policyCode = this.policyDetail.policyCode; | 148 | let policyCode = this.policyDetail.policyCode; |
139 | this.ignorePolicyCodes.push(policyCode); | 149 | this.ignorePolicyCodes.push(policyCode); |
140 | sessionStorage.setItem("ignorePolicyCodes", JSON.stringify(this.ignorePolicyCodes)); | 150 | sessionStorage.setItem("ignorePolicyCodes", JSON.stringify(this.ignorePolicyCodes)); |
151 | this.showSuccessTip = true; | ||
141 | this.checkIfShowPolicy(); | 152 | this.checkIfShowPolicy(); |
142 | 153 | ||
143 | let params = { | 154 | let params = { |
... | @@ -149,7 +160,6 @@ export default { | ... | @@ -149,7 +160,6 @@ export default { |
149 | sid: true, | 160 | sid: true, |
150 | data: params | 161 | data: params |
151 | }).then(res => { | 162 | }).then(res => { |
152 | |||
153 | }).catch(e => { | 163 | }).catch(e => { |
154 | 164 | ||
155 | }); | 165 | }); |
... | @@ -176,6 +186,8 @@ export default { | ... | @@ -176,6 +186,8 @@ export default { |
176 | if (res) { | 186 | if (res) { |
177 | let url = requestDomain() + api.downloadPolicy + "/" + res; | 187 | let url = requestDomain() + api.downloadPolicy + "/" + res; |
178 | window.open(url); | 188 | window.open(url); |
189 | } else { | ||
190 | this.showDownloadError = true; | ||
179 | } | 191 | } |
180 | }); | 192 | }); |
181 | } | 193 | } |
... | @@ -191,6 +203,16 @@ export default { | ... | @@ -191,6 +203,16 @@ export default { |
191 | path: "/custom/service?q=m1" | 203 | path: "/custom/service?q=m1" |
192 | }); | 204 | }); |
193 | }, | 205 | }, |
206 | toTarget(){ | ||
207 | this.showPolicy = false; | ||
208 | sessionStorage.setItem("hidePolicy", "true"); | ||
209 | this.$router.push({ | ||
210 | path : "/custom/service?q=m3" | ||
211 | }) | ||
212 | }, | ||
213 | formatPolicyName(c, n) { | ||
214 | return getPolicyName(this.$i18n.locale, c, n); | ||
215 | }, | ||
194 | loginAction() { | 216 | loginAction() { |
195 | this.showPolicy = true; | 217 | this.showPolicy = true; |
196 | this.initData(); | 218 | this.initData(); | ... | ... |
1 | 1 | ||
2 | <template> | 2 | <template> |
3 | <div class="comp" v-if="policyDetail && showPolicy"> | 3 | <div class="comp" v-if="policyDetail && showPolicy"> |
4 | <modal2-comp :visible="showSuccessTip" :close="()=>{showSuccessTip = false}" :content="$t('vhis.tip6')" :target="$t('vhis.tip7')" @targetCallbak="toTarget"></modal2-comp> | ||
5 | <modal2-comp :visible="showDownloadError" :close="()=>{showDownloadError = false}" :content="$t('glbalTips.sysError')"></modal2-comp> | ||
4 | <div @click="handleIgnorePolicy" class="overlay"></div> | 6 | <div @click="handleIgnorePolicy" class="overlay"></div> |
5 | <div class="border"> | 7 | <div class="border"> |
6 | <div class="close" @click="onOverLayHandler()"><img src="@/assets/images/vhis/close.png"></div> | 8 | <div class="close" @click="onOverLayHandler()"><img src="@/assets/images/vhis/close.png"></div> |
... | @@ -25,7 +27,7 @@ | ... | @@ -25,7 +27,7 @@ |
25 | <div class="form-item"> | 27 | <div class="form-item"> |
26 | <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label2')}}:</div> | 28 | <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label2')}}:</div> |
27 | <div class="value orange"> | 29 | <div class="value orange"> |
28 | <span>{{policyDetail.productName}}</span> | 30 | <span>{{formatPolicyName(policyDetail.productCode,policyDetail.productName)}}</span> |
29 | </div> | 31 | </div> |
30 | </div> | 32 | </div> |
31 | <div class="form-item"> | 33 | <div class="form-item"> |
... | @@ -42,13 +44,23 @@ | ... | @@ -42,13 +44,23 @@ |
42 | <div class="form-item"> | 44 | <div class="form-item"> |
43 | <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label4')}}:</div> | 45 | <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label4')}}:</div> |
44 | <div class="value orange"> | 46 | <div class="value orange"> |
45 | <span>{{policyDetail.clientNameCn}}</span> | 47 | <template v-if="locale == 'en'"> |
48 | <span>{{policyDetail.clientNameEn ? policyDetail.clientNameEn : policyDetail.clientNameCn}}</span> | ||
49 | </template> | ||
50 | <template v-else> | ||
51 | <span>{{policyDetail.clientNameCn ? policyDetail.clientNameCn : policyDetail.clientNameEn}}</span> | ||
52 | </template> | ||
46 | </div> | 53 | </div> |
47 | </div> | 54 | </div> |
48 | <div class="form-item"> | 55 | <div class="form-item"> |
49 | <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label5')}}:</div> | 56 | <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label5')}}:</div> |
50 | <div class="value orange"> | 57 | <div class="value orange"> |
51 | <span>{{policyDetail.insuredNameCn}}</span> | 58 | <template v-if="locale == 'en'"> |
59 | <span>{{policyDetail.insuredNameEn ? policyDetail.insuredNameEn : policyDetail.insuredNameCn}}</span> | ||
60 | </template> | ||
61 | <template v-else> | ||
62 | <span>{{policyDetail.insuredNameCn ? policyDetail.insuredNameCn : policyDetail.insuredNameEn}}</span> | ||
63 | </template> | ||
52 | </div> | 64 | </div> |
53 | </div> | 65 | </div> |
54 | 66 | ||
... | @@ -65,7 +77,14 @@ | ... | @@ -65,7 +77,14 @@ |
65 | <div class="bottom-wrap "> | 77 | <div class="bottom-wrap "> |
66 | <div class="notice" :class="{'ltz':locale == 'en'}"> | 78 | <div class="notice" :class="{'ltz':locale == 'en'}"> |
67 | <span>{{$t('vhis.tip1')}}</span> | 79 | <span>{{$t('vhis.tip1')}}</span> |
68 | <span class="orange">{{policyDetail.clientNameCn}}</span> | 80 | <span class="orange"> |
81 | <template v-if="locale == 'en'"> | ||
82 | {{policyDetail.clientNameEn ? policyDetail.clientNameEn : policyDetail.clientNameCn}} | ||
83 | </template> | ||
84 | <template v-else> | ||
85 | {{policyDetail.clientNameCn ? policyDetail.clientNameCn : policyDetail.clientNameEn}} | ||
86 | </template> | ||
87 | </span> | ||
69 | <span>{{$t('vhis.tip2')}}</span> | 88 | <span>{{$t('vhis.tip2')}}</span> |
70 | <span class="orange">{{policyDetail.nowYmd1}}</span> | 89 | <span class="orange">{{policyDetail.nowYmd1}}</span> |
71 | <span>{{$t('vhis.ymd1')}}</span> | 90 | <span>{{$t('vhis.ymd1')}}</span> | ... | ... |
... | @@ -148,11 +148,23 @@ export default { | ... | @@ -148,11 +148,23 @@ export default { |
148 | } | 148 | } |
149 | }); | 149 | }); |
150 | }, | 150 | }, |
151 | cacheData(){ | ||
152 | let m = this.$refs["material"]; | ||
153 | // console.log("cacheData"); | ||
154 | if (m) { | ||
155 | m.cacheData(); | ||
156 | } | ||
157 | }, | ||
151 | logoutAction() { | 158 | logoutAction() { |
152 | this.sid = false; | 159 | this.sid = false; |
153 | this.hadQueryCustomerList = false; | 160 | this.hadQueryCustomerList = false; |
154 | this.customerList = []; | 161 | this.customerList = []; |
155 | this.step = 1; | 162 | this.step = 1; |
163 | |||
164 | let m = this.$refs["material"]; | ||
165 | if (m) { | ||
166 | m.clearCache(); | ||
167 | } | ||
156 | }, | 168 | }, |
157 | loginAction() { | 169 | loginAction() { |
158 | this.sid = false; | 170 | this.sid = false; |
... | @@ -173,5 +185,5 @@ export default { | ... | @@ -173,5 +185,5 @@ export default { |
173 | this.initData(); | 185 | this.initData(); |
174 | 186 | ||
175 | }, | 187 | }, |
176 | created() {} | 188 | created() { } |
177 | } | 189 | } | ... | ... |
... | @@ -18,7 +18,7 @@ | ... | @@ -18,7 +18,7 @@ |
18 | </div> | 18 | </div> |
19 | <div class="content clarms" v-else> | 19 | <div class="content clarms" v-else> |
20 | <div class="clarms-cont"> | 20 | <div class="clarms-cont"> |
21 | <clarms-modal-one v-if="showModal1" @close="showModal1 = false" :type="modelType"></clarms-modal-one> | 21 | <clarms-modal-one v-if="showModal1" @close="showModal1 = false" :type="modelType" @toContact="cacheData"></clarms-modal-one> |
22 | <clarms-modal-two v-if="showModal2" @close="showModal2 = false"></clarms-modal-two> | 22 | <clarms-modal-two v-if="showModal2" @close="showModal2 = false"></clarms-modal-two> |
23 | <div class="mobile-margin"> | 23 | <div class="mobile-margin"> |
24 | 24 | ||
... | @@ -27,7 +27,7 @@ | ... | @@ -27,7 +27,7 @@ |
27 | </template> | 27 | </template> |
28 | 28 | ||
29 | <template v-if="step == 2"> | 29 | <template v-if="step == 2"> |
30 | <clarms-material :insuredList="customerList" :cid="cid" @showModal="handleShowModal"></clarms-material> | 30 | <clarms-material ref="material" :insuredList="customerList" :cid="cid" @showModal="handleShowModal"></clarms-material> |
31 | </template> | 31 | </template> |
32 | </div> | 32 | </div> |
33 | </div> | 33 | </div> | ... | ... |
... | @@ -219,7 +219,8 @@ | ... | @@ -219,7 +219,8 @@ |
219 | <div class="data-line"> | 219 | <div class="data-line"> |
220 | <!-- <div class="td w2">{{item.paidPeriod}}</div> --> | 220 | <!-- <div class="td w2">{{item.paidPeriod}}</div> --> |
221 | <div class="td w2">{{formatPanduPayPeriod(item.policyYear,item.policyPeriod)}}</div> | 221 | <div class="td w2">{{formatPanduPayPeriod(item.policyYear,item.policyPeriod)}}</div> |
222 | <div class="td w2">{{formatPayType(item.payTypeValue)}}</div> | 222 | <!-- <div class="td w2">{{formatPayType(item.payTypeValue)}}</div> --> |
223 | <div class="td w2">{{formatPayMode(dataForm.payMode)}}</div> | ||
223 | <div class="td w2">{{item.receiptDate?item.receiptDate.split(" ")[0]:""}}</div> | 224 | <div class="td w2">{{item.receiptDate?item.receiptDate.split(" ")[0]:""}}</div> |
224 | <div class="td w2">{{dataForm.moneyMark}} {{formatMoney(item.totalPremium)}}</div> | 225 | <div class="td w2">{{dataForm.moneyMark}} {{formatMoney(item.totalPremium)}}</div> |
225 | </div> | 226 | </div> | ... | ... |
... | @@ -8,6 +8,7 @@ import { | ... | @@ -8,6 +8,7 @@ import { |
8 | mapState | 8 | mapState |
9 | } from 'vuex'; | 9 | } from 'vuex'; |
10 | import { formatMoney, getInsuredPeriod, getPolicyName } from "@/utils/biz.js"; | 10 | import { formatMoney, getInsuredPeriod, getPolicyName } from "@/utils/biz.js"; |
11 | import Modal2Comp from '@/components/modal2-comp/modal2-comp.vue'; | ||
11 | 12 | ||
12 | export default { | 13 | export default { |
13 | props: { | 14 | props: { |
... | @@ -28,7 +29,8 @@ export default { | ... | @@ -28,7 +29,8 @@ export default { |
28 | maxShow: 2, | 29 | maxShow: 2, |
29 | selectPolicyCode: "", | 30 | selectPolicyCode: "", |
30 | selectPolicyCodes: {}, | 31 | selectPolicyCodes: {}, |
31 | hide: false | 32 | hide: false, |
33 | showDownloadError : false | ||
32 | } | 34 | } |
33 | }, | 35 | }, |
34 | computed: { | 36 | computed: { |
... | @@ -201,7 +203,7 @@ export default { | ... | @@ -201,7 +203,7 @@ export default { |
201 | return getInsuredPeriod(this.$i18n.locale, t, v); | 203 | return getInsuredPeriod(this.$i18n.locale, t, v); |
202 | }, | 204 | }, |
203 | formatPolicyName(c, n) { | 205 | formatPolicyName(c, n) { |
204 | return getPolicyName(this.$i18n.locale, c, c); | 206 | return getPolicyName(this.$i18n.locale, c, n); |
205 | }, | 207 | }, |
206 | downloadPolicy(policy) { | 208 | downloadPolicy(policy) { |
207 | if (policy) { | 209 | if (policy) { |
... | @@ -209,12 +211,15 @@ export default { | ... | @@ -209,12 +211,15 @@ export default { |
209 | if (res) { | 211 | if (res) { |
210 | let url = requestDomain() + api.downloadPolicy + "/" + res; | 212 | let url = requestDomain() + api.downloadPolicy + "/" + res; |
211 | window.open(url); | 213 | window.open(url); |
214 | } else { | ||
215 | this.showDownloadError = true; | ||
212 | } | 216 | } |
213 | }); | 217 | }); |
214 | } | 218 | } |
215 | } | 219 | } |
216 | }, | 220 | }, |
217 | components: { | 221 | components: { |
222 | Modal2Comp | ||
218 | }, | 223 | }, |
219 | mounted() { | 224 | mounted() { |
220 | this.queryList(); | 225 | this.queryList(); | ... | ... |
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 | <div class="cell-group"> | 4 | <div class="cell-group"> |
4 | <div class="table-contaner"> | 5 | <div class="table-contaner"> |
5 | <div class="table-header orange"> | 6 | <div class="table-header orange"> | ... | ... |
... | @@ -84,7 +84,7 @@ | ... | @@ -84,7 +84,7 @@ |
84 | </div> | 84 | </div> |
85 | <div class="ipt-wrap" :class="{err:errorTips.e7.length>0}"> | 85 | <div class="ipt-wrap" :class="{err:errorTips.e7.length>0}"> |
86 | <!-- <input class="ipt" type="date" v-model="data.contactDate" :class="{err : errorTips.e7.length > 0}"> --> | 86 | <!-- <input class="ipt" type="date" v-model="data.contactDate" :class="{err : errorTips.e7.length > 0}"> --> |
87 | <date-picker v-model="data.contactDate" :check="checkDate"></date-picker> | 87 | <date-picker v-model="data.contactDate" :check="checkDate" :filtModel="['history']"></date-picker> |
88 | </div> | 88 | </div> |
89 | <div class="validator" v-if="errorTips.e7.length > 0"> | 89 | <div class="validator" v-if="errorTips.e7.length > 0"> |
90 | <img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e7}} | 90 | <img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e7}} | ... | ... |
... | @@ -856,6 +856,7 @@ let payModeList = [ | ... | @@ -856,6 +856,7 @@ let payModeList = [ |
856 | { "v": "0", "n": "其他" }, | 856 | { "v": "0", "n": "其他" }, |
857 | { "v": "1", "n": "现金" }, | 857 | { "v": "1", "n": "现金" }, |
858 | { "v": "2", "n": "支票" }, | 858 | { "v": "2", "n": "支票" }, |
859 | { "v": "3", "n": "借记卡" }, | ||
859 | { "v": "84", "n": "易办事" }, | 860 | { "v": "84", "n": "易办事" }, |
860 | { "v": "93", "n": "银行本票" }, | 861 | { "v": "93", "n": "银行本票" }, |
861 | { "v": "61", "n": "银行汇票" }, | 862 | { "v": "61", "n": "银行汇票" }, |
... | @@ -866,6 +867,7 @@ let payModeEnList = [ | ... | @@ -866,6 +867,7 @@ let payModeEnList = [ |
866 | { "v": "0", "n": "Others" }, | 867 | { "v": "0", "n": "Others" }, |
867 | { "v": "1", "n": "Cash" }, | 868 | { "v": "1", "n": "Cash" }, |
868 | { "v": "2", "n": "Cheque" }, | 869 | { "v": "2", "n": "Cheque" }, |
870 | { "v": "3", "n": "Direct Debit" }, | ||
869 | { "v": "84", "n": "EPS" }, | 871 | { "v": "84", "n": "EPS" }, |
870 | { "v": "93", "n": "Cashier’s Order" }, | 872 | { "v": "93", "n": "Cashier’s Order" }, |
871 | { "v": "61", "n": "Bank Draft" }, | 873 | { "v": "61", "n": "Bank Draft" }, |
... | @@ -876,6 +878,7 @@ let payModeTcList = [ | ... | @@ -876,6 +878,7 @@ let payModeTcList = [ |
876 | { "v": "0", "n": "其他" }, | 878 | { "v": "0", "n": "其他" }, |
877 | { "v": "1", "n": "現金" }, | 879 | { "v": "1", "n": "現金" }, |
878 | { "v": "2", "n": "支票" }, | 880 | { "v": "2", "n": "支票" }, |
881 | { "v": "3", "n": "借記卡" }, | ||
879 | { "v": "84", "n": "易辦事" }, | 882 | { "v": "84", "n": "易辦事" }, |
880 | { "v": "93", "n": "銀行本票" }, | 883 | { "v": "93", "n": "銀行本票" }, |
881 | { "v": "61", "n": "銀行匯票" }, | 884 | { "v": "61", "n": "銀行匯票" }, | ... | ... |
-
Please register or sign in to post a comment