service.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * @Author: your name
  3. * @Date: 2021-07-26 08:54:08
  4. * @LastEditTime: 2021-07-29 23:11:46
  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. const ids = [id];
  50. return request(`/api/costAccount/costsharelevel/delete`, {
  51. method: 'POST',
  52. data:ids,
  53. ...(options || {}),
  54. });
  55. }