Browse Source

feat(forecast-form): 默认显示全部物料并设置预测数量为0

yz 1 month ago
parent
commit
aa8b486893
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/components/forecast-form/forecast-form-mixin.js

+ 2 - 0
src/components/forecast-form/forecast-form-mixin.js

@@ -990,6 +990,8 @@ export default {
           label: item.cname,
           label: item.cname,
           value: item.id
           value: item.id
         }))
         }))
+        // 默认显示全部物料至下方表格,预测数量默认 0,用户可手动删除不需要的物料
+        this.stockTableData = stockList.map(item => ({ ...item, forecastQuantity: 0 }))
       } catch (e) {
       } catch (e) {
         console.error('加载用户关联商品失败:', e)
         console.error('加载用户关联商品失败:', e)
         this.$message.error(e.message || '加载用户关联商品失败')
         this.$message.error(e.message || '加载用户关联商品失败')