修改事前支付表格为可选

master
lynn 8 months ago
parent b8f4e62356
commit e9ea05bbab

@ -253,7 +253,7 @@
<!-- 支付表格 --> <!-- 支付表格 -->
<el-form-item label="事前支付表格" prop="prePaymentForm" class="form-section"> <el-form-item label="事前支付表格" prop="prePaymentForm" class="form-section">
<el-select v-model="form.prePaymentForm" placeholder="请选择事前支付表格" class="form-input"> <el-select v-model="form.prePaymentForm" placeholder="请选择事前支付表格" class="form-input" clearable>
<el-option <el-option
v-for="item in paymentFormOptions" v-for="item in paymentFormOptions"
:key="item.id" :key="item.id"
@ -264,7 +264,7 @@
</el-form-item> </el-form-item>
<el-form-item label="事后支付表格" prop="postPaymentForm" class="form-section"> <el-form-item label="事后支付表格" prop="postPaymentForm" class="form-section">
<el-select v-model="form.postPaymentForm" placeholder="请选择事后支付表格" class="form-input"> <el-select v-model="form.postPaymentForm" placeholder="请选择事后支付表格" class="form-input" clearable>
<el-option <el-option
v-for="item in paymentFormOptions" v-for="item in paymentFormOptions"
:key="item.id" :key="item.id"
@ -349,7 +349,7 @@ export default {
{ required: true, message: '请选择采购方式', trigger: 'change' } { required: true, message: '请选择采购方式', trigger: 'change' }
], ],
prePaymentForm: [ prePaymentForm: [
{ required: true, message: '请选择事前支付表格', trigger: 'change' } //
], ],
postPaymentForm: [ postPaymentForm: [
{ required: true, message: '请选择事后支付表格', trigger: 'change' } { required: true, message: '请选择事后支付表格', trigger: 'change' }
@ -839,19 +839,20 @@ export default {
// ID // ID
submitData.id = this.form.id submitData.id = this.form.id
// //
if (this.form.prePaymentForm && this.form.prePaymentForm !== this.originalPrePaymentForm) { if (this.form.prePaymentForm === '') {
submitData.before_contract_template_id = ''
} else if (this.form.prePaymentForm && this.form.prePaymentForm !== this.originalPrePaymentForm) {
submitData.before_contract_template_id = this.form.prePaymentForm submitData.before_contract_template_id = this.form.prePaymentForm
} }
// //
if (this.form.postPaymentForm && this.form.postPaymentForm !== this.originalPostPaymentForm) { if (this.form.postPaymentForm && this.form.postPaymentForm !== this.originalPostPaymentForm) {
submitData.contract_template_id = this.form.postPaymentForm submitData.contract_template_id = this.form.postPaymentForm
} }
} else { } else {
// //
if (this.form.prePaymentForm) { submitData.before_contract_template_id = this.form.prePaymentForm || ''
submitData.before_contract_template_id = this.form.prePaymentForm
}
if (this.form.postPaymentForm) { if (this.form.postPaymentForm) {
submitData.contract_template_id = this.form.postPaymentForm submitData.contract_template_id = this.form.postPaymentForm
} }

Loading…
Cancel
Save