Commit f00ace4a by 杨明

fixed

1 parent 7b289ef0
...@@ -75,5 +75,14 @@ const getGroupList = params => { ...@@ -75,5 +75,14 @@ const getGroupList = params => {
returnAll: true returnAll: true
}) })
} }
const activityreportWorktool = params => {
export default { getStaffList, getMerchantList, getlistDepartmentTree, getActivitylist, insertStaff, getGroupList, activityOpen } params.method = `entmicro.api.wechatcloudcontrol.activityreport.worktool.grouplist`
return http({
url: url1,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { activityreportWorktool, getStaffList, getMerchantList, getlistDepartmentTree, getActivitylist, insertStaff, getGroupList, activityOpen }
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</div> </div>
</div> </div>
<transition name="el-zoom-in-top" v-if="!isAutomatic"> <transition name="el-zoom-in-top" v-if="!isAutomatic">
<gl-select-menu :domEl="automaticEl" @changeStatu="hideSelect"> <gl-select-menu :domEl="automaticEl" @changeStatu="hideSelect" style="width:432px">
<el-form-item class="search-groomname"> <el-form-item class="search-groomname">
<el-input placeholder="请输入搜索关键词" v-model="filterText"></el-input> <el-input placeholder="请输入搜索关键词" v-model="filterText"></el-input>
</el-form-item> </el-form-item>
...@@ -44,7 +44,10 @@ ...@@ -44,7 +44,10 @@
<el-form-item :label="'#' + (index + 1) + bulletin.label + '>>' + ':'" class="group-item-box" :key="index"> <el-form-item :label="'#' + (index + 1) + bulletin.label + '>>' + ':'" class="group-item-box" :key="index">
<div class="group-box"> <div class="group-box">
<div class="input-box" v-for="(i, k) in groupCofListInput[bulletin.storageList]" :key="k"> <div class="input-box" v-for="(i, k) in groupCofListInput[bulletin.storageList]" :key="k">
<el-input v-model="i.name" :placeholder="'将' + bulletin.label + '推送至群聊'"></el-input> <!-- <el-input v-model="i.name" ></el-input> -->
<el-select v-model="i.name" :placeholder="'将' + bulletin.label + '推送至群聊'">
<el-option v-for="item in selectGroupName" :key="item.groupName" :label="item.groupName" :value="item.groupName"></el-option>
</el-select>
<i class="el-icon-circle-plus" v-if="k == 0" @click="addGroup(groupCofListInput[bulletin.storageList])"></i> <i class="el-icon-circle-plus" v-if="k == 0" @click="addGroup(groupCofListInput[bulletin.storageList])"></i>
<i class="el-icon-remove" v-else @click="delGroup(groupCofListInput[bulletin.storageList], k)"></i> <i class="el-icon-remove" v-else @click="delGroup(groupCofListInput[bulletin.storageList], k)"></i>
</div> </div>
...@@ -55,7 +58,7 @@ ...@@ -55,7 +58,7 @@
</el-form> </el-form>
</div> </div>
</div> </div>
<GLFooter> <GLFooter class="footer-panel">
<el-button @click="handlebattleClose" size="medium">取消</el-button> <el-button @click="handlebattleClose" size="medium">取消</el-button>
<el-button type="primary" @click="handlebattleConfirm" size="medium" :loading="loading">保存</el-button> <el-button type="primary" @click="handlebattleConfirm" size="medium" :loading="loading">保存</el-button>
</GLFooter> </GLFooter>
...@@ -84,6 +87,7 @@ export default { ...@@ -84,6 +87,7 @@ export default {
}, },
data() { data() {
return { return {
selectGroupName: [],
isDialogVisible: false, isDialogVisible: false,
merchantName: '', merchantName: '',
paramsData: this.$route.query, paramsData: this.$route.query,
...@@ -264,6 +268,10 @@ export default { ...@@ -264,6 +268,10 @@ export default {
this.wechat.automaticName = data.name this.wechat.automaticName = data.name
this.wechat.staffId = data.staffId this.wechat.staffId = data.staffId
this.idBefEncryption = data.idBefEncryption this.idBefEncryption = data.idBefEncryption
this.$apis.battle.activityreportWorktool({ cloudId: this.idBefEncryption }).then(res => {
this.selectGroupName = res.data.result || []
this.groupCofListInput = { wordReportValue: [{ name: '' }], orderReportValue: [{ name: '' }], saReportValue: [{ name: '' }], saPerReportValue: [{ name: '' }], scheduleReportValue: [{ name: '' }], zhanReportValue: [{ name: '' }] }
})
}, },
// 弹窗数据回显 // 弹窗数据回显
initswitchList(switchList) { initswitchList(switchList) {
...@@ -306,6 +314,7 @@ export default { ...@@ -306,6 +314,7 @@ export default {
this.initswitchList(data.switchList) this.initswitchList(data.switchList)
data.groupConfigList.forEach(item => { data.groupConfigList.forEach(item => {
let groupHideAttr = this.groupToType.find(k => k.type == item.actionReportType)?.attr let groupHideAttr = this.groupToType.find(k => k.type == item.actionReportType)?.attr
if (!groupHideAttr) return
if (item.groupId) { if (item.groupId) {
if (item.groupId.split('_R:')[1] && item.groupId.split('_R:')[1] == item.groupName) { if (item.groupId.split('_R:')[1] && item.groupId.split('_R:')[1] == item.groupName) {
groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: item.groupName }) groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: item.groupName })
...@@ -317,6 +326,7 @@ export default { ...@@ -317,6 +326,7 @@ export default {
roomName: item.groupName roomName: item.groupName
}) })
} else { } else {
this.idBefEncryption = item.groupId.split('_R:')[0]
groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: '' }) groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: '' })
} }
} }
...@@ -326,6 +336,9 @@ export default { ...@@ -326,6 +336,9 @@ export default {
this.groupCofListInput[k] = [{ name: '' }] this.groupCofListInput[k] = [{ name: '' }]
} }
} }
this.$apis.battle.activityreportWorktool({ cloudId: this.idBefEncryption }).then(res => {
this.selectGroupName = res.data.result || []
})
this.getGroupList(this.wechat.staffId) this.getGroupList(this.wechat.staffId)
} else { } else {
this.groupCofListInput = { this.groupCofListInput = {
...@@ -524,6 +537,16 @@ export default { ...@@ -524,6 +537,16 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.footer-panel {
margin-top: 20px;
}
.search-groomname {
width: 402px;
margin: 12px 16px 0;
/deep/.el-input {
width: 402px;
}
}
.addConfig-wrap { .addConfig-wrap {
background: #fff; background: #fff;
.header { .header {
...@@ -552,6 +575,12 @@ export default { ...@@ -552,6 +575,12 @@ export default {
.input-box { .input-box {
display: flex; display: flex;
align-items: center; align-items: center;
/deep/ {
.el-select,
.el-input {
width: 355px !important;
}
}
i { i {
cursor: pointer; cursor: pointer;
font-size: 20px; font-size: 20px;
......
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-06-21 19:07:21
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-06-21 20:12:35
* @FilePath: \scrm-micro-battles\src\views\bulletin\components\battle\components\select-dropdown.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template> <template>
<div class="el-select-dropdown el-popper group-select" :style="groupStyle"> <div class="el-select-dropdown el-popper group-select" :style="groupStyle" v-bind="$attrs">
<slot></slot> <slot></slot>
</div> </div>
</template> </template>
...@@ -21,7 +29,7 @@ export default { ...@@ -21,7 +29,7 @@ export default {
data() { data() {
return { return {
groupStyle: '', groupStyle: '',
includeData:['el-input__inner','placeholder','el-select__caret el-input__icon el-icon-arrow-up'] includeData: ['el-input__inner', 'placeholder', 'el-select__caret el-input__icon el-icon-arrow-up']
} }
}, },
mounted() { mounted() {
...@@ -65,4 +73,3 @@ export default { ...@@ -65,4 +73,3 @@ export default {
} }
} }
</style> </style>
<template> <template>
<div class="activity"> <div class="activity">
<GLTabs v-model="activeName" :tabPaneList="tabPaneList" @tab-click="handleClick"></GLTabs>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<template slot="activityStatus">
<el-select v-model="tableSearchForm.activityStatus" placeholder="请选择活动状态">
<el-option v-for="item in baseData.activityStatuList" :key="item.confId" :label="item.confName" :value="item.confId"></el-option>
</el-select>
</template>
</GLCombiForm>
<div class="flex-between title"> <div class="flex-between title">
<div class="title-text">专员列表</div> <div class="title-text">专员列表</div>
<template v-if="tableSearchForm.activityStatus == 2"> <template v-if="activeName == 'first'">
<el-button :size="size" type="primary" class="battle-set-btn" @click="battleSetHandle">批量配置专员</el-button> <el-button :size="size" type="primary" class="battle-set-btn" @click="battleSetHandle">批量配置专员</el-button>
</template> </template>
</div> </div>
...@@ -138,7 +133,9 @@ ...@@ -138,7 +133,9 @@
</transition> </transition>
</el-form-item> </el-form-item>
<el-form-item class="select-wrap" label="群名:"> <el-form-item class="select-wrap" label="群名:">
<el-input v-model="groupName" placeholder="请输入群名" @blur="importGroup"></el-input> <el-select v-model="groupName" placeholder="请选择">
<el-option v-for="item in selectGroupName" :key="item.groupName" :label="item.groupName" :value="item.groupName"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -152,8 +149,8 @@ ...@@ -152,8 +149,8 @@
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { dateFormat } from '@/utils/index' import { dateFormat } from '@/utils/index'
import SelectMember from '../battle/components/SelectMember.vue' import SelectMember from './components/SelectMember.vue'
import GlSelectMenu from '../battle/components/select-dropdown.vue' import GlSelectMenu from './components/select-dropdown.vue'
export default { export default {
components: { components: {
SelectMember, SelectMember,
...@@ -161,12 +158,14 @@ export default { ...@@ -161,12 +158,14 @@ export default {
}, },
data() { data() {
return { return {
selectGroupName: [],
groupName: '', groupName: '',
isgroup: true, isgroup: true,
isAutomatic: true, isAutomatic: true,
menuIndex: 0, menuIndex: 0,
merchantId: '', merchantId: '',
merchantName: '', merchantName: '',
activeName: 'first',
size: 'small', size: 'small',
mode: 'mid', mode: 'mid',
battleVisible: false, battleVisible: false,
...@@ -176,6 +175,16 @@ export default { ...@@ -176,6 +175,16 @@ export default {
setectEditList: [], setectEditList: [],
merchantList: [], merchantList: [],
groupList: [], groupList: [],
tabPaneList: [
{
label: '进行中',
name: 'first'
},
{
label: '已结束',
name: 'second'
}
],
searchFormData: [ searchFormData: [
{ {
label: '活动门店', label: '活动门店',
...@@ -197,16 +206,6 @@ export default { ...@@ -197,16 +206,6 @@ export default {
optionLabel: 'confName' optionLabel: 'confName'
}, },
{ {
label: '活动状态',
name: 'activityStatus',
type: 'select',
optionList: [],
addHtml: 'activityStatus',
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'activityStatuList'
},
{
label: '活动类型', label: '活动类型',
name: 'marketingType', name: 'marketingType',
type: 'select', type: 'select',
...@@ -219,8 +218,7 @@ export default { ...@@ -219,8 +218,7 @@ export default {
tableSearchForm: { tableSearchForm: {
merchantName: '', merchantName: '',
activityName: '', activityName: '',
activityType: '', activityType: ''
activityStatus: 2
}, },
// 表格 // 表格
userList: [], userList: [],
...@@ -292,10 +290,6 @@ export default { ...@@ -292,10 +290,6 @@ export default {
activityTypeList: [ activityTypeList: [
{ confId: '3', confName: '众筹' }, { confId: '3', confName: '众筹' },
{ confId: '5', confName: '膨胀金' } { confId: '5', confName: '膨胀金' }
],
activityStatuList: [
{ confId: 2, confName: '进行中' },
{ confId: 3, confName: '已结束' }
] ]
} }
} }
...@@ -317,12 +311,30 @@ export default { ...@@ -317,12 +311,30 @@ export default {
} }
}, },
watch: { watch: {
idBefEncryptionBattle(val) { activeName: {
this.importGroup() handler(val) {
if (val == 'first') {
this.tableParams.tableOption = true
this.$nextTick(() => {
this.tableParams.mutiSelectUniqueKey = 'activityId'
this.tableParams.mutiSelectName = 'activityId'
})
} else {
this.tableParams.tableOption = false
this.$nextTick(() => {
this.tableParams.mutiSelectUniqueKey = ''
this.tableParams.mutiSelectName = ''
})
}
}, },
idBefEncryptionGood(val) { immediate: true
this.importGroup()
}, },
// idBefEncryptionBattle(val) {
// this.importGroup()
// },
// idBefEncryptionGood(val) {
// this.importGroup()
// },
filterText(val) { filterText(val) {
this.$refs.tree.filter(val) this.$refs.tree.filter(val)
}, },
...@@ -331,6 +343,15 @@ export default { ...@@ -331,6 +343,15 @@ export default {
}, },
roomName(val) { roomName(val) {
this.filterRoomName(val) this.filterRoomName(val)
},
groupName(val) {
if (this.wechat.roomName) return
if (this.wechat.battleStaffName) {
this.wechat.battleGroupId = this.idBefEncryptionBattle + '_R:' + val
}
if (this.wechat.goodStaffName) {
this.wechat.goodGroupId = this.idBefEncryptionGood + '_R:' + val
}
} }
}, },
methods: { methods: {
...@@ -401,14 +422,15 @@ export default { ...@@ -401,14 +422,15 @@ export default {
}) })
}, },
handleNodeClick(data) { handleNodeClick(data) {
this.setSendName(data.name, data.staffId)
// this.wechat.roomName = '' // this.wechat.roomName = ''
if (this.menuIndex == 1) { if (this.menuIndex == 1) {
this.idBefEncryptionBattle = data.idBefEncryption this.idBefEncryptionBattle = data.idBefEncryption
} }
if (this.menuIndex == 2) { if (this.menuIndex == 2) {
this.idBefEncryptionGood = data.idBefEncryption this.idBefEncryptionGood = data.idBefEncryption
this.groupName = ''
} }
this.setSendName(data.name, data.staffId)
this.hideSelect() this.hideSelect()
}, },
setSendName(name, staffId, isClear, i) { setSendName(name, staffId, isClear, i) {
...@@ -420,8 +442,10 @@ export default { ...@@ -420,8 +442,10 @@ export default {
if (this.menuIndex == 2 || i == 2) { if (this.menuIndex == 2 || i == 2) {
if (staffId == this.wechat.goodStaffId && staffId) return if (staffId == this.wechat.goodStaffId && staffId) return
Object.assign(this.wechat, { goodStaffName: name, goodStaffId: staffId }) Object.assign(this.wechat, { goodStaffName: name, goodStaffId: staffId })
this.$apis.battle.activityreportWorktool({ cloudId: this.idBefEncryptionGood }).then(res => {
this.selectGroupName = res.data.result || []
})
} }
console.log(this.wechat)
if (isClear && !this.wechat.battleStaffName && !this.wechat.goodStaffName) { if (isClear && !this.wechat.battleStaffName && !this.wechat.goodStaffName) {
this.wechat.roomName = '' this.wechat.roomName = ''
this.groupList = [] this.groupList = []
...@@ -448,15 +472,15 @@ export default { ...@@ -448,15 +472,15 @@ export default {
} }
// this.wechat.groupId = data.roomChatId // this.wechat.groupId = data.roomChatId
}, },
importGroup() { // importGroup() {
if (this.wechat.roomName) return // if (this.wechat.roomName) return
if (this.wechat.battleStaffName) { // if (this.wechat.battleStaffName) {
this.wechat.battleGroupId = this.idBefEncryptionBattle + '_R:' + this.groupName // this.wechat.battleGroupId = this.idBefEncryptionBattle + '_R:' + this.groupName
} // }
if (this.wechat.goodStaffName) { // if (this.wechat.goodStaffName) {
this.wechat.goodGroupId = this.idBefEncryptionGood + '_R:' + this.groupName // this.wechat.goodGroupId = this.idBefEncryptionGood + '_R:' + this.groupName
} // }
}, // },
openMenu(e) { openMenu(e) {
if (e == this.menuIndex) return (this.menuIndex = 0) if (e == this.menuIndex) return (this.menuIndex = 0)
this.menuIndex = e this.menuIndex = e
...@@ -551,7 +575,7 @@ export default { ...@@ -551,7 +575,7 @@ export default {
// this.$refs.selectMember.$refs.tree.setCheckedKeys(this.ids) // this.$refs.selectMember.$refs.tree.setCheckedKeys(this.ids)
// } // }
}, },
handlebattleConfirm() { async handlebattleConfirm() {
if (this.userList.length == 0) { if (this.userList.length == 0) {
this.$message({ this.$message({
message: '请选择专员', message: '请选择专员',
...@@ -607,6 +631,7 @@ export default { ...@@ -607,6 +631,7 @@ export default {
if (res.data) { if (res.data) {
this.battleVisible = false this.battleVisible = false
this.handleSearch() this.handleSearch()
this.activeName = 'first'
this.clearData() this.clearData()
} }
}) })
...@@ -658,7 +683,7 @@ export default { ...@@ -658,7 +683,7 @@ export default {
roomName: '', roomName: '',
autoGroupMerchantId autoGroupMerchantId
} }
const groupId = battleGroupId || goodGroupId const groupId = battleGroupId || goodGroupId || ''
if (groupId.split('_R:')[1] == autoGroupName) { if (groupId.split('_R:')[1] == autoGroupName) {
this.groupName = autoGroupName this.groupName = autoGroupName
this.idBefEncryptionBattle = battleGroupId.split('_R:')[0] this.idBefEncryptionBattle = battleGroupId.split('_R:')[0]
...@@ -666,7 +691,9 @@ export default { ...@@ -666,7 +691,9 @@ export default {
} else { } else {
this.wechat.roomName = autoGroupName this.wechat.roomName = autoGroupName
} }
this.$apis.battle.activityreportWorktool({ cloudId: this.idBefEncryptionGood }).then(res => {
this.selectGroupName = res.data.result || []
})
this.getGroupList(this.wechat.staffId) this.getGroupList(this.wechat.staffId)
}) })
}, },
...@@ -693,6 +720,7 @@ export default { ...@@ -693,6 +720,7 @@ export default {
let params = { let params = {
...this.tableSearchForm ...this.tableSearchForm
} }
this.activeName == 'first' ? (params.activityStatus = 2) : (params.activityStatus = 3)
return params return params
}, },
beforeSearchFn() { beforeSearchFn() {
...@@ -710,7 +738,7 @@ export default { ...@@ -710,7 +738,7 @@ export default {
}, },
async getDepartmentTree() { async getDepartmentTree() {
// let params = { addChildrensFlag: true, queryMerchantId: this.config.merchantId,loginStatus:1 } // let params = { addChildrensFlag: true, queryMerchantId: this.config.merchantId,loginStatus:1 }
let params = { addChildrensFlag: true, queryMerchantId: this.$merchantId, loginStatus: 1 } let params = { addChildrensFlag: true, queryMerchantId: this.$merchantId, loginStatus: 1 } //this.$merchantId
let data = await this.$apis.battle.getlistDepartmentTree(params) let data = await this.$apis.battle.getlistDepartmentTree(params)
this.ids = [] this.ids = []
this.automaticData = data this.automaticData = data
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<GLTable ref="battleRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun" @selectionTable="selectionTable"> <GLTable ref="battleRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun" @selectionTable="selectionTable">
<div slot="activityTime" slot-scope="scope">{{ dateFormatFun(scope.scope.startTime) }}-{{ dateFormatFun(scope.scope.endTime) }}</div> <div slot="activityTime" slot-scope="scope">{{ dateFormatFun(scope.scope.startTime) }}-{{ dateFormatFun(scope.scope.endTime) }}</div>
<div slot="content" slot-scope="scope"> <div slot="content" slot-scope="scope">
<div v-for="(item,index) in formatterContent(scope.scope)" :key="index">{{item}}</div> <div v-for="(item, index) in formatterContent(scope.scope)" :key="index">{{ item }}</div>
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" v-if="!scope.scope.staffId" @click="handlebattleOn(scope.scope)">配置</el-button> <el-button type="text" v-if="!scope.scope.staffId" @click="handlebattleOn(scope.scope)">配置</el-button>
...@@ -584,15 +584,21 @@ export default { ...@@ -584,15 +584,21 @@ export default {
}, },
methods: { methods: {
formatterContent(cellValue) { formatterContent(cellValue) {
let typeToTxt = new Map([[5,'#1.SA个人喜报>>'],[4, '#2.SA喜报>>'],[7, '#3.文字喜报>>'],[2, '#4.早报>>'],[6, '#5.客户进度消息>>'],[ 3, '#6.补单通知>>']]) let typeToTxt = new Map([
[5, '#1.SA个人喜报>>'],
[4, '#2.SA喜报>>'],
[7, '#3.文字喜报>>'],
[2, '#4.早报>>'],
[6, '#5.客户进度消息>>'],
[3, '#6.补单通知>>']
])
let txt = '' let txt = ''
cellValue.groupConfigList?.forEach(item => { cellValue.groupConfigList?.forEach(item => {
if (item.groupId&&typeToTxt.get(item.actionReportType)) { if (item.groupId && typeToTxt.get(item.actionReportType)) {
typeToTxt.set(item.actionReportType,item.groupName?typeToTxt.get(item.actionReportType) + `【${item.groupName}】`:'') typeToTxt.set(item.actionReportType, item.groupName ? typeToTxt.get(item.actionReportType) + `【${item.groupName}】` : '')
} }
}) })
txt = [...typeToTxt.values()].filter(item=>item.includes('【')) txt = [...typeToTxt.values()].filter(item => item.includes('【'))
return txt return txt
}, },
// 图片查看, // 图片查看,
...@@ -1159,7 +1165,7 @@ export default { ...@@ -1159,7 +1165,7 @@ export default {
} }
} }
.search-groomname { .search-groomname {
width: 252px; width: 400px;
margin: 12px 16px 0; margin: 12px 16px 0;
/deep/.el-input { /deep/.el-input {
width: 252px; width: 252px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!