瀏覽代碼

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

yz 3 天之前
父節點
當前提交
082cd71fcb
共有 2 個文件被更改,包括 16 次插入4 次删除
  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