04eb4382 by joe

1

1 parent e71323b4
...@@ -64,6 +64,12 @@ module.exports = { ...@@ -64,6 +64,12 @@ module.exports = {
64 downloadPolicy : "/pingan_hklife_webapi/policy/d", 64 downloadPolicy : "/pingan_hklife_webapi/policy/d",
65 // 上传电子文档 65 // 上传电子文档
66 uploadClarmsImage : "/pingan_hklife_webapi/policy/clarmsUpload", 66 uploadClarmsImage : "/pingan_hklife_webapi/policy/clarmsUpload",
67 // 如果是登录用户,直接从库中获取cid
68 getCidByLogin : "/pingan_hklife_webapi/policy/getCidByLogin",
69 // 校验方式获取cid
70 getCidByVerify : "/pingan_hklife_webapi/policy/getCidByVerify",
71 // 客户信息
72 clarmsCustomerList : "/pingan_hklife_webapi/policy/clarmsCustomerList",
67 73
68 74
69 // cms相关 75 // cms相关
......
...@@ -809,27 +809,27 @@ module.exports = { ...@@ -809,27 +809,27 @@ module.exports = {
809 }, 809 },
810 810
811 vhis: { 811 vhis: {
812 title: "Policy confirmation", 812 title: "Confirmation of policy receipt(to be confirmed by Policy Owner)",
813 desc1: "Thank you for purchasing Ping An Life insurance products.", 813 desc1: "Thank you for choosing Ping An Life (HK). ",
814 desc2: "The policy is covered and enclosed for your reference and preservation.", 814 desc2: "The policy is underwritten and enclosed here for your reference and record. ",
815 desc3: "The policy is an important file. Please check the accuracy of the content immediately,", 815 desc3: "This is an important document, we recommend you to check the accuracy immediately.",
816 desc4: "If you have any missing files or wrong information, please call the customer service hotline.", 816 desc4: "Should there be any missing documents or incorrect information, please contact our customer hotline.",
817 desc5: "Please sign and issue a confirmation receipt for our records.", 817 desc5: "Please confirm your receipt of the policy by clicking the confirm button below.",
818 label1: "Policy number", 818 label1: "Policy no.",
819 label2: "Product name", 819 label2: "Product name",
820 label3: "effective date", 820 label3: "Effective date",
821 label4: "Policyholder", 821 label4: "Policy Owner",
822 label5: "Insured", 822 label5: "Insured",
823 btn1: "Download e-policy", 823 btn1: "E-policy",
824 btn2: "Confirm immediately", 824 btn2: "Confirm Now",
825 btn3: "Confirm later", 825 btn3: "Confirm later",
826 ymd1: "/", 826 ymd1: "/",
827 ymd2: "/", 827 ymd2: "/",
828 ymd3: "", 828 ymd3: "",
829 tip1: "I", 829 tip1: "I",
830 tip2: "hereby confirmed that", 830 tip2: "confirm the receipt of the above policy on",
831 tip3: "collection of the above policies", 831 tip3: "",
832 tip4: "I would like to contact customer service" 832 tip4: "contact customer service hotline"
833 }, 833 },
834 clarms: { 834 clarms: {
835 step1: { 835 step1: {
......
...@@ -8,11 +8,23 @@ import { ...@@ -8,11 +8,23 @@ import {
8 import DatePicker from '@/components/date-picker/date-picker.vue'; 8 import DatePicker from '@/components/date-picker/date-picker.vue';
9 import ClarmsUpload from './clarms-plugins-upload.vue'; 9 import ClarmsUpload from './clarms-plugins-upload.vue';
10 import Vue from 'vue'; 10 import Vue from 'vue';
11 import { Loading } from 'vant'; 11 import { Loading, List } from 'vant';
12 import { Select, Option } from 'element-ui';
13
12 Vue.use(Loading); 14 Vue.use(Loading);
15 Vue.use(Select);
16 Vue.use(Option);
13 17
14 export default { 18 export default {
15 19 props: {
20 // 是否显示组件
21 insuredList: {
22 type: Array,
23 default() {
24 return []
25 }
26 }
27 },
16 data() { 28 data() {
17 return { 29 return {
18 uploadFiles: 0, 30 uploadFiles: 0,
...@@ -22,10 +34,9 @@ export default { ...@@ -22,10 +34,9 @@ export default {
22 agress: false, 34 agress: false,
23 data: { 35 data: {
24 contactDate: "", 36 contactDate: "",
25 insured : {} 37 insured: {}
26 }, 38 },
27 insuredList : [{name : "张三疯"}], 39 contactDateError: false
28 contactDateError : false
29 } 40 }
30 }, 41 },
31 components: { 42 components: {
...@@ -39,7 +50,7 @@ export default { ...@@ -39,7 +50,7 @@ export default {
39 }, 50 },
40 methods: { 51 methods: {
41 initData() { 52 initData() {
42 53 console.log("this.insuredList = " , this.insuredList);
43 }, 54 },
44 typeClickHandle(t) { 55 typeClickHandle(t) {
45 let index = this.typeSelected.indexOf(t); 56 let index = this.typeSelected.indexOf(t);
...@@ -49,14 +60,14 @@ export default { ...@@ -49,14 +60,14 @@ export default {
49 this.typeSelected.push(t); 60 this.typeSelected.push(t);
50 } 61 }
51 }, 62 },
52 uploadSuccess(data){ 63 uploadSuccess(data) {
53 console.log(data); 64 console.log(data);
54 }, 65 },
55 checkDate(data) { 66 checkDate(data) {
56 this.contactDateError = data.disable; 67 this.contactDateError = data.disable;
57 if (this.contactDateError) { 68 if (this.contactDateError) {
58 69
59 } 70 }
60 }, 71 },
61 toContact() { 72 toContact() {
62 this.$router.push({ 73 this.$router.push({
......
1 @import '@/styles/_support'; 1 @import '@/styles/_support';
2 2
3
3 input { 4 input {
4 padding: 0 2.083333rem; 5 padding: 0 2.083333rem;
5 color: #333333; 6 color: #333333;
...@@ -34,18 +35,24 @@ input { ...@@ -34,18 +35,24 @@ input {
34 background-color: #ffffff; 35 background-color: #ffffff;
35 padding: 1.666667rem 10rem 2.833333rem 10rem; 36 padding: 1.666667rem 10rem 2.833333rem 10rem;
36 37
38 .clarms-border{
39 box-sizing:border-box;
40 padding:.166667rem;
41 border-radius: .416667rem;
42 background-image: linear-gradient(to right , #ffb31d, #f15907) ;
43 }
44
37 .title { 45 .title {
38 font-size: 1.333333rem; 46 font-size: 1.333333rem;
39 color: $cOrange; 47 color: $cOrange;
40 text-align: center; 48 text-align: center;
41 margin: 1.666667rem auto 0 auto; 49 margin: 1.666667rem auto 0 auto;
42 50 display: flex;
43 select { 51 align-items: center;
44 padding: 0 1.25rem ; 52 justify-content: center;
45 border: none; 53 font-weight: 600;
46 border-bottom: .083333rem solid #666666; 54 letter-spacing: .25rem ;
47 color: #666666; 55 font-size: 1.5rem;
48 }
49 } 56 }
50 57
51 .default-mt { 58 .default-mt {
...@@ -300,7 +307,8 @@ input { ...@@ -300,7 +307,8 @@ input {
300 letter-spacing: .25rem; 307 letter-spacing: .25rem;
301 308
302 .main-label { 309 .main-label {
303 color: $cOrange; 310 font-size: 1.5rem ;
311 color: $cOrange;
304 } 312 }
305 } 313 }
306 314
......
...@@ -3,10 +3,12 @@ ...@@ -3,10 +3,12 @@
3 <div class="reservation-container-2"> 3 <div class="reservation-container-2">
4 <div class="title default-mt"> 4 <div class="title default-mt">
5 <span>{{$t('clarms.step2.label1')}}</span> 5 <span>{{$t('clarms.step2.label1')}}</span>
6 <el-select v-model="data.insured"> 6 <div class="clarms-border">
7 <el-option v-for="(item,index) in insuredList" :key="index" :label="item.name" :value="item.name"> 7 <el-select v-model="data.insured">
8 </el-option> 8 <el-option v-for="(item,index) in insuredList" :key="index" :label="item.insuredNameCn" :value="item.insuredNameCn">
9 </el-select> 9 </el-option>
10 </el-select>
11 </div>
10 <span>{{$t('clarms.step2.label2')}}</span> 12 <span>{{$t('clarms.step2.label2')}}</span>
11 </div> 13 </div>
12 <hr> 14 <hr>
......
...@@ -21,8 +21,6 @@ export default { ...@@ -21,8 +21,6 @@ export default {
21 name: "", 21 name: "",
22 // 图标编号 22 // 图标编号
23 icon: "", 23 icon: "",
24 // 影像名称
25 imageFileName: "",
26 // 主单证类型 24 // 主单证类型
27 imageMainTypeID: "", 25 imageMainTypeID: "",
28 // 副单证类型 26 // 副单证类型
...@@ -93,6 +91,7 @@ export default { ...@@ -93,6 +91,7 @@ export default {
93 var reader = new FileReader(); 91 var reader = new FileReader();
94 reader.onload = function (e) { 92 reader.onload = function (e) {
95 let d = { 93 let d = {
94 fileName: "",
96 file: file, 95 file: file,
97 data: reader.result, 96 data: reader.result,
98 cacheKey: "", 97 cacheKey: "",
...@@ -120,7 +119,8 @@ export default { ...@@ -120,7 +119,8 @@ export default {
120 key: item.key 119 key: item.key
121 } 120 }
122 formdata({ url: api.uploadClarmsImage, data: param }).then(res => { 121 formdata({ url: api.uploadClarmsImage, data: param }).then(res => {
123 item.cacheKey = res.content.id 122 item.fileName = res.content.fileName;
123 item.cacheKey = res.content.id;
124 clearInterval(item.intervial); 124 clearInterval(item.intervial);
125 item.intervial = false; 125 item.intervial = false;
126 this.$set(this, "images", this.images); 126 this.$set(this, "images", this.images);
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
40 } 40 }
41 41
42 .clarms-t1 { 42 .clarms-t1 {
43 font-size: 2rem; 43 font-size: 1.5rem ;
44 color: #f15907; 44 color: #f15907;
45 letter-spacing: .166667rem; 45 letter-spacing: .166667rem;
46 } 46 }
......
1 import {
2 mapGetters,
3 mapActions,
4 mapState
5 } from "vuex";
6
1 import api from '@/api/api' 7 import api from '@/api/api'
2 import { 8 import {
3 httpGet, 9 httpGet,
...@@ -19,12 +25,12 @@ import ClarmsMaterial from './clarms-plugins-material.vue'; ...@@ -19,12 +25,12 @@ import ClarmsMaterial from './clarms-plugins-material.vue';
19 export default { 25 export default {
20 data() { 26 data() {
21 return { 27 return {
22 step: 2, // 1是表单;2是报案页面 28 step: 0, // 1是表单;2是报案页面
23 agress: false, 29 agress: false,
24 data: { 30 reservationTypes: [],
25 contactDate: "" 31 cid: false,
26 }, 32 // 可以理赔的客户信息
27 reservationTypes: [] 33 customerList: []
28 } 34 }
29 }, 35 },
30 components: { 36 components: {
...@@ -32,17 +38,82 @@ export default { ...@@ -32,17 +38,82 @@ export default {
32 ClarmsMaterial 38 ClarmsMaterial
33 }, 39 },
34 computed: { 40 computed: {
41 ...mapState({
42 userInfo: state => state.userInfo
43 }),
35 i18n() { 44 i18n() {
36 return this.$i18n.messages && this.$i18n.locale ? this.$i18n.messages[this.$i18n.locale] : {}; 45 return this.$i18n.messages && this.$i18n.locale ? this.$i18n.messages[this.$i18n.locale] : {};
37 }, 46 },
38 }, 47 },
39 methods: { 48 methods: {
40 initData() { 49 initData() {
41 50 if (this.userInfo && this.userInfo.name) {
51 this.loadCidIfLogin();
52 sessionStorage.removeItem("clarmsRequestCid")
53 } else {
54 let cid = sessionStorage.getItem("clarmsRequestCid");
55 if (cid) {
56 this.cid = cid;
57 this.checkCid();
58 } else {
59 this.step = 1;
60 }
61 }
62 },
63 loadCidIfLogin() {
64 let param = {
65 sid: this.userInfo.sid
66 };
67 httpPost({ url: api.getCidByLogin, sid: true, data: param }).then(res => {
68 if (res) {
69 this.cid = res;
70 this.checkCid();
71 } else {
72 this.step = 1;
73 }
74 }).catch(e => {
75 this.step = 1;
76 });
77 },
78 checkCid() {
79 let param = {
80 cid: this.cid
81 }
82 httpPost({ url: api.clarmsCustomerList, data: param }).then(res => {
83 if (res && res.insuredInfoList && res.insuredInfoList.length > 0) {
84 this.customerList = res.insuredInfoList;
85 this.step = 2;
86 } else {
87 sessionStorage.removeItem("clarmsRequestCid");
88 this.step = 1;
89 }
90 }).catch(e => {
91 sessionStorage.removeItem("clarmsRequestCid");
92 this.step = 1;
93 });
42 }, 94 },
95 logoutAction() {
96 console.log("logoutAction");
97 this.sid = false;
98 this.hadQueryCustomerList = false;
99 this.customerList = [];
100 this.step = 1;
101 },
102 loginAction() {
103 console.log("loginAction");
104 this.sid = false;
105 this.hadQueryCustomerList = false;
106 this.customerList = [];
107 }
43 }, 108 },
44 watch: { 109 watch: {
45 110 userInfo(val) {
111 if (val && val.name) {
112 this.loginAction();
113 } else {
114 this.logoutAction();
115 }
116 }
46 }, 117 },
47 mounted() { 118 mounted() {
48 this.initData(); 119 this.initData();
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
3 <div class="mobile-margin"> 3 <div class="mobile-margin">
4 4
5 <template v-if="step == 1"> 5 <template v-if="step == 1">
6 <clarms-verify-form></clarms-verify-form> 6 <clarms-verify-form></clarms-verify-form>
7 </template> 7 </template>
8 8
9 <template v-if="step == 2"> 9 <template v-if="step == 2">
10 <clarms-material></clarms-material> 10 <clarms-material :insuredList="customerList"></clarms-material>
11 </template> 11 </template>
12 </div> 12 </div>
13 </template> 13 </template>
......