Commit 6ea83d55 by caoyanzhi

Merge branch 'feature/12月迭代'

parents 8d28f382 9a0c7c9c
......@@ -7,6 +7,7 @@
<title>GIC后台</title>
<link rel="stylesheet" type="text/css" href="<%= htmlWebpackPlugin.options.BASE_URL %>static/fonts/iconfont.css">
<link rel="stylesheet" type="text/css" href="<%= htmlWebpackPlugin.options.BASE_URL %>static/css/common.css">
<link rel="stylesheet" href="//at.alicdn.com/t/font_2996579_93aeeozj35q.css">
<!-- <link rel="stylesheet" href="//web-1251519181.file.myqcloud.com/components/element.2.12.0.css"> -->
<!-- element 皮肤 -->
<!-- <link rel="stylesheet" type="text/css" href="http://web-1251519181.file.myqcloud.com/lib/elementUI/theme.1.0.1/index.css"> -->
......
......@@ -138,12 +138,18 @@ a:hover {
.mt15{
margin-top: 15px!important;
}
.mt17{
margin-top: 17px!important;
}
.mt20{
margin-top: 20px!important;
}
.mt30{
margin-top: 30px!important;
}
.mt40{
margin-top: 40px!important;
}
.mt100{
margin-top: 100px!important;
}
......@@ -177,6 +183,9 @@ a:hover {
.mb15{
margin-bottom: 15px!important;
}
.mb17{
margin-bottom: 17px!important;
}
.mb20{
margin-bottom: 20px!important;
}
......@@ -253,6 +262,9 @@ a:hover {
.w600{
width: 600px!important;
}
.h32 {
height: 32px;
}
.ml120{
margin-left: 120px;
}
......@@ -334,6 +346,9 @@ a:hover {
.fz28{
font-size: 28px;
}
.fz36 {
font-size: 36px;
}
.fz30{
font-size: 30px;
}
......@@ -521,3 +536,18 @@ img::after {
// ::-webkit-scrollbar {
// display: none;
// }
// 幽灵按钮放在全局方便全局改样式
.ghost-btn {
background: #fff !important;
color: #1890ff !important;
&:hover {
border-color: #40a9ff;
color: #40a9ff !important;
}
&:active {
border-color: #096dd9;
color: #096dd9 !important;
}
}
......@@ -7,7 +7,7 @@
<div class="layout-title">
<el-breadcrumb class="dm-breadcrumb" separator="/">
<el-breadcrumb-item :to="{ path: '' }"><a href="/report/#/memberSummary">首页</a></el-breadcrumb-item>
<el-breadcrumb-item :class="{ 'no-link': !v.path }" v-for="(v, i) in breadcrumb" :key="i" :to="{ path: v.path }">{{ v.name }}</el-breadcrumb-item>
<el-breadcrumb-item :class="{ 'no-link': !v.path, 'can-link': v.path }" v-for="(v, i) in breadcrumb" :key="i" :to="{ path: v.path }">{{ v.name }}</el-breadcrumb-item>
</el-breadcrumb>
<h3>
<div>
......@@ -61,7 +61,6 @@ export default {
return this.$store.state.marketing.breadcrumb;
},
layoutTips() {
console.log(this.$store.state.marketing.layoutTips);
return this.$store.state.marketing.layoutTips;
},
showDescription() {
......@@ -230,4 +229,9 @@ export default {
margin-left: 10px;
}
}
.can-link:hover {
span:first-child {
color: #1890ff !important;
}
}
</style>
......@@ -3,9 +3,9 @@
<div class="dm-img-item_top" @mouseover="optShow = true" @mouseout="optShow = false">
<img :src="imgData.qcloudImageUrl" alt="" srcset="" />
<div class="dm-img-item_opt" v-show="optShow" v-if="imgData.canEdit !== false">
<i class="fz14 el-icon-edit cursor" @click.stop.prevent="edit"></i>
<i class="iconfont icon-fenzu cursor" @click.stop.prevent="move"></i>
<i class="fz14 el-icon-delete cursor" @click.stop.prevent="del"></i>
<i v-if="$getButtonLimit($buttonCode.marketingEditImg)" :limit-code="$buttonCode.marketingEditImg" class="fz14 el-icon-edit cursor" @click.stop.prevent="edit"></i>
<i v-if="$getButtonLimit($buttonCode.marketingMoveGroup)" :limit-code="$buttonCode.marketingMoveGroup" class="iconfont icon-fenzu cursor" @click.stop.prevent="move"></i>
<i v-if="$getButtonLimit($buttonCode.marketingDelImg)" :limit-code="$buttonCode.marketingDelImg" class="fz14 el-icon-delete cursor" @click.stop.prevent="del"></i>
</div>
</div>
<div class="dm-img-item_center">
......
......@@ -2,7 +2,7 @@
<section class="dm-wrap dm-ilib clearfix">
<nav>
<h4 class="text-left pl10">
<el-button style="font-weight: 500;" size="small" type="text" icon="el-icon-plus" @click.stop="addGroup">新建分组</el-button>
<el-button style="font-weight: 500;" size="small" type="text" icon="el-icon-plus" v-if="$getButtonLimit($buttonCode.marketingAddImgGroup)" :limit-code="$buttonCode.marketingAddImgGroup" @click.stop="addGroup">新建分组</el-button>
</h4>
<ul class="dm-ilib-category" :style="scrollStyle">
<li v-for="(v, i) in groupsList" :key="i" @click="changeCate(v)" :class="{ active: listParams.wechatImageGroupId === v.wechatImageGroupId }">
......@@ -15,12 +15,12 @@
<div class="dm-ilib-header">
<h4>
{{ listParams.wechatImageGroupId ? currentGroup.groupName : '所有图片' }}
<i v-if="listParams.wechatImageGroupId" class="el-icon-edit" @click="editGroup"></i>
<i v-if="listParams.wechatImageGroupId" class="el-icon-delete" @click="delGroup"></i>
<i v-if="$getButtonLimit($buttonCode.marketingEditImgGroup) && listParams.wechatImageGroupId" :limit-code="$buttonCode.marketingEditImgGroup" class="el-icon-edit" @click="editGroup"></i>
<i v-if="$getButtonLimit($buttonCode.marketingDelImgGroup) && listParams.wechatImageGroupId" :limit-code="$buttonCode.marketingDelImgGroup" class="el-icon-delete" @click="delGroup"></i>
</h4>
<div class="dm-ilib-opt_right">
<span class="fz12 gray pr10">大小不超过2M</span>
<label class="el-button el-button--primary el-button--small" :class="{ 'is-disabled': upLoadDisabled }"
<label v-if="$getButtonLimit($buttonCode.marketingUploadImg)" :limit-code="$buttonCode.marketingUploadImg" class="el-button el-button--primary el-button--small" :class="{ 'is-disabled': upLoadDisabled }"
>{{ upLoadDisabled ? '上传中...' : '本地上传' }}
<input type="file" style="display:none;" :disabled="upLoadDisabled" accept="image/gif, image/jpeg,image/png" ref="uploader" v-imglibupload="this" />
</label>
......@@ -29,8 +29,8 @@
<div class="dm-ilib-opt">
<div class="dm-ilib-opt_left">
<el-checkbox style="background:#fff;" :indeterminate="isIndeterminate" v-model="checkAll" label="全选" border @change="handleCheckAllChange"></el-checkbox>
<el-button class="pl20" type="text" @click="moveImgGroupBatch">移动分组</el-button>
<el-button type="text" @click="delBatchImg">删除</el-button>
<el-button v-if="$getButtonLimit($buttonCode.marketingMoveGroup)" :limit-code="$buttonCode.marketingMoveGroup" class="pl20" type="text" @click="moveImgGroupBatch">移动分组</el-button>
<el-button v-if="$getButtonLimit($buttonCode.marketingDelImg)" :limit-code="$buttonCode.marketingDelImg" type="text" @click="delBatchImg">删除</el-button>
</div>
</div>
<div v-loading="loading">
......
......@@ -12,8 +12,8 @@
</el-checkbox>
</div>
<div>
<el-button type="primary" v-if="!isPublish" @click="add">新建图文</el-button>
<el-button v-if="auto" @click="check">检查同步</el-button>
<el-button type="primary" v-if="$getButtonLimit($buttonCode.marketingAddImgText) && !isPublish" :limit-code="$buttonCode.marketingAddImgText" @click="add">新建图文</el-button>
<el-button v-if="$getButtonLimit(isPublish ? $buttonCode.marketingPublishSync : $buttonCode.marketingCheckSync) && auto" :limit-code="isPublish ? $buttonCode.marketingPublishSync : $buttonCode.marketingCheckSync" @click="check">检查同步</el-button>
</div>
</div>
<el-radio-group class="dm-imgtext-list" v-model="selectedData.imageTextId" :style="scrollStyle">
......@@ -73,18 +73,18 @@
<el-button type="text" v-if="scope.row.canEdit !== false" @click="editData(scope.row)">转为草稿</el-button>
</template>
<template v-if="!scope.row.oldImageTextFlag && !isPublish">
<el-button type="text" v-if="scope.row.canEdit !== false" @click="editData(scope.row)">编辑</el-button>
<el-button type="text" v-if="scope.row.canEdit !== false" @click="$router.push('/wechat/record/add/' + scope.row.imageTextId)">使用</el-button>
<el-button :loading="scope.row.loading" :disabled="scope.row.loading" @click="onPublic(scope.row)" type="text">发布</el-button>
<el-button type="text" v-if="$getButtonLimit($buttonCode.marketingEditImgText) && scope.row.canEdit !== false" :limit-code="$buttonCode.marketingEditImgText" @click="editData(scope.row)">编辑</el-button>
<el-button type="text" v-if="$getButtonLimit($buttonCode.marketingUseImgText) && scope.row.canEdit !== false" :limit-code="$buttonCode.marketingUseImgText" @click="$router.push('/wechat/record/add/' + scope.row.imageTextId)">使用</el-button>
<el-button v-if="$getButtonLimit($buttonCode.marketingPublishImgText)" :limit-code="$buttonCode.marketingPublishImgText" :loading="scope.row.loading" :disabled="scope.row.loading" @click="onPublic(scope.row)" type="text">发布</el-button>
</template>
<dm-delete v-if="scope.row.canEdit" width="300" @confirm="delData(scope.row)">
<dm-delete v-if="$getButtonLimit(isPublish ? $buttonCode.marketingPublishDelImg : $buttonCode.marketingDelImgText) && scope.row.canEdit" width="300" @confirm="delData(scope.row)">
<div slot="tips" v-if="isPublish">
<p class="tips-content"><i class="tipos-icon el-icon-warning"></i>删除后,用户将无法访问此图文页面。请检查当前是否有其他地方正在使用此图文内容,否则将导致发送失败。</p>
</div>
<div slot="tips" v-if="!isPublish && !isGroupSend">
<p class="tips-content"><i class="tipos-icon el-icon-warning"></i>删除后,用户将无法访问此草稿内容。</p>
</div>
<el-button type="text">删除</el-button>
<el-button :limit-code="isPublish ? $buttonCode.marketingPublishDelImg : $buttonCode.marketingDelImgText" type="text">删除</el-button>
</dm-delete>
</template>
</template>
......
......@@ -57,6 +57,7 @@ export default {
},
type: {
handler: function() {
this.listParams.currentPage = 1;
this.LoadTempList();
},
immediate: true
......
......@@ -3,7 +3,8 @@
<template slot="content">
<p class="tip-popover">{{ text }}</p>
</template>
<i class="iconfont icon-xinxixianshi"></i>
<!-- icon-xinxixianshi -->
<i class="iconfont icon-QuestionCircleOutlined"></i>
</el-tooltip>
</template>
......
......@@ -34,12 +34,14 @@ Vue.prototype.$tips = function({ message = '提示', type = 'success' }) {
/* eslint-disable no-new */
limit({
createApp() {
new Vue({
el: '#app',
router,
store,
components: { App },
template: '<App/>'
window.getLimit(router, 'marketing').then(() => {
new Vue({
el: '#app',
router,
store,
components: { App },
template: '<App/>'
});
});
}
});
......@@ -29,6 +29,11 @@ export default {
path: 'do',
name: '充值',
component: () => import(/* webpackChunkName: "recharge" */ '../../views/recharge/recharge.vue')
},
{
path: 'accountDetail',
name: '账户明细',
component: () => import(/* webpackChunkName: "recharge" */ '../../views/recharge/account-detail.vue')
}
]
};
......@@ -16,6 +16,24 @@ export default {
}
},
{
path: 'setting/edit',
name: '门店签到设置',
component: () =>
import ( /* webpackChunkName: "signIn" */ '../../views/sign/setting.vue'),
meta: {
path: '/sign/setting/edit'
}
},
{
path: 'setting/check',
name: '门店签到设置',
component: () =>
import ( /* webpackChunkName: "signIn" */ '../../views/sign/setting.vue'),
meta: {
path: '/sign/setting/check'
}
},
{
path: 'list',
name: '门店签到记录',
component: () =>
......
......@@ -89,6 +89,8 @@ function handlerErr(code, message = '请求错误', alertError = true) {
}
}
const pendingRequest = new Map();
/**
* 请求地址,请求数据,是否静默,请求方法
*/
......@@ -111,6 +113,16 @@ const requests = (url, data = {}, contentTypeIsJSON = false, isSilence = false,
} else {
_opts.params = _query;
}
let key = JSON.stringify(_opts);
if (!pendingRequest.has(key)) {
pendingRequest.set(key, Date.now());
} else if (Date.now() - pendingRequest.get(key) > 1000) {
pendingRequest.delete(key);
} else {
return Promise.reject();
}
return new Promise((resolve, reject) => {
let _random = { stamp: Date.now(), url: `${_apiHost + url}` };
if (!isSilence) {
......@@ -138,6 +150,7 @@ const requests = (url, data = {}, contentTypeIsJSON = false, isSilence = false,
.catch(res => {
clearTimeout(_timer);
popRequest(_random);
pendingRequest.delete(key);
if (res) {
handlerErr(res.response.status, '接口异常', alertError);
}
......
......@@ -53,3 +53,27 @@ export const videoChartData = params => requests('api-mall/' + 'get-traffic-cost
//计费中心--消费详情-视频列表-导出
export const downloadTrafficCostListExcel = config.api + 'api-mall/' + 'download-traffic-cost-list-execl';
// 计费部门分页查询
export const getDepartList = params => requests(PREFIX + 'list-account-department-by-page', params);
// 计费部门单条总部数据
export const getDepartSum = params => requests(PREFIX + 'get-enterprise-account', params);
// 保存计费规则
export const saveAccountRule = params => requests(PREFIX + 'save-account-rule', params);
// 获取计费规则
export const getAccountRule = params => requests(PREFIX + 'get-enterprise-account-rule', params);
// 启用停用计费部门
export const updateDepartStatus = params => requests(PREFIX + 'update-account-department-status', params);
// 增加计费部门
export const addAccountDepart = params => requests(PREFIX + 'add-account-department', params);
// 获取部门列表
export const getAllDepart = params => requests('api-admin/' + 'list-clerk-department', params);
// 获取门店列表
export const getStoreList = params => requests('api-admin/' + 'depart-store-list', params);
......@@ -3,7 +3,7 @@
<div class="clearfix pb22">
<el-date-picker class="w400" v-model="dateTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="refresh"></el-date-picker>
<el-input v-model="listParams.search" class="w300" placeholder="请输入数据对话/创建人" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button class="fr" type="primary" @click="$router.push('/activity/add')">新建数据对话</el-button>
<el-button class="fr" type="primary" v-if="$getButtonLimit($buttonCode.marketingAddActivity)" :limit-code="$buttonCode.marketingAddActivity" @click="$router.push('/activity/add')">新建数据对话</el-button>
<el-button class="fr mr10" @click="$router.push('/activity/history-list')">查看历史数据对话</el-button>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%">
......@@ -16,12 +16,12 @@
<el-table-column label="操作" align="left" width="210px" fixed="right">
<template slot-scope="scope">
<el-button type="text" @click="$router.push(`/activity/data-view/${scope.row.marketingActivityId}`)">数据概览</el-button>
<el-button type="text" @click="$router.push(`/activity/edit/${scope.row.marketingActivityId}`)">编辑</el-button>
<dm-delete @confirm="stopData(scope.row)" tips="是否下线该数据对话?">
<el-button type="text">下线</el-button>
<el-button type="text" v-if="$getButtonLimit($buttonCode.marketingEditActivity)" :limit-code="$buttonCode.marketingEditActivity" @click="$router.push(`/activity/edit/${scope.row.marketingActivityId}`)">编辑</el-button>
<dm-delete v-if="$getButtonLimit($buttonCode.marketingOutlineActivity)" @confirm="stopData(scope.row)" tips="是否下线该数据对话?">
<el-button :limit-code="$buttonCode.marketingOutlineActivity" type="text">下线</el-button>
</dm-delete>
<dm-delete @confirm="delData(scope.row)" tips="是否删除该数据对话?">
<el-button type="text">删除</el-button>
<dm-delete v-if="$getButtonLimit($buttonCode.marketingDelActivity)" @confirm="delData(scope.row)" tips="是否删除该数据对话?">
<el-button :limit-code="$buttonCode.marketingDelActivity" type="text">删除</el-button>
</dm-delete>
</template>
</el-table-column>
......
......@@ -9,7 +9,6 @@
<el-option v-for="(v, i) in telTaskTypeOption" :key="i" :label="v.label" :value="v.value"></el-option>
</el-select>
<el-input v-model="listParams.phoneNumber" class="w200" placeholder="输入号码查询" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button type="primary" class="fr" @click="$router.push('/calllog/record')">录音设置</el-button>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width:100%">
<el-table-column align="left" width="150" prop="callBeginTime" label="呼叫时间">
......
......@@ -6,7 +6,7 @@
<el-option v-for="(item, index) in destoryType" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-input v-model="listParams.search" class="w300" placeholder="请输入卡券名称" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button class="fr" type="danger" @click="showDialog('add', {})">卡券销毁</el-button>
<el-button class="fr" type="danger" v-if="$getButtonLimit($buttonCode.marketingDestoryCard2)" :limit-code="$buttonCode.marketingDestoryCard2" @click="showDialog('add', {})">卡券销毁</el-button>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%">
<el-table-column :show-overflow-tooltip="true" min-width="120" align="left" prop="cardName" label="卡券名称">
......@@ -46,7 +46,7 @@
</el-table-column>
<el-table-column label="操作" align="left" width="120px" fixed="right">
<template slot-scope="scope">
<el-button type="text" @click="exportExcel(scope.row)">导出结果</el-button>
<el-button type="text" v-if="$getButtonLimit($buttonCode.marketingDownloadDestoryCard)" :limit-code="$buttonCode.marketingDownloadDestoryCard" @click="exportExcel(scope.row)">导出结果</el-button>
</template>
</el-table-column>
</el-table>
......
......@@ -626,6 +626,7 @@ export default {
if (this.$route.meta.type === 'edit') {
params.coupCardPutOnId = this.$route.params.id; // 投放主键ID, 新建不传; 修改传
}
this.loading = true;
saveUpdatePutonCard(params)
.then(res => {
if (res.errorCode === 0) {
......@@ -639,16 +640,19 @@ export default {
this.$router.push('/card/record/send?new=1');
})
.catch(err => {
this.loading = false;
this.getCardPutonDetail();
});
} else {
this.$router.push('/card/record/send?new=1');
}
} else {
this.loading = false;
this.$tips({ type: 'error', message: '操作失败' });
}
})
.catch(err => {
this.loading = false;
this.$tips({ type: 'error', message: '操作失败' });
});
},
......
......@@ -18,14 +18,14 @@
</div>
<div class="game-ptyx-header pb10 clearfix">
<span class="pr10" style="line-height:32px;margin-left:10px">卡券共{{ total }}</span>
<el-button class="fr" type="primary" @click="addCard">新增卡券</el-button>
<el-button class="fr" v-if="$getButtonLimit($buttonCode.marketingAddCard)" :limit-code="$buttonCode.marketingAddCard" type="primary" @click="addCard">新增卡券</el-button>
</div>
<ul class="clearfix" element-loading-text="拼命加载中">
<card-item @adjust-stock="preAdjustStock" :item="v" v-for="(v, i) in tableList" :key="i" @delete-card="delData"></card-item>
</ul>
<div class="text-center" v-if="tableList.length === 0">
<img class="block block-center pt100" width="60" height="60" src="../../assets/img/no-data_icon.png" alt="" />
<el-button class="block block-center mt10" type="text" @click="addCard">新增卡券</el-button>
<el-button class="block block-center mt10" type="text" v-if="$getButtonLimit($buttonCode.marketingAddCard)" :limit-code="$buttonCode.marketingAddCard" @click="addCard">新增卡券</el-button>
</div>
<adjust-stock :show.sync="adjustStock" :totalCount="currentCard.couponStock" :coupCardId="currentCard.coupCardId" @refresh="delayRefresh"></adjust-stock>
<dm-pagination v-show="tableList.length" background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></dm-pagination>
......
......@@ -5,7 +5,7 @@
<dm-activity-select class="vertical-middle w150 mr5" width="150" :actId.sync="listParams.marketingActivityId" onlySelect @actUpdate="refresh"></dm-activity-select>
<el-input v-model="listParams.search" class="w300" placeholder="请输入卡券包名称/创建人" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-checkbox v-if="$store.state.marketing.isShowSelf" class="vertical-middle" v-model="listParams.showSelfFlag" :true-label="1" :false-label="0" label="仅看本人" border @change="refresh" />
<el-button class="fr" type="primary" @click="$router.push('/card/merge/add')">新建卡券包</el-button>
<el-button class="fr" type="primary" v-if="$getButtonLimit($buttonCode.marketingAddCardBag)" :limit-code="$buttonCode.marketingAddCardBag" @click="$router.push('/card/merge/add')">新建卡券包</el-button>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%">
<el-table-column :show-overflow-tooltip="true" min-width="140" align="left" prop="name" label="卡券包名称"></el-table-column>
......@@ -34,10 +34,10 @@
<el-table-column min-width="100" align="left" prop="creatorName" label="创建人" v-if="$store.state.marketing.openFlag"></el-table-column>
<el-table-column label="操作" align="left" width="200px" fixed="right">
<template slot-scope="scope">
<el-button v-if="scope.row.canEdit" type="text" @click="$router.push(`/card/merge/edit/${scope.row.cardPackageId}`)">修改</el-button>
<el-button v-if="$getButtonLimit($buttonCode.marketingUpdateCardBag) && scope.row.canEdit" :limit-code="$buttonCode.marketingUpdateCardBag" type="text" @click="$router.push(`/card/merge/edit/${scope.row.cardPackageId}`)">修改</el-button>
<el-button v-else type="text" @click="$router.push(`/card/merge/info/${scope.row.cardPackageId}`)">查看</el-button>
<dm-delete v-if="scope.row.canEdit" @confirm="del(scope.row)" tips="是否删除该卡券包?">
<el-button type="text">删除</el-button>
<dm-delete v-if="$getButtonLimit($buttonCode.marketingDelCardBag) && scope.row.canEdit" @confirm="del(scope.row)" tips="是否删除该卡券包?">
<el-button type="text" :limit-code="$buttonCode.marketingDelCardBag">删除</el-button>
</dm-delete>
<el-button v-if="scope.row.canEdit" type="text" @click="$router.push(`/card/merge/record-list?cardPackageId=${scope.row.cardPackageId}&name=${scope.row.name}`)">领取记录</el-button>
</template>
......
......@@ -71,7 +71,7 @@
<div class="card-item_foot clearfix">
<div class="fl" v-if="item.gicCouponType != 3 && item.gicCouponType != 4">
<!-- 由外部api创建 仅展示详情、删除、报表按钮 -->
<span v-if="item.auditingStatus !== -1"
<span v-if="$getButtonLimit($buttonCode.marketingEditCardStock) && item.auditingStatus !== -1" :limit-code="$buttonCode.marketingEditCardStock"
>剩余库存:{{ item.couponStock }} <a title="编辑库存" v-if="!shelfFlag && item.useCustomCode === 0 && item.canEdit !== false && !item.isApiCreate" @click="preAdjustStock(item)"><i class="el-icon-edit"></i></a
></span>
</div>
......
......@@ -9,6 +9,7 @@ export default Vue.component('render-temp', {
}
},
render(h) {
const { $getButtonLimit, $buttonCode } = Vue.prototype;
const canEdit = this.item.canEdit !== false; // 只有canEdit === false 才证明不能使用 没有权限仅可以详情/报表
const isApiCreate = this.item.isApiCreate || false; // 由外部api创建 仅展示详情、删除、报表按钮
const showPutonBtn = this.item.showPutonBtn || false;
......@@ -20,8 +21,8 @@ export default Vue.component('render-temp', {
// 微盟外部券:领取记录、投放、报表
// 通用外部券:领取记录、报表
const bind1 =
(!isApiCreate || isWeimo) && canGroupSend && !isCommon && showPutonBtn ? (
<a title="投放" onClick={this.handler.bind(null, 1)}>
$getButtonLimit($buttonCode.marketingSendCard) && (!isApiCreate || isWeimo) && canGroupSend && !isCommon && showPutonBtn ? (
<a title="投放" limit-code={$buttonCode.marketingSendCard} onClick={this.handler.bind(null, 1)}>
<i class="iconfont icon-daohang-" />
</a>
) : (
......@@ -33,16 +34,16 @@ export default Vue.component('render-temp', {
</a>
);
const bind3 =
!isWeimo && !isCommon && !isApiCreate ? (
<a title="编辑" onClick={this.handler.bind(null, 3)}>
$getButtonLimit($buttonCode.marketingEditCard) && !isWeimo && !isCommon && !isApiCreate ? (
<a title="编辑" limit-code={$buttonCode.marketingEditCard} onClick={this.handler.bind(null, 3)}>
<i class="el-icon-edit" />
</a>
) : (
''
);
const bind4 =
canEdit && !isWeimo && !isCommon ? (
<a title="删除" onClick={this.handler.bind(null, 4)}>
$getButtonLimit($buttonCode.marketingDelCard) && canEdit && !isWeimo && !isCommon ? (
<a title="删除" limit-code={$buttonCode.marketingDelCard} onClick={this.handler.bind(null, 4)}>
<i class="el-icon-delete" />
</a>
) : (
......@@ -54,8 +55,8 @@ export default Vue.component('render-temp', {
</a>
);
const bind6 =
canEdit && !isApiCreate && !isWeimo && !isCommon ? (
<a title="复制" onClick={this.handler.bind(null, 6)}>
$getButtonLimit($buttonCode.marketingCopyCard) && canEdit && !isApiCreate && !isWeimo && !isCommon ? (
<a title="复制" limit-code={$buttonCode.marketingCopyCard} onClick={this.handler.bind(null, 6)}>
<i class="iconfont icon-wxcard-copy" />
</a>
) : (
......
......@@ -5,7 +5,7 @@
<el-input v-model="listParams.cardName" class="w250" placeholder="请输入卡券名称" @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-input v-model="listParams.nickName" class="w250" placeholder="请输入用户昵称" @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-checkbox class="vertical-middle" v-if="$store.state.marketing.isShowSelf" v-model="listParams.showSelfFlag" :true-label="1" :false-label="0" label="仅看本人" border @change="refresh" />
<el-button class="fr" type="primary" icon="iconfont icon-icon_yunxiazai fz14" @click="exportTemplateReceivedExcel"> 导出记录</el-button>
<el-button class="fr" type="primary" icon="iconfont icon-icon_yunxiazai fz14" v-if="$getButtonLimit($buttonCode.marketingGetCardLog)" :limit-code="$buttonCode.marketingGetCardLog" @click="exportTemplateReceivedExcel"> 导出记录</el-button>
</div>
<div class="filter--box">
<el-select class="dm-select pl10" v-model="listParams.cardType" placeholder="选择卡券类型" @change="refresh">
......
......@@ -10,7 +10,7 @@
<span class="gray fz12 ml5" style="display:inline-block;width:220px;line-height:18px;position:relative;top:8px">*查询全部卡券领取记录单次仅支持区间范围7天的查询,速度较慢,请耐心等候</span>
</div>
<div class="fr" style="position:relative;top:8px;">
<el-button type="primary" icon="iconfont icon-icon_yunxiazai fz14" @click="confirm.visible = true"> 导出记录</el-button>
<el-button type="primary" icon="iconfont icon-icon_yunxiazai fz14" v-if="$getButtonLimit($buttonCode.marketingDownloadGetLog)" :limit-code="$buttonCode.marketingDownloadGetLog" @click="confirm.visible = true"> 导出记录</el-button>
</div>
</div>
<div class="filter--box">
......@@ -95,8 +95,8 @@
<template slot-scope="scope">
<!-- 卡券类型为 e袋洗时 列表操作按钮 无手动核销按钮 -->
<template v-if="scope.row.canEdit !== false">
<el-button type="text" v-if="scope.row.status === 4 && Date.now() < scope.row.limitTime + 24 * 60 * 60 * 1000 && scope.row.gicCouponType !== 1" @click="orderData(scope.row)">核销</el-button>
<el-button type="text" v-if="scope.row.status === 4 && Date.now() < scope.row.limitTime + 24 * 60 * 60 * 1000" @click="delData(scope.row)">销毁</el-button>
<el-button type="text" v-if="$getButtonLimit($buttonCode.marketingOrderCard) && scope.row.status === 4 && Date.now() < scope.row.limitTime + 24 * 60 * 60 * 1000 && scope.row.gicCouponType !== 1" :limit-code="$buttonCode.marketingOrderCard" @click="orderData(scope.row)">核销</el-button>
<el-button type="text" v-if="$getButtonLimit($buttonCode.marketingDestoryCard) && scope.row.status === 4 && Date.now() < scope.row.limitTime + 24 * 60 * 60 * 1000" :limit-code="$buttonCode.marketingDestoryCard" @click="delData(scope.row)">销毁</el-button>
</template>
</template>
</el-table-column>
......
......@@ -6,7 +6,7 @@
<el-option label="投放失败" :value="0"></el-option>
</el-select>
<el-input class="w250" v-model="listParams.search" placeholder="输入会员姓名/卡号" @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button icon="iconfont icon-icon_yunxiazai fz14" class="fr" type="primary" @click="exportRecordSendInfoEvaluate"> 下载Excel</el-button>
<el-button icon="iconfont icon-icon_yunxiazai fz14" class="fr" type="primary" v-if="$getButtonLimit($buttonCode.marketingDownloadSendLog)" :limit-code="$buttonCode.marketingDownloadSendLog" @click="exportRecordSendInfoEvaluate"> 下载Excel</el-button>
</div>
<div class="filter--box pl10" v-show="listParams.putonType === 1">
<el-select class="vertical-middle w150" v-model="listParams.cardStatus" placeholder="投放状态" @change="getTableList">
......
......@@ -48,8 +48,8 @@
<el-button type="text" v-if="scope.row.putonStatus === 2 || scope.row.putonStatus === 3" @click="$router.push('/card/groupinfo/' + scope.row.putonId)">详情</el-button>
<el-button type="text" v-if="scope.row.putonStatus !== 2 && scope.row.putonStatus !== 3 && scope.row.canEdit !== false && scope.row.putonStatus !== 5 && scope.row.putonStatus !== 6" @click="$router.push('/card/groupsend/' + scope.row.putonId)">编辑</el-button>
<el-button type="text" v-if="scope.row.putonTime > nowDate" @click="$router.push('/card/record/sendInfo/' + scope.row.putonId)">记录</el-button>
<dm-delete v-if="scope.row.putonStatus !== 2 && scope.row.canEdit !== false" @confirm="delData(scope.row)" tips="是否删除该投放记录?">
<el-button type="text">删除</el-button>
<dm-delete v-if="$getButtonLimit($buttonCode.marketingDelSendLog) && scope.row.putonStatus !== 2 && scope.row.canEdit !== false" @confirm="delData(scope.row)" tips="是否删除该投放记录?">
<el-button type="text" :limit-code="$buttonCode.marketingDelSendLog">删除</el-button>
</dm-delete>
</template>
</el-table-column>
......
......@@ -3,7 +3,7 @@
<div class="pb22 clearfix">
<el-date-picker class="w250" v-model="dateTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="refresh"></el-date-picker>
<el-input v-model="listParams.search" class="w300" placeholder="卡券名称/卡券代码/会员信息" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button class="fr" type="primary" @click="exportExcel" icon="iconfont icon-icon_yunxiazai fz14"> 下载Excel</el-button>
<el-button class="fr" type="primary" v-if="$getButtonLimit($buttonCode.marketingDownloadRefundLog)" :limit-code="$buttonCode.marketingDownloadRefundLog" @click="exportExcel" icon="iconfont icon-icon_yunxiazai fz14"> 下载Excel</el-button>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%">
<el-table-column :show-overflow-tooltip="true" width="100" align="left" prop="sendBackTime" label="退券时间">
......
......@@ -12,7 +12,7 @@
</el-select>
<div class="fr">
<el-button type="primary" @click="codeVisible = true">兑换链接</el-button>
<el-button type="primary" @click="$router.push('/cdKey/add')">新建兑换码</el-button>
<el-button type="primary" v-if="$getButtonLimit($buttonCode.marketingAddCdkey)" :limit-code="$buttonCode.marketingAddCdkey" @click="$router.push('/cdKey/add')">新建兑换码</el-button>
</div>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%">
......@@ -48,13 +48,13 @@
</el-table-column>
<el-table-column label="操作" align="left" width="160px" fixed="right">
<template slot-scope="scope">
<el-button type="text" v-if="scope.row.cdkeyPlanStatus == 1" @click="$router.push('/cdKey/edit/' + scope.row.cdkeyPlanId)">编辑</el-button>
<el-button type="text" v-if="$getButtonLimit($buttonCode.marketingEditCdkey) && scope.row.cdkeyPlanStatus == 1" :limit-code="$buttonCode.marketingEditCdkey" @click="$router.push('/cdKey/edit/' + scope.row.cdkeyPlanId)">编辑</el-button>
<el-button type="text" v-if="scope.row.cdkeyPlanStatus != 1" @click="$router.push('/cdKey/info/' + scope.row.cdkeyPlanId)">详情</el-button>
<dm-delete v-if="scope.row.cdkeyPlanStatus == 2" @confirm="invalidData(scope.row)" tips="是否禁用该条数据?">
<el-button type="text">禁用</el-button>
<dm-delete v-if="$getButtonLimit($buttonCode.marketingDisableCdkey) && scope.row.cdkeyPlanStatus == 2" @confirm="invalidData(scope.row)" tips="是否禁用该条数据?">
<el-button type="text" :limit-code="$buttonCode.marketingDisableCdkey">禁用</el-button>
</dm-delete>
<dm-delete v-if="scope.row.cdkeyPlanStatus == 1" @confirm="delData(scope.row)" tips="是否删除该条数据?">
<el-button type="text">删除</el-button>
<dm-delete v-if="$getButtonLimit($buttonCode.marketingDelCdkey) && scope.row.cdkeyPlanStatus == 1" @confirm="delData(scope.row)" tips="是否删除该条数据?">
<el-button type="text" :limit-code="$buttonCode.marketingDelCdkey">删除</el-button>
</dm-delete>
</template>
</el-table-column>
......
......@@ -10,7 +10,7 @@
<el-option label="已删除" :value="0"></el-option>
</el-select>
<!-- <el-button type="text" @click="goHistory"> 历史记录</el-button> -->
<el-button icon="iconfont icon-icon_yunxiazai" class="fr" type="primary" @click="exportCurrentSendDetails"> 导出列表</el-button>
<el-button icon="iconfont icon-icon_yunxiazai" class="fr" type="primary" v-if="buttonLimit" :limit-code="buttonCode" @click="exportCurrentSendDetails"> 导出列表</el-button>
</div>
<div class="dm-wrap">
<el-table ref="multipleTable" tooltipEffect="light" :data="infoList" style="width: 100%" @selection-change="handleSelectionChange">
......@@ -102,6 +102,14 @@ export default {
type: Boolean
}
},
computed: {
buttonLimit() {
return this.$getButtonLimit(this.buttonCode);
},
buttonCode() {
return this.isComponet ? this.$buttonCode.marketingDownloadSecmLog : this.$buttonCode.marketingDownloadEcmLog;
}
},
data() {
return {
dateTime: [Date.now() - 30 * 24 * 60 * 60 * 1000, Date.now()],
......
......@@ -992,7 +992,6 @@ export default {
this.loading = true;
saveEcmInfo(params)
.then(res => {
this.loading = false;
if (res.errorCode === 0) {
if (this.isEdit) {
this.$confirm('操作成功, 是否返回列表?', '提示', {
......@@ -1004,12 +1003,14 @@ export default {
this.$router.push('/ecm/list');
})
.catch(err => {
this.loading = false;
this.getEcmInfo();
});
} else {
this.$router.push('/ecm/list');
}
} else {
this.loading = false;
this.$tips({ type: 'error', message: res.message || '操作失败' });
}
})
......
......@@ -19,7 +19,7 @@
<el-button type="primary" @click="resetFilter" :disabled="resetDisable">重置</el-button>
<!-- <el-checkbox class="vertical-middle" v-if="$store.state.marketing.isShowSelf" v-model="listParams.showSelfFlag" :true-label="1" :false-label="0" label="仅看本人" border @change="search" /> -->
<!-- <el-date-picker v-model="dateTime" style="width:250px" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="search"></el-date-picker> -->
<el-button class="fr" type="primary" @click="$router.push('/ecm/add')">新建计划</el-button>
<el-button class="fr" type="primary" v-if="$getButtonLimit($buttonCode.marketingAddEcm)" :limit-code="$buttonCode.marketingAddEcm" @click="$router.push('/ecm/add')">新建计划</el-button>
<el-tooltip class="fr" content="只记录删除计划或编辑“进行中”计划的操作日志" placement="top" open-delay="200">
<el-button style="margin-right:10px" @click="$router.push('/ecm/log')">操作日志</el-button>
</el-tooltip>
......@@ -88,7 +88,7 @@
<el-table-column label="操作" align="left" width="200" fixed="right">
<template slot-scope="scope">
<!-- <template v-if="scope.row.canEdit !== false"> -->
<el-button type="text" v-if="scope.row.canEdit && scope.row.onlineStatus != 2 && scope.row.effectType != 2" @click="editData(scope.row)">编辑</el-button>
<el-button type="text" v-if="$getButtonLimit($buttonCode.marketingEditEcm) && scope.row.canEdit && scope.row.onlineStatus != 2 && scope.row.effectType != 2" :limit-code="$buttonCode.marketingEditEcm" @click="editData(scope.row)">编辑</el-button>
<el-button type="text" v-else @click="$router.push(`/ecm/info/${scope.row.ecmPlanId}`)">详情</el-button>
<!-- </template> -->
<!-- <dm-delete v-if="scope.row.effectType !== 2 && scope.row.onlineStatus === 1 && scope.row.canEdit !== false" @confirm="offlineEcmPlan(scope.row)" tips="是否下线该计划?">
......@@ -103,12 +103,12 @@
</template> -->
<!-- <el-button type="text" @click="toRecord(scope.row)">记录</el-button>
<el-button type="text" @click="toTouch(scope.row)" v-if="xsxsFlag && isOpenFlag(scope.row.analyseJson)">触达效果</el-button> -->
<el-dropdown style="margin-left:8px" trigger="click" @command="onCommand($event, scope.row)">
<el-dropdown style="margin-left:8px" trigger="click" @command="onCommand($event, scope.row)" v-if="($getButtonLimit($buttonCode.marketingDelEcm) && scope.row.putonStatus !== 2 && scope.row.canEdit !== false) || ($getButtonLimit($buttonCode.marketingOutlineEcm) && scope.row.effectType !== 2 && scope.row.onlineStatus === 1 && scope.row.canEdit !== false) || (xsxsFlag && isOpenFlag(scope.row.analyseJson))">
<el-button type="text">更多<i class="el-icon-arrow-down el-icon--right"></i></el-button>
<el-dropdown-menu slot="dropdown">
<!-- <el-dropdown-item :command="1">记录</el-dropdown-item> -->
<el-dropdown-item v-if="scope.row.putonStatus !== 2 && scope.row.canEdit !== false" :command="1">删除</el-dropdown-item>
<el-dropdown-item v-if="scope.row.effectType !== 2 && scope.row.onlineStatus === 1 && scope.row.canEdit !== false" @confirm="offlineEcmPlan(scope.row)" :command="2">下线</el-dropdown-item>
<el-dropdown-item v-if="$getButtonLimit($buttonCode.marketingDelEcm) && scope.row.putonStatus !== 2 && scope.row.canEdit !== false" :limit-code="$buttonCode.marketingDelEcm" :command="1">删除</el-dropdown-item>
<el-dropdown-item v-if="$getButtonLimit($buttonCode.marketingOutlineEcm) && scope.row.effectType !== 2 && scope.row.onlineStatus === 1 && scope.row.canEdit !== false" :limit-code="$buttonCode.marketingOutlineEcm" @confirm="offlineEcmPlan(scope.row)" :command="2">下线</el-dropdown-item>
<el-dropdown-item v-if="xsxsFlag && isOpenFlag(scope.row.analyseJson)" :command="3">触达效果</el-dropdown-item>
<!-- <el-dropdown-item :command="4">复制新建</el-dropdown-item> -->
</el-dropdown-menu>
......
......@@ -486,7 +486,7 @@ export default {
// return;
// }
// 判断是否欠费
if (v.value === 'message' && this.checkAccountState()) return;
// if (v.value === 'message' && this.checkAccountState()) return;
this.dialogCom = 'lib-' + v.value;
// 新增的时候设置为空对象
this.currentItem = {};
......
......@@ -5,8 +5,8 @@
<el-input v-model="listParams.searchName" class="w200" placeholder="输入计划名称" clearable @change="search"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-checkbox class="vertical-middle" v-if="$store.state.marketing.isShowSelf" v-model="listParams.showSelfFlag" :true-label="1" :false-label="0" label="仅看本人" border @change="search" />
<div class="fr">
<el-button @click="$router.push('/scan/history-list')">查看历史计划</el-button>
<el-button type="primary" @click="$router.push('/scan/add')" :disabled="total >= 10">新建计划({{ total }}/10)</el-button>
<el-button v-if="$getButtonLimit($buttonCode.marketingHistorySecm)" :limit-code="$buttonCode.marketingHistorySecm" @click="$router.push('/scan/history-list')">查看历史计划</el-button>
<el-button v-if="$getButtonLimit($buttonCode.marketingAddSecm)" :limit-code="$buttonCode.marketingAddSecm" type="primary" @click="$router.push('/scan/add')" :disabled="total >= 10">新建计划({{ total }}/10)</el-button>
</div>
</div>
<el-alert class="mb10 inline-block" title="" type="warning" :closable="false">
......@@ -30,7 +30,7 @@
<transition-group type="transition">
<div class="td" v-for="(item, key) in tableList" :key="item.ecmPlanId" @mouseover="hoverIdx = item.ecmPlanId" @mouseout="hoverIdx = -1" :class="{ active: hoverIdx === item.ecmPlanId }">
<el-row>
<el-col :span="1"><i class="iconfont icon-paixu1 slideIcon place-font-color cursor fz12"></i></el-col>
<el-col :span="1" v-if="$getButtonLimit($buttonCode.marketingSortSecm)" :limit-code="$buttonCode.marketingSortSecm"><i class="iconfont icon-paixu1 slideIcon place-font-color cursor fz12"></i></el-col>
<el-col :span="2">{{ key + 1 }}</el-col>
<el-col :span="2">{{ item.ecmPlanName }}</el-col>
<el-col :span="4">
......@@ -54,14 +54,14 @@
<el-col :span="4">
<el-button type="text" @click="toRecord(item)">记录</el-button>
<template v-if="item.canEdit !== false">
<el-button type="text" v-if="item.effectType == 0 || item.effectType == 1" @click="editData(item)">编辑</el-button>
<el-button type="text" v-if="$getButtonLimit($buttonCode.marketingEditSecm) && (item.effectType == 0 || item.effectType == 1)" :limit-code="$buttonCode.marketingEditSecm" @click="editData(item)">编辑</el-button>
<!-- <el-button type="text" v-if="item.effectType == 2" @click="$router.push(`/scan/info/${item.ecmPlanId}`)">详情</el-button> -->
</template>
<dm-delete v-if="item.effectType !== 2 && item.onlineStatus === 1 && item.canEdit !== false" @confirm="offlineEcmPlan(item)" tips="是否下线该计划?">
<el-button type="text">下线</el-button>
<dm-delete v-if="$getButtonLimit($buttonCode.marketingOutlineSecm) && item.effectType !== 2 && item.onlineStatus === 1 && item.canEdit !== false" @confirm="offlineEcmPlan(item)" tips="是否下线该计划?">
<el-button type="text" :limit-code="$buttonCode.marketingOutlineSecm">下线</el-button>
</dm-delete>
<dm-delete v-if="item.putonStatus !== 2 && item.canEdit !== false" @confirm="delData(item)" tips="是否删除该计划?">
<el-button type="text">删除</el-button>
<dm-delete v-if="$getButtonLimit($buttonCode.marketingDelSecm) && item.putonStatus !== 2 && item.canEdit !== false" @confirm="delData(item)" tips="是否删除该计划?">
<el-button type="text" :limit-code="$buttonCode.marketingDelSecm">删除</el-button>
</dm-delete>
</el-col>
</el-row>
......@@ -238,7 +238,8 @@ export default {
dragOptions() {
return {
animation: 300,
ghostClass: 'ghost'
ghostClass: 'ghost',
disabled: !this.$getButtonLimit(this.$buttonCode.marketingSortSecm)
};
}
}
......
......@@ -4,8 +4,8 @@
<store-group width="240" class="pr5" :model="storeGroupData" @commit-store="getStoreGroup"></store-group>
<el-date-picker v-if="$route.meta.type !== 'bad'" class="w250" v-model="dateTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="refresh"></el-date-picker>
<el-input v-model="listParams.searchName" class="w350" placeholder="订单号/门店名称/会员姓名/卡号/导购名称" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button icon="iconfont icon-icon_yunxiazai fz14" v-if="$route.meta.type !== 'bad'" class="fr" type="primary" @click="exportLatestEvaluate"> 下载Excel</el-button>
<el-button icon="el-icon-setting fz14" class="fr mr10 setting" @click="auto.visible = true" type="primary"></el-button>
<el-button icon="iconfont icon-icon_yunxiazai fz14" v-if="$getButtonLimit($buttonCode.marketingEvaluationDownload) && $route.meta.type !== 'bad'" :limit-code="$buttonCode.marketingEvaluationDownload" class="fr" type="primary" @click="exportLatestEvaluate"> 下载Excel</el-button>
<el-button v-if="$getButtonLimit($buttonCode.marketingEvaluationNewestAuto)" :limit-code="$buttonCode.marketingEvaluationNewestAuto" icon="el-icon-setting fz14" class="fr mr10 setting" @click="auto.visible = true" type="primary"></el-button>
</div>
<div class="filter--box">
<el-select size="small" v-if="$route.meta.type === 'bad'" class="vertical-middle pl10 w150" v-model="badStatus" placeholder="选择差评类型" @change="$router.push('/evaluation/bad/' + badStatus)">
......@@ -19,11 +19,13 @@
<el-checkbox class="vertical-middle" size="small" border v-if="$route.meta.type !== 'bad'" :true-label="1" :false-label="0" v-model="listParams.hasReply" @change="refresh">有追评</el-checkbox>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%" element-loading-text="拼命加载中">
<el-table-column :show-overflow-tooltip="false" width="90" align="left" prop="showStatus" fixed="left" label="服务号显示">
<template slot-scope="scope">
<el-switch v-model="scope.row.showStatus" :active-value="1" :inactive-value="0" @change="changeShow(scope.row)"> </el-switch>
</template>
</el-table-column>
<template v-if="$getButtonLimit($buttonCode.marketingEvaluationNewestShow)">
<el-table-column :show-overflow-tooltip="false" width="90" align="left" prop="showStatus" fixed="left" label="服务号显示">
<template slot-scope="scope">
<el-switch :limit-code="$buttonCode.marketingEvaluationNewestShow" v-model="scope.row.showStatus" :active-value="1" :inactive-value="0" @change="changeShow(scope.row)"> </el-switch>
</template>
</el-table-column>
</template>
<el-table-column :show-overflow-tooltip="false" width="160" align="left" prop="createTime" label="首次评价时间">
<template slot-scope="scope">
<p>{{ formatDateTimeByType(scope.row.createTime, 'yyyy-MM-dd-HH-mm') }}</p>
......@@ -74,24 +76,25 @@
</el-popover>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" width="80" align="center" prop="replyStatus" label="回复">
<template slot-scope="scope">
<el-button type="text" @click="replyData(scope.row)">
<template v-if="scope.row.replyStatus !== 1 && scope.row.content">
立即回复
</template>
<i v-if="scope.row.replyStatus === 1" class="el-icon-message fz20 danger-color cursor"></i>
</el-button>
</template>
</el-table-column>
<template v-if="$getButtonLimit($buttonCode.marketingEvaluationNewestReply)">
<el-table-column :show-overflow-tooltip="false" width="80" align="center" prop="replyStatus" label="回复">
<template slot-scope="scope">
<el-button :limit-code="$buttonCode.marketingEvaluationNewestReply" type="text" @click="replyData(scope.row)">
<template v-if="scope.row.replyStatus !== 1 && scope.row.content">
立即回复
</template>
<i v-if="scope.row.replyStatus === 1" class="el-icon-message fz20 danger-color cursor"></i>
</el-button>
</template>
</el-table-column>
</template>
<el-table-column label="操作" align="left" width="140px" fixed="right">
<template slot-scope="scope">
<span class="fz13" v-if="scope.row.isBad === 0">好评</span>
<span class="fz13" v-if="scope.row.visiteStatus === 0 && scope.row.isBad === 1">
<el-button type="text" @click="allocateData(scope.row)">分配</el-button>
<el-button type="text" @click="disAllocateData(scope.row)">不分配</el-button>
<span class="fz13" v-if="$getButtonLimit($buttonCode.marketingEvaluationNewestAssign) && scope.row.visiteStatus === 0 && scope.row.isBad === 1">
<el-button :limit-code="$buttonCode.marketingEvaluationNewestAssign" type="text" @click="allocateData(scope.row)">分配</el-button>
<el-button :limit-code="$buttonCode.marketingEvaluationNewestAssign" type="text" @click="disAllocateData(scope.row)">不分配</el-button>
</span>
<span class="fz13" v-if="scope.row.visiteStatus === 1">已分配</span>
<span class="fz13" v-if="scope.row.visiteStatus === 2">回访结束 <el-button type="text" @click="teleData(scope.row)">查看话务分配</el-button></span>
......
......@@ -8,7 +8,7 @@
<el-date-picker class="w250" v-model="dateTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="search"></el-date-picker>
<el-input v-model="listParams.storeSearch" class="w200" placeholder="门店名称/code" clearable @change="search"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-input v-model="listParams.memberSearch" class="w200" placeholder="会员昵称/手机号" clearable @change="search"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button icon="iconfont icon-icon_yunxiazai fz14" class="fr" type="primary" @click="exportSuggestionExcel"> 下载Excel</el-button>
<el-button v-if="$getButtonLimit($buttonCode.marketingEvaluationSuggestionExc)" :limit-code="$buttonCode.marketingEvaluationSuggestionExc" icon="iconfont icon-icon_yunxiazai fz14" class="fr" type="primary" @click="exportSuggestionExcel"> 下载Excel</el-button>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%" element-loading-text="拼命加载中">
<el-table-column :show-overflow-tooltip="true" min-width="120" align="left" :key="Math.random()" prop="createTime" label="评价时间">
......@@ -45,7 +45,7 @@
</el-table-column>
<el-table-column label="操作" align="left" width="140px" fixed="right">
<template slot-scope="scope">
<el-button type="text" v-if="scope.row.status === 1" @click="$router.push('/evaluation/suggestion/' + scope.row.problemId)">立即处理</el-button>
<el-button type="text" v-if="$getButtonLimit($buttonCode.marketingEvaluationsuggestionEdi) && scope.row.status === 1" :limit-code="$buttonCode.marketingEvaluationsuggestionEdi" @click="$router.push('/evaluation/suggestion/' + scope.row.problemId)">立即处理</el-button>
<el-button type="text" v-else-if="scope.row.status === 4" @click="$router.push('/evaluation/suggestion/info/' + scope.row.problemId)">已解决</el-button>
<span type="text" v-else>--</span>
</template>
......
......@@ -13,7 +13,7 @@
</el-select>
<el-input :disabled="!ewashDisable" v-model="listParams.searchParam" class="w200 vertical-middle" placeholder="输入卡券名称/备注" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<div class="fr">
<el-button type="primary" @click="addCard" :disabled="!ewashDisable">新增卡券</el-button>
<el-button v-if="$getButtonLimit($buttonCode.marketingAddEwash)" :limit-code="$buttonCode.marketingAddEwash" type="primary" @click="addCard" :disabled="!ewashDisable">新增卡券</el-button>
</div>
</div>
<ul class="clearfix" element-loading-text="拼命加载中">
......
......@@ -56,7 +56,7 @@
<div class="card-item_foot clearfix">
<div class="fl">
<span v-if="item.auditingStatus !== -1"
>剩余库存:{{ item.couponStock }} <a title="编辑库存" v-if="!shelfFlag && item.useCustomCode === 0 && item.canEdit !== false" @click="preAdjustStock(item)"><i class="el-icon-edit"></i></a
>剩余库存:{{ item.couponStock }} <a title="编辑库存" v-if="$getButtonLimit($buttonCode.marketingEditEwashStock) && !shelfFlag && item.useCustomCode === 0 && item.canEdit !== false" :limit-code="$buttonCode.marketingEditEwashStock" @click="preAdjustStock(item)"><i class="el-icon-edit"></i></a
></span>
</div>
<render-temp v-if="!shelfFlag" :item="item" @handler="handler"></render-temp>
......
......@@ -9,13 +9,14 @@ export default Vue.component('render-temp', {
}
},
render(h) {
const { $getButtonLimit, $buttonCode } = this;
const canEdit = this.item.canEdit !== false; // 只有canEdit === false 才证明不能使用 没有权限仅可以详情/报表
// 当前卡券是否 是长期有效||在投放有效期内
// putEffectiveMode 0:固定日期,1:长期
const canGroupSend = this.item.putEffectiveMode == 1 ? true : new Date() > new Date(this.item.putBeginDate) && new Date() < new Date(this.item.putEndDate);
const bind1 =
canEdit && canGroupSend ? (
<a title="投放" onClick={this.handler.bind(null, 1)}>
$getButtonLimit($buttonCode.marketingSendEwash) && canEdit && canGroupSend ? (
<a title="投放" limit-code={$buttonCode.marketingSendEwash} onClick={this.handler.bind(null, 1)}>
<i class="iconfont icon-daohang-" />
</a>
) : (
......@@ -26,30 +27,34 @@ export default Vue.component('render-temp', {
<i class="el-icon-tickets" />
</a>
);
const bind3 = (
<a title="编辑" onClick={this.handler.bind(null, 3)}>
const bind3 = $getButtonLimit($buttonCode.marketingEditEwash) ? (
<a title="编辑" limit-code={$buttonCode.marketingEditEwash} onClick={this.handler.bind(null, 3)}>
<i class="el-icon-edit" />
</a>
);
const bind4 = canEdit ? (
<a title="删除" onClick={this.handler.bind(null, 4)}>
<i class="el-icon-delete" />
</a>
) : (
''
);
const bind4 =
$getButtonLimit($buttonCode.marketingDelEwash) && canEdit ? (
<a title="删除" limit-code={$buttonCode.marketingDelEwash} onClick={this.handler.bind(null, 4)}>
<i class="el-icon-delete" />
</a>
) : (
''
);
const bind5 = (
<a title="详情" onClick={this.handler.bind(null, 5)}>
<i class="el-icon-document" />
</a>
);
const bind6 = canEdit ? (
<a title="复制" onClick={this.handler.bind(null, 6)}>
<i class="iconfont icon-wxcard-copy" />
</a>
) : (
''
);
const bind6 =
$getButtonLimit($buttonCode.marketingCopyEwash) && canEdit ? (
<a title="复制" limit-code={$buttonCode.marketingCopyEwash} onClick={this.handler.bind(null, 6)}>
<i class="iconfont icon-wxcard-copy" />
</a>
) : (
''
);
const bind7 = canEdit ? (
<a style="position:relative;top:1px" title="领取记录" onClick={this.handler.bind(null, 7)}>
......
......@@ -3,8 +3,8 @@
<div class="clearfix pb22">
<el-input v-model="listParams.searchParam" class="w300" placeholder="输入门店名称/code进行搜索" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<div class="fr">
<el-button type="primary" @click="$router.push('/ewash/statements')" :disabled="!ewashDisable">查看账单</el-button>
<el-button type="primary" @click="handleDialogShow" :disabled="!ewashDisable">创建子账户</el-button>
<el-button v-if="$getButtonLimit($buttonCode.marketingCheckEwash)" :limit-code="$buttonCode.marketingCheckEwash" type="primary" @click="$router.push('/ewash/statements')" :disabled="!ewashDisable">查看账单</el-button>
<el-button v-if="$getButtonLimit($buttonCode.marketingAddEwashAccount)" :limit-code="$buttonCode.marketingAddEwashAccount" type="primary" @click="handleDialogShow" :disabled="!ewashDisable">创建子账户</el-button>
</div>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%">
......@@ -16,7 +16,7 @@
</el-table-column>
<el-table-column label="当前余额" align="left" width="120" prop="storeBalance">
<template slot-scope="scope">
<el-button type="text" @click="getYue(scope.row)" v-if="!scope.row.balance">获取余额</el-button>
<el-button type="text" v-if="$getButtonLimit($buttonCode.marketingEwashBalance) && !scope.row.balance" :limit-code="$buttonCode.marketingEwashBalance" @click="getYue(scope.row)">获取余额</el-button>
{{ scope.row.balance }}
</template>
</el-table-column>
......
......@@ -6,7 +6,7 @@
</el-select>
<el-input v-model="listParams.searchParam" class="w200" placeholder="输入游戏名称" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-checkbox class="vertical-middle ml0" v-if="$store.state.marketing.isShowSelf" v-model="listParams.showSelfFlag" :true-label="1" :false-label="0" label="仅看本人" border @change="refresh" />
<el-button class="fr" type="primary" @click="$router.push('/game/dzp/add')">新建游戏</el-button>
<el-button class="fr" type="primary" v-if="$getButtonLimit($buttonCode.marketingAddDzp)" :limit-code="$buttonCode.marketingAddDzp" @click="$router.push('/game/dzp/add')">新建游戏</el-button>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width:100%">
......@@ -21,10 +21,10 @@
<template slot-scope="scope">
<el-button type="text" @click="setLinks(scope.row, 1)">链接</el-button>
<el-button type="text" @click="$router.push('/game/dzp/record/' + scope.row.gameId)">中奖记录</el-button>
<el-button type="text" @click="$router.push('/game/dzp/edit/' + scope.row.gameId)" v-if="scope.row.canEdit && scope.row.gameStatus != '3'">编辑</el-button>
<el-button type="text" @click="$router.push('/game/dzp/edit/' + scope.row.gameId)" v-if="$getButtonLimit($buttonCode.marketingEditDzp) && scope.row.canEdit && scope.row.gameStatus != '3'" :limit-code="$buttonCode.marketingEditDzp">编辑</el-button>
<el-button type="text" @click="$router.push('/game/dzp/detail/' + scope.row.gameId)" v-else>详情</el-button>
<dm-delete @confirm="delData(scope.row)" v-if="scope.row.canEdit !== false" tips="是否删除该游戏?">
<el-button type="text">删除</el-button>
<dm-delete @confirm="delData(scope.row)" v-if="$getButtonLimit($buttonCode.marketingDelDzp) && scope.row.canEdit !== false" tips="是否删除该游戏?">
<el-button type="text" :limit-code="$buttonCode.marketingDelDzp">删除</el-button>
</dm-delete>
</template>
</el-table-column>
......
......@@ -7,7 +7,7 @@
<el-date-picker :clearable="false" :default-time="['00:00:00', '23:59:59']" class="w400" v-model="dateTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="loadLotteryRecordList"></el-date-picker>
<el-input v-model="listParams.searchParam" class="w200" placeholder="会员昵称/手机号/卡号" clearable @change="loadLotteryRecordList"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-checkbox border class="pl10" v-model="listParams.freeFlag" :true-label="1" :false-label="0" @change="loadLotteryRecordList">免费抽奖</el-checkbox>
<el-button :disabled="disabledDownload" icon="iconfont icon-icon_yunxiazai fz14 mr5" type="primary" class="fr" @click="exportLotteryExcel">
<el-button v-if="$getButtonLimit($buttonCode.marketingDownloadDzpRecord)" :limit-code="$buttonCode.marketingDownloadDzpRecord" :disabled="disabledDownload" icon="iconfont icon-icon_yunxiazai fz14 mr5" type="primary" class="fr" @click="exportLotteryExcel">
<el-tooltip :open-delay="300" :content="tips" effect="dark" v-if="disabledDownload">
<span>下载Excel</span>
</el-tooltip>
......
......@@ -6,7 +6,7 @@
</el-select>
<el-input v-model="listParams.searchParam" class="w200" placeholder="输入游戏名称" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-checkbox class="vertical-middle ml0" v-if="$store.state.marketing.isShowSelf" v-model="listParams.showSelfFlag" :true-label="1" :false-label="0" label="仅看本人" border @change="refresh" />
<el-button class="fr" type="primary" @click="$router.push('/game/ggk/add')">新建游戏</el-button>
<el-button class="fr" type="primary" v-if="$getButtonLimit($buttonCode.marketingAddGgk)" :limit-code="$buttonCode.marketingAddGgk" @click="$router.push('/game/ggk/add')">新建游戏</el-button>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%">
......@@ -21,10 +21,10 @@
<template slot-scope="scope">
<el-button type="text" @click="setLinks(scope.row, 2)">链接</el-button>
<el-button type="text" @click="$router.push('/game/ggk/record/' + scope.row.gameId)">中奖记录</el-button>
<el-button type="text" @click="$router.push('/game/ggk/edit/' + scope.row.gameId)" v-if="scope.row.canEdit && scope.row.gameStatus != '3'">编辑</el-button>
<el-button type="text" @click="$router.push('/game/ggk/edit/' + scope.row.gameId)" v-if="$getButtonLimit($buttonCode.marketingEditGgk) && scope.row.canEdit && scope.row.gameStatus != '3'" :limit-code="$buttonCode.marketingEditGgk">编辑</el-button>
<el-button type="text" @click="$router.push('/game/ggk/detail/' + scope.row.gameId)" v-else>详情</el-button>
<dm-delete @confirm="delData(scope.row)" v-if="scope.row.canEdit !== false" tips="是否删除该游戏?">
<el-button type="text">删除</el-button>
<dm-delete @confirm="delData(scope.row)" v-if="$getButtonLimit($buttonCode.marketingDelGgk) && scope.row.canEdit !== false" tips="是否删除该游戏?">
<el-button type="text" :limit-code="$buttonCode.marketingDelGgk">删除</el-button>
</dm-delete>
</template>
</el-table-column>
......
......@@ -7,7 +7,7 @@
<el-date-picker :clearable="false" :default-time="['00:00:00', '23:59:59']" class="w400" v-model="dateTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="loadLotteryRecordList"></el-date-picker>
<el-input v-model="listParams.searchParam" class="w200" placeholder="会员昵称/手机号/卡号" clearable @change="loadLotteryRecordList"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-checkbox border class="pl10" v-model="listParams.freeFlag" :true-label="1" :false-label="0" @change="loadLotteryRecordList">免费抽奖</el-checkbox>
<el-button :disabled="disabledDownload" icon="iconfont icon-icon_yunxiazai fz14 mr5" type="primary" class="fr" @click="exportLotteryExcel">
<el-button v-if="$getButtonLimit($buttonCode.marketingDownloadGgkRecord)" :limit-code="$buttonCode.marketingDownloadGgkRecord" :disabled="disabledDownload" icon="iconfont icon-icon_yunxiazai fz14 mr5" type="primary" class="fr" @click="exportLotteryExcel">
<el-tooltip :open-delay="300" :content="tips" effect="dark" v-if="disabledDownload">
<span>下载Excel</span>
</el-tooltip>
......
......@@ -7,7 +7,7 @@
<el-input v-model="listParams.searchParam" class="w200" placeholder="输入游戏名称" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-checkbox class="vertical-middle ml0" v-if="$store.state.marketing.isShowSelf" v-model="listParams.showSelfFlag" :true-label="1" :false-label="0" label="仅看本人" border @change="refresh" />
<!-- <el-button class="fr" icon="iconfont icon-icon_yunxiazai fz14" @click="downLoadQr"> 下载二维码 </el-button> -->
<el-button class="fr" type="primary" @click="$router.push('/game/klfl/add')">新建游戏</el-button>
<el-button class="fr" type="primary" v-if="$getButtonLimit($buttonCode.marketingAddKlfl)" :limit-code="$buttonCode.marketingAddKlfl" @click="$router.push('/game/klfl/add')">新建游戏</el-button>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%">
......@@ -23,10 +23,10 @@
<template slot-scope="scope">
<el-button type="text" @click="setLinks(scope.row, 5)">链接</el-button>
<el-button type="text" v-if="scope.row.sendStatus !== 0" @click="$router.push('/game/klfl/record/' + scope.row.gameActivityId)">中奖记录</el-button>
<el-button type="text" v-if="scope.row.canEdit && (scope.row.activityStatus === 0 || scope.row.activityStatus === 1)" @click="$router.push('/game/klfl/edit/' + scope.row.gameActivityId)">编辑</el-button>
<el-button type="text" v-if="$getButtonLimit($buttonCode.marketingEditKlfl) && scope.row.canEdit && (scope.row.activityStatus === 0 || scope.row.activityStatus === 1)" :limit-code="$buttonCode.marketingEditKlfl" @click="$router.push('/game/klfl/edit/' + scope.row.gameActivityId)">编辑</el-button>
<el-button type="text" v-else @click="$router.push('/game/klfl/info/' + scope.row.gameActivityId)">详情</el-button>
<dm-delete @confirm="delData(scope.row)" tips="是否删除该游戏?" v-if="scope.row.canEdit !== false">
<el-button type="text">删除</el-button>
<dm-delete @confirm="delData(scope.row)" tips="是否删除该游戏?" v-if="$getButtonLimit($buttonCode.marketingDelKlfl) && scope.row.canEdit !== false">
<el-button type="text" :limit-code="$buttonCode.marketingDelKlfl">删除</el-button>
</dm-delete>
</template>
</el-table-column>
......
......@@ -9,7 +9,7 @@
</el-select>
<el-date-picker :clearable="false" @change="klflReportList" v-model="date" class="w250" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
<el-input v-model="listParams.searchParam" class="w200" placeholder="会员昵称/手机号/卡号" clearable @change="klflReportList"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button :disabled="disabledDownload" icon="iconfont icon-icon_yunxiazai fz14 mr5" type="primary" class="fr" @click="klflRecordExcel">
<el-button v-if="$getButtonLimit($buttonCode.marketingDownloadKlflRecord)" :limit-code="$buttonCode.marketingDownloadKlflRecord" :disabled="disabledDownload" icon="iconfont icon-icon_yunxiazai fz14 mr5" type="primary" class="fr" @click="klflRecordExcel">
<el-tooltip :open-delay="300" :content="tips" effect="dark" v-if="disabledDownload">
<span>下载Excel</span>
</el-tooltip>
......
......@@ -6,8 +6,8 @@
</el-select>
<el-input v-model="listParams.searchParam" class="w200" placeholder="输入游戏名称" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-checkbox class="vertical-middle ml0" v-if="$store.state.marketing.isShowSelf" v-model="listParams.showSelfFlag" :true-label="1" :false-label="0" label="仅看本人" border @change="refresh" />
<el-button class="fr" @click="configShow = true">拼图配置</el-button>
<el-button class="fr mr10" type="primary" @click="$router.push('/game/ptyx/add')">新建游戏</el-button>
<el-button class="fr" v-if="$getButtonLimit($buttonCode.marketingSetPtyx)" :limit-code="$buttonCode.marketingSetPtyx" @click="configShow = true">拼图配置</el-button>
<el-button class="fr mr10" type="primary" v-if="$getButtonLimit($buttonCode.marketingAddPtyx)" :limit-code="$buttonCode.marketingAddPtyx" @click="$router.push('/game/ptyx/add')">新建游戏</el-button>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%">
<el-table-column v-for="(v, i) in tableHeader" :fixed="v.fixed" :show-overflow-tooltip="v.tooltip" :width="v.width" :min-width="v.minWidth" :align="v.align" :key="i" :prop="v.prop" :label="v.label" :formatter="v.formatter">
......@@ -21,10 +21,10 @@
<template slot-scope="scope">
<el-button type="text" @click="setLinks(scope.row, 3)">链接</el-button>
<el-button type="text" v-if="scope.row.activityStatus !== 0" @click="$router.push('/game/ptyx/record/' + scope.row.gameActivityId)">记录</el-button>
<el-button type="text" v-if="scope.row.canEdit && (scope.row.activityStatus === 0 || scope.row.activityStatus === 1)" @click="$router.push('/game/ptyx/edit/' + scope.row.gameActivityId)">编辑</el-button>
<el-button type="text" v-if="$getButtonLimit($buttonCode.marketingEditPtyx) && scope.row.canEdit && (scope.row.activityStatus === 0 || scope.row.activityStatus === 1)" :limit-code="$buttonCode.marketingEditPtyx" @click="$router.push('/game/ptyx/edit/' + scope.row.gameActivityId)">编辑</el-button>
<el-button type="text" v-else @click="$router.push('/game/ptyx/query/' + scope.row.gameActivityId)">详情</el-button>
<dm-delete @confirm="delData(scope.row)" tips="是否删除该游戏?" v-if="scope.row.canEdit !== false">
<el-button type="text">删除</el-button>
<dm-delete @confirm="delData(scope.row)" tips="是否删除该游戏?" v-if="$getButtonLimit($buttonCode.marketingDelPtyx) && scope.row.canEdit !== false">
<el-button type="text" :limit-code="$buttonCode.marketingDelPtyx">删除</el-button>
</dm-delete>
</template>
</el-table-column>
......
......@@ -11,7 +11,7 @@
</el-select>
<!-- eslint-disable-next-line -->
<el-input v-model="listParams.searchParam" class="w200" placeholder="会员昵称/手机号/卡号" clearable @change="listParams.currentPage = 1;LoadPtyxRecordList()"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button :disabled="disabledDownload" icon="iconfont icon-icon_yunxiazai fz14 mr5" type="primary" class="fr" @click="exportPtyxExcel">
<el-button :disabled="disabledDownload" icon="iconfont icon-icon_yunxiazai fz14 mr5" type="primary" class="fr" v-if="$getButtonLimit($buttonCode.marketingDownloadPtyxRecord)" :limit-code="$buttonCode.marketingDownloadPtyxRecord" @click="exportPtyxExcel">
<el-tooltip :open-delay="300" :content="tips" effect="dark" v-if="disabledDownload">
<span>下载Excel</span>
</el-tooltip>
......
......@@ -6,7 +6,7 @@
</el-select>
<el-input v-model="listParams.searchParam" class="w200" placeholder="输入游戏名称" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-checkbox class="vertical-middle ml0" v-if="$store.state.marketing.isShowSelf" v-model="listParams.showSelfFlag" :true-label="1" :false-label="0" label="仅看本人" border @change="refresh" />
<el-button class="fr" type="primary" @click="$router.push('/game/znm/add')">新建游戏</el-button>
<el-button class="fr" type="primary" v-if="$getButtonLimit($buttonCode.marketingAddZnm)" :limit-code="$buttonCode.marketingAddZnm" @click="$router.push('/game/znm/add')">新建游戏</el-button>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%">
<el-table-column v-for="(v, i) in tableHeader" :fixed="v.fixed" :show-overflow-tooltip="v.tooltip" :width="v.width" :min-width="v.minWidth" :align="v.align" :key="i" :prop="v.prop" :label="v.label" :formatter="v.formatter">
......@@ -20,10 +20,10 @@
<template slot-scope="scope">
<el-button type="text" @click="setLinks(scope.row, 4)">链接</el-button>
<el-button type="text" v-if="scope.row.activityStatus !== 0" @click="$router.push('/game/znm/record/' + scope.row.gameActivityId)">记录</el-button>
<el-button type="text" v-if="scope.row.canEdit && (scope.row.activityStatus === 0 || scope.row.activityStatus === 1)" @click="$router.push('/game/znm/edit/' + scope.row.gameActivityId)">编辑</el-button>
<el-button type="text" v-if="$getButtonLimit($buttonCode.marketingEditZnm) && scope.row.canEdit && (scope.row.activityStatus === 0 || scope.row.activityStatus === 1)" :limit-code="$buttonCode.marketingEditZnm" @click="$router.push('/game/znm/edit/' + scope.row.gameActivityId)">编辑</el-button>
<el-button type="text" v-else @click="$router.push('/game/znm/info/' + scope.row.gameActivityId)">详情</el-button>
<dm-delete @confirm="delData(scope.row)" tips="是否删除该游戏?" v-if="scope.row.canEdit !== false">
<el-button type="text">删除</el-button>
<dm-delete @confirm="delData(scope.row)" tips="是否删除该游戏?" v-if="$getButtonLimit($buttonCode.marketingDelZnm) && scope.row.canEdit !== false">
<el-button type="text" :limit-code="$buttonCode.marketingDelZnm">删除</el-button>
</dm-delete>
</template>
</el-table-column>
......
......@@ -5,7 +5,7 @@
<el-tab-pane label="排行榜" name="first">
<div class="pb22 clearfix">
<el-input v-model="listParams.searchParam" class="w200" placeholder="会员昵称/手机号/卡号" clearable @change="znmReportList"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button :disabled="disabledDownload" icon="iconfont icon-icon_yunxiazai fz14 mr5" type="primary" class="fr" @click="znmRankExcel">
<el-button v-if="$getButtonLimit($buttonCode.marketingDownloadZnmRecord)" :limit-code="$buttonCode.marketingDownloadZnmRecord" :disabled="disabledDownload" icon="iconfont icon-icon_yunxiazai fz14 mr5" type="primary" class="fr" @click="znmRankExcel">
<el-tooltip :open-delay="300" :content="tips" effect="dark" v-if="disabledDownload">
<span>下载Excel</span>
</el-tooltip>
......
......@@ -73,7 +73,7 @@
<!-- <el-select class="dm-select" v-model="listParams.sendStatus" placeholder="选择发送状态" @change="LoadMessageDetailList"> <el-option v-for="(v, i) in sendStatusOptions" :key="i" :label="v.label" :value="v.value"></el-option></el-select> -->
<el-input v-model="listParams.memberName" class="w200" placeholder="客户昵称/手机号/卡号" clearable @change="LoadMessageDetailList"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-select class="dm-select" v-model="listParams.sendStatus" placeholder="所有提交状态" @change="LoadMessageDetailList" clearable> <el-option v-for="(v, i) in sendStatusOptions" :key="i" :label="v.label" :value="v.value"></el-option></el-select>
<el-button icon="iconfont icon-icon_yunxiazai fz14" type="primary" class="fr" @click="exportExcel"> 下载Excel</el-button>
<el-button icon="iconfont icon-icon_yunxiazai fz14" type="primary" class="fr" v-if="$getButtonLimit($buttonCode.marketingMessageDownload)" :limit-code="$buttonCode.marketingMessageDownload" @click="exportExcel"> 下载Excel</el-button>
</div>
<el-table tooltipEffect="light" :data="messageList" style="width: 100%" v-loading="messageLoading">
<el-table-column :min-width="150" align="left" label="客户信息">
......
......@@ -54,7 +54,7 @@
<!-- <el-select class="dm-select" v-model="listParams.sendStatus" placeholder="选择发送状态" @change="smsSmportPlanLogPage"> <el-option v-for="(v, i) in sendStatusOptions" :key="i" :label="v.label" :value="v.value"></el-option></el-select> -->
<el-input v-model="listParams.search" class="w200" placeholder="客户昵称/手机号/卡号" clearable @change="smsSmportPlanLogPage"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-select class="dm-select" v-model="listParams.sendStatus" placeholder="全部提交状态" @change="smsSmportPlanLogPage" clearable> <el-option v-for="(v, i) in sendStatusOptions" :key="i" :label="v.label" :value="v.value"></el-option></el-select>
<el-button icon="iconfont icon-icon_yunxiazai fz14" type="primary" class="fr" @click="exportExcel"> 下载Excel</el-button>
<el-button icon="iconfont icon-icon_yunxiazai fz14" type="primary" class="fr" v-if="$getButtonLimit($buttonCode.marketingMessageImportDownload)" :limit-code="$buttonCode.marketingMessageImportDownload" @click="exportExcel"> 下载Excel</el-button>
</div>
<el-table tooltipEffect="light" :data="messageList" style="width: 100%" v-loading="messageLoading">
<el-table-column min-width="150" align="left" label="客户信息">
......
......@@ -5,7 +5,7 @@
<el-date-picker class="w400 ml10" v-model="dateTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="refresh"></el-date-picker>
<span class="ml20">发送时间</span>
<el-date-picker class="w400 ml10" v-model="dateTime2" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="refresh"></el-date-picker>
<el-button class="fr" type="primary" @click="$router.push('/message/import-send/add')">导入群发</el-button>
<el-button class="fr" type="primary" v-if="$getButtonLimit($buttonCode.marketingMessageImport)" :limit-code="$buttonCode.marketingMessageImport" @click="$router.push('/message/import-send/add')">导入群发</el-button>
</div>
<div class="pb22 clearfix">
<el-select class="dm-select w160" v-model="listParams.sendStatus" clearable placeholder="所有状态" @change="refresh">
......@@ -31,6 +31,7 @@
</p>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="100" align="left" prop="creatorName" label="创建人"></el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="170" align="left" prop="smsContent" label="模板内容"></el-table-column>
<el-table-column min-width="120" align="left" prop="importCount" label="计划人数"></el-table-column>
<el-table-column min-width="120" align="left" prop="sendCount" label="送达人数"></el-table-column>
......
......@@ -8,7 +8,7 @@
<dm-activity-select class="vertical-middle w150 mr5" width="150" :actId.sync="listParams.marketingActivityId" onlySelect @actUpdate="refresh"></dm-activity-select>
<el-checkbox class="vertical-middle" v-if="$store.state.marketing.isShowSelf" v-model="listParams.showSelfFlag" :true-label="1" :false-label="0" label="仅看本人" border @change="refresh" />
<el-input v-model="listParams.search" class="w200" placeholder="输入模板名称/ID/内容" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button class="fr" type="primary" @click="$router.push('/message/record/add')">新建群发</el-button>
<el-button class="fr" type="primary" v-if="$getButtonLimit($buttonCode.marketingMessageAdd)" :limit-code="$buttonCode.marketingMessageAdd" @click="$router.push('/message/record/add')">新建群发</el-button>
<span v-if="quantity != -1" class="fr" style="color:#909399;padding:9px 30px 0 0;display:flex;align-items:center">
预估剩余条数
<span style="color:#303133;font-weight:700;margin:0 6px"> {{ quantity }} </span>
......@@ -41,8 +41,8 @@
<el-table-column label="操作" align="left" width="140px" fixed="right">
<template slot-scope="scope">
<el-button type="text" @click="$router.push('/message/record/detail/' + scope.row.smsId)">详情</el-button>
<dm-delete v-if="(scope.row.sendStatus == 4 || scope.row.sendStatus == 0) && scope.row.canEdit !== false" @confirm="invalidData(scope.row)" tips="是否禁用该发送记录?">
<el-button type="text">禁用</el-button>
<dm-delete v-if="$getButtonLimit($buttonCode.marketingMessageDisable) && (scope.row.sendStatus == 4 || scope.row.sendStatus == 0) && scope.row.canEdit !== false" @confirm="invalidData(scope.row)" tips="是否禁用该发送记录?">
<el-button type="text" :limit-code="$buttonCode.marketingMessageDisable">禁用</el-button>
</dm-delete>
</template>
</el-table-column>
......@@ -96,7 +96,7 @@ export default {
);
}
},
{ label: '发送人', prop: 'sendName', width: '100', tooltip: true, align: 'left' },
{ label: '创建人', prop: 'creatorName', width: '100', tooltip: true, align: 'left' },
{
label: '模板内容',
prop: 'templateContent',
......
......@@ -6,7 +6,7 @@
</el-select>
<el-date-picker class="w250" v-model="dateTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="search"></el-date-picker>
<el-input v-model="listParams.content" class="w200" placeholder="输入模板名称/内容" clearable @change="search"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button class="fr" type="primary" @click="addTemp">
<el-button class="fr" type="primary" v-if="$getButtonLimit($buttonCode.marketingTempAdd)" :limit-code="$buttonCode.marketingTempAdd" @click="addTemp">
新建短信模板<span>{{ usedCount }}/{{ allUsableCount }}</span>
</el-button>
<span class="fr pt10 pr20">
......@@ -28,8 +28,8 @@
<span>创建于 {{ formatDateTimeByType(v.createTime, 'yyyy-MM-dd-HH-mm-ss') }}</span>
</div>
<div class="fr">
<el-button type="text" v-if="v.auditStatus === 2" @click="$router.push('/message/temp/edit/' + v.gicSmsTemplateId)">修改</el-button>
<el-button type="text" @click="onDeleteData(v)">删除</el-button>
<el-button type="text" v-if="$getButtonLimit($buttonCode.marketingTempEdit) && v.auditStatus === 2" :limit-code="$buttonCode.marketingTempEdit" @click="$router.push('/message/temp/edit/' + v.gicSmsTemplateId)">修改</el-button>
<el-button type="text" v-if="$getButtonLimit($buttonCode.marketingTempDel)" :limit-code="$buttonCode.marketingTempDel" @click="onDeleteData(v)">删除</el-button>
<!-- <dm-delete @confirm="delData(v)" tips="模板删除后,所有引用此模板的短信都会停止发送,请确认。">
<el-button type="text">删除</el-button>
</dm-delete> -->
......
......@@ -10,7 +10,7 @@
</div>
<div class="msg-tips__right fr">
<span class="fz13 gray pr10" v-if="getTemflag && dateStr">最近一次获取时间:{{ dateStr }}</span>
<el-button type="primary" v-if="getTemflag" @click="syncWechatMessageTemplate">立即获取</el-button>
<el-button type="primary" v-if="$getButtonLimit($buttonCode.marketingGetMsgTemp) && getTemflag" :limit-code="$buttonCode.marketingGetMsgTemp" @click="syncWechatMessageTemplate">立即获取</el-button>
<span class="msg-tips__right--load" v-if="!getTemflag"><i class="el-icon-loading"></i>正在获取...</span>
</div>
</div>
......@@ -29,9 +29,9 @@
</el-table-column>
<el-table-column label="操作" align="left" width="140px" fixed="right">
<template slot-scope="scope">
<el-button v-if="scope.row.bindStatusDesc !== '未绑定' && scope.row.status == 1" type="text" @click="$router.push('/msg/edit/' + scope.row.templateId)">编辑</el-button>
<dm-delete v-if="scope.row.bindStatusDesc !== '未绑定'" @confirm="handleDel(scope.row)" tips="将同步删除公众号后台对应模板,一旦删除无法恢复。您确认吗?">
<el-button type="text">删除</el-button>
<el-button v-if="$getButtonLimit($buttonCode.marketingEditMsgTemp) && scope.row.bindStatusDesc !== '未绑定' && scope.row.status == 1" :limit-code="$buttonCode.marketingEditMsgTemp" type="text" @click="$router.push('/msg/edit/' + scope.row.templateId)">编辑</el-button>
<dm-delete v-if="$getButtonLimit($buttonCode.marketingDelMsgTemp) && scope.row.bindStatusDesc !== '未绑定'" @confirm="handleDel(scope.row)" tips="将同步删除公众号后台对应模板,一旦删除无法恢复。您确认吗?">
<el-button type="text" :limit-code="$buttonCode.marketingDelMsgTemp">删除</el-button>
</dm-delete>
</template>
</el-table-column>
......
......@@ -11,7 +11,7 @@
</el-select>
<el-checkbox v-model="listParams.onlySelf" :true-label="1" :false-label="0" @change="refresh">仅看本人</el-checkbox>
<div class="fr">
<el-button type="primary" @click="goForm({}, 'add')">新建计划</el-button>
<el-button type="primary" v-if="$getButtonLimit($buttonCode.marketingAddPopup)" :limit-code="$buttonCode.marketingAddPopup" @click="goForm({}, 'add')">新建计划</el-button>
</div>
</div>
<el-table tooltipEffect="light" style="width: 100%" :class="{ emptyTable: Array.isArray(tableList) && tableList.length > 0 }">
......@@ -28,9 +28,9 @@
计划名称:{{ group.name }}<i>{{ formatDateTimeByType(group.beginTime, 'yyyy-MM-dd') + '至' + formatDateTimeByType(group.endTime, 'yyyy-MM-dd') }}</i>
</p>
<div class="btn-group">
<el-button type="text" v-if="5 > group.popupList.length" @click="goForm(group, 'edit')">添加弹窗</el-button>
<dm-delete v-if="group.popupList.every(el => el.activeStatus != 2)" tips="是否删除此弹窗计划?" @confirm="delGroup(group)">
<el-button type="text">删除</el-button>
<el-button type="text" v-if="$getButtonLimit($buttonCode.marketingEditPopup) && 5 > group.popupList.length" :limit-code="$buttonCode.marketingEditPopup" @click="goForm(group, 'edit')">添加弹窗</el-button>
<dm-delete v-if="$getButtonLimit($buttonCode.marketingDelPopup) && group.popupList.every(el => el.activeStatus != 2)" tips="是否删除此弹窗计划?" @confirm="delGroup(group)">
<el-button type="text" :limit-code="$buttonCode.marketingDelPopup">删除</el-button>
</dm-delete>
</div>
</div>
......@@ -70,12 +70,12 @@
<el-table-column label="操作" align="left" width="170">
<template slot-scope="scope">
<el-button v-if="scope.row.activeStatus === 2 || scope.row.activeStatus === 3" type="text" @click="goForm(group, 'edit')">查看</el-button>
<dm-delete v-if="scope.row.activeStatus === 2" @confirm="stopPop(scope.row)" tips="是否停止该条数据?">
<el-button type="text">停止</el-button>
<dm-delete v-if="$getButtonLimit($buttonCode.marketingStopPopup) && scope.row.activeStatus === 2" @confirm="stopPop(scope.row)" tips="是否停止该条数据?">
<el-button type="text" :limit-code="$buttonCode.marketingStopPopup">停止</el-button>
</dm-delete>
<el-button v-if="scope.row.activeStatus === 1" type="text" @click="goForm(group, 'edit')">编辑</el-button>
<dm-delete v-if="scope.row.activeStatus === 1 || scope.row.activeStatus === 3" @confirm="removePop(scope.row)" tips="是否删除此弹窗?">
<el-button type="text">删除</el-button>
<el-button v-if="$getButtonLimit($buttonCode.marketingEditPopup) && scope.row.activeStatus === 1" :limit-code="$buttonCode.marketingEditPopup" type="text" @click="goForm(group, 'edit')">编辑</el-button>
<dm-delete v-if="$getButtonLimit($buttonCode.marketingDelPopup) && (scope.row.activeStatus === 1 || scope.row.activeStatus === 3)" @confirm="removePop(scope.row)" tips="是否删除此弹窗?">
<el-button type="text" :limit-code="$buttonCode.marketingDelPopup">删除</el-button>
</dm-delete>
</template>
</el-table-column>
......
<template>
<div>
<div class="dm-wrap">
<div class="top">
<div class="left">
<el-input v-model="search.departName" placeholder="请输入部门名称" prefix-icon="el-icon-search" style="width: 260px" clearable @change="onSearch" />
<el-select v-model="search.status" placeholder="全部状态" class="w160" @change="onSearch" clearable>
<el-option v-for="item in statusList" :key="item.value" :value="item.value" :label="item.label" />
</el-select>
</div>
<div class="right">
<el-button v-if="$getButtonLimit($buttonCode.marketingAddAccountDepart)" :limit-code="$buttonCode.marketingAddAccountDepart" type="primary" @click="addDepartDialog.visible = true">增加独立计费部门</el-button>
</div>
</div>
<div class="content mt20">
<el-table :data="tableData.data" v-loading="loading" :row-style="rowStyle">
<el-table-column v-for="(v, i) in tableData.header" :key="i" :prop="v.prop" :min-width="v.minWidth" :label="v.label" :formatter="v.formatter" :fixed="v.fixed" show-overflow-tooltip :render-header="onRender">
<template slot-scope="scope">
<span v-if="v.formatter" v-html="v.formatter(scope.row)"></span>
<span v-else>{{ scope.row[v.prop] || '--' }}</span>
</template>
</el-table-column>
<el-table-column label="操作" min-width="130">
<template slot-scope="{ row }">
<el-button v-if="$getButtonLimit($buttonCode.marketingAccountDetailRecord)" :limit-code="$buttonCode.marketingAccountDetailRecord" type="text" @click="toRecord(row)">记录</el-button>
<template v-if="row.accountDepartId != 1 && $getButtonLimit($buttonCode.marketingUpdateStatus)">
<el-button type="text" v-if="row.status == 0" :limit-code="$buttonCode.marketingUpdateStatus" @click="updateStatus(row, 'open')">启用</el-button>
<el-button type="text" v-if="row.status == 1" :limit-code="$buttonCode.marketingUpdateStatus" @click="updateStatus(row, 'freeze')">停用</el-button>
</template>
<el-button v-if="$getButtonLimit($buttonCode.marketingShowStore) && row.status == 1" :limit-code="$buttonCode.marketingShowStore" type="text" @click="showStore(row)">查看门店</el-button>
</template>
</el-table-column>
</el-table>
<dm-pagination background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="tableData.currentPage" :page-sizes="tableData.pageSizeList" :page-size="tableData.pageSize" layout="total, sizes, prev, pager, next" :total="tableData.total" hide-on-single-page />
</div>
</div>
<add-depart :visible.sync="addDepartDialog.visible" @saved="resetData" />
<view-store :visible.sync="viewStoreDialog.visible" :depart-id="viewStoreDialog.departId" :depart-list="viewStoreDialog.departList" />
</div>
</template>
<script>
import { formatDateTimeByType } from '@/utils/index.js';
import { getDepartList, updateDepartStatus, getDepartSum } from '@/service/api/rechargeApi.js';
import tip from '@/components/tip';
import viewStore from './components/view-store.vue';
import AddDepart from './components/add-depart.vue';
export default {
name: 'detail-table',
components: { tip, AddDepart, viewStore },
data() {
return {
search: {
departName: '',
status: null
},
tableData: {
data: [],
currentPage: 1,
pageSizeList: [20, 40, 60, 80],
pageSize: 20,
header: [],
total: 0,
sum: {}
},
loading: false,
addDepartDialog: {
visible: false
},
viewStoreDialog: {
visible: false,
departId: '',
departList: []
},
statusList: [
{ label: '启用', value: 1 },
{ label: '停用', value: 0 }
]
};
},
async created() {
this.getTableHeader();
this.resetData();
this.$store.commit('mutations_breadcrumb', [
{ name: '企业管理', path: '' },
{ name: '计费中心', path: '/recharge/board' },
{ name: '账户明细', path: '' }
]);
},
mounted() {
this.$store.commit(
'mutations_layoutTips',
`<div class="layout--tips" style="display: flex">
<i class="iconfont icon-warning-circle-fill" style="margin-top: -3px"></i>
<div class="ml5">
“多账户模式”下,系统将根据所配置的计费规则将通讯费用按照下方的“独立计费部门”进行汇总核算及扣除费用:<br />
1、计费规则中:费用由“会员所属服务门店”、“导购所在门店”承担时,最终都会根据门店所属的“独立计费部门”进行汇总核算和扣除,若产生费用时会员无服务门店,则由总部承担费用;<br />
2、计费规则中:费用由“活动创建人”承担时,会根据该管理员所属的“独立计费部门”进行汇总核算和扣除;<br />
注意:若管理员或门店所归属的部门未被设置为“独立计费部门”,则系统将依次向其上级部门查询是否被设置为独立计费部门,查询不到则记录到“企业总部”账上;
</div>
</div>`
);
},
beforeDestroy() {
this.$store.commit('mutations_layoutTips', '');
},
methods: {
// table-methods
async getSumData() {
const { result } = await getDepartSum();
this.tableData.sum = result;
return true;
},
async getTableData() {
this.loading = true;
const para = {
searchParams: this.search.departName,
status: [0, 1].includes(this.search.status) ? this.search.status : -1,
pageSize: this.tableData.pageSize,
currentPage: this.tableData.currentPage
};
const { result } = await getDepartList(para);
this.tableData.data = result.result || [];
this.tableData.data.unshift(this.tableData.sum);
this.tableData.total = result.totalCount;
this.loading = false;
},
getTableHeader() {
this.tableData.header = [
{
label: { name: '独立计费部门' },
prop: 'accountDepartName',
minWidth: 120
},
{
label: { name: '上级部门' },
prop: 'parentDepartName',
minWidth: 120
},
{
label: { name: '计费门店数', tipText: '由此“独立计费部门”统一核算费用的门店数,若当前部门的某下级部门被设置为了独立计费部门并且为启用状态,则此处将不包含下级部门的门店数' },
prop: 'storeCount',
minWidth: 120,
formatter: row => row.storeCount || 0
},
{
label: { name: '账户余额(元)' },
prop: 'accountFunds',
minWidth: 120,
formatter: row => (row.accountFunds ? parseFloat(row.accountFunds).toFixed(2) : '0.00')
},
{
label: { name: '添加时间' },
prop: 'createTime',
minWidth: 120,
formatter: row => (row.createTime ? formatDateTimeByType(row.createTime, 'yyyy-MM-dd HH-mm-ss') : '--')
}
];
},
handleSizeChange(val) {
this.tableData.pageSize = val;
this.tableData.currentPage = 1;
this.getTableData();
},
handleCurrentChange(val) {
this.tableData.currentPage = val;
this.getTableData();
},
// 渲染表头icon
onRender(h, { column }) {
let isShowTip = column.label.name == '计费门店数';
return h('span', [
h('span', column.label.name),
h(isShowTip && tip, {
props: { text: column.label.tipText }
})
]);
},
async updateStatus(row, type) {
const open = { successBtn: '确认启用', title: '确认启用吗?', info: '启用后,该部门下的管理员或门店所产生的通讯费用将由该部门承担(启用前已产生的通讯费用归属不会变更)', status: 1, successMsg: '启用成功' };
const freeze = { successBtn: '确认停用', title: '确认停用吗?', info: '停用后,该部门将不再独立计费(历史已产生的费用归属不会变更)。后续新产生的费用系统将依次向其上级部门查询是否被设置为独立计费部门,查询不到则记录到“企业总部”账上', status: 0, successMsg: '停用成功' };
const opt = type == 'open' ? open : freeze;
try {
const options = { confirmButtonText: opt['successBtn'], cancelButtonText: '取消', type: 'warning' };
await this.$confirm(opt['info'], opt['title'], options);
await updateDepartStatus({ status: opt['status'], accountDepartId: row.accountDepartId });
this.$message.success(opt['successMsg']);
this.resetData();
} catch (e) {
return false;
}
},
showStore(row) {
this.viewStoreDialog.departList = row.accountEnterpriseDpartmentList;
this.viewStoreDialog.departId = row.departmemtId;
this.viewStoreDialog.visible = true;
},
toRecord(row) {
this.$router.push(`/recharge/record?id=${row.accountDepartId}`);
},
rowStyle({ row, rowIndex }) {
return rowIndex == 0 && { background: '#eef4ff' };
},
onSearch() {
this.tableData.currentPage = 1;
this.getTableData();
},
async resetData() {
await this.getSumData();
this.getTableData();
}
},
computed: {
// do something
},
watch: {
// do something
}
};
</script>
<style scoped lang="scss">
.top {
display: flex;
justify-content: space-between;
align-items: center;
}
</style>
<template>
<el-dialog title="增加独立计费部门" :visible.sync="visible" width="420px" custom-class="dialog" @close="onClose">
<div class="content mt27">
<span class="label">选择部门:</span>
<div class="border">
<el-input class="mb10" v-model="search" prefix-icon="el-icon-search" placeholder="请输入部门名称" @change="onSearchTree"></el-input>
<el-tree ref="tree" class="tree" default-expand-all :data="treeData" check-strictly node-key="departId" :props="props" show-checkbox @check-change="handleCheckChange" :filter-node-method="filterNode">
<span slot-scope="{ node, data }">
<el-tooltip :content="node.label" v-if="node.label.length > 10" placement="right">
<span>{{ limitLenth(node.label) }}</span>
</el-tooltip>
<span v-else @click="test(node, data)">{{ node.label }}</span>
<span v-if="node.disabled" class="disabled">已设置</span>
</span>
</el-tree>
</div>
</div>
<div class="text-right mt20">
<el-button plain @click="onClose">取消</el-button>
<el-button type="primary" @click="save">确认增加</el-button>
</div>
</el-dialog>
</template>
<script>
// addAccountDepart
import { getAllDepart, addAccountDepart } from '@/service/api/rechargeApi.js';
export default {
name: 'addDepartment',
props: {
visible: Boolean
},
data() {
return {
depart: [],
search: '',
treeData: [],
props: {
children: 'childList',
label: 'departName'
}
};
},
computed: {
limitLenth() {
return label => label.slice(0, 10) + '...';
}
},
methods: {
onClose() {
this.$emit('update:visible', false);
},
async getDepart() {
const { result } = await getAllDepart();
if (result) result.disabled = 1;
this.treeData = [result] || [];
},
onSearchTree() {
this.$refs.tree.filter(this.search);
},
filterNode(value, data) {
if (!value) return true;
return data.departName.indexOf(value) !== -1 && !data.disabled;
},
handleCheckChange(data, status) {
const { departId, departName } = data;
if (status) this.depart.push({ id: departId, name: departName });
else this.depart = this.depart.filter(el => el.id != departId);
},
async save() {
if (!this.depart.length) return this.$message.warning('请先选择要独立计费的部门');
await addAccountDepart({ departmentJson: JSON.stringify(this.depart) });
this.$message.success('保存成功');
this.onClose();
this.$emit('saved');
},
test(a, b) {
console.log(a, b);
}
},
watch: {
visible: {
handler: function(newVal) {
if (newVal) {
this.getDepart();
this.search = '';
}
},
immediate: true
}
}
};
</script>
<style scoepd lang="scss">
.dialog {
height: 463px;
position: relative;
.border {
width: 308px;
height: 100%;
padding: 12px;
box-sizing: border-box;
border: 1px solid #e4e7ed;
}
.content {
display: flex;
align-items: flex-start;
.label {
display: inline-block;
width: 70px;
margin-top: 8px;
}
.tree {
height: 245px;
overflow-y: auto;
}
}
.disabled {
display: inline-block;
width: 48px;
background: #f0f5ff;
border-radius: 2px;
border: 1px solid #adc6ff;
color: #1890ff;
text-align: center;
line-height: 16px;
font-size: 12px;
margin-left: 5px;
}
}
</style>
<template>
<el-select v-model="departId" placeholder="请选择计费部门" class="select_more" ref="select" @change="handleChange" filterable remote :remote-method="remoteMethod" suffix-icon="el-icon-search" @visible-change="onVisibleChange">
<div class="infinite-list" ref="infinite-list" v-infinite-scroll="load" style="overflow:auto;max-height:260px">
<el-option v-for="item in data.list" :key="item.accountDepartId" :value="item.accountDepartId" :label="item.accountDepartName">{{ item.accountDepartName }}</el-option>
<p style="text-align: center" :hidden="!loading"><i class="el-icon-loading"></i></p>
</div>
</el-select>
</template>
<script>
export default {
name: 'select-depart',
props: {
data: {
type: Object,
default: () => {}
},
loading: Boolean
},
mounted() {
this.departId = this.data.departId;
this.$refs['select'].$el.querySelector('.el-select-dropdown__wrap').style.overflow = 'inherit';
},
data() {
return {
departId: '',
search: '',
cacheSearch: ''
};
},
methods: {
load() {
this.$emit('load');
},
handleChange() {
this.cacheSearch = this.search;
this.$emit('getDepartId', this.departId);
},
remoteMethod(val) {
this.search = val;
this.$refs['infinite-list'].scrollTop = 0;
this.$emit('remote-search', val);
},
onVisibleChange(val) {
if (!val) this.remoteMethod(this.cacheSearch);
}
}
};
</script>
<style lang="scss" scoped>
.select_more {
display: inline-block;
width: 160px;
position: relative;
&::before {
content: '\e778';
position: absolute;
font-family: element-icons !important;
color: #909399;
right: 11px;
top: 10px;
z-index: 2;
}
}
</style>
<template>
<el-drawer :visible.sync="visible" direction="rtl" :before-close="beforeClose" size="600px" custom-class="drawer" :modal="false">
<template v-slot:title>
<h2>计费规则配置</h2>
</template>
<el-form ref="form" :model="form" class="content" label-width="195px" :rules="rules">
<p class="tip lineh17">开启“多账户模式”后,系统将根据所配置的计费规则将通讯费用按照“独立计费部门”进行汇总核算及扣除费用;开启后次日凌晨生效,并且开启后不允许关闭,请谨慎操作;</p>
<el-form-item label="是否开启多账户模式:" class="mt15 mb15" prop="status">
<el-radio-group v-model="form.status" :disabled="isMoreAccount">
<el-radio :label="0">关闭</el-radio>
<el-radio :label="1">开启</el-radio>
</el-radio-group>
</el-form-item>
<template v-if="form.status">
<hr class="mb10" />
<div class="info mb15">
<i class="iconfont icon-warning-circle-fill icon" />
<div class="lineh22">
<p class="tip">计费规则说明:</p>
<p class="tip">1、会员所属服务门店:由会员所属的服务门店承担费用(最终根据门店所属的“独立计费部门”进行汇总核算和扣除),若产生费用时会员无服务门店,则由总部承担费用;</p>
<p class="tip">2、活动创建人:由此活动的创建人来承担费用(最终根据该管理员所属的“独立计费部门”进行汇总核算和扣除);</p>
<p class="tip">3、导购所在门店:由导购所在的门店承担费用(最终根据门店所属的“独立计费部门”进行汇总核算和扣除);</p>
<p class="tip">4、总部:由“总部”承担费用;</p>
</div>
</div>
<template>
<h2 class="icon-type-title mb20">
<div class="mark" />
短信
</h2>
<el-form-item label="短信营销:" prop="smsPlanRule" class="mb20">
<el-radio-group v-model="form.smsPlanRule">
<el-radio :label="2">会员所属服务门店</el-radio>
<el-radio :label="3">活动创建人</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="智能&扫码营销发送短信:" prop="smsEcmRule" class="mb20">
<el-radio-group v-model="form.smsEcmRule">
<el-radio :label="2">会员所属服务门店</el-radio>
<el-radio :label="3">活动创建人</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="会员修改手机号:" prop="smsValidCodeRule" class="mb20">
<el-radio-group v-model="form.smsValidCodeRule">
<el-radio :label="2">会员所属服务门店</el-radio>
<el-radio :label="1">总部</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="会员认证开卡:" prop="smsOpenCardRule" class="mb20">
<el-radio-group v-model="form.smsOpenCardRule">
<el-radio :label="1">总部</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="登录观云台小程序:" prop="gytRule" class="mb20">
<el-radio-group v-model="form.gytRule">
<el-radio :label="1">总部</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="好办-导购绑定手机号:" prop="smsHaobanRule" class="mb20">
<el-radio-group v-model="form.smsHaobanRule">
<el-radio :label="4">导购所在门店</el-radio>
</el-radio-group>
</el-form-item>
</template>
<hr class="dashed mb20" />
<template>
<h2 class="icon-type-title mb20">
<div class="mark" />
双向呼叫
</h2>
<el-form-item label="双向呼叫:" prop="callRule" class="mb20">
<el-radio-group v-model="form.callRule">
<el-radio :label="4">导购所在门店</el-radio>
<el-radio :label="3">活动创建人</el-radio>
</el-radio-group>
</el-form-item>
</template>
</template>
</el-form>
<div class="footer">
<el-button @click="close">取 消</el-button>
<el-button type="primary" @click="save">保 存</el-button>
</div>
</el-drawer>
</template>
<script>
import { saveAccountRule } from '@/service/api/rechargeApi';
export default {
name: 'setRuleDrawer',
props: {
visible: Boolean,
data: Object
},
data() {
function validate(val, cb, arr) {
if (!arr.includes(val)) return cb(new Error('请选择内容'));
cb();
}
return {
form: {
status: 0, // 是否多账户
smsPlanRule: 2, // 短信营销
smsEcmRule: 2, // 智能引擎
smsValidCodeRule: 1, // 修改手机号
smsOpenCardRule: 1, // 认证
smsHaobanRule: 4, // 好办
callRule: 4, // 双向呼叫
gytRule: 1 // 观云台小程序
},
isMoreAccount: false,
rules: {
smsPlanRule: [{ required: true, validator: (rule, val, cb) => validate(val, cb, [2, 3]) }],
smsEcmRule: [{ required: true, validator: (rule, val, cb) => validate(val, cb, [2, 3]) }],
smsValidCodeRule: [{ required: true, validator: (rule, val, cb) => validate(val, cb, [2, 1]) }],
smsOpenCardRule: [{ required: true, validator: (rule, val, cb) => validate(val, cb, [1]) }],
gytRule: [{ required: true, validator: (rule, val, cb) => validate(val, cb, [1]) }],
smsHaobanRule: [{ required: true, validator: (rule, val, cb) => validate(val, cb, [4]) }],
callRule: [{ required: true, validator: (rule, val, cb) => validate(val, cb, [3, 4]) }]
}
};
},
methods: {
close() {
this.$emit('update:visible', false);
},
save() {
this.$refs['form'].validate(async valid => {
if (valid) {
const options1 = { confirmButtonText: '确认开启', cancelButtonText: '取消', type: 'warning' };
const options2 = { confirmButtonText: '立即设置', cancelButtonText: '稍后设置', type: 'success' };
try {
// 单商户转多商户二次弹窗确认,不存在多切单的情况
const para = this.form.status ? this.form : {};
// 比较字段值是否有改变
if (this.compareIsEdit(para, this.data)) {
if (!this.isMoreAccount) {
await this.$confirm('开启多账户计费模式次日凌晨生效,并且开启后不允许关闭', '确认开启多账户模式?', options1);
await saveAccountRule(para);
this.$emit('getNewData', !this.isMoreAccount);
try {
await this.$confirm('赶紧去设置不同的计费账户吧,也可点击【计费中心-账户明细】配置不同的计费账户', '保存成功', options2);
this.$router.push(this.$router.push('/recharge/accountDetail'));
} catch (e) {
this.$emit('update:visible', false);
return false;
}
} else {
await saveAccountRule(para);
this.$emit('getNewData', this.isMoreAccount);
this.$emit('update:visible', false);
return this.$message.success('保存成功');
}
} else {
this.$emit('update:visible', false);
return this.$message.success('保存成功');
}
} catch (e) {
return false;
}
}
});
},
extend(to, from) {
for (let key in to) {
if (!from.hasOwnProperty(key)) continue;
to[key] = from[key];
}
},
beforeClose() {
this.$emit('update:visible', false);
},
compareIsEdit(data, all) {
for (let key in data) {
if (data[key] != all[key]) {
return true;
}
}
return false;
}
},
watch: {
data: {
handler: function(newVal) {
this.isMoreAccount = !!newVal.status;
this.extend(this.form, newVal);
this.form['status'] = this.form['status'] || 0;
},
deep: true,
immediate: true
}
}
};
</script>
<style lang="scss" scoped>
.drawer {
position: relative;
/deep/ .el-form-item {
margin-bottom: 20px;
}
}
h2 {
color: #303133;
font-size: 16px;
font-weight: 600;
}
.content {
font-family: PingFangSC-Regular, PingFang SC;
padding: 0 20px 56px;
color: #303133;
.tip {
color: #909399;
font-size: 12px;
}
.lineh17 {
line-height: 17px;
}
.lineh22 {
line-height: 22px;
}
hr {
height: 1px;
background: #e4e7ed;
outline: none;
border: none;
&.dashed {
height: 0;
border: 1px dashed #e4e7ed;
background: none;
}
}
.info {
display: flex;
.icon {
margin-right: 9px;
color: #1890ff;
display: block;
position: relative;
top: 3px;
}
}
.icon-type-title {
display: flex;
align-items: center;
height: 20px;
color: #303133;
font-size: 16px;
font-weight: 700;
padding: 10px;
background: #f7f8fa;
.mark {
width: 3px;
height: 14px;
margin-right: 8px;
background-color: #1890ff;
}
}
}
.footer {
position: absolute;
bottom: 0;
padding: 0 20px;
box-shadow: 0px -2px 8px 0px rgba(220, 223, 230, 0.6);
box-sizing: border-box;
height: 56px;
width: 100%;
display: flex;
justify-content: flex-end;
align-items: center;
background: #fff;
}
</style>
<template>
<el-dialog title="查看门店" :visible.sync="visible" width="740px" custom-class="store" @close="onClose">
<div class="alert">
<i class="iconfont icon-warning-circle-fill"></i>
<span class="font12 ml10">若要修改门店请前往【企业管理-权限管理-用户列表】进行修改。</span>
<el-button :limit-code="$buttonCode.marketingToUserList" type="text" class="ml10" @click="toUserList">立即前往</el-button>
</div>
<el-input class="mt20 mb20 w260" v-model="search" clearable prefix-icon="el-icon-search" placeholder="请输入门店名称或code" @change="onSearch" />
<el-table :data="tableData.data" element-loading-text="拼命加载中" max-height="288">
<el-table-column v-for="(v, i) in tableData.header" :key="i" :prop="v.prop" :min-width="v.minWidth" :label="v.label" :formatter="v.formatter" :fixed="v.fixed" show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="v.formatter" v-html="v.formatter(scope.row)"></span>
<span v-else>{{ scope.row[v.prop] || '--' }}</span>
</template>
</el-table-column>
</el-table>
<dm-pagination small class="dm-pagination" @current-change="handleCurrentChange" :current-page="tableData.currentPage" :page-size="tableData.pageSize" layout="prev, pager, next" :total="tableData.total" />
</el-dialog>
</template>
<script>
import { getStoreList } from '@/service/api/rechargeApi.js';
export default {
name: 'view-store',
components: {},
props: {
visible: Boolean,
departId: String,
departList: Array
},
data() {
return {
search: '',
tableData: {
data: [],
currentPage: 1,
pageSize: 10,
header: [],
total: 0,
loading: false
}
};
},
created() {
// create hook
},
mounted() {
// mounted hook
},
methods: {
// table-methods
async getTableData() {
this.tableData.loading = true;
const para = {
search: this.search,
pageSize: this.tableData.pageSize,
pageNum: this.tableData.currentPage,
departId: this.departId,
accountEnterpriseDpartmentList: (this.departList || []).toString()
};
const { result } = await getStoreList(para);
this.tableData.data = result.result || [];
this.tableData.total = result.totalCount;
this.tableData.loading = false;
},
getTableHeader() {
this.tableData.header = [
{ label: '门店名称', prop: 'storeName', minWidth: 120 },
{ label: '门店code', prop: 'storeCode', minWidth: 120 },
{ label: '所属部门', prop: 'departName', minWidth: 120 }
];
},
handleCurrentChange(val) {
this.tableData.currentPage = val;
this.getTableData();
},
onSearch() {
this.tableData.currentPage = 1;
this.getTableData();
},
onClose() {
this.$emit('update:visible', false);
this.search = '';
this.tableData.currentPage = 1;
},
toUserList() {
if (!this.$getButtonLimit(this.$buttonCode.marketingToUserList)) return this.$message.warning({ message: '无部门管理权限,请联系管理员开启权限配置', showClose: true });
window.open('/gic-web/#/userManager');
}
},
computed: {
// do something
},
watch: {
visible: {
handler: function(newVal) {
if (newVal) {
this.getTableData();
this.getTableHeader();
}
},
immediate: true
}
}
};
</script>
<style scoped lang="scss">
.store {
height: 513px;
max-height: 600px;
.alert {
display: flex;
align-items: center;
background: #f7f8fa;
width: 520px;
height: 32px;
padding: 0 16px;
box-sizing: border-box;
i {
color: #1890ff;
}
}
}
.w260 {
width: 260px;
}
.font12 {
font-size: 12px;
}
</style>
import { rechargeCenter, getAccountRule } from '@/service/api/rechargeApi.js';
/*
该混入在 消费详情和记录页中用到, 主要混入了isMoreAccount和config两个属性
和对该属性的一些配置
*/
export default {
data() {
return {
isMoreAccount: false, // 是否多账户
config: {
showAllDepartment: false, // 是否超管或部门权限为可见所有的用户
accountDepartId: '' // 普通商户(不是超管也不是部门权限为可见所有)进来时自身得账号部门Id,仅在单商户和多商户且不是超管且不是部门权限为所有时使用
}
};
},
methods: {
extend(to, from) {
for (let key in to) {
if (!from.hasOwnProperty(key)) continue;
to[key] = from[key];
}
},
// 获取超管、部门权限为所有的权限值
async getAuth() {
try {
let res = await rechargeCenter();
this.extend(this.config, res.result.account || {});
// this.config.showAllDepartment = false;
return this.config;
} catch (err) {
console.log(err);
}
},
// 获取计费规则-是否为多商户
async getRule() {
const result = await getAccountRule();
const res = result.result || {};
this.isMoreAccount = !!res.status;
return true;
}
},
computed: {
setAccountDepartId() {
return (id, config) => {
const isMoreAccount = this.isMoreAccount;
const { showAllDepartment, accountDepartId: defaultAccountId } = config;
return isMoreAccount ? (showAllDepartment ? id : defaultAccountId) : defaultAccountId;
};
}
}
};
......@@ -10,6 +10,7 @@
<el-select v-if="listParams.feeType == 2" style="width:180px" clearable v-model="listParams.deductType" placeholder="全部扣款类型" @change="onSearch">
<el-option v-for="(value, key) in deductTypeList" :key="key" :label="value" :value="key"></el-option>
</el-select>
<select-depart v-if="isMoreAccount && config.showAllDepartment" :data="deparment" @load="load" @getDepartId="getDepartId" @remote-search="remoteSearch" :loading="deparment.loading" />
</div>
<el-table tooltipEffect="dark" :data="tableList" style="width: 100%">
<el-table-column align="left" prop="timeEnd" label="操作时间">
......@@ -21,30 +22,25 @@
<el-table-column align="left" prop="transactionId" label="流水号"></el-table-column>
<el-table-column label="记录类型">
<template slot-scope="scope">
{{ textMap[scope.row.feeType] }}
{{ textMap[scope.row.feeType] || '--' }}
</template>
</el-table-column>
<el-table-column label="扣款类型">
<template slot-scope="scope">
{{ deductTypeList[scope.row.deductType] }}
{{ deductTypeList[scope.row.deductType] || '--' }}
</template>
</el-table-column>
<!-- <el-table-column align="left" prop="payType" label="充值方式">
<template slot-scope="scope">
{{ scope.row.payType | filterPayType }}
</template>
</el-table-column> -->
<el-table-column label="金额" align="left" prop="totalFee">
<template slot-scope="scope"> {{ (scope.row.totalFee / 100).toFixed(2) }}</template>
<el-table-column label="余额(元)" align="left" prop="totalFee">
<template slot-scope="scope"> {{ scope.row.totalFee ? (scope.row.totalFee / 100).toFixed(2) : '0.00' }}</template>
</el-table-column>
<el-table-column v-if="isMoreAccount" label="计费部门" align="left" prop="accountDepartName">
<template slot-scope="{ row }">{{ row.accountDepartName || '--' }}</template>
</el-table-column>
<el-table-column align="left" prop="reason" label="原因" show-overflow-tooltip>
<template slot-scope="{ row }">{{ row.reason || '--' }}</template>
</el-table-column>
<el-table-column align="left" prop="reason" label="原因" show-overflow-tooltip></el-table-column>
<el-table-column label="图片凭证">
<template slot-scope="scope">
<!-- <el-image v-for="(item, index) in getUrls(scope).slice(0, 3)" :key="`${currentPage}-${item}`" style="width: 36px; height: 36px" :src="item" :preview-src-list="getUrls(scope, index)" lazy>
<div slot="placeholder" class="image-slot">
<i class="el-icon-picture-outline"></i>
</div>
</el-image> -->
<viewer :options="options" :images="getUrls(scope)" class="viewer" ref="viewer">
<template #default="scope2">
<img style="width: 36px; height: 36px;margin-left:5px;cursor:pointer" v-for="src in scope2.images" :src="src" :key="src" />
......@@ -57,14 +53,17 @@
</section>
</template>
<script>
import { rechargeRecord } from '@/service/api/rechargeApi.js';
import { rechargeRecord, getDepartList } from '@/service/api/rechargeApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
import 'viewerjs/dist/viewer.css';
import { component as Viewer } from 'v-viewer';
import SelectDepart from './components/select-depart.vue';
import intel from './recharge_mixin';
export default {
name: 'recharge-record',
components: { Viewer },
components: { Viewer, SelectDepart },
mixins: [intel],
data() {
return {
textMap: {
......@@ -82,15 +81,31 @@ export default {
beginTime: '',
endTime: '',
deductType: '',
feeType: ''
feeType: '',
accountDepartId: ''
},
deparment: {
list: [],
searchParams: '',
status: -1,
pageSize: 20,
currentPage: 1,
loading: false,
isLimit: false, // 是否最后一页
departId: '', // 选中时得id
zbFlag: 1
},
total: 0,
deductTypeList: {}
};
},
created() {
this.rechargeRecord();
async created() {
this.getDepartmentList();
this.$store.commit('mutations_breadcrumb', [{ name: '企业管理', path: '' }, { name: '计费中心', path: '/recharge' }, { name: '记录', path: '' }]); // eslint-disable-line
const config = await this.getAuth(); // rechartge_mixin
this.deparment.departId = this.$route.query.id || config.accountDepartId;
await this.getRule(); // 该接口调取完后select-depart组件挂载所以在之前一步初始化departId
this.rechargeRecord();
},
methods: {
getUrls(scope) {
......@@ -115,18 +130,23 @@ export default {
this.listParams.currentPage = val;
this.rechargeRecord();
},
async rechargeRecord() {
const para = this.listParams;
this.loading = true;
if (this.dateTime) {
this.listParams.beginTime = formatDateTimeByType(this.dateTime[0], 'yyyy-MM-dd');
this.listParams.endTime = formatDateTimeByType(this.dateTime[1], 'yyyy-MM-dd');
para.beginTime = formatDateTimeByType(this.dateTime[0], 'yyyy-MM-dd');
para.endTime = formatDateTimeByType(this.dateTime[1], 'yyyy-MM-dd');
} else {
this.listParams.beginTime = '';
this.listParams.endTime = '';
para.beginTime = '';
para.endTime = '';
}
const id = this.setAccountDepartId(this.deparment.departId, this.config);
if (id) para.accountDepartId = id;
else {
delete para.accountDepartId;
}
try {
let res = await rechargeRecord(this.listParams);
let res = await rechargeRecord(para);
if (res.errorCode === 0 && res.result.result) {
this.tableList = res.result.result;
this.total = res.result.totalCount;
......@@ -138,6 +158,54 @@ export default {
console.log(err);
}
this.loading = false;
},
// 计费部门下拉
// 获取计费部门
async getDepartmentList() {
const depart = this.deparment;
depart['loading'] = true;
const para = Object.assign({}, depart);
const typeArr = ['list', 'loading', 'isLimit', 'departId'];
this.deleteAttribute(para, typeArr);
let { result } = await getDepartList(para);
this.setDepartData(depart, result);
},
// 清除接口无用属性
deleteAttribute(obj, typeArr) {
for (const key in obj) {
if (typeArr.includes(key)) delete obj[key];
}
},
// 设置departmentData
setDepartData(obj, result) {
const data = result.result || [];
const total = result.totalCount;
obj['list'].push(...data);
obj['isLimit'] = obj['list'].length >= total; // list得数据量>=数据总数时做出限制
obj['loading'] = false;
},
// 下拉滚动加载
load() {
const depart = this.deparment;
if (depart['isLimit'] || depart['loading']) return;
depart['currentPage']++;
this.getDepartmentList();
},
getDepartId(id) {
// 选中不同下拉得id时,调用对应得表格方法
const depart = this.deparment;
depart['departId'] = id;
this.listParams['currentPage'] = 1;
this.rechargeRecord();
},
// 下拉远程搜索
remoteSearch(val) {
const depart = this.deparment;
depart['searchParams'] = val.trim();
depart['currentPage'] = 1;
depart['isLimit'] = false;
depart['list'] = [];
this.getDepartmentList();
}
},
filters: {
......
......@@ -9,7 +9,7 @@
</el-select>
<el-input v-model="pageParams.storeSignName" class="w300" placeholder="计划名称" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
</div>
<el-button type="primary" @click="goAddPlan">新建计划</el-button>
<el-button type="primary" v-if="$getButtonLimit($buttonCode.marketingAddSign)" :limit-code="$buttonCode.marketingAddSign" @click="goAddPlan">新建计划</el-button>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%">
<el-table-column :show-overflow-tooltip="true" align="left" prop="storeSignName" label="计划名称"></el-table-column>
......@@ -30,10 +30,10 @@
<el-table-column label="操作" align="left" width="210px" fixed="right">
<template slot-scope="scope">
<!-- 只有未开始的计划可编辑 -->
<el-button type="text" v-if="scope.row.state === 0" @click="$router.push(`/sign/setting?id=${scope.row.storeSignId}&canEdit=1`)">编辑</el-button>
<el-button type="text" v-else @click="$router.push(`/sign/setting?id=${scope.row.storeSignId}`)">查看</el-button>
<dm-delete @confirm="delPlan(scope.row)" tips="是否删除该签到计划?">
<el-button type="text">删除</el-button>
<el-button type="text" v-if="$getButtonLimit($buttonCode.marketingEditSign) && scope.row.state === 0" :limit-code="$buttonCode.marketingEditSign" @click="$router.push(`/sign/setting/edit?id=${scope.row.storeSignId}&canEdit=1`)">编辑</el-button>
<el-button type="text" v-else @click="$router.push(`/sign/setting/check?id=${scope.row.storeSignId}`)">查看</el-button>
<dm-delete v-if="$getButtonLimit($buttonCode.marketingDelSign)" @confirm="delPlan(scope.row)" tips="是否删除该签到计划?">
<el-button type="text" :limit-code="$buttonCode.marketingDelSign">删除</el-button>
</dm-delete>
</template>
</el-table-column>
......
......@@ -210,7 +210,7 @@ export default {
created() {
this.$store.commit('mutations_breadcrumb', [ { name: '门店签到' }, { name: '计划列表', path: '/sign/plan' }, { name: `${this.$route.query.id ? '编辑' : '新建'}计划`, path: '' } ]);
if (this.$route.query.id) {
this.canEdit = this.$route.query.canEdit ? true : false
this.canEdit = this.$route.path == '/sign/setting/edit' ? true : false
this.getDetail();
} else {
this.canEdit = true;
......
......@@ -12,10 +12,12 @@
<el-checkbox class="vertical-middle" v-model="listParams.hideInvalid" :true-label="1" :false-label="0" label="隐藏已失效" border @change="search"></el-checkbox>
<el-checkbox class="vertical-middle ml0" v-if="$store.state.marketing.isShowSelf" v-model="listParams.showSelfFlag" :true-label="1" :false-label="0" label="仅看本人" border @change="search" />
<el-input v-model="listParams.clerkName" clearable class="vertical-middle w200" placeholder="请输入发送人名称" @change="search"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-tooltip v-if="canSend" class="item" effect="dark" content="本月已使用两次群发" placement="top-start">
<button class="el-button fr el-button--primary is-disabled">新建群发</button>
</el-tooltip>
<el-button v-else class="fr" type="primary" @click="$router.push('/wechat/record/add')">新建群发</el-button>
<template v-if="$getButtonLimit($buttonCode.marketingAddWechatSend)">
<el-tooltip v-if="canSend" class="item" effect="dark" content="本月已使用两次群发" placement="top-start">
<button :limit-code="$buttonCode.marketingAddWechatSend" class="el-button fr el-button--primary is-disabled">新建群发</button>
</el-tooltip>
<el-button v-else class="fr" type="primary" :limit-code="$buttonCode.marketingAddWechatSend" @click="$router.push('/wechat/record/add')">新建群发</el-button>
</template>
</div>
<el-table tooltipEffect="light" :data="recordList" style="width: 100%">
<el-table-column min-width="100" align="left" prop="clerkName" label="用户名称" fixed="left"></el-table-column>
......@@ -66,13 +68,13 @@
</template>
<template slot-scope="scope">
<el-button type="text" v-if="scope.row.contentType === 0 && scope.row.sendStatus === 1 && scope.row.couponType === 1" @click="queryData(scope.row)">数据</el-button>
<dm-delete @confirm="delData(scope.row)" v-if="scope.row.canEdit !== false" tips="是否删除该发送记录?">
<el-button type="text">删除</el-button>
<dm-delete @confirm="delData(scope.row)" v-if="$getButtonLimit($buttonCode.marketingDelWechatSend) && scope.row.canEdit !== false" tips="是否删除该发送记录?">
<el-button :limit-code="$buttonCode.marketingDelWechatSend" type="text">删除</el-button>
</dm-delete>
<dm-delete @confirm="invalidData(scope.row)" v-if="scope.row.contentType === 0 && scope.row.sendType !== 2 && scope.row.sendStatus == 1 && scope.row.canEdit !== false" tips="是否禁用该发送记录?">
<el-button type="text">禁用</el-button>
<dm-delete @confirm="invalidData(scope.row)" v-if="$getButtonLimit($buttonCode.marketingDisableWechatSend) && scope.row.contentType === 0 && scope.row.sendType !== 2 && scope.row.sendStatus == 1 && scope.row.canEdit !== false" tips="是否禁用该发送记录?">
<el-button :limit-code="$buttonCode.marketingDisableWechatSend" type="text">禁用</el-button>
</dm-delete>
<el-button type="text" v-if="scope.row.sendStatus === 0 && scope.row.canEdit !== false" @click="$router.push('/wechat/record/edit/' + scope.row.wechatTeletextId)">编辑</el-button>
<el-button type="text" v-if="$getButtonLimit($buttonCode.marketingEditWechatSend) && scope.row.sendStatus === 0 && scope.row.canEdit !== false" :limit-code="$buttonCode.marketingEditWechatSend" @click="$router.push('/wechat/record/edit/' + scope.row.wechatTeletextId)">编辑</el-button>
<el-button type="text" v-if="scope.row.sendStatus !== 0" @click="$router.push('/wechat/record/info/' + scope.row.wechatTeletextId)">详情</el-button>
</template>
</el-table-column>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment