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
bebcf78e
Commit
bebcf78e
authored
Oct 16, 2019
by
潘琦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
张家港签约增加用户手段选择是否签约功能;券详情核销二维码Android重复问题;
parent
af62afb5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
114 additions
and
12 deletions
+114
-12
signing.js
src/api/signing/signing.js
+9
-0
index.vue
src/views/signing/index.vue
+91
-8
index.vue
src/views/voucherDetail/index.vue
+14
-4
No files found.
src/api/signing/signing.js
View file @
bebcf78e
...
...
@@ -54,6 +54,15 @@ export function createSign (params) {
})
}
// 修改签约单签名字段
export
function
updateSignImgBySignId
(
params
)
{
return
request
({
url
:
'/v1/voucher/reSign'
,
method
:
'POST'
,
data
:
params
})
}
// 签约详情(根据sign id)
export
function
getSignInfoBySignId
(
params
)
{
return
request
({
...
...
src/views/signing/index.vue
View file @
bebcf78e
...
...
@@ -33,7 +33,7 @@
<div
class=
"tr"
>
<div
class=
"td label"
>
手机号
</div>
<div
class=
"td text-right"
>
<input
type=
"text"
class=
"form-control"
maxlength=
"11"
placeholder=
"请输入有效手机号"
@
blur=
"BaseValidatePhone"
v-model=
"BaseForm.phone"
/>
<input
type=
"text"
class=
"form-control"
maxlength=
"11"
placeholder=
"请输入有效手机号"
@
blur=
"BaseValidatePhone"
v-model=
"BaseForm.phone"
:disabled=
"signStatus=='update'"
/>
<span
v-show=
"!BaseValidate.phoneState"
class=
"small-hint"
>
请输入有效手机号
</span>
</div>
</div>
...
...
@@ -47,7 +47,8 @@
<div
class=
"tr"
>
<div
class=
"td label"
>
末次月经时间
</div>
<div
class=
"td text-right"
>
<div
class=
"td-table"
@
click=
"openPickerLastMensesTime"
>
<input
type=
"text"
class=
"form-control"
v-model=
"BaseForm.lastMensesTime"
v-if=
"signStatus=='update'"
:disabled=
"signStatus=='update'"
/>
<div
class=
"td-table"
@
click=
"openPickerLastMensesTime"
v-else
>
<div
class=
"td-table-cell text"
>
<span
v-if=
"BaseForm.lastMensesTime === ''"
>
请选择末次月经时间
</span>
<span
v-else
class=
"light"
>
{{
BaseForm
.
lastMensesTime
}}
</span>
...
...
@@ -63,7 +64,11 @@
<div
class=
"tr"
>
<div
class=
"td label"
>
现住址
</div>
<div
class=
"td text-right"
>
<div
class=
"td-table"
@
click=
"openPopupAddress"
>
<div
v-if=
"signStatus=='update'"
>
<p
class=
"light m-b-normal"
>
{{
BaseForm
.
address
}}
</p>
<p
class=
"light m-b-normal"
>
{{
BaseForm
.
subAddress
}}
</p>
</div>
<div
class=
"td-table"
@
click=
"openPopupAddress"
v-else
>
<div
class=
"td-table-cell text"
>
<p
class=
"m-b-normal"
>
<span
v-if=
"BaseForm.address === '' || BaseForm.address === ' '"
>
请选择现在居住地址
</span>
...
...
@@ -84,7 +89,7 @@
<div
class=
"tr"
>
<div
class=
"td label"
>
详细地址
</div>
<div
class=
"td text-right"
>
<input
type=
"text"
v-model=
"BaseForm.street"
class=
"form-control"
placeholder=
"请输入小区/楼栋/门牌号(最多25字)"
maxlength=
"25"
@
blur=
"BaseValidateStreet"
/>
<input
type=
"text"
v-model=
"BaseForm.street"
class=
"form-control"
placeholder=
"请输入小区/楼栋/门牌号(最多25字)"
maxlength=
"25"
@
blur=
"BaseValidateStreet"
:disabled=
"signStatus=='update'"
/>
<span
v-if=
"!BaseValidate.streetState"
class=
"small-hint"
>
请输入详细地址
</span>
</div>
</div>
...
...
@@ -483,7 +488,7 @@
<
script
>
import
store
from
'@/store'
import
{
getOrgInfo
,
getSignInfo
,
getAreaList
,
getVillages
,
getOrgsByAreaCode
,
createSign
}
from
'@/api/signing/signing'
import
{
getOrgInfo
,
getSignInfo
,
getAreaList
,
getVillages
,
getOrgsByAreaCode
,
createSign
,
updateSignImgBySignId
}
from
'@/api/signing/signing'
import
{
validatename
,
cardid
,
isvalidatemobile
}
from
'@/util/validate'
import
{
SubtractDay
,
getBirthByIdNumber
,
getSexByIdCard
,
getAgeByBirth
}
from
'@/util/index'
import
_defaultPicture
from
'../../assets/images/org-default-picture.png'
...
...
@@ -510,6 +515,7 @@ export default {
},
signStatus
:
'create'
,
signState
:
''
,
// 0=待审核 1=审核通过 2=审核不通过 3=审核已取消
isSign
:
null
,
// 是否签约 0=签约 1=不签约
alreadySignNum
:
0
,
// 已签约服务人员数
childrenArr
:
[
{
...
...
@@ -735,6 +741,7 @@ export default {
this
.
accountId
=
data
.
accountId
this
.
fileUuid
=
data
.
fileUuid
this
.
signId
=
data
.
signId
this
.
isSign
=
data
.
isSign
this
.
userId
=
data
.
userId
this
.
signState
=
data
.
state
this
.
BaseForm
.
name
=
data
.
name
...
...
@@ -794,6 +801,21 @@ export default {
this
.
BaseForm
.
chooseImages2
.
push
(
data
.
hyzl4
)
}
// 正常签约并且审核通过直接跳转至首页
if
(
parseInt
(
data
.
isSign
)
===
1
&&
data
.
signState
===
'1'
)
{
this
.
$Indicator
.
open
({
text
:
'您签约已通过,快去享受福利吧!'
,
spinnerType
:
'fading-circle'
})
let
that
=
this
setTimeout
(
function
()
{
this
.
$Indicator
.
close
()
that
.
$router
.
push
({
path
:
'/home'
})
},
2000
)
}
if
(
this
.
pageType
===
1
)
{
// 签约(儿童)服务成员回显
if
(
data
.
bs
.
length
>
0
)
{
this
.
alreadySignNum
=
data
.
bs
.
length
...
...
@@ -1109,9 +1131,16 @@ export default {
})
return
false
}
this
.
SignatureSheetVisible
=
true
this
.
modalVisible
=
true
this
.
signCanvasW
=
this
.
$refs
.
signCanvasBlock
.
offsetWidth
this
.
$MessageBox
.
confirm
(
'是否直接签约?'
).
then
(
action
=>
{
this
.
isSign
=
1
this
.
SignatureSheetVisible
=
true
this
.
modalVisible
=
true
this
.
signCanvasW
=
this
.
$refs
.
signCanvasBlock
.
offsetWidth
}).
catch
(()
=>
{
console
.
log
(
'cancel'
)
this
.
isSign
=
0
this
.
handelSave
()
})
},
closeSignPopup
()
{
this
.
SignatureSheetVisible
=
false
...
...
@@ -1133,6 +1162,10 @@ export default {
this
.
$refs
.
signature
.
clear
()
},
handelSave
()
{
if
(
this
.
signId
!==
0
&&
this
.
signId
!==
''
&&
parseInt
(
this
.
isSign
)
===
0
)
{
// 保存数据后,已有签约单,直接重新修改该签约单签名数据
this
.
handleUpateSign
(
this
.
signId
)
return
false
}
console
.
log
(
'submit'
)
let
childrenArr
=
[]
if
(
this
.
pageType
===
0
)
{
...
...
@@ -1168,6 +1201,7 @@ export default {
'name'
:
this
.
BaseForm
.
name
,
'phoneNumber'
:
this
.
BaseForm
.
phone
,
'type'
:
this
.
pageType
===
0
?
0
:
this
.
pageType
,
'isSign'
:
this
.
isSign
,
// 'healthCode': this.BaseForm.code,
'userAdress'
:
this
.
BaseForm
.
street
,
'shenBm'
:
this
.
addressForm
.
ProvinceCode
,
...
...
@@ -1235,6 +1269,55 @@ export default {
})
})
},
handleUpateSign
(
signId
)
{
// 根据签约单ID修改签字字段数据
let
params
=
{
signId
:
signId
,
image
:
this
.
signatureImage
}
this
.
btnDisabled
=
true
this
.
$Indicator
.
open
()
updateSignImgBySignId
(
params
).
then
(
res
=>
{
this
.
btnDisabled
=
false
this
.
$Indicator
.
close
()
if
(
res
.
code
===
200
&&
res
.
value
)
{
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
({
message
:
'签约失败'
,
position
:
'center'
,
duration
:
3000
})
}
}).
catch
((
error
)
=>
{
this
.
btnDisabled
=
false
this
.
$Indicator
.
close
()
this
.
$toast
({
message
:
error
.
message
,
position
:
'center'
,
duration
:
3000
})
})
},
handleStep
(
index
)
{
console
.
log
(
'handleStep'
+
index
)
if
(
index
===
1
&&
this
.
addressForm
.
province
!==
''
)
{
...
...
src/views/voucherDetail/index.vue
View file @
bebcf78e
...
...
@@ -22,8 +22,10 @@
<div
class=
"text-center"
>
{{
voucherData
.
voucherName
}}
</div>
<div
class=
"qrcode-block"
>
<div
class=
"qrcode-inner"
>
<mt-spinner
v-show=
"qrcodeLoading"
type=
"fading-circle"
color=
"#43d1be"
></mt-spinner>
<div
id=
"qrcode"
></div>
<div
class=
"qrcode-frame"
>
<mt-spinner
v-show=
"qrcodeLoading"
type=
"fading-circle"
color=
"#43d1be"
></mt-spinner>
<div
id=
"qrcode"
></div>
</div>
</div>
<h4
class=
"text-danger text-center"
>
请在使用时将券码出示给医生
</h4>
</div>
...
...
@@ -383,7 +385,7 @@ export default {
margin-bottom
:
1em
;
text-align
:
center
;
}
.detail-card
.body
.qrcode-inner
#qrcode
{
.detail-card
.body
.qrcode-inner
.qrcode-frame
{
display
:
inline-block
;
width
:
220px
;
height
:
220px
;
...
...
@@ -391,12 +393,20 @@ export default {
background-color
:
#fff
;
box-shadow
:
0
0
16px
rgb
(
221
,
221
,
221
,
1
);
}
.detail-card
.body
.qrcode-inner
#qrcode
{
display
:
inline-block
;
width
:
200px
;
height
:
200px
;
}
/* .detail-card .body .qrcode-inner #qrcode > img:nth-child(2) {
display: none;
} */
</
style
>
<
style
>
.detail-card
.mint-spinner-fading-circle
{
width
:
5em
!important
;
height
:
5em
!important
;
margin
:
0
auto
;
margin
:
4em
auto
0
auto
;
}
</
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