更改签约校验

This commit is contained in:
闫晓茹 2023-11-10 09:46:18 +08:00
parent e04acfa2dc
commit ba0c05a4ab

View File

@ -238,15 +238,83 @@
}, },
methods: { methods: {
protocolshowtrue() { protocolshowtrue() {
if (!this.query.county || !this.query.orgNo || !this.query.userName || !this.query.crowdList || this.query if (!this.query.residentName) {
.crowdList.length == 0 || !this.query.packageList ||
this.query.packageList.length == 0) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '请完善完信息', title: '请输入名字',
type: 'error', type: 'error',
}) })
return } else if (!this.query.identity) {
} this.$refs.uToast.show({
title: '请输入身份证号',
type: 'error',
})
} else if (!this.query.phone) {
this.$refs.uToast.show({
title: '请输入手机号',
type: 'error',
})
} else if (!this.query.countyName) {
this.$refs.uToast.show({
title: '请选择现住区县',
type: 'error',
})
} else if (!this.query.townName) {
this.$refs.uToast.show({
title: '请选择乡镇/街道',
type: 'error',
})
} else if (!this.query.committeeName) {
this.$refs.uToast.show({
title: '请选择村/社区',
type: 'error',
})
} else if (!this.query.address) {
this.$refs.uToast.show({
title: '请输入详细地址',
type: 'error',
})
} else if (!this.query.orgName) {
this.$refs.uToast.show({
title: '请选择签约机构',
type: 'error',
})
} else if (!this.query.userName) {
this.$refs.uToast.show({
title: '请输入医生名字',
type: 'error',
})
} else if (!this.query.packagesName) {
this.$refs.uToast.show({
title: '请选择服务包',
type: 'error',
})
} else if (!this.query.signTime) {
this.$refs.uToast.show({
title: '请选择签约时间',
type: 'error',
})
} else if (!this.query.signYears) {
this.$refs.uToast.show({
title: '请选择签约周期',
type: 'error',
})
} else if (this.radio != 2) {
this.$refs.uToast.show({
title: '请先同意并签署服务协议',
type: 'error',
})
}else{
// if (!this.query.county || !this.query.orgNo || !this.query.userName || !this.query.crowdList || this.query
// .crowdList.length == 0 || !this.query.packageList ||
// this.query.packageList.length == 0) {
// this.$refs.uToast.show({
// title: '',
// type: 'error',
// })
// return
// }
if (this.query.signYears >= 10) { if (this.query.signYears >= 10) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '签约周期过长', title: '签约周期过长',
@ -282,6 +350,7 @@
} else { } else {
this.protocolshow = true this.protocolshow = true
} }
}
}, },
updata() { updata() {
if (this.radio == 2) { if (this.radio == 2) {
@ -308,6 +377,7 @@
this.query.gender = 99 this.query.gender = 99
} }
} }
applysave(this.query).then(res => { applysave(this.query).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.$refs.uToast.show({ this.$refs.uToast.show({
@ -325,6 +395,7 @@
} }
}) })
// }
} else { } else {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '请先同意并签署服务协议', title: '请先同意并签署服务协议',