Commit f5801a83 by 李伟康

Merge branch 'v3.24.0' into 'dev_lwk'

V3.24.0

See merge request !30
2 parents 91141fe2 603b7991
......@@ -1859,6 +1859,75 @@
"webpack-chain": "^6.4.0",
"webpack-dev-server": "^3.11.0",
"webpack-merge": "^4.2.2"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
}
}
},
"@vue/cli-shared-utils": {
......@@ -3275,6 +3344,11 @@
"integrity": "sha512-YpeKZngUmG65rLudJ4taU7VLkOCTMhNl/u4ctNC56LQS/zJTyNH0Lrtwm1tfTsbLlwvlfsA2d1c8vCf/Kh2KwQ==",
"dev": true
},
"china-area-data": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/china-area-data/-/china-area-data-5.0.1.tgz",
"integrity": "sha512-BQDPpiv5Nn+018ekcJK2oSD9PAD+E1bvXB0wgabc//dFVS/KvRqCgg0QOEUt3vBkx9XzB5a9BmkJCEZDBxVjVw=="
},
"chokidar": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
......@@ -12693,75 +12767,6 @@
}
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": {
"version": "3.5.4",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.5.4.tgz",
......
......@@ -9,6 +9,7 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"china-area-data": "^5.0.1",
"core-js": "^3.4.4",
"dayjs": "^1.10.7",
"el-tree-transfer": "^2.2.6",
......
......@@ -182,6 +182,73 @@ export default {
url,
data: params
})
}
},
// 展示记录列表
displayListApi(params){
params.method = 'marketing.api.activityRedEnvelope.show.record.page'
return http({
url,
data: params
})
},
// 展示记录导出
displayExportApi(params){
params.method = 'marketing.api.activityRedEnvelope.show.record.export'
return http({
url,
data: params
})
},
// 抽奖记录列表
drawListApi(params){
params.method = 'marketing.api.activityRedEnvelope.lottery.draw.record.page'
return http({
url,
data: params
})
},
// 导出红包抽奖记录
drawExportApi(params){
params.method = 'marketing.api.activityRedEnvelope.lottery.draw.record.export'
return http({
url,
data: params
})
},
// 中奖记录列表
winningListApi(params){
params.method = 'marketing.api.activityRedEnvelope.winning.record.page'
return http({
url,
data: params
})
},
// 导出中奖记录列表
winningExportApi(params){
params.method = 'marketing.api.activityRedEnvelope.winning.record.export'
return http({
url,
data: params
})
},
// 实物奖品核销列表
winningGoodsApi(params){
params.method = 'marketing.api.activityRedEnvelope.winning.goods.record.page'
return http({
url,
data: params
})
},
// 实物奖品核销导出
winningGoodsExportApi(params){
params.method = 'marketing.api.activityRedEnvelope.winning.goods.record.export'
return http({
url,
data: params
})
},
}
<template>
<el-cascader placeholder="请选择省市区" clearable :props="areaProps" v-model="selectedArea"
@change="handleAreaChange"
:options="areaList"></el-cascader>
</template>
<script>
import areaData from 'china-area-data/v5/data';
export default {
name: 'AreaCascader',
props: {
selectedArea: {
type: Array,
default: () => []
},
key: {
type: String,
default: 'areaCode'
},
checkStrictly: {
type: Boolean,
default: false
}
},
data() {
return {
localSelectedArea: this.selectedArea,
areaProps: {
label: 'label',
value: 'value',
checkStrictly: this.checkStrictly
},
areaList: this.formatAreaData(areaData['86'], 1)
}
},
methods: {
handleAreaChange(value) {
this.$emit('update:selectedArea', value);
},
formatAreaData(data, level) {
return Object.keys(data).map(key => {
let item = {
value: key,
label: data[key]
};
if (level < 3 && areaData[key]) {
item.children = this.formatAreaData(areaData[key], level + 1);
}
return item;
});
}
},
watch: {
selectedArea(newVal) {
this.localSelectedArea = newVal;
},
}
}
</script>
<style lang="scss">
.el-cascader-panel {
max-height: 220px;
overflow-y: auto; /* 添加滚动条 */
}
</style>
<template>
<div>ActiveTemplateManagement</div>
</template>
<script>
export default {
name: "ActiveTemplateManagement"
}
</script>
<style scoped>
</style>
// dataImportMixin.js
import * as dayjs from 'dayjs';
import url from '@/assets/empty.png'
export default {
data() {
return {
url,
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total'},
searchForm: {
selectedArea:[]
},
searchFormData: [
{
label: '微信昵称',
name: 'wechatName',
type: 'input',
maxlength: 100
},
{
label: '手机号',
name: 'userPhone',
type: 'input',
maxlength: 100
},
{
label: '活动名称',
name: 'activityName',
type: 'input',
maxlength: 100
},
{
label: '省市区',
addHtml:'regionSlot'
},
{
label: '展示时间',
name: 'showTime',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd',
isClear: true,
customPickerOptions: {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate()))
if (date > yesterday) {
return true
}
return false
}
}
}
],
getListApi: this.$apis.redenvelope.displayListApi,
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '手机号',
prop: 'userPhone',
minWidth: 100
},
{
label: '微信昵称',
prop: 'wechatName',
minWidth: 100
},
{
label: '红包链接',
prop: 'link',
minWidth: 100
},
{
label: '活动名称',
minWidth: 100,
prop:'activityName'
},
{
label: '省份',
prop: 'provinces',
minWidth: 100
},
{
label: '城市',
prop: 'city',
minWidth: 150
},
{
label: '区域',
prop: 'districts',
minWidth: 150
},
{
label: '详细地址',
prop: 'address',
minWidth: 100
},
{
label: '展示时间',
prop: 'showTime',
minWidth: 100
},
]
},
tableSearchForm: {}
}
},
methods: {
},
};
<template>
<div class="container">
<div class="sticky">
<GLCombiForm
ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
>
<div slot="regionSlot">
<regionCascader :checkStrictly="true" @update:selectedArea="val => searchForm.selectedArea = val"></regionCascader>
</div>
</GLCombiForm>
<div class="sticky-btns">
<div class="btns">
<el-button
@click="handleExport('displayExportApi')"
>导出
</el-button>
</div>
</div>
</div>
<div class="tabelList">
<div class="table-title">展示记录列表</div>
<GLTable
ref="listRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:noDataImg="url"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
>
<span
slot="auth-button"
slot-scope="scope"
>
<GLTableButton
:buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"
></GLTableButton>
</span>
</GLTable>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
import dataImportMixin from "./dataImportMixin";
import repeatMethods from "../common/repeatMethods";
import regionCascader from "@/components/regionCascader";
import {exportFn} from '@/common/constant'
import {utils} from 'glsx-common'
export default {
name: 'DisplayRecord',
mixins: [dataImportMixin,repeatMethods],
components:{
regionCascader
},
data() {
return {
}
},
mounted() {
},
methods: {
getParams() {
let params = JSON.parse(JSON.stringify(this.searchForm))
this.updateParams(params, 'showTime', 'showTime', 'startShowTime', 'endShowTime');
return params
},
}
}
</script>
<style scoped lang='scss'>
.container {
height: 100%;
background-color: #fff;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 20px;
.table-title {
font-weight: 700;
font-size: 16px;
color: #333333;
padding-bottom: 18px;
}
.sticky {
position: relative;
z-index: 2;
&-btns {
position: absolute;
right: 0;
bottom: -23px;
overflow: hidden;
.el-button + .el-button {
margin-left: 8px;
}
.btns {
transition: all 0.25s;
.el-button {
padding: 8px 15px;
min-width: 60px;
}
}
}
}
}
</style>
// dataImportMixin.js
import * as dayjs from 'dayjs';
import url from '@/assets/empty.png'
export default {
data() {
return {
url,
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total'},
searchForm: {
selectedArea:[]
},
searchFormData: [
{
label: '微信昵称',
name: 'wechatName',
type: 'input',
maxlength: 100
},
{
label: '手机号',
name: 'userPhone',
type: 'input',
maxlength: 100
},
{
label: '活动名称',
name: 'activityName',
type: 'input',
maxlength: 100
},
{
label: '省市区',
addHtml:'regionSlot'
},
{
label: '状态',
name: 'activityName',
type: 'input',
maxlength: 100
},
{
label: '抽奖时间',
name: 'openTime',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd',
isClear: true,
customPickerOptions: {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate()))
if (date > yesterday) {
return true
}
return false
}
}
}
],
getListApi: this.$apis.redenvelope.drawListApi,
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '手机号',
prop: 'userPhone',
minWidth: 100
},
{
label: '微信昵称',
prop: 'wechatName',
minWidth: 100
},
{
label: '红包链接',
prop: 'link',
minWidth: 100
},
{
label: '活动名称',
minWidth: 100,
prop:'activityName'
},
{
label: '省份',
prop: 'provinces',
minWidth: 100,
},
{
label: '城市',
prop: 'city',
minWidth: 150
},
{
label: '区域',
prop: 'districts',
minWidth: 150
},
{
label: '详细地址',
prop: 'address',
minWidth: 100
},
{
label: '状态',
prop:'statusStr'
},
{
label: '抽奖时间',
prop: 'openTime',
minWidth: 100
},
]
},
tableSearchForm: {}
}
},
methods: {
},
};
<template>
<div class="container">
<div class="sticky">
<GLCombiForm
ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
>
<div slot="regionSlot">
<regionCascader :checkStrictly="true" @update:selectedArea="val => searchForm.selectedArea = val"></regionCascader>
</div>
</GLCombiForm>
<div class="sticky-btns">
<div class="btns">
<el-button
@click="handleExport('drawExportApi')"
>导出
</el-button>
</div>
</div>
</div>
<div class="tabelList">
<div class="table-title">抽奖列表</div>
<GLTable
ref="listRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:noDataImg="url"
:tableParams="tableParams"
:pageConf="pageConf"
>
<span
slot="auth-button"
slot-scope="scope"
>
<GLTableButton
:buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"
:beforeSearchFn="beforeSearchFn"
></GLTableButton>
</span>
</GLTable>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
import regionCascader from "@/components/regionCascader";
import dataImportMixin from "./dataImportMixin";
import repeatMethods from "../common/repeatMethods";
export default {
name: 'DisplayRecord',
mixins: [dataImportMixin,repeatMethods],
components:{
regionCascader
},
data() {
return {
}
},
mounted() {
},
methods: {
getParams() {
let params = JSON.parse(JSON.stringify(this.searchForm))
this.updateParams(params, 'openTime', 'openTime', 'startOpenTime', 'endOpenTime');
return params
},
}
}
</script>
<style scoped lang='scss'>
.container {
height: 100%;
background-color: #fff;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 20px;
.table-title {
font-weight: 700;
font-size: 16px;
color: #333333;
padding-bottom: 18px;
}
.sticky {
position: relative;
z-index: 2;
&-btns {
position: absolute;
right: 0;
bottom: -23px;
overflow: hidden;
.el-button + .el-button {
margin-left: 8px;
}
.btns {
transition: all 0.25s;
.el-button {
padding: 8px 15px;
min-width: 60px;
}
}
}
}
}
</style>
// dataImportMixin.js
import * as dayjs from 'dayjs';
import url from '@/assets/empty.png'
export default {
data() {
return {
url,
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total'},
searchForm: {
},
searchFormData: [
{
label: '微信昵称',
name: 'wechatName',
type: 'input',
maxlength: 100
},
{
label: '手机号',
name: 'userPhone',
type: 'input',
maxlength: 100
},
{
label: '活动名称',
name: 'activityName',
type: 'input',
maxlength: 100
},
{
label: '核销类型',
name: 'exchangeType',
type: 'select',
optionList: [
{ text: '全部', id: '' },
{ text: '快递到家', id: '0' },
{ text: '到店核销', id: '1' }
],
optionId: 'id',
optionLabel: 'text'
},
{
label: '核销状态',
name: 'exchangeStatus',
type: 'select',
optionList: [
{ text: '全部', id: '' },
{ text: '代发货', id: '0' },
{ text: '已发货', id: '1' },
{ text: '待核销', id: '2' },
{ text: '已核销', id: '3' }
],
optionId: 'id',
optionLabel: 'text'
},
{
label: '奖品名称',
name: 'prizeName',
type: 'input',
maxlength: 11
},
{
label: '核销时间',
name: 'exchangeTime',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd',
isClear: true,
customPickerOptions: {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate()))
if (date > yesterday) {
return true
}
return false
}
}
}
],
getListApi: this.$apis.redenvelope.winningGoodsApi,
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '手机号',
prop: 'userPhone',
minWidth: 100
},
{
label: '微信昵称',
prop: 'wechatName',
minWidth: 100
},
{
label: '红包链接',
prop: 'link',
minWidth: 100
},
{
label: '活动名称',
minWidth: 100,
prop: 'activityName',
},
{
label: '奖品名称',
minWidth: 100,
prop: 'activityName',
},
{
label: '核销类型',
minWidth: 150,
formatter: cell => {
return {0: '快递到家', 1: '到店核销'}[cell.exchangeType]
}
},
{
label: '核销状态',
minWidth: 150,
prop:'statusStr'
},
{
label: '核销时间',
prop: 'operateTime',
minWidth: 100
},
]
},
tableSearchForm: {}
}
},
methods: {
},
};
<template>
<div class="container">
<div class="sticky">
<GLCombiForm
ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
>
</GLCombiForm>
<div class="sticky-btns">
<div class="btns">
<el-button
@click="handleExport('winningGoodsExportApi')"
>导出
</el-button>
</div>
</div>
</div>
<div class="tabelList">
<div class="table-title">实物奖品核销列表</div>
<GLTable
ref="listRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:noDataImg="url"
:tableParams="tableParams"
:pageConf="pageConf"
>
<span
slot="auth-button"
slot-scope="scope"
>
<GLTableButton
:buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"
></GLTableButton>
</span>
</GLTable>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
import dataImportMixin from "./dataImportMixin";
import repeatMethods from "../common/repeatMethods";
export default {
name: 'DisplayRecord',
mixins: [dataImportMixin,repeatMethods],
components:{
},
data() {
return {
}
},
mounted() {
},
methods: {
getParams() {
let params = JSON.parse(JSON.stringify(this.searchForm))
this.updateParams(params, 'exchangeTime', 'exchangeTime', 'startExchangeTime', 'endExchangeTime');
return params
}
}
}
</script>
<style scoped lang='scss'>
.container {
height: 100%;
background-color: #fff;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 20px;
.table-title {
font-weight: 700;
font-size: 16px;
color: #333333;
padding-bottom: 18px;
}
.sticky {
position: relative;
z-index: 2;
&-btns {
position: absolute;
right: 0;
bottom: -23px;
overflow: hidden;
.el-button + .el-button {
margin-left: 8px;
}
.btns {
transition: all 0.25s;
.el-button {
padding: 8px 15px;
min-width: 60px;
}
}
}
}
}
</style>
......@@ -103,6 +103,18 @@ export default {
type: 'datePicker',
isClear: true
},
{
label: '创建类型',
name: 'createdSource',
type: 'select',
optionList: [
{ text: '全部', id: '' },
{ text: '外采', id: '1' },
{ text: '自研', id: '0' },
],
optionId: 'id',
optionLabel: 'text'
},
],
getListApi: this.$apis.redenvelope.getRedEnvelopeConfigList,
tableParams: {
......@@ -128,6 +140,13 @@ export default {
}
},
{
label: '创建类型',
minWidth: 100,
formatter:cell => {
return {'0':'自研','1':'外采'}[cell.createdSource]
}
},
{
label: '活动形式',
prop: 'activityTypeStr',
minWidth: 100
......
......@@ -78,11 +78,11 @@ export default {
listName: 'data',
tableOption: false,
tableColumns: [
// {
// label: '红包链接',
// prop: 'link',
// minWidth: 180
// },
{
label: '红包链接',
prop: 'link',
minWidth: 180
},
{
label: '导入时间',
prop: 'exportTime',
......@@ -165,4 +165,4 @@ export default {
width: fit-content;
}
}
</style>
\ No newline at end of file
</style>
......@@ -212,6 +212,7 @@ export default {
exportFn(res)
})
},
getParams() {
let params = JSON.parse(JSON.stringify(this.searchForm))
this.updateParams(params, 'showTime', 'showTime', 'startShowTime', 'endShowTime');
......
......@@ -118,6 +118,12 @@ export default {
maxlength: 100
},
{
label: '手机号',
name: 'userPhone',
type: 'input',
maxlength: 100
},
{
label: '提现金额/元',
addHtml: 'thirdCashOutMoneySlot',
// type: 'input'
......@@ -137,7 +143,19 @@ export default {
return false
}
}
}
},
{
label: '提现类型',
name: 'cashOutType',
type: 'select',
optionList: [
{ text: '全部', id: '' },
{ text: '自研提现', id: '0' },
{ text: '外采提现', id: '1' },
],
optionId: 'id',
optionLabel: 'text'
},
],
getListApi: this.$apis.redenvelope.getRedEnvelopeWithdraw,
tableParams: {
......@@ -155,11 +173,29 @@ export default {
minWidth: 100
},
{
label: '红包链接',
prop: 'link',
minWidth: 100
},
{
label: '活动名称',
prop: 'activityName',
minWidth: 100
},
{
label: '流水号',
prop: 'thirdSerialNumber',
minWidth: 100
},
{
label: '提现类型',
minWidth: 100,
formatter:
cell => {
return {0: '自研提现', 1: '外采提现'}[cell.cashOutType]
}
},
{
label: '提现金额/元',
prop: 'thirdCashOutMoney',
minWidth: 100,
......
// dataImportMixin.js
import * as dayjs from 'dayjs';
import url from '@/assets/empty.png'
export default {
data() {
return {
url,
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total'},
searchForm: {
},
searchFormData: [
{
label: '微信昵称',
name: 'wechatName',
type: 'input',
maxlength: 100
},
{
label: '手机号',
name: 'userPhone',
type: 'input',
maxlength: 100
},
{
label: '活动名称',
name: 'activityName',
type: 'input',
maxlength: 100
},
{
label: '奖品类型',
name: 'prizeType',
type: 'select',
optionList: [
{ text: '全部', id: '' },
{ text: '红包', id: '0' },
{ text: '实物', id: '1' },
{ text: '优惠券', id: '2' },
],
optionId: 'id',
optionLabel: 'text'
},
{
label: '奖品名称',
name: 'prizeName',
type: 'input',
maxlength: 11
},
{
label: '金额',
addHtml:'priceSlot'
},
{
label: '状态',
name: 'status',
type: 'select',
maxlength: 100,
optionList: [
{ text: '全部', id: '' },
{ text: '已领取', id: '0' },
{ text: '领取失败', id: '1' },
{ text: '发放中', id: '2' },
{ text: '发放成功', id: '3' },
{ text: '发放失败', id: '4' },
{ text: '待核销', id: '5' },
{ text: '已核销', id: '6' },
],
optionId: 'id',
optionLabel: 'text'
},
{
label: '中奖时间',
name: 'winTime',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd',
isClear: true,
customPickerOptions: {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate()))
if (date > yesterday) {
return true
}
return false
}
}
}
],
getListApi: this.$apis.redenvelope.winningListApi,
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '手机号',
prop: 'userPhone',
minWidth: 100
},
{
label: '微信昵称',
prop: 'wechatName',
minWidth: 100
},
{
label: '红包链接',
prop: 'link',
minWidth: 100
},
{
label: '活动名称',
minWidth: 100,
prop: 'activityName',
},
{
label: '奖品类型',
minWidth: 150,
formatter: cell => {
return {0: '红包', 1: '实物', 2: '优惠券'}[cell.prizeType]
}
},
{
label: '金额/元',
prop: 'amount',
minWidth: 100
},
{
label: '省份',
prop: 'provinces',
minWidth: 100,
},
{
label: '城市',
prop: 'city',
minWidth: 150
},
{
label: '区域',
prop: 'districts',
minWidth: 150
},
{
label: '详细地址',
prop: 'address',
minWidth: 100
},
{
label: '状态',
minWidth: 100,
prop:'statusStr'
},
{
label: '中奖时间',
prop: 'winTime',
minWidth: 100
},
]
},
tableSearchForm: {}
}
},
methods: {
},
};
<template>
<div class="container">
<div class="sticky">
<GLCombiForm
ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
>
<div slot="priceSlot">
<inputNumRange :formData="searchForm" :keyObj="{from: 'startAmount', to:'endAmount'}"></inputNumRange>
</div>
</GLCombiForm>
<div class="sticky-btns">
<div class="btns">
<el-button
@click="handleExport('winningExportApi')"
>导出
</el-button>
</div>
</div>
</div>
<div class="tabelList">
<div class="table-title">中奖列表</div>
<GLTable
ref="listRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:noDataImg="url"
:tableParams="tableParams"
:pageConf="pageConf"
>
<span
slot="auth-button"
slot-scope="scope"
>
<GLTableButton
:buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"
></GLTableButton>
</span>
</GLTable>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
import dataImportMixin from "./dataImportMixin";
import repeatMethods from "../common/repeatMethods";
import inputNumRange from "@/components/inputNumRange";
export default {
name: 'DisplayRecord',
mixins: [dataImportMixin, repeatMethods],
components: {
inputNumRange
},
data() {
return {}
},
mounted() {
},
methods: {
getParams() {
let params = JSON.parse(JSON.stringify(this.searchForm))
params.startAmount = params.startAmount ? params.startAmount * 100 : ''
params.endAmount = params.endAmount ? params.endAmount * 100 : ''
this.updateParams(params, 'winTime', 'winTime', 'startWinTime', 'startWinTime');
return params
}
}
}
</script>
<style scoped lang='scss'>
.container {
height: 100%;
background-color: #fff;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 20px;
.table-title {
font-weight: 700;
font-size: 16px;
color: #333333;
padding-bottom: 18px;
}
.sticky {
position: relative;
z-index: 2;
&-btns {
position: absolute;
right: 0;
bottom: -23px;
overflow: hidden;
.el-button + .el-button {
margin-left: 8px;
}
.btns {
transition: all 0.25s;
.el-button {
padding: 8px 15px;
min-width: 60px;
}
}
}
}
}
</style>
import {exportFn} from "@/common/constant";
export default {
methods: {
handleSearch() {
this.tableSearchForm = this.getParams()
this.$refs.listRef.refreshTable()
},
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
this.handleSearch()
},
handleExport(apiName) {
const params = this.getParams()
this.$apis.redenvelope[apiName](params).then(res => {
exportFn(res)
})
},
beforeSearchFn() {
return new Promise((resolve) => {
const { selectedArea } = this.searchForm;
// 清除旧的省市区 ID
this.searchForm.provincesId = '';
this.searchForm.cityId = '';
this.searchForm.districtsId = '';
// 根据 selectedArea 的长度设置相应的 ID
if (selectedArea) {
[this.searchForm.provincesId, this.searchForm.cityId, this.searchForm.districtsId] = selectedArea;
}
delete this.searchForm.selectedArea;
resolve();
});
},
getParams() {
let params = JSON.parse(JSON.stringify(this.searchForm))
return params
},
updateParams(params, paramKey, formKey, beginKey, endKey) {
if (params[paramKey]) {
params[beginKey] = this.searchForm[formKey][0];
params[endKey] = this.searchForm[formKey][1];
delete params[paramKey];
} else {
delete params[beginKey];
delete params[endKey];
}
return params
}
},
}
......@@ -18,14 +18,25 @@
<script type='text/ecmascript-6'>
import RedEnvelopeConfig from './components/RedEnvelopeConfig/index.vue'
import RedEnvelopeRecord from './components/RedEnvelopeRecord/index.vue'
import RedEnvelopeWithdraw from "./components/RedEnvelopeWithdraw/index.vue";
// import RedEnvelopeConfig from './components/RedEnvelopeConfig/index.vue'
// import RedEnvelopeRecord from './components/RedEnvelopeRecord/index.vue'
// import RedEnvelopeWithdraw from "./components/RedEnvelopeWithdraw/index.vue";
// import DisplayRecord from "./components/DisplayRecord/index.vue";
// import DrawRecord from "./components/DrawRecord/index.vue";
// import WinningRecord from "./components/WinningRecord/index.vue";
// import PhysicalPrizeWriteOff from "./components/PhysicalPrizeWriteOff/index.vue";
// import ActiveTemplateManagement from "./components/ActiveTemplateManagement/index.vue";
export default {
// 按需加载子组件
components: {
RedEnvelopeConfig,
RedEnvelopeRecord,
RedEnvelopeWithdraw
RedEnvelopeConfig: () => import('./components/RedEnvelopeConfig/index.vue'),
RedEnvelopeRecord: () => import('./components/RedEnvelopeRecord/index.vue'),
RedEnvelopeWithdraw: () => import('./components/RedEnvelopeWithdraw/index.vue'),
DisplayRecord: () => import('./components/DisplayRecord/index.vue'),
DrawRecord: () => import('./components/DrawRecord/index.vue'),
WinningRecord: () => import('./components/WinningRecord/index.vue'),
PhysicalPrizeWriteOff: () => import('./components/PhysicalPrizeWriteOff/index.vue'),
ActiveTemplateManagement: () => import('./components/ActiveTemplateManagement/index.vue')
},
name: '',
data () {
......@@ -37,13 +48,33 @@ export default {
name: 'RedEnvelopeConfig'
},
{
label: '提现记录',
name: 'RedEnvelopeWithdraw'
},
{
label: '展示记录',
name:'DisplayRecord'
},
{
label: '抽奖记录',
name:'DrawRecord'
},
{
label: '中奖记录',
name:'WinningRecord'
},
{
label: '实物奖品核销',
name:'PhysicalPrizeWriteOff'
},
{
label: '红包记录',
name: 'RedEnvelopeRecord'
},
{
label: '提现记录',
name: 'RedEnvelopeWithdraw'
},
label: '活动模板管理',
name:'ActiveTemplateManagement'
}
]
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!