默认提交
Showing
8 changed files
with
102 additions
and
31 deletions
... | @@ -16,6 +16,8 @@ import { | ... | @@ -16,6 +16,8 @@ import { |
16 | Option | 16 | Option |
17 | } from 'element-ui'; | 17 | } from 'element-ui'; |
18 | 18 | ||
19 | import { ddMMyyyy2yyyyMMdd } from '@utils/utils.js'; | ||
20 | |||
19 | Vue.use(Loading); | 21 | Vue.use(Loading); |
20 | Vue.use(Select); | 22 | Vue.use(Select); |
21 | Vue.use(Option); | 23 | Vue.use(Option); |
... | @@ -109,6 +111,17 @@ export default { | ... | @@ -109,6 +111,17 @@ export default { |
109 | 111 | ||
110 | let b10 = this.policyIllegal; | 112 | let b10 = this.policyIllegal; |
111 | 113 | ||
114 | // console.log("b1:",b1); | ||
115 | // console.log("b2:",b2); | ||
116 | // console.log("b3:",b3); | ||
117 | // console.log("b4:",b4); | ||
118 | // console.log("b5:",b5); | ||
119 | // console.log("b6:",b6); | ||
120 | // console.log("b7:",b7); | ||
121 | // console.log("b8:",b8); | ||
122 | // console.log("b9:",b9); | ||
123 | // console.log("b10:",b10); | ||
124 | |||
112 | return b1 || b2 || b3 || b4 || b5 || b6 || b7 || b8 || b9 || b10; | 125 | return b1 || b2 || b3 || b4 || b5 || b6 || b7 || b8 || b9 || b10; |
113 | } | 126 | } |
114 | }, | 127 | }, |
... | @@ -217,7 +230,8 @@ export default { | ... | @@ -217,7 +230,8 @@ export default { |
217 | cid: this.cid, | 230 | cid: this.cid, |
218 | insuredId: insured.insuredId, | 231 | insuredId: insured.insuredId, |
219 | policyId: policy.policyId, | 232 | policyId: policy.policyId, |
220 | accidentTime: this.data.contactDate, | 233 | // accidentTime: this.data.contactDate, |
234 | accidentTime: ddMMyyyy2yyyyMMdd(this.data.contactDate), | ||
221 | applyReasonList: this.typeSelected.join(","), | 235 | applyReasonList: this.typeSelected.join(","), |
222 | treatmentAmount: this.data.amount, | 236 | treatmentAmount: this.data.amount, |
223 | imageList: imageList | 237 | imageList: imageList | ... | ... |
... | @@ -176,7 +176,7 @@ input { | ... | @@ -176,7 +176,7 @@ input { |
176 | margin-top: 48px; | 176 | margin-top: 48px; |
177 | } | 177 | } |
178 | 178 | ||
179 | .mt24{ | 179 | .mt24 { |
180 | margin-top: 24px; | 180 | margin-top: 24px; |
181 | } | 181 | } |
182 | 182 | ||
... | @@ -203,9 +203,13 @@ input { | ... | @@ -203,9 +203,13 @@ input { |
203 | 203 | ||
204 | hr { | 204 | hr { |
205 | border-top: 1px solid #eee; | 205 | border-top: 1px solid #eee; |
206 | margin-top: 48px; | 206 | margin-top: 42px; |
207 | } | 207 | } |
208 | 208 | ||
209 | // .hr2{ | ||
210 | // margin-top: 42px; | ||
211 | // } | ||
212 | |||
209 | .tips { | 213 | .tips { |
210 | display: flex; | 214 | display: flex; |
211 | justify-content: flex-start; | 215 | justify-content: flex-start; |
... | @@ -224,7 +228,7 @@ input { | ... | @@ -224,7 +228,7 @@ input { |
224 | } | 228 | } |
225 | } | 229 | } |
226 | 230 | ||
227 | .tips2{ | 231 | .tips2 { |
228 | margin-top: -12px; | 232 | margin-top: -12px; |
229 | } | 233 | } |
230 | 234 | ||
... | @@ -361,13 +365,14 @@ input { | ... | @@ -361,13 +365,14 @@ input { |
361 | width: 100%; | 365 | width: 100%; |
362 | display: flex; | 366 | display: flex; |
363 | justify-content: flex-start; | 367 | justify-content: flex-start; |
364 | padding: 0 $marginSmall; | 368 | // padding: 0 $marginSmall; |
365 | margin-bottom: 1.333333rem; | 369 | margin-bottom: 1.333333rem; |
366 | 370 | ||
367 | .label { | 371 | .label { |
372 | @extend .bb; | ||
368 | align-items: center; | 373 | align-items: center; |
369 | width: 30%; | 374 | min-width: 260px; |
370 | padding-left: 5px; | 375 | padding-left: 70px; |
371 | letter-spacing: .25rem; | 376 | letter-spacing: .25rem; |
372 | font-size: 20px; | 377 | font-size: 20px; |
373 | 378 | ||
... | @@ -402,12 +407,13 @@ input { | ... | @@ -402,12 +407,13 @@ input { |
402 | 407 | ||
403 | 408 | ||
404 | .ipt2 { | 409 | .ipt2 { |
405 | width: 100%; | 410 | // width: 100%; |
406 | border-bottom: 1px solid #ccc; | 411 | border-bottom: 1px solid #ccc; |
407 | height: 3rem; | 412 | height: 3rem; |
408 | display: flex; | 413 | display: flex; |
409 | align-items: center; | 414 | align-items: center; |
410 | margin-bottom: .833333rem; | 415 | margin-bottom: .833333rem; |
416 | width: 700px; | ||
411 | } | 417 | } |
412 | 418 | ||
413 | // 长文本 | 419 | // 长文本 |
... | @@ -433,6 +439,10 @@ input { | ... | @@ -433,6 +439,10 @@ input { |
433 | 439 | ||
434 | } | 440 | } |
435 | } | 441 | } |
442 | |||
443 | &-item-3 { | ||
444 | margin-bottom: 0; | ||
445 | } | ||
436 | } | 446 | } |
437 | 447 | ||
438 | 448 | ... | ... |
... | @@ -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" :filtModel="['future']" :check="checkDate" :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" :formatter="'dd-MM-yyyy'" :filtModel="['future']" :check="checkDate" :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> |
... | @@ -111,7 +111,7 @@ | ... | @@ -111,7 +111,7 @@ |
111 | </div> | 111 | </div> |
112 | 112 | ||
113 | <template v-if="data.contactDate"> | 113 | <template v-if="data.contactDate"> |
114 | <div class="pure-u-1 form-item-2 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"> |
117 | {{$t('clarms.step2.label10')}} | 117 | {{$t('clarms.step2.label10')}} |
... | @@ -123,7 +123,7 @@ | ... | @@ -123,7 +123,7 @@ |
123 | </div> | 123 | </div> |
124 | </div> | 124 | </div> |
125 | 125 | ||
126 | <div class="pure-u-1 form-item-2 mt20"> | 126 | <div class="pure-u-1 form-item-2 form-item-3 mt24"> |
127 | <div class="label"> | 127 | <div class="label"> |
128 | <div class="main-label"> | 128 | <div class="main-label"> |
129 | {{$t('clarms.step2.label13')}} | 129 | {{$t('clarms.step2.label13')}} |
... | @@ -138,7 +138,7 @@ | ... | @@ -138,7 +138,7 @@ |
138 | </template> | 138 | </template> |
139 | </div> | 139 | </div> |
140 | <template v-if="(data.HT41 && data.HT41.length > 0) && (data.HT26 && data.HT26.length > 0)"> | 140 | <template v-if="(data.HT41 && data.HT41.length > 0) && (data.HT26 && data.HT26.length > 0)"> |
141 | <hr v-if="data.amount > 0"> | 141 | <hr class="hr2" v-if="data.amount > 0"> |
142 | <div class="bottom-tip orange mt20">{{$t('clarms.step2.label17')}}</div> | 142 | <div class="bottom-tip orange mt20">{{$t('clarms.step2.label17')}}</div> |
143 | <div class="bottom-tip gray mt10">{{$t('clarms.step2.tip1')}}</div> | 143 | <div class="bottom-tip gray mt10">{{$t('clarms.step2.tip1')}}</div> |
144 | 144 | ... | ... |
... | @@ -12,10 +12,14 @@ import DatePicker from '@/components/date-picker/date-picker.vue'; | ... | @@ -12,10 +12,14 @@ import DatePicker from '@/components/date-picker/date-picker.vue'; |
12 | import { Loading } from 'vant'; | 12 | import { Loading } from 'vant'; |
13 | import { Select, Option } from 'element-ui'; | 13 | import { Select, Option } from 'element-ui'; |
14 | 14 | ||
15 | import { ddMMyyyy2yyyyMMdd } from '@utils/utils.js'; | ||
16 | |||
15 | Vue.use(Select); | 17 | Vue.use(Select); |
16 | Vue.use(Option); | 18 | Vue.use(Option); |
17 | Vue.use(Loading); | 19 | Vue.use(Loading); |
18 | 20 | ||
21 | |||
22 | |||
19 | export default { | 23 | export default { |
20 | data() { | 24 | data() { |
21 | return { | 25 | return { |
... | @@ -91,7 +95,9 @@ export default { | ... | @@ -91,7 +95,9 @@ export default { |
91 | return; | 95 | return; |
92 | } | 96 | } |
93 | this.loading = true; | 97 | this.loading = true; |
94 | httpPost({ url: api.getCidByVerify, data: this.data }).then(res => { | 98 | let param = this.data; |
99 | param.birthDate = ddMMyyyy2yyyyMMdd(param.birthDate); | ||
100 | httpPost({ url: api.getCidByVerify, data: param }).then(res => { | ||
95 | if (res) { | 101 | if (res) { |
96 | let cid = res; | 102 | let cid = res; |
97 | httpPost({ url: api.clarmsCustomerList, data: { cid: cid } }).then(res => { | 103 | httpPost({ url: api.clarmsCustomerList, data: { cid: cid } }).then(res => { | ... | ... |
... | @@ -4,7 +4,8 @@ | ... | @@ -4,7 +4,8 @@ |
4 | <u> | 4 | <u> |
5 | <span class="pointer" @click="toRegisterPage">{{$t('clarms.step1.register')}}</span>/ | 5 | <span class="pointer" @click="toRegisterPage">{{$t('clarms.step1.register')}}</span>/ |
6 | <span class="pointer" @click="toLoginPage">{{$t('clarms.step1.login')}}</span> | 6 | <span class="pointer" @click="toLoginPage">{{$t('clarms.step1.login')}}</span> |
7 | </u>{{$t('clarms.step1.t1')}}</div> | 7 | </u> |
8 | <span v-if="$i18n.locale == 'en'"> </span>{{$t('clarms.step1.t1')}}</div> | ||
8 | <div class="form-name default-mt"> {{$t('clarms.step1.label0')}}</div> | 9 | <div class="form-name default-mt"> {{$t('clarms.step1.label0')}}</div> |
9 | <div class="gird-g form default-mt"> | 10 | <div class="gird-g form default-mt"> |
10 | <div class="form-item"> | 11 | <div class="form-item"> |
... | @@ -63,7 +64,7 @@ | ... | @@ -63,7 +64,7 @@ |
63 | <div class="ipt-wrap"> | 64 | <div class="ipt-wrap"> |
64 | <div class="down-arrow"></div> | 65 | <div class="down-arrow"></div> |
65 | <div class="cont"> | 66 | <div class="cont"> |
66 | <date-picker class="ipt-date" v-model="data.birthDate" :filtModel="['future']" :check="checkDate" :cusStyle="{border:'none !important','background-color':'transparent !important',height:'48px', padding:'0', color:'#606266'}"></date-picker> | 67 | <date-picker class="ipt-date" :formatter="'dd-MM-yyyy'" v-model="data.birthDate" :filtModel="['future']" :check="checkDate" :cusStyle="{border:'none !important','background-color':'transparent !important',height:'48px', padding:'0', color:'#606266'}"></date-picker> |
67 | </div> | 68 | </div> |
68 | </div> | 69 | </div> |
69 | </div> | 70 | </div> | ... | ... |
... | @@ -6,14 +6,22 @@ import { | ... | @@ -6,14 +6,22 @@ import { |
6 | 6 | ||
7 | import Date from '@/utils/date.js'; | 7 | import Date from '@/utils/date.js'; |
8 | 8 | ||
9 | import { | ||
10 | ddMMyyyy2yyyyMMdd | ||
11 | } from '@utils/utils.js'; | ||
12 | |||
9 | export default { | 13 | export default { |
10 | inheritAttrs: false, | 14 | inheritAttrs: false, |
11 | props: { | 15 | props: { |
12 | // 周末是否可选 | ||
13 | value: { | 16 | value: { |
14 | type: String, | 17 | type: String, |
15 | default: "" | 18 | default: "" |
16 | }, | 19 | }, |
20 | // 日期格式 默认yyyy-MM-dd | ||
21 | formatter: { | ||
22 | type: String, | ||
23 | default: "yyyy-MM-dd" | ||
24 | }, | ||
17 | // 周末是否可选 | 25 | // 周末是否可选 |
18 | weekend: { | 26 | weekend: { |
19 | type: Boolean, | 27 | type: Boolean, |
... | @@ -26,14 +34,14 @@ export default { | ... | @@ -26,14 +34,14 @@ export default { |
26 | // today : 当日不可选择 | 34 | // today : 当日不可选择 |
27 | filtModel: { | 35 | filtModel: { |
28 | type: Array, | 36 | type: Array, |
29 | default() { | 37 | default () { |
30 | return ["history", "weekend", "today"] | 38 | return ["history", "weekend", "today"] |
31 | } | 39 | } |
32 | }, | 40 | }, |
33 | // 需要过滤的日期列表 格式 ["yyyy-MM-dd","yyyy-MM-dd"] | 41 | // 需要过滤的日期列表 格式 ["yyyy-MM-dd","yyyy-MM-dd"] |
34 | filterDates: { | 42 | filterDates: { |
35 | type: Array, | 43 | type: Array, |
36 | default() { | 44 | default () { |
37 | return [] // ["2019-11-26", "2019-11-28"] | 45 | return [] // ["2019-11-26", "2019-11-28"] |
38 | } | 46 | } |
39 | }, | 47 | }, |
... | @@ -62,7 +70,7 @@ export default { | ... | @@ -62,7 +70,7 @@ export default { |
62 | }, | 70 | }, |
63 | cusStyle: { | 71 | cusStyle: { |
64 | type: Object, | 72 | type: Object, |
65 | default() { | 73 | default () { |
66 | return {}; | 74 | return {}; |
67 | } | 75 | } |
68 | }, | 76 | }, |
... | @@ -125,7 +133,13 @@ export default { | ... | @@ -125,7 +133,13 @@ export default { |
125 | }, | 133 | }, |
126 | methods: { | 134 | methods: { |
127 | activity(item) { | 135 | activity(item) { |
128 | let ymd = item.year + "-" + (item.month > 9 ? item.month : "0" + item.month) + "-" + (item.date > 9 ? item.date : "0" + item.date); | 136 | let year = item.year; |
137 | let month = item.month > 9 ? item.month : "0" + item.month; | ||
138 | let date = item.date > 9 ? item.date : "0" + item.date; | ||
139 | let ymd = `${year}-${month}-${date}`; | ||
140 | if (this.formatter == "dd-MM-yyyy") { | ||
141 | ymd = `${date}-${month}-${year}`; | ||
142 | } | ||
129 | return ymd == this.dateValue; | 143 | return ymd == this.dateValue; |
130 | }, | 144 | }, |
131 | /** | 145 | /** |
... | @@ -361,13 +375,18 @@ export default { | ... | @@ -361,13 +375,18 @@ export default { |
361 | } | 375 | } |
362 | }, | 376 | }, |
363 | formatDateValue(year, month, date) { | 377 | formatDateValue(year, month, date) { |
378 | // console.log("year:", year); | ||
379 | // console.log("month:", month); | ||
380 | // console.log("date:", date); | ||
364 | if (month < 10) { | 381 | if (month < 10) { |
365 | month = "0" + month | 382 | month = "0" + month |
366 | } | 383 | } |
367 | if (date < 10) { | 384 | if (date < 10) { |
368 | date = "0" + date | 385 | date = "0" + date |
369 | } | 386 | } |
370 | this.dateValue = `${year}-${month}-${date}`; | 387 | // this.dateValue = `${year}-${month}-${date}`; |
388 | this.dateValue = Date.parse(`${year}.${month}.${date}`).toString(this.formatter); | ||
389 | // console.log("this.dateValue:", this.dateValue); | ||
371 | }, | 390 | }, |
372 | /** | 391 | /** |
373 | * 校验并返回日期 | 392 | * 校验并返回日期 |
... | @@ -384,15 +403,17 @@ export default { | ... | @@ -384,15 +403,17 @@ export default { |
384 | fortmatMonthData.forEach((element, idx) => { | 403 | fortmatMonthData.forEach((element, idx) => { |
385 | if (element) { | 404 | if (element) { |
386 | let curDate = `${element.year}-${element.month}-${element.date}`; | 405 | let curDate = `${element.year}-${element.month}-${element.date}`; |
387 | curDate = Date.parse(curDate).toString("yyyy-MM-dd"); //转成yyyy-MM-dd | 406 | curDate = Date.parse(curDate).toString(this.formatter); //转成yyyy-MM-dd |
388 | if (curDate == dateValue && element.disable == true) { | 407 | if (curDate == dateValue && element.disable == true) { |
389 | disable = true; | 408 | disable = true; |
390 | } | 409 | } |
391 | } | 410 | } |
392 | }); | 411 | }); |
393 | if (!disable) { | 412 | if (!disable) { |
413 | if (this.formatter == "yyyy-MM-dd") { | ||
394 | disable = !/^((?!0000)[0-9]{4}-((0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-8])|(0[13-9]|1[0-2])-(29|30)|(0[13578]|1[02])-31)|([0-9]{2}(0[48]|[2468][048]|[13579][26])|(0[48]|[2468][048]|[13579][26])00)-02-29)$/.test(dateValue); | 414 | disable = !/^((?!0000)[0-9]{4}-((0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-8])|(0[13-9]|1[0-2])-(29|30)|(0[13578]|1[02])-31)|([0-9]{2}(0[48]|[2468][048]|[13579][26])|(0[48]|[2468][048]|[13579][26])00)-02-29)$/.test(dateValue); |
395 | } | 415 | } |
416 | } | ||
396 | let result = { | 417 | let result = { |
397 | dateValue: this.dateValue, | 418 | dateValue: this.dateValue, |
398 | disable: disable | 419 | disable: disable |
... | @@ -404,15 +425,29 @@ export default { | ... | @@ -404,15 +425,29 @@ export default { |
404 | // 设置今天日期 | 425 | // 设置今天日期 |
405 | let isInit = false; | 426 | let isInit = false; |
406 | if (this.value) { | 427 | if (this.value) { |
407 | let ymd = this.value.split("-"); | 428 | // console.log("this.value:", this.value); |
408 | if (ymd.length == 3) { | 429 | // let ymd = this.value.split("-"); |
430 | // if (ymd.length == 3) { | ||
431 | // try { | ||
432 | // this.year = Number(ymd[0]); | ||
433 | // this.month = Number(ymd[1]); | ||
434 | // this.date = Number(ymd[2]); | ||
435 | // isInit = true; | ||
436 | // } catch (e) {} | ||
437 | // } | ||
409 | try { | 438 | try { |
410 | this.year = Number(ymd[0]); | 439 | let dateStr = this.value; |
411 | this.month = Number(ymd[1]); | 440 | if (this.formatter == "dd-MM-yyyy") { |
412 | this.date = Number(ymd[2]); | 441 | // dateStr = this.value.replace(/-/g, '').replace(/^(\d{2})(\d{2})(\d{4})$/, "$3-$2-$1"); |
413 | isInit = true; | 442 | dateStr = ddMMyyyy2yyyyMMdd(this.value); |
414 | } catch (e) { } | 443 | |
415 | } | 444 | } |
445 | let curDate = Date.parse(dateStr); | ||
446 | this.year = curDate.getFullYear(); | ||
447 | this.month = curDate.getMonth() + 1; | ||
448 | this.date = curDate.getDate(); | ||
449 | isInit = true; | ||
450 | } catch (error) {} | ||
416 | } | 451 | } |
417 | if (!isInit) { | 452 | if (!isInit) { |
418 | let today = Date.today(); | 453 | let today = Date.today(); |
... | @@ -447,7 +482,7 @@ export default { | ... | @@ -447,7 +482,7 @@ export default { |
447 | 482 | ||
448 | } | 483 | } |
449 | }, | 484 | }, |
450 | mounted() { }, | 485 | mounted() {}, |
451 | created() { | 486 | created() { |
452 | this.initData(); | 487 | this.initData(); |
453 | }, | 488 | }, | ... | ... |
... | @@ -3,7 +3,7 @@ | ... | @@ -3,7 +3,7 @@ |
3 | <div class="navigate"> | 3 | <div class="navigate"> |
4 | <div class="bg"></div> | 4 | <div class="bg"></div> |
5 | <div class="cont"> | 5 | <div class="cont"> |
6 | <span class="tt">索償申請</span> | 6 | <span class="tt">{{$t('customService.menu5')}}</span> |
7 | </div> | 7 | </div> |
8 | </div> | 8 | </div> |
9 | <div class="content clarms"> | 9 | <div class="content clarms"> | ... | ... |
... | @@ -186,6 +186,11 @@ export function formatBr(str) { | ... | @@ -186,6 +186,11 @@ export function formatBr(str) { |
186 | return str | 186 | return str |
187 | }; | 187 | }; |
188 | 188 | ||
189 | // dd-MM-yyyy转yyyy-MM-dd | ||
190 | export function ddMMyyyy2yyyyMMdd(str) { | ||
191 | return str.replace(/-/g, '').replace(/^(\d{2})(\d{2})(\d{4})$/, "$3-$2-$1"); | ||
192 | } | ||
193 | |||
189 | 194 | ||
190 | /** | 195 | /** |
191 | * @desc 函数防抖 | 196 | * @desc 函数防抖 | ... | ... |
-
Please register or sign in to post a comment