master
lynn 5 months ago
parent 9e0e0c3fc7
commit de00a1c07a

@ -124,7 +124,7 @@
</el-table-column>
</el-table-column>
<el-table-column label="支付表格">
<el-table-column prop="prePaymentForm" label="事前支付表格" width="120">
<el-table-column prop="prePaymentForm" label="事前审批表格" width="120">
<template #default="scope">
<span>{{ scope.row.prePaymentForm || '-' }}</span>
</template>
@ -302,8 +302,8 @@
</div>
<!-- 支付表格 -->
<el-form-item label="事前支付表格" prop="prePaymentForm" class="form-section">
<el-select v-model="form.prePaymentForm" placeholder="请选择事前支付表格" class="form-input" clearable>
<el-form-item label="事前审批表格" prop="prePaymentForm" class="form-section">
<el-select v-model="form.prePaymentForm" placeholder="请选择事前审批表格" class="form-input" clearable>
<el-option
v-for="item in paymentFormOptions"
:key="item.id"

@ -420,6 +420,41 @@
},
submit() {
//
if (this.contract.contract_template) {
const dom = this.$refs.zoomedForms || this.$refs.zoomedTemplate;
if (dom) {
//
const inputs = dom.querySelectorAll('input, select, textarea');
// HTML
inputs.forEach(input => {
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 || []
}

@ -4,7 +4,7 @@
<template v-slot:normalContent>
<div class="form-switch">
<RadioGroup v-model="currentForm" type="button">
<Radio label="pre" :disabled="!getBeforeForms">事前支付表格</Radio>
<Radio label="pre" :disabled="!getBeforeForms">事前审批表格</Radio>
<Radio label="post" :disabled="!getForms">事后支付表格</Radio>
</RadioGroup>
</div>

@ -177,8 +177,6 @@
</template>
</template>
<!-- 添加打印按钮 -->
<template v-if="scope.row.is_simple === 1&&scope.row.status === 1">
<Button class="slot-btns-item" size="small" type="primary"
@click="checkFormsBeforePayment(scope.row)">

Loading…
Cancel
Save