Commit 41897390 by 潘琦

张家港生育全程签约回滚至之前版本(无已签约,未签约区分版本)

parent bebcf78e
...@@ -34,6 +34,10 @@ router.beforeEach((to, from, next) => { ...@@ -34,6 +34,10 @@ router.beforeEach((to, from, next) => {
wxpermission(0, () => {}) wxpermission(0, () => {})
next() next()
} }
} else {
if (globalNewUrl !== '') {
window.location.href = globalNewUrl
}
} }
// store.dispatch('setToken', '490cd9b7-dca7-4cc3-87e9-5eacbb5a5d77') // store.dispatch('setToken', '490cd9b7-dca7-4cc3-87e9-5eacbb5a5d77')
}) })
...@@ -47,7 +51,7 @@ let getWXOauth = () => { ...@@ -47,7 +51,7 @@ let getWXOauth = () => {
authId = '&auth_id=' + getParamsByUrl(window.location.href).auth_id authId = '&auth_id=' + getParamsByUrl(window.location.href).auth_id
store.dispatch('setAuthId', getParamsByUrl(window.location.href).auth_id) store.dispatch('setAuthId', getParamsByUrl(window.location.href).auth_id)
} }
window.location.href = defaultUrl + '/wxoauth/route?redirect_uri=' + encodeURIComponent(url) + authId + '&scoe=&auth_scene=voucher' window.location.href = defaultUrl + '/wxoauth/route?redirect_uri=' + encodeURIComponent(url) + authId + '&auth_scene=voucher'
} }
let getOauthFn = (callback) => { let getOauthFn = (callback) => {
...@@ -139,6 +143,7 @@ const getUserByTokenFn = (token, code, callback) => { ...@@ -139,6 +143,7 @@ const getUserByTokenFn = (token, code, callback) => {
}) })
} }
let globalNewUrl = ''
// 判断链接是否被微信分享篡改 // 判断链接是否被微信分享篡改
const redirectUrl = () => { const redirectUrl = () => {
const curUrl = window.location.href const curUrl = window.location.href
...@@ -156,18 +161,19 @@ const redirectUrl = () => { ...@@ -156,18 +161,19 @@ const redirectUrl = () => {
// position: 'center', // position: 'center',
// duration: 5 * 1000 // duration: 5 * 1000
// }) // })
window.location.href = newUrl globalNewUrl = newUrl
// window.location.href = newUrl
return false return false
} else if (curUrl.indexOf('?scene=0') >= 0) { } else if (curUrl.indexOf('?scene=0') >= 0) {
let newUrl = curUrl.replace('?scene=0', '') let newUrl = curUrl.replace('?scene=0', '')
window.location.href = newUrl globalNewUrl = newUrl
return false return false
} else if (curUrl.indexOf('/voucher/?') >= 0) { } else if (curUrl.indexOf('/voucher/?') >= 0) {
const urlArr = curUrl.split('/voucher/?') const urlArr = curUrl.split('/voucher/?')
const locationStr = urlArr[0] const locationStr = urlArr[0]
const pathArr = urlArr[1].split('#') const pathArr = urlArr[1].split('#')
let newUrl = locationStr + '/voucher/#' + pathArr[1] let newUrl = locationStr + '/voucher/#' + pathArr[1]
window.location.href = newUrl globalNewUrl = newUrl
return false return false
} else { } else {
return true return true
......
...@@ -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" :disabled="signStatus=='update'"/> <input type="text" class="form-control" maxlength="11" placeholder="请输入有效手机号" @blur="BaseValidatePhone" v-model="BaseForm.phone"/>
<span v-show="!BaseValidate.phoneState" class="small-hint">请输入有效手机号</span> <span v-show="!BaseValidate.phoneState" class="small-hint">请输入有效手机号</span>
</div> </div>
</div> </div>
...@@ -47,8 +47,7 @@ ...@@ -47,8 +47,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" v-model="BaseForm.lastMensesTime" v-if="signStatus=='update'" :disabled="signStatus=='update'"/> <div class="td-table" @click="openPickerLastMensesTime">
<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>
...@@ -64,11 +63,7 @@ ...@@ -64,11 +63,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">
<div v-if="signStatus=='update'"> <div class="td-table" @click="openPopupAddress">
<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>
...@@ -89,7 +84,7 @@ ...@@ -89,7 +84,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" :disabled="signStatus=='update'"/> <input type="text" v-model="BaseForm.street" class="form-control" placeholder="请输入小区/楼栋/门牌号(最多25字)" maxlength="25" @blur="BaseValidateStreet" />
<span v-if="!BaseValidate.streetState" class="small-hint">请输入详细地址</span> <span v-if="!BaseValidate.streetState" class="small-hint">请输入详细地址</span>
</div> </div>
</div> </div>
...@@ -488,7 +483,7 @@ ...@@ -488,7 +483,7 @@
<script> <script>
import store from '@/store' import store from '@/store'
import { getOrgInfo, getSignInfo, getAreaList, getVillages, getOrgsByAreaCode, createSign, updateSignImgBySignId } from '@/api/signing/signing' import { getOrgInfo, getSignInfo, getAreaList, getVillages, getOrgsByAreaCode, createSign } 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'
...@@ -515,7 +510,6 @@ export default { ...@@ -515,7 +510,6 @@ 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: [
{ {
...@@ -741,7 +735,6 @@ export default { ...@@ -741,7 +735,6 @@ 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
...@@ -801,21 +794,6 @@ export default { ...@@ -801,21 +794,6 @@ 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
...@@ -1131,16 +1109,9 @@ export default { ...@@ -1131,16 +1109,9 @@ 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
...@@ -1162,10 +1133,6 @@ export default { ...@@ -1162,10 +1133,6 @@ 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) {
...@@ -1201,7 +1168,6 @@ export default { ...@@ -1201,7 +1168,6 @@ 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,
...@@ -1269,55 +1235,6 @@ export default { ...@@ -1269,55 +1235,6 @@ 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 !== '') {
......
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