import { tmallabHttp } from '/@/utils/http/axios';
enum Api {
  List = '/system/productNegotiated/getList',
  BrandList = '/regionalSpotManage/commit',
  GetAreaList = '/system/opsProduct/getAreaList',
  OpsAddProduct = '/system/opsProduct/opsAddProduct',
  GetGhsAreaList = '/system/opsProduct/getGhsAreaList',
  OpsDeleteProduct = '/system/opsProduct/opsDeleteProduct',
  OpsEditProduct = '/system/opsProduct/opsEditProduct',
  UploadOpsProduct = '/excel/excelNew/uploadOpsProduct',
  RevokeExcelUpload = '/system/logProductManager/revokeExcelUpload',
  PlatformProBatchList = '/system/logNegotiationProductOperate/getList',
  PlatformProBatchGetDetail = '/system/logNegotiationProductOperate/getList',
}

/**
 * @description: 区域现货管理列表
 */
export const regionalSpotManageListApi = (data) => 
  tmallabHttp.post({ url: Api.List, data }, { errorMessageMode: 'message'});

/**
 * @description: 获取品牌列表
 */
export const regionalSpotManageBrandListApi = (data) => 
  tmallabHttp.post({ url: Api.BrandList,data }, { errorMessageMode: 'message'});

/**
 * @description: 获取现货区域列表
 */
export const regionalSpotManageGetAreaListApi = (data) => 
  tmallabHttp.post({ url: Api.GetAreaList,data },{ errorMessageMode: 'message' });

/**
 * @description: 新增商品接口
 */
export const regionalSpotManageOpsAddProductApi = (data) => 
  tmallabHttp.post({ url: Api.OpsAddProduct, data },{ errorMessageMode: 'message' });

/**
 * @description: 获取已开通区域
 */
export const regionalSpotManageGetGhsAreaListApi = (data) =>
  tmallabHttp.post({ url: Api.GetGhsAreaList, data },{ errorMessageMode: 'message' });

/**
 * @description: 单条/批量删除
 */
export const regionalSpotManageOpsDeleteProductApi = (data) => 
  tmallabHttp.post({ url: Api.OpsDeleteProduct, data },{ errorMessageMode: 'message' });

/**
 * @description: 增加区域
 */
export const regionalSpotManageOpsEditProductApi = (data) => 
  tmallabHttp.post({ url: Api.OpsEditProduct, data },{ errorMessageMode: 'message' });

/**
 * @description: 批量上传
 */
export const regionalSpotManageUploadOpsProductApi = (data) =>
  tmallabHttp.post({ url: Api.UploadOpsProduct, data },{ errorMessageMode: 'message' });

/**
 * @description: 任务中心获取列表
 */
export const taskCenterQueryListApi = (data) => 
  tmallabHttp.post({ url: Api.RevokeExcelUpload, data },{ errorMessageMode: 'message' });

/**
 * @description: 撤销
 */
export const taskCenterRevokeExcelUploadApi = (data) => 
  tmallabHttp.post({ url: Api.RevokeExcelUpload, data },{ errorMessageMode: 'message' });

/**
 * @description: 任务中心获取列表--平台商品批量页签
 */
export const platformProBatchGetListApi = (data) =>
  tmallabHttp.post({ url: Api.PlatformProBatchList, data },{ errorMessageMode: 'message' });

/**
 * @description: 任务中心获取列表--平台商品批量页签--操作记录详情
 */
export const platformProBatchGetDetailApi = (data) =>
  tmallabHttp.post({ url: Api.PlatformProBatchGetDetail, data },{ errorMessageMode: 'message' });
