Commit bebcf78e by 潘琦

张家港签约增加用户手段选择是否签约功能;券详情核销二维码Android重复问题;

parent af62afb5
...@@ -54,6 +54,15 @@ export function createSign (params) { ...@@ -54,6 +54,15 @@ export function createSign (params) {
}) })
} }
// 修改签约单签名字段
export function updateSignImgBySignId (params) {
return request({
url: '/v1/voucher/reSign',
method: 'POST',
data: params
})
}
// 签约详情(根据sign id) // 签约详情(根据sign id)
export function getSignInfoBySignId (params) { export function getSignInfoBySignId (params) {
return request({ return request({
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<div class="tr"> <div class="tr">
<div class="td label">手机号</div> <div class="td label">手机号</div>
<div class="td text-right"> <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> <span v-show="!BaseValidate.phoneState" class="small-hint">请输入有效手机号</span>
</div> </div>
</div> </div>
...@@ -47,7 +47,8 @@ ...@@ -47,7 +47,8 @@
<div class="tr"> <div class="tr">
<div class="td label">末次月经时间</div> <div class="td label">末次月经时间</div>
<div class="td text-right"> <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"> <div class="td-table-cell text">
<span v-if="BaseForm.lastMensesTime === ''">请选择末次月经时间</span> <span v-if="BaseForm.lastMensesTime === ''">请选择末次月经时间</span>
<span v-else class="light">{{BaseForm.lastMensesTime}}</span> <span v-else class="light">{{BaseForm.lastMensesTime}}</span>
...@@ -63,7 +64,11 @@ ...@@ -63,7 +64,11 @@
<div class="tr"> <div class="tr">
<div class="td label">现住址</div> <div class="td label">现住址</div>
<div class="td text-right"> <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"> <div class="td-table-cell text">
<p class="m-b-normal"> <p class="m-b-normal">
<span v-if="BaseForm.address === '' || BaseForm.address === ' '">请选择现在居住地址</span> <span v-if="BaseForm.address === '' || BaseForm.address === ' '">请选择现在居住地址</span>
...@@ -84,7 +89,7 @@ ...@@ -84,7 +89,7 @@
<div class="tr"> <div class="tr">
<div class="td label">详细地址</div> <div class="td label">详细地址</div>
<div class="td text-right"> <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> <span v-if="!BaseValidate.streetState" class="small-hint">请输入详细地址</span>
</div> </div>
</div> </div>
...@@ -483,7 +488,7 @@ ...@@ -483,7 +488,7 @@
<script> <script>
import store from '@/store' 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 { validatename, cardid, isvalidatemobile } from '@/util/validate'
import { SubtractDay, getBirthByIdNumber, getSexByIdCard, getAgeByBirth } from '@/util/index' import { SubtractDay, getBirthByIdNumber, getSexByIdCard, getAgeByBirth } from '@/util/index'
import _defaultPicture from '../../assets/images/org-default-picture.png' import _defaultPicture from '../../assets/images/org-default-picture.png'
...@@ -510,6 +515,7 @@ export default { ...@@ -510,6 +515,7 @@ export default {
}, },
signStatus: 'create', signStatus: 'create',
signState: '', // 0=待审核 1=审核通过 2=审核不通过 3=审核已取消 signState: '', // 0=待审核 1=审核通过 2=审核不通过 3=审核已取消
isSign: null, // 是否签约 0=签约 1=不签约
alreadySignNum: 0, // 已签约服务人员数 alreadySignNum: 0, // 已签约服务人员数
childrenArr: [ childrenArr: [
{ {
...@@ -735,6 +741,7 @@ export default { ...@@ -735,6 +741,7 @@ export default {
this.accountId = data.accountId this.accountId = data.accountId
this.fileUuid = data.fileUuid this.fileUuid = data.fileUuid
this.signId = data.signId this.signId = data.signId
this.isSign = data.isSign
this.userId = data.userId this.userId = data.userId
this.signState = data.state this.signState = data.state
this.BaseForm.name = data.name this.BaseForm.name = data.name
...@@ -794,6 +801,21 @@ export default { ...@@ -794,6 +801,21 @@ export default {
this.BaseForm.chooseImages2.push(data.hyzl4) 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 (this.pageType === 1) { // 签约(儿童)服务成员回显
if (data.bs.length > 0) { if (data.bs.length > 0) {
this.alreadySignNum = data.bs.length this.alreadySignNum = data.bs.length
...@@ -1109,9 +1131,16 @@ export default { ...@@ -1109,9 +1131,16 @@ export default {
}) })
return false return false
} }
this.$MessageBox.confirm('是否直接签约?').then(action => {
this.isSign = 1
this.SignatureSheetVisible = true this.SignatureSheetVisible = true
this.modalVisible = true this.modalVisible = true
this.signCanvasW = this.$refs.signCanvasBlock.offsetWidth this.signCanvasW = this.$refs.signCanvasBlock.offsetWidth
}).catch(() => {
console.log('cancel')
this.isSign = 0
this.handelSave()
})
}, },
closeSignPopup () { closeSignPopup () {
this.SignatureSheetVisible = false this.SignatureSheetVisible = false
...@@ -1133,6 +1162,10 @@ export default { ...@@ -1133,6 +1162,10 @@ export default {
this.$refs.signature.clear() this.$refs.signature.clear()
}, },
handelSave () { handelSave () {
if (this.signId !== 0 && this.signId !== '' && parseInt(this.isSign) === 0) { // 保存数据后,已有签约单,直接重新修改该签约单签名数据
this.handleUpateSign(this.signId)
return false
}
console.log('submit') console.log('submit')
let childrenArr = [] let childrenArr = []
if (this.pageType === 0) { if (this.pageType === 0) {
...@@ -1168,6 +1201,7 @@ export default { ...@@ -1168,6 +1201,7 @@ export default {
'name': this.BaseForm.name, 'name': this.BaseForm.name,
'phoneNumber': this.BaseForm.phone, 'phoneNumber': this.BaseForm.phone,
'type': this.pageType === 0 ? 0 : this.pageType, 'type': this.pageType === 0 ? 0 : this.pageType,
'isSign': this.isSign,
// 'healthCode': this.BaseForm.code, // 'healthCode': this.BaseForm.code,
'userAdress': this.BaseForm.street, 'userAdress': this.BaseForm.street,
'shenBm': this.addressForm.ProvinceCode, 'shenBm': this.addressForm.ProvinceCode,
...@@ -1235,6 +1269,55 @@ export default { ...@@ -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) { handleStep (index) {
console.log('handleStep' + index) console.log('handleStep' + index)
if (index === 1 && this.addressForm.province !== '') { if (index === 1 && this.addressForm.province !== '') {
......
...@@ -22,9 +22,11 @@ ...@@ -22,9 +22,11 @@
<div class="text-center">{{voucherData.voucherName}}</div> <div class="text-center">{{voucherData.voucherName}}</div>
<div class="qrcode-block"> <div class="qrcode-block">
<div class="qrcode-inner"> <div class="qrcode-inner">
<div class="qrcode-frame">
<mt-spinner v-show="qrcodeLoading" type="fading-circle" color="#43d1be"></mt-spinner> <mt-spinner v-show="qrcodeLoading" type="fading-circle" color="#43d1be"></mt-spinner>
<div id="qrcode"></div> <div id="qrcode"></div>
</div> </div>
</div>
<h4 class="text-danger text-center">请在使用时将券码出示给医生</h4> <h4 class="text-danger text-center">请在使用时将券码出示给医生</h4>
</div> </div>
<div class="table"> <div class="table">
...@@ -383,7 +385,7 @@ export default { ...@@ -383,7 +385,7 @@ export default {
margin-bottom: 1em; margin-bottom: 1em;
text-align: center; text-align: center;
} }
.detail-card .body .qrcode-inner #qrcode { .detail-card .body .qrcode-inner .qrcode-frame{
display: inline-block; display: inline-block;
width: 220px; width: 220px;
height: 220px; height: 220px;
...@@ -391,12 +393,20 @@ export default { ...@@ -391,12 +393,20 @@ export default {
background-color: #fff; background-color: #fff;
box-shadow: 0 0 16px rgb(221, 221, 221, 1); 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>
<style> <style>
.detail-card .mint-spinner-fading-circle{ .detail-card .mint-spinner-fading-circle{
width: 5em !important; width: 5em !important;
height: 5em !important; height: 5em !important;
margin: 0 auto; margin: 4em auto 0 auto;
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment