Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
voucher-h5
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘琦
voucher-h5
Commits
7dd6f9ad
Commit
7dd6f9ad
authored
Sep 25, 2019
by
潘琦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生育全程签约(张家港)1、完善儿童签约;2、增加省市区五级搜索功能;
parent
cd30a526
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
199 additions
and
42 deletions
+199
-42
index.vue
src/views/signing/index.vue
+199
-42
No files found.
src/views/signing/index.vue
View file @
7dd6f9ad
...
...
@@ -341,34 +341,49 @@
</ul>
</div>
<div
class=
"address-list"
>
<div
class=
"address-head"
>
<div
class=
"search-control"
>
<input
type=
"search"
@
keyup
.
enter=
"changesearch"
v-model=
"addressSearchValue"
placeholder=
"搜索"
/>
</div>
</div>
<div
class=
"switch province-list"
v-if=
"stepCurrent===1"
>
<div
class=
"title"
>
选择
区域
</div>
<div
class=
"title"
>
选择
省份
</div>
<ul>
<li
v-for=
"(item, index) in ProvinceData"
@
click=
"setProvince(item.adminAreaCode, item.adminAreaName)"
:key=
"index"
>
{{
item
.
adminAreaName
}}
</li>
<template
v-for=
"(item, index) in ProvinceData"
>
<li
v-if=
"item.disabled === false"
@
click=
"setProvince(item.adminAreaCode, item.adminAreaName)"
:key=
"index"
>
{{
item
.
adminAreaName
}}
</li>
</
template
>
</ul>
</div>
<div
class=
"switch city-list"
v-if=
"stepCurrent===2"
>
<div
class=
"title"
>
选择城市
</div>
<ul>
<li
v-for=
"(item, index) in CityData"
@
click=
"setCity(item.adminAreaCode, item.adminAreaName)"
:key=
"index"
>
{{
item
.
adminAreaName
}}
</li>
<
template
v-for=
"(item, index) in CityData"
>
<li
v-if=
"item.disabled === false"
@
click=
"setCity(item.adminAreaCode, item.adminAreaName)"
:key=
"index"
>
{{
item
.
adminAreaName
}}
</li>
</
template
>
</ul>
</div>
<div
class=
"switch area-list"
v-if=
"stepCurrent===3"
>
<div
class=
"title"
>
选择区域
</div>
<ul>
<li
v-for=
"(item, index) in AreaData"
@
click=
"setArea(item.adminAreaCode, item.adminAreaName)"
:key=
"index"
>
{{
item
.
adminAreaName
}}
</li>
<
template
v-for=
"(item, index) in AreaData"
>
<li
v-if=
"item.disabled === false"
@
click=
"setArea(item.adminAreaCode, item.adminAreaName)"
:key=
"index"
>
{{
item
.
adminAreaName
}}
</li>
</
template
>
</ul>
</div>
<div
class=
"switch street-list"
v-if=
"stepCurrent===4"
>
<div
class=
"title"
>
选择街道
</div>
<ul>
<li
v-for=
"(item, index) in StreetData"
@
click=
"setStreet(item.adminAreaCode, item.adminAreaName)"
:key=
"index"
>
{{
item
.
adminAreaName
}}
</li>
<
template
v-for=
"(item, index) in StreetData"
>
<li
v-if=
"item.disabled === false"
@
click=
"setStreet(item.adminAreaCode, item.adminAreaName)"
:key=
"index"
>
{{
item
.
adminAreaName
}}
</li>
</
template
>
</ul>
</div>
<div
class=
"switch villages-list"
v-if=
"stepCurrent===5"
>
<div
class=
"title"
>
选择居委会
</div>
<ul>
<li
v-for=
"(item, index) in VillagesData"
@
click=
"setVillages(item.adminAreaCode, item.adminAreaName)"
:key=
"index"
>
{{
item
.
adminAreaName
}}
</li>
<
template
v-for=
"(item, index) in VillagesData"
>
<li
v-if=
"item.disabled === false"
@
click=
"setVillages(item.adminAreaCode, item.adminAreaName)"
:key=
"index"
>
{{
item
.
adminAreaName
}}
</li>
</
template
>
</ul>
</div>
</div>
...
...
@@ -486,6 +501,7 @@ export default {
orgId
:
this
.
$route
.
query
.
orgId
?
parseInt
(
this
.
$route
.
query
.
orgId
)
:
null
,
groupId
:
this
.
$route
.
query
.
groupId
?
parseInt
(
this
.
$route
.
query
.
groupId
)
:
null
,
accountId
:
this
.
$route
.
query
.
accountId
?
this
.
$route
.
query
.
accountId
:
store
.
getters
.
accountId
,
slaveId
:
this
.
$route
.
query
.
slaveId
?
this
.
$route
.
query
.
slaveId
:
null
,
from
:
this
.
$route
.
query
.
voucherFrom
?
this
.
$route
.
query
.
voucherFrom
:
''
,
orgInfo
:
{
picture
:
_defaultPicture
,
...
...
@@ -563,11 +579,11 @@ export default {
VillagesCode
:
''
},
stepCurrent
:
1
,
// 地址省市区街道步骤下标
ProvinceData
:
null
,
// 省会列表数据
CityData
:
null
,
// 城市列表数据
AreaData
:
null
,
// 区域列表数据
StreetData
:
null
,
// 街道列表数据
VillagesData
:
null
,
// 居委会列表数据
ProvinceData
:
[]
,
// 省会列表数据
CityData
:
[]
,
// 城市列表数据
AreaData
:
[]
,
// 区域列表数据
StreetData
:
[]
,
// 街道列表数据
VillagesData
:
[]
,
// 居委会列表数据
tab1Form
:
{
// 签约(孕产妇)服务成员信息
name
:
''
,
IdCard
:
''
,
...
...
@@ -605,7 +621,8 @@ export default {
lightBoxImage
:
''
,
ChoosePlusVisible
:
true
,
Choose2PlusVisible
:
true
,
modalVisible
:
false
// 底层透明遮挡显示状态
modalVisible
:
false
,
// 底层透明遮挡显示状态
addressSearchValue
:
''
}
},
created
()
{
...
...
@@ -691,6 +708,9 @@ export default {
type
:
this
.
pageType
,
accountId
:
this
.
accountId
}
if
(
this
.
slaveId
)
{
params
.
userId
=
this
.
slaveId
}
getSignInfo
(
params
).
then
(
res
=>
{
this
.
$Indicator
.
close
()
// if (res.code && res.code !== 0) {
...
...
@@ -1036,21 +1056,31 @@ export default {
}
},
confirmSignature
()
{
if
(
this
.
signState
===
'1'
)
{
// 审核通过 跳转至首页
this
.
$router
.
push
({
path
:
'/home'
})
return
}
else
if
(
this
.
signState
===
'0'
)
{
// 未审核通过 关闭页面
this
.
$toast
({
message
:
'审核周期约三天,请您耐心等待!'
,
position
:
'center'
,
duration
:
3000
})
setTimeout
(
function
()
{
wx
.
closeWindow
()
},
2500
)
return
if
(
parseInt
(
this
.
pageType
)
===
0
)
{
if
(
this
.
signState
===
'1'
)
{
// 审核通过 跳转至首页
this
.
$router
.
push
({
path
:
'/home'
})
return
}
else
if
(
this
.
signState
===
'0'
)
{
// 未审核通过 关闭页面
this
.
$toast
({
message
:
'审核周期约三天,请您耐心等待!'
,
position
:
'center'
,
duration
:
3000
})
setTimeout
(
function
()
{
wx
.
closeWindow
()
},
2500
)
return
}
}
else
if
(
parseInt
(
this
.
pageType
)
===
1
)
{
console
.
log
(
this
.
childrenArr
[
0
].
signState
)
if
(
this
.
childrenArr
[
0
].
signState
===
'1'
)
{
this
.
$router
.
push
({
path
:
'/home'
})
return
}
}
this
.
BaseValidateHandle
()
...
...
@@ -1117,7 +1147,7 @@ export default {
}
]
}
else
if
(
this
.
pageType
===
1
)
{
for
(
let
i
=
this
.
alreadySignNum
;
i
<
this
.
childrenArr
.
length
;
i
++
)
{
// 儿童签约只获取新增服务人员信息
for
(
let
i
=
0
;
i
<
this
.
childrenArr
.
length
;
i
++
)
{
// 儿童签约只获取新增服务人员信息
childrenArr
.
push
({
birth
:
this
.
childrenArr
[
i
].
birth
,
idCard
:
''
,
...
...
@@ -1167,15 +1197,26 @@ export default {
this
.
btnDisabled
=
false
this
.
$Indicator
.
close
()
if
(
res
.
code
===
200
&&
res
.
value
)
{
this
.
$toast
({
message
:
'审核周期约三天,请您耐心等待!'
,
position
:
'center'
,
duration
:
3000
})
if
(
this
.
signState
===
'2'
||
this
.
signState
===
''
)
{
// 签约驳回、第一次签约
setTimeout
(
function
()
{
wx
.
closeWindow
()
},
2500
)
if
(
this
.
pageType
===
0
)
{
this
.
$toast
({
message
:
'审核周期约三天,请您耐心等待!'
,
position
:
'center'
,
duration
:
3000
})
if
(
this
.
signState
===
'2'
||
this
.
signState
===
''
)
{
// 签约驳回、第一次签约
setTimeout
(
function
()
{
wx
.
closeWindow
()
},
2500
)
}
}
else
if
(
this
.
pageType
===
1
)
{
this
.
$toast
({
message
:
'签约成功!'
,
position
:
'center'
,
duration
:
3000
})
this
.
$router
.
push
({
path
:
'/home'
})
}
}
else
{
this
.
$toast
({
...
...
@@ -1221,6 +1262,7 @@ export default {
this
.
getAreaListFn
(
params
)
},
setProvince
(
code
,
val
)
{
this
.
addressSearchValue
=
''
this
.
getCity
(
code
)
this
.
addressForm
.
province
=
val
this
.
addressForm
.
ProvinceCode
=
code
...
...
@@ -1243,6 +1285,7 @@ export default {
this
.
getAreaListFn
(
params
)
},
setCity
(
code
,
val
)
{
this
.
addressSearchValue
=
''
this
.
getArea
(
code
)
this
.
addressForm
.
city
=
val
this
.
addressForm
.
CityCode
=
code
...
...
@@ -1263,6 +1306,7 @@ export default {
this
.
getAreaListFn
(
params
)
},
setArea
(
code
,
val
)
{
this
.
addressSearchValue
=
''
this
.
getStreet
(
code
)
this
.
addressForm
.
area
=
val
this
.
addressForm
.
AreaCode
=
code
...
...
@@ -1281,6 +1325,7 @@ export default {
this
.
getAreaListFn
(
params
)
},
setStreet
(
code
,
val
)
{
this
.
addressSearchValue
=
''
this
.
getVillages
(
code
)
this
.
addressForm
.
street
=
val
this
.
addressForm
.
StreetCode
=
code
...
...
@@ -1297,6 +1342,7 @@ export default {
this
.
getVillagesFn
(
params
)
},
setVillages
(
code
,
val
)
{
this
.
addressSearchValue
=
''
this
.
addressForm
.
villages
=
val
this
.
addressForm
.
VillagesCode
=
code
// this.stepCurrent = 5
...
...
@@ -1312,19 +1358,40 @@ export default {
getAreaList
(
params
).
then
(
res
=>
{
let
records
=
res
.
data
.
records
if
(
params
.
level
===
0
)
{
this
.
ProvinceData
=
records
this
.
ProvinceData
=
[]
records
.
forEach
(
item
=>
{
item
.
disabled
=
false
this
.
ProvinceData
.
push
(
item
)
})
}
else
if
(
params
.
level
===
1
)
{
this
.
CityData
=
records
this
.
CityData
=
[]
records
.
forEach
(
item
=>
{
item
.
disabled
=
false
this
.
CityData
.
push
(
item
)
})
}
else
if
(
params
.
level
===
2
)
{
this
.
AreaData
=
records
this
.
AreaData
=
[]
records
.
forEach
(
item
=>
{
item
.
disabled
=
false
this
.
AreaData
.
push
(
item
)
})
}
else
if
(
params
.
level
===
3
)
{
this
.
StreetData
=
records
this
.
StreetData
=
[]
records
.
forEach
(
item
=>
{
item
.
disabled
=
false
this
.
StreetData
.
push
(
item
)
})
}
})
},
getVillagesFn
(
params
)
{
// 获取街道下居委会信息
getVillages
(
params
).
then
(
res
=>
{
this
.
VillagesData
=
res
.
data
.
records
let
records
=
res
.
data
.
records
this
.
VillagesData
=
[]
records
.
forEach
(
item
=>
{
item
.
disabled
=
false
this
.
VillagesData
.
push
(
item
)
})
})
},
handelChooseImage
(
type
)
{
...
...
@@ -1542,6 +1609,88 @@ export default {
this
.
handelOverwrite
()
this
.
signWaterMarkState
=
false
}
},
changesearch
()
{
let
searchVal
=
this
.
addressSearchValue
switch
(
this
.
stepCurrent
)
{
case
1
:
if
(
searchVal
!==
''
)
{
this
.
ProvinceData
.
forEach
(
item
=>
{
if
(
item
.
adminAreaName
.
indexOf
(
searchVal
)
>=
0
)
{
item
[
'disabled'
]
=
false
}
else
{
item
[
'disabled'
]
=
true
}
})
}
else
{
this
.
ProvinceData
.
forEach
(
item
=>
{
item
[
'disabled'
]
=
false
})
}
break
case
2
:
if
(
searchVal
!==
''
)
{
this
.
CityData
.
forEach
(
item
=>
{
if
(
item
.
adminAreaName
.
indexOf
(
searchVal
)
>=
0
)
{
item
[
'disabled'
]
=
false
}
else
{
item
[
'disabled'
]
=
true
}
})
}
else
{
this
.
CityData
.
forEach
(
item
=>
{
item
[
'disabled'
]
=
false
})
}
break
case
3
:
if
(
searchVal
!==
''
)
{
this
.
AreaData
.
forEach
(
item
=>
{
if
(
item
.
adminAreaName
.
indexOf
(
searchVal
)
>=
0
)
{
item
[
'disabled'
]
=
false
}
else
{
item
[
'disabled'
]
=
true
}
})
}
else
{
this
.
AreaData
.
forEach
(
item
=>
{
item
[
'disabled'
]
=
false
})
}
break
case
4
:
if
(
searchVal
!==
''
)
{
// let newStreetData = []
this
.
StreetData
.
forEach
(
item
=>
{
if
(
item
.
adminAreaName
.
indexOf
(
searchVal
)
>=
0
)
{
item
[
'disabled'
]
=
false
}
else
{
item
[
'disabled'
]
=
true
}
})
console
.
log
(
JSON
.
stringify
(
this
.
StreetData
))
}
else
{
this
.
StreetData
.
forEach
(
item
=>
{
item
[
'disabled'
]
=
false
})
}
break
case
5
:
if
(
searchVal
!==
''
)
{
this
.
VillagesData
.
forEach
(
item
=>
{
if
(
item
.
adminAreaName
.
indexOf
(
searchVal
)
>=
0
)
{
item
[
'disabled'
]
=
false
}
else
{
item
[
'disabled'
]
=
true
}
})
}
else
{
this
.
VillagesData
.
forEach
(
item
=>
{
item
[
'disabled'
]
=
false
})
}
break
}
}
}
}
...
...
@@ -1693,6 +1842,10 @@ export default {
overflow-y
:
auto
;
}
.addressPopup
.address-list
.address-head
{
margin
:
0.2em
0
;
}
.addressPopup
.address-list
>
.switch
>
.title
{
color
:
#9aa0a4
;
}
...
...
@@ -1916,4 +2069,8 @@ export default {
background-color
:
#43d1be
;
border-color
:
#43d1be
;
}
.sign-page
.form
.table
.tr
.td
.mint-radiolist
{
width
:
200px
;
float
:
right
;
}
</
style
>
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