B2identify.ts 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. import http from '@/utils/http'
  2. import { AppDispatch } from '..'
  3. /**
  4. * 藏品鉴定 - 获取分页列表
  5. */
  6. export const B2_APIgetList = (data: any, exportFlag?: boolean): any => {
  7. if (exportFlag) return http.post('cms/orderAuth/page', data)
  8. else {
  9. return async (dispatch: AppDispatch) => {
  10. const res = await http.post('cms/orderAuth/page', data)
  11. if (res.code === 0) {
  12. const obj = {
  13. list: res.data.records,
  14. total: res.data.total
  15. }
  16. dispatch({ type: 'B2/getList', payload: obj })
  17. }
  18. }
  19. }
  20. }
  21. /**
  22. * 藏品鉴定-删除
  23. */
  24. export const B2_APIdel = (id: number) => {
  25. return http.get(`cms/orderAuth/remove/${id}`)
  26. }
  27. /**
  28. * 藏品鉴定-创建订单
  29. */
  30. export const B2_APIcreate = () => {
  31. return http.get('cms/orderAuth/create')
  32. }
  33. /**
  34. * 藏品鉴定-获取详情
  35. */
  36. export const B2_APIgetInfo = (id: number) => {
  37. return http.get(`cms/orderAuth/detail/${id}`)
  38. }
  39. /**
  40. * 藏品鉴定-存草稿
  41. */
  42. export const B2_APIsaveDraft = (data: any) => {
  43. return http.post('cms/orderAuth/saveDraft', data)
  44. }
  45. /**
  46. * 藏品鉴定-创建
  47. */
  48. export const B2_APIsaveCreate = (data: any) => {
  49. return http.post('cms/orderAuth/saveCreate', data)
  50. }
  51. /**
  52. * 藏品鉴定-编辑保存
  53. */
  54. export const B2_APIsaveApply = (data: any) => {
  55. return http.post('cms/orderAuth/saveApply', data)
  56. }
  57. /**
  58. * 藏品鉴定-审批
  59. */
  60. export const B2_APIsaveAudit = (data: any) => {
  61. return http.post('cms/orderAuth/audit', data)
  62. }
  63. /**
  64. * 藏品鉴定-撤回订单
  65. */
  66. export const B2_APIrevocation = (id: number) => {
  67. return http.get(`cms/orderAuth/revocation/${id}`)
  68. }
  69. // --------------------------线索相关-----------------
  70. /**
  71. * 藏品鉴定-线索-新增\编辑
  72. */
  73. export const B2X_APIsave = (data: any) => {
  74. return http.post('cms/orderAuth/collect/save', data)
  75. }
  76. /**
  77. * 藏品鉴定-线索-详情
  78. */
  79. export const B2X_APIgetInfo = (id: number) => {
  80. return http.get(`cms/orderAuth/collect/detail/${id}`)
  81. }