Commit 7c658190 by chenwq

领取详情,核销列表

1 parent eecda43d
...@@ -25,6 +25,28 @@ const couponExportApi = params => { ...@@ -25,6 +25,28 @@ const couponExportApi = params => {
}) })
} }
//优惠券列表-集团-导出
const couponGroupExportApi = params => {
params.method = 'scrm.api.coupon.gh.group.list.export'
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
data: params,
sign: true
})
}
//优惠券列表-门店-导出
const couponStoreExportApi = params => {
params.method = 'scrm.api.coupon.gh.store.list.export'
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
data: params,
sign: true
})
}
//生效/失效 //生效/失效
const effectiveCouponApi = params => { const effectiveCouponApi = params => {
params.method = `${defaultPath}effective` params.method = `${defaultPath}effective`
...@@ -151,4 +173,4 @@ const getAllGoodsApi = params => { ...@@ -151,4 +173,4 @@ const getAllGoodsApi = params => {
}) })
} }
export default { getCouponListApi, couponExportApi, getVerificationListApi, verificationExportApi, effectiveCouponApi, codeVerificationApi, getCouponDetailApi, deleteCouponApi, createCouponApi, updateCouponApi, getAllGoodsApi, getListReceiveRecordApi, exportReceiveRecordApi } export default { getCouponListApi, couponExportApi, couponGroupExportApi, couponStoreExportApi, getVerificationListApi, verificationExportApi, effectiveCouponApi, codeVerificationApi, getCouponDetailApi, deleteCouponApi, createCouponApi, updateCouponApi, getAllGoodsApi, getListReceiveRecordApi, exportReceiveRecordApi }
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<div class="flex m-b-10 w-100-percent"> <div class="flex m-b-10 w-100-percent">
<span class="table-title">优惠券列表</span> <span class="table-title">优惠券列表</span>
<el-button :size="size" class="default-blue-btn" type="default" @click="handleExport">导出</el-button> <el-button :size="size" class="default-blue-btn" type="default" @click="handleExport">全部导出</el-button>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
...@@ -475,7 +475,8 @@ export default { ...@@ -475,7 +475,8 @@ export default {
handleExport(row) { handleExport(row) {
var params = this.getParams() var params = this.getParams()
this.$apis.couponManage.couponExportApi(params).then(res => { var apiName = this.$isGroupUp ? 'couponGroupExportApi' : 'couponStoreExportApi'
this.$apis.couponManage[apiName](params).then(res => {
exportFn(res) exportFn(res)
}) })
}, },
......
...@@ -47,6 +47,9 @@ ...@@ -47,6 +47,9 @@
<el-button :size="size" class="default-blue-btn" type="default" @click="handleExport">全部导出</el-button> <el-button :size="size" class="default-blue-btn" type="default" @click="handleExport">全部导出</el-button>
</div> </div>
<GLTable ref="memberRecordRef" v-if="isReload" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="tableSearchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="memberRecordRef" v-if="isReload" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="tableSearchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<template slot="discountType" slot-scope="scope">
<img :src="require(`@/assets/coupon/icon-${attrToIcon[scope.scope.discountType]}.png`)" />
</template>
<span slot="orderCodeHtml" slot-scope="scope"> <span slot="orderCodeHtml" slot-scope="scope">
<span class="cursor-pointer" @click="couponNameHandleDetail(scope.scope)" v-if="scope.scope.directionalGiftId">{{ scope.scope.directionalGiftName }}</span> <span class="cursor-pointer" @click="couponNameHandleDetail(scope.scope)" v-if="scope.scope.directionalGiftId">{{ scope.scope.directionalGiftName }}</span>
<span class="cursor-pointer" @click="orderCodeHandleDetail(scope.scope)" v-else>{{ scope.scope.orderCode }}</span> <span class="cursor-pointer" @click="orderCodeHandleDetail(scope.scope)" v-else>{{ scope.scope.orderCode }}</span>
...@@ -111,16 +114,16 @@ export default { ...@@ -111,16 +114,16 @@ export default {
searchFormData: [ searchFormData: [
{ {
label: '核销码', label: '核销码',
name: '', name: 'verificationCode',
type: 'input', type: 'input',
labelWidth: 56, labelWidth: 56,
maxlength: 20 maxlength: 50
}, },
{ {
label: '券名称', label: '券名称',
name: 'couponName', name: 'couponName',
type: 'input', type: 'input',
maxlength: 20 maxlength: 50
}, },
{ {
label: '券类型', label: '券类型',
...@@ -178,37 +181,66 @@ export default { ...@@ -178,37 +181,66 @@ export default {
tableOption: false, tableOption: false,
tableColumns: [ tableColumns: [
{ {
label: '服务名称', label: '核销码',
prop: 'couponName', prop: 'verificationCode',
width: '180' width: 200
// formatter: cellValue => {
// return cellValue.startTime + '-' + cellValue.endTime
// }
}, },
{ {
label: '剩余待核销次数', label: '用户信息',
prop: 'residueAmount', prop: 'userName',
formatter: cellValue => { formatter: cellValue => {
return cellValue.residueAmount || cellValue.residueAmount == 0 ? cellValue.residueAmount : '不限制次数' return cellValue.userName + ' ' + cellValue.phone
} }
}, },
{ {
label: '核销用户', label: '券类型',
prop: 'phone' name: 'discountType',
width: '100',
addHtml: 'discountType'
}, },
{ {
label: '核销员', label: '券名称',
prop: 'verificationOperator' prop: 'couponName',
width: 200,
line: 2
}, },
{ {
label: '关联信息', label: '核销门店',
addHtml: 'orderCodeHtml' prop: 'verificationMerchantName'
},
{
label: '券来源',
prop: ''
}, },
{ {
label: '核销日期', label: '核销日期',
prop: 'verificationTime', prop: 'verificationTime',
addHtml: 'verificationTime' addHtml: 'verificationTime'
} },
// {
// label: '剩余待核销次数',
// prop: 'residueAmount',
// formatter: cellValue => {
// return cellValue.residueAmount || cellValue.residueAmount == 0 ? cellValue.residueAmount : '不限制次数'
// }
// },
// {
// label: '核销用户',
// prop: 'phone'
// },
// {
// label: '核销员',
// prop: 'verificationOperator'
// },
// {
// label: '关联信息',
// addHtml: 'orderCodeHtml'
// },
// {
// label: '核销日期',
// prop: 'verificationTime',
// addHtml: 'verificationTime'
// }
] ]
}, },
merchantId: 0, merchantId: 0,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!