report.ts 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. import HttpAxios from '@/utils/axios'
  2. const base = import.meta.env.VITE_API_HOST
  3. const baseUrl = `${base}/main_new_version.php`
  4. /**
  5. * 获取report template management表格列数据
  6. */
  7. export const getReportTemplateManagementTable = (params: any, config: any) => {
  8. return HttpAxios.post(
  9. `${baseUrl}`,
  10. {
  11. action: 'report_config',
  12. operate: 'search',
  13. ...params
  14. },
  15. config
  16. )
  17. }
  18. /**
  19. * 更改Report Template Management表格 Is Active状态
  20. */
  21. export const changeReportTemplateIsActive = (params: any, config: any) => {
  22. return HttpAxios.post(
  23. `${baseUrl}`,
  24. {
  25. action: 'report_config',
  26. operate: 'active',
  27. ...params
  28. },
  29. config
  30. )
  31. }
  32. /**
  33. * 获取Report Fields Configuration 列表数据
  34. */
  35. export const getReportFieldsConfiguration = (params: any, config: any) => {
  36. return HttpAxios.get(
  37. `${baseUrl}`,
  38. {
  39. action: 'report_config',
  40. operate: 'report_field_load',
  41. ...params
  42. },
  43. config
  44. )
  45. }
  46. /**
  47. * Create New Report Template页面获取Specific Roles的Party ID数据
  48. */
  49. export const getSpecificRolesPartyID = (params: any, config: any) => {
  50. return HttpAxios.post(
  51. `${baseUrl}`,
  52. {
  53. action: 'ajax',
  54. operate: 'autody_extend',
  55. type: 'apex',
  56. ...params
  57. },
  58. config
  59. )
  60. }
  61. /**
  62. * Create New Report Template页面获取Specific Roles的Group Name数据
  63. */
  64. export const getSpecificRolesGroupName = (params: any, config: any) => {
  65. return HttpAxios.post(
  66. `${baseUrl}`,
  67. {
  68. action: 'ajax',
  69. operate: 'autody_extend',
  70. type: 'contact_group',
  71. ...params
  72. },
  73. config
  74. )
  75. }
  76. /**
  77. * 保存 Create New Report Template页面数据
  78. */
  79. export const saveNewReportTemplate = (params: any, config: any) => {
  80. return HttpAxios.post(
  81. `${baseUrl}`,
  82. {
  83. action: 'report_config',
  84. operate: 'save',
  85. ...params
  86. },
  87. config
  88. )
  89. }
  90. /**
  91. * 编辑report template
  92. */
  93. export const editReportTemplate = (params: any, config: any) => {
  94. return HttpAxios.post(
  95. `${baseUrl}`,
  96. {
  97. action: 'report_config',
  98. operate: 'add',
  99. ...params
  100. },
  101. config
  102. )
  103. }
  104. /**
  105. * 获取Report页表格数据
  106. */
  107. export const getReportPageTable = (params: any, config: any) => {
  108. return HttpAxios.post(
  109. `${baseUrl}`,
  110. {
  111. action: 'shipment_status_report',
  112. operate: 'report_search',
  113. ...params
  114. },
  115. config
  116. )
  117. }
  118. /**
  119. * 获取Report detail页表格数据
  120. */
  121. export const getReportDetailTable = (params: any, config: any) => {
  122. return HttpAxios.post(
  123. `${baseUrl}`,
  124. {
  125. action: 'shipment_status_report',
  126. operate: 'report_detail',
  127. ...params
  128. },
  129. config
  130. )
  131. }
  132. /**
  133. * 导出Report detail页表格数据
  134. */
  135. export const exportReportDetailTable = (params: any, config: any) => {
  136. return HttpAxios.post(
  137. `${baseUrl}`,
  138. {
  139. action: 'shipment_status_report',
  140. operate: 'excel',
  141. ...params
  142. },
  143. config
  144. )
  145. }
  146. /**
  147. * 获取 Manage Fields 列表数据
  148. */
  149. export const getManageFieldsList = (params: any, config: any) => {
  150. return HttpAxios.post(
  151. `${baseUrl}`,
  152. {
  153. action: 'shipment_status_report',
  154. operate: 'manage_fileds',
  155. ...params
  156. },
  157. config
  158. )
  159. }
  160. /**
  161. * 保存 Manage Fields 列表数据
  162. */
  163. export const saveManageFieldsList = (params: any, config: any) => {
  164. return HttpAxios.post(
  165. `${baseUrl}`,
  166. {
  167. action: 'shipment_status_report',
  168. operate: 'manage_fileds',
  169. ...params
  170. },
  171. config
  172. )
  173. }
  174. /**
  175. * 获取 report schedule 页面数据
  176. */
  177. export const getReportScheduleData = (params: any, config: any) => {
  178. return HttpAxios.post(
  179. `${baseUrl}`,
  180. {
  181. action: 'shipment_status_report',
  182. operate: 'report_schedule',
  183. ...params
  184. },
  185. config
  186. )
  187. }
  188. /**
  189. * 保存 report schedule 页面数据
  190. */
  191. export const saveReportScheduleData = (params: any, config: any) => {
  192. return HttpAxios.post(
  193. `${baseUrl}`,
  194. {
  195. action: 'shipment_status_report',
  196. operate: 'report_schedule',
  197. ...params
  198. },
  199. config
  200. )
  201. }
  202. /**
  203. * 获取 report schedule 表格数据
  204. */
  205. export const getReportScheduleTable = (params: any, config: any) => {
  206. return HttpAxios.post(
  207. `${baseUrl}`,
  208. {
  209. action: 'shipment_status_report',
  210. operate: 'report_schedule_search',
  211. ...params
  212. },
  213. config
  214. )
  215. }