Commit a9d225bc by 胡悦

Merge branch 'v1.0.1' of http://192.168.3.233:8090/saas/scrm-micro-marketing into v1.0.1

2 parents b7e3f4de 64c067eb
......@@ -13,6 +13,17 @@ const getMerchantListApi = params => {
})
}
//优惠券列表-导出
const couponExportApi = params => {
params.method = `${defaultPath}list.export`
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
data: params,
sign: true
})
}
//生效/失效
const effectiveCouponApi = params => {
params.method = `${defaultPath}effective`
......@@ -48,6 +59,17 @@ const getVerificationListApi = params => {
})
}
// 核销详情-导出
const verificationExportApi = params => {
params.method = `${defaultPath}verification.code.export.list`
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
data: params,
sign: true
})
}
//领取记录列表
const getListReceiveRecordApi = params => {
params.method = `${defaultPath}listReceiveRecordByCouponId`
......@@ -129,4 +151,4 @@ const getAllGoodsApi = params => {
}
export default { getMerchantListApi, getVerificationListApi, effectiveCouponApi, codeVerificationApi, getCouponDetailApi, deleteCouponApi, createCouponApi, updateCouponApi, getAllGoodsApi, getListReceiveRecordApi, exportReceiveRecordApi }
export default { getMerchantListApi, couponExportApi, getVerificationListApi, verificationExportApi, effectiveCouponApi, codeVerificationApi, getCouponDetailApi, deleteCouponApi, createCouponApi, updateCouponApi, getAllGoodsApi, getListReceiveRecordApi, exportReceiveRecordApi }
\ No newline at end of file
......@@ -3,37 +3,47 @@ import { http } from '@/main'
// const defaultPath = 'scrm.api.live.'
const getRecordListApi = params => {
// params.method = `${defaultPath}goods.list`
// params.method = `${defaultPath}goods.list`
params.method = `scrm.api.coupon.verification.code.verification.list`
return http({
url: 'rop-scrm-coupon/router',
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
const getVerificationCode=params=>{
const getVerificationCode = params => {
params.method = `scrm.api.coupon.verification.code.verification`
return http({
url: 'rop-scrm-coupon/router',
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
// const auditGoodApi = params => {
// params.method = `${defaultPath}audit.goods`
// return http({
// url: 'rop-scrm-live/router',
// method: 'POST',
// data: params,
// sign: true,
// returnAll: true
// })
// }
// 核销详情-导出
const verificationExportApi = params => {
params.method = 'scrm.api.coupon.verification.code.export.list'
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
data: params,
sign: true
})
}
// const auditGoodApi = params => {
// params.method = `${defaultPath}audit.goods`
// return http({
// url: 'rop-scrm-live/router',
// method: 'POST',
// data: params,
// sign: true,
// returnAll: true
// })
// }
// const getGoodInfoApi = params => {
// params.method = `${defaultPath}get.good.by.id`
......@@ -88,4 +98,4 @@ const getVerificationCode=params=>{
// })
// }
export { getRecordListApi,getVerificationCode }
export { getRecordListApi, getVerificationCode, verificationExportApi }
\ No newline at end of file
......@@ -16,6 +16,7 @@
<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" type="primary" @click="handleExport">导出</el-button>
</span>
</glsx-combi-form>
</div>
......@@ -345,6 +346,17 @@ export default {
}
},
handleExport(row) {
var params = this.getParams()
this.$apis.couponManage.couponExportApi(params).then(res => {
var a = document.createElement('a')
a.setAttribute('href', res)
a.setAttribute('target', '_blank')
document.body.appendChild(a)
a.click()
})
},
handleSearch() {
this.$refs.coupon.refreshTable()
},
......
......@@ -40,6 +40,10 @@
<span class="red-txt">{{ effective }}&nbsp;</span>
</span>
<span style="margin-left:10px">
已过期:
<span class="red-txt">{{ }}&nbsp;</span>
</span>
<span style="margin-left:10px">
使用限制:
<span class="red-txt">{{ useB }}&nbsp;</span>
</span>
......
......@@ -8,6 +8,7 @@
<el-button :size="size" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="writeOff">优惠券核销</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button>
<el-button :size="size" @click="goback">返回</el-button>
</span>
</glsx-combi-form>
......@@ -105,9 +106,9 @@ export default {
},
{
label: '领取时间',
prop: 'createdDate',
prop: 'receiveTime',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
return dayjs(cellValue.receiveTime).format('YYYY-MM-DD HH:mm:ss')
}
},
{
......@@ -254,6 +255,17 @@ export default {
}
},
handleExport(row) {
var params = this.getParams()
this.$apis.couponManage.verificationExportApi(params).then(res => {
var a = document.createElement('a')
a.setAttribute('href', res)
a.setAttribute('target', '_blank')
document.body.appendChild(a)
a.click()
})
},
handleSearch() {
this.$refs.writeOffList.refreshTable()
},
......
......@@ -33,6 +33,7 @@
<el-form-item size="small" style="float: right">
<el-button :size="size" type="primary" @click="openDialog">核销</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button>
<el-button :size="size" @click="handleReset">重置</el-button>
</el-form-item>
</el-row>
......@@ -59,7 +60,7 @@
<script>
import glsxDialog from '@/components/glsx-dialog'
import { getRecordListApi,getVerificationCode } from '@/api/modules/record'
import { getRecordListApi,getVerificationCode,verificationExportApi } from '@/api/modules/record'
import url from "@/assets/empty.png"
import { dateFormat } from '@/utils/index.js'
export default {
......@@ -158,16 +159,21 @@ export default {
return dateFormat(date)
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchFormTable.daterange) {
this.searchFormTable.verificationTimeStart = this.searchForm.daterange[0]
this.searchFormTable.verificationTimeEnd = this.searchForm.daterange[1]
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.verificationTimeStart = this.searchForm.daterange[0]
params.verificationTimeEnd = this.searchForm.daterange[1]
} else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
if (params.beginTime) delete params.beginTime && delete params.endTime
}
delete this.searchFormTable.daterange
delete params.daterange
return params
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve()
})
},
......@@ -231,6 +237,18 @@ export default {
// path: '/liveRoom/editLiveRoom'
})
},
handleExport(row) {
var params = this.getParams()
verificationExportApi(params).then(res => {
var a = document.createElement('a')
a.setAttribute('href', res)
a.setAttribute('target', '_blank')
document.body.appendChild(a)
a.click()
})
},
handleSearch() {
this.$refs.memberRecordRef.refreshTable()
},
......
......@@ -14,18 +14,26 @@
</span>
<span class="table-btns" slot="optionsFun" slot-scope="scope" :data="scope.scope">
<template v-if="scope.scope.state === 0">
<el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button>
<!-- <el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button>
<el-button type="text" @click="handleUpOption(scope.scope)">上架</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> -->
<GLButton type="text" @click="handleEdit(scope.scope)" fn="编辑套餐">编辑</GLButton>
<GLButton type="text" @click="handleUpOption(scope.scope)" fn="上架">上架</GLButton>
<GLButton type="text" @click="handleDelete(scope.scope)" fn="删除">删除</GLButton>
</template>
<template v-else-if="scope.scope.state === 1">
<el-button type="text" @click="handleDownOption(scope.scope)">下架</el-button>
<el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button>
<!-- <el-button type="text" @click="handleDownOption(scope.scope)">下架</el-button>
<el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button> -->
<GLButton type="text" @click="handleDownOption(scope.scope)" fn="下架">下架</GLButton>
<GLButton type="text" @click="handleEdit(scope.scope)" fn="编辑套餐">编辑</GLButton>
</template>
<template v-else>
<el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button>
<!-- <el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button>
<el-button type="text" @click="handleUpOption(scope.scope)">上架</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> -->
<GLButton type="text" @click="handleEdit(scope.scope)" fn="编辑套餐">编辑</GLButton>
<GLButton type="text" @click="handleUpOption(scope.scope)" fn="上架">上架</GLButton>
<GLButton type="text" @click="handleDelete(scope.scope)" fn="删除">删除</GLButton>
</template>
</span>
</GLTable>
......
......@@ -3,7 +3,7 @@ const packageName = require('./package.json').name
const node_env = process.env.NODE_ENV === 'production'
const publicPath = node_env ? `/child/${packageName}/` : '/'
const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://cdn.bootcdn.net/'
const CDN_DOMAIN = 'https://img02.glsx.com.cn/'
const cdn = {
css: [`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`],
js: [`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`, `${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`, `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`, `${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`, `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`]
......@@ -67,4 +67,4 @@ module.exports = {
})
.end()
}
}
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!