Browse Source

feat: 增加仓库下拉数据列表

zh 2 years ago
parent
commit
3775dca1ef
1 changed files with 14 additions and 0 deletions
  1. 14 0
      src/components/template/selectData.js

+ 14 - 0
src/components/template/selectData.js

@@ -1,3 +1,4 @@
+import { getStockListStock } from '@/api/setting'
 import { getWarehouseList } from '@/api/supply/engin'
 import { getCategoryList, getSalesmanList } from '@/api/common'
 import { getDealerList, getWalletCustomerList } from '@/api/basic_data/dealer'
@@ -66,5 +67,18 @@ export default {
         })
         .catch(j)
     })
+  },
+  // 仓库
+  STOCK_NO() {
+    return new Promise((r, j) => {
+      getStockListStock({
+        pageNum: 1,
+        pageSize: -1
+      })
+        .then(res => {
+          r({ data: res.data.records.map(item => ({ dictCode: item.id, dictValue: item.name })) })
+        })
+        .catch(j)
+    })
   }
 }