Commit a4fcf15f by caoyanzhi

Merge branch 'feature/4月-菜单和权限' into dev

parents 6a6be1cf f0ac6a76
...@@ -57,11 +57,9 @@ module.exports = { ...@@ -57,11 +57,9 @@ module.exports = {
// 2.领取记录 (按钮,控制“领取记录”弹窗内所有操作权限) // 2.领取记录 (按钮,控制“领取记录”弹窗内所有操作权限)
getCardLog: ['领取记录', 1, 2] getCardLog: ['领取记录', 1, 2]
}, },
// TODO 评价回访设置 'evaluate-set': {
// TODO 1.新增评价回访设置 (按钮,控制“新增评价回访设置”页面内所有操作权限) saveEvaluateSet: ['保存', 1, 1]
// TODO 2.查看 (按钮,控制“查看评价回访设置”页面内所有操作权限) },
// TODO 3.编辑 (按钮,控制“修改评价回访设置”页面内所有操作权限)
// TODO 4.删除 (按钮)
material: { material: {
// 1.新建文本 (按钮,控制“新建文本”弹窗内所有操作权限); // 1.新建文本 (按钮,控制“新建文本”弹窗内所有操作权限);
addText: ['文本-新建文本', 1, 1], addText: ['文本-新建文本', 1, 1],
...@@ -273,20 +271,11 @@ module.exports = { ...@@ -273,20 +271,11 @@ module.exports = {
// 4.详情(按钮,控制“成员详情”弹窗内所有操作权限); // 4.详情(按钮,控制“成员详情”弹窗内所有操作权限);
checkContactMemberDetail: ['详情', 1, 2] checkContactMemberDetail: ['详情', 1, 2]
}, },
// TODO 导购设置-导购操作权限设置 // 导购设置-导购操作权限设置
// TODO 1.保存(按钮) // 保存(按钮)
// TODO 导购设置-导购应用权限设置 'guide-setting': {
// TODO 1.我的客户 saveGuideSetting: ['保存', 1, 1]
// TODO 2.云日报 },
// TODO 3.月指标
// TODO 4.商品中心
// TODO 5.看数据
// TODO 6.订单评价
// TODO 7.扫码核销
// TODO 8.e袋洗
// TODO 9.佣金结算
// TODO 10.营销任务
// TODO 11.保存(按钮)
enterpriseSet: { enterpriseSet: {
// 1.同步刷新(按钮) // 1.同步刷新(按钮)
refreshStoreInfo: ['同步刷新', 1, 2], refreshStoreInfo: ['同步刷新', 1, 2],
......
{"multipleAssign":"multipleAssign","assign":"assign","syncTagLog":"syncTagLog","willSyncTag":"willSyncTag","groupExpire":"groupExpire","syncGroup":"syncGroup","addGroupTemp":"addGroupTemp","editGroupTemp":"editGroupTemp","setStoreArea":"setStoreArea","delGroupTemp":"delGroupTemp","searchSetSave":"searchSetSave","addCard":"addCard","editCard":"editCard","delCard":"delCard","sendCardLog":"sendCardLog","getCardLog":"getCardLog","addText":"addText","editText":"editText","delText":"delText","textAssignStore":"textAssignStore","textUsedStore":"textUsedStore","addImage":"addImage","editImage":"editImage","delImage":"delImage","imageAssignStore":"imageAssignStore","imageUsedStore":"imageUsedStore","addWeb":"addWeb","editWeb":"editWeb","delWeb":"delWeb","webAssignStore":"webAssignStore","webUsedStore":"webUsedStore","addVideo":"addVideo","editVideo":"editVideo","delVideo":"delVideo","videoAssignStore":"videoAssignStore","videoUsedStore":"videoUsedStore","addFile":"addFile","editFile":"editFile","delFile":"delFile","fileAssignStore":"fileAssignStore","fileUsedStore":"fileUsedStore","addApps":"addApps","editApps":"editApps","delApps":"delApps","appsAssignStore":"appsAssignStore","appsUsedStore":"appsUsedStore","saveGoodsSet":"saveGoodsSet","exportActiveUser":"exportActiveUser","exportLoginUser":"exportLoginUser","exportAreaLoginUser":"exportAreaLoginUser","multipleDelReport":"multipleDelReport","exportReport":"exportReport","reportDetail":"reportDetail","multipleDelReportDetail":"multipleDelReportDetail","delReportDetail":"delReportDetail","showReportDetail":"showReportDetail","multipleExportReport":"multipleExportReport","saveTaskSet":"saveTaskSet","monthTarget":"monthTarget","dayTarget":"dayTarget","exportMonthTask":"exportMonthTask","checkMonthTask":"checkMonthTask","multipleDelTask":"multipleDelTask","delTask":"delTask","exportStoreList":"exportStoreList","checkStoreList":"checkStoreList","exportStoreDetail":"exportStoreDetail","checkStoreDetail":"checkStoreDetail","exportStoreDetailPop":"exportStoreDetailPop","previewStoreDetail":"previewStoreDetail","exportGrTaskList":"exportGrTaskList","checkGrTaskList":"checkGrTaskList","exportTaskRecord":"exportTaskRecord","multipleDelTaskRecord":"multipleDelTaskRecord","checkTaskRecord":"checkTaskRecord","exportTaskDetail":"exportTaskDetail","multipleDelTaskDetail":"multipleDelTaskDetail","delTaskDetail":"delTaskDetail","resolveTaskDetail":"resolveTaskDetail","previewTaskDetail":"previewTaskDetail","exportTaskView":"exportTaskView","multipleDelTaskView":"multipleDelTaskView","checkTaskView":"checkTaskView","exportTaskViewDetail":"exportTaskViewDetail","multipleDelTaskViewDetail":"multipleDelTaskViewDetail","addSalutatory":"addSalutatory","editSalutatory":"editSalutatory","delSalutatory":"delSalutatory","refreshStoreMember":"refreshStoreMember","exportContact":"exportContact","checkContactDetail":"checkContactDetail","checkContactMemberDetail":"checkContactMemberDetail","refreshStoreInfo":"refreshStoreInfo","saveMemberSecret":"saveMemberSecret","addMemberAppsSecret":"addMemberAppsSecret","editMemberAppsSecret":"editMemberAppsSecret","delMemberAppsSecret":"delMemberAppsSecret","addAppsSecret":"addAppsSecret","getAppsSecret":"getAppsSecret","editAppsSecret":"editAppsSecret","delAppsSecret":"delAppsSecret","bindStoreList":"bindStoreList","refreshAdminList":"refreshAdminList"} {"multipleAssign":"multipleAssign","assign":"assign","syncTagLog":"syncTagLog","willSyncTag":"willSyncTag","groupExpire":"groupExpire","syncGroup":"syncGroup","addGroupTemp":"addGroupTemp","editGroupTemp":"editGroupTemp","setStoreArea":"setStoreArea","delGroupTemp":"delGroupTemp","searchSetSave":"searchSetSave","addCard":"addCard","editCard":"editCard","delCard":"delCard","sendCardLog":"sendCardLog","getCardLog":"getCardLog","saveEvaluateSet":"saveEvaluateSet","addText":"addText","editText":"editText","delText":"delText","textAssignStore":"textAssignStore","textUsedStore":"textUsedStore","addImage":"addImage","editImage":"editImage","delImage":"delImage","imageAssignStore":"imageAssignStore","imageUsedStore":"imageUsedStore","addWeb":"addWeb","editWeb":"editWeb","delWeb":"delWeb","webAssignStore":"webAssignStore","webUsedStore":"webUsedStore","addVideo":"addVideo","editVideo":"editVideo","delVideo":"delVideo","videoAssignStore":"videoAssignStore","videoUsedStore":"videoUsedStore","addFile":"addFile","editFile":"editFile","delFile":"delFile","fileAssignStore":"fileAssignStore","fileUsedStore":"fileUsedStore","addApps":"addApps","editApps":"editApps","delApps":"delApps","appsAssignStore":"appsAssignStore","appsUsedStore":"appsUsedStore","saveGoodsSet":"saveGoodsSet","exportActiveUser":"exportActiveUser","exportLoginUser":"exportLoginUser","exportAreaLoginUser":"exportAreaLoginUser","multipleDelReport":"multipleDelReport","exportReport":"exportReport","reportDetail":"reportDetail","multipleDelReportDetail":"multipleDelReportDetail","delReportDetail":"delReportDetail","showReportDetail":"showReportDetail","multipleExportReport":"multipleExportReport","saveTaskSet":"saveTaskSet","monthTarget":"monthTarget","dayTarget":"dayTarget","exportMonthTask":"exportMonthTask","checkMonthTask":"checkMonthTask","multipleDelTask":"multipleDelTask","delTask":"delTask","exportStoreList":"exportStoreList","checkStoreList":"checkStoreList","exportStoreDetail":"exportStoreDetail","checkStoreDetail":"checkStoreDetail","exportStoreDetailPop":"exportStoreDetailPop","previewStoreDetail":"previewStoreDetail","exportGrTaskList":"exportGrTaskList","checkGrTaskList":"checkGrTaskList","exportTaskRecord":"exportTaskRecord","multipleDelTaskRecord":"multipleDelTaskRecord","checkTaskRecord":"checkTaskRecord","exportTaskDetail":"exportTaskDetail","multipleDelTaskDetail":"multipleDelTaskDetail","delTaskDetail":"delTaskDetail","resolveTaskDetail":"resolveTaskDetail","previewTaskDetail":"previewTaskDetail","exportTaskView":"exportTaskView","multipleDelTaskView":"multipleDelTaskView","checkTaskView":"checkTaskView","exportTaskViewDetail":"exportTaskViewDetail","multipleDelTaskViewDetail":"multipleDelTaskViewDetail","addSalutatory":"addSalutatory","editSalutatory":"editSalutatory","delSalutatory":"delSalutatory","refreshStoreMember":"refreshStoreMember","exportContact":"exportContact","checkContactDetail":"checkContactDetail","checkContactMemberDetail":"checkContactMemberDetail","saveGuideSetting":"saveGuideSetting","refreshStoreInfo":"refreshStoreInfo","saveMemberSecret":"saveMemberSecret","addMemberAppsSecret":"addMemberAppsSecret","editMemberAppsSecret":"editMemberAppsSecret","delMemberAppsSecret":"delMemberAppsSecret","addAppsSecret":"addAppsSecret","getAppsSecret":"getAppsSecret","editAppsSecret":"editAppsSecret","delAppsSecret":"delAppsSecret","bindStoreList":"bindStoreList","refreshAdminList":"refreshAdminList"}
\ No newline at end of file \ No newline at end of file
...@@ -73,14 +73,9 @@ module.exports = [ ...@@ -73,14 +73,9 @@ module.exports = [
{ {
menu: ['评价回访', '', 1, 'iconpingjiahuifang'], menu: ['评价回访', '', 1, 'iconpingjiahuifang'],
children: [ children: [
// { {
// menu: ['评价回访设置', '', 1], // TODO 本次新增页面 menu: ['评价回访设置', 'evaluate-set', 1],
// children: [ }
// { menu: ['新增规则策略', '', 1] }, // TODO 本次新增页面
// { menu: ['编辑规则策略', '', 1] }, // TODO 本次新增页面
// { menu: ['查看规则策略', '', 1] }, // TODO 本次新增页面
// ]
// }
] ]
}, },
{ {
...@@ -225,9 +220,9 @@ module.exports = [ ...@@ -225,9 +220,9 @@ module.exports = [
}, },
{ {
menu: ['导购设置', '', 1, 'icondaogoushezhi'], menu: ['导购设置', '', 1, 'icondaogoushezhi'],
// children: [ children: [
// { menu: ['导购设置', '', 1] } // update 本次新增页面 { menu: ['导购设置', 'guide-setting', 1] }
// ] ]
}, },
{ {
menu: ['应用接入', '', 1, 'iconyingyongjieru'], menu: ['应用接入', '', 1, 'iconyingyongjieru'],
......
No preview for this file type
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<el-dropdown-item v-for="el in storeList" :key="el.enterpriseId" :class="['store-item', { actived: el.enterpriseId == activedStoreId }]" :command="el.enterpriseId"> <el-dropdown-item v-for="el in storeList" :key="el.enterpriseId" :class="['store-item', { actived: el.enterpriseId == activedStoreId }]" :command="el.enterpriseId">
<div> <div>
<div class="store-name">{{ el.brandName }}</div> <div class="store-name">{{ el.brandName }}</div>
<div class="default-store-tag" v-if="el.enterpriseId == defaultStoreId">默认商户</div> <div class="default-store-tag" v-if="el.defaultFlag == 1">默认商户</div>
</div> </div>
<i class="el-icon-check checked" v-if="el.enterpriseId == activedStoreId"></i> <i class="el-icon-check checked" v-if="el.enterpriseId == activedStoreId"></i>
</el-dropdown-item> </el-dropdown-item>
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
</template> </template>
<script> <script>
// 更改默认商户 接口联调
import { getRequest } from '@/api/api.js'; import { getRequest } from '@/api/api.js';
import errorMsg from '@/common/js/error.js'; import errorMsg from '@/common/js/error.js';
import expiredDialog from '@/components/company/expired-dialog.vue'; import expiredDialog from '@/components/company/expired-dialog.vue';
...@@ -51,7 +50,6 @@ export default { ...@@ -51,7 +50,6 @@ export default {
}, },
storeList: [], storeList: [],
activedStoreId: '', activedStoreId: '',
defaultStoreId: '',
isExpired: false isExpired: false
}; };
}, },
...@@ -85,10 +83,9 @@ export default { ...@@ -85,10 +83,9 @@ export default {
this.$emit('changeStore', true); this.$emit('changeStore', true);
getRequest('/haoban-manage3-web/enterprise-is-over', { enterpriseId }) getRequest('/haoban-manage3-web/enterprise-is-over', { enterpriseId })
.then(res => { .then(res => {
let resData = res.data;
const { errorCode, result } = res.data || {}; const { errorCode, result } = res.data || {};
if (errorCode != 1) { if (errorCode != 1) {
errorMsg.errorMsg(resData); errorMsg.errorMsg(res.data);
return; return;
} }
this.isExpired = result; this.isExpired = result;
...@@ -104,9 +101,22 @@ export default { ...@@ -104,9 +101,22 @@ export default {
// onClosed() {}, // onClosed() {},
onSave() { onSave() {
this.changeStore.loading = true; this.changeStore.loading = true;
getRequest('/haoban-manage3-web/set-default-gicenterprise', { enterpriseId: this.changeStore.storeId })
.then(res => {
const { errorCode } = res.data || {};
if (errorCode != 1) {
errorMsg.errorMsg(res.data);
return;
}
this.getStoreList();
this.changeStore.show = false;
this.$message.succes('设置成功');
})
.finally(() => {
setTimeout(() => { setTimeout(() => {
this.changeStore.loading = false; this.changeStore.loading = false;
}, 1000); }, 100);
});
} }
} }
}; };
......
<template>
<div class="hb-form-bottom" :style="{ width: width, 'justify-content': horizontal == 'left' ? 'flex-start' : horizontal == 'right' ? 'flex-end' : 'center' }">
<slot></slot>
</div>
</template>
<script>
export default {
name: 'HbFormBottom',
inject: ['layoutVm'],
props: {
horizontal: {
type: String,
// 可选值: left:居左 right:居右
default: 'center'
}
},
data() {
return {
width: '0px'
};
},
mounted() {
this.width = this.$parent.$el.offsetWidth + 'px';
this.layoutVm.pagePaddingBottom = this.$el.offsetHeight + 'px';
},
beforeDestroy() {
this.layoutVm.pagePaddingBottom = null;
}
};
</script>
<style lang="scss" scoped>
.hb-form-bottom {
display: flex;
align-items: center;
position: fixed;
right: 0;
bottom: 0;
z-index: 100;
width: calc(100% - 12px);
height: 56px;
background: #ffffff;
box-shadow: 1px -2px 8px 0px rgba(220, 223, 230, 0.6);
}
</style>
<template> <template>
<div class="hb-layout" v-loading="fullLoading.visible"> <div class="hb-layout" v-loading="fullLoading.visible">
<main-menu ref="mainMenu" :menu-list="menuList" :actived-code="activedMenu.length > 0 ? activedMenu[0].menuCode : ''" @showLoading="onShowLoading"></main-menu> <main-menu ref="mainMenu" :menu-list="menuList" :actived-code="activedMenu.length > 0 ? activedMenu[0].menuCode : ''" @showLoading="onShowLoading"></main-menu>
<aside-menu :menu-list="activedMenu.length > 0 ? activedMenu[0].childList : []" :actived-code="activedMenu.length > 2 ? activedMenu[2].menuCode : ''"></aside-menu> <aside-menu v-show="showAside" :menu-list="activedMenu.length > 0 ? activedMenu[0].childList : []" :actived-code="activedMenu.length > 2 ? activedMenu[2].menuCode : ''"></aside-menu>
<div class="hb-layout-content"> <div class="hb-layout-content">
<bread-menu v-if="activedMenu.length > 3" :menu-list="activedMenu.slice(2)"></bread-menu> <bread-menu v-if="activedMenu.length > 3" :menu-list="activedMenu.slice(2)"></bread-menu>
<div class="hb-layout-pager" :style="{ height: activedMenu.length > 3 ? `calc(100% - 30px)` : '100%' }"> <div class="hb-layout-pager" :style="{ height: activedMenu.length > 3 ? `calc(100% - 30px)` : '100%', 'padding-bottom': pagePaddingBottom }">
<!-- 页面内容 --> <!-- 页面内容 -->
<!-- <router-view v-if="activeBrand" :brandId="activeBrand" :activeGroupId="activeGroup" :tabType="activeTab" @showTab="showTab"></router-view> --> <!-- <router-view v-if="activeBrand" :brandId="activeBrand" :activeGroupId="activeGroup" :tabType="activeTab" @showTab="showTab"></router-view> -->
<keep-alive v-if="$route.meta.keepAlive"> <keep-alive v-if="$route.meta.keepAlive">
...@@ -36,7 +36,8 @@ export default { ...@@ -36,7 +36,8 @@ export default {
}, },
data() { data() {
return { return {
breadShow: true, showAside: true,
pagePaddingBottom: null,
enterpriseId: '', enterpriseId: '',
// 菜单平铺数据 // 菜单平铺数据
flatMenuList: [], flatMenuList: [],
...@@ -126,7 +127,9 @@ export default { ...@@ -126,7 +127,9 @@ export default {
}, },
onCommand(command) { onCommand(command) {
const methods = { const methods = {
updateApplyCount: () => this.$refs.mainMenu.updateAplyCount() updateApplyCount: () => this.$refs.mainMenu.updateAplyCount(),
showAside: () => (this.showAside = true),
hideAside: () => (this.showAside = false)
}; };
if (typeof methods[command] == 'function') { if (typeof methods[command] == 'function') {
methods[command](); methods[command]();
......
...@@ -31,6 +31,7 @@ import htmlToPdf from '@/components/utils/htmlToPdf'; ...@@ -31,6 +31,7 @@ import htmlToPdf from '@/components/utils/htmlToPdf';
import VueAMap from 'vue-amap'; import VueAMap from 'vue-amap';
import Vue from 'vue'; import Vue from 'vue';
import buttonCode from '../menu-data/button-code.json'; import buttonCode from '../menu-data/button-code.json';
import HbFormBottom from '@/components/layout/hb-form-bottom.vue';
// Vue.use(contentmenu); // Vue.use(contentmenu);
Vue.use(VueAMap); Vue.use(VueAMap);
...@@ -46,6 +47,7 @@ Vue.use(vueOfficeUploadImage); ...@@ -46,6 +47,7 @@ Vue.use(vueOfficeUploadImage);
Vue.use(vueOfficeArea); Vue.use(vueOfficeArea);
Vue.use(vueOfficeAside); Vue.use(vueOfficeAside);
Vue.use(vueOfficeHeader); Vue.use(vueOfficeHeader);
Vue.component('hb-form-bottom', HbFormBottom);
Vue.config.productionTip = false; Vue.config.productionTip = false;
// Vue.use(ElementUI, { size: 'large' }); // Vue.use(ElementUI, { size: 'large' });
......
...@@ -107,6 +107,11 @@ export const constantRouterMap = [ ...@@ -107,6 +107,11 @@ export const constantRouterMap = [
component: _import('enterprise', 'salutatorySet') component: _import('enterprise', 'salutatorySet')
}, },
{ {
path: '/guide-setting',
name: '导购设置',
component: _import('enterprise', 'guide-setting')
},
{
path: '/setting', path: '/setting',
name: '操作设置', name: '操作设置',
component: _import('setting', 'index') component: _import('setting', 'index')
...@@ -412,12 +417,6 @@ export const constantRouterMap = [ ...@@ -412,12 +417,6 @@ export const constantRouterMap = [
path: '/evaluate-set', path: '/evaluate-set',
name: '订单评价', name: '订单评价',
component: _import('apps/order-evaluate', 'evaluate-set') component: _import('apps/order-evaluate', 'evaluate-set')
},{
path: '/bad-evaluate',
name: '不良评价回访设置',
component: _import('apps/order-evaluate', 'bad-evaluate-set')
}
]
}, },
{ {
...@@ -440,6 +439,8 @@ export const constantRouterMap = [ ...@@ -440,6 +439,8 @@ export const constantRouterMap = [
name: 'error500', name: 'error500',
component: errorPage component: errorPage
} }
]
}
]; ];
export default new Router({ export default new Router({
// mode:'history', // mode:'history',
......
...@@ -14,28 +14,48 @@ ...@@ -14,28 +14,48 @@
<el-button v-if="$getButtonLimit($buttonCode.addCard)" :limit-code="$buttonCode.addCard" type="primary" @click="toNewCard" :disabled="$store.state.wxEnterpriseType">新增卡券</el-button> <el-button v-if="$getButtonLimit($buttonCode.addCard)" :limit-code="$buttonCode.addCard" type="primary" @click="toNewCard" :disabled="$store.state.wxEnterpriseType">新增卡券</el-button>
</div> </div>
<el-table class="select-table" ref="multipleTable" v-loading="loading" :data="tableData" tooltip-effect="dark" style="width: calc(100% - 3px);"> <el-table class="select-table" ref="multipleTable" v-loading="loading" :data="tableData" tooltip-effect="dark" style="width: calc(100% - 3px);">
<el-table-column prop="" label="卡券名称" show-overflow-tooltip> <el-table-column prop="" label="卡券名称" show-overflow-tooltip min-width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.cardName }} {{ scope.row.cardName }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="卡券类型"> <el-table-column prop="" label="卡券类型" min-width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.cardType == 0">抵金券</span> <span v-if="scope.row.cardType == 0">抵金券</span>
<span v-if="scope.row.cardType == 1">折扣券</span> <span v-if="scope.row.cardType == 1">折扣券</span>
<span v-if="scope.row.cardType == 2">兑换券</span> <span v-if="scope.row.cardType == 2">兑换券</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="有效期" show-overflow-tooltip> <el-table-column prop="" label="卡券模板有效期" show-overflow-tooltip min-width="260px">
<template slot-scope="scope">{{ scope.row.effectDateString || '--' }}</template> <template slot-scope="scope">{{ scope.row.effectDateString || '--' }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="库存"> <el-table-column prop="" label="库存" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ scope.row.couponStock }}</div> <div>{{ scope.row.couponStock }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="操作" show-overflow-tooltip v-if="$getButtonLimit($buttonCode.editCard) || $getButtonLimit($buttonCode.delCard)"> <el-table-column label="卡券状态" prop="cardStatus" min-width="90px">
<template slot-scope="{ row }">
<!-- 0删除1有效 2已过期 3未开始 -->
<span class="state-point state-point-error" v-if="row.cardStatus == 0">已删除</span>
<span class="state-point state-point-success" v-if="row.cardStatus == 1">正常</span>
<span class="state-point state-point-error" v-if="row.cardStatus == 2">已过期</span>
<span class="state-point state-point-default" v-if="row.cardStatus == 3">未生效</span>
</template>
</el-table-column>
<el-table-column label="创建人" prop="creatorName" show-overflow-tooltip min-width="120px"></el-table-column>
<el-table-column label="编辑人" prop="modifierName" show-overflow-tooltip min-width="120px"></el-table-column>
<el-table-column label="创建时间" prop="createTime" min-width="120px">
<div slot-scope="{ row }" style="line-height: normal">
<template v-if="row.createTime">
<p>{{ row.createTime | timeStampToYmd }}</p>
<p>{{ row.createTime | timeStampToHms }}</p>
</template>
<template v-else>--</template>
</div>
</el-table-column>
<el-table-column prop="" label="操作" show-overflow-tooltip v-if="$getButtonLimit($buttonCode.editCard) || $getButtonLimit($buttonCode.delCard)" min-width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="$getButtonLimit($buttonCode.editCard)" :limit-code="$buttonCode.editCard" type="text" @click="toEdit(scope.$index, scope.row)" :disabled="$store.state.wxEnterpriseType">编辑</el-button> <el-button v-if="$getButtonLimit($buttonCode.editCard)" :limit-code="$buttonCode.editCard" type="text" @click="toEdit(scope.$index, scope.row)" :disabled="$store.state.wxEnterpriseType">编辑</el-button>
<el-button v-if="$getButtonLimit($buttonCode.delCard)" :limit-code="$buttonCode.delCard" type="text" @click="toDel(scope.$index, scope.row)" :disabled="$store.state.wxEnterpriseType">删除</el-button> <el-button v-if="$getButtonLimit($buttonCode.delCard)" :limit-code="$buttonCode.delCard" type="text" @click="toDel(scope.$index, scope.row)" :disabled="$store.state.wxEnterpriseType">删除</el-button>
......
...@@ -72,10 +72,12 @@ ...@@ -72,10 +72,12 @@
{{ scope.row.sendMemberCount }} {{ scope.row.sendMemberCount }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建人" prop="creatorName" width="120"></el-table-column>
<el-table-column width="150" label="创建时间"> <el-table-column width="150" label="创建时间">
<template slot-scope="scope"> <div slot-scope="scope" style="line-height: normal">
{{ scope.row.createTime | formatTimeStamp }} <p>{{ scope.row.createTime | timeStampToYmd }}</p>
</template> <p>{{ scope.row.createTime | timeStampToHms }}</p>
</div>
</el-table-column> </el-table-column>
<el-table-column width="200" label="卡券模板有效期"> <el-table-column width="200" label="卡券模板有效期">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -137,7 +139,7 @@ export default { ...@@ -137,7 +139,7 @@ export default {
cardName: '', cardName: '',
options: [ options: [
{ label: '全部', value: '' }, { label: '全部', value: '' },
{ label: '已过期', value: 2 }, { label: '已删除', value: 2 },
{ label: '正常', value: 1 } { label: '正常', value: 1 }
] ]
}; };
...@@ -153,7 +155,7 @@ export default { ...@@ -153,7 +155,7 @@ export default {
val = '正常'; val = '正常';
break; break;
case 2: case 2:
val = '已过期'; val = '已删除';
break; break;
} }
return val; return val;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<template> <template>
<section class="common-right-wrap" v-loading="loadingPage"> <section class="common-right-wrap" v-loading="loadingPage">
<div class="new-card-body border-box"> <div class="new-card-body border-box">
<el-form :model="formData" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm"> <el-form :model="formData" :rules="rules" ref="ruleForm" label-width="200px" class="demo-ruleForm">
<el-form-item label="选择卡券" prop="coupCardId"> <el-form-item label="选择卡券" prop="coupCardId">
<div v-if="formData.coupCardId" class="selected-card-body flex"> <div v-if="formData.coupCardId" class="selected-card-body flex">
<div class="selected-card font-14 color-909399">{{ selectCoupCard.cardName }} | {{ selectCoupCard.effectDateString }} | 限制{{ selectCoupCard.cardLimit }}张/人 | 适用门店:{{ selectCoupCard.storeMode == 0 ? '所有门店' : selectCoupCard.storeMode == 1 ? '部分分组' : '部分门店' }} | 库存:{{ selectCoupCard.couponStock }}</div> <div class="selected-card font-14 color-909399">{{ selectCoupCard.cardName }} | {{ selectCoupCard.effectDateString }} | 限制{{ selectCoupCard.cardLimit }}张/人 | 适用门店:{{ selectCoupCard.storeMode == 0 ? '所有门店' : selectCoupCard.storeMode == 1 ? '部分分组' : '部分门店' }} | 库存:{{ selectCoupCard.couponStock }}</div>
...@@ -20,14 +20,26 @@ ...@@ -20,14 +20,26 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<span slot="label"> <span slot="label">
<el-tooltip class="item" effect="dark" content="当导购将此卡券送给客户后,此领券页面总共可被领取的次数。比如限制此卡券的领券页面仅1次,则客户成功领取后,即使其将此领券页面转发分享给其他好友,也不可再被领取,因为此领券页面只能被领取一次" placement="top-start"><span style="cursor: pointer;padding-bottom: 2px; border-bottom: 1px dashed #2F54EB;">领券页面可被领取次数</span></el-tooltip> 领券页面可被领取次数
<el-tooltip class="item" effect="dark" content="当导购将此卡券送给客户后,此领券页面总共可被领取的次数。比如限制此卡券的领券页面仅1次,则客户成功领取后,即使其将此领券页面转发分享给其他好友,也不可再被领取,因为此领券页面只能被领取一次" placement="top-start">
<i class="iconfont-components3 icon-cp-QuestionCircleOutlined"></i>
</el-tooltip>
</span> </span>
<el-radio-group v-model="formData.receiveTimes"> <el-radio-group v-model="formData.receiveTimes">
<el-radio :label="0">固定1次</el-radio> <el-radio :label="0">固定1次</el-radio>
<el-radio :label="1">不限次数</el-radio> <el-radio :label="1">不限次数</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<div class="el-form-item el-form-item--large"> <el-form-item>
<span slot="label">
选择发送范围
<el-tooltip class="item" effect="dark" content="卡券的发送范围设置" placement="top-start">
<i class="iconfont-components3 icon-cp-QuestionCircleOutlined"></i>
</el-tooltip>
</span>
<dm-store-selector v-if="!addTag && formData.id" :options="options" :uuid.sync="formData.storeWidgetId"></dm-store-selector>
</el-form-item>
<!-- <div class="el-form-item el-form-item--large">
<label for="name" class="el-form-item__label" style="width: 120px; cursor: pointer;"> <label for="name" class="el-form-item__label" style="width: 120px; cursor: pointer;">
<el-tooltip class="item" effect="dark" content="卡券的发送范围设置" placement="top-start"> <span style="cursor: pointer;padding-bottom: 2px; border-bottom: 1px dashed #2F54EB;">选择发送范围</span></el-tooltip> <el-tooltip class="item" effect="dark" content="卡券的发送范围设置" placement="top-start"> <span style="cursor: pointer;padding-bottom: 2px; border-bottom: 1px dashed #2F54EB;">选择发送范围</span></el-tooltip>
</label> </label>
...@@ -47,7 +59,7 @@ ...@@ -47,7 +59,7 @@
</div> </div>
<div v-if="(formData.sendRange == '1' || formData.sendRange == '2' || formData.sendRange == '3') && !formData.selectList.length" class="el-form-item__error">请选择发送范围</div> <div v-if="(formData.sendRange == '1' || formData.sendRange == '2' || formData.sendRange == '3') && !formData.selectList.length" class="el-form-item__error">请选择发送范围</div>
</div> </div>
</div> </div> -->
<!-- 卡券赠送调整:取消发放张数和发放总数的配置 --> <!-- 卡券赠送调整:取消发放张数和发放总数的配置 -->
<!-- <div class="el-form-item el-form-item--large"> <!-- <div class="el-form-item el-form-item--large">
<label for="name" class="el-form-item__label" style="width: 120px; cursor: pointer;"> <label for="name" class="el-form-item__label" style="width: 120px; cursor: pointer;">
...@@ -105,24 +117,24 @@ export default { ...@@ -105,24 +117,24 @@ export default {
gicSelectTag gicSelectTag
}, },
data() { data() {
const validateRange = (rule, value, callback) => { // const validateRange = (rule, value, callback) => {
if (value == '') { // if (value == '') {
return callback(new Error('请选择发送范围')); // return callback(new Error('请选择发送范围'));
} else if ((value == '1' || value == '2') && !this.formData.selectList.length) { // } else if ((value == '1' || value == '2') && !this.formData.selectList.length) {
return callback(new Error('请选择发送范围')); // return callback(new Error('请选择发送范围'));
} else { // } else {
callback(); // callback();
} // }
}; // };
const validateSendType = (rule, value, callback) => { // const validateSendType = (rule, value, callback) => {
if (value == '') { // if (value == '') {
return callback(new Error('请选择券发放总数')); // return callback(new Error('请选择券发放总数'));
} else if (value == '1' && !this.formData.totalSendTimes) { // } else if (value == '1' && !this.formData.totalSendTimes) {
return callback(new Error('请选择券发放总数')); // return callback(new Error('请选择券发放总数'));
} else { // } else {
callback(); // callback();
} // }
}; // };
/* const validateReceiveType = (rule, value, callback) => { /* const validateReceiveType = (rule, value, callback) => {
if (value == '') { if (value == '') {
return callback(new Error('请选择券领取总数')); return callback(new Error('请选择券领取总数'));
...@@ -133,6 +145,7 @@ export default { ...@@ -133,6 +145,7 @@ export default {
} }
}; */ }; */
return { return {
options: [0, 1, 2, 3, 4, 5],
activeBrand: this.brandId, // 商户(品牌) id activeBrand: this.brandId, // 商户(品牌) id
activeId: '3', activeId: '3',
wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
...@@ -141,19 +154,20 @@ export default { ...@@ -141,19 +154,20 @@ export default {
formData: { formData: {
id: '', id: '',
coupCardId: this.$route.query.coupCardId ? this.$route.query.coupCardId : '', coupCardId: this.$route.query.coupCardId ? this.$route.query.coupCardId : '',
sendRange: '0', storeWidgetId: '',
selectList: [], // sendRange: '0',
eachSendTimes: 3, // selectList: [],
sendType: '0', // eachSendTimes: 3,
receiveTimes: 0, // sendType: '0',
totalSendTimes: 0 receiveTimes: 0
// totalSendTimes: 0
}, },
rules: { rules: {
coupCardId: [{ required: true, message: '请选择卡券', trigger: 'change' }], coupCardId: [{ required: true, message: '请选择卡券', trigger: 'change' }]
sendRange: [{ validator: validateRange, trigger: 'change' }], // sendRange: [{ validator: validateRange, trigger: 'change' }],
sendType: [{ validator: validateSendType, trigger: 'change' }], // sendType: [{ validator: validateSendType, trigger: 'change' }],
// receiveType: [{ validator: validateReceiveType, trigger: 'change' }], // receiveType: [{ validator: validateReceiveType, trigger: 'change' }],
eachSendTimes: [{ required: true, message: '请输入券发放张数', trigger: 'blur' }] // eachSendTimes: [{ required: true, message: '请输入券发放张数', trigger: 'blur' }]
}, },
cardSelectShow: false, cardSelectShow: false,
addTag: true, // 默认是添加 addTag: true, // 默认是添加
...@@ -212,12 +226,12 @@ export default { ...@@ -212,12 +226,12 @@ export default {
*/ */
submitForm: _debounce(function(formName, flag) { submitForm: _debounce(function(formName, flag) {
const that = this; const that = this;
if ((that.formData.sendRange == '1' || that.formData.sendRange == '2' || that.formData.sendRange == '3') && !that.formData.selectList.length) { // if ((that.formData.sendRange == '1' || that.formData.sendRange == '2' || that.formData.sendRange == '3') && !that.formData.selectList.length) {
return false; // return false;
} // }
if (that.formData.sendType == '1' && !that.formData.totalSendTimes) { // if (that.formData.sendType == '1' && !that.formData.totalSendTimes) {
return false; // return false;
} // }
/* if (that.formData.receiveType == '1' && !that.formData.totalReceiveTimes) { /* if (that.formData.receiveType == '1' && !that.formData.totalReceiveTimes) {
return false; return false;
} */ } */
...@@ -232,23 +246,24 @@ export default { ...@@ -232,23 +246,24 @@ export default {
}, 300), }, 300),
postSaveCard(flag) { postSaveCard(flag) {
const that = this; const that = this;
let selectList = ''; // let selectList = '';
if (that.formData.sendRange == 1) { // if (that.formData.sendRange == 1) {
selectList = that.formData.selectList.map(item => item.storeGroupId).join(','); // selectList = that.formData.selectList.map(item => item.storeGroupId).join(',');
} else if (that.formData.sendRange == 2) { // } else if (that.formData.sendRange == 2) {
selectList = that.formData.selectList.join(','); // selectList = that.formData.selectList.join(',');
} else if (that.formData.sendRange == 3) { // } else if (that.formData.sendRange == 3) {
selectList = that.formData.selectList.map(item => item.tagId).join(','); // selectList = that.formData.selectList.map(item => item.tagId).join(',');
} // }
let para = { let para = {
id: that.formData.id, id: that.formData.id,
coupCardId: that.formData.coupCardId, coupCardId: that.formData.coupCardId,
sendRange: that.formData.sendRange, // sendRange: that.formData.sendRange,
selectList: selectList, // selectList: selectList,
receiveTimes: this.formData.receiveTimes, receiveTimes: this.formData.receiveTimes,
storeWidgetId: this.formData.storeWidgetId,
// eachSendTimes: that.formData.eachSendTimes || '0', // eachSendTimes: that.formData.eachSendTimes || '0',
// sendType: that.formData.sendType, // sendType: that.formData.sendType,
totalSendTimes: that.formData.totalSendTimes, // totalSendTimes: that.formData.totalSendTimes,
// receiveType: that.formData.receiveType, // receiveType: that.formData.receiveType,
// totalReceiveTimes: that.formData.totalReceiveTimes, // totalReceiveTimes: that.formData.totalReceiveTimes,
gicEnterpriseId: that.brandId, gicEnterpriseId: that.brandId,
...@@ -268,11 +283,13 @@ export default { ...@@ -268,11 +283,13 @@ export default {
that.formData = { that.formData = {
id: '', id: '',
coupCardId: '', coupCardId: '',
sendRange: '0', receiveTimes: this.formData.receiveTimes,
selectList: [], storeWidgetId: this.formData.storeWidgetId
eachSendTimes: 3, // sendRange: '0',
sendType: '0', // selectList: [],
totalSendTimes: 0 // eachSendTimes: 3,
// sendType: '0',
// totalSendTimes: 0
// receiveType: '0', // receiveType: '0',
// totalReceiveTimes: 0 // totalReceiveTimes: 0
}; };
...@@ -350,11 +367,12 @@ export default { ...@@ -350,11 +367,12 @@ export default {
that.formData = { that.formData = {
id: resData.result.detail.id, id: resData.result.detail.id,
coupCardId: resData.result.detail.coupCardId, coupCardId: resData.result.detail.coupCardId,
sendRange: String(resData.result.detail.sendRange), storeWidgetId: resData.result.detail.storeWidgetId,
selectList: resData.result.detail.sendRange != 0 ? (resData.result.detail.sendRange == 2 ? resData.result.list.map(item => item.id) : resData.result.list) : [], // sendRange: String(resData.result.detail.sendRange),
eachSendTimes: resData.result.detail.eachSendTimes, // selectList: resData.result.detail.sendRange != 0 ? (resData.result.detail.sendRange == 2 ? resData.result.list.map(item => item.id) : resData.result.list) : [],
sendType: String(resData.result.detail.sendType), // eachSendTimes: resData.result.detail.eachSendTimes,
totalSendTimes: resData.result.detail.totalSendTimes, // sendType: String(resData.result.detail.sendType),
// totalSendTimes: resData.result.detail.totalSendTimes,
receiveTimes: resData.result.detail.receiveTimes receiveTimes: resData.result.detail.receiveTimes
// receiveType: String(resData.result.detail.receiveType), // receiveType: String(resData.result.detail.receiveType),
// totalReceiveTimes: resData.result.detail.totalReceiveTimes // totalReceiveTimes: resData.result.detail.totalReceiveTimes
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<template> <template>
<div class="app-detail-wrap"> <div class="app-detail-wrap">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="会员分组列表" name="first"> <el-tab-pane label="客户分组列表" name="first">
<div class="app-detail-pane border-box p-lbr-20"> <div class="app-detail-pane border-box p-lbr-20">
<div class="condition-wrap flex flex-space-between"> <div class="condition-wrap flex flex-space-between">
<div> <div>
......
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2019-03-20 14:36:37
* @LastEditors: 无尘
* @LastEditTime: 2020-12-18 15:10:29
-->
<template> <template>
<div class="app-detail-wrap"> <div class="evaluate-set">
<div class="app-detail-pane border-box p-20"> <el-form>
<div class="m-b-20"> <el-form-item>
<span class="font-14 p-r-10"></span> <dm-sub-title type="fill">订单评价设置</dm-sub-title>
<el-switch v-model="myCustomData.guideReplyFlag" :active-value="1" :inactive-value="0"></el-switch> </el-form-item>
<span class="p-r-10 font-14 color-303133">禁止订单关联导购回复评价</span><span class="font-12 color-909399 p-l-10">注:开启后,订单关联导购不可回复评价</span> <el-form-item>
</div> <el-switch v-model="formData.guideReplyFlag" :active-value="1" :inactive-value="0"></el-switch>
<div class="m-b-20"> <span class="switch-label">禁止订单关联导购回复评价</span>
<span class="font-14 p-r-10"></span> <p class="switch-tip">&nbsp;开启后,订单关联导购不可回复评价</p>
<el-switch v-model="myCustomData.allOrderFlag" :active-value="1" :inactive-value="0"></el-switch> </el-form-item>
<span class="p-r-10 font-14 color-303133">允许店员查看所有订单评价</span> <el-form-item>
</div> <el-switch v-model="formData.allOrderFlag" :active-value="1" :inactive-value="0"></el-switch>
<div class="m-t-46"> <span class="switch-label">允许店员查看所有订单评价</span>
<el-button type="primary" :loading="loading" @click="submit('searchFlag')" :disabled="$store.state.wxEnterpriseType">保 存</el-button> </el-form-item>
</div> <el-form-item>
<dm-sub-title type="fill">不良评价回访设置</dm-sub-title>
</el-form-item>
<el-form :model="formData" :rules="formRules" ref="formData" label-width="110px">
<el-form-item label="不良评价拨打">
<el-checkbox-group v-model="formData.taskCallTypes">
<el-checkbox v-for="el in callTypes" :key="el.value" :label="el.value">
{{ el.label }}
<el-tooltip placement="top">
<template slot="content">
<p v-for="(tip, index) in el.tooltips" :key="index">{{ tip }}</p>
</template>
<i class="call-type-icon iconfont-components3 icon-cp-QuestionCircleOutlined"></i>
</el-tooltip>
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="任务分配" prop="distributeCustomerJudge">
<el-radio-group v-model="formData.distributeCustomerJudge">
<el-radio :label="1">
分配给消费门店店长
<el-tooltip class="item" effect="dark" content="勾选此项,不良评价回访任务将分配给产生该笔消费订单的所在门店店长" placement="top">
<i class="call-type-icon iconfont-components3 icon-cp-QuestionCircleOutlined"></i>
</el-tooltip>
</el-radio>
<el-radio :label="2">
分配给专属导购
<el-tooltip class="item" effect="dark" content="勾选此项,不良评价回访任务将分配给产生该笔消费订单的会员的专属导购" placement="top">
<i class="call-type-icon iconfont-components3 icon-cp-QuestionCircleOutlined"></i>
</el-tooltip>
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="逾期设置" prop="overDayJudge">
<div class="delay-config">
不良评价回访下发后<el-input-number class="delay-count" controls-position="right" v-model="formData.overDayJudge" placeholder="请输入内容" :step="1" :step-strictly="true" :min="0" :max="99999999"></el-input-number>
<p class="delay-tip">注:0天即为当天下发,当天完成,1天即为当天下发,次日24:00之前完成</p>
</div> </div>
</el-form-item>
</el-form>
</el-form>
<hb-form-bottom v-if="$getButtonLimit($buttonCode.saveEvaluateSet)">
<el-button :limit-code="$buttonCode.saveEvaluateSet" type="primary" :loading="loading" @click="onSave">保存</el-button>
</hb-form-bottom>
</div> </div>
</template> </template>
<script> <script>
import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error'; import errMsg from '@/common/js/error';
import { _debounce } from '@/common/js/public'; import { postRequest } from '@/api/api';
import { postRequest, getRequest } from '@/api/api';
export default { export default {
name: 'evaluate-set', name: 'evaluate-set',
props: { props: {
...@@ -39,164 +70,135 @@ export default { ...@@ -39,164 +70,135 @@ export default {
default() { default() {
return ''; return '';
} }
},
tabType: {
type: String,
default() {
return '1';
}
} }
}, },
data() { data() {
const valiDistributeCustomer = (rules, value, callback) => {
if (value != 1 && value != 2) {
return callback(new Error('请设置任务分配'));
}
callback();
};
return { return {
projectName: '', // 当前项目名
wxEnterpriseRelatedId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseRelatedId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
myCustomData: { formData: {
guideReplyFlag: 0, enterpriseId: '',
allOrderFlag: 0 guideReplyFlag: 0, // 导购回复状态1不可回复0可回复
allOrderFlag: 0, // 店员查看所有订单评价,1:是,0:否
taskCallTypes: [],
distributeCustomerJudge: '',
overDayJudge: 2
},
formRules: {
distributeCustomerJudge: { required: true, validator: valiDistributeCustomer, trigger: 'blur' },
overDayJudge: { required: true }
}, },
activeId: '1', callTypes: [
{
label: '企业电话',
value: '1',
tooltips: ['1.对接第三方呼叫中心,外呼显示第三方号码,可监控通话状态。费用结算及通话记录存储于GIC计费中心;', '2.若任务创建时无双向呼叫权限,此项设置勾选也不生效']
},
{
label: '私人电话',
value: '2',
tooltips: ['导购手机呼叫,无法监控通话状态。呼叫结算费用由导购手机自费']
},
{
label: '企微会话',
value: '3',
tooltips: ['通过企微会话完成任务,无法监控通话状态。不产生通话费用']
}
],
loading: false loading: false
}; };
}, },
methods: { methods: {
/** onSave() {
* 保存 this.loading = true;
*/ this.$refs.formData.validate(vali => {
submit: _debounce(function(type) { if (!vali) {
const that = this;
that.loading = true;
that.setData(type);
}, 500),
/**
* 保存-API
*/
setData(type) {
const { allOrderFlag, guideReplyFlag } = this.myCustomData;
let para = {
enterpriseId: this.brandId,
guideReplyFlag,
allOrderFlag
};
const url = '/haoban-app-aggregation-web/order-evaluation-setting';
postRequest(url, para)
.then(res => {
let resData = res.data;
this.loading = false; this.loading = false;
this.getCustomerSet();
if (resData.errorCode == 1) {
showMsg.showmsg('保存成功', 'success');
return; return;
} }
errMsg.errorMsg(resData); const { enterpriseId, guideReplyFlag, allOrderFlag, taskCallTypes, distributeCustomerJudge, overDayJudge } = this.formData;
postRequest('/haoban-app-tel-task-three-web/setting/save-task-setting', {
enterpriseId,
guideReplyFlag,
allOrderFlag,
taskCallTypes: taskCallTypes.join(','),
distributeCustomerJudge,
overDayJudge,
taskType: 0
}) })
.catch(function(error) {
this.loading = false;
this.$message.error({
duration: 1000,
message: error.message
});
});
},
/**
* 获取数据
*/
getCustomerSet(brandId) {
const that = this;
let para = {
enterpriseId: that.brandId,
wxEnterpriseRelatedId: that.wxEnterpriseRelatedId
};
getRequest('/haoban-app-aggregation-web/order-evaluation-find', para)
.then(res => { .then(res => {
let resData = res.data; const { errorCode } = res.data || {};
if (resData.errorCode == 1) { if (errorCode != 1) {
if (!!resData.result) { return errMsg.errorMsg(res.data);
const { guideReplyFlag, allOrderFlag } = resData.result;
that.myCustomData.guideReplyFlag = guideReplyFlag;
that.myCustomData.allOrderFlag = allOrderFlag;
} }
return; this.$message.success('保存成功');
}
errMsg.errorMsg(resData);
}) })
.catch(function(error) { .finally(() => {
that.$message.error({ setTimeout(() => (this.loading = false), 100);
duration: 1000,
message: error.message
}); });
}); });
}
}, },
watch: { getConfig() {
brandId: function(newData, oldData) { postRequest('/haoban-app-tel-task-three-web/setting/find-task-setting', { enterpriseId: this.formData.enterpriseId, taskType: 0 }).then(res => {
const that = this; const { errorCode, result } = res.data || {};
if (newData) { if (errorCode != 1) {
that.getCustomerSet(that.brandId); return errMsg.errorMsg(res.data);
} }
Object.assign(this.formData, {
guideReplyFlag: result.guideReplyFlag,
allOrderFlag: result.allOrderFlag,
taskCallTypes: typeof result.taskCallTypes == 'string' ? result.taskCallTypes.split(',') : [],
distributeCustomerJudge: result.distributeCustomerJudge,
overDayJudge: result.overDayJudge
});
});
} }
}, },
mounted() { created() {
const that = this; this.formData.enterpriseId = this.brandId;
that.$emit('showTab', '1'); this.getConfig();
if (that.brandId) {
that.getCustomerSet(that.brandId);
} }
},
components: {}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.w-500 { .evaluate-set {
width: 500px;
}
.w-195 {
width: 195px;
}
.color-1890ff {
color: #2f54eb;
}
.p-20 {
padding: 20px; padding: 20px;
} .switch-label {
margin-left: 16px;
.p-l-38 { font-size: 14px;
padding-left: 38px; font-weight: 400;
} color: #303133;
}
.p-l-199 { .switch-tip {
padding-left: 199px; padding-left: 56px;
}
.app-detail-wrap {
height: 100%;
background: #fff;
.el-tabs {
background: #fff;
>>> .el-tabs__nav-wrap {
/* height: 48px;
line-height: 48px; */
&::after {
height: 1px;
}
/* .el-tabs__nav-scroll {
padding-left: 20px;
} */
}
}
.condition-tip {
width: 740px;
.el-alert--info {
background: #e6f7ff;
border: 1px solid rgba(145, 213, 255, 1);
.el-alert__icon {
font-size: 12px; font-size: 12px;
font-weight: 400;
color: #909399;
line-height: 17px;
} }
.call-type-icon {
font-size: 12px;
color: #606266;
}
.delay-config {
font-size: 14px;
font-weight: 400;
color: #303133;
.delay-count {
margin: 0 10px;
width: 115px;
}
.delay-tip {
margin-top: 5px;
font-size: 12px;
font-weight: 400;
color: #909399;
line-height: 17px;
} }
} }
} }
......
<template>
<div class="guide-setting">
<dm-sub-title class="guide-setting-title">导购操作权限设置</dm-sub-title>
<div class="guide-auth-list">
<div class="guide-auth-item">
<span class="auth-item-label">允许编辑导购信息</span>
<el-switch v-model="settingData.editClerkFlag" :active-value="1" :inactive-value="0"></el-switch>
</div>
<div class="guide-auth-item">
<span class="auth-item-label">允许店长添加导购</span>
<el-switch v-model="settingData.addClerkFlag" :active-value="1" :inactive-value="0"></el-switch>
</div>
<div class="guide-auth-item">
<span class="auth-item-label">允许店长删除导购</span>
<el-switch v-model="settingData.delClerkFlag" :active-value="1" :inactive-value="0"></el-switch>
</div>
</div>
<dm-sub-title class="guide-setting-title">应用可见权限设置</dm-sub-title>
<p class="app-auth-tip">设置导购可见应用</p>
<el-row>
<el-checkbox-group v-model="settingData.checked">
<el-col :span="3" v-for="el in allApps" :key="el.applicationId" style="margin-bottom: 12px">
<el-checkbox :label="el.applicationId">{{ el.applicationName }}</el-checkbox>
</el-col>
</el-checkbox-group>
</el-row>
<hb-form-bottom v-if="$getButtonLimit($buttonCode.saveGuideSetting)">
<el-button :limit-code="$buttonCode.saveGuideSetting" :loading="loading" type="primary" @click="onSave">保存</el-button>
</hb-form-bottom>
</div>
</template>
<script>
import { getRequest, postRequest } from '@/api/api.js';
import errorMsg from '@/common/js/error.js';
export default {
name: 'GuideSetting',
data() {
return {
loading: false,
settingData: {
editClerkFlag: 0,
addClerkFlag: 0,
delClerkFlag: 0,
checked: []
},
allApps: []
};
},
created() {
this.getSetting();
},
methods: {
getSetting() {
getRequest('/haoban-manage3-web/application-open-close-list', {}).then(res => {
const { errorCode, result } = res.data || {};
if (errorCode != 1) {
return errorMsg.errorMsg(res.data);
}
let { open, close, clerkEditInfo } = result || {};
open = Array.isArray(open) ? open : [];
close = Array.isArray(close) ? close : [];
this.allApps = open.concat(close);
this.settingData.checked = open.map(el => el.applicationId);
Object.assign(this.settingData, clerkEditInfo);
});
},
onSave() {
this.loading = true;
const { editClerkFlag, addClerkFlag, delClerkFlag, checked } = this.settingData;
const params = { editClerkFlag, addClerkFlag, delClerkFlag, dataJson: '' };
params.dataJson = this.allApps.map(el => {
return { applicationId: el.applicationId, openFlag: checked.includes(el.applicationId) ? 1 : 0 };
});
params.dataJson = JSON.stringify(params.dataJson);
postRequest('/haoban-manage3-web/open-or-close', params)
.then(res => {
const { errorCode } = res.data || {};
if (errorCode != 1) {
return errorMsg.errorMsg(res.data);
}
this.$message.success('保存成功');
})
.finally(() => {
setTimeout(() => (this.loading = false), 100);
});
}
}
};
</script>
<style lang="scss" scoped>
.guide-setting {
padding: 20px;
.guide-setting-title {
margin-bottom: 22px;
}
.guide-auth-list {
margin-bottom: 44px;
border-radius: 4px;
border: 1px solid #dcdfe6;
.guide-auth-item {
display: flex;
justify-content: flex-start;
align-items: center;
padding: 0 20px;
height: 67px;
+ .guide-auth-item {
border-top: 1px solid #dcdfe6;
}
.auth-item-label {
margin-right: 60px;
font-size: 14px;
font-weight: 400;
color: #303133;
}
}
}
.app-auth-tip {
margin-bottom: 16px;
font-size: 14px;
font-weight: 400;
color: #303133;
line-height: 20px;
}
}
</style>
...@@ -26,6 +26,7 @@ import img_404 from '@/assets/gic-error.png'; ...@@ -26,6 +26,7 @@ import img_404 from '@/assets/gic-error.png';
export default { export default {
name: 'page404', name: 'page404',
inject: ['layoutVm'],
data() { data() {
return { return {
img_404 img_404
...@@ -36,9 +37,12 @@ export default { ...@@ -36,9 +37,12 @@ export default {
return '登录遇到错误啦!请确认您是否是好办小程序管理员。如不是,请联系管理员在<企业微信-我的企业-权限管理>添加好办管理员。'; return '登录遇到错误啦!请确认您是否是好办小程序管理员。如不是,请联系管理员在<企业微信-我的企业-权限管理>添加好办管理员。';
} }
}, },
destroyed() {
this.layoutVm.$emit('command', 'showAside');
},
/* eslint-disable */ /* eslint-disable */
mounted() { mounted() {
this.layoutVm.$emit('command', 'hideAside');
} }
}; };
</script> </script>
......
...@@ -28,6 +28,7 @@ import img_500 from '@/assets/500_images/error_500.svg'; ...@@ -28,6 +28,7 @@ import img_500 from '@/assets/500_images/error_500.svg';
export default { export default {
name: 'errpage', name: 'errpage',
inject: ['layoutVm'],
data() { data() {
return { return {
imgSrc: '', imgSrc: '',
...@@ -44,11 +45,15 @@ export default { ...@@ -44,11 +45,15 @@ export default {
} }
}; };
}, },
destroyed() {
this.layoutVm.$emit('command', 'showAside');
},
mounted() { mounted() {
var that = this; var that = this;
var path = that.$route.path.split('/')[1]; var path = that.$route.path.split('/')[1];
that.imgSrc = that.srcList[path]; that.imgSrc = that.srcList[path];
that.message = that.msgList[path]; that.message = that.msgList[path];
this.layoutVm.$emit('command', 'hideAside');
} }
}; };
</script> </script>
......
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