Przeglądaj źródła

getInventoryTotalAPI

yusheng 1 rok temu
rodzic
commit
c0137956bd
1 zmienionych plików z 4 dodań i 2 usunięć
  1. 4 2
      src/api/bpm/components/wms/index.js

+ 4 - 2
src/api/bpm/components/wms/index.js

@@ -4,6 +4,9 @@ import request from '@/utils/request';
  * 获取产品所有库存
  */
 export async function getInventoryTotalAPI(data) {
+  if (data.length == 0) {
+    return [];
+  }
   const res = await request.post(`wms/stocktwo/getInventoryTotal`, data);
   if (res.data.code == 0) {
     return res.data.data;
@@ -111,7 +114,6 @@ export async function getProductList(params) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
 //库存台账-库存明细-物料维度
 
 export async function getMaterielDetails(params) {
@@ -125,7 +127,7 @@ export async function getMaterielDetails(params) {
 }
 //库存台账-库存明细
 
-export async function getInventoryDetails (params)  {
+export async function getInventoryDetails(params) {
   const res = await request.get(`/wms/outin/getInventoryDetails`, {
     params
   });