import request from '@/utils/request'

//获取系统参数各列表
export function getzccsList(params) {
    return request({
        url: '/system/manager/system/query-sys-config',
        method: 'get',
        params
    })
}

//获取致富配置列表
export function getzccsPayList(params) {
    return request({
        url: '/system/manager/system/query-sys-config-pay',
        method: 'get',
        params
    })
}

//邮费配置修改
export function saveYfpz(data) {
    return request({
        url: '/system/manager/system/update-sys-config',
        method: 'post',
        data
    })
}

//获取标签配置枚举
export function getLabelType(params) {
    return request({
        url: '/system/pub/enums/label-type',
        method: 'get',
        params
    })
}

//获取标签列表
export function getLabelList(data) {
    return request({
        url: '/system/manage/label/list',
        method: 'post',
        data
    })
}

//删除标签
export function deletLabel(params) {
    return request({
        url: '/system/manage/label/delete',
        method: 'get',
        params
    })
}

//保存标签
export function saveLabel(data) {
    return request({
        url: '/system/manage/label/save',
        method: 'post',
        data
    })
}

//查看单条详情标签
export function getLabelDetail(params) {
    return request({
        url: '/system/manage/label/detail',
        method: 'get',
        params
    })
}


//修改标签
export function updateLabel(data) {
    return request({
        url: '/system/manage/label/update',
        method: 'post',
        data
    })
}

//权限配置列表
export function getbdmenuList(params) {
    return request({
        url: '/system/manage/bd-menu/list',
        method: 'get',
        params
    })
}
// 保存
export function submitSave(data) {
  return request({
    url: '/system/manage/bd-menu',
    method: 'put',
    data
  })
}

// 修改前台菜单配置
export function updateMenu(data) {
  return request({
    url: '/system/manage/bd-menu',
    method: 'post',
    data
  })
}
// 删除前台菜单配置
export function delMenu(data) {
  return request({
    url: '/system/manage/bd-menu/' + data,
    method: 'delete'
  })
}
// 前台菜单详情
export function menuDetails(data) {
  return request({
    url: '/system/manage/bd-menu/' + data,
    method: 'get'
  })
}
//前台菜单列表下拉选
export function getPubenumsList(params) {
    return request({
        url: '/system/pub/enums/menu-list',
        method: 'get',
        params
    })
}

// 获取洲际配置列表
export function getContinentList(params) {
  return request({
    url: '/system/manage/continent/list',
    method: 'get',
    params
  })
}
// 新增大洲
export function addContinent(data) {
  return request({
    url: '/system/manage/continent/save',
    method: 'post',
    data
  })
}
// 查询洲际配置
export function getContinent(params) {
  return request({
    url: '/system/manage/continent/getOne/' + params,
    method: 'get'
  })
}
// 修改大洲
export function updateContinent(data) {
  return request({
    url: '/system/manage/continent/update',
    method: 'post',
    data
  })
}
// 新增二级大洲
export function saveTwoStage(data) {
  return request({
    url: '/system/manage/continent/saveTwoStage',
    method: 'post',
    data
  })
}
// 修改二级大洲
export function updateTwoStage(data) {
  return request({
    url: '/system/manage/continent/updateTwoStage',
    method: 'post',
    data
  })
}
// 关联国家
export function bindingCountry(data) {
  return request({
    url: '/system/manage/continent/binding-country',
    method: 'post',
    data
  })
}
// 查询洲际配置
export function getSonlist(params) {
  return request({
    url: '/system/manage/continent/sonlist',
    method: 'get',
    params
  })
}
// 查询关联国家
export function countrylist(params) {
  return request({
    url: '/system/manage/continent/countrylist',
    method: 'get',
    params
  })
}
// 获取关联省(地域配置)
export function provinceList(params) {
  return request({
    url: '/system/manage/continent/provincelist',
    method: 'get',
    params
  })
}
// 获取大区配置列表(地域配置)
export function listRegion(params) {
  return request({
    url: '/system/manage/continent/list-region',
    method: 'get',
    params
  })
}
// 新增大区(地域配置)
export function saveRegion(data) {
  return request({
    url: '/system/manage/continent/saveRegion',
    method: 'post',
    data
  })
}
// 新增二级大区(地域配置)
export function saveTwoStageRegion(data) {
  return request({
    url: '/system/manage/continent/saveTwoStageRegion',
    method: 'post',
    data
  })
}
// 关联国家(地域配置)
export function bindingProvince(data) {
  return request({
    url: '/system/manage/continent/binding-province',
    method: 'post',
    data
  })
}
// 关联省(地域配置)
export function getAreaOne(params) {
  return request({
    url: '/system/manage/continent/getOne/' + params,
    method: 'get'
  })
}
// 查询子级大区(地域配置)
export function sonlistRegion(params) {
  return request({
    url: '/system/manage/continent/sonlist-region',
    method: 'get',
    params
  })
}
// 修改大区(地域配置)
export function updateRegion(data) {
  return request({
    url: '/system/manage/continent/update-region',
    method: 'post',
    data
  })
}
// 修改二级大区(地域配置)
export function updateTwoRegion(data) {
  return request({
    url: '/system/manage/continent/update-twoStage-region',
    method: 'post',
    data
  })
}
// 取消关联(地域配置)
export function continentCancel(params) {
  return request({
    url: '/system/manage/continent/' + params,
    method: 'delete'
  })
}

//仓库配置列表
export function getStoreHouseList(params) {
  return request({
    url: '/system/manage/storehouse/list',
    method: 'get',
    params
  })
}

//生成仓库配置列表
export function getStoreHouseCode(params) {
  return request({
    url: '/system/manage/storehouse/getCode',
    method: 'get',
    params
  })
}

//新增仓库配置
export function saveStoreHouse(data) {
  return request({
    url: '/system/manage/storehouse/save',
    method: 'post',
    data
  })
}

//修改仓库配置
export function updateStoreHouse(data) {
  return request({
    url: '/system/manage/storehouse/update',
    method: 'post',
    data
  })
}

//获取仓库配置单条详情
export function getBdStorehouse(params) {
  return request({
    url: '/system/manage/storehouse/getBdStorehouse/' + params,
    method: 'get'
  })
}

//删除仓库配置单条
export function delBdStorehouse(data) {
  return request({
    url: '/system/manage/storehouse/delBdStorehouse/' + data,
    method: 'post'
  })
}

//绑定仓库配置列表
export function getBindProductStorehouseList(params) {
  return request({
    url: '/system/manage/bd-product-storehouse/list',
    method: 'get',
    params
  })
}
//供应商用户列表
export function supplierList(params) {
  return request({
    url: '/system/manage/supplier/list',
    method: 'get',
    params
  })
}

// 新增产品绑定仓库
export function saveBdProductStorehouse(data) {
  return request({
    url: '/system/manage/bd-product-storehouse/save',
    method: 'post',
    data
  })
}

// 修改产品绑定仓库
export function updateBdProductStorehouse(data) {
  return request({
    url: '/system/manage/bd-product-storehouse/update',
    method: 'post',
    data
  })
}

//供应商用户新增
export function supplierAdd(data) {
  return request({
    url: '/system/manage/supplier',
    data,
    method: 'post'
  })
}
//供应商用户详情
export function supplierDetials(params) {
  return request({
    url: '/system/manage/supplier/' + params,
    method: 'get'
  })
}
//供应商用户修改
export function supplierEdit(data) {
  return request({
    url: '/system/manage/supplier',
    method: 'PUT',
    data
  })
}
//供应商用户删除
export function supplierDel(params) {
  return request({
    url: '/system/manage/supplier/'+ params,
    method: 'delete',
  })
}
//供应商用户修改状态
export function supplierStatus(data) {
  return request({
    url: '/system/manage/supplier/change-status',
    method: 'PUT',
    data
  })
}

//删除产品绑定仓库单条
export function delBdProductStorehouse(data) {
  return request({
    url: '/system/manage/bd-product-storehouse/del/' + data,
    method: 'post'
  })
}

//获取产品绑定仓库配置单条详情
export function getBdProductStorehouse(params) {
  return request({
    url: '/system/manage/bd-product-storehouse/geOne/' + params,
    method: 'get'
  })
}



