C3storageMove.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import http from '@/utils/http'
  2. import { AppDispatch } from '..'
  3. /**
  4. * 藏品移库-获取列表
  5. */
  6. export const C3_APIgetlist = (data: any, exportFlag?: boolean): any => {
  7. if (exportFlag) return http.post('cms/orderSite/move/page', data)
  8. else {
  9. return async (dispatch: AppDispatch) => {
  10. const res = await http.post('cms/orderSite/move/page', data)
  11. if (res.code === 0) {
  12. const obj = {
  13. list: res.data.records,
  14. total: res.data.total
  15. }
  16. dispatch({ type: 'C3/getList', payload: obj })
  17. }
  18. }
  19. }
  20. }
  21. /**
  22. * 藏品移库-创建订单
  23. */
  24. export const C3_APIcreate = () => {
  25. return http.get('cms/orderSite/move/create')
  26. }
  27. /**
  28. * 藏品移库-提交
  29. */
  30. export const C3_APIresubmit = (data: any) => {
  31. return http.post('cms/orderSite/move/apply', data)
  32. }
  33. /**
  34. * 藏品移库-获取详情
  35. */
  36. export const C3_APIgetInfo = (id: number) => {
  37. return http.get(`cms/orderSite/move/detail/${id}`)
  38. }
  39. /**
  40. * 藏品移库-审批
  41. */
  42. export const C3_APIaduit = (data: any) => {
  43. return http.post('cms/orderSite/move/audit', data)
  44. }