| | |
| | | import request from '../../utils/request' |
| | | import { encryptData } from '@/utils/request/decryption.js' |
| | | |
| | | // 查询 |
| | | export function fetchList (type) { |
| | | if(type !=null && type != undefined){ |
| | | return request.get(`/visitsAdmin/cloudService/business/company/tree?type=${type}`, { |
| | | trim: true |
| | | }) |
| | | }else{ |
| | | return request.get(`/visitsAdmin/cloudService/business/company/tree`, { |
| | | trim: true |
| | | }) |
| | | } |
| | | |
| | | export function fetchList (data) { |
| | | return request.post('/business/company/page', encryptData(data), { |
| | | trim: true |
| | | }) |
| | | } |
| | | export function treeList (data) { |
| | | return request.post('/business/company/tree', encryptData(data), { |
| | | trim: true |
| | | }) |
| | | } |
| | | |
| | | // export function fetchList (data) { |
| | | // return request.post('/business/company/page', data, { |
| | | // trim: true |
| | | // }) |
| | | // } |
| | | |
| | | // 导出Excel |
| | | export function exportExcel (data) { |
| | | return request.post('/business/company/exportExcel', encryptData(data), { |
| | | trim: true, |
| | | download: true |
| | | }) |
| | | } |
| | | export function companySync (data) { |
| | | return request.post('/business/company/syncAll', encryptData(data)) |
| | | } |
| | | // 创建 |
| | | export function create (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/company/create', data) |
| | | } |
| | | // 创建财务公司 |
| | | export function createFinanceCompany (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/company/createFinanceCompany', data) |
| | | } |
| | | export function updateFinanceCompany (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/company/updateFinanceCompany', data) |
| | | return request.post('/business/company/create', encryptData(data)) |
| | | } |
| | | |
| | | // 修改 |
| | | export function updateById (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/company/updateById', data) |
| | | } |
| | | export function sort (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/company/updateSort', data) |
| | | } |
| | | |
| | | // 部门信息同步 |
| | | export function companySync (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/company/syncAll', data) |
| | | } |
| | | // 分页查询 |
| | | export function companyGetList (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/company/page', data) |
| | | } |
| | | // 查询所有部门 |
| | | export function companyGetListPost (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/company/list', data) |
| | | return request.post('/business/company/updateById', encryptData(data)) |
| | | } |
| | | |
| | | // 删除 |
| | | export function deleteById (id) { |
| | | return request.get(`/visitsAdmin/cloudService/business/company/delete/${id}`) |
| | | } |
| | | export function updateStatusById (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/company/updateStatusById', data) |
| | | } |
| | | |
| | | // 根据类型查询组织信息 |
| | | export function findCompanyTreePage (type) { |
| | | return request.get(`/visitsAdmin/cloudService/business/company/findCompanyTreePage?type=${type}`) |
| | | return request.get(`/business/company/delete/${id}`) |
| | | } |
| | | |
| | | // 批量删除 |
| | | export function deleteByIdInBatch (ids) { |
| | | return request.get('/visitsAdmin/cloudService/business/company/delete/batch', { |
| | | return request.get('/business/company/delete/batch', { |
| | | params: { |
| | | ids |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 根据ID查询 |
| | | export function getById (id) { |
| | | return request.get(`/visitsAdmin/cloudService/business/company/${id}`) |
| | | } |