Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
pingan-life-index-pro
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
21372ce7
authored
2020-06-01 12:40:38 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
#69 #68 #67
1 parent
2a20b3a8
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
74 additions
and
20 deletions
src/common/lang/en.js
src/common/lang/tc.js
src/common/lang/zh.js
src/components/date-picker/date-picker.js
src/components/date-picker/date-picker.vue
src/router.js
src/common/lang/en.js
View file @
21372ce
...
...
@@ -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"
,
...
...
src/common/lang/tc.js
View file @
21372ce
...
...
@@ -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
:
"每年"
,
...
...
src/common/lang/zh.js
View file @
21372ce
...
...
@@ -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
:
"每年"
,
...
...
src/components/date-picker/date-picker.js
View file @
21372ce
...
...
@@ -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
:
year
Page
*
10
+
index
,
year
:
year
,
// disable: index == 0 || index == 11,
// gray: index == 0 || index == 11,
// disable: index >= 10,
// gray: index >= 10,
disable
:
fals
e
,
disable
:
disabl
e
,
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
();
}
}
}
}
...
...
src/components/date-picker/date-picker.vue
View file @
21372ce
...
...
@@ -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>
...
...
src/router.js
View file @
21372ce
...
...
@@ -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
;
}
...
...
Please
register
or
sign in
to post a comment