Commit 01cf53c3 by 潘琦

生育全程签约增加已签约未签约流程功能;

parent 27d1d9c6
...@@ -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>
...@@ -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 = parseInt(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 () {
that.$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
...@@ -1061,7 +1083,7 @@ export default { ...@@ -1061,7 +1083,7 @@ export default {
}, },
confirmSignature () { confirmSignature () {
if (parseInt(this.pageType) === 0) { if (parseInt(this.pageType) === 0) {
if (this.signState === '1') { // 审核通过 跳转至首页 if (this.signState === '1' && this.isSign === 0) { // 已签约已审核通过 跳转至首页
this.$router.push({ this.$router.push({
path: '/home' path: '/home'
}) })
...@@ -1113,9 +1135,22 @@ export default { ...@@ -1113,9 +1135,22 @@ export default {
}) })
return false return false
} }
if (this.signState === '1' && this.isSign === 1) { // 已审核未签约
this.SignatureSheetVisible = true
this.modalVisible = true
this.signCanvasW = this.$refs.signCanvasBlock.offsetWidth
} else {
this.$MessageBox.confirm('是否直接签约?').then(action => {
this.isSign = 0 // 已签约
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 = 1 // 未签约
this.handelSave()
})
}
}, },
closeSignPopup () { closeSignPopup () {
this.SignatureSheetVisible = false this.SignatureSheetVisible = false
...@@ -1123,7 +1158,7 @@ export default { ...@@ -1123,7 +1158,7 @@ export default {
}, },
handelSubmit () { // 签名无误提交 handelSubmit () { // 签名无误提交
this.signatureImage = this.$refs.signature.save() this.signatureImage = this.$refs.signature.save()
if (this.$refs.signature.isEmpty()) { if (this.$refs.signature.isEmpty() || this.signWaterMarkState) {
this.$toast({ this.$toast({
message: '未获到签名信息,请先签名!', message: '未获到签名信息,请先签名!',
position: 'center', position: 'center',
...@@ -1137,6 +1172,11 @@ export default { ...@@ -1137,6 +1172,11 @@ export default {
this.$refs.signature.clear() this.$refs.signature.clear()
}, },
handelSave () { handelSave () {
// 签约信息(未签约)回显,再次进入签约,重新修改该签名数据
if (this.signId && this.signId !== 0 && this.signId !== '' && parseInt(this.isSign) === 1) {
this.handleUpateSign(this.signId)
return false
}
console.log('submit') console.log('submit')
let childrenArr = [] let childrenArr = []
if (this.pageType === 0) { if (this.pageType === 0) {
...@@ -1172,6 +1212,7 @@ export default { ...@@ -1172,6 +1212,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,
...@@ -1214,7 +1255,7 @@ export default { ...@@ -1214,7 +1255,7 @@ export default {
} }
} else if (this.pageType === 1) { } else if (this.pageType === 1) {
this.$toast({ this.$toast({
message: '签约成功!', message: '保存成功!',
position: 'center', position: 'center',
duration: 3000 duration: 3000
}) })
...@@ -1239,6 +1280,42 @@ export default { ...@@ -1239,6 +1280,42 @@ 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) {
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 !== '') {
......
...@@ -455,7 +455,7 @@ import { SubtractDay, getBirthByIdNumber, getSexByIdCard, getAgeByBirth } from ' ...@@ -455,7 +455,7 @@ import { SubtractDay, getBirthByIdNumber, getSexByIdCard, getAgeByBirth } from '
import _defaultPicture from '../../assets/images/org-default-picture.png' import _defaultPicture from '../../assets/images/org-default-picture.png'
import _noticePicture from '../../assets/images/notice-img.png' import _noticePicture from '../../assets/images/notice-img.png'
import _signatureBg from '../../assets/images/signature-bg.png' import _signatureBg from '../../assets/images/signature-bg.png'
// import { wxpermission } from '@/wxpermission' import { wxpermission } from '@/wxpermission'
const wx = require('weixin-js-sdk') const wx = require('weixin-js-sdk')
export default { export default {
......
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