Commit a9e2bee6 by chenxin

fix:合并3.0权限

parents d6443f29 4256e7fe
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link rel=stylesheet href=//web-1251519181.file.myqcloud.com/components/element.2.12.0.css><link href=/marketing/static/css/main.6289499be60dd77a0cc708faa691827c.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/element.2.12.0.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.31.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/member-group.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.11.js></script><script src=//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.32.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.12.js></script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/selector.1.1.91.js></script><script type=text/javascript src=/marketing/static/js/manifest.21d256695b0223c8c323.js></script><script type=text/javascript src=/marketing/static/js/vendor.4cb744d5df3ad4bdbad7.js></script><script type=text/javascript src=/marketing/static/js/main.1de41939b0d834cb42c3.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link rel=stylesheet href=//web-1251519181.file.myqcloud.com/components/element.2.12.0.css><link href=/marketing/static/css/main.0729efd0d183481ab741c4fd513ffcc8.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/element.2.12.0.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.31.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/member-group.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.13.js></script><script src=//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.32.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.12.js></script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/selector.1.1.91.js></script><script type=text/javascript src=/marketing/static/js/manifest.928e772c661c1239ad76.js></script><script type=text/javascript src=/marketing/static/js/vendor.f6e5442e18ed1c7d4a4d.js></script><script type=text/javascript src=/marketing/static/js/main.535c61982b38fce8797c.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){var r=window.webpackJsonp;window.webpackJsonp=function(n,c,a){for(var i,u,d,f=0,s=[];f<n.length;f++)u=n[f],t[u]&&s.push(t[u][0]),t[u]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(r&&r(n,c,a);s.length;)s.shift()();if(a)for(f=0;f<a.length;f++)d=o(o.s=a[f]);return d};var n={},t={12:0};function o(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var r=t[e];if(0===r)return new Promise(function(e){e()});if(r)return r[2];var n=new Promise(function(n,o){r=t[e]=[n,o]});r[2]=n;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+({0:"game",1:"card",2:"wechat",3:"ewash",4:"evaluation",5:"message",6:"ecm",7:"recharge",8:"msg",9:"calllog"}[e]||e)+"."+{0:"939ef154a34f1a744ce0",1:"d80b966f3b4d25756663",2:"f6b389dec9254beb0d27",3:"44997b2262d711e8b648",4:"a639d4b91d56334ec9ea",5:"502b333f72343683390c",6:"31d8299ebecd59279d15",7:"6235075e2c47716c5050",8:"5d9bccc98221e443f872",9:"101d05cb830d169de2d6"}[e]+".js";var i=setTimeout(u,12e4);function u(){a.onerror=a.onload=null,clearTimeout(i);var r=t[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=u,c.appendChild(a),n},o.m=e,o.c=n,o.d=function(e,r,n){o.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,"a",r),r},o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.p="/marketing/",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var r=window.webpackJsonp;window.webpackJsonp=function(n,a,c){for(var i,u,f,d=0,s=[];d<n.length;d++)u=n[d],t[u]&&s.push(t[u][0]),t[u]=0;for(i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i]);for(r&&r(n,a,c);s.length;)s.shift()();if(c)for(d=0;d<c.length;d++)f=o(o.s=c[d]);return f};var n={},t={12:0};function o(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var r=t[e];if(0===r)return new Promise(function(e){e()});if(r)return r[2];var n=new Promise(function(n,o){r=t[e]=[n,o]});r[2]=n;var a=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,o.nc&&c.setAttribute("nonce",o.nc),c.src=o.p+"static/js/"+({0:"game",1:"card",2:"wechat",3:"ewash",4:"evaluation",5:"message",6:"ecm",7:"recharge",8:"msg",9:"calllog"}[e]||e)+"."+{0:"27d6348877fad22dc7db",1:"31602c32289ae2816c8e",2:"069e52fb11803263b16a",3:"412babd99d8107d89a48",4:"82b6062b9f7c9e15698f",5:"040c5edae738dc44ee28",6:"6566c902c100b2a16e48",7:"6dfebb35a2cb22f7489d",8:"9d07cccbb79a189af24d",9:"925a34b416ed002007fe"}[e]+".js";var i=setTimeout(u,12e4);function u(){c.onerror=c.onload=null,clearTimeout(i);var r=t[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return c.onerror=c.onload=u,a.appendChild(c),n},o.m=e,o.c=n,o.d=function(e,r,n){o.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,"a",r),r},o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.p="/marketing/",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -37,7 +37,7 @@
<script src="//web-1251519181.file.myqcloud.com/components/store.2.0.01.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/member-group.2.0.01.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/store-card.2.0.11.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/store-card.2.0.13.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.01.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/people.2.0.32.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/export-excel.2.0.12.js"></script>
......
......@@ -32,6 +32,8 @@ export default {
getUserLogin().then(res => {
if (res.errorCode === 0) {
const uId = res.result && res.result.userId;
const enableAccessControl = res.result && res.result.enableAccessControl;
localStorage.setItem('enableAccessControl', enableAccessControl);
if (localStorage.getItem('m_uId') !== uId) {
// 串号
this.$confirm('当前登录账号已经发生变化,如果您在其他页面已经登录另一个账号,请退出重新登录!', '登录账号变更提示', {
......@@ -62,6 +64,7 @@ export default {
created() {
this.saveUserId();
this.changeTab();
this.$store.dispatch('getIsShowSelfData'); // 展示是否显示 '仅看本人' btn 和列表展示创建人
}
};
</script>
......
......@@ -111,6 +111,9 @@ a:hover {
.pr30{
padding-right: 30px!important;
}
.ml0{
margin-left: 0px!important;
}
.ml25{
margin-left: 25px!important;
}
......
......@@ -227,4 +227,8 @@
border-radius: 5px;
line-height: 16px;
}
}
.dm-notification {
z-index: 3000 !important;
}
\ No newline at end of file
......@@ -2,14 +2,15 @@
<label :name="imgData.imageId" class="dm-img-item">
<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">
<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>
</div>
</div>
<div class="dm-img-item_center">
<el-checkbox :label="imgData.imageId">{{ imgData.imageTitle }}</el-checkbox>
<!-- 是本人 -->
<el-checkbox :disabled="imgData.canEdit === false" :label="imgData.imageId">{{ imgData.imageTitle }}</el-checkbox>
</div>
</label>
</template>
......
......@@ -4,7 +4,7 @@
<img :src="imgData.qcloudImageUrl" alt="" srcset="" />
</div>
<div class="dm-img-item_center">
<el-checkbox :label="imgData.imageMediaId">{{ imgData.imageTitle }}</el-checkbox>
<el-checkbox :disabled="imgData.canEdit === false" :label="imgData.imageMediaId">{{ imgData.imageTitle }}</el-checkbox>
</div>
</label>
</template>
......
......@@ -20,7 +20,7 @@
</label>
</div>
</div>
<el-checkbox-group v-loading="loading" v-model="newMediaId" :max="1" class="clearfix img-item__wrap" :style="scrollStyle">
<el-checkbox-group v-loading="loading" v-model="newMediaId" class="clearfix img-item__wrap" :style="scrollStyle">
<img-item-radio v-for="(v, i) in imgList" :key="i" :imgData="v" @click.native.stop.prevent="selectImg(v)"></img-item-radio>
</el-checkbox-group>
<el-pagination v-show="imgList.length" background class="dm-pagination imglib-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"></el-pagination>
......@@ -35,7 +35,16 @@ export default {
props: {
activeName: String,
scrollStyle: Object,
mediaId: String
mediaId: String,
showSelfFlag: {
type: [String, Number],
default: ''
},
// 默认开启控制本人使用
selfSwitch: {
type: Boolean,
default: true
}
},
created() {
this.loadImgList();
......@@ -55,7 +64,8 @@ export default {
listParams: {
currentPage: 1,
pageSize: 20,
wechatImageGroupId: ''
wechatImageGroupId: '',
showSelfFlag: this.showSelfFlag || ''
},
total: 0,
newMediaId: [],
......@@ -98,7 +108,13 @@ export default {
this.groupsList.unshift({ wechatImageGroupId: '', groupName: '所有图片', imageCount: res.result.totalPicsCount });
this.imgList = [];
if (res.result.page.result) {
const resList = res.result.page.result;
const resList = res.result.page.result.map(v => {
// 开启本人使用开关
if (this.selfSwitch === false) {
v.canEdit = true;
}
return v;
});
this.$nextTick(_ => {
resList.map(v => {
this.imgList.push(v);
......
......@@ -19,7 +19,7 @@
<i v-if="listParams.wechatImageGroupId" class="el-icon-delete" @click="delGroup"></i>
</h4>
<div class="dm-ilib-opt_right">
<span class="fz12 gray pr10">大小不超过2M</span>
<span class="fz12 gray pr10">大小不超过2Mrrf</span>
<label 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" />
......@@ -50,7 +50,17 @@ import { loadImgList, updateGroupName, addGroupService, deleteGroupService, dele
export default {
name: 'dm-ilib',
props: {
scrollStyle: Object
scrollStyle: Object,
// 默认传showSelfFlag参数
showSelfFlag: {
type: [String, Number],
default: ''
},
// 默认开启控制本人使用
selfSwitch: {
type: Boolean,
default: true
}
},
created() {
this.loadImgList();
......@@ -63,7 +73,8 @@ export default {
listParams: {
currentPage: 1,
pageSize: 20,
wechatImageGroupId: ''
wechatImageGroupId: '',
showSelfFlag: this.showSelfFlag || ''
},
total: 0,
checkedList: [],
......@@ -115,10 +126,18 @@ export default {
this.checkedOptions = [];
this.imgList = [];
if (res.result.page.result) {
const resList = res.result.page.result;
const resList = res.result.page.result.map(v => {
// 开启本人使用开关
if (this.selfSwitch === false) {
v.isEdit = true;
}
return v;
});
this.$nextTick(_ => {
resList.map(v => {
this.checkedOptions.push(v.imageId);
if (v.canEdit !== false) {
this.checkedOptions.push(v.imageId);
}
this.imgList.push(v);
});
});
......@@ -175,9 +194,7 @@ export default {
.then(() => {
this.deleteImageService(val);
})
.catch(() => {
this.$tips({ type: 'info', message: '已取消删除' });
});
.catch(() => {});
},
async deleteImageService(val) {
try {
......
<!--
* @Description: In User Settings Edit
* @Author: your name
* @Date: 2019-08-06 20:53:23
* @LastEditTime: 2019-08-09 10:13:16
* @LastEditors: Please set LastEditors
-->
<template>
<section :class="{ 'dm-wrap': auto }">
<div class="dm-imgtext_head" :class="pbSize">
<div>
图文消息(共{{ total }}条) <el-input v-model="listParams.searchName" clearable class="w200 ml10" placeholder="请输入标题/作者" @change="loadImgTextList"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
图文消息(共{{ total }}条)
<el-input v-model="listParams.searchName" clearable class="w200 ml10" placeholder="请输入标题/作者" @change="loadImgTextList"><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 && showSelf" v-model="listParams.showSelfFlag" :true-label="1" :false-label="0" label="仅看本人" border @change="loadImgTextList" />
</div>
<div>
<el-button type="primary" @click="add">新建图文</el-button>
......@@ -45,13 +40,14 @@
</p>
</template>
</el-table-column>
<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" v-if="auto">
<template slot-scope="scope">
<el-button type="text" @click="editData(scope.row)">编辑</el-button>
<dm-delete @confirm="delData(scope.row)" tips="确认删除该图文?">
<el-button type="text" v-if="scope.row.canEdit !== false" @click="editData(scope.row)">编辑</el-button>
<dm-delete v-if="scope.row.canEdit !== false" @confirm="delData(scope.row)" tips="确认删除该图文?">
<el-button type="text">删除</el-button>
</dm-delete>
<el-button type="text" @click="$router.push('/wechat/record/add/' + scope.row.imageTextId)">使用</el-button>
<el-button type="text" v-if="scope.row.canEdit !== false" @click="$router.push('/wechat/record/add/' + scope.row.imageTextId)">使用</el-button>
</template>
</el-table-column>
</el-table>
......@@ -80,6 +76,14 @@ export default {
pbSize: {
type: String,
default: 'pb22'
},
showSelfFlag: {
type: [String, Number],
default: ''
},
showSelf: {
type: Boolean,
default: true
}
},
created() {
......@@ -91,7 +95,8 @@ export default {
listParams: {
currentPage: 1,
pageSize: 20,
searchName: ''
searchName: '',
showSelfFlag: this.showSelfFlag || ''
},
total: 0,
loading: false,
......
......@@ -18,3 +18,6 @@ export const getUserLogin = params => requests(PREFIX + 'get-login-user-info', p
// 退出登录
export const logout = params => requests(PREFIX + 'do-logout?requestProject=marketing', params);
// 获取显示本人btn
export const getIsShowSelf = params => requests(MARKET_PREFIX + 'is-show-self?requestProject=marketing', params);
import { getIsShowSelf } from '@/service/api/commonApi.js';
// initial state
const state = {
all: 0,
......@@ -7,7 +9,9 @@ const state = {
storeObj: {},
asideShow: false,
breadcrumb: [],
layoutTips: ''
layoutTips: '',
isShowSelf: false, // 展示是否显示 '仅看本人' btn 在app.vue调用 每次刷新都会获取
openFlag: false // 列表是否显示创建人
};
// getters
......@@ -39,6 +43,10 @@ const actions = {
removecartData({ commit }, item) {
commit('mutations_removeCartData', item);
},
async getIsShowSelfData(state) {
let res = await getIsShowSelf();
this.commit('mutations_auth', res.result);
}
};
......@@ -67,6 +75,10 @@ const mutations = {
},
mutations_layoutTips(state, val) {
state.layoutTips = val;
},
mutations_auth(state, { openFlag, showFlag }) {
state.isShowSelf = Boolean(showFlag);
state.openFlag = Boolean(openFlag);
}
};
......
import { Notification, MessageBox } from 'element-ui';
// 是否页面警告
export const enableAccessControl = () => {
return window.localStorage.getItem('enableAccessControl') == '1';
};
export const alertInfo = () => {
Notification({
title: '温馨提示',
type: 'warning',
message: '在此页面进行修改、删除等操作将更改本商户下所有的配置 请谨慎进行',
customClass: 'dm-notification'
});
};
export const confirmInfo = (fn, type) => {
MessageBox.confirm('在此页面进行修改、删除等操作将更改本商户下所有的配置 是否确认修改!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
fn(type);
})
.catch(() => {
//
});
};
......@@ -16,13 +16,14 @@
<el-radio :label="2">十二个月</el-radio>
</el-radio-group>
</div>
<div class="mt30"><el-button type="primary" class="save" @click="submit">保存</el-button></div>
<div class="mt30"><el-button type="primary" class="save" @click="handleSubmit">保存</el-button></div>
</section>
</section>
</template>
<script>
import { saveCallSetting, getCallSetting } from '@/service/api/calllogApi.js';
import { enableAccessControl, confirmInfo, alertInfo } from '@/utils/auth.js';
export default {
name: 'record',
......@@ -40,6 +41,13 @@ export default {
};
},
methods: {
handleSubmit() {
if (enableAccessControl()) {
confirmInfo(this.submit);
} else {
this.submit();
}
},
submit() {
this.loading = true;
const { openFlag, storageType } = this;
......@@ -52,6 +60,11 @@ export default {
created() {
this.$store.commit('aside_handler', false);
this.$store.commit('mutations_breadcrumb', [{ name: '会员管理', path: '' }, { name: '通话记录', path: '/calllog/index' }, { name: '录音存储设置', path: '' }]);
},
mounted() {
if (enableAccessControl()) {
alertInfo();
}
getCallSetting().then(res => {
const { callSetting, unitFee } = res.result;
if (callSetting) {
......
......@@ -54,6 +54,7 @@ export default {
return {
requestProject: 'marketing',
uuid: '',
canEdit: false,
loading: false,
submitLoading: false,
cardShelfsLoading: false, //卡券展架loading
......@@ -207,6 +208,8 @@ export default {
res = await getCardDetail({ coupCardId: this.$route.params.id });
}
if (res.errorCode === 0) {
// 是否是本人
this.canEdit = res.result.canEdit !== false;
// 拉取卡券适用渠道的列表
if (this.isAdd || this.isCopy) {
this.cardApplyChannelOptions = res.result.systemCoupChannelList;
......
......@@ -223,7 +223,7 @@
</el-form-item>
<div class="btn-wrap_fixed" :class="{ on: asideShow }">
<el-button type="primary" @click="submitForm('form')" v-loading="submitLoading" v-show="!isInfo">保存并提交审核</el-button>
<el-button type="primary" @click="submitForm('form')" v-loading="submitLoading" v-show="!isInfo && canEdit">保存并提交审核</el-button>
<el-button @click="$router.go(-1)">返 回</el-button>
</div>
</el-form>
......
......@@ -12,6 +12,7 @@
<el-option v-for="(item, index) in cardTypeOptions" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-input 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>
<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" @click="$router.push('/card/add')">新增卡券</el-button>
</div>
<ul class="clearfix" v-loading="loading" element-loading-text="拼命加载中">
......@@ -41,7 +42,8 @@ export default {
searchParam: '',
currentPage: 1,
pageSize: 20,
cardType: ''
cardType: '',
showSelfFlag: ''
},
total: 0,
loading: false,
......@@ -80,7 +82,7 @@ export default {
this.loading = true;
try {
let res = await cardPageList(this.listParams);
this.tableList = res.result.result;
this.tableList = res.result.result || [];
this.total = res.result.totalCount;
} catch (err) {
this.$tips({ type: 'error', message: '加载列表失败' });
......
......@@ -49,7 +49,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" @click="preAdjustStock(item)"><i class="el-icon-edit"></i></a
>剩余库存:{{ item.couponStock }} <a title="编辑库存" v-if="!shelfFlag && item.useCustomCode === 0 && item.canEdit !== false" @click="preAdjustStock(item)"><i class="el-icon-edit"></i></a
></span>
</div>
<render-temp v-if="!shelfFlag" :item="item" @handler="handler"></render-temp>
......
......@@ -9,10 +9,13 @@ export default Vue.component('render-temp', {
}
},
render(h) {
const bind1 = (
const canEdit = this.item.canEdit !== false; // 只有canEdit === false 才证明不能使用 没有权限仅可以详情/报表
const bind1 = canEdit ? (
<a title="投放" onClick={this.handler.bind(null, 1)}>
<i class="iconfont icon-daohang-" />
</a>
) : (
''
);
const bind2 = (
<a title="报表" onClick={this.handler.bind(null, 2)}>
......@@ -24,20 +27,24 @@ export default Vue.component('render-temp', {
<i class="el-icon-edit" />
</a>
);
const bind4 = (
const bind4 = canEdit ? (
<a title="删除" 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 = (
const bind6 = canEdit ? (
<a title="复制" onClick={this.handler.bind(null, 6)}>
<i class="iconfont icon-wxcard-copy" />
</a>
) : (
''
);
const statushtml = (
......
......@@ -4,6 +4,7 @@
<div class="pb22">
<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>
</div>
<div class="filter--box">
......@@ -47,6 +48,7 @@
</div>
</template>
</el-table-column>
<el-table-column min-width="100" align="left" prop="creatorName" label="创建人" v-if="$store.state.marketing.openFlag"></el-table-column>
</el-table>
<el-pagination v-show="recordList.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"></el-pagination>
<vue-gic-export-excel :dialogVisible.sync="dialogVisible" :dataArr="recordList" :type="2" :excelUrl="excelUrl" :params="params" :projectName="projectName"></vue-gic-export-excel>
......@@ -80,7 +82,8 @@ export default {
status: '',
attentionBeginTime: '',
attentionEndTime: '',
cardType: ''
cardType: '',
showSelfFlag: ''
},
total: 0,
projectName: 'marketing', // 当前项目名
......
......@@ -3,6 +3,7 @@
<!-- 条件筛选区 -->
<div class="pb22">
<el-input v-model="listParams.search" class="w300" 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="exportReceivedRecordExcel"> 导出订单</el-button>
</div>
<div class="filter--box">
......@@ -72,11 +73,14 @@
{{ scope.row.status === 5 ? (scope.row.checkSource === 0 ? '订单核销' : '手动核销') : '--' }}
</template>
</el-table-column>
<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="120px" fixed="right">
<template slot-scope="scope">
<!-- 卡券类型为 e袋洗 时 列表操作按钮 无手动核销按钮 -->
<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>
<!-- 卡券类型为 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>
</template>
</template>
</el-table-column>
</el-table>
......@@ -117,7 +121,8 @@ export default {
pageSize: 20,
writeOffBeginTime: '',
writeOffEndTime: '',
sortBy: ''
sortBy: '',
showSelfFlag: ''
},
total: 0,
cardOrderShow: false,
......
......@@ -2,6 +2,7 @@
<section class="card-record-send">
<div class="pb22">
<el-input class="w300" v-model="listParams.search" 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" />
</div>
<el-table tooltipEffect="light" :data="recordList" style="width: 100%" row-key="putonTime" v-loading="loading">
<el-table-column width="120" align="left" prop="putonTime" label="投放时间" fixed="left">
......@@ -28,12 +29,13 @@
</div>
</template>
</el-table-column>
<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="150px" fixed="right">
<template slot-scope="scope">
<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" @click="$router.push('/card/groupsend/' + scope.row.putonId)">编辑</el-button>
<el-button type="text" v-if="scope.row.putonStatus !== 2 && scope.row.putonStatus !== 3 && scope.row.canEdit !== false" @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" @confirm="delData(scope.row)" tips="是否删除该投放记录?">
<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>
</template>
......@@ -93,7 +95,8 @@ export default {
recordType: 0,
search: '',
currentPage: 1,
pageSize: 20
pageSize: 20,
showSelfFlag: ''
},
total: 0
};
......
......@@ -86,7 +86,8 @@ export default {
},
checked: [],
rules: {
ecmPlanName: { type: 'string', required: true, message: '计划名称不能为空', trigger: 'blur' }
ecmPlanName: { type: 'string', required: true, message: '计划名称不能为空', trigger: 'blur' },
gradeIds: [{ type: 'array', required: true, message: '请至少选择一个卡类型', trigger: 'change' }]
},
isEdit: this.$route.meta.type === 'edit',
isAdd: this.$route.meta.type === 'add',
......
<template>
<div>
<el-form ref="form" :model="form" label-width="100px" :rules="rules" v-loading="loading" element-loading-text="拼命加载中">
<el-form ref="form" :model="form" label-width="110px" :rules="rules" v-loading="loading" element-loading-text="拼命加载中">
<!-- 计划内容设置 -->
<section class="dm-form__wrap">
<h3 class="dm-title__label">计划内容设置</h3>
......@@ -125,12 +125,8 @@
</section>
<!-- 会员卡升/降级触发设置 -->
<section class="dm-form__wrap" v-if="!form.effectType && (form.effectAction === 'degrade' || form.effectAction === 'upgrade')">
<h3 class="dm-title__label">
会员卡{{ form.effectAction === 'degrade' ? '降' : '升' }}级触发设置
<i class="dm-title__label--icon iconfont icon-xinxixianshi"></i>
<span class="gray fz13">仅限会员等级由GIC控制可用</span>
</h3>
<el-form-item :label="`会员卡${form.effectAction === 'degrade' ? '降' : '升'}级至`">
<h3 class="dm-title__label">会员卡{{ form.effectAction === 'degrade' ? '降' : '升' }}级触发设置</h3>
<el-form-item prop="gradeIds" :label="`会员卡${form.effectAction === 'degrade' ? '降' : '升'}级至`">
<el-select :disabled="isEdit" v-model="form.gradeIds" multiple placeholder="请选择" class="w300">
<el-option v-for="v in gradeList" :key="v.gradeId" :label="v.gradeName" :value="v.gradeId" :disabled="v.disabled"></el-option>
</el-select>
......
......@@ -13,8 +13,8 @@
<el-select class="dm-select" clearable v-model="listParams.onlineStatus" placeholder="选择上线状态" @change="search">
<el-option v-for="(v, i) in onlineOptions" :key="i" :label="v.label" :value="v.value"></el-option>
</el-select>
<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" />
<el-button class="fr" type="primary" @click="$router.push('/ecm/add')">新建计划</el-button>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%" v-loading="loading" element-loading-text="拼命加载中">
......@@ -24,13 +24,14 @@
<span v-else>{{ scope.row[v.prop] }}</span>
</template>
</el-table-column>
<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="220" fixed="right">
<template slot-scope="scope">
<dm-delete v-if="scope.row.onlineStatus === 1" @confirm="offlineEcmPlan(scope.row)" tips="是否下线该计划?">
<dm-delete v-if="scope.row.onlineStatus === 1 && scope.row.canEdit !== false" @confirm="offlineEcmPlan(scope.row)" tips="是否下线该计划?">
<el-button type="text">下线</el-button>
</dm-delete>
<el-button type="text" @click="editData(scope.row)">编辑</el-button>
<dm-delete v-if="scope.row.putonStatus !== 2" @confirm="delData(scope.row)" tips="是否删除该计划?">
<el-button type="text" v-if="scope.row.canEdit !== false" @click="editData(scope.row)">编辑</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>
<el-button type="text" @click="toRecord(scope.row)">记录</el-button>
......@@ -59,7 +60,8 @@ export default {
onlineStatus: '',
searchName: '',
currentPage: 1,
pageSize: 20
pageSize: 20,
showSelfFlag: ''
},
total: 0,
loading: false,
......
......@@ -159,7 +159,7 @@
<el-form-item label="优惠内容" prop="giftCouponValue">
<el-input-number controls-position="right" class="w150" :disabled="isEdit || isInfo" v-model="form.giftCouponValue" :precision="0" :min="0"></el-input-number> {{ form.giftCouponDiscountType === 1 ? '元' : '件' }}
<span class="fz13 gray">* 温馨提醒:温馨提醒:单笔订单满80元免邮,未满80元由品牌方自行承担运费(约10元)</span>
<span class="fz13 gray">* 温馨提醒:单笔订单满80元免邮,未满80元由品牌方自行承担运费(约10元)</span>
</el-form-item>
<!-- <el-form-item prop="cardLimit" label="领券限制">
......
......@@ -112,7 +112,7 @@
<!-- 参与门槛 -->
<dm-threshold :form="form" :isAdd="isAdd" :thresholdData="thresholdData" ref="threshold"></dm-threshold>
<div class="btn-wrap_fixed" :class="{ on: asideShow }">
<el-button type="primary" @click="saveLottery('form')" v-if="!isInfo">保 存</el-button>
<el-button type="primary" @click="saveLottery('form')" :disabled="!canEdit" v-if="!isInfo">保 存</el-button>
<el-button @click="$router.go(-1)">返 回</el-button>
</div>
<vue-gic-card :showCardDialog="showCardDialog" @selectCard="selectCard" :cardLimit="3" :cardType="null"></vue-gic-card>
......@@ -132,6 +132,7 @@ export default {
const that = this;
return {
loading: false,
canEdit: true,
// 参与门槛组件传递的数据
thresholdData: {
searchParams: '', // 会员筛选
......@@ -292,7 +293,7 @@ export default {
try {
let res = await detailLottery({ gameId: this.$route.params.id, gameType: 1 });
const gameDetail = res.result.gameDetail;
this.canEdit = this.isEdit ? res.result.canEdit : true; // 不是本人禁用按钮
this.form = Object.assign(this.form, {
gameId: gameDetail.gameId,
gameName: gameDetail.gameName, //1
......@@ -374,6 +375,9 @@ export default {
},
//提交保存
async saveLottery(formName) {
if (!this.canEdit) {
return;
}
if (this.form.gameLimitCount != -1 && this.form.gameFreeCount > this.form.gameLimitCount) {
this.$tips({ type: 'warning', message: '免费次数不能大于限制次数' });
return;
......
<!--
* @Description: In User Settings Edit
* @Author: your name
* @Date: 2019-06-04 11:49:47
* @LastEditTime: 2019-08-19 17:17:09
* @LastEditors: Please set LastEditors
-->
<template>
<section class="dm-wrap">
<div class="pb22 clearfix">
......@@ -12,6 +5,7 @@
<el-option v-for="(v, i) in gameStatusOptions" :key="i" :label="v.label" :value="v.value"></el-option>
</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>
</div>
......@@ -22,13 +16,14 @@
<span v-else>{{ scope.row[v.prop] }}</span>
</template>
</el-table-column>
<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="220px" fixed="right">
<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.gameStatus != '3'">编辑</el-button>
<el-button type="text" @click="$router.push('/game/dzp/detail/' + scope.row.gameId)" v-if="scope.row.gameStatus == '3'">详情</el-button>
<dm-delete @confirm="delData(scope.row)" tips="是否删除该游戏?">
<dm-delete @confirm="delData(scope.row)" v-if="scope.row.canEdit !== false" tips="是否删除该游戏?">
<el-button type="text">删除</el-button>
</dm-delete>
</template>
......@@ -55,7 +50,8 @@ export default {
gameType: 1,
searchParam: '',
currentPage: 1,
pageSize: 20
pageSize: 20,
showSelfFlag: ''
},
total: 0,
loading: false,
......
......@@ -98,7 +98,7 @@
<!-- 参与门槛 -->
<dm-threshold :form="form" :isAdd="isAdd" :thresholdData="thresholdData" ref="threshold"></dm-threshold>
<div class="btn-wrap_fixed" :class="{ on: asideShow }">
<el-button type="primary" @click="saveLottery('form')" v-if="!isInfo">保 存</el-button>
<el-button type="primary" @click="saveLottery('form')" :disabled="!canEdit" v-if="!isInfo">保 存</el-button>
<el-button @click="$router.go(-1)">返 回</el-button>
</div>
<vue-gic-card :showCardDialog="showCardDialog" @selectCard="selectCard" :cardLimit="3" :cardType="null"></vue-gic-card>
......@@ -118,6 +118,7 @@ export default {
const that = this;
return {
loading: false,
canEdit: true,
// 参与门槛组件传递的数据
thresholdData: {
searchParams: '', // 会员筛选
......@@ -259,7 +260,7 @@ export default {
let res = await detailLottery({ gameId: this.$route.params.id, gameType: 2 });
this.loading = false;
const gameDetail = res.result.gameDetail;
this.canEdit = this.isEdit ? res.result.canEdit : true; // 不是本人禁用按钮
this.form = Object.assign(this.form, {
gameId: gameDetail.gameId,
gameName: gameDetail.gameName,
......@@ -335,6 +336,9 @@ export default {
},
//提交保存
async saveLottery(formName) {
if (!this.canEdit) {
return;
}
if (this.form.gameLimitCount != -1 && this.form.gameFreeCount > this.form.gameLimitCount) {
this.$tips({ type: 'warning', message: '免费次数不能大于限制次数' });
return;
......
<!--
* @Description: In User Settings Edit
* @Author: your name
* @Date: 2019-06-04 11:49:47
* @LastEditTime: 2019-08-19 17:11:54
* @LastEditors: Please set LastEditors
-->
<template>
<section class="dm-wrap">
<div class="pb22 clearfix">
......@@ -12,6 +5,7 @@
<el-option v-for="(v, i) in gameStatusOptions" :key="i" :label="v.label" :value="v.value"></el-option>
</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>
</div>
......@@ -22,13 +16,14 @@
<span v-else>{{ scope.row[v.prop] }}</span>
</template>
</el-table-column>
<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="220px" fixed="right">
<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.gameStatus != '3'">编辑</el-button>
<el-button type="text" @click="$router.push('/game/ggk/detail/' + scope.row.gameId)" v-if="scope.row.gameStatus == '3'">详情</el-button>
<dm-delete @confirm="delData(scope.row)" tips="是否删除该游戏?">
<dm-delete @confirm="delData(scope.row)" v-if="scope.row.canEdit !== false" tips="是否删除该游戏?">
<el-button type="text">删除</el-button>
</dm-delete>
</template>
......@@ -55,7 +50,8 @@ export default {
searchParam: '',
currentPage: 1,
pageSize: 20,
searchType: 1
searchType: 1,
showSelfFlag: ''
},
total: 0,
loading: false,
......
......@@ -173,7 +173,7 @@
<!-- 参与门槛 -->
<dm-threshold :form="form" :isAdd="isAdd" :thresholdData="thresholdData" ref="threshold"></dm-threshold>
<div class="btn-wrap_fixed" :class="{ on: asideShow }">
<el-button type="primary" @click="klflSave('form')" v-if="!isInfo">保 存</el-button>
<el-button type="primary" @click="klflSave('form')" :disabled="!canEdit" v-if="!isInfo">保 存</el-button>
<el-button @click="$router.go(-1)">返 回</el-button>
</div>
<vue-gic-card :showCardDialog="showCardDialog" @selectCard="selectCard" :cardLimit="3" :cardType="null"></vue-gic-card>
......@@ -203,6 +203,7 @@ export default {
const that = this;
return {
loading: false,
canEdit: true,
tableLoading: false,
prizeLoading: false,
// 参与门槛组件传递的数据
......@@ -488,6 +489,7 @@ export default {
.then(res => {
this.loading = false;
result = res.result;
this.canEdit = this.isEdit ? res.result.canEdit : true; // 不是本人禁用按钮
this.systemBakImgList = result.systemBakImgList;
this.systemBtnImgList = result.systemBtnImgList;
if (result.game) {
......@@ -579,6 +581,9 @@ export default {
},
//提交保存
async klflSave(formName) {
if (!this.canEdit) {
return;
}
if (this.form.memberType === 1 && !this.thresholdData.getSaveData) {
this.$tips({ type: 'warning', message: '会员筛选不能为空' });
return;
......
<!--
* @Description: In User Settings Edit
* @Author: your name
* @Date: 2019-06-04 11:49:47
* @LastEditTime: 2019-08-19 17:12:18
* @LastEditors: Please set LastEditors
-->
<template>
<section class="dm-wrap">
<div class="pb22 clearfix">
......@@ -12,6 +5,7 @@
<el-option v-for="(v, i) in gameStatusOptions" :key="i" :label="v.label" :value="v.value"></el-option>
</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" icon="iconfont icon-icon_yunxiazai fz14" @click="downLoadQr"> 下载二维码 </el-button> -->
<el-button class="fr" type="primary" @click="$router.push('/game/klfl/add')">新建游戏</el-button>
</div>
......@@ -24,13 +18,14 @@
<span v-else>{{ scope.row[v.prop] }}</span>
</template>
</el-table-column>
<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="220px" fixed="right">
<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.activityStatus === 0 || scope.row.activityStatus === 1" @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="是否删除该游戏?">
<dm-delete @confirm="delData(scope.row)" tips="是否删除该游戏?" v-if="scope.row.canEdit !== false">
<el-button type="text">删除</el-button>
</dm-delete>
</template>
......@@ -57,7 +52,8 @@ export default {
searchParam: '',
currentPage: 1,
pageSize: 20,
searchType: 1
searchType: 1,
showSelfFlag: ''
},
total: 0,
tableHeader: [
......
......@@ -18,13 +18,14 @@
每天赠送 <span v-if="form.shareGiveValueType === 2"><el-input-number controls-position="right" :min="0" class="w200" type="number" :disabled="form.shareGiveValueType !== 2" v-model="form.shareGiveValue"></el-input-number> 体力给好友,仅能送一次</span>
</el-radio>
<span slot="footer" class="dialog-footer">
<el-button @click="submit" type="primary">保 存</el-button>
<el-button @click="handleSubmit" type="primary">保 存</el-button>
<el-button @click="close">关 闭</el-button>
</span>
</el-dialog>
</template>
<script>
import { ptyxConfigDetail, ptyxConfigSave } from '@/service/api/gameApi.js';
import { enableAccessControl, confirmInfo, alertInfo } from '@/utils/auth.js';
export default {
props: {
show: {
......@@ -49,6 +50,9 @@ export default {
show(val) {
if (val) {
this.ptyxConfigDetail();
if (enableAccessControl()) {
alertInfo();
}
}
}
},
......@@ -65,26 +69,31 @@ export default {
this.$emit('update:show', false);
},
submit() {
this.loading = true;
ptyxConfigSave(this.form).then(res => {
this.loading = false;
if (res.errorCode === 0) {
this.$tips({ type: 'success', message: '保存成功' });
this.close();
} else {
this.$tips({ type: 'error', message: res.message || '保存失败' });
}
});
},
handleSubmit() {
this.$confirm('是否保存配置?', '提示', {
confirmButtonText: '确定',
cancelBUttonText: '取消',
type: 'warning'
})
.then(() => {
this.loading = true;
ptyxConfigSave(this.form).then(res => {
this.loading = false;
if (res.errorCode === 0) {
this.$tips({ type: 'success', message: '保存成功' });
this.close();
} else {
this.$tips({ type: 'error', message: res.message || '保存失败' });
}
});
if (enableAccessControl()) {
confirmInfo(this.submit);
} else {
this.submit();
}
})
.catch(err => {
this.$tips({ type: 'info', message: '取消保存' });
});
.catch(err => {});
}
}
};
......
<!--
* @Description: In User Settings Edit
* @Author: your name
* @Date: 2019-08-06 21:01:38
* @LastEditTime: 2019-08-13 16:17:48
* @LastEditors: Please set LastEditors
-->
<template>
<el-form ref="form" :model="form" :rules="rules" label-width="120px" class="ptyx-add" v-loading="loading" element-loading-text="拼命加载中">
<section class="dm-form__wrap">
......@@ -109,7 +102,7 @@
<!-- 参与门槛 -->
<dm-threshold :form="form" :isAdd="isAdd" :thresholdData="thresholdData" ref="threshold"></dm-threshold>
<div class="btn-wrap_fixed" :class="{ on: asideShow }">
<el-button type="primary" @click="savePtyx('form')" v-if="!isInfo">保 存</el-button>
<el-button type="primary" @click="savePtyx('form')" :disabled="!canEdit" v-if="!isInfo">保 存</el-button>
<el-button @click="$router.go(-1)">返 回</el-button>
</div>
</el-form>
......@@ -136,6 +129,7 @@ export default {
// eslint-disable-next-line
defaultImg: require('../../../assets/img/loaderror.png'),
loading: false,
canEdit: true,
// 参与门槛组件传递的数据
thresholdData: {
searchParams: '', // 会员筛选
......@@ -278,6 +272,7 @@ export default {
this.loading = true;
let res = await ptyxDetail({ gameActivityId: this.$route.params.id });
this.loading = false;
this.canEdit = this.isEdit ? res.result.canEdit : true; // 不是本人禁用按钮
gameInfo = res.result.gameInfo;
this.form = Object.assign(this.form, {
gameActivityId: gameInfo.gameActivityId,
......@@ -384,6 +379,9 @@ export default {
},
//提交保存
async savePtyx(formName) {
if (!this.canEdit) {
return;
}
let flag = false;
if (!this.form.puzzleImg.code) {
this.$tips({ type: 'warning', message: '游戏拼图图片不能为空' });
......
......@@ -5,6 +5,7 @@
<el-option v-for="(v, i) in gameStatusOptions" :key="i" :label="v.label" :value="v.value"></el-option>
</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>
</div>
......@@ -15,13 +16,14 @@
<span v-else>{{ scope.row[v.prop] }}</span>
</template>
</el-table-column>
<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="220px" fixed="right">
<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.activityStatus === 0 || scope.row.activityStatus === 1" @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="是否删除该游戏?">
<dm-delete @confirm="delData(scope.row)" tips="是否删除该游戏?" v-if="scope.row.canEdit !== false">
<el-button type="text">删除</el-button>
</dm-delete>
</template>
......@@ -49,7 +51,7 @@ export default {
loading: false,
total: 0,
gameStatusOptions: [{ value: -1, label: '所有状态' }, { value: 1, label: '待开始' }, { value: 2, label: '进行中' }, { value: 3, label: '已结束' }],
listParams: { gameStatus: -1, searchParam: '', currentPage: 1, pageSize: 20 },
listParams: { gameStatus: -1, searchParam: '', currentPage: 1, pageSize: 20, showSelfFlag: '' },
tableHeader: [
{ label: '游戏名称', prop: 'gameName', align: 'left', fixed: 'left' },
{
......
......@@ -63,7 +63,7 @@
<!-- 参与门槛 -->
<dm-threshold :form="form" :isAdd="isAdd" :thresholdData="thresholdData" ref="threshold"></dm-threshold>
<div class="btn-wrap_fixed" :class="{ on: asideShow }">
<el-button type="primary" @click="znmSave('form')" v-if="!isInfo">保 存</el-button>
<el-button type="primary" @click="znmSave('form')" :disabled="!canEdit" v-if="!isInfo">保 存</el-button>
<el-button @click="$router.go(-1)">返 回</el-button>
</div>
<vue-gic-card :showCardDialog="showCardDialog" :cardLimit="3" @selectCard="selectCard"></vue-gic-card>
......@@ -86,6 +86,7 @@ export default {
const that = this;
return {
loading: false,
canEdit: true,
tableLoading: false,
// 参与门槛组件传递的数据
thresholdData: {
......@@ -222,7 +223,7 @@ export default {
this.loading = true;
let res = await znmDetail({ gameActivityId: isAdd ? '' : this.$route.params.id });
this.loading = false;
this.canEdit = this.isEdit ? res.result.canEdit : true; // 不是本人禁用按钮
if (typeof res.result === 'string') {
this.form.gameActivityId = res.result;
return;
......@@ -287,6 +288,9 @@ export default {
},
//提交保存
async znmSave(formName) {
if (!this.canEdit) {
return;
}
if (!this.firstStrategy.coupCardId || !this.lastStrategy.coupCardId) {
this.$tips({ type: 'warning', message: '首次奖项和后续奖不能为空' });
return;
......
......@@ -5,6 +5,7 @@
<el-option v-for="(v, i) in gameStatusOptions" :key="i" :label="v.label" :value="v.value"></el-option>
</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>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%" v-loading="loading">
......@@ -14,13 +15,14 @@
<span v-else>{{ scope.row[v.prop] }}</span>
</template>
</el-table-column>
<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="220px" fixed="right">
<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.activityStatus === 0 || scope.row.activityStatus === 1" @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="是否删除该游戏?">
<dm-delete @confirm="delData(scope.row)" tips="是否删除该游戏?" v-if="scope.row.canEdit !== false">
<el-button type="text">删除</el-button>
</dm-delete>
</template>
......@@ -42,7 +44,7 @@ export default {
return {
loading: false,
gameStatusOptions: [{ value: -1, label: '所有状态' }, { value: 1, label: '待开始' }, { value: 2, label: '进行中' }, { value: 3, label: '已结束' }],
listParams: { gameStatus: -1, searchParam: '', currentPage: 1, pageSize: 20 },
listParams: { gameStatus: -1, searchParam: '', currentPage: 1, pageSize: 20, showSelfFlag: '' },
total: 0,
tableHeader: [
{ label: '游戏名称', prop: 'gameName', minWidth: '150', align: 'left', fixed: 'left', tooltip: true },
......
......@@ -7,6 +7,7 @@
<p>3.短信模板内容不能含有【】符号</p>
<p>4.不能发送房产、移民、贷款、政治、色情、暴力等违法类短信</p>
<p>5.短信内容中不能输入Enter/换行,否则将导致短信分条发送</p>
<p>6.请注意:【短信签名】也计入短信字数,请注意计算</p>
</el-col>
</el-row>
<el-row :gutter="20" class="mt20">
......
......@@ -8,6 +8,7 @@
<el-select class="dm-select" v-model="listParams.sceneSettingId" placeholder="选择营销场景" @change="refresh">
<el-option v-for="item in sceneSettingIdOptions" :key="item.sceneSettingId" :label="item.sceneName" :value="item.sceneSettingId"></el-option>
</el-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>
</div>
......@@ -30,7 +31,7 @@
<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" @confirm="invalidData(scope.row)" tips="是否禁用该发送记录?">
<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>
</template>
......@@ -116,7 +117,8 @@ export default {
sendEndTime: '',
search: '',
currentPage: 1,
pageSize: 20
pageSize: 20,
showSelfFlag: ''
},
dateTime: ['', ''],
total: 0
......
......@@ -114,7 +114,7 @@
</el-form-item>
</section>
<div class="btn-wrap_fixed" :class="{ on: asideShow }">
<el-button type="primary" @click="updateTempAdvice">保 存</el-button>
<el-button type="primary" @click="handleUpdateTempAdvice">保 存</el-button>
<el-button @click="$router.go(-1)">返 回</el-button>
</div>
<var-dialog :options="options" :show.sync="varShow" @get-data="getVarData"></var-dialog>
......@@ -126,6 +126,7 @@ import { formatDateTimeByType, checkUrl } from '@/utils/index.js';
import varDialog from './variables.vue';
import innerUrl from '@/components/innerUrl/innerUrl';
import linktoolspage from '@/components/linktools/linktoolspage.vue';
import { enableAccessControl, confirmInfo, alertInfo } from '@/utils/auth.js';
export default {
name: 'add-record',
......@@ -180,6 +181,11 @@ export default {
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '模板消息', path: '/msg' }, { name: '模板消息编辑', path: '/msg/edit' }]);
this.listTemplateVariables();
},
mounted() {
if (enableAccessControl()) {
alertInfo();
}
},
watch: {
'info.urlType'(val) {
if (this.info.urlType === 1) {
......@@ -333,6 +339,102 @@ export default {
this.info[this.currentTxet] += val;
},
updateTempAdvice() {
const params = {
templateId: this.$route.params.id,
weixinTemplateId: this.info.weixinTemplateId
};
let header = this.info.headerText;
let remark = this.info.remarkText;
this.options.map(v => {
if (header.indexOf(v.label) > -1) {
// console.log(new RegExp((v.label+'/g')))
header = header.replace(v.label, v.value);
}
if (remark.indexOf(v.label) > -1) {
remark = remark.replace(v.label, v.value);
}
this.templateKeyDataList.map(w => {
if (w.keyName === '使用渠道:') {
if (w.type.indexOf(v.label) > -1) {
w.type = w.type.replace(v.label, v.value);
}
}
});
});
params.header = header + this.info.headerColor;
params.remark = remark + this.info.remarkColor;
this.templateKeyDataList.map(v => {
v.datas = v.type + v.color;
});
params.list = this.templateKeyDataList;
// 如果是积分即将过期
if (this.info.triggerCode === 'integralexpires') {
params.sendTime = this.info.sendTime;
params.sendType = 1;
params.remindDay = this.info.remindDay;
} else {
params.sendType = 0;
}
let jumpUrlInfoJson = {};
let app = {};
let h5 = '';
if (this.checked1 && !this.checked2) {
jumpUrlInfoJson = {
type1: this.jumpUrlInfoJson.type1
};
h5 = this.info.h5;
params.urlType = 1;
if (this.radio1 === 2) {
jumpUrlInfoJson.type1 = '自定义网址';
}
} else if (!this.checked1 && this.checked2) {
jumpUrlInfoJson = {
type2: this.jumpUrlInfoJson.type2
};
app = this.info.app;
if (!app.id && this.jumpUrlInfoJson.type2) {
app = {};
}
params.urlType = 2;
} else if (this.checked1 && this.checked2) {
jumpUrlInfoJson = {
type1: this.jumpUrlInfoJson.type1,
type2: this.jumpUrlInfoJson.type2
};
if (this.radio1 === 2) {
jumpUrlInfoJson.type1 = '自定义网址';
}
h5 = this.info.h5;
app = this.info.app;
if (!app.id && this.jumpUrlInfoJson.type2) {
app = {};
}
params.urlType = 3;
} else {
params.urlType = 0;
}
updateTempAdvice({
templateAdvice: JSON.stringify(params),
app: app.id ? JSON.stringify(app) : '',
h5: h5,
jumpUrlInfoJson: JSON.stringify(jumpUrlInfoJson)
})
.then(res => {
if (res.errorCode === 0) {
this.$router.go(-1);
this.$tips({ type: 'warning', message: '提交成功' });
} else {
this.$tips({ type: 'error', message: '提交失败' });
}
})
.catch(err => {
this.$tips({ type: 'error', message: '提交失败' });
});
},
handleUpdateTempAdvice() {
if (this.checked1 && this.radio1 === 2) {
this.checkUrl();
}
......@@ -346,105 +448,13 @@ export default {
type: 'warning'
})
.then(() => {
const params = {
templateId: this.$route.params.id,
weixinTemplateId: this.info.weixinTemplateId
};
let header = this.info.headerText;
let remark = this.info.remarkText;
this.options.map(v => {
if (header.indexOf(v.label) > -1) {
// console.log(new RegExp((v.label+'/g')))
header = header.replace(v.label, v.value);
}
if (remark.indexOf(v.label) > -1) {
remark = remark.replace(v.label, v.value);
}
this.templateKeyDataList.map(w => {
if (w.keyName === '使用渠道:') {
if (w.type.indexOf(v.label) > -1) {
w.type = w.type.replace(v.label, v.value);
}
}
});
});
params.header = header + this.info.headerColor;
params.remark = remark + this.info.remarkColor;
this.templateKeyDataList.map(v => {
v.datas = v.type + v.color;
});
params.list = this.templateKeyDataList;
// 如果是积分即将过期
if (this.info.triggerCode === 'integralexpires') {
params.sendTime = this.info.sendTime;
params.sendType = 1;
params.remindDay = this.info.remindDay;
if (enableAccessControl()) {
confirmInfo(this.updateTempAdvice);
} else {
params.sendType = 0;
this.updateTempAdvice();
}
let jumpUrlInfoJson = {};
let app = {};
let h5 = '';
if (this.checked1 && !this.checked2) {
jumpUrlInfoJson = {
type1: this.jumpUrlInfoJson.type1
};
h5 = this.info.h5;
params.urlType = 1;
if (this.radio1 === 2) {
jumpUrlInfoJson.type1 = '自定义网址';
}
} else if (!this.checked1 && this.checked2) {
jumpUrlInfoJson = {
type2: this.jumpUrlInfoJson.type2
};
app = this.info.app;
if (!app.id && this.jumpUrlInfoJson.type2) {
app = {};
}
params.urlType = 2;
} else if (this.checked1 && this.checked2) {
jumpUrlInfoJson = {
type1: this.jumpUrlInfoJson.type1,
type2: this.jumpUrlInfoJson.type2
};
if (this.radio1 === 2) {
jumpUrlInfoJson.type1 = '自定义网址';
}
h5 = this.info.h5;
app = this.info.app;
if (!app.id && this.jumpUrlInfoJson.type2) {
app = {};
}
params.urlType = 3;
} else {
params.urlType = 0;
}
updateTempAdvice({
templateAdvice: JSON.stringify(params),
app: app.id ? JSON.stringify(app) : '',
h5: h5,
jumpUrlInfoJson: JSON.stringify(jumpUrlInfoJson)
})
.then(res => {
if (res.errorCode === 0) {
this.$router.go(-1);
this.$tips({ type: 'warning', message: '提交成功' });
} else {
this.$tips({ type: 'error', message: '提交失败' });
}
})
.catch(err => {
this.$tips({ type: 'error', message: '提交失败' });
});
})
.catch(err => {
console.log(err);
this.$tips({ type: 'info', message: '已取消提交' });
});
.catch(err => {});
},
getRightUrl(data) {
console.log(data);
......
......@@ -27,7 +27,7 @@
<el-table-column label="操作" align="left" width="140px" fixed="right">
<template slot-scope="scope">
<el-button v-if="scope.row.bindStatusDesc !== '未绑定'" type="text" @click="$router.push('/msg/edit/' + scope.row.templateId)">编辑</el-button>
<dm-delete v-if="scope.row.bindStatusDesc !== '未绑定'" @confirm="delData(scope.row)" tips="将同步删除公众号后台对应模板,一旦删除无法恢复。您确认吗?">
<dm-delete v-if="scope.row.bindStatusDesc !== '未绑定'" @confirm="handleDel(scope.row)" tips="将同步删除公众号后台对应模板,一旦删除无法恢复。您确认吗?">
<el-button type="text">删除</el-button>
</dm-delete>
</template>
......@@ -39,6 +39,7 @@
<script>
import { pageTemplateMessage, syncWechatMessageTemplate, getLatestSyncTime, deleteTemplateAdvice } from '@/service/api/msgApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
import { enableAccessControl, confirmInfo } from '@/utils/auth.js';
export default {
name: 'sms-record',
data() {
......@@ -142,6 +143,13 @@ export default {
this.listParams.sortBy = obj.order === 'descending' ? obj.prop + ' desc' : obj.prop;
this.pageTemplateMessage();
},
handleDel(row) {
if (enableAccessControl()) {
confirmInfo(this.delData, row);
} else {
this.delData(row);
}
},
delData(row) {
deleteTemplateAdvice({ templateId: row.templateId, weixinTemplateId: row.weixinTemplateId })
.then(res => {
......
......@@ -72,7 +72,7 @@
</el-form>
<!-- 图片弹窗 -->
<el-dialog title="提示" :visible.sync="imgShow" width="60%" :before-close="close">
<dm-img-box :activeId.sync="mediaId" :scrollStyle="{ maxHeight: '500px', overflowY: 'auto', overflowX: 'hidden' }"></dm-img-box>
<dm-img-box :selfSwitch="false" :activeId.sync="mediaId" :scrollStyle="{ maxHeight: '500px', overflowY: 'auto', overflowX: 'hidden' }"></dm-img-box>
<span slot="footer" class="dialog-footer"><el-button @click="close">关 闭</el-button></span>
</el-dialog>
<!-- 视频 -->
......
......@@ -48,9 +48,9 @@
</el-radio-group>
<div class="pt20">
<div v-show="info.contentType === 0" style="padding:15px; border:1px solid #DCDFE6;border-radius:2px;">
<dm-img-text @get-data="getImgTextData" :radioShow="true" :auto="false" :imageTextId="info.imageTextId" :activeId="info.imageTextWechatId"></dm-img-text>
<dm-img-text :showSelf="false" :showSelfFlag="showSelfFlag" @get-data="getImgTextData" :radioShow="true" :auto="false" :imageTextId="info.imageTextId" :activeId="info.imageTextWechatId"></dm-img-text>
</div>
<dm-img-box v-show="info.contentType === 2" :mediaId="info.mediaId" @get-data="getImgData"></dm-img-box>
<dm-img-box :selfSwitch="false" v-show="info.contentType === 2" :mediaId="info.mediaId" @get-data="getImgData"></dm-img-box>
<div v-show="info.contentType === 1">
<!-- <wxText :msgText="info.content" @listenWxText="getWxText"></wxText> -->
<wx-text :showWxApp="false" :appendToBody="true" :value.sync="info.content" :urlType.sync="info.urlType" :jumpUrlInfo.sync="info.jumpUrlInfo" :isSupportVar="false" ref="wxText"></wx-text>
......@@ -77,7 +77,7 @@
</el-table>
</section>
<div class="btn-wrap_fixed" :class="{ on: asideShow }">
<el-button type="primary" @click="submit" v-if="!isInfo">提 交</el-button>
<el-button type="primary" @click="submit" v-if="!isInfo" :disabled="canSend">提 交</el-button>
<el-button @click="$router.go(-1)">返 回</el-button>
</div>
</div>
......@@ -85,6 +85,7 @@
<script>
import dmImgText from '@/components/libs/imgTextTemp';
import dmImgBox from '@/components/libs/imgTemp/index-box.vue';
import { getIsShowSelf } from '@/service/api/commonApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
import { checkMessageSendCount } from '@/service/api/messageApi.js';
import { sceneSettingList, sendRecordSaveService, wechatImageTextEdit, getWechatMarketingDetail } from '@/service/api/wechatApi.js';
......@@ -101,12 +102,20 @@ export default {
computed: {
asideShow() {
return this.$store.state.marketing.asideShow;
},
showSelfFlag() {
if (this.isAdd || this.isEdit) {
return 1; // 仅看本人
}
if (this.isInfo) {
return 0; // 可见全部
}
}
},
data() {
return {
loading: false,
canSend: false,
pickerOptions: {
disabledDate(val) {
return Date.now() >= val.getTime() + 24 * 60 * 60 * 1000;
......@@ -176,12 +185,21 @@ export default {
}
if (this.isAdd) {
this.sceneSettingList();
this.handleIsShowSelf();
}
},
beforeDestroy() {
this.$store.commit('mutations_layoutTips', '');
},
methods: {
handleIsShowSelf() {
getIsShowSelf({ page: 'teletext' }).then(res => {
if (res.result.teletextFlag === true) {
this.canSend = true; // 限制发送两次
this.$message({ message: '本月已使用两次群发', type: 'error' });
}
});
},
async getWechatMarketingDetail() {
let res = await getWechatMarketingDetail({ wechatTeletextId: this.$route.params.id });
if (res.errorCode === 0 && res.result.wechatDTO) {
......@@ -291,13 +309,25 @@ export default {
};
const res = await checkMessageSendCount(params);
if (res.errorCode === 0) {
this.$confirm(`即将发送${res.result}人,是否发送?`, '提示', {
let message = '';
const _sendFlag = res.result > 0; // true可发送
if (_sendFlag) {
message = `即将发送${res.result}人,是否发送?`;
} else {
// 发送0人提示
message = '发送人数为0,请重新选择发送人群';
}
this.$confirm(message, '提示', {
confirmButtonText: '确定',
cancelBUttonText: '取消',
type: 'warning'
type: _sendFlag ? 'warning' : 'error'
})
.then(() => {
this.sendRecordSaveService();
if (_sendFlag) {
this.sendRecordSaveService();
} else {
return true;
}
})
.catch(() => {
// this.$tips({type: 'info',message: '已取消发送'});
......
/* * @Author: zhangmeng * @Date: 2018-08-14 15:45:36 * @Last Modified by: zhangmeng * @Last Modified time: 2019-01-08 14:22:58 */
<template>
<section class="dm-wrap">
<!-- <el-button type="danger" plain disabled>删除</el-button> -->
......@@ -13,8 +12,12 @@
<el-option v-for="item in sceneSettingIdOptions" :key="item.sceneSettingId" :label="item.sceneName" :value="item.sceneSettingId"></el-option>
</el-select>
<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-button class="fr" type="primary" @click="$router.push('/wechat/record/add')">新建群发</el-button>
<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>
</div>
<el-table tooltipEffect="light" :data="recordList" style="width: 100%" row-key="sendTime" v-loading="loading">
<el-table-column :min-width="100" align="left" label="时间" prop="createTime">
......@@ -35,16 +38,17 @@
</div>
</template>
</el-table-column>
<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="180px" fixed="right">
<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)" tips="是否删除该发送记录?">
<dm-delete @confirm="delData(scope.row)" v-if="scope.row.canEdit !== false" tips="是否删除该发送记录?">
<el-button 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" tips="是否禁用该发送记录?">
<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>
<el-button type="text" v-if="scope.row.sendStatus === 0" @click="$router.push('/wechat/record/edit/' + scope.row.wechatTeletextId)">编辑</el-button>
<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="scope.row.sendStatus !== 0" @click="$router.push('/wechat/record/info/' + scope.row.wechatTeletextId)">详情</el-button>
</template>
</el-table-column>
......@@ -55,6 +59,7 @@
</template>
<script>
import { sendRecordList, sceneSettingList, delWechatMarketingRecord, invalidWechatMarketingRecord } from '@/service/api/wechatApi.js';
import { getIsShowSelf } from '@/service/api/commonApi.js';
import dmDialog from './dialog';
import { formatDateTimeByType } from '@/utils/index.js';
import timeCounts from '@/components/timeCount/index.vue';
......@@ -69,6 +74,7 @@ export default {
contentTypeOptions: [{ value: '', label: '所有类型' }, { value: 0, label: '图文消息' }, { value: 1, label: '文本消息' }, { value: 2, label: '图片' }],
sendStatusOptions: [{ value: '', label: '所有状态' }, { value: 0, label: '待发送' }, { value: 1, label: '已发送' }, { value: 2, label: '已失效' }],
sceneSettingIdOptions: [],
canSend: false,
loading: false,
recordList: [],
recordHeader: [
......@@ -164,7 +170,8 @@ export default {
hideInvalid: 0, //否 Number 隐藏失效: 1 (不隐藏: 0)
clerkName: '', //否 String 输入发送人搜索
currentPage: 1, //是 Number 当前页面
pageSize: 20 //是 Number 每页显示条数
pageSize: 20, //是 Number 每页显示条数
showSelfFlag: '' // 仅看本人
},
total: 0,
dmDialogShow: false,
......@@ -174,6 +181,7 @@ export default {
created() {
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理' }, { name: '微信营销', path: '' }, { name: '发送记录', path: '' }]);
this.sendRecordList();
this.handleIsShowSelf();
this.sceneSettingList();
},
methods: {
......@@ -202,6 +210,13 @@ export default {
this.sceneSettingIdOptions = res.result || [];
this.sceneSettingIdOptions.unshift({ sceneName: '所有营销场景', sceneSettingId: '' });
},
handleIsShowSelf() {
getIsShowSelf({ page: 'teletext' }).then(res => {
if (res.result.teletextFlag === true) {
this.canSend = true; // 限制发送两次
}
});
},
//发送记录操作--查看数据
queryData(row) {
this.dmDialogShow = true;
......
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