withdraw.js 7.56 KB
import { http } from '@/main'

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

// 获分提现获取管理员信息
const getAdmin = params => {
  params.method = `scrm.api.shopmall.integral.transfer.out.getAdmin`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

// 积分提现列表-导出
const orderExport = params => {
  params.method = `scrm.api.shopmall.integral.transfer.out.export`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

// 积分提现支付
const integralpay = params => {
  params.method = `scrm.api.shopmall.integral.transfer.out.batch.pay`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}

// 用户积分提现批量审核
const integralApprove = params => {
  params.method = `scrm.api.shopmall.integral.transfer.out.batch.approve`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}
// 用户积分提现驳回
const integralOut = params => {
  params.method = `scrm.api.shopmall.integral.transfer.out.approve`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}
// 积分提现一键审核
const integralAllOut = params => {
  params.method = `scrm.api.shopmall.integral.transfer.out.all.approve`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}
//  积分提现一键支付
const integralAllpay = params => {
  params.method = `scrm.api.shopmall.integral.transfer.out.all.pay`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}
// 积分提现向管理员发送验证码
const getSms = params => {
  params.method = `scrm.api.shopmall.integral.transfer.out.admin.sms`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}

// 积分提现获取有业务的门店名列表
const getMerchantList = params => {
  params.method = `scrm.api.shopmall.integral.transfer.out.merchant.list`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

// 根据id列表获取提现金额(分)合计
const getPayAmount = params => {
  params.method = `scrm.api.shopmall.integral.transfer.out.pay.amount`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

// 用户积分提现明细
const getDetails = params => {
  params.method = `scrm.api.shopmall.integral.transfer.out.getById`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}
// 普通提现导入
const uploadXlsx = params => {
  params.method = 'scrm.api.shopmall.integral.transfer.out.import'
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    noSignAttr: ['file'],
    returnAll: true
  })
}

// 根据批次号更新普通提现导入为成功状态
const handleSaveImport = params => {
  params.method = `scrm.api.shopmall.integral.transfer.out.import.confirm`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}
/*第三方余额查询 */
const getBalance = params => {
  params.method = 'scrm.api.shopmall.integral.transfer.out.balance.get'
  return http({
    url: 'rop-scrm-shopmall/router',
    data: params
  })
}
// 获取总结算金额
const getSettleAmount = params => {
  params.method = 'scrm.api.shopmall.integral.transfer.out.settle.amount.get'
  return http({
    url: 'rop-scrm-shopmall/router',
    data: params
  })
}

const getAllPayAmount = params => {
  params.method = 'scrm.api.shopmall.integral.transfer.out.all.pay.amount'
  return http({
    url: 'rop-scrm-shopmall/router',
    data: params
  })
}
//积分提现获取业务对应的付款渠道
const getChannel = params => {
  params.method = 'scrm.api.shopmall.integral.transfer.out.getChannel'
  return http({
    url: 'rop-scrm-shopmall/router',
    data: params
  })
}

// 积分提现根据所选记录或者查询参数校验记录列表是否是同一个提现类型
const checkRecordsTransferType = params => {
  params.method = 'scrm.api.shopmall.integral.transfer.out.check.records.transferType'
  return http({
    url: 'rop-scrm-shopmall/router',
    data: params
  })
}


// 详情查询
const approvalDetail = params => {
  params.method = `scrm.api.shopmall.integral.transfer.out.approval.detail`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

// 积分提现 生成批次
const integralorderBatch = params => {
  params.method = `scrm.api.shopmall.integral.transfer.out.approval.generate`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}

// 生成审批-数据统计
const generateBatchCount = params => {
  params.method = `scrm.api.shopmall.integral.transfer.out.approval.generate.count`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}

// 操作记录列表查询
const getApprovalLog = params => { 
  params.method = `scrm.api.shopmall.integral.transfer.out.approval.log`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}
// 积分提现审批分页查询
const getApprovalPage = params => { 
  params.method = `scrm.api.shopmall.integral.transfer.out.approval.page`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}


// 付款OA审批提交
const applyApprovalOA = params => { 
  params.method = `scrm.api.shopmall.integral.transfer.out.approval.oa.apply`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}

// 查询支付主体列表
const getPaymentEntityList = params => { 
  params.method = `scrm.api.shopmall.integral.transfer.out.approval.payment.entity`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}
// 移除审批积分提现记录
const removeApproval = params => { 
  params.method = `scrm.api.shopmall.integral.transfer.out.approval.remove`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}

// 积分提现获取付款渠道收款账号
const getChannelAccount = (params={}) => { 
  params.method = `scrm.api.shopmall.integral.transfer.out.getChannel.account`
  return http({
    url: 'rop-scrm-shopmall/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

export default {getChannelAccount,approvalDetail,removeApproval,getPaymentEntityList,applyApprovalOA,getApprovalLog,getApprovalPage,generateBatchCount, integralorderBatch,getPayAmount,getAllPayAmount, integralAllOut, integralAllpay, getList, getAdmin, orderExport, integralpay, integralApprove, integralOut, getSms, getMerchantList, getDetails, uploadXlsx, handleSaveImport, getBalance, getSettleAmount,getChannel ,checkRecordsTransferType}