service.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * @Author: your name
  3. * @Date: 2021-07-26 08:54:08
  4. * @LastEditTime: 2021-07-28 15:10:14
  5. * @LastEditors: Please set LastEditors
  6. * @Description: In User Settings Edit
  7. * @FilePath: /TracerMethodology_PC/src/pages/DepartmentMana/service.js
  8. */
  9. import { request } from 'umi';
  10. //获取分摊层级列表
  11. export async function getApportionmentLevelList(params, options) {
  12. const {shareName,current,pageSize,} = params;
  13. return request('/api/costAccount/costsharelevel/list', {
  14. method: 'GET',
  15. params:{
  16. name:shareName,
  17. current,
  18. pageSize
  19. },
  20. ...(options || {}),
  21. });
  22. }
  23. //获取分摊层级列表无分页
  24. export async function getApportionmentLevelListNoPage(params, options) {
  25. return request('/api/costAccount/costsharelevel/list', {
  26. method: 'GET',
  27. ...(options || {}),
  28. });
  29. }
  30. //编辑分摊层级
  31. export async function editApportionmentLevelList(body, options) {
  32. return request('/api/costAccount/costsharelevel/update', {
  33. method: 'POST',
  34. data:{...body},
  35. ...(options || {}),
  36. });
  37. }
  38. //新增分摊层级
  39. export async function addApportionmentLevel(body, options) {
  40. return request('/api/costAccount/costsharelevel/save', {
  41. method: 'POST',
  42. data:{...body},
  43. ...(options || {}),
  44. });
  45. }
  46. //删除分摊层级
  47. export async function delApportionmentLevel(params, options) {
  48. const {id} = params;
  49. return request(`/api/costAccount/costsharelevel/delete?ids=${id}`, {
  50. method: 'POST',
  51. ...(options || {}),
  52. });
  53. }