import request from '@/utils/request'

// 查询通用规则列表
export function listConvert(query) {
  return request({
    url: '/ActSuppliesConvertrole/ActSuppliesConvertrole/list',
    method: 'get',
    params: query
  })
}

// 查询通用规则详细
export function getConvert(id) {
  return request({
    url: '/ActSuppliesConvertrole/ActSuppliesConvertrole/' + id,
    method: 'get'
  })
}

// 新增通用规则
export function addConvert(data) {
  return request({
    url: '/ActSuppliesConvertrole/ActSuppliesConvertrole',
    method: 'post',
    data: data
  })
}

// 修改通用规则
export function updateConvert(data) {
  return request({
    url: '/ActSuppliesConvertrole/ActSuppliesConvertrole',
    method: 'put',
    data: data
  })
}

// 删除通用规则
export function delConvert(id) {
  return request({
    url: '/ActSuppliesConvertrole/ActSuppliesConvertrole/' + id,
    method: 'delete'
  })
}

// 导出通用规则
export function exportConvert(query) {
  return request({
    url: '/ActSuppliesConvertrole/ActSuppliesConvertrole/export',
    method: 'get',
    params: query
  })
}

// 通用转换页面查询规则列表
export function convertRoleList(id) {
    return request({
        url: '/ActSuppliesConvertrole/ActSuppliesConvertrole/convertRoleList/' + id,
        method: 'get'
    })
}

// 通用转换页面查询规则详情
export function convertRoleListid(id) {
    return request({
        url: '/ActSuppliesConvertrole/ActSuppliesConvertrole/convertRoleListid/' + id,
        method: 'get'
    })
}

// 查询模板
export function listTemp() {
    return request({
        url: '/ActSuppliesConvertrole/ActSuppliesConvertrole/listTemp',
        method: 'get',
    })
}

