ded81416 by simon

默认提交

1 parent f7ec6769
......@@ -124,13 +124,13 @@
</div>
<div class="value">
<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>
<clarms-upload class="mt20" :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>
<clarms-upload id="sc" ref="sc" class="mt20" :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>
<clarms-upload class="mt20" :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>
</div>
</div>
</template>
</div>
<hr v-if="data.amount > 0">
<hr 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>
......
export default {
data() {
return {
data() {
return {
}
},
components: {},
computed: {
},
methods: {
initData() {
}
},
components: {},
computed: {},
methods: {
initData() {
},
onOverLayHandler() {
this.$emit("close");
},
toContact() {
this.$router.push({
path: "/custom/service?q=m1"
});
}
},
mounted() {
},
onOverLayHandler() {
this.$emit("close");
},
toAccountInformation() {
this.$emit("close");
this.$root.eventBus.$emit('_evt_to_account_information');
},
toContact() {
this.$router.push({
path: "/custom/service?q=m1"
});
}
},
mounted() {
},
created() {
this.initData();
},
watch: {
},
},
created() {
this.initData();
},
watch: {},
}
......
......@@ -9,7 +9,7 @@
<img src="@/assets/images/clarms/suc.png">
</div>
<div class="message">
{{$t('clarms.step2.tip7')}}<span @click="onOverLayHandler">{{$t('clarms.step2.tip8')}}</span>
{{$t('clarms.step2.tip7')}}<span @click="toAccountInformation">{{$t('clarms.step2.tip8')}}</span>
</div>
</div>
</div>
......
import {
mapGetters,
mapActions,
mapState
mapGetters,
mapActions,
mapState
} from "vuex";
import api from '@/api/api'
import {
httpGet,
httpPost
httpGet,
httpPost
} from '@/api/fetch-api.js'
import ClarmsModalOne from '@/components/clarms/clarms-plugins-modal1.vue';
......@@ -25,126 +25,140 @@ import ClarmsMaterial from '@/components/clarms/clarms-plugins-material.vue';
// 有保单
export default {
data() {
return {
step: 0, // 1是表单;2是报案页面;3=信息不完整
showModal1: false,
showModal2: false,
agress: false,
reservationTypes: [],
cid: false,
// 可以理赔的客户信息
customerList: []
}
},
components: {
ClarmsVerifyForm,
ClarmsMaterial,
ClarmsModalOne,
ClarmsModalTwo
},
computed: {
...mapState({
userInfo: state => state.userInfo
}),
i18n() {
return this.$i18n.messages && this.$i18n.locale ? this.$i18n.messages[this.$i18n.locale] : {};
},
},
methods: {
initData() {
// this.step = 2;
// return;
if (this.userInfo && this.userInfo.name) {
this.loadCidIfLogin();
sessionStorage.removeItem("clarmsRequestCid")
} else {
let cid = sessionStorage.getItem("clarmsRequestCid");
if (cid) {
this.cid = cid;
this.checkCid();
} else {
this.step = 1;
}
}
},
loadCidIfLogin() {
let param = {
sid: this.userInfo.sid
};
httpPost({ url: api.getCidByLogin, sid: true, data: param }).then(res => {
if (res) {
this.cid = res;
this.checkCid();
} else {
this.step = 3;
}
}).catch(e => {
this.step = 1;
});
},
checkCid() {
let param = {
cid: this.cid
}
httpPost({ url: api.clarmsCustomerList, data: param }).then(res => {
sessionStorage.removeItem("clarmsRequestCid");
if (res) {
this.customerList = res.insuredInfoList;
this.step = 2;
}
// if (res && res.insuredInfoList && res.insuredInfoList.length > 0) {
// this.customerList = res.insuredInfoList;
// this.step = 2;
// } else {
// sessionStorage.removeItem("clarmsRequestCid");
// this.step = 1;
// }
}).catch(e => {
sessionStorage.removeItem("clarmsRequestCid");
this.step = 1;
});
},
handleInsuredInfo(data) {
this.cid = data.cid;
this.customerList = data.list;
this.step = 2;
},
handleShowModal(modalIndex) {
console.log(modalIndex);
if (modalIndex == 1) {
this.showModal1 = true;
} else if (modalIndex == 2) {
this.showModal2 = true;
}
},
gotoInformationPage() {
let c = this.$route.fullPath;
this.$router.push({ path: "/infomation/improve", query: { c: c, a: 1 } });
},
logoutAction() {
this.sid = false;
this.hadQueryCustomerList = false;
this.customerList = [];
this.step = 1;
},
loginAction() {
this.sid = false;
this.hadQueryCustomerList = false;
this.customerList = [];
}
},
watch: {
userInfo(val) {
if (val && val.name) {
this.loginAction();
} else {
this.logoutAction();
}
}
},
mounted() {
this.initData();
},
created() { }
data() {
return {
step: 0, // 1是表单;2是报案页面;3=信息不完整
showModal1: false,
showModal2: false,
agress: false,
reservationTypes: [],
cid: "",
// 可以理赔的客户信息
customerList: []
}
},
components: {
ClarmsVerifyForm,
ClarmsMaterial,
ClarmsModalOne,
ClarmsModalTwo
},
computed: {
...mapState({
userInfo: state => state.userInfo
}),
i18n() {
return this.$i18n.messages && this.$i18n.locale ? this.$i18n.messages[this.$i18n.locale] : {};
},
},
methods: {
initData() {
// this.step = 2;
// return;
if (this.userInfo && this.userInfo.name) {
this.loadCidIfLogin();
sessionStorage.removeItem("clarmsRequestCid")
} else {
let cid = sessionStorage.getItem("clarmsRequestCid");
if (cid) {
this.cid = cid;
this.checkCid();
} else {
this.step = 1;
}
}
},
loadCidIfLogin() {
let param = {
sid: this.userInfo.sid
};
httpPost({
url: api.getCidByLogin,
sid: true,
data: param
}).then(res => {
if (res) {
this.cid = res;
this.checkCid();
} else {
this.step = 3;
}
}).catch(e => {
this.step = 1;
});
},
checkCid() {
let param = {
cid: this.cid
}
httpPost({
url: api.clarmsCustomerList,
data: param
}).then(res => {
sessionStorage.removeItem("clarmsRequestCid");
if (res) {
this.customerList = res.insuredInfoList;
this.step = 2;
}
// if (res && res.insuredInfoList && res.insuredInfoList.length > 0) {
// this.customerList = res.insuredInfoList;
// this.step = 2;
// } else {
// sessionStorage.removeItem("clarmsRequestCid");
// this.step = 1;
// }
}).catch(e => {
sessionStorage.removeItem("clarmsRequestCid");
this.step = 1;
});
},
handleInsuredInfo(data) {
this.cid = data.cid;
this.customerList = data.list;
this.step = 2;
},
handleShowModal(modalIndex) {
console.log(modalIndex);
if (modalIndex == 1) {
this.showModal1 = true;
} else if (modalIndex == 2) {
this.showModal2 = true;
}
},
gotoInformationPage() {
let c = this.$route.fullPath;
this.$router.push({
path: "/infomation/improve",
query: {
c: c,
a: 1
}
});
},
logoutAction() {
this.sid = false;
this.hadQueryCustomerList = false;
this.customerList = [];
this.step = 1;
},
loginAction() {
this.sid = false;
this.hadQueryCustomerList = false;
this.customerList = [];
}
},
watch: {
userInfo(val) {
if (val && val.name) {
this.loginAction();
} else {
this.logoutAction();
}
}
},
mounted() {
this.initData();
},
created() {}
}
......