A4voucher.ts 661 B

123456789101112131415161718192021222324
  1. import http from '@/utils/http'
  2. import { AppDispatch } from '..'
  3. /**
  4. * 借展管理-列表
  5. */
  6. export const A4_APIList = (data: any, exportFlag = false): any => {
  7. if (exportFlag) return http.post('/cms/orderFile/page', data)
  8. return async (dispatch: AppDispatch) => {
  9. const res = await http.post('/cms/orderFile/page', data)
  10. if (res.code === 0) {
  11. const obj = {
  12. list: res.data.records,
  13. total: res.data.total
  14. }
  15. dispatch({ type: 'A4/getList', payload: obj })
  16. }
  17. }
  18. }
  19. export const A4_APIDownload = (data: number[], type: 1 | 2) => {
  20. return http.post(`cms/orderFile/downloadBatch?downloadType=${type}`, data)
  21. }