Просмотр исходного кода

feat(库存表格详情): 为数值字段添加单位显示并优化字段命名

yusheng 7 месяцев назад
Родитель
Сommit
7dea285393
1 измененных файлов с 44 добавлено и 13 удалено
  1. 44 13
      src/BIZComponents/inventoryTableDetails.vue

+ 44 - 13
src/BIZComponents/inventoryTableDetails.vue

@@ -229,6 +229,11 @@
                   prop: 'thickNess',
                   label: '厚度',
                   slot: 'thickNess',
+                  formatter: (row, column) => {
+                    if (row.thickNess) {
+                      return row.thickNess + ' mm';
+                    }
+                  },
                   align: 'center'
                 },
                 // 新增字段:平方数
@@ -236,7 +241,11 @@
                   width: 150,
                   prop: 'squareNumber',
                   label: '平方数',
-                  slot: 'squareNumber',
+                  formatter: (row, column) => {
+                    if (row.squareNumber) {
+                      return row.squareNumber + ' cm²';
+                    }
+                  },
                   align: 'center'
                 },
                 // 新增字段:加工费(未税)
@@ -244,7 +253,11 @@
                   width: 150,
                   prop: 'processingFeeBeforeTax',
                   label: '加工费(未税)',
-                  slot: 'processingFeeBeforeTax',
+                  formatter: (row, column) => {
+                    if (row.processingFeeBeforeTax) {
+                      return row.processingFeeBeforeTax + ' 元';
+                    }
+                  },
                   align: 'center'
                 },
                 // 新增字段:包装费(未税)
@@ -252,7 +265,11 @@
                   width: 150,
                   prop: 'packagingFeeNotTaxed',
                   label: '包装费(未税)',
-                  slot: 'packagingFeeNotTaxed',
+                  formatter: (row, column) => {
+                    if (row.packagingFeeNotTaxed) {
+                      return row.packagingFeeNotTaxed + ' 元';
+                    }
+                  },
                   align: 'center'
                 },
                 // 新增字段:运输费(未税)
@@ -260,32 +277,46 @@
                   width: 150,
                   prop: 'transportationFeeWithoutTax',
                   label: '运输费(未税)',
-                  slot: 'transportationFeeWithoutTax',
+                  formatter: (row, column) => {
+                    if (row.transportationFeeWithoutTax) {
+                      return row.transportationFeeWithoutTax + ' 元';
+                    }
+                  },
                   align: 'center'
                 },
                 // 新增字段:未税小计
                 {
                   width: 150,
-                  prop: 'untaxedSubtotal',
+                  prop: 'quotationSubtotalBeforeTax',
                   label: '未税小计',
-                  slot: 'additionalTaxRate_untaxed',
-                  align: 'center'
+                  align: 'center',
+                  formatter: (row, column) => {
+                    if (row.quotationSubtotalBeforeTax) {
+                      return row.quotationSubtotalBeforeTax + ' 元';
+                    }
+                  }
                 },
                 // 新增字段:税率(%)
                 {
                   width: 150,
-                  prop: 'additionalTaxRate',
+                  prop: 'extraTax',
                   label: '税率(%)',
-                  slot: 'additionalTaxRate',
-                  align: 'center'
+                  align: 'center',
+                  formatter: (row, column) => {
+                    return row.extraTax;
+                  }
                 },
                 // 新增字段:含税小计
                 {
                   width: 150,
-                  prop: 'includingTaxPrice',
+                  prop: 'quotationSubtotalTax',
                   label: '含税小计',
-                  slot: 'includingTaxPrice',
-                  align: 'center'
+                  align: 'center',
+                  formatter: (row, column) => {
+                    if (row.quotationSubtotalTax) {
+                      return row.quotationSubtotalTax + ' 元';
+                    }
+                  }
                 }
               ]
             : [];