Commit d2fdc554 by 张权

Merge branch 'v3.5.2' into 'v3.6.0'

V3.5.2

See merge request !42
2 parents 48f99cfd 662ca078
...@@ -19,16 +19,14 @@ ...@@ -19,16 +19,14 @@
</div> </div>
<GLDialog :mode="mode" class="battle-dialog" title="配置专员" @onOk="handlebattleConfirm" @onCancel="handlebattleClose" :visible.sync="battleVisible"> <GLDialog :mode="mode" class="battle-dialog" title="配置专员" @onOk="handlebattleConfirm" @onCancel="handlebattleClose" :visible.sync="battleVisible">
<div class="gl-form-page gl-form-min"> <div class="gl-form-page gl-form-min">
<el-form :model="wechat" ref="form" label-width="154px" :rules="rules"> <el-form :model="wechat" ref="form" label-width="200px" :rules="rules">
<el-form-item label="所属企业:"> <el-form-item label="所属企业:">
<el-radio-group v-model="config.merchantId" @change="changeRadio"> <el-select v-model="config.merchantId" placeholder="请选择" @change="handleMerchatChange">
<template v-for="(item, index) in merchantList"> <el-option v-for="item in merchantList" :key="item.merchantId" :label="item.merchantName" :value="item.merchantId"></el-option>
<el-radio :key="index" :label="item.merchantId">{{ item.merchantName }}</el-radio> </el-select>
</template>
</el-radio-group>
</el-form-item> </el-form-item>
<!-- 战报自动发送 --> <!-- 推送人 -->
<el-form-item class="select-wrap" label="战报自动发送:" prop="staffId"> <el-form-item class="select-wrap" label="推送人:" prop="staffId">
<div class="common el-form-item__content"> <div class="common el-form-item__content">
<div class="el-input" ref="automaticRef"> <div class="el-input" ref="automaticRef">
<div class="el-input__inner" @click="openAutomatic"> <div class="el-input__inner" @click="openAutomatic">
...@@ -54,29 +52,32 @@ ...@@ -54,29 +52,32 @@
</gl-select-menu> </gl-select-menu>
</transition> </transition>
</el-form-item> </el-form-item>
<!-- 关联群 --> <!-- 收款喜报 - 关联群 -->
<el-form-item class="select-wrap" label="关联群:" prop="groupId"> <el-form-item class="select-wrap">
<div slot="label">将
<img class="icon-eye" @click="handlePoster('xiReport')" src="@/assets/icon-eye.png" />
收款喜报:推送至群聊:
</div>
<div class="common el-form-item__content"> <div class="common el-form-item__content">
<div class="el-input" ref="groupRef"> <div class="el-input" ref="groupXiRef">
<div class="el-input__inner" @click="openGroup"> <div class="el-input__inner" @click="openGroup('xiReport')">
<span class="placeholder" v-if="wechat.roomName == ''">选择选择群</span> <span class="placeholder">请选择(可多选)</span>
{{ wechat.roomName }}
</div> </div>
<span class="el-input__suffix" @click="openGroup"> <span class="el-input__suffix" @click="openGroup('xiReport')">
<span class="el-input__suffix-inner"><i :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', isgroup ? 'is-reverse' : '']"></i></span> <span class="el-input__suffix-inner"><i :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', groupHideObj.xiReport ? 'is-reverse' : '']"></i></span>
</span> </span>
</div> </div>
</div> </div>
<transition name="el-zoom-in-top" v-if="!isgroup"> <transition name="el-zoom-in-top" v-if="!groupHideObj.xiReport">
<gl-select-menu :domEl="domEl" @changeStatu="hideSelect"> <gl-select-menu :domEl="domXiEl" @changeStatu="hideSelect">
<el-form-item class="search-groomname"> <el-form-item class="search-groomname">
<el-input placeholder="请输入搜索关键词" prefix-icon="el-icon-search" v-model="roomName"></el-input> <el-input placeholder="请输入搜索关键词" prefix-icon="el-icon-search" v-model="roomName"></el-input>
</el-form-item> </el-form-item>
<div class="el-select-dropdown__wrap el-scrollbar__wrap"> <div class="el-select-dropdown__wrap el-scrollbar__wrap">
<ul class="el-scrollbar__view el-select-dropdown__list"> <ul class="el-scrollbar__view el-select-dropdown__list">
<template v-if="groupList.length > 0"> <template v-if="groupList.length > 0">
<li v-for="i in roomName == '' ? groupList : stageList" class="el-select-dropdown__item" :key="i" @click="selectGroup(i)"> <li v-for="(k, kIdx) in groupList" class="el-select-dropdown__item" :key="kIdx" @click="e => selectGroup(e, k, 'xiReport')">
<span>{{ i.roomName }}</span> <span :class="[groupCofList.xiReport.findIndex(i => i.roomName == k.roomName) != -1 ? 'grey-txt' : '']">{{ k.roomName }}</span>
</li> </li>
</template> </template>
<div class="empty" v-else>暂无数据</div> <div class="empty" v-else>暂无数据</div>
...@@ -84,10 +85,140 @@ ...@@ -84,10 +85,140 @@
</div> </div>
</gl-select-menu> </gl-select-menu>
</transition> </transition>
<div class="group-list-box">
<div class="list-tag" v-for="(k, kIdx) in groupCofList.xiReport" :key="kIdx">
<span class="tag-txt text-hide">{{ k.roomName }}</span>
<img @click="handleGroupRemove(kIdx, 'xiReport')" src="@/assets/icon-close.png" />
</div>
</div>
</el-form-item>
<!-- 战报 - 关联群 -->
<el-form-item class="select-wrap">
<div slot="label">将
<img class="icon-eye" @click="handlePoster('zhanReport')" src="@/assets/icon-eye.png" />
战报:推送至群聊:
</div>
<div class="common el-form-item__content">
<div class="el-input" ref="groupZhanRef">
<div class="el-input__inner" @click="openGroup('zhanReport')">
<span class="placeholder">请选择(可多选)</span>
</div>
<span class="el-input__suffix" @click="openGroup('zhanReport')">
<span class="el-input__suffix-inner"><i :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', groupHideObj.zhanReport ? 'is-reverse' : '']"></i></span>
</span>
</div>
</div>
<transition name="el-zoom-in-top" v-if="!groupHideObj.zhanReport">
<gl-select-menu :domEl="domZhanEl" @changeStatu="hideSelect">
<el-form-item class="search-groomname">
<el-input placeholder="请输入搜索关键词" prefix-icon="el-icon-search" v-model="roomName"></el-input>
</el-form-item>
<div class="el-select-dropdown__wrap el-scrollbar__wrap">
<ul class="el-scrollbar__view el-select-dropdown__list">
<template v-if="groupList.length > 0">
<li v-for="(k, kIdx) in groupList" class="el-select-dropdown__item" :key="kIdx" @click="e => selectGroup(e, k, 'zhanReport')">
<span :class="[groupCofList.zhanReport.findIndex(i => i.roomName == k.roomName) != -1 ? 'grey-txt' : '']">{{ k.roomName }}</span>
</li>
</template>
<div class="empty" v-else>暂无数据</div>
</ul>
</div>
</gl-select-menu>
</transition>
<div class="group-list-box">
<div class="list-tag" v-for="(k, kIdx) in groupCofList.zhanReport" :key="kIdx">
<span class="tag-txt text-hide">{{ k.roomName }}</span>
<img @click="handleGroupRemove(kIdx, 'zhanReport')" src="@/assets/icon-close.png" />
</div>
</div>
</el-form-item>
<!-- 补单通知 - 关联群 -->
<el-form-item class="select-wrap">
<div slot="label">将
<img class="icon-eye" @click="handlePoster('orderReport')" src="@/assets/icon-eye.png" />
补单通知:推送至群聊:
</div>
<div class="common el-form-item__content">
<div class="el-input" ref="groupOrderRef">
<div class="el-input__inner" @click="openGroup('orderReport')">
<span class="placeholder">请选择(可多选)</span>
</div>
<span class="el-input__suffix" @click="openGroup('orderReport')">
<span class="el-input__suffix-inner"><i :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', groupHideObj.orderReport ? 'is-reverse' : '']"></i></span>
</span>
</div>
</div>
<transition name="el-zoom-in-top" v-if="!groupHideObj.orderReport">
<gl-select-menu :domEl="domOrderEl" @changeStatu="hideSelect">
<el-form-item class="search-groomname">
<el-input placeholder="请输入搜索关键词" prefix-icon="el-icon-search" v-model="roomName"></el-input>
</el-form-item>
<div class="el-select-dropdown__wrap el-scrollbar__wrap">
<ul class="el-scrollbar__view el-select-dropdown__list">
<template v-if="groupList.length > 0">
<li v-for="(k, kIdx) in groupList" class="el-select-dropdown__item" :key="kIdx" @click="e => selectGroup(e, k, 'orderReport')">
<span :class="[groupCofList.orderReport.findIndex(i => i.roomName == k.roomName) != -1 ? 'grey-txt' : '']">{{ k.roomName }}</span>
</li>
</template>
<div class="empty" v-else>暂无数据</div>
</ul>
</div>
</gl-select-menu>
</transition>
<div class="group-list-box">
<div class="list-tag" v-for="(k, kIdx) in groupCofList.orderReport" :key="kIdx">
<span class="tag-txt text-hide">{{ k.roomName }}</span>
<img @click="handleGroupRemove(kIdx, 'orderReport')" src="@/assets/icon-close.png" />
</div>
</div>
</el-form-item>
<!-- SA喜报 - 关联群 -->
<el-form-item class="select-wrap">
<div slot="label">将
<img class="icon-eye" @click="handlePoster('saReport')" src="@/assets/icon-eye.png" />
SA喜报:推送至群聊:
</div>
<div class="common el-form-item__content">
<div class="el-input" ref="groupSaRef">
<div class="el-input__inner" @click="openGroup('saReport')">
<span class="placeholder">请选择(可多选)</span>
</div>
<span class="el-input__suffix" @click="openGroup('saReport')">
<span class="el-input__suffix-inner"><i :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', groupHideObj.saReport ? 'is-reverse' : '']"></i></span>
</span>
</div>
</div>
<transition name="el-zoom-in-top" v-if="!groupHideObj.saReport">
<gl-select-menu :domEl="domSaEl" @changeStatu="hideSelect">
<el-form-item class="search-groomname">
<el-input placeholder="请输入搜索关键词" prefix-icon="el-icon-search" v-model="roomName"></el-input>
</el-form-item>
<div class="el-select-dropdown__wrap el-scrollbar__wrap">
<ul class="el-scrollbar__view el-select-dropdown__list">
<template v-if="groupList.length > 0">
<li v-for="(k, kIdx) in groupList" class="el-select-dropdown__item" :key="kIdx" @click="e => selectGroup(e, k, 'saReport')">
<span :class="[groupCofList.saReport.findIndex(i => i.roomName == k.roomName) != -1 ? 'grey-txt' : '']">{{ k.roomName }}</span>
</li>
</template>
<div class="empty" v-else>暂无数据</div>
</ul>
</div>
</gl-select-menu>
</transition>
<div class="group-list-box">
<div class="list-tag" v-for="(k, kIdx) in groupCofList.saReport" :key="kIdx">
<span class="tag-txt text-hide">{{ k.roomName }}</span>
<img @click="handleGroupRemove(kIdx, 'saReport')" src="@/assets/icon-close.png" />
</div>
</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
</GLDialog> </GLDialog>
<!-- 查看 -->
<GLDialog v-if="isImgVisible" title="查看" mode="mid" :visible.sync="isImgVisible" class="dialog-look" :hasFooter="false">
<img width="50%" :src="require(`@/assets/${dialogImageUrl}.png`)" alt="" />
</GLDialog>
</div> </div>
</template> </template>
...@@ -101,6 +232,40 @@ export default { ...@@ -101,6 +232,40 @@ export default {
}, },
data() { data() {
return { return {
// 推送至群聊,下拉框是否隐藏
groupHideObj: {
xiReport: true,
zhanReport: true,
orderReport: true,
saReport: true
},
groupCofList: {
xiReport: [],
zhanReport: [],
orderReport: [],
saReport: []
},
groupToType: [
{
attr: 'xiReport',
type: 1
},
{
attr: 'zhanReport',
type: 2
},
{
attr: 'orderReport',
type: 3
},
{
attr: 'saReport',
type: 4
}
],
// 查看大图
isImgVisible: false,
dialogImageUrl: '',
isgroup: true, isgroup: true,
isAutomatic: true, isAutomatic: true,
merchantId: '', merchantId: '',
...@@ -113,10 +278,21 @@ export default { ...@@ -113,10 +278,21 @@ export default {
setectList: [], setectList: [],
merchantList: [], merchantList: [],
groupList: [], groupList: [],
// groupList: [{
// roomChatId: '1688855088375831_R:1970325371975971',
// roomName: '波波的单店'
// }, {
// roomChatId: '111',
// roomName: 'cwq'
// }, {
// roomChatId: '222',
// roomName: '啦啦啦'
// }],
// 搜索 // 搜索
searchForm: { searchForm: {
yqMerchantId: '', yqMerchantId: '',
yqMerchantName: '' yqMerchantName: '',
enterpriseMerchantId: ''
}, },
searchFormData: [ searchFormData: [
{ {
...@@ -130,6 +306,16 @@ export default { ...@@ -130,6 +306,16 @@ export default {
name: 'yqMerchantId', name: 'yqMerchantId',
type: 'input', type: 'input',
maxlength: 11 maxlength: 11
},
{
label: '企微名称',
name: 'enterpriseMerchantId',
type: 'select',
width: '215px',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'merchantList'
} }
], ],
// 表格 // 表格
...@@ -146,18 +332,39 @@ export default { ...@@ -146,18 +332,39 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '园区店', label: '园区店',
prop: 'yqMerchantName' prop: 'yqMerchantName',
formatter: cellValue => {
return cellValue.yqMerchantName + (cellValue.yqMerchantId || '')
}
}, },
{ {
label: '商户号', label: '企微',
prop: 'yqMerchantId' prop: 'groupName'
}, },
{ {
label: '负责人', label: '推送人',
prop: 'staffName', prop: 'staffName',
line: 1, line: 1,
width: 300 width: 300
},
{
label: '内容',
prop: '',
formatter: cellValue => {
let typeToTxt = {
1: '(推收款喜报)',
2: '(推战报)',
3: '(推补录订单)',
4: '(推SA喜报)'
}
let txt = ''
cellValue.groupConfigList?.forEach(item => {
if (item.groupId) {
txt = (txt ? txt + ';' : txt) + item.groupName + typeToTxt[item.actionReportType]
}
})
return txt
}
} }
] ]
}, },
...@@ -175,13 +382,13 @@ export default { ...@@ -175,13 +382,13 @@ export default {
merchantId: '' merchantId: ''
}, },
rules: { rules: {
staffId: { required: true, message: '请选择战报自动发送', trigger: 'change' }, staffId: { required: true, message: '请选择推送人', trigger: 'change' },
groupId: { required: true, message: '请选择关联群', trigger: 'change' } groupId: { required: true, message: '请选择关联群', trigger: 'change' }
}, },
wechat: { wechat: {
staffId: '', staffId: '',
automaticName: '', automaticName: ''
roomName: '' // roomName: ''
}, },
baseData: { baseData: {
merchantList: [] merchantList: []
...@@ -190,13 +397,23 @@ export default { ...@@ -190,13 +397,23 @@ export default {
}, },
mounted() { mounted() {
this.merchantList = this.$saasOrder?.merchantList || [] this.getMerchantList()
this.config.merchantId = this.merchantList[0]?.merchantId // this.merchantList = this.$saasOrder?.merchantList || []
this.config.merchantName = this.merchantList[0]?.merchantName // this.config.merchantId = this.merchantList[0]?.merchantId
// this.config.merchantName = this.merchantList[0]?.merchantName
}, },
computed: { computed: {
domEl() { domXiEl() {
return this.$refs.groupRef return this.$refs.groupXiRef
},
domZhanEl() {
return this.$refs.groupZhanRef
},
domOrderEl() {
return this.$refs.groupOrderRef
},
domSaEl() {
return this.$refs.groupSaRef
}, },
automaticEl() { automaticEl() {
return this.$refs.automaticRef return this.$refs.automaticRef
...@@ -205,16 +422,59 @@ export default { ...@@ -205,16 +422,59 @@ export default {
watch: { watch: {
filterText(val) { filterText(val) {
this.$refs.tree.filter(val) this.$refs.tree.filter(val)
},
roomName(val) {
this.filterRoomName(val)
} }
// roomName(val) {
// this.filterRoomName(val)
// }
}, },
methods: { methods: {
// 图片查看
handlePoster(name) {
this.isImgVisible = true
this.dialogImageUrl = name
},
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName]?.length) {
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
getMerchantList() {
this.$apis.battle.getMerchantList({}).then(res => {
this.baseData.merchantList = res
this.merchantList = res
this.getOptionsList('searchFormData')
this.config.merchantId = this.baseData.merchantList[0]?.merchantId
this.config.merchantName = this.baseData.merchantList[0]?.merchantName
// this.config.merchantId = this.merchantList && this.merchantList[0].merchantId
// this.merchantId = this.merchantList && this.merchantList[0].merchantId
// this.merchantName = this.merchantList && this.merchantList[0].merchantName
})
},
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
yqMerchantId: '', yqMerchantId: '',
yqMerchantName: '' yqMerchantName: '',
enterpriseMerchantId: ''
} }
this.handleSearch() this.handleSearch()
}, },
...@@ -223,8 +483,14 @@ export default { ...@@ -223,8 +483,14 @@ export default {
this.$refs.battleRef.clearMutiSelect() this.$refs.battleRef.clearMutiSelect()
this.config.merchantId = this.merchantList[0]?.merchantId this.config.merchantId = this.merchantList[0]?.merchantId
this.wechat = { this.wechat = {
automaticName: '', staffId: '',
roomName: '' automaticName: ''
}
this.groupCofList = {
xiReport: [],
zhanReport: [],
orderReport: [],
saReport: []
} }
this.hideSelect() this.hideSelect()
}, },
...@@ -232,43 +498,73 @@ export default { ...@@ -232,43 +498,73 @@ export default {
if (!value) return true if (!value) return true
return data.name.indexOf(value) !== -1 return data.name.indexOf(value) !== -1
}, },
filterRoomName(value) { // filterRoomName(value) {
this.stageList = this.groupList.filter(item => { // this.stageList = this.groupList.filter(item => {
if (item.roomName.indexOf(value) !== -1) { // if (item.roomName.indexOf(value) !== -1) {
return item // return item
} // }
}) // })
}, // },
handleNodeClick(data) { handleNodeClick(data) {
this.hideSelect() this.hideSelect()
this.wechat.automaticName = data.name this.wechat.automaticName = data.name
this.wechat.staffId = data.staffId this.wechat.staffId = data.staffId
this.wechat.roomName = '' this.getGroupList(this.wechat.staffId, true)
this.getGroupList(this.wechat.staffId)
}, },
hideSelect() { hideSelect() {
this.isgroup = true // this.isgroup = true
this.groupHideObj.xiReport = true
this.groupHideObj.zhanReport = true
this.groupHideObj.orderReport = true
this.groupHideObj.saReport = true
this.isAutomatic = true this.isAutomatic = true
}, },
selectGroup(data) { selectGroup(e, data, groupHideAttr) {
this.hideSelect() e.stopPropagation()
this.wechat.roomName = data.roomName if (this.groupCofList[groupHideAttr].findIndex(i => i.roomName == data.roomName) != -1) {
this.wechat.groupId = data.roomChatId return
}
// this.hideSelect()
// this.wechat.roomName = data.roomName
// this.wechat.groupId = data.roomChatId
this.groupCofList[groupHideAttr].push({
groupId: data.roomChatId,
roomName: data.roomName
})
}, },
openGroup(e) { openGroup(groupHideAttr) {
this.isAutomatic = true this.isAutomatic = true
this.isgroup = !this.isgroup // this.isgroup = !this.isgroup
this.groupHideObj[groupHideAttr] = !this.groupHideObj[groupHideAttr]
}, },
openAutomatic() { openAutomatic() {
this.isgroup = true // this.isgroup = true
this.groupHideObj.xiReport = true
this.groupHideObj.zhanReport = true
this.groupHideObj.orderReport = true
this.groupHideObj.saReport = true
this.isAutomatic = !this.isAutomatic this.isAutomatic = !this.isAutomatic
}, },
handleGroupRemove(idx, groupHideAttr) {
this.groupCofList[groupHideAttr].splice(idx, 1)
},
//所属企业 //所属企业
changeRadio(val) { handleMerchatChange(val) {
// console.log(val)
this.getDepartmentTree() this.getDepartmentTree()
this.merchantList.forEach(item => { this.merchantList.forEach(item => {
item.merchantId == val ? (this.merchantName = item.merchantName) : '' item.merchantId == val ? (this.merchantName = item.merchantName) : ''
}) })
this.wechat = {
staffId: '',
automaticName: ''
}
this.groupCofList = {
xiReport: [],
zhanReport: [],
orderReport: [],
saReport: []
}
}, },
battleSetHandle() { battleSetHandle() {
if (this.setectList.length == 0) { if (this.setectList.length == 0) {
...@@ -278,6 +574,16 @@ export default { ...@@ -278,6 +574,16 @@ export default {
}) })
return return
} }
this.wechat = {
staffId: '',
automaticName: ''
}
this.groupCofList = {
xiReport: [],
zhanReport: [],
orderReport: [],
saReport: []
}
this.getDepartmentTree() this.getDepartmentTree()
this.battleVisible = true this.battleVisible = true
}, },
...@@ -296,15 +602,18 @@ export default { ...@@ -296,15 +602,18 @@ export default {
handlebattleConfirm() { handlebattleConfirm() {
if (!this.wechat.staffId) { if (!this.wechat.staffId) {
this.$message({ this.$message({
message: '请选择战报自动发送', message: '请选择推送人',
type: 'error', type: 'error',
customClass: 'message-Z-zinde' customClass: 'message-Z-zinde'
}) })
return true return true
} }
if (this.wechat.automaticName !== '' && this.wechat.roomName == '') { let isGroupEmpty = Object.keys(this.groupCofList)
.map(item => this.groupCofList[item].length)
.every(item => item == 0)
if (isGroupEmpty) {
this.$message({ this.$message({
message: '请选择关联群', message: '推送配置必须配置至少一项',
type: 'error', type: 'error',
customClass: 'message-Z-zinde' customClass: 'message-Z-zinde'
}) })
...@@ -315,17 +624,32 @@ export default { ...@@ -315,17 +624,32 @@ export default {
enterpriseMerchantName: this.config.merchantName, enterpriseMerchantName: this.config.merchantName,
staffId: this.wechat.staffId, staffId: this.wechat.staffId,
staffName: this.wechat.automaticName, staffName: this.wechat.automaticName,
groupId: this.wechat.groupId, // groupId: this.wechat.groupId,
groupName: this.wechat.roomName, // groupName: this.wechat.roomName,
groupMerchantId: this.config.merchantId, groupMerchantId: this.config.merchantId,
updatedBy: this.$globalState.session.accountName, updatedBy: this.$globalState.session.accountName,
yqMerchantIdList: [] yqMerchantIdList: [],
groupConfigList: []
} }
this.setectList.forEach(item => { this.setectList.forEach(item => {
params.yqMerchantIdList.push(item.yqMerchantId) params.yqMerchantIdList.push(item.yqMerchantId)
}) })
// console.log(params, 'params---') Object.keys(this.groupCofList).map(item => {
// console.log(this.groupCofList[item])
let type = this.groupToType.find(k => k.attr == item).type
if (this.groupCofList[item].length) {
this.groupCofList[item].forEach(k => {
params.groupConfigList.push({
groupId: k.groupId,
groupName: k.roomName,
groupMerchantId: this.config.merchantId,
actionReportType: type
})
})
}
})
console.log(params, 'params---')
this.$apis.saasOrder.updateYqConfig(params).then(res => { this.$apis.saasOrder.updateYqConfig(params).then(res => {
this.$message({ this.$message({
...@@ -347,20 +671,49 @@ export default { ...@@ -347,20 +671,49 @@ export default {
handlebattleOn(data, sign) { handlebattleOn(data, sign) {
this.setectList = [] this.setectList = []
this.setectList.push(data) this.setectList.push(data)
this.wechat = {
staffId: '',
automaticName: ''
}
this.groupCofList = {
xiReport: [],
zhanReport: [],
orderReport: [],
saReport: []
}
this.battleVisible = true this.battleVisible = true
// 编辑 // 编辑
if (sign) { if (sign) {
this.wechat.staffId = data.staffId this.wechat.staffId = data.staffId
this.wechat.automaticName = data.staffName this.wechat.automaticName = data.staffName
this.wechat.groupId = data.groupId // this.wechat.groupId = data.groupId
this.wechat.roomName = data.groupName // this.wechat.roomName = data.groupName
data.groupConfigList.forEach(item => {
let groupHideAttr = this.groupToType.find(k => k.type == item.actionReportType).attr
if (item.groupId) {
this.groupCofList[groupHideAttr].push({
groupId: item.groupId,
roomName: item.groupName
})
}
})
this.getGroupList(this.wechat.staffId) this.getGroupList(this.wechat.staffId)
} }
this.getDepartmentTree() this.getDepartmentTree()
}, },
getGroupList(id) { getGroupList(id, isReset = false) {
this.$apis.saasOrder.getGroupList({ msgStaffIdList: id }).then(res => { this.$apis.saasOrder.getGroupList({ msgStaffIdList: id }).then(res => {
if (res.code == 0) this.groupList = res.data if (res.code == 0) {
this.groupList = res.data
if (isReset) {
this.groupCofList = {
xiReport: [],
zhanReport: [],
orderReport: [],
saReport: []
}
}
}
}) })
}, },
handleSetting() { handleSetting() {
...@@ -486,6 +839,12 @@ export default { ...@@ -486,6 +839,12 @@ export default {
} }
} }
.select-wrap { .select-wrap {
vertical-align: middle;
.icon-eye {
width: 20px;
height: 20px;
cursor: pointer;
}
.common { .common {
margin: 4px 0; margin: 4px 0;
height: 40px !important; height: 40px !important;
...@@ -502,6 +861,31 @@ export default { ...@@ -502,6 +861,31 @@ export default {
} }
} }
} }
.group-list-box {
display: flex;
.list-tag {
box-sizing: border-box;
display: flex;
align-items: center;
height: 30px;
line-height: 30px;
background: #f2f1ff;
padding: 0 8px;
margin-right: 4px;
border-radius: 8px;
.tag-txt {
box-sizing: border-box;
max-width: 100px;
padding-right: 8px;
}
img {
width: 16px;
height: 16px;
cursor: pointer;
}
}
}
} }
} }
.search-groomname { .search-groomname {
...@@ -514,6 +898,10 @@ export default { ...@@ -514,6 +898,10 @@ export default {
.filter-tree { .filter-tree {
padding: 0 16px; padding: 0 16px;
} }
.grey-txt {
color: #c8c8c8;
cursor: not-allowed;
}
.empty { .empty {
padding: 10px 0; padding: 10px 0;
margin: 0; margin: 0;
...@@ -526,4 +914,8 @@ export default { ...@@ -526,4 +914,8 @@ export default {
color: #c0c6ce; color: #c0c6ce;
line-height: 20px; line-height: 20px;
} }
.dialog-look {
text-align: center;
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!