Jelajahi Sumber

feat(forecast-audit): 添加自定义序号列并调整表格配置

yz 5 hari lalu
induk
melakukan
8f2222c764

+ 8 - 5
src/views/forecast-audit/auditIndex.js

@@ -64,7 +64,7 @@ export default {
         searchShow: true,
         searchMenuSpan: 6,
         border: true,
-        index: true,
+        index: false,
         viewBtn: false,
         selection: false,
         addBtn: false,
@@ -81,6 +81,8 @@ export default {
         expandRowKeys: [],
         defaultExpandAll: false,
         column: [
+          { label: 'ID', prop: 'id', width: 140, overHidden: false },
+          { label: '序号', prop: 'seq', width: 70, align: 'center', slot: true },
           {
             label: '年份',
             prop: 'year',
@@ -160,7 +162,8 @@ export default {
             search: false,
             width: 160,
             overHidden: true
-          }
+          },
+          { label: '更新时间', prop: 'updateTime', type: 'datetime', search: false, width: 160, overHidden: true }
         ]
       },
       // 子表(展开区)配置,展示明细列表
@@ -189,9 +192,9 @@ export default {
           { label: '品牌名称', prop: 'brandName', minWidth: 120, overHidden: true },
           { label: '预测数量', prop: 'forecastQuantity', minWidth: 120, align: 'right', slot: true },
           { label: '审核状态', prop: 'approvalStatus', type: 'select', dicData: APPROVAL_STATUS_OPTIONS, minWidth: 100, slot: true },
-          { label: '客户名称', prop: 'customerName', minWidth: 160, overHidden: true },
-          { label: '年份', prop: 'year', minWidth: 100 },
-          { label: '月份', prop: 'month', minWidth: 100 },
+        //   { label: '客户名称', prop: 'customerName', minWidth: 160, overHidden: true },
+        //   { label: '年份', prop: 'year', minWidth: 100 },
+        //   { label: '月份', prop: 'month', minWidth: 100 },
           { label: '审批人', prop: 'approvedName', minWidth: 120, overHidden: true },
           { label: '审批时间', prop: 'approvedTime', type: 'datetime', minWidth: 160, overHidden: true, slot: true }
         ]

+ 5 - 0
src/views/forecast-audit/index.vue

@@ -26,6 +26,11 @@
         </el-tag>
       </template>
 
+      <!-- 自定义序号列显示(按分页计算) -->
+      <template slot="seq" slot-scope="{row, index}">
+        {{ (page.currentPage - 1) * page.pageSize + index + 1 }}
+      </template>
+
       <!-- 自定义操作按钮(主表):仅保留查看详情 -->
       <template slot-scope="{row, index}" slot="menu">
         <el-button