提交 0ac35177 authored 作者: pengxiaohui's avatar pengxiaohui

师资报名提交信息非必填字段重置为空字符串

上级 98fa0f4d
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<div class="line">发票信息填写</div> <div class="line">发票信息填写</div>
</el-form-item> </el-form-item>
<el-form-item label="发票类型" id="fplx" prop="invoice_type"> <el-form-item label="发票类型" id="fplx" prop="invoice_type">
<el-select v-model="form.invoice_type" placeholder="请选择" class="width100"> <el-select v-model="form.invoice_type" placeholder="请选择" class="width100" @change="invoiceTypeChange">
<el-option label="无" value="无"></el-option> <el-option label="无" value="无"></el-option>
<el-option label="普通发票" value="增值税普通发票"></el-option> <el-option label="普通发票" value="增值税普通发票"></el-option>
<el-option label="专用发票" value="增值税专用发票"></el-option> <el-option label="专用发票" value="增值税专用发票"></el-option>
...@@ -230,6 +230,11 @@ export default { ...@@ -230,6 +230,11 @@ export default {
goPay() { goPay() {
this.isPayPopShow = true this.isPayPopShow = true
}, },
invoiceTypeChange(val) {
if (val !== '无') {
this.form.invoice_detail = '非学历教育*培训费'
}
},
getDetail(call) { getDetail(call) {
// 登录状态不需要手机号验证码 // 登录状态不需要手机号验证码
action.articleAction.getFormDetail().then(res => { action.articleAction.getFormDetail().then(res => {
...@@ -420,17 +425,17 @@ export default { ...@@ -420,17 +425,17 @@ export default {
let promise = new Promise((resolve, reject) => { let promise = new Promise((resolve, reject) => {
const form = {...this.form} const form = {...this.form}
if (form.invoice_type !== '增值税专用发票') { if (form.invoice_type !== '增值税专用发票') {
delete form.invoice_address_mobile form.invoice_address_mobile = ''
delete form.opening_bank_account form.opening_bank_account = ''
if (form.invoice_type === '无') { if (form.invoice_type === '无') {
delete form.invoice_title form.invoice_title = ''
delete form.taxpayer_registration_num form.taxpayer_registration_num = ''
delete form.invoice_detail form.invoice_detail = ''
} }
} }
console.log(form) console.log(form)
console.log(this.form) console.log(this.form)
action.articleAction.formCommit(this.form).then(res => { action.articleAction.formCommit(form).then(res => {
if (res && res.code === 200) { if (res && res.code === 200) {
resolve({ resolve({
type: 'enroll', type: 'enroll',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论