89a940ab by joe

Merge branch 'master' of http://120.27.44.69/dev/pingan-life-index-pro

# Conflicts:
#	src/components/clarms/clarms-plugins-material.js
2 parents dbbb4b36 763dce47
......@@ -39,6 +39,7 @@ export default {
},
data() {
return {
dataInit: false,
showTips: false,
// 候选人所购买的保单可选择的类型
/**
......@@ -53,7 +54,6 @@ export default {
typeCandidates: ['1', '2', '5', '6', '7'],
// 已经选择的类型,
typeSelected: [],
images: [],
agress: false,
data: {
insuredIndex: "",
......@@ -144,21 +144,25 @@ export default {
let clarmDataFormStr = sessionStorage.getItem("clarmDataForm");
sessionStorage.removeItem("clarmDataForm");
if (typeSelectedStr) {
if (clarmDataFormStr) {
try {
this.typeSelected = JSON.parse(typeSelectedStr);
this.data = JSON.parse(clarmDataFormStr);
} catch (e) {
}
}
if (clarmDataFormStr) {
if (typeSelectedStr) {
try {
this.data = JSON.parse(clarmDataFormStr);
let typeSelected = JSON.parse(typeSelectedStr);
console.log("typeSelected:", typeSelected);
this.$set(this, "typeSelected", typeSelected)
} catch (e) {
}
}
this.dataInit = true;
// console.log("this.insuredList = ", this.insuredList);
},
cacheData() {
......@@ -171,7 +175,7 @@ export default {
this.$refs['HT34'].cacheData();
this.$refs['HT03'].cacheData();
},
clearCache(){
clearCache() {
sessionStorage.removeItem("clarmTypeSelect");
sessionStorage.removeItem("clarmDataForm");
......@@ -329,12 +333,12 @@ export default {
// 2标记为时间
this.$emit("showModal", { action: 1, type: 2 });
return false;
}
},
watch: {
"data.insuredIndex": function (v, ov) {
this.typeSelected = [];
datePickCompleteHandler() {
},
insuredChange(){
this.typeSelected = [];
let d = {
insuredIndex: this.data.insuredIndex,
amount: null,
......@@ -355,12 +359,42 @@ export default {
HT16Uploading: false,
};
this.$set(this, "data", d);
if (this.checkPolicy()) {
this.policyIllegal = false;
} else {
this.policyIllegal = true;
}
},
watch: {
"data.insuredIndex": function (v, ov) {
// if (!this.dataInit) {
// return;
// }
// console.log("1111111111111111");
// this.typeSelected = [];
// let d = {
// insuredIndex: this.data.insuredIndex,
// amount: null,
// contactDate: "",
// // 必传资料
// HT41: null,
// HT26: null,
// // 非必传资料
// HT29: null,
// HT34: null,
// HT16: null,
// // 是否正在上传
// HT41Uploading: false,
// HT26Uploading: false,
// HT29Uploading: false,
// HT34Uploading: false,
// HT16Uploading: false,
// };
// this.$set(this, "data", d);
// if (this.checkPolicy()) {
// this.policyIllegal = false;
// } else {
// this.policyIllegal = true;
// }
},
"data.contactDate": function () {
if (this.checkPolicy()) {
this.policyIllegal = false;
......
......@@ -20,7 +20,7 @@
<div class="tt t1">{{$t('clarms.step2.label1')}}</div>
<div class="tt clarms-border">
<div class="down-arrow"></div>
<el-select style="text-align: center;" class="clarms-select" v-model="data.insuredIndex" :placeholder="''">
<el-select style="text-align: center;" class="clarms-select" v-model="data.insuredIndex" :placeholder="''" @change="insuredChange">
<template v-if="lan == 'en'">
<el-option v-for="(item,index) in insuredList" :key="index" :label="item.insuredNameEn?item.insuredNameEn:insuredNameCn" :value="index + 1">
</el-option>
......@@ -103,7 +103,7 @@
<div class="down-arrow"></div>
<div class="cont">
<div class="ipt-date">
<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>
<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>
</div>
</div>
</div>
......
......@@ -292,6 +292,9 @@ export default {
// 回调函数返回base64的值
callback(base64);
}
},
datePickCompleteHandler(){
}
},
watch: {
......
......@@ -74,6 +74,11 @@ export default {
return {};
}
},
// 选择完日后触发
datePickComplete: {
type: Function,
default: null
},
},
data() {
return {
......@@ -272,6 +277,9 @@ export default {
// this.dateValue = `${year}-${month}-${date}`;
this.formatDateValue(year, month, date);
this.showCalendar();
if(this.datePickComplete){
this.datePickComplete();
}
},
// 选择月份
selectMonth(item) {
......