[update]-企业端报名的时候增加报名信息

This commit is contained in:
fengchenchen
2023-07-20 09:10:00 +08:00
parent cf8c8d79d8
commit 48d38c1486
4 changed files with 97 additions and 21 deletions
+6 -1
View File
@@ -63,6 +63,9 @@ const queryContactList = (params) => getAction('/company/payContactsManagement/q
// 通过联系人id查询邮寄信息
const queryPostInfoById = (params) => getAction('/company/payContactsManagement/queryByIdMeeting', params)
// 报名的时候修改企业的信息
const updateInvoiceBySignUp = (params) => postAction('/company/payCompanyManagement/updateInvoice', params)
export {
queryCommonProjectById,
queryContactInfoByMemberId,
@@ -91,5 +94,7 @@ export {
vipMemberCost,
judgeInternalEnterprise,
judgeMeetingCode,
upgradeVip
upgradeVip,
updateInvoiceBySignUp
}
+30 -7
View File
@@ -76,9 +76,9 @@
</a-form-item>
</a-col>
<a-col :xxl="8" :xl="12" :sm="24">
<a-form-item label="银行户名" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入银行户名"
v-decorator="['bankAccountName', validatorRules.bankAccountName]"
<a-form-item label="银行账号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入银行账号"
v-decorator="['bankAccount', validatorRules.bankAccount]"
:maxLength='50'
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
</a-form-item>
@@ -264,8 +264,8 @@ export default {
rules: [{ required: true, message: '请输入开户行' }],
validateTrigger: 'blur'
},
bankAccountName: {
rules: [{ required: true, message: '请输入银行户名' }],
bankAccount: {
rules: [{ required: true, message: '请输入银行账号' }],
validateTrigger: 'blur'
},
linkBankNumber: { rules: [{ required: true, message: '请输入联行号' }], validateTrigger: 'blur' },
@@ -300,6 +300,29 @@ export default {
handleOk() {
this.form.validateFields((err, values) => {
if (!err) {
// 如果需要发票,判断当前的发票信息是否进行了修改,用于最后提交的时候判断是否请求接口,减少冗余的请求
let needInvoice = Number(values.needInvoice)
if (needInvoice) {
let confirmArr = [
{name: '企业名称', key: 'companyName'},
{name: '信用代码', key: 'dutyCode'},
]
if(needInvoice === InvoiceTypeEnums.special.index) {
confirmArr = confirmArr.concat([
{name: '公司地址', key: 'companyAddress'},
{name: '公司电话', key: 'companyPhone'},
{name: '开户行', key: 'openingBank'},
{name: '银行账号', key: 'bankAccount'},
{name: '联行号', key: 'linkBankNumber'}
])
}
let changeInvoiceFlag = confirmArr.some(tt => {
if(this.selectedCompany[tt.key] !== values[tt.key]) {
return true
}
})
values.changeInvoiceFlag = changeInvoiceFlag
}
this.$emit('formData', values)
} else {
this.$emit('formData', {stop: true})
@@ -424,7 +447,7 @@ export default {
setInvoiceFormItem() {
if (this.selectedInvoiceType === InvoiceTypeEnums.special.index) {
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.selectedCompany, 'companyName', 'dutyCode', 'companyAddress', 'companyPhone', 'bankAccountName', 'openingBank', 'linkBankNumber'))
this.form.setFieldsValue(pick(this.selectedCompany, 'companyName', 'dutyCode', 'companyAddress', 'companyPhone', 'bankAccount', 'openingBank', 'linkBankNumber'))
})
} else if(this.selectedInvoiceType === InvoiceTypeEnums.plain.index) {
this.$nextTick(() => {
@@ -434,7 +457,7 @@ export default {
},
// 清空 发票信息的数据
clearInvoiceFormItem() {
this.form.resetFields(['companyName', 'dutyCode', 'companyAddress', 'companyPhone', 'bankAccountName', 'openingBank', 'linkBankNumber'])
this.form.resetFields(['companyName', 'dutyCode', 'companyAddress', 'companyPhone', 'bankAccount', 'openingBank', 'linkBankNumber'])
},
/*
+14
View File
@@ -206,6 +206,20 @@
<template v-if="identifyType === 1 && (guestType === 4 || guestType === 5)">
<seminar-partner-form ref="seminarPartnerForm" @formData="getFormData"></seminar-partner-form>
</template>
<div class="item-title">其他信息</div>
<a-row :gutter="24">
<a-col :xxl="8" :xl="12" :sm="24">
<a-form-item label="备注" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol">
<a-textarea
placeholder="请输入备注"
:auto-size="{ minRows: 3, maxRows: 6 }"
v-decorator="['remark']"
:maxLength='200'
@change="e => {e.target.value = (e.target.value + '').trim()}"/>
</a-form-item>
</a-col>
</a-row>
<section class="meetingCost">
费用合计:{{ meetingCostSum }} 元
</section>
@@ -23,6 +23,9 @@
</template>
<script>
import {updateInvoiceBySignUp} from '../../../api/incomePaymentsApi'
import {InvoiceTypeEnums} from '../../../enums/commonEnum'
export default {
name: 'InvoiceConfirmModal',
data() {
@@ -41,28 +44,59 @@ export default {
sm: { span: 16 }
},
confirmLoading: false,
confirmArr: [
{name: '企业名称', key: 'companyName'},
{name: '信用代码', key: 'dutyCode'},
{name: '公司地址', key: 'companyAddress'},
{name: '公司电话', key: 'companyPhone'},
{name: '开户行', key: 'openingBank'},
{name: '银行户名', key: 'bankAccountName'},
{name: '联行号', key: 'linkBankNumber'},
],
confirmObj: {} // 需要验证的信息
}
},
computed: {
confirmArr() {
let arr = [{name: '企业名称', key: 'companyName'}, {name: '信用代码', key: 'dutyCode'}]
if(Number(this.confirmObj.needInvoice) === InvoiceTypeEnums.special.index) {
arr = arr.concat([
{name: '公司地址', key: 'companyAddress'},
{name: '公司电话', key: 'companyPhone'},
{name: '开户行', key: 'openingBank'},
{name: '银行账号', key: 'bankAccount'},
{name: '联行号', key: 'linkBankNumber'}
])
}
return arr
}
},
methods: {
show(obj) {
this.confirmObj = {...obj}
this.visible = true
},
handleOk() {
// TODO 请求接口同步数据
this.$emit('ok')
this.close()
// 发票信息没有变化的时候直接关闭弹框
if(!this.confirmObj.changeInvoiceFlag) {
this.$emit('ok')
this.close()
return
}
// 变化的时候请求接口
// 请求接口同步数据
const params = {
id: this.confirmObj.companyId, // 企业id
needInvoice: this.confirmObj.needInvoice,
companyName: this.confirmObj.companyName,
dutyCode: this.confirmObj.dutyCode
}
if (Number(this.confirmObj.needInvoice) === InvoiceTypeEnums.special.index) {
params.companyAddress = this.confirmObj.companyAddress
params.companyPhone = this.confirmObj.companyPhone
params.openingBank = this.confirmObj.openingBank
params.bankAccount = this.confirmObj.bankAccount
params.linkBankNumber = this.confirmObj.linkBankNumber
}
updateInvoiceBySignUp(params).then(res => {
if (res.success) {
this.$emit('ok')
this.close()
} else {
this.$message.warn(res.message)
}
})
},
handleCancel() {
this.close()