Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sfp-program
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sweet Zhang
sfp-program
Commits
6db8ed24
Commit
6db8ed24
authored
Sep 07, 2022
by
Chao Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量页面计算跳转页面
parent
07019ae9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
19 deletions
+85
-19
pages/dataImport/data-import.vue
+6
-3
pages/index/index.vue
+79
-16
No files found.
pages/dataImport/data-import.vue
View file @
6db8ed24
...
@@ -219,9 +219,12 @@
...
@@ -219,9 +219,12 @@
// this.resultShowFlag = true;
// this.resultShowFlag = true;
//计算成功返回上一页
//计算成功返回上一页
uni
.
setStorageSync
(
'resIrrAndSimpleResInfos'
,
this
.
irrAndSimpleResInfos
);
uni
.
setStorageSync
(
'resIrrAndSimpleResInfos'
,
this
.
irrAndSimpleResInfos
);
uni
.
navigateBack
({
// uni.navigateBack({
delta
:
1
,
//返回层数,2则上上页
// delta:1,//返回层数,2则上上页
})
// })
uni
.
navigateTo
({
url
:
'/pages/index/index?isBack=1'
});
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
[
'message'
],
title
:
res
[
'message'
],
...
...
pages/index/index.vue
View file @
6db8ed24
...
@@ -235,8 +235,18 @@
...
@@ -235,8 +235,18 @@
dataImport
dataImport
},
},
onLoad
()
{
onLoad
()
{
//初始化删除上次批量计算结果
if
(
dataHandling
.
getQueryString
(
'isBack'
)
==
1
){
uni
.
removeStorageSync
(
'resIrrAndSimpleResInfos'
);
console
.
log
(
dataHandling
.
getQueryString
(
'isBack'
));
this
.
irrAndSimpleCalcuteParam
.
paymentPeriod
=
uni
.
getStorageSync
(
'calcuteData'
).
paymentPeriod
;
this
.
irrAndSimpleCalcuteParam
.
annualPremium
=
uni
.
getStorageSync
(
'calcuteData'
).
annualPremium
;
this
.
irrAndSimpleCalcuteParam
.
allFirstPayment
=
uni
.
getStorageSync
(
'calcuteData'
).
allFirstPayment
;
this
.
businessType
=
uni
.
getStorageSync
(
'calcuteData'
).
businessType
;
this
.
calcuteType
=
uni
.
getStorageSync
(
'calcuteData'
).
calcuteType
;
this
.
yearWithdrawalInfos
=
uni
.
getStorageSync
(
'calcuteData'
).
yearWithdrawalInfos
;
}
else
{
//初始化删除上次批量计算结果
uni
.
removeStorageSync
(
'resIrrAndSimpleResInfos'
);
}
if
(
!
uni
.
getStorageSync
(
'businessNo'
)){
if
(
!
uni
.
getStorageSync
(
'businessNo'
)){
uni
.
setStorageSync
(
'businessNo'
,
nanoid
().
replace
(
/
\_
/g
,
""
));
uni
.
setStorageSync
(
'businessNo'
,
nanoid
().
replace
(
/
\_
/g
,
""
));
}
else
{
}
else
{
...
@@ -302,7 +312,7 @@
...
@@ -302,7 +312,7 @@
this
.
irrAndSimpleCalte
();
this
.
irrAndSimpleCalte
();
}
else
if
(
this
.
calcuteMethod
===
'2'
){
}
else
if
(
this
.
calcuteMethod
===
'2'
){
//批量
//批量
if
(
!
this
.
irrAndSimpleCalcuteParam
.
paymentPeriod
){
if
(
!
this
.
irrAndSimpleCalcuteParam
.
paymentPeriod
||
this
.
irrAndSimpleCalcuteParam
.
paymentPeriod
==
0
){
uni
.
showToast
({
uni
.
showToast
({
title
:
'请填写交费年限且交费年限必须大于0'
,
title
:
'请填写交费年限且交费年限必须大于0'
,
duration
:
2000
,
duration
:
2000
,
...
@@ -319,6 +329,58 @@
...
@@ -319,6 +329,58 @@
})
})
return
;
return
;
}
}
if
(
this
.
yearWithdrawalInfos
.
length
>
0
){
for
(
let
i
=
0
;
i
<
this
.
yearWithdrawalInfos
.
length
;
i
++
)
{
//增额提领信息校验
if
(
this
.
calcuteType
==
1
){
if
(
!
this
.
yearWithdrawalInfos
[
i
].
withdrawalStart
||
!
this
.
yearWithdrawalInfos
[
i
].
withdrawalEnd
){
uni
.
showToast
({
title
:
`请输入第
${
i
+
1
}
行提领开始日期和结束日期,且该日期必须大于0`
,
duration
:
2000
,
icon
:
'none'
})
return
;
}
else
{
if
(
this
.
yearWithdrawalInfos
[
i
].
withdrawalEnd
<
this
.
yearWithdrawalInfos
[
i
].
withdrawalStart
){
uni
.
showToast
({
title
:
`第
${
i
+
1
}
行,提领开始日期必须小于等于提领结束日期!`
,
duration
:
2000
,
icon
:
'none'
})
return
;
}
}
if
(
this
.
yearWithdrawalInfos
[
i
][
'yearWithdrawalAmount'
]
&&
this
.
yearWithdrawalInfos
[
i
][
'yearWithdrawalAmount'
]
<
0
){
uni
.
showToast
({
title
:
`第
${
i
+
1
}
行,提领金额必须大于0`
,
duration
:
2000
,
icon
:
'none'
})
return
;
}
else
{
if
(
!
this
.
yearWithdrawalInfos
[
i
][
'yearWithdrawalAmount'
]){
uni
.
showToast
({
title
:
`请输入第
${
i
+
1
}
行,提领金额`
,
duration
:
2000
,
icon
:
'none'
})
return
;
}
}
}
//年金提领信息校验
if
(
this
.
calcuteType
==
2
){
if
(
!
this
.
yearWithdrawalInfos
[
i
][
'withdrawalStart'
]
||
this
.
yearWithdrawalInfos
[
i
][
'withdrawalStart'
]
<
0
){
uni
.
showToast
({
title
:
'请输入提领信息保单年度,且年度值必须大于0'
,
duration
:
2000
,
icon
:
'none'
})
return
;
}
}
}
}
// 输入批量数据,缓存当页数据
// 输入批量数据,缓存当页数据
const
calcuteData
=
{
const
calcuteData
=
{
paymentPeriod
:
this
.
irrAndSimpleCalcuteParam
.
paymentPeriod
,
paymentPeriod
:
this
.
irrAndSimpleCalcuteParam
.
paymentPeriod
,
...
@@ -398,7 +460,7 @@
...
@@ -398,7 +460,7 @@
})
})
return
;
return
;
}
}
if
(
this
.
irrAndSimpleCalcuteParam
.
paymentPeriod
<
0
){
if
(
this
.
irrAndSimpleCalcuteParam
.
paymentPeriod
<
=
0
){
uni
.
showToast
({
uni
.
showToast
({
title
:
'交费年限必须大于0'
,
title
:
'交费年限必须大于0'
,
duration
:
2000
,
duration
:
2000
,
...
@@ -423,7 +485,7 @@
...
@@ -423,7 +485,7 @@
})
})
return
;
return
;
}
}
if
(
this
.
irrAndSimpleCalcuteParam
.
annualPremium
<
0
){
if
(
this
.
irrAndSimpleCalcuteParam
.
annualPremium
<
=
0
){
uni
.
showToast
({
uni
.
showToast
({
title
:
'年交保费必须大于0'
,
title
:
'年交保费必须大于0'
,
duration
:
2000
,
duration
:
2000
,
...
@@ -463,7 +525,7 @@
...
@@ -463,7 +525,7 @@
})
})
return
;
return
;
}
else
{
}
else
{
if
(
this
.
yearWithdrawalInfos
[
i
].
withdrawalEnd
>
this
.
yearWithdrawalInfos
[
i
].
withdrawalStart
){
if
(
this
.
yearWithdrawalInfos
[
i
].
withdrawalEnd
<
this
.
yearWithdrawalInfos
[
i
].
withdrawalStart
){
uni
.
showToast
({
uni
.
showToast
({
title
:
`第
${
i
+
1
}
行,提领开始日期必须小于等于提领结束日期!`
,
title
:
`第
${
i
+
1
}
行,提领开始日期必须小于等于提领结束日期!`
,
duration
:
2000
,
duration
:
2000
,
...
@@ -480,12 +542,14 @@
...
@@ -480,12 +542,14 @@
})
})
return
;
return
;
}
else
{
}
else
{
uni
.
showToast
({
if
(
!
this
.
yearWithdrawalInfos
[
i
][
'yearWithdrawalAmount'
]){
title
:
`请输入第
${
i
+
1
}
行,提领金额`
,
uni
.
showToast
({
duration
:
2000
,
title
:
`请输入第
${
i
+
1
}
行,提领金额`
,
icon
:
'none'
duration
:
2000
,
})
icon
:
'none'
return
;
})
return
;
}
}
}
}
}
//年金提领信息校验
//年金提领信息校验
...
@@ -500,7 +564,6 @@
...
@@ -500,7 +564,6 @@
}
}
}
}
}
}
}
}
if
(
this
.
calcuteMethod
==
1
){
if
(
this
.
calcuteMethod
==
1
){
if
(
!
this
.
irrAndSimple
.
nyear
&&
this
.
irrAndSimple
.
nyear
!=
0
){
if
(
!
this
.
irrAndSimple
.
nyear
&&
this
.
irrAndSimple
.
nyear
!=
0
){
...
@@ -511,15 +574,15 @@
...
@@ -511,15 +574,15 @@
})
})
return
;
return
;
}
else
{
}
else
{
if
(
this
.
irrAndSimple
.
nyear
>
10
0
){
if
(
this
.
irrAndSimple
.
nyear
>
10
5
){
uni
.
showToast
({
uni
.
showToast
({
title
:
'现金价值年度不能大于10
0
!'
,
title
:
'现金价值年度不能大于10
5
!'
,
duration
:
2000
,
duration
:
2000
,
icon
:
'none'
icon
:
'none'
})
})
return
;
return
;
}
}
if
(
this
.
irrAndSimple
.
nyear
<
0
){
if
(
this
.
irrAndSimple
.
nyear
<
=
0
){
uni
.
showToast
({
uni
.
showToast
({
title
:
'现金价值年度必须大于0!'
,
title
:
'现金价值年度必须大于0!'
,
duration
:
2000
,
duration
:
2000
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment