【开发】增加会员缴费已有缴费的提示
This commit is contained in:
@@ -63,6 +63,8 @@ const getCertificateByMemberId = (params) => getAction('/vinCertificate/vinCerti
|
||||
const getMemberInfoById = (params) => getAction('/memberInfo/memberInfo/queryById', params)
|
||||
const getCheckInfo = (params) => getAction('/paymentInfo/paymentCheckinfo/queryByPaymentId', params)
|
||||
const getByMemberTime = (params) => getAction('/threshold/thresholdSetting/getByMemberTime', params)
|
||||
// 判断会员是否有未审核的缴费
|
||||
const judgeMemberNotApprove = (params) => getAction('/paymentInfo/existNotApproved', params)
|
||||
// 会员下载缴费通知单
|
||||
const downNewestNotice = (params) => getAction('/approvalDocumentNumber/approvalDocumentNumber/queryLatest', params)
|
||||
/****会员缴费 列表页所用接口-结束 ****/
|
||||
@@ -94,6 +96,7 @@ export {
|
||||
getMemberInfoById,
|
||||
getCheckInfo,
|
||||
getByMemberTime,
|
||||
judgeMemberNotApprove,
|
||||
downNewestNotice,
|
||||
getCertificateById,
|
||||
|
||||
|
||||
@@ -512,7 +512,8 @@ import {
|
||||
getMemberInfoById,
|
||||
getCheckInfo,
|
||||
getByMemberTime,
|
||||
downNewestNotice
|
||||
downNewestNotice,
|
||||
judgeMemberNotApprove
|
||||
} from '@/api/standardsAssociationApi'
|
||||
import JUpload from '@/components/standardsAssociation/JUpload'
|
||||
import PreViewImgModal from './PreViewImgModal'
|
||||
@@ -1005,57 +1006,80 @@ export default {
|
||||
this.initVal = 1
|
||||
},
|
||||
handleOk() {
|
||||
console.log(1111)
|
||||
|
||||
const that = this
|
||||
// 触发表单验证
|
||||
that.form.validateFields({ force: true }, (err, values) => {
|
||||
that.form.validateFields({ force: true }, async (err, values) => {
|
||||
if (!err) {
|
||||
that.confirmLoading = true
|
||||
let httpurl = ''
|
||||
let method = ''
|
||||
if (!this.model.id) {
|
||||
httpurl += this.url.add
|
||||
method = 'post'
|
||||
} else {
|
||||
if (this.checkFlag) {
|
||||
httpurl += this.url.check
|
||||
} else {
|
||||
httpurl += this.url.edit
|
||||
}
|
||||
method = 'put'
|
||||
// 判断会员是否有未审核的缴费
|
||||
let flag = await this.judgeMemberNotApproveFunc(this.memberId)
|
||||
if(flag === 'true' ){
|
||||
// 提示
|
||||
that.$confirm({
|
||||
title: '确认提交',
|
||||
content: '当前已有待审核缴费订单,为避免重复提交,请确认是否再次提交缴费订单?',
|
||||
onOk:function () {
|
||||
that.handleSubmit(values)
|
||||
},
|
||||
onCancel:function (){
|
||||
that.handleCancel()
|
||||
return
|
||||
}
|
||||
})
|
||||
}else {
|
||||
this.handleSubmit(values)
|
||||
}
|
||||
if (Number(this.checkResult) === 0) {
|
||||
this.checkResult = 2
|
||||
this.model.paymentStatus = 2
|
||||
} else if (Number(this.checkResult) === 1) {
|
||||
this.checkResult = 2
|
||||
this.model.paymentStatus = 3
|
||||
} else {
|
||||
this.model.paymentStatus = 1
|
||||
}
|
||||
const formData = Object.assign(this.model, values)
|
||||
if (this.typeFlag) {
|
||||
formData.paymentType = 1
|
||||
} else {
|
||||
formData.paymentType = 0
|
||||
}
|
||||
// 客户要去掉网员服务费字段,但是后端没有去掉校验,所以前端写死
|
||||
formData.serviceCharge = 0
|
||||
that.confirmLoading = false
|
||||
// return
|
||||
httpAction(httpurl, formData, method).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
that.$emit('ok')
|
||||
that.close()
|
||||
} else {
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
that.confirmLoading = false
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
handleSubmit(values){
|
||||
const that = this
|
||||
that.confirmLoading = true
|
||||
let httpurl = ''
|
||||
let method = ''
|
||||
if (!this.model.id) {
|
||||
httpurl += this.url.add
|
||||
method = 'post'
|
||||
} else {
|
||||
if (this.checkFlag) {
|
||||
httpurl += this.url.check
|
||||
} else {
|
||||
httpurl += this.url.edit
|
||||
}
|
||||
method = 'put'
|
||||
}
|
||||
if (Number(this.checkResult) === 0) {
|
||||
this.checkResult = 2
|
||||
this.model.paymentStatus = 2
|
||||
} else if (Number(this.checkResult) === 1) {
|
||||
this.checkResult = 2
|
||||
this.model.paymentStatus = 3
|
||||
} else {
|
||||
this.model.paymentStatus = 1
|
||||
}
|
||||
const formData = Object.assign(this.model, values)
|
||||
if (this.typeFlag) {
|
||||
formData.paymentType = 1
|
||||
} else {
|
||||
formData.paymentType = 0
|
||||
}
|
||||
// 客户要去掉网员服务费字段,但是后端没有去掉校验,所以前端写死
|
||||
formData.serviceCharge = 0
|
||||
that.confirmLoading = false
|
||||
// return
|
||||
httpAction(httpurl, formData, method).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
that.$emit('ok')
|
||||
that.close()
|
||||
} else {
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
that.confirmLoading = false
|
||||
})
|
||||
},
|
||||
handleTemp() {
|
||||
const that = this
|
||||
@@ -1229,6 +1253,20 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 判断会员是否有未审核的缴费
|
||||
* */
|
||||
judgeMemberNotApproveFunc(id) {
|
||||
return new Promise(resolve => {
|
||||
const param = {
|
||||
memberId: id
|
||||
}
|
||||
judgeMemberNotApprove(param).then(res => {
|
||||
resolve(res.message)
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/* 选择发票*/
|
||||
invoiceRequirementsChange(value) {
|
||||
this.currentSelectInvoiceType = Number(value)
|
||||
|
||||
Reference in New Issue
Block a user