|
|
|
|
@ -253,7 +253,7 @@
|
|
|
|
|
|
|
|
|
|
<!-- 支付表格 -->
|
|
|
|
|
<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
|
|
|
|
|
v-for="item in paymentFormOptions"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
@ -264,7 +264,7 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<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
|
|
|
|
|
v-for="item in paymentFormOptions"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
@ -349,7 +349,7 @@ export default {
|
|
|
|
|
{ required: true, message: '请选择采购方式', trigger: 'change' }
|
|
|
|
|
],
|
|
|
|
|
prePaymentForm: [
|
|
|
|
|
{ required: true, message: '请选择事前支付表格', trigger: 'change' }
|
|
|
|
|
// 移除必选验证规则
|
|
|
|
|
],
|
|
|
|
|
postPaymentForm: [
|
|
|
|
|
{ required: true, message: '请选择事后支付表格', trigger: 'change' }
|
|
|
|
|
@ -839,19 +839,20 @@ export default {
|
|
|
|
|
// 只添加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
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 如果事后支付表格有值且与原始值不同,才添加到提交数据中
|
|
|
|
|
if (this.form.postPaymentForm && this.form.postPaymentForm !== this.originalPostPaymentForm) {
|
|
|
|
|
submitData.contract_template_id = this.form.postPaymentForm
|
|
|
|
|
}
|
|
|
|
|
} 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) {
|
|
|
|
|
submitData.contract_template_id = this.form.postPaymentForm
|
|
|
|
|
}
|
|
|
|
|
|