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
ad334589
authored
2020-02-21 14:03:14 +0800
by
joe
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
63b0e3be
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
111 additions
and
48 deletions
src/components/clarms/clarms-plugins-material.js
src/components/clarms/clarms-plugins-material.vue
src/components/clarms/clarms-plugins-modal1.js
src/components/clarms/clarms-plugins-upload.js
src/components/date-picker/date-picker.js
src/pages/clarms/clarms.js
src/pages/clarms/clarms.vue
src/pages/custom-service/components/reservation.vue
src/components/clarms/clarms-plugins-material.js
View file @
ad33458
...
...
@@ -74,6 +74,8 @@ export default {
HT34Uploading
:
false
,
HT16Uploading
:
false
,
policyDateLegal
:
false
,
},
loading
:
false
,
contactDateError
:
false
,
...
...
@@ -135,7 +137,7 @@ export default {
return
true
;
}
return
false
;
}
}
,
},
methods
:
{
initData
()
{
...
...
@@ -156,7 +158,7 @@ export default {
if
(
typeSelectedStr
)
{
try
{
let
typeSelected
=
JSON
.
parse
(
typeSelectedStr
);
console
.
log
(
"typeSelected:"
,
typeSelected
);
//
console.log("typeSelected:", typeSelected);
this
.
$set
(
this
,
"typeSelected"
,
typeSelected
)
}
catch
(
e
)
{
...
...
@@ -169,21 +171,21 @@ export default {
sessionStorage
.
setItem
(
"clarmTypeSelect"
,
JSON
.
stringify
(
this
.
typeSelected
));
sessionStorage
.
setItem
(
"clarmDataForm"
,
JSON
.
stringify
(
this
.
data
));
this
.
$refs
[
'HT41'
].
cacheData
();
this
.
$refs
[
'HT26'
].
cacheData
();
this
.
$refs
[
'HT06'
].
cacheData
();
this
.
$refs
[
'HT34'
].
cacheData
();
this
.
$refs
[
'HT03'
].
cacheData
();
this
.
$refs
[
'HT41'
]
&&
this
.
$refs
[
'HT41'
]
.
cacheData
();
this
.
$refs
[
'HT26'
]
&&
this
.
$refs
[
'HT26'
]
.
cacheData
();
this
.
$refs
[
'HT06'
]
&&
this
.
$refs
[
'HT06'
]
.
cacheData
();
this
.
$refs
[
'HT34'
]
&&
this
.
$refs
[
'HT34'
]
.
cacheData
();
this
.
$refs
[
'HT03'
]
&&
this
.
$refs
[
'HT03'
]
.
cacheData
();
},
clearCache
()
{
sessionStorage
.
removeItem
(
"clarmTypeSelect"
);
sessionStorage
.
removeItem
(
"clarmDataForm"
);
this
.
$refs
[
'HT41'
].
clearCache
();
this
.
$refs
[
'HT26'
].
clearCache
();
this
.
$refs
[
'HT06'
].
clearCache
();
this
.
$refs
[
'HT34'
].
clearCache
();
this
.
$refs
[
'HT03'
].
clearCache
();
this
.
$refs
[
'HT41'
]
&&
this
.
$refs
[
'HT41'
]
.
clearCache
();
this
.
$refs
[
'HT26'
]
&&
this
.
$refs
[
'HT26'
]
.
clearCache
();
this
.
$refs
[
'HT06'
]
&&
this
.
$refs
[
'HT06'
]
.
clearCache
();
this
.
$refs
[
'HT34'
]
&&
this
.
$refs
[
'HT34'
]
.
clearCache
();
this
.
$refs
[
'HT03'
]
&&
this
.
$refs
[
'HT03'
]
.
clearCache
();
},
typeClickHandle
(
t
)
{
let
index
=
this
.
typeSelected
.
indexOf
(
t
);
...
...
@@ -203,7 +205,7 @@ export default {
}
},
uploadSuccess
(
data
)
{
// console.log(
data);
console
.
log
(
"uploadSuccess === "
,
data
);
switch
(
data
.
type
)
{
case
"HT41"
:
this
.
data
.
HT41Uploading
=
false
;
...
...
@@ -334,10 +336,42 @@ export default {
this
.
$emit
(
"showModal"
,
{
action
:
1
,
type
:
2
});
return
false
;
},
datePickCompleteHandler
()
{
checkPolicyDateLegal
()
{
// 校验日期是否合法
if
(
this
.
contactDateError
)
{
return
false
;
}
if
(
!
this
.
data
.
contactDate
||
!
this
.
data
.
insuredIndex
)
{
return
false
;
}
let
insured
=
this
.
insuredList
[
this
.
data
.
insuredIndex
-
1
];
if
(
!
insured
.
policyInfoList
||
insured
.
policyInfoList
.
length
<=
0
)
{
return
false
;
}
var
time
=
new
Date
(
ddMMyyyy2yyyyMMdd
(
this
.
data
.
contactDate
).
replace
(
/
\-
/g
,
"/"
)
+
" 00:00:00"
).
getTime
();
for
(
let
index
=
0
;
index
<
insured
.
policyInfoList
.
length
;
index
++
)
{
let
policy
=
insured
.
policyInfoList
[
index
];
// 有效期为生效日至满期日+60天
if
(
policy
.
activeDate
<=
time
&&
policy
.
expireDate
+
60
*
24
*
60
*
60
*
1000
>=
time
)
{
return
true
;
}
}
// 2标记为时间
return
false
;
},
pluginActivityHandler
(
data
)
{
if
(
data
.
type
==
"close"
)
{
// this.data.policyDateLegal = ;
this
.
$set
(
this
.
data
,
'policyDateLegal'
,
this
.
checkPolicyDateLegal
());
if
(
this
.
data
.
policyDateLegal
)
{
this
.
policyIllegal
=
false
;
}
else
{
this
.
policyIllegal
=
true
;
this
.
$emit
(
"showModal"
,
{
action
:
1
,
type
:
2
});
}
}
},
insuredChange
(){
insuredChange
()
{
this
.
typeSelected
=
[];
let
d
=
{
insuredIndex
:
this
.
data
.
insuredIndex
,
...
...
@@ -362,13 +396,13 @@ export default {
}
},
watch
:
{
"data.contactDate"
:
function
()
{
if
(
this
.
checkPolicy
())
{
this
.
policyIllegal
=
false
;
}
else
{
this
.
policyIllegal
=
true
;
}
},
//
"data.contactDate": function () {
//
if (this.checkPolicy()) {
//
this.policyIllegal = false;
//
} else {
//
this.policyIllegal = true;
//
}
//
},
'agree'
:
function
()
{
this
.
showTips
=
false
;
}
...
...
src/components/clarms/clarms-plugins-material.vue
View file @
ad33458
...
...
@@ -103,14 +103,14 @@
<div
class=
"down-arrow"
></div>
<div
class=
"cont"
>
<div
class=
"ipt-date"
>
<date-picker
v-model=
"data.contactDate"
:
datePickComplete=
"datePickComplete
Handler"
:formatter=
"'dd-MM-yyyy'"
:filtModel=
"['future']"
:check=
"checkDate"
:readonly=
"true"
:cusStyle=
"{border:'none !important','background-color':'transparent !important','height':'58px', 'color':'#ff6839','font-weight':'bold','text-align': 'center'}"
></date-picker>
<date-picker
v-model=
"data.contactDate"
:
pluginActivity=
"pluginActivity
Handler"
:formatter=
"'dd-MM-yyyy'"
:filtModel=
"['future']"
:check=
"checkDate"
:readonly=
"true"
:cusStyle=
"{border:'none !important','background-color':'transparent !important','height':'58px', 'color':'#ff6839','font-weight':'bold','text-align': 'center'}"
></date-picker>
</div>
</div>
</div>
</div>
</div>
<
template
v-if=
"data.contactDate"
>
<
template
v-if=
"data.contactDate
&& data.policyDateLegal
"
>
<div
class=
"pure-u-1 form-item-2 form-item-3 mt20"
>
<div
class=
"label"
>
<div
class=
"main-label"
>
...
...
@@ -137,7 +137,7 @@
</div>
</
template
>
</div>
<
template
v-if=
"data.contactDate"
>
<
template
v-if=
"data.contactDate
&& data.policyDateLegal
"
>
<!--
<template
v-if=
"1>0"
>
-->
<hr
class=
"hr2"
v-if=
"data.amount > 0"
>
<div
class=
"bottom-tip orange mt20"
>
{{
$t
(
'clarms.step2.label17'
)
}}
</div>
...
...
src/components/clarms/clarms-plugins-modal1.js
View file @
ad33458
...
...
@@ -6,8 +6,8 @@ export default {
// 是否显示组件
// 1、顯示事故類型;2、顯示時間
type
:
{
type
:
String
,
default
:
"2"
type
:
Number
,
default
:
2
},
},
data
()
{
...
...
@@ -29,6 +29,7 @@ export default {
this
.
$emit
(
"close"
);
},
toContact
()
{
this
.
$emit
(
"toContact"
);
this
.
$router
.
push
({
path
:
"/custom/service?q=m1"
});
...
...
src/components/clarms/clarms-plugins-upload.js
View file @
ad33458
...
...
@@ -102,7 +102,7 @@ export default {
sessionStorage
.
removeItem
(
key
);
}
}
this
.
uploadFiles
=
0
;
this
.
uploadFiles
=
0
;
this
.
images
=
[];
},
selectMutilFile
()
{
...
...
@@ -226,7 +226,11 @@ export default {
},
emitResult
()
{
if
(
this
.
images
.
length
==
0
)
{
this
.
$emit
(
"success"
,
[]);
let
result
=
{
type
:
this
.
options
.
imageTypeID
,
list
:
[]
};
this
.
$emit
(
"success"
,
result
);
return
;
}
if
(
this
.
uploading
)
{
...
...
@@ -288,12 +292,12 @@ export default {
ctx
.
drawImage
(
that
,
0
,
0
,
w
,
h
);
// quality值越小,所绘制出的图像越模糊
var
base64
=
canvas
.
toDataURL
(
'image/*'
,
quality
);
console
.
log
(
base64
.
length
);
//
console.log(base64.length);
// 回调函数返回base64的值
callback
(
base64
);
}
},
datePickCompleteHandler
(){
datePickCompleteHandler
()
{
}
},
...
...
src/components/date-picker/date-picker.js
View file @
ad33458
...
...
@@ -32,16 +32,17 @@ export default {
// future : 未来不可选择
// weekend : 周末不可选择
// today : 当日不可选择
// holiday : 节假日不可选择
filtModel
:
{
type
:
Array
,
default
()
{
default
()
{
return
[
"history"
,
"weekend"
,
"today"
]
}
},
// 需要过滤的日期列表 格式 ["yyyy-MM-dd","yyyy-MM-dd"]
filterDates
:
{
type
:
Array
,
default
()
{
default
()
{
return
[]
// ["2019-11-26", "2019-11-28"]
}
},
...
...
@@ -70,7 +71,7 @@ export default {
},
cusStyle
:
{
type
:
Object
,
default
()
{
default
()
{
return
{};
}
},
...
...
@@ -79,6 +80,11 @@ export default {
type
:
Function
,
default
:
null
},
// 打开或关闭插件
pluginActivity
:
{
type
:
Function
,
default
:
null
}
},
data
()
{
return
{
...
...
@@ -176,7 +182,11 @@ export default {
let
date
=
index
+
1
;
let
buildDate
=
Date
.
parse
(
`
${
year
}
.
${
month
}
.
${
date
}
`
);
if
(
buildDate
)
{
let
nowDate
=
new
Date
();
let
now
=
new
Date
();
let
y
=
now
.
getFullYear
();
let
m
=
now
.
getMonth
()
+
1
;
let
d
=
now
.
getDate
();
let
nowDate
=
Date
.
parse
(
`
${
y
}
.
${
m
}
.
${
d
}
`
);
let
day
=
buildDate
.
getDay
();
let
isWeekend
=
day
==
0
||
day
==
6
;
let
disable
=
false
;
// 判断是否不可选
...
...
@@ -184,18 +194,17 @@ export default {
disable
=
isWeekend
;
}
if
(
!
disable
&&
this
.
filtModel
.
indexOf
(
"future"
)
>=
0
)
{
buildDate
.
setHours
(
23
,
59
,
59
,
999
);
//
buildDate.setHours(23, 59, 59, 999);
disable
=
buildDate
.
getTime
()
>
nowDate
.
getTime
()
}
if
(
!
disable
&&
this
.
filtModel
.
indexOf
(
"history"
)
>=
0
)
{
buildDate
.
setHours
(
0
,
0
,
0
,
0
);
disable
=
buildDate
.
getTime
()
<
nowDate
.
getTime
()
}
if
(
!
disable
&&
this
.
filtModel
.
indexOf
(
"today"
)
>=
0
)
{
buildDate
.
setHours
(
0
,
0
,
0
,
0
);
nowDate
.
setHours
(
0
,
0
,
0
,
0
);
disable
=
buildDate
.
getTime
()
==
nowDate
.
getTime
();
}
if
(
!
disable
&&
this
.
filtModel
.
indexOf
(
"history"
)
>=
0
)
{
buildDate
.
setHours
(
23
,
59
,
59
,
999
);
disable
=
buildDate
.
getTime
()
<
nowDate
.
getTime
()
}
// disable = isWeekend && !this.weekend; // 判断周末不可选
let
filterDates
=
this
.
filterDates
;
filterDates
.
forEach
(
element
=>
{
...
...
@@ -277,7 +286,7 @@ export default {
// this.dateValue = `${year}-${month}-${date}`;
this
.
formatDateValue
(
year
,
month
,
date
);
this
.
showCalendar
();
if
(
this
.
datePickComplete
)
{
if
(
this
.
datePickComplete
)
{
this
.
datePickComplete
();
}
},
...
...
@@ -336,6 +345,14 @@ export default {
let
yearPage
=
Math
.
floor
(
year
/
10
);
this
.
yearPage
=
yearPage
;
this
.
refreshYearList
();
if
(
this
.
pluginActivity
)
{
let
_this
=
this
;
let
type
=
boo
?
"show"
:
"close"
;
setTimeout
(
function
()
{
_this
.
pluginActivity
({
type
:
type
});
},
100
);
}
},
getMonthByIndex
(
index
)
{
let
monthList
=
this
.
getMonthList
;
...
...
@@ -460,7 +477,7 @@ export default {
this
.
month
=
curDate
.
getMonth
()
+
1
;
this
.
date
=
curDate
.
getDate
();
isInit
=
true
;
}
catch
(
error
)
{}
}
catch
(
error
)
{
}
}
if
(
!
isInit
)
{
let
today
=
Date
.
today
();
...
...
@@ -495,7 +512,7 @@ export default {
}
},
mounted
()
{},
mounted
()
{
},
created
()
{
this
.
initData
();
},
...
...
src/pages/clarms/clarms.js
View file @
ad33458
...
...
@@ -148,13 +148,20 @@ export default {
}
});
},
cacheData
(){
let
m
=
this
.
$refs
[
"material"
];
// console.log("cacheData");
if
(
m
)
{
m
.
cacheData
();
}
},
logoutAction
()
{
this
.
sid
=
false
;
this
.
hadQueryCustomerList
=
false
;
this
.
customerList
=
[];
this
.
step
=
1
;
let
m
=
this
.
refs
[
"material"
];
let
m
=
this
.
$
refs
[
"material"
];
if
(
m
)
{
m
.
clearCache
();
}
...
...
src/pages/clarms/clarms.vue
View file @
ad33458
...
...
@@ -18,7 +18,7 @@
</div>
<div
class=
"content clarms"
v-else
>
<div
class=
"clarms-cont"
>
<clarms-modal-one
v-if=
"showModal1"
@
close=
"showModal1 = false"
:type=
"modelType"
></clarms-modal-one>
<clarms-modal-one
v-if=
"showModal1"
@
close=
"showModal1 = false"
:type=
"modelType"
@
toContact=
"cacheData"
></clarms-modal-one>
<clarms-modal-two
v-if=
"showModal2"
@
close=
"showModal2 = false"
></clarms-modal-two>
<div
class=
"mobile-margin"
>
...
...
src/pages/custom-service/components/reservation.vue
View file @
ad33458
...
...
@@ -84,7 +84,7 @@
</div>
<div
class=
"ipt-wrap"
:class=
"
{err:errorTips.e7.length>0}">
<!--
<input
class=
"ipt"
type=
"date"
v-model=
"data.contactDate"
:class=
"
{err : errorTips.e7.length > 0}"> -->
<date-picker
v-model=
"data.contactDate"
:check=
"checkDate"
></date-picker>
<date-picker
v-model=
"data.contactDate"
:check=
"checkDate"
:filtModel=
"['history']"
></date-picker>
</div>
<div
class=
"validator"
v-if=
"errorTips.e7.length > 0"
>
<img
src=
"@/assets/images/common/icon-notice.png"
alt=
""
>
{{
errorTips
.
e7
}}
...
...
Please
register
or
sign in
to post a comment