import request from '@/utils/request'

// 预览商品
export function getItemPreview(query) {
  return request({
    url: '/item/getItemPreview',
    method: 'get',
    params: query
  })
}

// 商品解绑
export function unbindingItem(query) {
  return request({
    url: '/item/unbindingItem',
    method: 'delete',
    params: query
  })
}

// 商品批量审核
export function batchItemProcess(query) {
  return request({
    url: '/item/batchItemProcess',
    method: 'post',
    data: query
  })
}

// 获取商品列表
export function getItemList(query) {
  return request({
    url: '/item/list',
    method: 'get',
    params: query
  })
}

// 获取省
export function getAreaList(query) {
  return request({
    url: '/item/getProvince',
    method: 'get',
    params: query
  })
}

// 获取市
export function getCity(query) {
  return request({
    url: '/item/getCity',
    method: 'get',
    params: query
  })
}

// 判断是否绑定
export function checkItem(query) {
  return request({
    url: '/item/checkItem',
    method: 'get',
    params: query
  })
}

export function checkUser(query) {
  return request({
    url: '/item/checkUser',
    method: 'get',
    params: query
  })
}


// 新增商品

export function insertItem(query) {
  return request({
    url: '/item/insertItem',
    method: 'post',
    data: query
  })
}


// 修改商品

export function editItem(query) {
  return request({
    url: '/item/edit',
    method: 'put',
    data: query
  })
}

// 品类下拉

export function getCategoryIds(query) {
  return request({
    url: '/item/getCategoryIds',
    method: 'get',
    params: query
  })
}

// 活动ID下拉

export function getActivityIds(query) {
  return request({
    url: '/item/getActivityIds',
    method: 'get',
    params: query
  })
}

export function getRegimental(query) {
  return request({
    url: '/item/getRegimental',
    method: 'get',
    params: query
  })
}

export function getDataOwnership(query) {
  return request({
    url: '/item/getDataOwnership',
    method: 'get',
    params: query
  })
}

//领样预览

export function preview(query) {
  return request({
    url: '/itemCollectSamples/preview',
    method: 'post',
    data: query
  })
}

//领样提交

export function addPreview(query) {
  return request({
    url: '/itemCollectSamples/add',
    method: 'post',
    data: query
  })
}

//领样修改

export function editPreview(query) {
  return request({
    url: '/itemCollectSamples/edit',
    method: 'put',
    data: query
  })
}

//修改状态-直接跳到待上传作业

export function toUpdateTask(query) {
  return request({
    url: '/itemCollectSamples/updateTask',
    method: 'put',
    data: query
  })
}


//批量审核

export function batchProcess(query) {
  return request({
    url: '/itemCollectSamples/batchProcess',
    method: 'post',
    data: query
  })
}

//领样人修改-查询人员列表
export function getUserList(query) {
  return request({
    url: '/itemCollectSamples/getUserList',
    method: 'get',
    params: query
  })
}


//领样作废

export function removePreview(query) {
  return request({
    url: '/itemCollectSamples/remove',
    method: 'delete',
    params: query
  })
}

//详情编辑

export function updatePreview(query) {
  return request({
    url: '/itemCollectSamples/update',
    method: 'put',
    data: query
  })
}

// 领样列表
export function getList(query) {
  return request({
    url: '/itemCollectSamples/list',
    method: 'get',
    params: query
  })
}


// 获取快递公司
export function getCompany(query) {
  return request({
    url: '/itemCollectSamples/getCompany',
    method: 'get',
    params: query
  })
}

// 修改快递单号
export function updateCourierNumber(query) {
  return request({
    url: '/itemCollectSamples/updateCourierNumber',
    method: 'get',
    params: query
  })
}


//  详情
export function getDetail(query) {
  return request({
    url: '/itemCollectSamples/detail',
    method: 'get',
    params: query
  })
}

// 结算规则修改/新增绑定
export function editRuleIdByItemId(query) {
  return request({
    url: 'item/editRuleIdByItemId',
    method: 'get',
    params: query
  })
}

// 删除关联商品
export function removeRelateByItemId(query) {
  return request({
    url: 'item/removeRelateByItemId',
    method: 'get',
    params: query
  })
}


//  达人详情
export function getPromoterInfo(query) {
  return request({
    url: '/kuaishou/promoter/getPromoterInfo',
    method: 'get',
    params: query
  })
}

//  物流详情
export function courierNumberInfo(query) {
  return request({
    url: '/itemCollectSamples/courierNumberInfo',
    method: 'get',
    params: query
  })
}


//  达人详情
export function copyInfo(query) {
  return request({
    url: '/itemCollectSamples/copyInfo',
    method: 'get',
    params: query
  })
}


//获取图片文字

export function readImage(query) {
  return request({
    url: '/kuaishou/promoter/readImage',
    method: 'post',
    data: query
  })
}


//获取图片文字

export function getItemDetailByItemId(query) {
  return request({
    url: '/item/getItemDetailByItemId',
    method: 'get',
    params: query
  })
}

//添加关联商品
export function editRelateByItemId(query) {
  return request({
    url: '/item/editRelateByItemId',
    method: 'get',
    params: query
  })
}


export function updateIsPresaleByItemId(query) {
  return request({
    url: '/item/updateIsPresaleByItemId',
    method: 'get',
    params: query
  })
}

//查看关联商品列表
export function getListByRelateId(query) {
  return request({
    url: '/item/getListByRelateId',
    method: 'get',
    params: query
  })
}

//查看规则列表
export function getRuleListNoPage(query) {
  return request({
    url: '/rules/getRuleListNoPage',
    method: 'get',
    params: query
  })
}

//查看规则列表-有分页
export function getRuleList(query) {
  return request({
    url: '/rules/getRuleList',
    method: 'get',
    params: query
  })
}

export function getAllRuleList(query) {
  return request({
    url: '/rules/getAllRuleList',
    method: 'get',
    params: query
  })
}

//新增规则
export function addRule(query) {
  return request({
    url: '/rules/addRule',
    method: 'post',
    data: query
  })
}

//编辑规则名称
export function editRule(query) {
  return request({
    url: '/rules/edit',
    method: 'put',
    data: query
  })
}

//删除规则
export function removeRule(query) {
  return request({
    url: '/rules/remove',
    method: 'delete',
    params: query
  })
}

//查看规则详情
export function getRuleDetailByRuleId(query) {
  return request({
    url: '/rules/getRuleDetailByRuleId',
    method: 'get',
    params: query
  })
}

//规则详情修改
export function editDetail(query) {
  return request({
    url: '/detail/edit',
    method: 'put',
    data: query
  })
}

//规则详情-单条添加
export function addDetail(query) {
  return request({
    url: '/detail/add',
    method: 'post',
    data: query
  })
}


//基地结算列表
export function getSettlementList(query) {
  return request({
    url: '/settlement/getSettlementList',
    method: 'get',
    params: query
  })
}

export function getSettlementListV2(query) {
  return request({
    url: '/settlement/getSettlementListV2',
    method: 'get',
    params: query
  })
}

//基地结算--修改状态
export function updatePromoterStatus(query) {
  return request({
    url: '/settlement/edit',
    method: 'put',
    params: query
  })
}


export function updatePromoterStatusTotal(query) {
  return request({
    url: '/settlement/updatePromoterStatus',
    method: 'get',
    params: query
  })
}

//基地结算--详情
export function getPromoterSettlementDetail(query) {
  return request({
    url: '/settlement/getPromoterSettlementDetail',
    method: 'get',
    params: query
  })
}

//基地结算--详情结算
export function editStatus(query) {
  return request({
    url: '/settlement/edit',
    method: 'put',
    data: query
  })
}

export function updateStatus(query) {
  return request({
    url: '/settlement/update',
    method: 'put',
    data: query
  })
}


export function updateSettlement(query) {
  return request({
    url: '/settlement/updateSettlement',
    method: 'put',
    data: query
  })
}

export function financialReviewList(query) {
  return request({
    url: '/financialReview/list',
    method: 'get',
    params: query
  })
}

export function updateFinancialReviewStatusTotal(query) {
  return request({
    url: '/financialReview/updateFinancialReviewStatusTotal',
    method: 'get',
    params: query
  })
}

export function detailList(query) {
  return request({
    url: '/financialReview/detailList',
    method: 'get',
    params: query
  })
}

export function updateFinancialReviewDetails(query) {
  return request({
    url: '/financialReview/updateFinancialReviewDetails',
    method: 'get',
    params: query
  })
}
















