Sfoglia il codice sorgente

feat(forecast): 添加审批状态显示和表格列配置优化

yz 5 giorni fa
parent
commit
6bb042a8f7
2 ha cambiato i file con 38 aggiunte e 6 eliminazioni
  1. 30 6
      src/views/forecast/forecastIndex.js
  2. 8 0
      src/views/forecast/index.vue

+ 30 - 6
src/views/forecast/forecastIndex.js

@@ -104,11 +104,14 @@ export default {
         editBtnText: '编辑',
         // 添加这个配置来完全隐藏操作列
         // 并启用行展开功能以展示子表
-        menu: false,
+        menu: true,
+        menuWidth: 160,
+        menuFixed: false,
         expand: true,
         expandRowKeys: [],
         defaultExpandAll: false,
         column: [
+          { label: 'ID', prop: 'id', width: 160, overHidden: false },
           {
             label: '年份',
             prop: 'year',
@@ -141,6 +144,13 @@ export default {
             width: 100
           },
           {
+            label: '客户编码',
+            prop: 'customerCode',
+            search: false,
+            width: 150,
+            overHidden: true
+          },
+          {
             label: '客户名称',
             prop: 'customerName',
             search: true,
@@ -156,7 +166,7 @@ export default {
             slot: true,
             search: true,
             searchSpan: 6,
-            width: 120
+            width: 100
           },
           {
             label: '审批人',
@@ -181,12 +191,20 @@ export default {
             search: false,
             width: 160
           },
+          {
+            label: '更新时间',
+            prop: 'updateTime',
+            type: 'datetime',
+            format: 'yyyy-MM-dd HH:mm:ss',
+            search: false,
+            width: 160
+          },
           // 自定义操作列(保持占位,不可编辑)
           {
             label: '操作',
             prop: 'editBtn',
             slot: true,
-            width: 120,
+            width: 160,
             fixed: 'right'
           }
         ]
@@ -207,12 +225,18 @@ export default {
         menu: false,
         expand: false,
         column: [
-          { label: '商品编码', prop: 'itemCode', minWidth: 120 },
-          { label: '商品名称', prop: 'itemName', minWidth: 180, overHidden: true },
+          { label: '物料编码', prop: 'itemCode', minWidth: 120 },
+          { label: '物料名称', prop: 'itemName', minWidth: 180, overHidden: true },
           { label: '规格型号', prop: 'specs', minWidth: 140, overHidden: true },
           { label: '花型/图案', prop: 'pattern', minWidth: 120, overHidden: true },
           { label: '品牌名称', prop: 'brandName', minWidth: 120, overHidden: true },
-          { label: '预测数量', prop: 'forecastQuantity', minWidth: 120, align: 'right', slot: 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: 'approvedName', minWidth: 120, overHidden: true },
+          { label: '审批时间', prop: 'approvedTime', type: 'datetime', format: 'yyyy-MM-dd HH:mm:ss', minWidth: 160, overHidden: true }
         ]
       },
       // 导出(按年月)选择弹层状态与表单

+ 8 - 0
src/views/forecast/index.vue

@@ -62,6 +62,14 @@
             <template slot-scope="{row}" slot="forecastQuantity">
               <span>{{ formatNumber(row.forecastQuantity || 0) }}</span>
             </template>
+            <template slot="approvalStatus" slot-scope="{row}">
+              <el-tag :type="getApprovalStatusType(row.approvalStatus)" size="small">
+                {{ getApprovalStatusLabel(row.approvalStatus) }}
+              </el-tag>
+            </template>
+            <template slot="approvedTime" slot-scope="{row}">
+              <span>{{ row.approvedTime ? (row.approvedTime) : '-' }}</span>
+            </template>
           </avue-crud>
         </template>