From 59ceeed4a41ffc7814ecbac0dcf3a73999ba8f43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com> Date: Mon, 8 Jun 2026 16:31:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(crm/contract):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=90=88=E5=90=8C=E9=A2=84=E8=A7=88=E4=B8=8E=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E7=9A=84=E6=A0=B7=E5=BC=8F=E5=8F=8A=E9=87=8D=E5=A4=8D=E6=B8=B2?= =?UTF-8?q?=E6=9F=93=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 为产品内容组件添加值相等判断,避免重复解析内容 2. 统一合同预览和导出弹窗的表格边框样式为2px粗边框 3. 将合同预览的字体改为黑体并调整字重,优化显示效果 4. 调整表格字体粗细的配置标准 --- .../components/ContractExportDialog.vue | 64 +++++++++---------- .../contract/components/ContractPreview.vue | 8 +-- .../contract/components/ProductContent.vue | 3 + 3 files changed, 39 insertions(+), 36 deletions(-) diff --git a/klp-ui/src/views/crm/contract/components/ContractExportDialog.vue b/klp-ui/src/views/crm/contract/components/ContractExportDialog.vue index 1f50acb3..5965497a 100644 --- a/klp-ui/src/views/crm/contract/components/ContractExportDialog.vue +++ b/klp-ui/src/views/crm/contract/components/ContractExportDialog.vue @@ -143,32 +143,32 @@ export default { const hasCol = (key) => activeCols.some(c => c.key === key); const hasRow = (key) => activeRows.some(r => r.key === key); - let headerCells = '序号'; - if (hasCol('spec')) headerCells += '规格(mm)'; - if (hasCol('material')) headerCells += '材质'; - if (hasCol('quantity')) headerCells += '数量(吨)'; - if (hasCol('taxPrice')) headerCells += '含税单价(元/吨)'; - if (hasCol('taxDivisor')) headerCells += '税率除数'; - if (hasCol('noTaxPrice')) headerCells += '无税单价(元/吨)'; - if (hasCol('taxTotal')) headerCells += '含税总额(元)'; - if (hasCol('noTaxTotal')) headerCells += '无税总额(元)'; - if (hasCol('taxAmount')) headerCells += '税额(元)'; - if (hasCol('remark')) headerCells += '备注'; + let headerCells = '序号'; + if (hasCol('spec')) headerCells += '规格(mm)'; + if (hasCol('material')) headerCells += '材质'; + if (hasCol('quantity')) headerCells += '数量(吨)'; + if (hasCol('taxPrice')) headerCells += '含税单价(元/吨)'; + if (hasCol('taxDivisor')) headerCells += '税率除数'; + if (hasCol('noTaxPrice')) headerCells += '无税单价(元/吨)'; + if (hasCol('taxTotal')) headerCells += '含税总额(元)'; + if (hasCol('noTaxTotal')) headerCells += '无税总额(元)'; + if (hasCol('taxAmount')) headerCells += '税额(元)'; + if (hasCol('remark')) headerCells += '备注'; const colCount = activeCols.length + 1; let bodyRows = ''; products.forEach((product, index) => { - let cells = `${index + 1}`; - if (hasCol('spec')) cells += `${product.spec || ''}`; - if (hasCol('material')) cells += `${product.material || ''}`; - if (hasCol('quantity')) cells += `${product.quantity || ''}`; - if (hasCol('taxPrice')) cells += `${product.taxPrice || ''}`; - if (hasCol('taxDivisor')) cells += `${product.taxDivisor || '1.13'}`; - if (hasCol('noTaxPrice')) cells += `${(product.noTaxPrice || 0).toFixed(3)}`; - if (hasCol('taxTotal')) cells += `${(product.taxTotal || 0).toFixed(3)}`; - if (hasCol('noTaxTotal')) cells += `${(product.noTaxTotal || 0).toFixed(3)}`; - if (hasCol('taxAmount')) cells += `${(product.taxAmount || 0).toFixed(3)}`; - if (hasCol('remark')) cells += `${product.remark || ''}`; + let cells = `${index + 1}`; + if (hasCol('spec')) cells += `${product.spec || ''}`; + if (hasCol('material')) cells += `${product.material || ''}`; + if (hasCol('quantity')) cells += `${product.quantity || ''}`; + if (hasCol('taxPrice')) cells += `${product.taxPrice || ''}`; + if (hasCol('taxDivisor')) cells += `${product.taxDivisor || '1.13'}`; + if (hasCol('noTaxPrice')) cells += `${(product.noTaxPrice || 0).toFixed(3)}`; + if (hasCol('taxTotal')) cells += `${(product.taxTotal || 0).toFixed(3)}`; + if (hasCol('noTaxTotal')) cells += `${(product.noTaxTotal || 0).toFixed(3)}`; + if (hasCol('taxAmount')) cells += `${(product.taxAmount || 0).toFixed(3)}`; + if (hasCol('remark')) cells += `${product.remark || ''}`; bodyRows += `${cells}`; }); @@ -183,7 +183,7 @@ export default { activeCols.forEach((col) => { if (cellIdx < 2) { if (cellIdx === 0) { - totalCells += `合  计`; + totalCells += `合  计`; } } else { let val = ''; @@ -191,7 +191,7 @@ export default { else if (col.key === 'taxTotal') val = totalTax.toFixed(3); else if (col.key === 'noTaxTotal') val = totalNoTax.toFixed(3); else if (col.key === 'taxAmount') val = totalTaxAmt.toFixed(3); - totalCells += `${val}`; + totalCells += `${val}`; } cellIdx++; }); @@ -199,14 +199,14 @@ export default { const html = ` - - + + ${headerCells} ${bodyRows} ${hasRow('totalRow') ? `${totalCells}` : ''} - ${hasRow('amountWordsRow') ? `` : ''} - ${hasRow('remarkRow') && productData.remark ? `` : ''} + ${hasRow('amountWordsRow') ? `` : ''} + ${hasRow('remarkRow') && productData.remark ? `` : ''}
产品名称:${productData.productName || ''}生产厂家:嘉祥科伦普重工有限公司产品名称:${productData.productName || ''}生产厂家:嘉祥科伦普重工有限公司
合计人民币(大写):${totalAmountInWords}
备注:${productData.remark}
合计人民币(大写):${totalAmountInWords}
备注:${productData.remark}
`; return html; }, @@ -293,15 +293,15 @@ export default { 合同预览