|
|
|
|
@ -441,190 +441,216 @@ export default {
|
|
|
|
|
content: `<div style="background: #fff; padding: 20px;">
|
|
|
|
|
<div style="position: relative; width: 100%; padding: 20px;">
|
|
|
|
|
<h2 style="text-align: center; font-size: 24px; font-weight: bold; margin-bottom: 20px;">苏州市河道管理处报销贴单</h2>
|
|
|
|
|
<div style="width: 100%; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center;">
|
|
|
|
|
<div style="width: 100%; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center;">
|
|
|
|
|
<div style="font-size: 16px;">科室:<div style="display: inline-block;"><div style="display: block;"><input type="text" data-field="department" style="width: 120px; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);"></div><div style="display: none;">\${department}</div></div></div>
|
|
|
|
|
<div style="font-size: 16px;"><div style="display: inline-block;"><div style="display: block;"><input type="text" data-field="date" style="width: 120px; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);"></div><div style="display: none;">\${date}</div></div></div>
|
|
|
|
|
</div>
|
|
|
|
|
<table style="width: 100%; border-collapse: collapse; font-family: SimSun, serif;">
|
|
|
|
|
<colgroup>
|
|
|
|
|
<col style="width: 35%">
|
|
|
|
|
<col style="width: 15%">
|
|
|
|
|
<col style="width: 15%">
|
|
|
|
|
<col style="width: 25%">
|
|
|
|
|
<col style="width: 10%">
|
|
|
|
|
</colgroup>
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; background-color: white; font-weight: bold; text-align: center; width: 120px;">职工姓名</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: left; padding-left: 12px; background-color: white;">
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: center; font-weight: bold;">用途说明</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: center; font-weight: bold;">金额</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: center; font-weight: bold;" rowspan="2">报销(领款)人</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: center; font-weight: bold;" rowspan="2">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="name" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
<input type="text" data-field="handler" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${name}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; background-color: white; font-weight: bold; text-align: center; width: 120px;">退休/在职</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: left; padding-left: 12px; background-color: white;">
|
|
|
|
|
<div style="display: none;">\${handler}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: center; writing-mode: vertical-lr; text-orientation: upright; letter-spacing: 8px;" rowspan="12">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="status" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
<div style="display: flex; align-items: center; justify-content: center;">
|
|
|
|
|
<span>附单据</span>
|
|
|
|
|
<input type="text" data-field="receipts" style="width: 60px; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2); margin: 0 4px;">
|
|
|
|
|
<span>张</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${status}</div>
|
|
|
|
|
<div style="display: none;">附单据\${receipts}张</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; background-color: white; font-weight: bold; text-align: center; width: 120px;">家属姓名</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: left; padding-left: 12px; background-color: white;">
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: center;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="familyName" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
<input type="text" data-field="purpose1" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${familyName}</div>
|
|
|
|
|
<div style="display: none;">\${purpose1}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; background-color: white; font-weight: bold; text-align: center; width: 120px;">与本人关系</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: left; padding-left: 12px; background-color: white;">
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: center;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="relation" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
<input type="text" data-field="amount1" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${relation}</div>
|
|
|
|
|
<div style="display: none;">\${amount1}</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; background-color: white; font-weight: bold; text-align: center; width: 120px;">内容</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; background-color: white; font-weight: bold; text-align: center; width: 120px;">发票金额</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; background-color: white; font-weight: bold; text-align: center; width: 120px;">报销比例</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: left; padding-left: 12px; background-color: white;">
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: center;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="medicalActualAmount" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
<input type="text" data-field="purpose2" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${medicalActualAmount}</div>
|
|
|
|
|
<div style="display: none;">\${purpose2}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; background-color: white; font-weight: bold; text-align: center; width: 120px;" rowspan="2">报销(领款)人</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 60px; vertical-align: middle; text-align: center; background-color: white;" colspan="3" rowspan="2">
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: center;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="name" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2); text-align: center;">
|
|
|
|
|
<input type="text" data-field="amount2" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${name}</div>
|
|
|
|
|
<div style="display: none;">\${amount2}</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; background-color: white; font-weight: bold; text-align: center; width: 120px;">门诊医药费</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: left; padding-left: 12px; background-color: white;">
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; background-color: white; text-align: center;" rowspan="2">科室负责人</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: center;" rowspan="2">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="medicalInvoiceValue" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2); text-align: center;">
|
|
|
|
|
<input type="text" data-field="departmentHead" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${medicalInvoiceValue}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: left; padding-left: 12px; background-color: white;">
|
|
|
|
|
<div style="display: none;">\${departmentHead}</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: left;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="medicalReimbursementRatio" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2); text-align: center;">
|
|
|
|
|
<input type="text" data-field="purpose3" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${medicalReimbursementRatio}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: left; padding-left: 12px; background-color: white;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="medicalActualAmount" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2); text-align: center;">
|
|
|
|
|
<div style="display: none;">\${purpose3}</div>
|
|
|
|
|
</td>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: right;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="amount3" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${medicalActualAmount}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<div style="display: none;">\${amount3}</div>
|
|
|
|
|
</td>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; background-color: white; font-weight: bold; text-align: center; width: 120px;">住院医药费</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: left; padding-left: 12px; background-color: white;">
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: left;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="hospitalInvoiceValue" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2); text-align: center;">
|
|
|
|
|
<input type="text" data-field="purpose4" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${hospitalInvoiceValue}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: left; padding-left: 12px; background-color: white;">
|
|
|
|
|
<div style="display: none;">\${purpose4}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: right;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="hospitalReimbursementRatio" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2); text-align: center;">
|
|
|
|
|
<input type="text" data-field="amount4" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${hospitalReimbursementRatio}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: left; padding-left: 12px; background-color: white;">
|
|
|
|
|
<div style="display: none;">\${amount4}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; background-color: white; text-align: center;" rowspan="2">财审科审核</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: center;" rowspan="2">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="financeApproval" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${financeApproval}</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: left;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="hospitalActualAmount" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2); text-align: center;">
|
|
|
|
|
<input type="text" data-field="purpose5" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${hospitalActualAmount}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; background-color: white; font-weight: bold; text-align: center; width: 120px;">科室负责人</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: center; background-color: white;" colspan="3">
|
|
|
|
|
<div style="display: none;">\${purpose5}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: right;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="departmentHead" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2); text-align: center;">
|
|
|
|
|
<input type="text" data-field="amount5" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${departmentHead}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<div style="display: none;">\${amount5}</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; background-color: white; font-weight: bold; text-align: center; width: 120px;">儿童医药费</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: left; padding-left: 12px; background-color: white;">
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: left;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="childMedicalInvoiceValue" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
<input type="text" data-field="purpose6" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${childMedicalInvoiceValue}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: left; padding-left: 12px; background-color: white;">
|
|
|
|
|
<div style="display: none;">\${purpose6}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: right;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="amount6" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${amount6}</div>
|
|
|
|
|
</td>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; background-color: white; text-align: center;" rowspan="2">分管领导审核</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: center;" rowspan="2">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="childMedicalReimbursementRatio" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
<input type="text" data-field="leaderApproval" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${childMedicalReimbursementRatio}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: left; padding-left: 12px; background-color: white;">
|
|
|
|
|
<div style="display: none;">\${leaderApproval}</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: left;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="childMedicalActualAmount" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
<input type="text" data-field="purpose7" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${childMedicalActualAmount}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; background-color: white; font-weight: bold; text-align: center; width: 120px;">财审科审核</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: center; background-color: white;" colspan="3">
|
|
|
|
|
<div style="display: none;">\${purpose7}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: right;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="financialAudit" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
<input type="text" data-field="amount7" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${financialAudit}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<div style="display: none;">\${amount7}</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; background-color: white; font-weight: bold; text-align: center; width: 120px;">幼托费用</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: left; padding-left: 12px; background-color: white;">无</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: left; padding-left: 12px; background-color: white;">
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: left;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="childcareActualAmount" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
<input type="text" data-field="purpose8" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${childcareActualAmount}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; background-color: white; font-weight: bold; text-align: center; width: 120px;">分管领导审核</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: center; background-color: white;" colspan="3">
|
|
|
|
|
<div style="display: none;">\${purpose8}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: right;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="leaderAudit" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
<input type="text" data-field="amount8" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${leaderAudit}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<div style="display: none;">\${amount8}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; background-color: white; text-align: center;" rowspan="2">财务分管领导审核</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: center;" rowspan="2">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="financeLeaderApproval" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${financeLeaderApproval}</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; background-color: white; font-weight: bold; text-align: center; width: 120px;">子女保险费</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: left; padding-left: 12px; background-color: white;">无</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: left; padding-left: 12px; background-color: white;">
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: left;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="childInsuranceActualAmount" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
<input type="text" data-field="purpose9" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${childInsuranceActualAmount}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; background-color: white; font-weight: bold; text-align: center; width: 120px;">财务分管领导审核</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: center; background-color: white;" colspan="3">
|
|
|
|
|
<div style="display: none;">\${purpose9}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: right;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="financialLeaderAudit" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
<input type="text" data-field="amount9" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${financialLeaderAudit}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<div style="display: none;">\${amount9}</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; background-color: white; font-weight: bold; text-align: center; width: 120px;">合计</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: left; padding-left: 12px; background-color: white;" colspan="3">
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; font-weight: bold; text-align: center;">合计</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: right;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="totalAmount" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
<input type="text" data-field="total" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${totalAmount}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; background-color: white; font-weight: bold; text-align: center; width: 120px;" rowspan="2">单位负责人审批</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: center; background-color: white;" colspan="3" rowspan="2">
|
|
|
|
|
<div style="display: none;">\${total}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; background-color: #white; text-align: center;" rowspan="2">单位负责人审批</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: center;" rowspan="2">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="unitLeaderAudit" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
<input type="text" data-field="unitLeaderApproval" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">\${unitLeaderAudit}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<div style="display: none;">\${unitLeaderApproval}</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; background-color: white; font-weight: bold; text-align: center; width: 120px;">报销金额(大写)</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px; height: 32px; vertical-align: middle; text-align: left; padding-left: 12px; background-color: white;" colspan="3">
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; font-weight: bold; text-align: center;">报销金额(大写)</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: center;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="upperCaseAmount" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
</div>
|
|
|
|
|
@ -971,7 +997,14 @@ export default {
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; width: 120px; background-color: #fff; text-align: center; font-weight: normal;">年 月 日读数</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; width: 120px; background-color: #fff; text-align: center; font-weight: normal;">
|
|
|
|
|
<div style="font-size: 16px;">
|
|
|
|
|
<div style="display: inline-block;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="date1" style="width: 120px; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);"></div><div style="display: none;">\${date1}</div>
|
|
|
|
|
</div>读数
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: left; min-height: 24px;">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
<input type="text" data-field="currentReading" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">
|
|
|
|
|
@ -1294,7 +1327,7 @@ export default {
|
|
|
|
|
</div>`
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '苏州市河道管理处报销贴单1',
|
|
|
|
|
name: '苏州市河道管理处报销贴单',
|
|
|
|
|
content: `
|
|
|
|
|
<div style="background: #fff; padding: 20px;">
|
|
|
|
|
<div style="position: relative; width: 100%; padding: 20px;">
|
|
|
|
|
@ -1323,11 +1356,8 @@ export default {
|
|
|
|
|
<div style="display: none;">\${handler}</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: center; writing-mode: vertical-lr; text-orientation: upright; letter-spacing: 8px;" rowspan="12">
|
|
|
|
|
<div style="display: block;">
|
|
|
|
|
附单据<input type="text" data-field="receipts" style="width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);">张
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: none;">附单据\${receipts}张</div>
|
|
|
|
|
</td>
|
|
|
|
|
<div style="font-size: 16px;">附单据<div style="display: inline-block;"><div style="display: block;"><input type="text" data-field="receipts" style="width: 50px; height: 50px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2);"></div><div style="display: none;">\${receipts}</div></div>张</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="border: 1px solid #000; padding: 8px 12px; font-size: 16px; line-height: 1.5; height: 40px; text-align: center;">
|
|
|
|
|
@ -1605,44 +1635,58 @@ export default {
|
|
|
|
|
variables.add(match[1]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.updateFieldMetadata(Array.from(variables));
|
|
|
|
|
// 保留现有的字段元数据,只更新新增的变量
|
|
|
|
|
const existingMetadata = { ...this.fieldMetadata };
|
|
|
|
|
variables.forEach(varName => {
|
|
|
|
|
if (!existingMetadata[varName]) {
|
|
|
|
|
existingMetadata[varName] = {
|
|
|
|
|
field: varName,
|
|
|
|
|
name: this.formatVariableName(varName),
|
|
|
|
|
type: 'text',
|
|
|
|
|
options: '',
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.fieldMetadata = existingMetadata;
|
|
|
|
|
this.generateFieldList();
|
|
|
|
|
|
|
|
|
|
// 替换占位变量为对应的输入控件
|
|
|
|
|
// processedContent = processedContent.replace(/\${([^}]+)}/g, (match, field) => {
|
|
|
|
|
// const metadata = this.fieldMetadata[field];
|
|
|
|
|
// if (!metadata) return match;
|
|
|
|
|
processedContent = processedContent.replace(/\${([^}]+)}/g, (match, field) => {
|
|
|
|
|
const metadata = this.fieldMetadata[field];
|
|
|
|
|
if (!metadata) return match;
|
|
|
|
|
|
|
|
|
|
// const baseStyle = 'width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2); text-align: center;';
|
|
|
|
|
const baseStyle = 'width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #DCDFE6; border-radius: 4px; background: #fff; color: #333; font-size: 14px; line-height: 1.5; box-shadow: 0 0 4px rgba(220, 223, 230, 0.2); text-align: center;';
|
|
|
|
|
|
|
|
|
|
// let inputHtml = '';
|
|
|
|
|
// switch (metadata.type) {
|
|
|
|
|
// case 'text':
|
|
|
|
|
// inputHtml = `<input type="text" style="${baseStyle}" data-field="${field}" />`;
|
|
|
|
|
// break;
|
|
|
|
|
// case 'number':
|
|
|
|
|
// inputHtml = `<input type="number" style="${baseStyle}" data-field="${field}" />`;
|
|
|
|
|
// break;
|
|
|
|
|
// case 'date':
|
|
|
|
|
// inputHtml = `<input type="date" style="${baseStyle}" data-field="${field}" />`;
|
|
|
|
|
// break;
|
|
|
|
|
// case 'select':
|
|
|
|
|
// const options = metadata.options.split(',').map(opt =>
|
|
|
|
|
// `<option value="${opt.trim()}">${opt.trim()}</option>`
|
|
|
|
|
// ).join('');
|
|
|
|
|
// inputHtml = `<select style="${baseStyle}" data-field="${field}">${options}</select>`;
|
|
|
|
|
// break;
|
|
|
|
|
// case 'checkbox':
|
|
|
|
|
// inputHtml = `<div style="display: flex; justify-content: center; align-items: center;"><input type="checkbox" style="width: 16px; height: 16px;" data-field="${field}" /></div>`;
|
|
|
|
|
// break;
|
|
|
|
|
// case 'radio':
|
|
|
|
|
// inputHtml = `<div style="display: flex; justify-content: center; align-items: center;"><input type="radio" style="width: 16px; height: 16px;" data-field="${field}" /></div>`;
|
|
|
|
|
// break;
|
|
|
|
|
// default:
|
|
|
|
|
// inputHtml = `<input type="text" style="${baseStyle}" data-field="${field}" />`;
|
|
|
|
|
// }
|
|
|
|
|
let inputHtml = '';
|
|
|
|
|
switch (metadata.type) {
|
|
|
|
|
case 'text':
|
|
|
|
|
inputHtml = `<input type="text" style="${baseStyle}" data-field="${field}" />`;
|
|
|
|
|
break;
|
|
|
|
|
case 'number':
|
|
|
|
|
inputHtml = `<input type="number" style="${baseStyle}" data-field="${field}" />`;
|
|
|
|
|
break;
|
|
|
|
|
case 'date':
|
|
|
|
|
inputHtml = `<input type="date" style="${baseStyle}" data-field="${field}" />`;
|
|
|
|
|
break;
|
|
|
|
|
case 'select':
|
|
|
|
|
const options = metadata.options.split(',').map(opt =>
|
|
|
|
|
`<option value="${opt.trim()}">${opt.trim()}</option>`
|
|
|
|
|
).join('');
|
|
|
|
|
inputHtml = `<select style="${baseStyle}" data-field="${field}">${options}</select>`;
|
|
|
|
|
break;
|
|
|
|
|
case 'checkbox':
|
|
|
|
|
inputHtml = `<div style="display: flex; justify-content: center; align-items: center;"><input type="checkbox" style="width: 16px; height: 16px;" data-field="${field}" /></div>`;
|
|
|
|
|
break;
|
|
|
|
|
case 'radio':
|
|
|
|
|
inputHtml = `<div style="display: flex; justify-content: center; align-items: center;"><input type="radio" style="width: 16px; height: 16px;" data-field="${field}" /></div>`;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
inputHtml = `<input type="text" style="${baseStyle}" data-field="${field}" />`;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// return `<div style="display: block;">${inputHtml}</div><div style="display: none;">\${${field}}</div>`;
|
|
|
|
|
// });
|
|
|
|
|
return `<div style="display: block;">${inputHtml}</div><div style="display: none;">\${${field}}</div>`;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.previewContent = processedContent;
|
|
|
|
|
},
|
|
|
|
|
@ -1802,8 +1846,8 @@ export default {
|
|
|
|
|
|
|
|
|
|
const params = {
|
|
|
|
|
name: this.formName,
|
|
|
|
|
type: this.formatType === 1 ? 1 : 2,
|
|
|
|
|
template: this.formatType === 1 ? this.codeContent : null,
|
|
|
|
|
type: 1, // 强制使用HTML格式
|
|
|
|
|
template: this.codeContent, // 使用转换后的HTML内容
|
|
|
|
|
// Add field metadata
|
|
|
|
|
contract_template_fields: templateFields,
|
|
|
|
|
// Other necessary fields
|
|
|
|
|
@ -1855,7 +1899,13 @@ export default {
|
|
|
|
|
console.log('字段元数据已更新:', this.fieldMetadata);
|
|
|
|
|
},
|
|
|
|
|
generateFieldList() {
|
|
|
|
|
this.fieldList = Object.values(this.fieldMetadata);
|
|
|
|
|
// 使用 Object.entries 来保持字段的原始顺序
|
|
|
|
|
this.fieldList = Object.entries(this.fieldMetadata).map(([field, metadata]) => ({
|
|
|
|
|
field,
|
|
|
|
|
name: metadata.name,
|
|
|
|
|
type: metadata.type,
|
|
|
|
|
options: metadata.options
|
|
|
|
|
}));
|
|
|
|
|
},
|
|
|
|
|
formatVariableName(name) {
|
|
|
|
|
return name
|
|
|
|
|
|