shaogen1995 3 روز پیش
والد
کامیت
815230f143
1فایلهای تغییر یافته به همراه13 افزوده شده و 9 حذف شده
  1. 13 9
      src/store/action/Fstorehouse/F4check.ts

+ 13 - 9
src/store/action/Fstorehouse/F4check.ts

@@ -5,16 +5,20 @@ import { APIbase } from '../layout'
 /**
  * 藏品盘点 - 分页列表
  */
-export const F4_APIgetList = (data: any): any => {
-  return async (dispatch: AppDispatch) => {
-    const res = await http.post('cms/orderSite/check/page', data)
-    if (res.code === 0) {
-      const obj = {
-        list: res.data.records,
-        total: res.data.total
-      }
+export const F4_APIgetList = (data: any, res?: boolean): any => {
+  if (res) {
+    return http.post('cms/orderSite/check/page', { pageNum: 1, pageSize: 99999, status: 4 })
+  } else {
+    return async (dispatch: AppDispatch) => {
+      const res = await http.post('cms/orderSite/check/page', data)
+      if (res.code === 0) {
+        const obj = {
+          list: res.data.records,
+          total: res.data.total
+        }
 
-      dispatch({ type: 'F4/getList', payload: obj })
+        dispatch({ type: 'F4/getList', payload: obj })
+      }
     }
   }
 }