Quellcode durchsuchen

feat(forecast): 添加自定义预测数量和当前库存显示模板

yz vor 3 Tagen
Ursprung
Commit
082cd71fcb
2 geänderte Dateien mit 16 neuen und 4 gelöschten Zeilen
  1. 6 4
      src/views/forecast/forecastIndex.js
  2. 10 0
      src/views/forecast/index.vue

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

@@ -157,19 +157,21 @@ export default {
             label: '预测数量',
             prop: 'forecastQuantity',
             type: 'number',
-            precision: 4,
+            precision: 0,
             search: false,
             width: 120,
-            align: 'right'
+            align: 'right',
+            slot: true
           },
           {
             label: '当前库存',
             prop: 'currentInventory',
             type: 'number',
-            precision: 4,
+            precision: 0,
             search: false,
             width: 120,
-            align: 'right'
+            align: 'right',
+            slot: true
           },
           {
             label: '品牌名称',

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

@@ -34,6 +34,16 @@
           </el-button>
         </template>
 
+        <!-- 自定义预测数量显示 -->
+        <template slot-scope="{row}" slot="forecastQuantity">
+          <span>{{ parseInt(row.forecastQuantity || 0) }}</span>
+        </template>
+
+        <!-- 自定义当前库存显示 -->
+        <template slot-scope="{row}" slot="currentInventory">
+          <span>{{ parseInt(row.currentInventory || 0) }}</span>
+        </template>
+
         <!-- 自定义审批状态显示 -->
         <template slot-scope="{row}" slot="approvalStatus">
           <el-tag