907d3d38 by simon

默认提交

1 parent cad08a2d
......@@ -16,6 +16,8 @@ import {
Option
} from 'element-ui';
import { ddMMyyyy2yyyyMMdd } from '@utils/utils.js';
Vue.use(Loading);
Vue.use(Select);
Vue.use(Option);
......@@ -109,6 +111,17 @@ export default {
let b10 = this.policyIllegal;
// console.log("b1:",b1);
// console.log("b2:",b2);
// console.log("b3:",b3);
// console.log("b4:",b4);
// console.log("b5:",b5);
// console.log("b6:",b6);
// console.log("b7:",b7);
// console.log("b8:",b8);
// console.log("b9:",b9);
// console.log("b10:",b10);
return b1 || b2 || b3 || b4 || b5 || b6 || b7 || b8 || b9 || b10;
}
},
......@@ -217,7 +230,8 @@ export default {
cid: this.cid,
insuredId: insured.insuredId,
policyId: policy.policyId,
accidentTime: this.data.contactDate,
// accidentTime: this.data.contactDate,
accidentTime: ddMMyyyy2yyyyMMdd(this.data.contactDate),
applyReasonList: this.typeSelected.join(","),
treatmentAmount: this.data.amount,
imageList: imageList
......
......@@ -176,7 +176,7 @@ input {
margin-top: 48px;
}
.mt24{
.mt24 {
margin-top: 24px;
}
......@@ -203,9 +203,13 @@ input {
hr {
border-top: 1px solid #eee;
margin-top: 48px;
margin-top: 42px;
}
// .hr2{
// margin-top: 42px;
// }
.tips {
display: flex;
justify-content: flex-start;
......@@ -224,7 +228,7 @@ input {
}
}
.tips2{
.tips2 {
margin-top: -12px;
}
......@@ -361,13 +365,14 @@ input {
width: 100%;
display: flex;
justify-content: flex-start;
padding: 0 $marginSmall;
// padding: 0 $marginSmall;
margin-bottom: 1.333333rem;
.label {
@extend .bb;
align-items: center;
width: 30%;
padding-left: 5px;
min-width: 260px;
padding-left: 70px;
letter-spacing: .25rem;
font-size: 20px;
......@@ -402,12 +407,13 @@ input {
.ipt2 {
width: 100%;
// width: 100%;
border-bottom: 1px solid #ccc;
height: 3rem;
display: flex;
align-items: center;
margin-bottom: .833333rem;
width: 700px;
}
// 长文本
......@@ -433,6 +439,10 @@ input {
}
}
&-item-3 {
margin-bottom: 0;
}
}
......
......@@ -103,7 +103,7 @@
<div class="down-arrow"></div>
<div class="cont">
<div class="ipt-date">
<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>
<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>
</div>
</div>
</div>
......@@ -111,7 +111,7 @@
</div>
<template v-if="data.contactDate">
<div class="pure-u-1 form-item-2 mt20">
<div class="pure-u-1 form-item-2 form-item-3 mt20">
<div class="label">
<div class="main-label">
{{$t('clarms.step2.label10')}}
......@@ -123,7 +123,7 @@
</div>
</div>
<div class="pure-u-1 form-item-2 mt20">
<div class="pure-u-1 form-item-2 form-item-3 mt24">
<div class="label">
<div class="main-label">
{{$t('clarms.step2.label13')}}
......@@ -138,7 +138,7 @@
</template>
</div>
<template v-if="(data.HT41 && data.HT41.length > 0) && (data.HT26 && data.HT26.length > 0)">
<hr v-if="data.amount > 0">
<hr class="hr2" v-if="data.amount > 0">
<div class="bottom-tip orange mt20">{{$t('clarms.step2.label17')}}</div>
<div class="bottom-tip gray mt10">{{$t('clarms.step2.tip1')}}</div>
......
......@@ -12,10 +12,14 @@ import DatePicker from '@/components/date-picker/date-picker.vue';
import { Loading } from 'vant';
import { Select, Option } from 'element-ui';
import { ddMMyyyy2yyyyMMdd } from '@utils/utils.js';
Vue.use(Select);
Vue.use(Option);
Vue.use(Loading);
export default {
data() {
return {
......@@ -90,8 +94,10 @@ export default {
if (this.loading) {
return;
}
this.loading = true;
httpPost({ url: api.getCidByVerify, data: this.data }).then(res => {
this.loading = true;
let param = this.data;
param.birthDate = ddMMyyyy2yyyyMMdd(param.birthDate);
httpPost({ url: api.getCidByVerify, data: param }).then(res => {
if (res) {
let cid = res;
httpPost({ url: api.clarmsCustomerList, data: { cid: cid } }).then(res => {
......
......@@ -4,7 +4,8 @@
<u>
<span class="pointer" @click="toRegisterPage">{{$t('clarms.step1.register')}}</span>/
<span class="pointer" @click="toLoginPage">{{$t('clarms.step1.login')}}</span>
</u>{{$t('clarms.step1.t1')}}</div>
</u>
<span v-if="$i18n.locale == 'en'">&nbsp;</span>{{$t('clarms.step1.t1')}}</div>
<div class="form-name default-mt"> {{$t('clarms.step1.label0')}}</div>
<div class="gird-g form default-mt">
<div class="form-item">
......@@ -63,7 +64,7 @@
<div class="ipt-wrap">
<div class="down-arrow"></div>
<div class="cont">
<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>
<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>
</div>
</div>
</div>
......
......@@ -6,14 +6,22 @@ import {
import Date from '@/utils/date.js';
import {
ddMMyyyy2yyyyMMdd
} from '@utils/utils.js';
export default {
inheritAttrs: false,
props: {
// 周末是否可选
value: {
type: String,
default: ""
},
// 日期格式 默认yyyy-MM-dd
formatter: {
type: String,
default: "yyyy-MM-dd"
},
// 周末是否可选
weekend: {
type: Boolean,
......@@ -26,14 +34,14 @@ export default {
// today : 当日不可选择
filtModel: {
type: Array,
default() {
default () {
return ["history", "weekend", "today"]
}
},
// 需要过滤的日期列表 格式 ["yyyy-MM-dd","yyyy-MM-dd"]
filterDates: {
type: Array,
default() {
default () {
return [] // ["2019-11-26", "2019-11-28"]
}
},
......@@ -62,7 +70,7 @@ export default {
},
cusStyle: {
type: Object,
default() {
default () {
return {};
}
},
......@@ -125,7 +133,13 @@ export default {
},
methods: {
activity(item) {
let ymd = item.year + "-" + (item.month > 9 ? item.month : "0" + item.month) + "-" + (item.date > 9 ? item.date : "0" + item.date);
let year = item.year;
let month = item.month > 9 ? item.month : "0" + item.month;
let date = item.date > 9 ? item.date : "0" + item.date;
let ymd = `${year}-${month}-${date}`;
if (this.formatter == "dd-MM-yyyy") {
ymd = `${date}-${month}-${year}`;
}
return ymd == this.dateValue;
},
/**
......@@ -361,13 +375,18 @@ export default {
}
},
formatDateValue(year, month, date) {
// console.log("year:", year);
// console.log("month:", month);
// console.log("date:", date);
if (month < 10) {
month = "0" + month
}
if (date < 10) {
date = "0" + date
}
this.dateValue = `${year}-${month}-${date}`;
// this.dateValue = `${year}-${month}-${date}`;
this.dateValue = Date.parse(`${year}.${month}.${date}`).toString(this.formatter);
// console.log("this.dateValue:", this.dateValue);
},
/**
* 校验并返回日期
......@@ -384,14 +403,16 @@ export default {
fortmatMonthData.forEach((element, idx) => {
if (element) {
let curDate = `${element.year}-${element.month}-${element.date}`;
curDate = Date.parse(curDate).toString("yyyy-MM-dd"); //转成yyyy-MM-dd
curDate = Date.parse(curDate).toString(this.formatter); //转成yyyy-MM-dd
if (curDate == dateValue && element.disable == true) {
disable = true;
}
}
});
if (!disable) {
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);
if (this.formatter == "yyyy-MM-dd") {
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);
}
}
let result = {
dateValue: this.dateValue,
......@@ -404,15 +425,29 @@ export default {
// 设置今天日期
let isInit = false;
if (this.value) {
let ymd = this.value.split("-");
if (ymd.length == 3) {
try {
this.year = Number(ymd[0]);
this.month = Number(ymd[1]);
this.date = Number(ymd[2]);
isInit = true;
} catch (e) { }
}
// console.log("this.value:", this.value);
// let ymd = this.value.split("-");
// if (ymd.length == 3) {
// try {
// this.year = Number(ymd[0]);
// this.month = Number(ymd[1]);
// this.date = Number(ymd[2]);
// isInit = true;
// } catch (e) {}
// }
try {
let dateStr = this.value;
if (this.formatter == "dd-MM-yyyy") {
// dateStr = this.value.replace(/-/g, '').replace(/^(\d{2})(\d{2})(\d{4})$/, "$3-$2-$1");
dateStr = ddMMyyyy2yyyyMMdd(this.value);
}
let curDate = Date.parse(dateStr);
this.year = curDate.getFullYear();
this.month = curDate.getMonth() + 1;
this.date = curDate.getDate();
isInit = true;
} catch (error) {}
}
if (!isInit) {
let today = Date.today();
......@@ -447,7 +482,7 @@ export default {
}
},
mounted() { },
mounted() {},
created() {
this.initData();
},
......
......@@ -3,7 +3,7 @@
<div class="navigate">
<div class="bg"></div>
<div class="cont">
<span class="tt">索償申請</span>
<span class="tt">{{$t('customService.menu5')}}</span>
</div>
</div>
<div class="content clarms">
......