Commit 5e5ca3c8 by 王志慧

Merge branch 'v3.24.0_wzh' into v3.24.0

2 parents 023ff59d 9e212c6f
......@@ -9,6 +9,7 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"bignumber.js": "^9.1.1",
"china-area-data": "^5.0.1",
"core-js": "^3.4.4",
"dayjs": "^1.10.7",
......
import { http } from '@/main'
const url = '/rop-scrm-marketing/router'
export default {
/**获取红包配置列表 */
getRedEnvelopeConfigList (params) {
getRedEnvelopeConfigList(params) {
params.method = 'marketing.api.activityRedEnvelope.page'
return http({
url,
......@@ -11,7 +10,7 @@ export default {
})
},
/**获取红包活动列表 */
getRedEnvelopeActivityList (params) {
getRedEnvelopeActivityList(params) {
params.method = 'marketing.api.activityRedEnvelope.merchant.list'
return http({
url,
......@@ -20,7 +19,7 @@ export default {
},
/**获取所属渠道列表 */
getRedEnvelopeMerchantList (params) {
getRedEnvelopeMerchantList(params) {
params.method = 'scrm.api.carlife.merchant.listWithPageByCurMerchant'
params.pageSize = params.pageSize || 50
return http({
......@@ -28,9 +27,26 @@ export default {
data: params
})
},
/*获取模板 */
getRedEnvelopeTemplateList(params) {
params.method = 'marketing.api.self.red.envelope.template.page'
params.pageSize = params.pageSize || 10000
return http({
url,
data: params
})
},
//获取优惠券
getCouponList(params) {
params.method = 'scrm.api.coupon.equity.list.merchant'
params.pageSize = params.pageSize || 1000
return http({
url: '/rop-scrm-coupon/router',
data: params
})
},
/**查询红包活动详情 */
getRedEnvelopeActivityDetail (params) {
getRedEnvelopeActivityDetail(params) {
params.method = 'marketing.api.activityRedEnvelope.findOne'
return http({
url,
......@@ -39,7 +55,7 @@ export default {
},
/** 新建红包活动接口 */
createActivityRedEnvelope (params) {
createActivityRedEnvelope(params) {
params.method = 'marketing.api.activityRedEnvelope.create'
return http({
url,
......@@ -48,7 +64,7 @@ export default {
},
/** 更新红包活动 */
updateActivityRedEnvelope (params) {
updateActivityRedEnvelope(params) {
params.method = 'marketing.api.activityRedEnvelope.update'
return http({
url,
......@@ -59,7 +75,7 @@ export default {
* /新建活动文件校验上传文件接口
*/
createCheckFile (params) {
createCheckFile(params) {
params.method = 'marketing.api.activityRedEnvelope.createCheckFile'
return http({
url,
......@@ -71,7 +87,7 @@ export default {
* /编辑活动文件校验上传文件接口
*/
updateCheckFile (params) {
updateCheckFile(params) {
params.method = 'marketing.api.activityRedEnvelope.updateCheckFile'
return http({
url,
......@@ -80,7 +96,7 @@ export default {
},
/** 红包配置列表导出 */
exportActivityRedEnvelope (params) {
exportActivityRedEnvelope(params) {
params.method = 'marketing.api.activityRedEnvelope.export'
return http({
url,
......@@ -89,7 +105,7 @@ export default {
},
/** 查询红包链接详情 */
getActivityRedEnvelopeLinkDetailPage (params) {
getActivityRedEnvelopeLinkDetailPage(params) {
params.method = 'marketing.api.activityRedEnvelope.linkDetailPage'
return http({
url,
......@@ -97,10 +113,9 @@ export default {
})
},
/**获取红包记录列表 */
getRedEnvelopeRecordList (params) {
getRedEnvelopeRecordList(params) {
params.method = 'marketing.api.activityRedEnvelope.record.page'
return http({
url,
......@@ -110,7 +125,7 @@ export default {
/**
* /校验中奖记录导入
*/
checkImport (params) {
checkImport(params) {
params.method = 'marketing.api.activityRedEnvelope.winningRecord.checkImport'
return http({
url,
......@@ -118,7 +133,7 @@ export default {
})
},
/** 导入中奖记录 */
importRedEnvelopeRecord (params) {
importRedEnvelopeRecord(params) {
params.method = 'marketing.api.activityRedEnvelope.winningRecord.import'
return http({
url,
......@@ -128,7 +143,7 @@ export default {
// 提现记录分页列表
getRedEnvelopeWithdraw (params) {
getRedEnvelopeWithdraw(params) {
params.method = 'marketing.api.activityRedEnvelope.cash.out.record.page'
return http({
url,
......@@ -136,14 +151,14 @@ export default {
})
},
exportRedEnvelopeWithdraw (params) {
exportRedEnvelopeWithdraw(params) {
params.method = 'marketing.api.activityRedEnvelope.cash.out.record.export'
return http({
url,
data: params
})
},
exportRedEnvelopeRecord (params) {
exportRedEnvelopeRecord(params) {
params.method = 'marketing.api.activityRedEnvelope.record.export'
return http({
url,
......@@ -152,7 +167,7 @@ export default {
},
// 获取白名单列表
getWhiteListPage(params){
getWhiteListPage(params) {
params.method = 'marketing.api.activityRedEnvelope.whiteList.page'
return http({
url,
......@@ -160,7 +175,7 @@ export default {
})
},
// 校验红包活动白名单导入
checkImportWhiteList(params){
checkImportWhiteList(params) {
params.method = 'marketing.api.activityRedEnvelope.whiteList.checkImport'
return http({
url,
......@@ -168,7 +183,7 @@ export default {
})
},
// 红包活动白名单导入
whiteListImport(params){
whiteListImport(params) {
params.method = 'marketing.api.activityRedEnvelope.whiteList.import'
return http({
url,
......@@ -176,7 +191,7 @@ export default {
})
},
whiteListDelete(params){
whiteListDelete(params) {
params.method = 'marketing.api.activityRedEnvelope.whiteList.delete'
return http({
url,
......@@ -185,7 +200,7 @@ export default {
},
// 展示记录列表
displayListApi(params){
displayListApi(params) {
params.method = 'marketing.api.activityRedEnvelope.show.record.page'
return http({
url,
......@@ -194,7 +209,7 @@ export default {
},
// 展示记录导出
displayExportApi(params){
displayExportApi(params) {
params.method = 'marketing.api.activityRedEnvelope.show.record.export'
return http({
url,
......@@ -202,7 +217,7 @@ export default {
})
},
// 抽奖记录列表
drawListApi(params){
drawListApi(params) {
params.method = 'marketing.api.activityRedEnvelope.lottery.draw.record.page'
return http({
url,
......@@ -211,7 +226,7 @@ export default {
},
// 导出红包抽奖记录
drawExportApi(params){
drawExportApi(params) {
params.method = 'marketing.api.activityRedEnvelope.lottery.draw.record.export'
return http({
url,
......@@ -219,7 +234,7 @@ export default {
})
},
// 中奖记录列表
winningListApi(params){
winningListApi(params) {
params.method = 'marketing.api.activityRedEnvelope.winning.record.page'
return http({
url,
......@@ -227,7 +242,7 @@ export default {
})
},
// 导出中奖记录列表
winningExportApi(params){
winningExportApi(params) {
params.method = 'marketing.api.activityRedEnvelope.winning.record.export'
return http({
url,
......@@ -235,7 +250,7 @@ export default {
})
},
// 实物奖品核销列表
winningGoodsApi(params){
winningGoodsApi(params) {
params.method = 'marketing.api.activityRedEnvelope.winning.goods.record.page'
return http({
url,
......@@ -243,7 +258,7 @@ export default {
})
},
// 实物奖品核销导出
winningGoodsExportApi(params){
winningGoodsExportApi(params) {
params.method = 'marketing.api.activityRedEnvelope.winning.goods.record.export'
return http({
url,
......@@ -298,4 +313,3 @@ export default {
})
}
}
// 新值,旧值,整数部分位数,小数部分位数,最小值,最大值,规则
function limitPrice (newValue, oldValue, intergerDigit, pointDigit, minValue, maxValue, regRule) {
function limitPrice(newValue, oldValue, intergerDigit, pointDigit, minValue, maxValue, regRule) {
/* eslint-disable */
var reg = {
priceReg: /^\d[\d\.]*$/,
......@@ -76,14 +76,15 @@ const statusList = [
}
]
//会员订单类型字典
const orderTypesList = [{
confId: 1,
confName: '套餐'
},
{
confId: 2,
confName: '会员卡'
}
const orderTypesList = [
{
confId: 1,
confName: '套餐'
},
{
confId: 2,
confName: '会员卡'
}
]
const orderStatusList = [
// 2: '待收货',
......@@ -110,45 +111,48 @@ const orderStatusList = [
{
confId: 6,
confName: '已退款'
},
}
]
const serviceStatusList = [{
confId: 1,
confName: '未生效'
},
{
confId: 2,
confName: '生效中'
},
{
confId: 3,
confName: '已失效'
}
const serviceStatusList = [
{
confId: 1,
confName: '未生效'
},
{
confId: 2,
confName: '生效中'
},
{
confId: 3,
confName: '已失效'
}
]
const memberTypeList = [{
confId: 1,
confName: '正式会员'
},
{
confId: 2,
confName: '试用会员'
}
const memberTypeList = [
{
confId: 1,
confName: '正式会员'
},
{
confId: 2,
confName: '试用会员'
}
]
const stateList = [{
confId: 0,
confName: '待上架'
},
{
confId: 1,
confName: '在售中'
},
{
confId: 2,
confName: '已下架'
},
const stateList = [
{
confId: 0,
confName: '待上架'
},
{
confId: 1,
confName: '在售中'
},
{
confId: 2,
confName: '已下架'
}
]
function getExplorer () {
function getExplorer() {
var ua = navigator.userAgent.toLocaleLowerCase()
var browserType = null
if (ua.match(/msie/) != null || ua.match(/trident/) != null) {
......@@ -173,7 +177,7 @@ function getExplorer () {
return browserType
}
function exportFn (url) {
function exportFn(url) {
let browserType = getExplorer()
if (browserType == 'QQ') {
window.open(url)
......@@ -200,7 +204,7 @@ const transformData = (data, childrenDepth) => {
for (let i = 0; i < childrenDepth; i++) {
const label = levels[i],
value = label,
existingOption = currentLevel && currentLevel.find((option) => option.label === label)
existingOption = currentLevel && currentLevel.find(option => option.label === label)
if (existingOption) {
if (i === childrenDepth - 1) continue
if (existingOption.children) currentLevel = existingOption.children
......@@ -217,7 +221,7 @@ const transformData = (data, childrenDepth) => {
})
return result
}
const checkSpace = (rule, value, callback,target ) => {
const checkSpace = (rule, value, callback, target) => {
const { field, message } = rule
if (!value) callback(new Error(message))
else if (!value.trim()) callback(new Error(rule.message))
......@@ -226,20 +230,11 @@ const checkSpace = (rule, value, callback,target ) => {
callback()
}
}
export {
limitPrice,
orderManageStatusList,
orderSourceList,
deliveryTypeList,
statusList,
serviceStatusList,
memberTypeList,
stateList,
orderTypesList,
orderStatusList,
exportFn,
getExplorer,
activityStatusList,
transformData,
checkSpace
}
\ No newline at end of file
const awardType = [
{ confId: 0, confName: '红包' },
{ confId: 1, confName: '实物' },
{ confId: 2, confName: '优惠券' },
{ confId: 3, confName: '谢谢惠顾' }
]
export { awardType,limitPrice, orderManageStatusList, orderSourceList, deliveryTypeList, statusList, serviceStatusList, memberTypeList, stateList, orderTypesList, orderStatusList, exportFn, getExplorer, activityStatusList, transformData, checkSpace }
<template>
<div class="add-wrap">
<div class="container gl-form-page">
<el-form ref="configRef" label-width="154px" :rules="configRules" :model="configForm">
<el-form-item label="活动名称:" prop="activityName" class="m-t-20">
<el-input :size="size" v-model="configForm.activityName" placeholder="请输入" maxlength="25" :disabled="disabled"></el-input>
</el-form-item>
<el-form-item label="所属渠道:" prop="merchantId" class="m-t-20">
<el-select :size="size" v-model="configForm.merchantId" placeholder="请选择" :disabled="disabled" filterable remote :remote-method="remoteMethod" v-reachbottom="onReachBottom" @focus="selectFocus" :loading="loading">
<el-option v-for="item in merchantObj.data" :key="item.confId" :label="item.confName" :value="item.confId"></el-option>
<template v-if="merchantObj.nothing">
<div class="nothing">到底了!</div>
</template>
</el-select>
</el-form-item>
<el-form-item label="活动时间:" prop="activityTime" class="m-t-20">
<el-date-picker :size="size" v-model="configForm.activityTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="afterRangePickerOptions"></el-date-picker>
</el-form-item>
<el-form-item label="活动形式:" prop="activityType" class="m-t-20">
<el-radio-group :size="size" v-model="configForm.activityType" style="width: 400px" :disabled="disabled">
<el-radio :label="0">随机红包</el-radio>
<el-radio :label="1">九宫格</el-radio>
<el-radio :label="2">翻牌</el-radio>
<el-radio :label="3">大转盘</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="导入链接:" prop="exportUrl" class="m-t-20">
<div class="activity-link">
<div class="upload-btn">
<el-button size="small">
<i class="el-icon-plus"></i>
上传文件
</el-button>
<input type="file" style="opacity: 0" ref="file" accept="*" @change="uploadFile" />
</div>
<a href="https://img01.glsx.com.cn/weapp/resource/saas/scrm/xlsx/红包链接.xlsx" target="_blank">下载导入模板</a>
<template v-if="configForm.exportUrl">
<div class="file-info flex">
{{ fileName }}
<div class="el-icon-success"></div>
</div>
</template>
<template v-if="fileError">
<div class="file-info flex error">
<a :href="fileError" target="_blank">下载失败列表</a>
<div class="el-icon-error"></div>
</div>
</template>
</div>
</el-form-item>
</el-form>
</div>
<GLFooter>
<el-button @click="handleClose">取消</el-button>
<el-button type="primary" @click="handleConfirm">提交</el-button>
</GLFooter>
</div>
</template>
<script type='text/ecmascript-6'>
export const afterRangePickerOptions = {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate() - 1))
if (date < yesterday) {
return true
}
return false
}
}
import commonFun from '../common/fun.js'
import * as dayjs from 'dayjs'
import { getMerchantListMixin } from '@/mixins'
export default {
mixins: [getMerchantListMixin],
name: '',
props: {
editObj: {
type: Object,
default: () => {}
}
},
data() {
return {
id: this.$route.query.id,
afterRangePickerOptions,
disabled: false,
configForm: {
activityName: '',
merchantId: '',
activityTime: '',
activityType: 0,
exportUrl: ''
},
configRules: {
activityName: [
{
required: true,
message: '请输入活动名称',
trigger: 'blur'
}
],
merchantId: [
{
required: true,
message: '请选择所属渠道',
trigger: 'blur'
}
],
activityTime: [
{
required: true,
message: '请输入活动时间',
trigger: 'blur'
}
],
activityType: [
{
required: true
}
],
exportUrl: [
{
required: true,
message: '请导入链接'
}
]
},
fileName: '',
fileError: ''
}
},
created() {
if (this.id) this.getRedEnvelopeActivityDetail()
},
methods: {
async getRedEnvelopeActivityDetail() {
let { id } = this
try {
const { configForm } = this,
res = await this.$apis.redenvelope.getRedEnvelopeActivityDetail({ id }),
merchantId = String(res.merchantId)
this.configForm = {
...configForm,
activityName: res.activityName,
activityType: res.activityType,
merchantId,
activityTime: [dayjs(res.activityStartTime).toDate(), dayjs(res.activityEndTime).toDate()],
id
}
this.merchantObj.data = [
{
confId: merchantId,
confName: res.merchantName
}
]
this.disabled = true
this.configRules.exportUrl[0].required = false
} catch (error) {
this.$message.error(error)
}
},
handleClose() {
// this.configForm = this.$options.data.call(this).configForm
// this.disabled = false
// this.fileError = ''
// this.$refs.configRef.resetFields()
// this.merchantObj.data = []
// this.$emit('update:editObj', {})
this.$router.push('/redEnvelope/index')
},
handleConfirm() {
this.$refs.configRef.validate(async valid => {
if (valid) {
try {
const { configForm, merchantObj } = this
let params = this.$common.utils.deepClone(configForm),
targetName = params.id ? 'updateActivityRedEnvelope' : 'createActivityRedEnvelope'
params.sourceType = 1
params.activityStartTime = dayjs(params.activityTime[0]).format('YYYY-MM-DD')
params.activityEndTime = dayjs(params.activityTime[1]).format('YYYY-MM-DD')
params.merchantName = merchantObj.data.find(e => e.confId == params.merchantId).confName
delete params.activityTime
console.log(JSON.parse(JSON.stringify(params)))
const res = await this.$apis.redenvelope[targetName](params)
if (res) {
this.$message({
message: params.id ? '编辑成功' : '创建成功',
type: 'success'
})
this.handleClose()
} else throw params.id ? '编辑失败' : '创建失败'
} catch (error) {
this.$message.error(error)
}
}
})
},
async uploadFile(e) {
const { id } = this.configForm,
target = id ? 'updateCheckFile' : 'createCheckFile'
try {
const { url, name } = await commonFun.uploadFile(e, this),
params = { exportUrl: url }
if (id) params.id = id
this.$refs.file.value = ''
const res = await this.$apis.redenvelope[target](params)
if (res) {
if (res.totalCount == 0 || res.failCount > 0) {
this.fileError = res.errorUrl
this.$message.error('红包链接导入失败')
this.configForm.exportUrl = ''
return
}
this.$message({
message: '导入成功',
type: 'success'
})
this.fileError = ''
this.configForm.exportUrl = url
this.fileName = name
}
} catch (error) {
console.log(error)
if (error) this.$message.error(error)
this.$refs.file.value = ''
}
}
}
}
</script>
<style scoped lang='scss'>
.container {
padding: 32px 20px;
background: #ffffff;
border-radius: 0 4px 4px 4px;
margin: 16px;
}
.activity-link {
display: flex;
width: 500px;
.upload-btn {
position: relative;
width: 110px;
height: 32px;
.el-button--small {
width: 100%;
height: 100%;
}
input {
cursor: pointer;
position: absolute;
height: 100%;
width: 100%;
top: 0px;
left: 0px;
font-size: 0px;
}
}
a,
.error {
margin-left: 8px;
color: #5850ff;
font-size: 14px;
cursor: pointer;
}
.file-info {
margin-left: 8px;
.el-icon-success {
margin-left: 8px;
color: #67c23a;
}
.el-icon-error {
margin-left: 8px;
color: red;
}
}
}
.nothing {
font-size: 14px;
padding: 0 20px;
white-space: nowrap;
color: #606266;
height: 34px;
line-height: 34px;
text-align: center;
}
</style>
\ No newline at end of file
<template>
<div>
<div class="tabs">
<GLTabs v-model="currentComponent" :tabPaneList="tabPaneList" @tab-click="handleClick"></GLTabs>
<component :is="currentComponent" ref="componentRef"></component>
</div>
</div>
</template>
<script>
export default {
components: {
FreeInnovate: () => import('./FreeAdd.vue'),
OffshoreProcurement: () => import('./OffAdd.vue')
},
data() {
return {
currentComponent: '',
sourceType: this.$route.query.sourceType,
tabPaneList: [
{
label: '自研红包',
name: 'FreeInnovate'
},
{
label: '外采红包',
name: 'OffshoreProcurement'
}
]
}
},
created() {
this.currentComponent = this.sourceType == 1 ? 'OffshoreProcurement' : 'FreeInnovate'
},
methods: {
handleClick() {}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template>
<div class="container">
<div class="sticky">
<GLCombiForm
ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
></GLCombiForm>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="sticky-btns">
<div class="btns">
<el-button
type="default"
plain
@click="showEditFun"
>新建</el-button>
<el-button
type="default"
@click="handleExport"
>导出</el-button>
<el-button type="default" plain @click="showEditFun">新建</el-button>
<el-button type="default" @click="handleExport">导出</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>
<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>
......@@ -50,7 +22,6 @@
<transition name="fade">
<whiteList v-if="whiteListObj.show" :whiteListObj.sync="whiteListObj" :key="whiteListKey"></whiteList>
</transition>
</div>
</template>
......@@ -60,12 +31,12 @@ import * as dayjs from 'dayjs'
import linkDetail from './linkDetail.vue'
import edit from './edit.vue'
import whiteList from './whiteList'
import {exportFn, activityStatusList} from '@/common/constant'
import { exportFn, activityStatusList } from '@/common/constant'
export default {
components: {linkDetail, edit, whiteList},
components: { linkDetail, edit, whiteList },
name: 'RedEnvelopeConfig',
data () {
data() {
return {
url,
whiteListKey: 0,
......@@ -110,11 +81,11 @@ export default {
optionList: [
{ text: '全部', id: '' },
{ text: '外采', id: '1' },
{ text: '自研', id: '0' },
{ text: '自研', id: '0' }
],
optionId: 'id',
optionLabel: 'text'
},
}
],
getListApi: this.$apis.redenvelope.getRedEnvelopeConfigList,
tableParams: {
......@@ -136,14 +107,14 @@ export default {
prop: 'questionCount',
minWidth: 100,
formatter: cell => {
return cell.activityStartTime ? `${dayjs(cell.activityStartTime).format('YYYY/MM/DD')}-${dayjs(cell.activityEndTime).format('YYYY/MM/DD')} `: ''
return cell.activityStartTime ? `${dayjs(cell.activityStartTime).format('YYYY/MM/DD')}-${dayjs(cell.activityEndTime).format('YYYY/MM/DD')} ` : ''
}
},
{
label: '创建类型',
minWidth: 100,
formatter:cell => {
return {'0':'自研','1':'外采'}[cell.createdSource]
formatter: cell => {
return { 0: '自研', 1: '外采' }[cell.createdSource]
}
},
{
......@@ -155,13 +126,11 @@ export default {
label: '红包链接总数',
prop: 'amount',
minWidth: 150
},
{
label: '已用总数',
prop: 'usedAmount',
minWidth: 100
},
{
label: '可用总数',
......@@ -172,7 +141,7 @@ export default {
label: '状态',
prop: 'activityStatusStr',
minWidth: 100
},
}
]
},
// 表格按钮
......@@ -181,7 +150,7 @@ export default {
type: 'el-button',
name: '编辑',
attrs: {
type: 'text',
type: 'text'
},
listeners: {
click: row => this.showEditFun(row)
......@@ -191,7 +160,7 @@ export default {
type: 'el-button',
name: '链接详情',
attrs: {
type: 'text',
type: 'text'
},
listeners: {
click: row => this.jumpDetail(row)
......@@ -201,7 +170,7 @@ export default {
type: 'el-button',
name: '白名单',
attrs: {
type: 'text',
type: 'text'
},
listeners: {
click: row => this.whiteList(row)
......@@ -214,11 +183,9 @@ export default {
tableSearchForm: {}
}
},
mounted () {
},
mounted() {},
methods: {
getParams () {
getParams() {
const searchForm = JSON.parse(JSON.stringify(this.searchForm))
if (searchForm.activityTime) {
searchForm.activityStartTime = dayjs(this.searchForm.activityTime[0]).format('YYYY-MM-DD')
......@@ -227,50 +194,60 @@ export default {
delete searchForm.activityTime
return searchForm
},
handleSearch () {
handleSearch() {
this.tableSearchForm = this.getParams()
this.$refs.listRef.refreshTable()
},
handleReset () {
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
this.handleSearch()
},
jumpDetail (e) {
jumpDetail(e) {
this.linkDetailObj = {
show: true,
id: e.id
}
},
whiteList(e) {
this.whiteListKey++; // 更改key值,强制Vue重新渲染whiteList组件
this.whiteListKey++ // 更改key值,强制Vue重新渲染whiteList组件
setTimeout(() => {
this.whiteListObj = {
show: true,
id: e.id
};
}, ); // 延迟100毫秒,您可以根据需要调整这个值
},
showEditFun (e) {
this.editObj = {
show: true,
title: e.id ? '编辑' : '新建',
id: e.id || ''
}
}
}) // 延迟100毫秒,您可以根据需要调整这个值
},
handleExport () {
this.$apis.redenvelope.exportActivityRedEnvelope({
...this.getParams(),
...this.$refs.listRef.page
}).then(res => {
exportFn(res)
showEditFun(e) {
// this.editObj = {
// show: true,
// title: e.id ? '编辑' : '新建',
// id: e.id || ''
// }
this.$router.push({
path: `/redEnvelope/components/RedEnvelopeConfig/add`,
query:{
id:e.id,
sourceType:e.sourceType
}
})
},
handleExport() {
this.$apis.redenvelope
.exportActivityRedEnvelope({
...this.getParams(),
...this.$refs.listRef.page
})
.then(res => {
exportFn(res)
})
}
}
}
</script>
<style scoped lang='scss'>
.fade-enter-active, .fade-leave-active {
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.1s;
}
.fade-enter, .fade-leave-to /* .fade-leave-active in <2.1.8 */ {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!