// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import request from './request'

/**
 * @description 订单 -- 列表
 */
export function orderListApi(data) {
  return request.get('order/lst', data)
}

/**
 * @description 订单 -- 表头
 */
export function chartApi() {
  return request.get('order/chart')
}

/**
 * @description 订单 -- 卡片
 */
export function cardListApi(data) {
    return request.get('order/title', data)
}
/**
 * @description 订单 -- 编辑
 */
export function orderUpdateApi(id) {
  return request.get(`store/order/update/${id}/form`)
}

/**
 * @description 订单 -- 发货
 */
export function orderDeliveryApi(id) {
  return request.get(`store/order/delivery/${id}/form`)
}

/**
 * @description 订单 -- 详情
 */
export function orderDetailApi(id) {
  return request.get(`order/detail/${id}`)
}

/**
 * @description 退款订单 -- 列表
 */
export function refundorderListApi(data) {
  return request.get('order/refund/lst', data)
}

/**
 * @description 释放订单 -- 列表
 */
export function releaseorderListApi(data) {
  return request.get('orderRelease/lst', data)
}

/**
 * @description 健康积分 -- 列表
 */
export function healthyorderListApi(data) {
  return request.get('Healthy/lst', data)
}

/**
 * @description 健康积分 -- 导出
 */
export function healthyOrderApi(data) {
  return request.get('Healthy/excel', data)
}


/**
 * @description 采购订单 -- 列表
 */
export function purchaseListApi(data) {
  return request.get('order/purchase', data)
}

/**
 * @description 技术订单 -- 列表
 */
export function technologyListApi(data) {
  return request.get('order/technology', data)
}

/**
 * @description 会计订单 -- 列表
 */
export function accountingListApi(data) {
  return request.get('order/accounting', data)
}

/**
 * @description 订单审核通过
 */
export function orderExamine(id) {
   return request.post(`order/examine/${id}`)
}

/**
 * @description 订单审核拒绝
 */
export function orderFail(id) {
   return request.post(`order/fail/${id}`)
}

/**
 * @description 获取物流信息
 */
export function getExpress(id) {
  return request.get(`order/express/${id}`)
}
/**
 * @description 导出订单
 */
export function exportOrderApi(data) {
  return request.get(`order/excel`,  data )
}
/**
 * @description 导出退款单
 */
 export function exportRefundOrderApi(data) {
  return request.get(`order/refund/excel`,  data )
}
/**
 * @description 导出文件列表
 */
export function exportFileLstApi(data) {
  return request.get(`excel/lst`, data)
}

/**
 * @description 下载
 */
export function downloadFileApi(id) {
  return request.get(`excel/download/${id}`)
}
/**
 * @description 核销订单 -- 表头
 */
export function takeChartApi() {
  return request.get('order/takechart')
}
/**
 * @description 核销订单 -- 列表
 */
export function takeOrderListApi(data) {
  return request.get('order/takelst', data)
}
/**
 * @description 核销订单 -- 卡片
 */
 export function takeCardListApi(data) {
    return request.get('order/take_title', data)
}
/**
 * @description 导出列表 -- 文件类型
 */
 export function excelFileType() {
    return request.get('excel/type')
}
/**
 * @description 发送货 -- 门店列表
 */
 export function getStoreLst() {
  return request.get(`delivery/station/options`)
}
/**
 * @description 同城配送  -- 订单列表
 */
 export function deliveryOrderLst(data) {
  return request.get(`delivery/order/lst`, data)
}
/**
 * @description 同城订单 -- 取消
 */
 export function deliveryOrderCancle(id) {
  return request.get(`delivery/order/cancel/${id}/form`)
}
/**
 * @description 同城配送  -- 充值记录列表
 */
 export function rechargeLst(data) {
  return request.get(`delivery/station/payLst`, data)
}
/**
 * @description 同城配送  -- 充值记录卡片数据
 */
 export function rechargeCardApi() {
  return request.get(`delivery/title`)
}
/**
 * @description 同城配送  -- 充值余额
 */
 export function rechargeBalancei() {
  return request.get(`delivery/belence`)
}
/**
 * @description 导出释放单单
 */
 export function getOrderRelease(data) {
  return request.get(`orderRelease/excel`,  data )
}

/**
 * @description 释放订单编辑表单
 */
export function orderFrozen(id) {
  return request.get(`orderRelease/order_frozen/form/`+ id )
}

//setHealthy
export function setHealthy(id) {
  return request.get(`Healthy/update/form/`+ id )
}