Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
mongo-ui
Commits
5c5695a1
Commit
5c5695a1
authored
Aug 18, 2020
by
郝聪敏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/picker_fix' into 'master'
Fix/picker fix See merge request
!39
parents
f919352d
60737965
Changes
22
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
2502 additions
and
541 deletions
+2502
-541
index.html
public/index.html
+3
-1
detail.zhongan.yiwai.js
src/api/detail.zhongan.yiwai.js
+2
-1
jobs.js
src/api/jobs.js
+2237
-440
Collapse.vue
src/components/Collapse.vue
+1
-0
GoodAction.vue
src/components/GoodAction.vue
+2
-0
LoginModal.vue
src/components/LoginModal.vue
+1
-0
PopupAreaPicker.vue
src/components/PopupAreaPicker.vue
+34
-4
PopupCascade.vue
src/components/PopupCascade.vue
+121
-38
PopupDatePicker.vue
src/components/PopupDatePicker.vue
+20
-0
PopupPicker.vue
src/components/PopupPicker.vue
+7
-0
Tabbar.vue
src/components/Tabbar.vue
+3
-1
popupPicker.mixin.js
src/mixins/popupPicker.mixin.js
+2
-1
http.js
src/service/http.js
+3
-2
index.less
src/style/index.less
+3
-0
mixins.less
src/style/mixins.less
+9
-0
index.vue
src/views/Consultant/Buy/index.vue
+9
-12
AIDetail.vue
src/views/Goods/Detail/AIDetail.vue
+1
-1
CIIDetail.vue
src/views/Goods/Detail/CIIDetail.vue
+10
-9
MIDetail.vue
src/views/Goods/Detail/MIDetail.vue
+9
-14
index.vue
src/views/Goods/Detail/index.vue
+2
-1
InsurePersonForm.vue
src/views/Goods/Detail/modules/InsurePersonForm.vue
+12
-3
index.vue
src/views/Policy/Add/index.vue
+11
-13
No files found.
public/index.html
View file @
5c5695a1
...
...
@@ -3,7 +3,7 @@
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0,user-scalable=no"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0,user-scalable=no
,viewport-fit=cover
"
>
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.ico"
>
<title><
%=
htmlWebpackPlugin
.
options
.
title
%
></title>
<script>
...
...
@@ -26,6 +26,8 @@
});
}
})();
// ! 上线需要删掉
var
baseUrl
=
""
;
</script>
</head>
<body>
...
...
src/api/detail.zhongan.yiwai.js
View file @
5c5695a1
...
...
@@ -4,7 +4,7 @@
* @Description:众安50万意外险
* @Date: 2020-07-27 15:46:37
* @LastEditors: gzw
* @LastEditTime: 2020-08-1
3 10:37:30
* @LastEditTime: 2020-08-1
8 16:24:31
*/
import
goodsBg
from
"
@/assets/images/goods/detail/yiwaixian/bg.png
"
;
...
...
@@ -141,6 +141,7 @@ export default {
url
:
"
http://mangguo-contract.qthbx.com/fu-wu-xie-yi-v1/
"
},
{
title
:
"
保险计划
"
},
{
title
:
"
保险计划
"
},
{
title
:
"
理赔信息
"
},
{
title
:
"
完整费率
"
},
{
...
...
src/api/jobs.js
View file @
5c5695a1
This diff is collapsed.
Click to expand it.
src/components/Collapse.vue
View file @
5c5695a1
...
...
@@ -158,6 +158,7 @@ export default {
&-icon {
font-style: normal;
font-weight: @font-weight-bold;
width: 15px;
}
&-txt {
margin-left: 8px;
...
...
src/components/GoodAction.vue
View file @
5c5695a1
...
...
@@ -68,6 +68,7 @@ export default {
<
style
lang=
"less"
scoped
>
@import "../style/var.less";
@import "../style/mixins.less";
.good-action {
position: fixed;
bottom: 0;
...
...
@@ -80,6 +81,7 @@ export default {
justify-content: space-between;
background-color: @white;
border-top: 1px solid rgba(0, 0, 0, 0.1);
.iphonex-fix-padding();
&-left {
display: flex;
align-items: center;
...
...
src/components/LoginModal.vue
View file @
5c5695a1
...
...
@@ -109,6 +109,7 @@ export default {
if
(
res
&&
!
this
.
timer
)
{
this
.
count
=
TIME_COUNT
;
this
.
showCount
=
true
;
this
.
$notify
({
type
:
"
success
"
,
message
:
"
短信验证码已发送,请注意查收
"
});
this
.
timer
=
setInterval
(()
=>
{
if
(
this
.
count
>
0
&&
this
.
count
<=
TIME_COUNT
)
{
this
.
count
--
;
...
...
src/components/PopupAreaPicker.vue
View file @
5c5695a1
...
...
@@ -9,7 +9,7 @@
<svg-icon
icon-class=
"triangle-right"
slot=
"button"
/>
</div>
<cr-popup
v-model=
"show"
position=
"bottom"
get-container=
"body"
>
<cr-area
ref=
"area"
:list=
"areaList"
@
cancel=
"onCancel"
@
confirm=
"onConfirm"
/>
<cr-area
ref=
"area"
:
value=
"value"
:
list=
"areaList"
@
cancel=
"onCancel"
@
confirm=
"onConfirm"
/>
</cr-popup>
</div>
</
template
>
...
...
@@ -23,19 +23,49 @@ export default {
data
()
{
return
{
refName
:
"
area
"
,
areaList
areaList
,
pickerDefaultVal
:
""
};
},
watch
:
{
value
(
val
)
{
if
(
val
)
{
this
.
setDefaultVal
(
false
);
}
}
},
methods
:
{
handleResult
(
res
)
{
let
valShow
=
[];
let
val
=
[];
res
.
forEach
(
item
=>
{
valShow
.
push
(
item
.
name
);
valShow
.
push
(
item
.
name
||
item
.
text
);
val
.
push
(
item
.
code
);
});
this
.
pickerValShow
=
valShow
.
join
(
"
,
"
);
this
.
pickerVal
=
val
;
this
.
pickerVal
=
val
[
2
];
},
setDefaultVal
(
setCol
=
true
)
{
setTimeout
(()
=>
{
const
$area
=
this
.
$refs
.
area
;
const
$picker
=
$area
.
$refs
.
picker
;
const
val
=
this
.
value
;
let
columns
=
""
;
$area
.
selectedCodes
=
[
`
${
val
.
substring
(
0
,
2
)}
0000`
,
`
${
val
.
substring
(
0
,
4
)}
00`
,
val
];
$area
.
renderProvince
();
// 防止refresh把数据刷没
columns
=
JSON
.
parse
(
JSON
.
stringify
(
$area
.
columns
));
if
(
setCol
)
{
$picker
.
setColumnIndex
(
0
,
columns
[
0
].
selectedIndex
);
$picker
.
setColumnIndex
(
1
,
columns
[
1
].
selectedIndex
);
$picker
.
setColumnIndex
(
2
,
columns
[
2
].
selectedIndex
);
}
else
{
const
province
=
columns
[
0
].
values
[
columns
[
0
].
selectedIndex
];
const
city
=
columns
[
1
].
values
[
columns
[
1
].
selectedIndex
];
const
country
=
columns
[
2
].
values
[
columns
[
2
].
selectedIndex
];
this
.
handleResult
([
province
,
city
,
country
]);
}
});
}
}
};
...
...
src/components/PopupCascade.vue
View file @
5c5695a1
<
template
>
<div
class=
"jobs-wrap"
>
<div
class=
"jobs-wrap-txt"
:class=
"
{ placeholder: !selectedTexts
.length
}" @click="show = true">
<span>
{{
selectedTexts
[
1
]
||
placeholder
}}
</span>
<div
class=
"jobs-wrap-txt"
:class=
"
{ placeholder: !selectedTexts
[2]
}" @click="show = true">
<span>
{{
selectedTexts
[
2
]
||
placeholder
}}
</span>
<svg-icon
icon-class=
"triangle-right"
slot=
"button"
/>
</div>
<cr-popup
v-model=
"show"
get-container=
"body"
round
closeable
position=
"bottom"
class=
"jobs"
>
<div
class=
"jobs-head"
>
<div
class=
"jobs-title"
>
请选择
</div>
<div
class=
"jobs-title"
>
请选择
职业
</div>
<cr-divider
:hairline=
"false"
:style=
"
{ color: '#F4F4F4', margin: 0 }" />
</div>
<!-- content -->
...
...
@@ -17,7 +17,7 @@
v-for=
"(item, index) in industry"
:key=
"index"
:class=
"
{ active: columns[0].values.length > 0
&&
index === columns[0].selectedIndex }"
@click="changeIndustry(item, index)"
@click
.stop
="changeIndustry(item, index)"
>
<div
class=
"jobs-item-txt"
>
<span>
{{
item
.
text
}}
</span>
...
...
@@ -30,10 +30,30 @@
<div
class=
"jobs-item"
v-for=
"(it, idx) in columns[1].values"
:class=
"
{
active: columns[1].values.length > 0
&&
idx === columns[1].selectedIndex
}"
:key="idx"
@
click
=
"changeProfession
(it, idx)"
@click
.stop="changeCategory
(it, idx)"
>
<div
class=
"jobs-item-txt"
>
{{
it
.
text
}}
</div>
<div
class=
"jobs-item-txt"
>
<span>
{{
it
.
text
}}
</span>
<cr-icon
type=
"arrow"
/>
</div>
<div
class=
"jobs-children jobs-leaf"
v-if=
"columns[2].values.length > 0 && idx === columns[1].selectedIndex"
>
<div
class=
"jobs-item"
v-for=
"(itc, idxc) in columns[2].values"
:key=
"idxc"
@
click.stop=
"changeProfession(itc, idxc)"
>
<div
class=
"jobs-item-txt"
>
{{
itc
.
text
}}
</div>
</div>
</div>
<cr-divider
/>
</div>
</div>
<cr-divider
/>
...
...
@@ -45,6 +65,7 @@
</
template
>
<
script
>
// TODO 组件目前只针对职业码表处理,有待优化
/**
* @description: 职业码表
* @param {type}
...
...
@@ -54,17 +75,26 @@ import popupPickerMixin from "../mixins/popupPicker.mixin.js";
import
jobs
from
"
@/api/jobs
"
;
const
CHANGE_EVENT
=
"
input
"
;
const
INDUSTRY_INDEX
=
0
;
const
PROFESSION_INDEX
=
1
;
const
CATEGORY_INDEX
=
1
;
const
PROFESSION_INDEX
=
2
;
export
default
{
name
:
"
PopupCascade
"
,
mixins
:
[
popupPickerMixin
],
props
:
{
value
:
null
value
:
null
,
isLite
:
{
type
:
Boolean
,
default
:
false
}
},
watch
:
{
// value(val) {
// this.popupShow = val;
// },
value
(
val
)
{
if
(
val
)
{
const
value
=
""
+
val
;
this
.
selectedCodes
=
[
value
.
substring
(
0
,
1
),
value
.
substring
(
0
,
3
),
value
];
this
.
renderIndustry
();
}
},
popupShow
(
val
)
{
this
.
$emit
(
CHANGE_EVENT
,
val
);
}
...
...
@@ -79,8 +109,18 @@ export default {
};
});
},
category
()
{
const
list
=
this
.
jobs
[
this
.
categoryKey
];
return
Object
.
keys
(
list
).
map
(
key
=>
{
return
{
code
:
key
,
text
:
list
[
key
]
};
});
},
profession
()
{
const
list
=
this
.
jobs
[
this
.
professionKey
];
const
key
=
this
.
isLite
?
this
.
professionLiteKey
:
this
.
professionKey
;
const
list
=
this
.
jobs
[
key
];
return
Object
.
keys
(
list
).
map
(
key
=>
{
return
{
code
:
key
,
...
...
@@ -94,7 +134,9 @@ export default {
show
:
false
,
jobs
,
industryKey
:
"
industry
"
,
categoryKey
:
"
category
"
,
professionKey
:
"
profession
"
,
professionLiteKey
:
"
professionLite
"
,
columns
:
[],
selectedCodes
:
[],
selectedTexts
:
[]
...
...
@@ -103,10 +145,10 @@ export default {
created
()
{
if
(
this
.
value
)
{
const
value
=
""
+
this
.
value
;
this
.
selectedCodes
=
[
value
.
substring
(
0
,
4
),
value
];
this
.
selectedCodes
=
[
value
.
substring
(
0
,
1
),
value
.
substring
(
0
,
3
),
value
];
}
for
(
let
i
=
0
;
i
<
2
;
i
++
)
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
this
.
columns
[
i
]
=
{
values
:
[],
selectedIndex
:
""
...
...
@@ -118,16 +160,33 @@ export default {
},
methods
:
{
changeIndustry
(
item
,
index
)
{
this
.
columns
[
INDUSTRY_INDEX
].
selectedIndex
=
index
;
this
.
selectedCodes
[
INDUSTRY_INDEX
]
=
item
.
code
;
this
.
selectedTexts
[
INDUSTRY_INDEX
]
=
item
.
text
;
this
.
renderProfession
(
item
.
code
);
if
(
index
===
this
.
columns
[
INDUSTRY_INDEX
].
selectedIndex
)
{
this
.
columns
[
INDUSTRY_INDEX
].
selectedIndex
=
""
;
this
.
$forceUpdate
();
}
else
{
this
.
columns
[
INDUSTRY_INDEX
].
selectedIndex
=
index
;
this
.
setValueOfSelected
(
item
,
INDUSTRY_INDEX
);
this
.
renderCategory
(
item
.
code
);
}
this
.
columns
[
CATEGORY_INDEX
].
selectedIndex
=
""
;
this
.
columns
[
PROFESSION_INDEX
].
selectedIndex
=
""
;
},
changeCategory
(
item
,
index
)
{
if
(
index
===
this
.
columns
[
CATEGORY_INDEX
].
selectedIndex
)
{
this
.
columns
[
CATEGORY_INDEX
].
selectedIndex
=
""
;
this
.
$forceUpdate
();
return
;
}
else
{
this
.
columns
[
CATEGORY_INDEX
].
selectedIndex
=
index
;
this
.
setValueOfSelected
(
item
,
CATEGORY_INDEX
);
this
.
renderProfession
(
item
.
code
);
}
this
.
columns
[
PROFESSION_INDEX
].
selectedIndex
=
""
;
},
changeProfession
(
item
,
index
)
{
this
.
columns
[
PROFESSION_INDEX
].
selectedIndex
=
index
;
this
.
selectedCodes
[
PROFESSION_INDEX
]
=
item
.
code
;
this
.
selectedTexts
[
PROFESSION_INDEX
]
=
item
.
text
;
this
.
$emit
(
"
input
"
,
this
.
selectedCodes
);
this
.
setValueOfSelected
(
item
,
PROFESSION_INDEX
);
this
.
$emit
(
CHANGE_EVENT
,
item
.
code
);
this
.
show
=
false
;
},
renderIndustry
()
{
...
...
@@ -135,14 +194,29 @@ export default {
this
.
setDefaultIndexOfColumn
(
this
.
industry
,
INDUSTRY_INDEX
);
const
industry
=
this
.
industry
[
this
.
columns
[
INDUSTRY_INDEX
].
selectedIndex
];
if
(
industry
)
{
this
.
selectedTexts
[
PROFESSION_INDEX
]
=
industry
.
text
;
this
.
renderProfession
(
industry
?.
code
);
this
.
setValueOfSelected
(
industry
,
INDUSTRY_INDEX
);
this
.
renderCategory
(
industry
?.
code
);
}
},
renderCategory
(
industryCode
)
{
const
categoryOfIndustry
=
this
.
quickFilter
(
this
.
category
,
1
,
industryCode
);
this
.
columns
[
CATEGORY_INDEX
].
values
=
categoryOfIndustry
;
this
.
setDefaultIndexOfColumn
(
categoryOfIndustry
,
CATEGORY_INDEX
);
const
category
=
categoryOfIndustry
[
this
.
columns
[
CATEGORY_INDEX
].
selectedIndex
];
if
(
category
)
{
this
.
setValueOfSelected
(
category
,
CATEGORY_INDEX
);
this
.
renderProfession
(
category
?.
code
);
}
this
.
$forceUpdate
();
},
renderProfession
(
industryCode
)
{
const
professionOfIndustry
=
this
.
quickFilter
(
this
.
profession
,
5
,
industryCode
);
this
.
columns
[
PROFESSION_INDEX
].
values
=
professionOfIndustry
;
this
.
setDefaultIndexOfColumn
(
professionOfIndustry
,
PROFESSION_INDEX
);
renderProfession
(
categoryCode
)
{
const
professionOfCategory
=
this
.
quickFilter
(
this
.
profession
,
3
,
categoryCode
);
this
.
columns
[
PROFESSION_INDEX
].
values
=
professionOfCategory
;
this
.
setDefaultIndexOfColumn
(
professionOfCategory
,
PROFESSION_INDEX
);
const
profession
=
professionOfCategory
[
this
.
columns
[
PROFESSION_INDEX
].
selectedIndex
];
if
(
profession
)
{
this
.
setValueOfSelected
(
profession
,
PROFESSION_INDEX
);
}
this
.
$forceUpdate
();
},
quickFilter
(
list
,
slice
,
code
)
{
...
...
@@ -161,6 +235,10 @@ export default {
}
return
filtered
;
},
setValueOfSelected
(
item
,
index
)
{
this
.
selectedCodes
[
index
]
=
item
.
code
;
this
.
selectedTexts
[
index
]
=
item
.
text
;
},
setDefaultIndexOfColumn
(
list
,
index
)
{
if
(
this
.
selectedCodes
[
index
])
{
list
.
some
((
item
,
i
)
=>
{
...
...
@@ -183,12 +261,12 @@ export default {
.body-wrap-mixin {
overflow-x: hidden;
overflow-y: auto;
height:
80vh
;
height:
calc(70vh - 90px)
;
padding: @padding-lg;
}
.jobs {
z-index: 200;
height:
8
0vh;
height:
7
0vh;
overflow: hidden;
@{deep} .cr-icon {
position: absolute;
...
...
@@ -248,20 +326,25 @@ export default {
}
}
&.active {
.jobs-children {
display: block;
}
.cr-icon {
& > .jobs-item-txt > .cr-icon {
transform: rotate(90deg);
}
}
&:last-child {
.cr-divider {
display: none;
}
}
}
&-children {
display: none;
margin: 0 0 10px;
padding: 2px 10px;
border-radius: 8px;
background-color: @gray-1;
padding: 2px 0 2px 10px;
&.jobs-leaf {
border-radius: 8px;
background-color: @gray-1;
.jobs-item-txt {
margin: 10px 0;
}
}
.jobs-item-txt {
color: @gray-5;
padding: 0;
...
...
src/components/PopupDatePicker.vue
View file @
5c5695a1
...
...
@@ -32,10 +32,30 @@ export default {
initVal
:
parseTime
(
""
,
"
{y}-{m}-{d}
"
)
};
},
watch
:
{
value
(
val
)
{
if
(
val
)
{
this
.
initVal
=
val
;
this
.
handleResult
(
val
);
}
}
},
methods
:
{
handleResult
(
res
)
{
this
.
pickerValShow
=
res
;
this
.
pickerVal
=
res
;
},
setDefaultVal
()
{
setTimeout
(()
=>
{
const
$datepicker
=
this
.
$refs
.
datepicker
;
const
$picker
=
$datepicker
.
$refs
.
picker
;
const
columns
=
$datepicker
.
columns
;
$datepicker
.
setInitValue
();
$picker
.
setColumnIndex
(
0
,
columns
[
0
].
selectedIndex
);
$picker
.
setColumnIndex
(
1
,
columns
[
1
].
selectedIndex
);
$picker
.
setColumnIndex
(
2
,
columns
[
2
].
selectedIndex
);
});
}
}
};
...
...
src/components/PopupPicker.vue
View file @
5c5695a1
...
...
@@ -21,6 +21,7 @@
</
template
>
<
script
>
// TODO 目前没有用到的业务场景,默认值还未做处理
import
popupPickerMixin
from
"
../mixins/popupPicker.mixin.js
"
;
export
default
{
name
:
"
PopupPicker
"
,
...
...
@@ -29,6 +30,12 @@ export default {
handleResult
(
res
)
{
this
.
pickerValShow
=
res
[
0
];
this
.
pickerVal
=
res
[
1
];
},
setDefaultVal
()
{
setTimeout
(()
=>
{
const
$picker
=
this
.
$refs
.
picker
;
$picker
.
setColumnIndex
(
0
,
this
.
pickerData
.
indexOf
(
this
.
value
));
});
}
}
};
...
...
src/components/Tabbar.vue
View file @
5c5695a1
...
...
@@ -80,13 +80,15 @@ export default {
</
script
>
<
style
lang=
"less"
scoped
>
@import "../style/var.less";
@import "../style/mixins.less";
.mongo-tabbar {
position: fixed;
bottom: 0;
z-index: 100;
box-sizing: border-box;
height: 49px;
min-
height: 49px;
padding: 5px 0 2px 0;
.iphonex-fix-padding();
&-item {
display: flex;
flex-direction: column;
...
...
src/mixins/popupPicker.mixin.js
View file @
5c5695a1
...
...
@@ -2,7 +2,7 @@
* @Description: PopupPicker mixin
* @Date: 2020-07-28 19:46:31
* @LastEditors: gzw
* @LastEditTime: 2020-08-1
6 21:21:05
* @LastEditTime: 2020-08-1
7 16:52:26
*/
// TODO 默认值需要处理
...
...
@@ -36,6 +36,7 @@ export default {
if
(
val
&&
!
this
.
refreshed
&&
this
.
$refs
[
this
.
refName
])
{
this
.
refreshed
=
true
;
this
.
$refs
[
this
.
refName
].
refreshColumns
();
this
.
setDefaultVal
();
}
}
// value: {
...
...
src/service/http.js
View file @
5c5695a1
...
...
@@ -25,7 +25,6 @@ const { Notify } = cherry;
const
CancelToken
=
axios
.
CancelToken
;
let
pending
=
{};
let
reqNum
=
0
;
axios
.
defaults
.
baseURL
=
config
.
basicHost
;
axios
.
defaults
.
timeout
=
30000
;
...
...
@@ -55,7 +54,9 @@ axios.interceptors.request.use(
pending
[
config
.
url
](
"
取消重复请求
"
);
}
config
.
cancelToken
=
new
CancelToken
(
c
=>
(
pending
[
config
.
url
]
=
c
));
// ! 上线需要删掉
// eslint-disable-next-line
config
.
baseURL
=
baseUrl
||
config
.
baseURL
;
// 添加token
const
token
=
localStorage
.
get
(
"
mongoToken
"
);
if
(
token
)
{
...
...
src/style/index.less
View file @
5c5695a1
...
...
@@ -21,6 +21,9 @@ a {
input::-webkit-input-placeholder {
color: #AAAAAA;
}
input:focus {
outline: 0;
}
strong {
font-weight: @font-weight-bold;
}
...
...
src/style/mixins.less
View file @
5c5695a1
...
...
@@ -37,4 +37,13 @@
.sub-text-mixins();
color: @black;
}
}
.iphonex-fix-padding {
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
.iphonex-fix-margin {
margin-bottom: constant(safe-area-inset-bottom);
margin-bottom: env(safe-area-inset-bottom);
}
\ No newline at end of file
src/views/Consultant/Buy/index.vue
View file @
5c5695a1
...
...
@@ -230,34 +230,31 @@ export default {
this
.
generateOrder
();
}
},
updateRemain
(
isBuy
=
false
)
{
let
historyRemain
=
sessionStorage
.
getItem
(
"
historyRemain
"
);
updateRemain
()
{
let
historyRemain
=
localStorage
.
get
(
"
historyRemain
"
);
if
(
historyRemain
&&
+
historyRemain
>
100
)
{
isBuy
&&
historyRemain
--
;
historyRemain
--
;
}
else
{
historyRemain
=
Math
.
floor
(
Math
.
random
()
*
(
200
-
100
)
+
100
);
}
this
.
remain
=
historyRemain
;
sessionStorage
.
setItem
(
"
historyRemain
"
,
historyRemain
);
localStorage
.
set
(
"
historyRemain
"
,
historyRemain
);
},
async
generateOrder
()
{
const
res
=
await
create
();
if
(
res
)
{
this
.
consultantOrderNo
=
res
.
consultantOrderNo
;
this
.
updateRemain
(
true
);
this
.
updateRemain
();
this
.
goPay
();
}
},
async
goPay
()
{
const
res
=
await
goPay
({
tradeType
:
this
.
tradeType
});
if
(
res
)
{
payByWay
(
this
.
tradeType
,
res
.
payInfo
).
then
(
res
=>
{
if
(
res
===
"
ok
"
)
{
setTimeout
(()
=>
{
// this.$router.push("/consultant/success");
this
.
$parent
.
getOrderInfo
();
},
2000
);
}
payByWay
(
this
.
tradeType
,
res
.
payInfo
).
then
(()
=>
{
setTimeout
(()
=>
{
this
.
$parent
.
getOrderInfo
();
},
1000
);
});
}
}
...
...
src/views/Goods/Detail/AIDetail.vue
View file @
5c5695a1
...
...
@@ -138,7 +138,7 @@ export default {
formData
:
{
name
:
""
,
idNo
:
""
,
relation
:
"
1
"
,
relation
:
""
,
payType
:
"
1
"
,
amountInsured
:
"
1000000
"
,
autoRenewPolicy
:
false
,
...
...
src/views/Goods/Detail/CIIDetail.vue
View file @
5c5695a1
...
...
@@ -54,7 +54,7 @@
:url=
"pupopData.url"
>
<cps-process-detail
v-if=
"currentPupopIndex === 5"
:process-data=
"processDetail"
/>
<cps-rate
v-if=
"currentPupopIndex === 6"
/>
<cps-rate
:rate-data=
"rateInfo"
v-if=
"currentPupopIndex === 6"
/>
</popup-with-iframe>
<go-insure-dialog
v-model=
"goInsureState"
...
...
@@ -135,8 +135,8 @@ export default {
formData
:
{
name
:
""
,
idNo
:
""
,
relation
:
"
1
"
,
payType
:
"
1
"
,
relation
:
""
,
payType
:
""
,
amountInsured
:
"
300000
"
,
autoRenewPolicy
:
false
,
read
:
true
...
...
@@ -166,15 +166,16 @@ export default {
if
(
this
.
calTimer
)
{
clearTimeout
(
this
.
calTimer
);
}
const
{
idNo
,
payType
}
=
val
;
const
{
idNo
:
oldNo
,
payType
:
oldType
}
=
oldVal
;
const
{
idNo
}
=
val
;
const
{
idNo
:
oldNo
}
=
oldVal
;
if
(
this
.
goInsureState
)
{
sessionStorage
.
setItem
(
"
policyFormData
"
,
JSON
.
stringify
(
Object
.
assign
(
this
.
formData
,
{
productNo
:
this
.
goodId
}))
);
}
if
(
idNo
===
oldNo
&&
payType
===
oldType
)
return
;
console
.
log
(
idNo
,
oldNo
);
if
(
idNo
===
oldNo
)
return
;
this
.
calTimer
=
setTimeout
(()
=>
{
this
.
calFee
();
},
600
);
...
...
@@ -257,17 +258,17 @@ export default {
async
calFee
()
{
let
{
price
,
subPrice
}
=
this
.
headerInfo
;
const
{
idNo
,
socialSecurity
,
payType
,
amountInsured
,
userInfoSecId
}
=
this
.
formData
;
if
(
!
idNo
||
!
socialSecurity
||
!
payType
)
return
;
if
(
!
idNo
)
return
;
const
_param
=
{
productNo
:
this
.
goodId
,
productUserInfo
:
{
userInfo
:
{
idNo
,
socialSecurity
:
!!
Number
(
socialSecurity
)
,
socialSecurity
:
socialSecurity
?
!!
Number
(
socialSecurity
)
:
true
,
userInfoSecId
:
userInfoSecId
?
userInfoSecId
:
undefined
},
productItem
:
{
payType
,
payType
:
payType
||
"
2
"
,
amountInsured
}
}
...
...
src/views/Goods/Detail/MIDetail.vue
View file @
5c5695a1
...
...
@@ -136,9 +136,9 @@ export default {
formData
:
{
name
:
""
,
idNo
:
""
,
socialSecurity
:
"
1
"
,
relation
:
"
1
"
,
payType
:
"
1
"
,
socialSecurity
:
""
,
relation
:
""
,
payType
:
""
,
planValue
:
"
3
"
,
autoRenewPolicy
:
false
,
read
:
true
...
...
@@ -163,15 +163,12 @@ export default {
];
}
},
formData
Cpu
:
{
formData
:
{
deep
:
true
,
handler
(
val
,
oldVal
)
{
handler
()
{
if
(
this
.
calTimer
)
{
clearTimeout
(
this
.
calTimer
);
}
const
{
idNo
,
socialSecurity
,
payType
}
=
val
;
const
{
idNo
:
oldNo
,
socialSecurity
:
oldSocialSecurity
,
payType
:
oldType
}
=
oldVal
;
if
(
idNo
===
oldNo
&&
socialSecurity
===
oldSocialSecurity
&&
payType
===
oldType
)
return
;
this
.
calTimer
=
setTimeout
(()
=>
{
this
.
calFee
();
},
600
);
...
...
@@ -190,9 +187,6 @@ export default {
paywayOptions
,
medicalOptions
};
},
formDataCpu
()
{
return
JSON
.
parse
(
JSON
.
stringify
(
this
.
formData
));
}
},
mounted
()
{
...
...
@@ -289,17 +283,18 @@ export default {
async
calFee
()
{
let
{
price
,
subPrice
}
=
this
.
headerInfo
;
const
{
idNo
,
socialSecurity
,
payType
,
userInfoSecId
}
=
this
.
formData
;
if
(
!
idNo
||
!
socialSecurity
||
!
payType
)
return
;
if
(
!
idNo
)
return
;
const
_param
=
{
productNo
:
this
.
goodId
,
productUserInfo
:
{
userInfo
:
{
idNo
,
socialSecurity
:
!!
Number
(
socialSecurity
)
,
socialSecurity
:
socialSecurity
?
!!
Number
(
socialSecurity
)
:
true
,
userInfoSecId
:
userInfoSecId
?
userInfoSecId
:
undefined
},
productItem
:
{
payType
payType
:
payType
||
"
2
"
,
socialSecurity
:
socialSecurity
?
!!
Number
(
socialSecurity
)
:
true
}
}
};
...
...
src/views/Goods/Detail/index.vue
View file @
5c5695a1
...
...
@@ -36,7 +36,8 @@ export default {
};
},
beforeRouteLeave
(
to
,
from
,
next
)
{
if
(
this
.
noOrder
&&
!
this
.
userClickState
&&
to
.
name
===
"
Goods
"
)
{
const
blackList
=
[
"
Goods
"
,
"
Home
"
,
"
Detail
"
,
"
ConsultantPlan
"
];
if
(
this
.
noOrder
&&
!
this
.
userClickState
&&
blackList
.
includes
(
to
.
name
))
{
this
.
showRec
=
true
;
next
(
false
);
}
else
{
...
...
src/views/Goods/Detail/modules/InsurePersonForm.vue
View file @
5c5695a1
...
...
@@ -228,7 +228,7 @@ export default {
userInfoSecId
:
selfSecId
,
socialSecurity
}
=
item
;
if
(
relation
===
1
)
{
if
(
+
relation
===
1
)
{
this
.
formData
=
{
...
this
.
formData
,
...{
...
...
@@ -242,17 +242,26 @@ export default {
}
});
const
userArray
=
this
.
familyList
.
filter
(
item
=>
item
.
relation
===
+
relation
);
let
[
name
,
idNo
,
userInfoSecId
,
socialSecurity
]
=
[
""
,
""
,
""
,
"
0
"
];
let
[
name
,
idNo
,
userInfoSecId
,
socialSecurity
]
=
[
""
,
""
,
""
,
""
];
if
(
userArray
.
length
)
{
let
{
nameMask
,
idNoMask
,
userInfoSecId
:
id
,
socialSecurity
:
ss
}
=
userArray
[
0
];
[
name
,
idNo
,
userInfoSecId
,
socialSecurity
]
=
[
nameMask
,
idNoMask
,
id
,
ss
];
this
.
infoReadonly
=
true
;
}
else
{
if
(
relation
===
"
1
"
)
{
const
{
selfName
:
sName
,
selfIdNo
:
sNo
}
=
this
.
formData
;
[
name
,
idNo
]
=
[
sName
,
sNo
];
}
this
.
infoReadonly
=
false
;
}
this
.
formData
=
{
...
this
.
formData
,
...{
name
,
idNo
,
userInfoSecId
,
socialSecurity
:
socialSecurity
?
"
1
"
:
"
0
"
}
...{
name
,
idNo
,
userInfoSecId
,
socialSecurity
}
};
},
async
getFamilyList
()
{
...
...
src/views/Policy/Add/index.vue
View file @
5c5695a1
...
...
@@ -82,7 +82,10 @@
:rules=
"[{ required: true, message: '请选择投保人职业' }]"
>
<
template
#input
>
<popup-cascade
/>
<popup-cascade
v-model=
"formData.holderUserInfo.occupation"
placeholder=
"请选择投保人职业"
/>
</
template
>
</cr-field>
<cr-field
...
...
@@ -216,13 +219,13 @@
v-model=
"formData.insuredUserInfo.occupation"
name=
"insuredUserInfo_occupation"
label=
"职业"
:rules=
"[{ required: true, message: '请选择
投
保人职业' }]"
:rules=
"[{ required: true, message: '请选择
被
保人职业' }]"
>
<
template
#input
>
<popup-picker
:picker-data=
"['老师', '工人']"
<popup-cascade
v-model=
"formData.insuredUserInfo.occupation"
placeholder=
"请选择投保人职业"
placeholder=
"请选择被保人职业"
:is-lite=
"true"
/>
</
template
>
</cr-field>
...
...
@@ -340,7 +343,6 @@
<
script
>
import
GoodAction
from
"
@/components/GoodAction
"
;
import
CrRadioBtn
from
"
@/components/CrRadioBtn
"
;
import
PopupPicker
from
"
@/components/PopupPicker
"
;
import
PopupAreaPicker
from
"
@/components/PopupAreaPicker
"
;
import
PopupDatePicker
from
"
@/components/PopupDatePicker
"
;
import
PopupWithIframe
from
"
@/components/PopupWithIframe
"
;
...
...
@@ -377,7 +379,6 @@ export default {
GoodAction
,
CrRadioBtn
,
GoInsureDialog
,
PopupPicker
,
PopupAreaPicker
,
PopupDatePicker
,
PopupWithIframe
,
...
...
@@ -398,7 +399,7 @@ export default {
policyFormData
:
JSON
.
parse
(
sessionStorage
.
getItem
(
"
policyFormData
"
)
||
"
{}
"
),
formData
:
{
insuredUserInfo
:
{
relation
:
"
1
"
relation
:
""
},
holderUserInfo
:
{},
productItem
:
{
...
...
@@ -441,7 +442,7 @@ export default {
this
.
goodBuyModalInfo
=
[{
title
:
`
${
price
[
2
]}
保费`
,
value
:
`
${
price
[
0
]}${
price
[
1
]}
`
}];
}
},
formData
Cpu
:
{
formData
:
{
deep
:
true
,
handler
()
{
this
.
autoSaveHandler
(
AUTO_SAVE_TARGET
,
AUTO_SAVE_KEY
);
...
...
@@ -474,9 +475,6 @@ export default {
const
{
popupArray
,
currentPupopIndex
}
=
this
;
return
popupArray
[
currentPupopIndex
]
||
{};
},
formDataCpu
()
{
return
JSON
.
parse
(
JSON
.
stringify
(
this
.
formData
));
},
socialSecurityReadonly
()
{
const
{
relation
}
=
this
.
formData
.
insuredUserInfo
;
const
{
selfInfoReadonly
,
infoReadonly
}
=
this
;
...
...
@@ -533,7 +531,7 @@ export default {
}
this
.
formData
.
insuredUserInfo
=
{
...
this
.
formData
.
insuredUserInfo
,
...{
name
,
idNo
,
userInfoSecId
,
socialSecurity
:
socialSecurity
}
...{
name
,
idNo
,
userInfoSecId
,
socialSecurity
:
socialSecurity
?
"
1
"
:
"
0
"
}
};
this
.
$forceUpdate
();
},
...
...
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