Commit 9be7e5f1 by chenwq

优惠券核销列表;优惠券详情

1 parent 13ff5aba
......@@ -98,4 +98,4 @@ const verificationExportApi = params => {
// })
// }
export { getRecordListApi, getVerificationCode, verificationExportApi }
export default { getRecordListApi, getVerificationCode, verificationExportApi }
......@@ -83,6 +83,12 @@ const staticRoutes = Object.freeze([
meta: {}
},
{
name: 'recordList',
path: '/couponManage/recordList',
component: resolve => require([`@/views/couponManage/recordList.vue`], resolve),
meta: {}
},
{
name: 'editCashCoupon',
path: '/couponManage/editCashCoupon/:addOrEdit',
component: resolve => require([`@/views/couponManage/editCashCoupon.vue`], resolve),
......
<!-- 商品管理-门店 -->
<!-- 优惠券列表 -->
<template>
<div class="marketing pro-group p-t-10">
<div class="m-b-10">
......@@ -44,7 +44,7 @@
<!-- <el-button v-if="scope.scope.status == '2' || scope.scope.status == '3'" type="text" @click="handleEdit(3, scope.scope)">查看</el-button> -->
<GLButton v-if="scope.scope.status == '1' || scope.scope.status == '3'" type="text" @click="del(scope.scope)" fn="删除" mode="el-button" display="disabled">删除</GLButton>
<!-- <el-button v-if="scope.scope.status == '1' || scope.scope.status == '3'" type="text" @click="del(scope.scope)">删除</el-button> -->
<GLButton type="text" @click="writeOffDetail(scope.scope)" fn="核销详情" mode="el-button">核销详情</GLButton>
<!-- <GLButton type="text" @click="writeOffDetail(scope.scope)" fn="核销详情" mode="el-button">核销详情</GLButton> -->
<GLButton type="text" @click="receiveDetail(scope.scope)" fn="领取详情" mode="el-button">领取详情</GLButton>
<!-- <el-button type="text" @click="writeOffDetail(scope.scope)">核销详情</el-button>
<el-button type="text" @click="receiveDetail(scope.scope)">领取详情</el-button> -->
......@@ -66,8 +66,6 @@ export default {
url: url,
// 下架
isDownVisible: false,
// 集团版集团账号
isGroupUp: false,
downForm: {
id: '',
offReason: '',
......@@ -285,8 +283,7 @@ export default {
created() {
this.userInfo = this.$globalState.session
this.isGroupUp = this.userInfo.merchantModel == 1 && this.userInfo.accountLevel != 4
if (!this.isGroupUp) {
if (!this.$isGroupUp) {
let idx = this.tableParams.tableColumns.findIndex(item => item.label == '适用范围')
this.tableParams.tableColumns.splice(idx, 1)
}
......
......@@ -5,7 +5,12 @@
<div class="container edit-container m-b-20">
<p class="edit-title">优惠券信息</p>
<el-form class="flex-wrap" label-width="120px">
<el-form-item class="info-item" v-for="(item, index) in couponFormData" :key="index" :label="item.label + ':'">{{ coupon[item.name] }}</el-form-item>
<el-form-item class="info-item" v-for="(item, index) in couponFormData" :key="index" :label="item.label + ':'">
<div v-if="item.name == 'discountType' && coupon[item.name]">
<img style="vertical-align: middle;" :src="require(`@/assets/coupon/icon-${attrToIcon[coupon[item.name]]}.png`)" />
</div>
<div v-else>{{ coupon[item.name] }}</div>
</el-form-item>
</el-form>
</div>
</div>
......@@ -15,7 +20,6 @@
<span slot="footer" class="footer-btns">
<el-button :size="size" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" @click="goback">返回</el-button>
</span>
</glsx-combi-form>
</div>
......@@ -64,6 +68,9 @@
<GLTable ref="receiveList" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end -->
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" :size="size" @click="goback">返回</el-button>
</div>
</div>
</template>
......@@ -75,6 +82,8 @@ export default {
data() {
return {
size: 'small',
footerLeft: '0',
footerWidth: '0',
url: url,
coupon: {
couponName: '',
......@@ -84,6 +93,11 @@ export default {
},
effective: '',
useB: '',
attrToIcon: {
2: 'discount',
3: 'cash',
4: 'exchange'
},
// 优惠券信息
couponFormData: [
{
......@@ -92,7 +106,7 @@ export default {
},
{
label: '券类型',
name: ''
name: 'discountType'
},
{
label: '有效期',
......@@ -118,7 +132,8 @@ export default {
// 表格
searchForm: {
phone: '',
wechatUserFlag: ''
wechatUserFlag: '',
status: ''
},
tableSearchForm: {},
// 搜索
......@@ -137,6 +152,15 @@ export default {
optionId: 'statusId',
optionLabel: 'statusName',
optionsName: 'wechatUserFlagList'
},
{
label: '使用状态',
name: 'status',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'statusList'
}
],
// 表格
......@@ -205,6 +229,16 @@ export default {
statusId: '1',
statusName: '否'
}
],
statusList: [
{
confId: '1',
confName: '已使用'
},
{
confId: '2',
confName: '未使用'
}
]
},
exportLoading: false
......@@ -214,6 +248,8 @@ export default {
components: {},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.getOptionsList('searchFormData')
this.getInfo(this.$route.params.id)
},
......
......@@ -64,7 +64,7 @@
<script>
import glsxDialog from '@/components/glsx-dialog'
import { getRecordListApi, getVerificationCode, verificationExportApi } from '@/api/modules/record'
// import { getRecordListApi, getVerificationCode, verificationExportApi } from '@/api/modules/record'
import url from '@/assets/empty.png'
import { dateFormat } from '@/utils/index.js'
import { exportFn } from '@/common/constant'
......@@ -105,7 +105,7 @@ export default {
// 44187877
searchFormTable: {},
// 表格组件
getListApi: getRecordListApi,
getListApi: this.$apis.record.getRecordListApi,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
......@@ -233,7 +233,7 @@ export default {
let params = {}
params.verficationCode = this.ruleForm.verficationCode
// params.discountTypes=[7]
getVerificationCode(params).then(res => {
this.$apis.record.getVerificationCode(params).then(res => {
if (res) {
this.handleClose()
this.handleSearch()
......@@ -262,7 +262,7 @@ export default {
handleExport(row) {
var params = this.getParams()
verificationExportApi(params).then(res => {
this.$apis.record.verificationExportApi(params).then(res => {
exportFn(res)
})
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!