diff --git a/klp-ui/src/views/crm/contract/components/ContractExportDialog.vue b/klp-ui/src/views/crm/contract/components/ContractExportDialog.vue
index adec1916..a73eb244 100644
--- a/klp-ui/src/views/crm/contract/components/ContractExportDialog.vue
+++ b/klp-ui/src/views/crm/contract/components/ContractExportDialog.vue
@@ -10,7 +10,12 @@
{{ col.label }}
-
勾选的列将显示在导出的产品表中
+ 附加行配置
+ 全选
+
+ {{ rowCfg.label }}
+
@@ -63,6 +68,13 @@ export default {
{ key: 'taxAmount', label: '税额(元)', checked: true },
{ key: 'remark', label: '备注', checked: true },
],
+ selectAllRows: true,
+ rowIndeterminate: false,
+ rowConfigs: [
+ { key: 'totalRow', label: '合计行', checked: true },
+ { key: 'amountWordsRow', label: '大写金额行', checked: true },
+ { key: 'remarkRow', label: '备注行', checked: true },
+ ],
};
},
computed: {
@@ -90,9 +102,22 @@ export default {
this.columnIndeterminate = checkedCount > 0 && checkedCount < this.columnConfigs.length;
this.generatePreviewHtml();
},
+ handleSelectAllRows(val) {
+ this.rowConfigs.forEach(row => { row.checked = val; });
+ this.rowIndeterminate = false;
+ this.generatePreviewHtml();
+ },
+ onRowChange() {
+ const checkedCount = this.rowConfigs.filter(r => r.checked).length;
+ this.selectAllRows = checkedCount === this.rowConfigs.length;
+ this.rowIndeterminate = checkedCount > 0 && checkedCount < this.rowConfigs.length;
+ this.generatePreviewHtml();
+ },
buildProductTableHtml(productData, products) {
const activeCols = this.columnConfigs.filter(c => c.checked);
+ const activeRows = this.rowConfigs.filter(r => r.checked);
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) | ';
@@ -155,11 +180,9 @@ export default {
${headerCells}
${bodyRows}
- ${totalCells}
-
- | 合计人民币(大写):${totalAmountInWords} |
-
- ${productData.remark ? `| 备注:${productData.remark} |
` : ''}
+ ${hasRow('totalRow') ? `${totalCells}
` : ''}
+ ${hasRow('amountWordsRow') ? `| 合计人民币(大写):${totalAmountInWords} |
` : ''}
+ ${hasRow('remarkRow') && productData.remark ? `| 备注:${productData.remark} |
` : ''}
`;
return html;
},