21372ce7 by simon

#69 #68 #67

1 parent 2a20b3a8
...@@ -81,7 +81,7 @@ module.exports = { ...@@ -81,7 +81,7 @@ module.exports = {
81 path: "/vhis/detail" 81 path: "/vhis/detail"
82 }, 82 },
83 { 83 {
84 name: "GenRich", 84 name: "Par Whole Life",
85 path: "/gen/rich" 85 path: "/gen/rich"
86 } 86 }
87 ] 87 ]
...@@ -185,7 +185,7 @@ module.exports = { ...@@ -185,7 +185,7 @@ module.exports = {
185 185
186 ourProducts:"Our Products", 186 ourProducts:"Our Products",
187 VHIS:"VHIS", 187 VHIS:"VHIS",
188 Insurance:"Insurance with Investment Focus", 188 Insurance:"Par Whole Life",
189 189
190 hkPhone: "Hong Kong Phone No.", 190 hkPhone: "Hong Kong Phone No.",
191 cnPhone: "Mainland Phone No.", 191 cnPhone: "Mainland Phone No.",
...@@ -425,7 +425,7 @@ module.exports = { ...@@ -425,7 +425,7 @@ module.exports = {
425 PaymentPeriod:"Payment period", 425 PaymentPeriod:"Payment period",
426 PaymentOptions:"Payment options", 426 PaymentOptions:"Payment options",
427 quotePerMonth:"Monthly Premium", 427 quotePerMonth:"Monthly Premium",
428 tips:"Please contact your financial consultant to quote for insured amount that exceeds USD 3 million", 428 tips:"Please contact customer service for insured amount exceeds 3 million.",
429 429
430 years:"years", 430 years:"years",
431 Yearly:"Yearly", 431 Yearly:"Yearly",
......
...@@ -82,7 +82,7 @@ module.exports = { ...@@ -82,7 +82,7 @@ module.exports = {
82 path: "/vhis/detail" 82 path: "/vhis/detail"
83 }, 83 },
84 { 84 {
85 name: "平安·傳家福", 85 name: "分紅終身壽險計劃",
86 path: "/gen/rich" 86 path: "/gen/rich"
87 } 87 }
88 ] 88 ]
...@@ -187,7 +187,7 @@ module.exports = { ...@@ -187,7 +187,7 @@ module.exports = {
187 187
188 ourProducts:"產品介紹", 188 ourProducts:"產品介紹",
189 VHIS:"自願醫保", 189 VHIS:"自願醫保",
190 Insurance:"投資成份保險", 190 Insurance:"分紅終身壽險計劃",
191 191
192 hkPhone: "香港號碼", 192 hkPhone: "香港號碼",
193 cnPhone: "內地號碼", 193 cnPhone: "內地號碼",
...@@ -438,7 +438,7 @@ module.exports = { ...@@ -438,7 +438,7 @@ module.exports = {
438 PaymentPeriod:"繳費期", 438 PaymentPeriod:"繳費期",
439 PaymentOptions:"繳費選項", 439 PaymentOptions:"繳費選項",
440 quotePerMonth:"每月保費", 440 quotePerMonth:"每月保費",
441 tips:"保額超過300萬以上,請聯系您的理財顧問索取報價", 441 tips:"保額超過300萬以上,請聯絡客戶服務",
442 442
443 years:"年", 443 years:"年",
444 Yearly:"每年", 444 Yearly:"每年",
......
...@@ -82,7 +82,7 @@ module.exports = { ...@@ -82,7 +82,7 @@ module.exports = {
82 path: "/vhis/detail" 82 path: "/vhis/detail"
83 }, 83 },
84 { 84 {
85 name: "平安·传家福", 85 name: "分红终身寿险计划",
86 path: "/gen/rich" 86 path: "/gen/rich"
87 } 87 }
88 ] 88 ]
...@@ -187,7 +187,7 @@ module.exports = { ...@@ -187,7 +187,7 @@ module.exports = {
187 187
188 ourProducts:"产品介绍", 188 ourProducts:"产品介绍",
189 VHIS:"自愿医保", 189 VHIS:"自愿医保",
190 Insurance:"投资成份保险", 190 Insurance:"分红终身寿险计划",
191 191
192 hkPhone: "香港号码", 192 hkPhone: "香港号码",
193 cnPhone: "内地号码", 193 cnPhone: "内地号码",
...@@ -441,7 +441,7 @@ module.exports = { ...@@ -441,7 +441,7 @@ module.exports = {
441 PaymentPeriod:"缴费期", 441 PaymentPeriod:"缴费期",
442 PaymentOptions:"缴费选项", 442 PaymentOptions:"缴费选项",
443 quotePerMonth:"每月保费", 443 quotePerMonth:"每月保费",
444 tips:"保额超过300万以上,请联系您的理财顾问索取报价", 444 tips:"保额超过300万以上,请联络客户服务",
445 445
446 years:"年", 446 years:"年",
447 Yearly:"每年", 447 Yearly:"每年",
......
...@@ -97,8 +97,9 @@ export default { ...@@ -97,8 +97,9 @@ export default {
97 month: 1, // (1~12) 97 month: 1, // (1~12)
98 date: 1, // (1~31) 98 date: 1, // (1~31)
99 day: 0, // (0~6) 99 day: 0, // (0~6)
100 monthList: [], // 月份列表
100 yearPage: 1, 101 yearPage: 1,
101 yearList: [], 102 yearList: [], // 年份列表
102 yearRange: "", // 年份范围 103 yearRange: "", // 年份范围
103 // 用户渲染的数据 104 // 用户渲染的数据
104 fortmatMonthData: [], 105 fortmatMonthData: [],
...@@ -652,7 +653,7 @@ export default { ...@@ -652,7 +653,7 @@ export default {
652 selectMonth(item) { 653 selectMonth(item) {
653 if (!item) return; 654 if (!item) return;
654 this.dateType = 1; 655 this.dateType = 1;
655 this.month = item; 656 this.month = item.month;
656 this.formatDate(); 657 this.formatDate();
657 let { 658 let {
658 year, 659 year,
...@@ -678,19 +679,64 @@ export default { ...@@ -678,19 +679,64 @@ export default {
678 this.formatDateValue(year, month, date); 679 this.formatDateValue(year, month, date);
679 }, 680 },
680 681
682 // 计算year渲染列表 主要是可选不可选
683 refreshMonthList() {
684 let monthList = [];
685 let nowDate = new Date();
686 let year = this.year;
687 for (let index = 0; index < 12; index++) {
688 let disable = false;
689
690 // 历史不可选
691 if (this.filtModel.indexOf("history") >= 0) {
692 disable = nowDate.getFullYear() > year;
693 if (nowDate.getFullYear() == year) {
694 disable = nowDate.getMonth() > index;
695 }
696 }
697 // 未来不可选
698 if (this.filtModel.indexOf("future") >= 0) {
699 disable = nowDate.getFullYear() < year;
700 if (nowDate.getFullYear() == year) {
701 disable = nowDate.getMonth() < index;
702 }
703 }
704
705 monthList.push({
706 month: index + 1,
707 disable: disable
708 })
709 }
710 this.monthList = monthList;
711 },
712
681 // 计算year渲染列表 713 // 计算year渲染列表
682 refreshYearList() { 714 refreshYearList() {
683 let yearPage = this.yearPage; 715 let yearPage = this.yearPage;
684 if (yearPage <= 0) return; 716 if (yearPage <= 0) return;
685 let yearList = []; 717 let yearList = [];
718 let nowDate = new Date();
719
686 for (let index = 0; index < 12; index++) { 720 for (let index = 0; index < 12; index++) {
721 let year = yearPage * 10 + index;
722 let disable = false;
723
724 // 历史不可选
725 if (this.filtModel.indexOf("history") >= 0) {
726 disable = nowDate.getFullYear() > year;
727 }
728 // 未来不可选
729 if (this.filtModel.indexOf("future") >= 0) {
730 disable = nowDate.getFullYear() < year;
731 }
732
687 yearList.push({ 733 yearList.push({
688 year: yearPage * 10 + index, 734 year: year,
689 // disable: index == 0 || index == 11, 735 // disable: index == 0 || index == 11,
690 // gray: index == 0 || index == 11, 736 // gray: index == 0 || index == 11,
691 // disable: index >= 10, 737 // disable: index >= 10,
692 // gray: index >= 10, 738 // gray: index >= 10,
693 disable: false, 739 disable: disable,
694 gray: false, 740 gray: false,
695 }); 741 });
696 } 742 }
...@@ -741,6 +787,7 @@ export default { ...@@ -741,6 +787,7 @@ export default {
741 } 787 }
742 if (this.dateType == 2) { 788 if (this.dateType == 2) {
743 this.prevYear(); 789 this.prevYear();
790 this.refreshMonthList();
744 return; 791 return;
745 } 792 }
746 if (this.dateType == 3) { 793 if (this.dateType == 3) {
...@@ -756,6 +803,7 @@ export default { ...@@ -756,6 +803,7 @@ export default {
756 } 803 }
757 if (this.dateType == 2) { 804 if (this.dateType == 2) {
758 this.nextYear(); 805 this.nextYear();
806 this.refreshMonthList();
759 return; 807 return;
760 } 808 }
761 if (this.dateType == 3) { 809 if (this.dateType == 3) {
...@@ -889,6 +937,12 @@ export default { ...@@ -889,6 +937,12 @@ export default {
889 this.checkDateValue(); 937 this.checkDateValue();
890 this.$emit('input', val); 938 this.$emit('input', val);
891 }, 939 },
892 year() {} 940 year() {},
941 dateType(val, oldVal) {
942 // 显示月份面板
943 if (val == 2) {
944 this.refreshMonthList();
945 }
946 }
893 } 947 }
894 } 948 }
......
...@@ -57,9 +57,9 @@ ...@@ -57,9 +57,9 @@
57 <!-- 月 --> 57 <!-- 月 -->
58 <div v-if="dateType == 2" class="con month"> 58 <div v-if="dateType == 2" class="con month">
59 <div class="tr"> 59 <div class="tr">
60 <div class="td" v-for="(item,index) in 12" :key="index"> 60 <div class="td" v-for="(item,index) in monthList" :key="index">
61 <div @click="selectMonth(item || '')" class="pointer point "> 61 <div @click="selectMonth(item.disable ? null : item)" class="pointer point" :class="{'disable':item.disable}">
62 {{getMonthByIndex(item)}} 62 {{getMonthByIndex(item.month)}}
63 </div> 63 </div>
64 </div> 64 </div>
65 </div> 65 </div>
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
69 <div v-if="dateType == 3" class="con year"> 69 <div v-if="dateType == 3" class="con year">
70 <div class="tr"> 70 <div class="tr">
71 <div class="td" v-for="(item,index) in yearList" :key="index"> 71 <div class="td" v-for="(item,index) in yearList" :key="index">
72 <div @click="selectYear(item)" class="pointer point" :class="{'gray':item.disable}"> 72 <div @click="selectYear(item.disable ? null : item)" class="pointer point " :class="{'disable':item.disable}" >
73 {{item.year}} 73 {{item.year}}
74 </div> 74 </div>
75 </div> 75 </div>
......
...@@ -317,7 +317,7 @@ router.beforeEach((to, from, next) => { ...@@ -317,7 +317,7 @@ router.beforeEach((to, from, next) => {
317 let langStr = localStorage.getItem("lang") || 'tc'; 317 let langStr = localStorage.getItem("lang") || 'tc';
318 let lang; 318 let lang;
319 // switch 319 // switch
320 let defaultTitle = "平安人寿香港"; 320 let defaultTitle = "中国平安人寿(香港)";
321 switch (langStr) { 321 switch (langStr) {
322 // 简体 322 // 简体
323 case "zh": 323 case "zh":
...@@ -330,7 +330,7 @@ router.beforeEach((to, from, next) => { ...@@ -330,7 +330,7 @@ router.beforeEach((to, from, next) => {
330 break; 330 break;
331 // 繁体 331 // 繁体
332 default: 332 default:
333 defaultTitle = "平安人壽香港" 333 defaultTitle = "中國平安人壽(香港)"
334 lang = tc; 334 lang = tc;
335 break; 335 break;
336 } 336 }
......