21372ce7 by simon

#69 #68 #67

1 parent 2a20b3a8
......@@ -81,7 +81,7 @@ module.exports = {
path: "/vhis/detail"
},
{
name: "GenRich",
name: "Par Whole Life",
path: "/gen/rich"
}
]
......@@ -185,7 +185,7 @@ module.exports = {
ourProducts:"Our Products",
VHIS:"VHIS",
Insurance:"Insurance with Investment Focus",
Insurance:"Par Whole Life",
hkPhone: "Hong Kong Phone No.",
cnPhone: "Mainland Phone No.",
......@@ -425,7 +425,7 @@ module.exports = {
PaymentPeriod:"Payment period",
PaymentOptions:"Payment options",
quotePerMonth:"Monthly Premium",
tips:"Please contact your financial consultant to quote for insured amount that exceeds USD 3 million",
tips:"Please contact customer service for insured amount exceeds 3 million.",
years:"years",
Yearly:"Yearly",
......
......@@ -82,7 +82,7 @@ module.exports = {
path: "/vhis/detail"
},
{
name: "平安·傳家福",
name: "分紅終身壽險計劃",
path: "/gen/rich"
}
]
......@@ -187,7 +187,7 @@ module.exports = {
ourProducts:"產品介紹",
VHIS:"自願醫保",
Insurance:"投資成份保險",
Insurance:"分紅終身壽險計劃",
hkPhone: "香港號碼",
cnPhone: "內地號碼",
......@@ -438,7 +438,7 @@ module.exports = {
PaymentPeriod:"繳費期",
PaymentOptions:"繳費選項",
quotePerMonth:"每月保費",
tips:"保額超過300萬以上,請聯系您的理財顧問索取報價",
tips:"保額超過300萬以上,請聯絡客戶服務",
years:"年",
Yearly:"每年",
......
......@@ -82,7 +82,7 @@ module.exports = {
path: "/vhis/detail"
},
{
name: "平安·传家福",
name: "分红终身寿险计划",
path: "/gen/rich"
}
]
......@@ -187,7 +187,7 @@ module.exports = {
ourProducts:"产品介绍",
VHIS:"自愿医保",
Insurance:"投资成份保险",
Insurance:"分红终身寿险计划",
hkPhone: "香港号码",
cnPhone: "内地号码",
......@@ -441,7 +441,7 @@ module.exports = {
PaymentPeriod:"缴费期",
PaymentOptions:"缴费选项",
quotePerMonth:"每月保费",
tips:"保额超过300万以上,请联系您的理财顾问索取报价",
tips:"保额超过300万以上,请联络客户服务",
years:"年",
Yearly:"每年",
......
......@@ -13,7 +13,7 @@ import {
export default {
inheritAttrs: false,
inheritAttrs: false,
props: {
value: {
type: String,
......@@ -97,8 +97,9 @@ export default {
month: 1, // (1~12)
date: 1, // (1~31)
day: 0, // (0~6)
monthList: [], // 月份列表
yearPage: 1,
yearList: [],
yearList: [], // 年份列表
yearRange: "", // 年份范围
// 用户渲染的数据
fortmatMonthData: [],
......@@ -652,7 +653,7 @@ export default {
selectMonth(item) {
if (!item) return;
this.dateType = 1;
this.month = item;
this.month = item.month;
this.formatDate();
let {
year,
......@@ -678,19 +679,64 @@ export default {
this.formatDateValue(year, month, date);
},
// 计算year渲染列表 主要是可选不可选
refreshMonthList() {
let monthList = [];
let nowDate = new Date();
let year = this.year;
for (let index = 0; index < 12; index++) {
let disable = false;
// 历史不可选
if (this.filtModel.indexOf("history") >= 0) {
disable = nowDate.getFullYear() > year;
if (nowDate.getFullYear() == year) {
disable = nowDate.getMonth() > index;
}
}
// 未来不可选
if (this.filtModel.indexOf("future") >= 0) {
disable = nowDate.getFullYear() < year;
if (nowDate.getFullYear() == year) {
disable = nowDate.getMonth() < index;
}
}
monthList.push({
month: index + 1,
disable: disable
})
}
this.monthList = monthList;
},
// 计算year渲染列表
refreshYearList() {
let yearPage = this.yearPage;
if (yearPage <= 0) return;
let yearList = [];
let nowDate = new Date();
for (let index = 0; index < 12; index++) {
let year = yearPage * 10 + index;
let disable = false;
// 历史不可选
if (this.filtModel.indexOf("history") >= 0) {
disable = nowDate.getFullYear() > year;
}
// 未来不可选
if (this.filtModel.indexOf("future") >= 0) {
disable = nowDate.getFullYear() < year;
}
yearList.push({
year: yearPage * 10 + index,
year: year,
// disable: index == 0 || index == 11,
// gray: index == 0 || index == 11,
// disable: index >= 10,
// gray: index >= 10,
disable: false,
disable: disable,
gray: false,
});
}
......@@ -741,6 +787,7 @@ export default {
}
if (this.dateType == 2) {
this.prevYear();
this.refreshMonthList();
return;
}
if (this.dateType == 3) {
......@@ -756,6 +803,7 @@ export default {
}
if (this.dateType == 2) {
this.nextYear();
this.refreshMonthList();
return;
}
if (this.dateType == 3) {
......@@ -889,6 +937,12 @@ export default {
this.checkDateValue();
this.$emit('input', val);
},
year() {}
year() {},
dateType(val, oldVal) {
// 显示月份面板
if (val == 2) {
this.refreshMonthList();
}
}
}
}
......
......@@ -57,9 +57,9 @@
<!-- 月 -->
<div v-if="dateType == 2" class="con month">
<div class="tr">
<div class="td" v-for="(item,index) in 12" :key="index">
<div @click="selectMonth(item || '')" class="pointer point ">
{{getMonthByIndex(item)}}
<div class="td" v-for="(item,index) in monthList" :key="index">
<div @click="selectMonth(item.disable ? null : item)" class="pointer point" :class="{'disable':item.disable}">
{{getMonthByIndex(item.month)}}
</div>
</div>
</div>
......@@ -69,7 +69,7 @@
<div v-if="dateType == 3" class="con year">
<div class="tr">
<div class="td" v-for="(item,index) in yearList" :key="index">
<div @click="selectYear(item)" class="pointer point" :class="{'gray':item.disable}">
<div @click="selectYear(item.disable ? null : item)" class="pointer point " :class="{'disable':item.disable}" >
{{item.year}}
</div>
</div>
......
......@@ -317,7 +317,7 @@ router.beforeEach((to, from, next) => {
let langStr = localStorage.getItem("lang") || 'tc';
let lang;
// switch
let defaultTitle = "平安人寿香港";
let defaultTitle = "中国平安人寿(香港)";
switch (langStr) {
// 简体
case "zh":
......@@ -330,7 +330,7 @@ router.beforeEach((to, from, next) => {
break;
// 繁体
default:
defaultTitle = "平安人壽香港"
defaultTitle = "中國平安人壽(香港)"
lang = tc;
break;
}
......