diff --git a/klp-ui/src/views/crm/contract/components/ContractExportDialog.vue b/klp-ui/src/views/crm/contract/components/ContractExportDialog.vue
index 7e7c0371..9fa316b1 100644
--- a/klp-ui/src/views/crm/contract/components/ContractExportDialog.vue
+++ b/klp-ui/src/views/crm/contract/components/ContractExportDialog.vue
@@ -6,9 +6,11 @@
产品表列配置
全选
-
-
{{ col.label }}
+
+
+
+
重置表头
附加行配置
{ col.label = col.defaultLabel; });
+ this.generatePreviewHtml();
+ },
onColumnChange() {
const checkedCount = this.columnConfigs.filter(c => c.checked).length;
this.selectAllColumns = checkedCount === this.columnConfigs.length;
@@ -143,17 +149,24 @@ export default {
const hasCol = (key) => activeCols.some(c => c.key === key);
const hasRow = (key) => activeRows.some(r => r.key === key);
+ const colWidthMap = {
+ spec: 80,
+ material: 60,
+ quantity: 55,
+ taxPrice: 70,
+ taxDivisor: 45,
+ noTaxPrice: 70,
+ taxTotal: 70,
+ noTaxTotal: 70,
+ taxAmount: 55,
+ remark: 80,
+ };
+
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 += '备注 | ';
+ activeCols.forEach(col => {
+ const width = colWidthMap[col.key] || 60;
+ headerCells += `${col.label} | `;
+ });
const colCount = activeCols.length + 1;
let bodyRows = '';
diff --git a/klp-ui/src/views/crm/contract/components/ProductContent.vue b/klp-ui/src/views/crm/contract/components/ProductContent.vue
index c35fde3c..e62428e0 100644
--- a/klp-ui/src/views/crm/contract/components/ProductContent.vue
+++ b/klp-ui/src/views/crm/contract/components/ProductContent.vue
@@ -19,15 +19,15 @@
序号
-
规格(mm)
+
规格
(mm)
材质
-
数量(吨)
-
含税单价(元/吨)
+
数量
(吨)
+
含税单价
(元/吨)
税率除数
-
无税单价(元/吨)
-
含税总额(元)
-
无税总额(元)
-
税额(元)
+
无税单价
(元/吨)
+
含税总额
(元)
+
无税总额
(元)
+
税额
(元)
备注