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 @@
- + + +