From 74d0ba57e2b65a21d38642c4cc80a852474a2be0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com> Date: Tue, 9 Jun 2026 17:42:28 +0800 Subject: [PATCH] =?UTF-8?q?feat(crm/contract):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=90=88=E5=90=8C=E4=BA=A7=E5=93=81=E6=9D=90=E8=B4=A8=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E4=B8=8E=E5=AF=BC=E5=87=BA=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 将材质输入框改为可搜索创建的选择器,新增冷轧卷(花纹)选项和SPCC等材质选项 2. 优化合同导出表格的边框、内边距和字体样式,统一表格样式 --- .../components/ContractExportDialog.vue | 64 +++++++++---------- .../contract/components/ProductContent.vue | 10 ++- 2 files changed, 41 insertions(+), 33 deletions(-) diff --git a/klp-ui/src/views/crm/contract/components/ContractExportDialog.vue b/klp-ui/src/views/crm/contract/components/ContractExportDialog.vue index 5965497a..13954ba5 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}`; }); @@ -181,9 +181,9 @@ export default { let totalCells = ''; let cellIdx = 0; activeCols.forEach((col) => { - if (cellIdx < 2) { + if (cellIdx < 2) { if (cellIdx === 0) { - totalCells += `合  计`; + totalCells += `合  计`; } } else { let val = ''; @@ -191,22 +191,22 @@ 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++; }); 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; }, @@ -299,8 +299,8 @@ export default { .contract-title { text-align: center; font-size: 20px; font-weight: bold; letter-spacing: 6px; margin-bottom: 14px; } .info-row { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 13px; line-height: 2; } .section-title { font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 8px; } - table { width: 100%; border-collapse: separate; border-spacing: 0; border-top: 2px solid #000; border-left: 2px solid #000; } - th, td { border-right: 2px solid #000; border-bottom: 2px solid #000; padding: 3px 4px; text-align: center; font-size: 11px; } + table { width: 100%; border-collapse: collapse; } + th, td { border: 1px solid #000; padding: 4px 6px; text-align: center; font-size: 13px; } th { font-weight: 700; } .sign-section { margin-top: 24px; font-size: 12px; line-height: 2.2; } .sign-section .col { width: 48%; } diff --git a/klp-ui/src/views/crm/contract/components/ProductContent.vue b/klp-ui/src/views/crm/contract/components/ProductContent.vue index 9e4749de..592248d9 100644 --- a/klp-ui/src/views/crm/contract/components/ProductContent.vue +++ b/klp-ui/src/views/crm/contract/components/ProductContent.vue @@ -50,7 +50,9 @@
- + + +