diff --git a/src/views/businessConfig/contractConfig.vue b/src/views/businessConfig/contractConfig.vue index 97ffb20..86387e8 100644 --- a/src/views/businessConfig/contractConfig.vue +++ b/src/views/businessConfig/contractConfig.vue @@ -124,7 +124,7 @@ - + @@ -302,8 +302,8 @@ - - + + { + const fieldName = input.getAttribute('data-field'); + if (fieldName) { + const field = this.contract.contract_template.contract_template_fields.find(f => f.field === fieldName); + if (field) { + if (input.type === 'checkbox' || input.type === 'radio') { + // 对于复选框和单选框,需要找到选中的值 + const checkedInput = dom.querySelector(`[data-field="${fieldName}"]:checked`); + field.value = checkedInput ? checkedInput.value : ''; + // 更新 HTML 中的 checked 状态 + if (checkedInput) { + checkedInput.setAttribute('checked', 'checked'); + } + } else { + field.value = input.value; + // 更新 HTML 中的 value + input.setAttribute('value', input.value); + } + } + } + }); + + // 获取更新后的 HTML + this.forms = dom.innerHTML; + } + } + let data = { contract_id: this.contract.id, apply_money: this.paymentRegistrationForm.applyMoney, @@ -428,7 +463,7 @@ is_end: this.paymentRegistrationForm.isLast ? 1 : 0, remark: this.paymentRegistrationForm.remark, audit_money: this.paymentRegistrationForm.audit_money, - // 添加事后支付表格数据 + // 提交更新后的HTML和字段数据 forms: this.forms, other_data: this.contract.contract_template?.contract_template_fields || [] } diff --git a/src/views/contract/components/printPaymentForm.vue b/src/views/contract/components/printPaymentForm.vue index 71b8f2a..f2fd410 100644 --- a/src/views/contract/components/printPaymentForm.vue +++ b/src/views/contract/components/printPaymentForm.vue @@ -4,7 +4,7 @@ - -