diff --git a/src/views/businessConfig/EditPayForm.vue b/src/views/businessConfig/EditPayForm.vue index bb9247a..0eaf3cd 100644 --- a/src/views/businessConfig/EditPayForm.vue +++ b/src/views/businessConfig/EditPayForm.vue @@ -182,7 +182,7 @@ export default { previewContent: '', // 预览内容 showEditDrawer: false, showPreviewModal: false, // 添加预览模态窗口控制变量 - currentTemplateIndex: 2, + currentTemplateIndex: 6, editForm: { field: '', // Renamed from name to field name: '', // Renamed from label to name (Chinese name) @@ -1026,16 +1026,16 @@ export default { 总费用
- +
-
\${totalAmount}元
+
\${total}元
大写:
- +
-
\${amountInWords}
+
\${upperCaseAmount}
@@ -1351,69 +1351,69 @@ export default { - + - + - + - + - - - - - + + + + + - + - + - + - - + + - + - - + + - + - - + + - + - - + + - - - + + + - + diff --git a/src/views/contract/components/paymentRegistration.vue b/src/views/contract/components/paymentRegistration.vue index e744f72..ad654ec 100644 --- a/src/views/contract/components/paymentRegistration.vue +++ b/src/views/contract/components/paymentRegistration.vue @@ -1032,7 +1032,9 @@ export default { // 更新总金额输入框 const totalInput = dom.querySelector('input[data-field="total"]') if (totalInput) { - totalInput.value = total.toFixed(2) + if (total !== 0) { + totalInput.value = total.toFixed(2) + } console.log('更新总金额输入框:', totalInput.value) // 监听 total 输入框的变化 @@ -1048,7 +1050,9 @@ export default { // 更新大写金额 const upperCaseInput = dom.querySelector('input[data-field="upperCaseAmount"]') if (upperCaseInput) { - upperCaseInput.value = numberToChinese(total) + if (total !== 0) { + upperCaseInput.value = numberToChinese(total) + } console.log('更新大写金额:', upperCaseInput.value) } }, diff --git a/src/views/contract/components/printPaymentForm.vue b/src/views/contract/components/printPaymentForm.vue index 2cd274a..acd5c1a 100644 --- a/src/views/contract/components/printPaymentForm.vue +++ b/src/views/contract/components/printPaymentForm.vue @@ -252,17 +252,13 @@ export default { replaceControls(element) { const inputs = element.getElementsByTagName('input') Array.from(inputs).forEach(input => { + if (input.type === 'checkbox' || input.type === 'radio') { + // 跳过checkbox和radio,不替换,保持原样 + return + } const span = document.createElement('span') let displayText = input.value || '' - if (input.type === 'checkbox' || input.type === 'radio') { - const checkedInput = element.querySelector(`input[name="${input.name}"]:checked`) - if (checkedInput) { - const label = element.querySelector(`label[for="${checkedInput.id}"]`) - displayText = label ? label.textContent : checkedInput.value || '' - } else { - displayText = '' - } - } else if (input.type === 'date') { + if (input.type === 'date') { displayText = input.value ? new Date(input.value).toLocaleDateString() : '' } span.textContent = displayText @@ -420,7 +416,7 @@ export default { 打印
职工姓名职工姓名
\${name}
退休/在职退休/在职
\${status}
家属姓名家属姓名
\${familyName}
与本人关系与本人关系
\${relation}
内容发票金额报销比例报销金额报销领取人内容发票金额报销比例报销金额报销领取人
\${departmentHead}
门诊医药费门诊医药费
\${medicalInvoiceValue}
\${medicalReimbursementRatio}
\${medicalActualAmount}
\${amountMedicalActual}
住院医药费住院医药费
\${hospitalInvoiceValue}
\${hospitalReimbursementRatio}
\${hospitalActualAmount}
科室负责人
\${amountHospitalActual}
科室负责人
\${departmentHead}
儿童医药费儿童医药费
\${childMedicalInvoiceValue}
\${childMedicalReimbursementRatio}
\${childMedicalActualAmount}
财审科审核
\${amountChildMedicalActual}
财审科审核
\${financialAudit}
幼托费用幼托费用
\${childcareInvoiceValue}
\${childcareActualAmount}
分管领导审核
\${amountChildcareActual}
分管领导审核
\${leaderAudit}
子女保险费子女保险费
\${childInsuranceInvoiceValue}
\${childInsuranceActualAmount}
财务分管领导审核
\${amountChildInsuranceActual}
财务分管领导审核
\${financialLeaderAudit}
合计
\${totalAmount}
单位负责人审批合计
\${total}
单位负责人审批
\${unitLeaderAudit}
报销金额(大写)报销金额(大写)
\${upperCaseAmount}