Browse Source

接口初步

XuZinan 2 years ago
parent
commit
48bf546f2a
2 changed files with 31 additions and 0 deletions
  1. 17 0
      src/pages/Auth/models/auth.js
  2. 14 0
      src/services/bomAuth.js

+ 17 - 0
src/pages/Auth/models/auth.js

@@ -0,0 +1,17 @@
+import { queryAuthList, queryCheckedList } from '@/services/BomAuth';
+export default {
+  namespace: 'detail',
+  state: {
+    authList: [],
+    checkedList: [],
+  },
+  effects: {},
+  reducers: {
+    save(state, action) {
+      return {
+        ...state,
+        ...action.payload,
+      };
+    },
+  },
+};

+ 14 - 0
src/services/bomAuth.js

@@ -0,0 +1,14 @@
+import request from '@/utils/request';
+import { stringify } from 'qs';
+
+//获取未审核列表
+//params: user_id
+export async function queryAuthList(user_id) {
+  return request(`/purchase/bom/get-audit-list/${user_id}`);
+}
+
+//获取已审核列表
+//params: user_id, page_size, current_page
+export async function queryCheckedList(user_id, params) {
+  return request(`/purchase/bom/get-checked-list/${user_id}?${stringify(params)}`);
+}