Merge branch 'master' of http://120.27.44.69/dev/pingan-life-index-pro
# Conflicts: # src/components/clarms/clarms-plugins-material.js
Showing
4 changed files
with
61 additions
and
16 deletions
| ... | @@ -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: "", |
| ... | @@ -144,21 +144,25 @@ export default { | ... | @@ -144,21 +144,25 @@ export default { |
| 144 | let clarmDataFormStr = sessionStorage.getItem("clarmDataForm"); | 144 | let clarmDataFormStr = sessionStorage.getItem("clarmDataForm"); |
| 145 | sessionStorage.removeItem("clarmDataForm"); | 145 | sessionStorage.removeItem("clarmDataForm"); |
| 146 | 146 | ||
| 147 | if (typeSelectedStr) { | 147 | |
| 148 | if (clarmDataFormStr) { | ||
| 148 | try { | 149 | try { |
| 149 | this.typeSelected = JSON.parse(typeSelectedStr); | 150 | this.data = JSON.parse(clarmDataFormStr); |
| 150 | } catch (e) { | 151 | } catch (e) { |
| 151 | 152 | ||
| 152 | } | 153 | } |
| 153 | } | 154 | } |
| 154 | 155 | ||
| 155 | if (clarmDataFormStr) { | 156 | if (typeSelectedStr) { |
| 156 | try { | 157 | try { |
| 157 | this.data = JSON.parse(clarmDataFormStr); | 158 | let typeSelected = JSON.parse(typeSelectedStr); |
| 159 | console.log("typeSelected:", typeSelected); | ||
| 160 | this.$set(this, "typeSelected", typeSelected) | ||
| 158 | } catch (e) { | 161 | } catch (e) { |
| 159 | 162 | ||
| 160 | } | 163 | } |
| 161 | } | 164 | } |
| 165 | this.dataInit = true; | ||
| 162 | // console.log("this.insuredList = ", this.insuredList); | 166 | // console.log("this.insuredList = ", this.insuredList); |
| 163 | }, | 167 | }, |
| 164 | cacheData() { | 168 | cacheData() { |
| ... | @@ -171,7 +175,7 @@ export default { | ... | @@ -171,7 +175,7 @@ export default { |
| 171 | this.$refs['HT34'].cacheData(); | 175 | this.$refs['HT34'].cacheData(); |
| 172 | this.$refs['HT03'].cacheData(); | 176 | this.$refs['HT03'].cacheData(); |
| 173 | }, | 177 | }, |
| 174 | clearCache(){ | 178 | clearCache() { |
| 175 | sessionStorage.removeItem("clarmTypeSelect"); | 179 | sessionStorage.removeItem("clarmTypeSelect"); |
| 176 | sessionStorage.removeItem("clarmDataForm"); | 180 | sessionStorage.removeItem("clarmDataForm"); |
| 177 | 181 | ||
| ... | @@ -329,12 +333,12 @@ export default { | ... | @@ -329,12 +333,12 @@ export default { |
| 329 | // 2标记为时间 | 333 | // 2标记为时间 |
| 330 | this.$emit("showModal", { action: 1, type: 2 }); | 334 | this.$emit("showModal", { action: 1, type: 2 }); |
| 331 | return false; | 335 | return false; |
| 332 | } | ||
| 333 | }, | 336 | }, |
| 334 | watch: { | 337 | datePickCompleteHandler() { |
| 335 | "data.insuredIndex": function (v, ov) { | ||
| 336 | this.typeSelected = []; | ||
| 337 | 338 | ||
| 339 | }, | ||
| 340 | insuredChange(){ | ||
| 341 | this.typeSelected = []; | ||
| 338 | let d = { | 342 | let d = { |
| 339 | insuredIndex: this.data.insuredIndex, | 343 | insuredIndex: this.data.insuredIndex, |
| 340 | amount: null, | 344 | amount: null, |
| ... | @@ -355,12 +359,42 @@ export default { | ... | @@ -355,12 +359,42 @@ export default { |
| 355 | HT16Uploading: false, | 359 | HT16Uploading: false, |
| 356 | }; | 360 | }; |
| 357 | this.$set(this, "data", d); | 361 | this.$set(this, "data", d); |
| 358 | if (this.checkPolicy()) { | ||
| 359 | this.policyIllegal = false; | ||
| 360 | } else { | ||
| 361 | this.policyIllegal = true; | ||
| 362 | } | 362 | } |
| 363 | }, | 363 | }, |
| 364 | watch: { | ||
| 365 | "data.insuredIndex": function (v, ov) { | ||
| 366 | // if (!this.dataInit) { | ||
| 367 | // return; | ||
| 368 | // } | ||
| 369 | // console.log("1111111111111111"); | ||
| 370 | // this.typeSelected = []; | ||
| 371 | |||
| 372 | // let d = { | ||
| 373 | // insuredIndex: this.data.insuredIndex, | ||
| 374 | // amount: null, | ||
| 375 | // contactDate: "", | ||
| 376 | // // 必传资料 | ||
| 377 | // HT41: null, | ||
| 378 | // HT26: null, | ||
| 379 | // // 非必传资料 | ||
| 380 | // HT29: null, | ||
| 381 | // HT34: null, | ||
| 382 | // HT16: null, | ||
| 383 | |||
| 384 | // // 是否正在上传 | ||
| 385 | // HT41Uploading: false, | ||
| 386 | // HT26Uploading: false, | ||
| 387 | // HT29Uploading: false, | ||
| 388 | // HT34Uploading: false, | ||
| 389 | // HT16Uploading: false, | ||
| 390 | // }; | ||
| 391 | // this.$set(this, "data", d); | ||
| 392 | // if (this.checkPolicy()) { | ||
| 393 | // this.policyIllegal = false; | ||
| 394 | // } else { | ||
| 395 | // this.policyIllegal = true; | ||
| 396 | // } | ||
| 397 | }, | ||
| 364 | "data.contactDate": function () { | 398 | "data.contactDate": function () { |
| 365 | if (this.checkPolicy()) { | 399 | if (this.checkPolicy()) { |
| 366 | this.policyIllegal = false; | 400 | this.policyIllegal = false; | ... | ... |
| ... | @@ -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,7 +103,7 @@ | ... | @@ -103,7 +103,7 @@ |
| 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" :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" :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> |
| 107 | </div> | 107 | </div> |
| 108 | </div> | 108 | </div> |
| 109 | </div> | 109 | </div> | ... | ... |
| ... | @@ -74,6 +74,11 @@ export default { | ... | @@ -74,6 +74,11 @@ export default { |
| 74 | return {}; | 74 | return {}; |
| 75 | } | 75 | } |
| 76 | }, | 76 | }, |
| 77 | // 选择完日后触发 | ||
| 78 | datePickComplete: { | ||
| 79 | type: Function, | ||
| 80 | default: null | ||
| 81 | }, | ||
| 77 | }, | 82 | }, |
| 78 | data() { | 83 | data() { |
| 79 | return { | 84 | return { |
| ... | @@ -272,6 +277,9 @@ export default { | ... | @@ -272,6 +277,9 @@ export default { |
| 272 | // this.dateValue = `${year}-${month}-${date}`; | 277 | // this.dateValue = `${year}-${month}-${date}`; |
| 273 | this.formatDateValue(year, month, date); | 278 | this.formatDateValue(year, month, date); |
| 274 | this.showCalendar(); | 279 | this.showCalendar(); |
| 280 | if(this.datePickComplete){ | ||
| 281 | this.datePickComplete(); | ||
| 282 | } | ||
| 275 | }, | 283 | }, |
| 276 | // 选择月份 | 284 | // 选择月份 |
| 277 | selectMonth(item) { | 285 | selectMonth(item) { | ... | ... |
-
Please register or sign in to post a comment