123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- /*
- * @Author: your name
- * @Date: 2021-07-26 08:54:08
- * @LastEditTime: 2021-08-12 18:24:15
- * @LastEditors: Please set LastEditors
- * @Description: In User Settings Edit
- * @FilePath: /TracerMethodology_PC/src/pages/DepartmentMana/service.js
- */
- import { request } from 'umi';
- //获取收入成本数据设置列表
- export async function getIncomeCostDataImport(params, options) {
- return request('/api/costAccount/costincomefile/list', {
- method: 'GET',
- params:{...params},
- ...(options || {}),
- });
- }
- //获取导入错误详情列表
- export async function getIncomeCostDataImportErrList(params, options) {
-
- return request('/api/costAccount/costincomefile/getErrorList', {
- method: 'GET',
- params:{...params},
- ...(options || {}),
- });
- }
- //导入收入数据
- export async function addIncomeCostDataImport(body, options) {
- const {formData} = body;
- const type = formData.get('fileType');
- const urlMap = [
- '/api/costAccount/excel/importShareParamGroup',//成本分摊
- '/api/costAccount/excel/importDataByFileType',//收入
- '/api/costAccount/excel/importCostingGroup',//成本
- ];
- // console.log({type},Number(type)-1);
- return request(urlMap[Number(type)-1], {
- method: 'POST',
- data:formData,
- ...(options || {}),
- });
- }
- //addIncomeCostDataImport
- //撤销导入
- export async function cancelIncomeCostDataImport(body, options) {
- const {id} = body;
- return request('/api/costAccount/costincomefile/deleteImport', {
- method: 'POST',
- params:{id},
- ...(options || {}),
- });
- }
|