Commit 93ca7769 by 潘琦

乌当增加续约功能;张家港末次月经时间可不填且无范围限制;

parent ee44cf2a
......@@ -63,6 +63,15 @@ export function createSignZJG (params) {
})
}
// 续约(乌当)
export function extendSignWD (params) {
return request({
url: '/v1/voucher/wd/extendSign',
method: 'GET',
params: params
})
}
// 修改签约单签名字段
export function updateSignImgBySignId (params) {
return request({
......
......@@ -469,7 +469,7 @@
:endDate="pickerBirthEnd">
</mt-datetime-picker>
<!-- 末次月经时间picker -->
<mt-datetime-picker
<!-- <mt-datetime-picker
v-model="pickerLastMensesTimeDefault"
ref="pickerLastMensesTime"
type="date"
......@@ -479,6 +479,16 @@
@confirm="lastMensesTimePickerConfirm"
:startDate="pickerLastMensesTimeStart"
:endDate="pickerLastMensesTimeEnd">
</mt-datetime-picker> -->
<mt-datetime-picker
v-model="pickerLastMensesTimeDefault"
ref="pickerLastMensesTime"
type="date"
year-format="{value} 年"
month-format="{value} 月"
date-format="{value} 日"
@confirm="lastMensesTimePickerConfirm"
:endDate="pickerLastMensesTimeEnd">
</mt-datetime-picker>
<div class="light-box" :class="lightBoxVisible?'show':'hide'" @click="handelLightBoxClose">
<div class="table">
......
......@@ -449,7 +449,7 @@
<script>
import store from '@/store'
import { getOrgInfo, getSignInfo, getAreaList, getVillages, getOrgsByAreaCode, createSignWD } from '@/api/signing/signing'
import { getOrgInfo, getSignInfo, getAreaList, getVillages, getOrgsByAreaCode, createSignWD, extendSignWD } 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'
......@@ -779,6 +779,13 @@ export default {
}
// 0=待审核 1=审核通过 2=审核不通过 3=审核已取消
if (parseInt(data.isRenew) === 0) {
this.$MessageBox.confirm('您的签约快过期,请及时续约!').then(action => {
this.renewSign(data.signId)
}).catch(() => {
console.log('cancel')
})
} else {
if (data.state === '1' && (this.pageType === 0 || this.pageType === 1)) { // 审核通过跳转至首页
this.$router.push({
path: '/home'
......@@ -793,6 +800,7 @@ export default {
wx.closeWindow()
}, 2500)
}
}
}).catch((error) => {
this.$Indicator.close()
this.$toast({
......@@ -1209,6 +1217,31 @@ export default {
})
})
},
renewSign (signId) { // 续约
let params = {
signId: signId
}
extendSignWD(params).then(res => {
if (res.code === 200 && res.value) {
this.$toast({
message: '续约成功!',
position: 'center',
duration: 3000
})
setTimeout(function () {
this.$router.push({
path: '/home'
})
}, 2500)
} else {
this.$toast({
message: res.message,
position: 'center',
duration: 3000
})
}
})
},
handleStep (index) {
console.log('handleStep' + index)
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