import request, { postBlob, handleImport, getBlob } from '@/utils/request'

// 销售执行明细列表-零售订单-V2
export function retailExecRetailV2(data) {
  return request({
    url: `/retail/exec/retail/v2?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

//销售执行明细列表-政策零售订单-V2-导出
export function retailExecRetailV2Export(data, name) {
  return postBlob({
    url: '/retail/exec/retail/export/v2',
    method: 'post',
    data,
    name
  })
}

// 销售执行明细列表-政策零售订单-V2
export function retailExecPolicyListV2(data) {
  return request({
    url: `/retail/exec/policy/list/v2?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

//销售执行明细列表-政策零售订单-V2-导出
export function retailExecPolicyListV2Export(data, name) {
  return postBlob({
    url: '/retail/exec/policy/export/v2',
    method: 'post',
    data,
    name
  })
}

// 销售执行明细列表-政策零售订单-V2
export function retailExecEnginListV2(data) {
  return request({
    url: `/retail/exec/engin/list/v2?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

//销售执行明细列表-政策零售订单-V2-导出
export function retailExecEnginListV2Export(data, name) {
  return postBlob({
    url: '/retail/exec/engin/export/v2',
    method: 'post',
    data,
    name
  })
}

// 获取列表
export function getList(params) {
  return request({
    url: '/retail/exec/list',
    method: 'get',
    params
  })
}

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

// 获取列表
export function getTotalList(params) {
  return request({
    url: '/retail/exec/list/total',
    method: 'get',
    params
  })
}

// 商用信息单-执行明细
export function getExecList(params) {
  return request({
    url: '/engin-info-order/exec/list',
    method: 'get',
    params
  })
}

// 执行明细-列表
export function v2EnginInfoOrderExcelList(data) {
  return request({
    url: `/v2/engin-info-order/exec/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

//执行明细-导出
export function v2EnginInfoOrderExcelListExport(data, name) {
  return postBlob({
    url: '/v2/engin-info-order/exec/list/export',
    method: 'post',
    data,
    name
  })
}



// 改变订单是否生成仓储账单
export function setUpdateOrderCost(params) {
  return request({
    url: '/stock/cost/updateOrderCost',
    method: 'post',
    params
  })
}
