points.js 8.11 KB
import { http, http_dj } from '@/main'

const path = 'dj.api.smarcarlife.'

// 积分核销订单列表
const getList = params => {
  params.method = `scrm.api.shopmall.integralorder.all.page`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

// 积分核销订单列表-积分订单详情
const getOrderDetail = params => {
  params.method = `scrm.api.shopmall.integralorder.detail`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

// 积分核销订单列表-导出
const orderExport = params => {
  params.method = `scrm.api.shopmall.integralorder.all.export`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

// 积分核销订单列表-导入
const orderImport = params => {
  params.method = `scrm.api.shopmall.integralorder.settlement.import`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}

// 结算/取消结算
const integralorderSettle = params => {
  params.method = `scrm.api.shopmall.integralorder.settlement`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}

// 用户积分明细列表
const getIntegralCustomerList = params => {
  params.method = `scrm.api.shopmall.integralcustomer.page`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

// 用户积分明细列表-导出
const getIntegralCustomerExport = params => {
  params.method = `scrm.api.shopmall.integralcustomer.export`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

// 用户积分明细详情-分页查询用户积分明细列表
const getIntegralDetailList = params => {
  params.method = `scrm.api.shopmall.integraldetail.page`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}
// 阳光激励用户-列表
const getStaffScoreList = params => {
  params.method = `dj.api.shopmall.staff.score.page`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}
// 阳光激励用户-导出
const getStaffScoreExport = params => {
  params.method = `dj.api.shopmall.staff.score.export`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}
// 阳光激励用户-获取门店列表
const getShopMerchantList = params => {
  params.method = `dj.smartcarlife.api.shopMerchant.list`
  return http_dj({
    url: 'rop-dj-smartcarlife/router',
    method: 'POST',
    data: params,
    sign: true
  })
}
// 积分管理-积分收益列表
const getScoreDetailList = params => {
  params.method = `dj.api.shopmall.staff.score.detail.list`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}
// 积分管理-积分收益列表
const exportDetailScore = params => {
  params.method = `dj.api.shopmall.staff.score.detail.list.export`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}
// 选择订单
const deductOrderPage = params => {
  params.method = `dj.api.smartcarlife.merchant.score.deduct.order.page`
  return http_dj({
    url: 'rop-dj-smartcarlife/router',
    method: 'POST',
    data: params,
    sign: true
  })
}
// 用户积分明细详情-客户积分详情
const customerDetail = params => {
  params.method = `scrm.api.shopmall.integralcustomer.detail`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

// 用户积分明细详情-导出用户积分明细数据
const getIntegralDetailExport = params => {
  params.method = `scrm.api.shopmall.integraldetail.export`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

/**自店服务 */
const getghDirectionalGiftListApi = params => {
  params.method = 'scrm.api.coupon.gh.group.equity.coupon.list'
  return http({
    url: 'rop-scrm-coupon/router',
    method: 'GET',
    data: params,
    sign: true
  })
}
/**
 * 客户积分导入
 */
const importCustomerIntegral = params => {
  params.method = 'scrm.api.shopmall.integral.import.excel.analysis'
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    noSignAttr: ['file'],
    returnAll: true
  })
}
/**
 * 客户积分充值
 */
const updateCustomerIntegral = params => {
  params.method = 'scrm.api.shopmall.integral.import.save.or.update'
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}

/**
 * 获取油劵列表
 */
const getOilCouponList = params => {
  params.method = 'scrm.api.shopmall.goods.oil.coupon.list'
  params.status = 1
  return http({
    url: 'rop-scrm-shopmall/router',
    data: params
  })
}

/**
 *  查询门店的通道手续费和油卡费率设置
 */

const getMerchantCharge = params => {
  params.method = 'scrm.api.shopmall.integral.import.charge.config.query'
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}
/**
 *  客户积分导入记录分页查询
 */
const getIntegralList = params => {
  params.method = 'scrm.api.shopmall.integral.import.record.page'
  return http({
    url: 'rop-scrm-shopmall/router',
    data: params
  })
}

/**
 *  客户积分导入数据详情
 */
const getIntegralDetail = params => {
  params.method = 'scrm.api.shopmall.integral.import.record.detail'
  return http({
    url: 'rop-scrm-shopmall/router',
    data: params
  })
}
/**
 *  客户积分导入明细数据分页查询
 */
const getCustomerIntegralList = params => {
  params.method = 'scrm.api.shopmall.integral.import.detail.page'
  return http({
    url: 'rop-scrm-shopmall/router',
    data: params
  })
}
/**
 *  客户积分导入记录导出
 */
const exportIntegralList = params => {
  params.method = 'scrm.api.shopmall.integral.import.record.export'
  return http({
    url: 'rop-scrm-shopmall/router',
    data: params
  })
}
/**
 * 客户积分审核
 */
const auditIntegral = params => {
  params.method = 'scrm.api.shopmall.integral.import.audit'
  return http({
    url: 'rop-scrm-shopmall/router',
    data: params
  })
}

/**
 * 获取所有的积分规则记录
 */
const getTypeListApi = params => {
  params.method = 'scrm.api.shopmall.integral.rule.list'
  return http({
    url: 'rop-scrm-shopmall/router',
    data: params
  })
}

/**
 * 创建积分提醒短信
 */
const createSmsApi = params => {
  params.method = 'scrm.api.shopmall.integral.remind.msg.create'
  return http({
    url: 'rop-scrm-shopmall/router',
    data: params
  })
}
/**
 * 积分提醒短信详情
 */
const getSmsDetailApi = params => {
  params.method = 'scrm.api.shopmall.integral.remind.msg.detail'
  return http({
    url: 'rop-scrm-shopmall/router',
    data: params
  })
}
/**
 * 开关提醒短信
 */
const openSmsApi = params => {
  params.method = 'scrm.api.shopmall.integral.remind.msg.onOff'
  return http({
    url: 'rop-scrm-shopmall/router',
    data: params
  })
}
/**
 * 触达客户
 */
const smsCustomerApi = params => {
  params.method = 'scrm.api.shopmall.integral.remind.record.page'
  return http({
    url: 'rop-scrm-shopmall/router',
    data: params
  })
}

export default {
  getList,
  getOrderDetail,
  orderExport,
  orderImport,
  integralorderSettle,
  getIntegralCustomerList,
  getIntegralCustomerExport,
  getIntegralDetailList,
  getStaffScoreList,
  getStaffScoreExport,
  getShopMerchantList,
  getScoreDetailList,
  exportDetailScore,
  deductOrderPage,
  customerDetail,
  getIntegralDetailExport,
  getghDirectionalGiftListApi,
  importCustomerIntegral,
  updateCustomerIntegral,
  getOilCouponList,
  getMerchantCharge,
  getIntegralList,
  exportIntegralList,
  getIntegralDetail,
  getCustomerIntegralList,
  auditIntegral,
  getTypeListApi,
  createSmsApi,
  getSmsDetailApi,
  openSmsApi,
  smsCustomerApi
}