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 { 合同预览