service.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * @Author: your name
  3. * @Date: 2021-07-26 08:54:08
  4. * @LastEditTime: 2021-08-11 18:58:01
  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 getIncomeCostDataImport(params, options) {
  12. return request('/api/costAccount/costincomefile/list', {
  13. method: 'GET',
  14. params:{...params},
  15. ...(options || {}),
  16. });
  17. }
  18. //获取导入错误详情列表
  19. export async function getIncomeCostDataImportErrList(params, options) {
  20. return request('/api/costAccount/costincomefile/getErrorList', {
  21. method: 'GET',
  22. params:{...params},
  23. ...(options || {}),
  24. });
  25. }
  26. //导入数据
  27. export async function addIncomeCostDataImport(body, options) {
  28. const {fileFormData} = body;
  29. return request('/api/costAccount/excel/importDataByFileType', {
  30. method: 'POST',
  31. data:fileFormData,
  32. ...(options || {}),
  33. });
  34. }
  35. //撤销导入
  36. export async function cancelIncomeCostDataImport(body, options) {
  37. const {id} = body;
  38. return request('/api/costAccount/costincomefile/deleteImport', {
  39. method: 'POST',
  40. params:{id},
  41. ...(options || {}),
  42. });
  43. }