Commit e2d4fb1b by 杨明

合并

2 parents e56ae3da 27cc2d6d
...@@ -1918,7 +1918,7 @@ ...@@ -1918,7 +1918,7 @@
} }
}, },
"vue-loader-v16": { "vue-loader-v16": {
"version": "npm:vue-loader@16.8.3", "version": "npm:vue-loader-v16@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz", "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true, "dev": true,
...@@ -8506,6 +8506,11 @@ ...@@ -8506,6 +8506,11 @@
"integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==",
"dev": true "dev": true
}, },
"number-precision": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/number-precision/-/number-precision-1.6.0.tgz",
"integrity": "sha512-05OLPgbgmnixJw+VvEh18yNPUo3iyp4BEWJcrLu4X9W05KmMifN7Mu5exYvQXqxxeNWhvIF+j3Rij+HmddM/hQ=="
},
"oauth-sign": { "oauth-sign": {
"version": "0.9.0", "version": "0.9.0",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.5.4", "glsx-components": "^1.5.4",
"number-precision": "^1.6.0",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
"vuex": "^3.1.2", "vuex": "^3.1.2",
......
import { http } from '@/main'
const url1 = '/rop-scrm-entmicro/router'
const url = '/rop-scrm-shopmall/router'
//门店号选择服务
const getMerchantList = params => {
params.method = 'entmicro.api.merchant.listDepartmentTree.select.merchant'
return http({
url: url1,
method: 'post',
data: params,
sign: true
})
}
//分页查询线索喜报配置信息
const getClueReportList = params => {
params.method = `scrm.api.shopmall.clueReportConfig.page`
return http({
url,
method: 'post',
data: params,
sign: true
})
}
// 新增或修改喜报配置
const updateClueReportConfig = params => {
params.method = `scrm.api.shopmall.clueReportConfig.insertOrUpdate`
return http({
url,
method: 'post',
data: params,
sign: true,
returnAll: true
})
}
// 根据ID获取线索喜报配置信息
const getClueDetailById = params => {
params.method = `scrm.api.shopmall.clueReportConfig.getById`
return http({
url,
method: 'post',
data: params,
sign: true,
returnAll: true
})
}
export default { getMerchantList, getClueReportList, updateClueReportConfig,getClueDetailById }
...@@ -18,8 +18,8 @@ module.exports = { ...@@ -18,8 +18,8 @@ module.exports = {
code_message_map: {} code_message_map: {}
}, },
request: { request: {
// baseURL: 'http://scrm.test.glsx.com.cn/', baseURL: '//scrm.test.glsx.com.cn/',
baseURL: 'http://192.168.2.42:8064/', // baseURL: 'http://192.168.2.42:8064/',
// 设置超时时间 // 设置超时时间
timeout: 180000, timeout: 180000,
// 携带凭证 // 携带凭证
......
...@@ -4,24 +4,23 @@ ...@@ -4,24 +4,23 @@
* @Author: limin * @Author: limin
* @Date: 2021-06-07 14:12:32 * @Date: 2021-06-07 14:12:32
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-24 10:07:00 * @LastEditTime: 2023-07-27 16:11:32
*/ */
// 根据环境引入不同配置 process.env.VUE_APP_ENV // 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js') // let request = require('@/http/request.js')
let cfg = require('./conf.js') let cfg = require('./conf.js')
import { Http } from 'glsx-common' import { Http } from 'glsx-common'
let timeout = 30000 //超时时间 export const fetchConfig = function(common) {
export const fetchConfig = function(isEnv = true) {
// console.log(1111111)
// if (isEnv) { // if (isEnv) {
// let { request } = cfg // let { request } = cfg
// Object.assign(request, { timeout }) // Object.assign(request, { timeout })
// return Promise.resolve(cfg) // return Promise.resolve(cfg)
// } // }
//return window.fetch('https://', {}).then(res => res.json()) //return window.fetch('https://', {}).then(res => res.json())
return new Http().get('https://oss-config.dev.glsx.com.cn/mock/6345096902322627d6b83e83/battles/config') return new Http().get('https://oss-config.dev.glsx.com.cn/mock/6345096902322627d6b83e83/battles/config')
// return new Http().get('https://oss-config.glsx.com.cn/mock/635fc7a254298ae78614407a/battles/config') // return new Http().get('https://oss-config.glsx.com.cn/mock/635fc7a254298ae78614407a/battles/config')
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
vue.prototype.$config = cfg vue.prototype.$config = cfg
......
...@@ -12,7 +12,7 @@ let instance = null ...@@ -12,7 +12,7 @@ let instance = null
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) { export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret, sign_common, request_common, merchantId, saasOrder } = await fetchConfig() const { response, request, sign, secret, sign_common, request_common, merchantId, saasOrder } = await fetchConfig(common)
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$merchantId = merchantId Vue.prototype.$merchantId = merchantId
Vue.prototype.$saasOrder = saasOrder Vue.prototype.$saasOrder = saasOrder
......
<template>
<div class="marketing">
<div class="addConfig-wrap">
<div class="header color-3 weight-6 text-16">
门店配置
<!-- <span class="weight-5 color6 font-14 ml12" v-if="merchantName">{{ merchantName }}</span> -->
</div>
<div class="config-wrap gl-form-page">
<el-form ref="battleRef" :model="config" label-width="154px" :rules="rules">
<el-form-item label="门店信息:" prop="merchantId">
<el-button type="default" class="el-icon-plus" @click="handleRelateStoreClose" :disabled="id != ''">选择门店</el-button>
<div class="merchantNameLabel" v-if="config.merchantName">
<p>所属门店</p>
<div class="merchantName ellipsis-1">{{ config.merchantName }}</div>
</div>
</el-form-item>
<!-- 所属企业-->
<el-form-item label="所属企业:" prop="groupMerchantId">
<el-select v-model="config.groupMerchantId" placeholder="请选择" @change="handleMerchatChange" @visible-change="hideSelect">
<el-option v-for="item in merchantList" :key="item.merchantId" :label="item.merchantName" :value="item.merchantId"></el-option>
</el-select>
</el-form-item>
<!-- 推送人 -->
<el-form-item class="select-wrap" label="推送人:" prop="staffId">
<div class="common el-form-item__content">
<div class="el-input" ref="automaticRef">
<div class="el-input__inner" @click="openAutomatic">
<span v-if="config.automaticName == ''" class="placeholder">选择成员</span>
{{ config.automaticName }}
</div>
<span class="el-input__suffix" @click="openAutomatic">
<span class="el-input__suffix-inner"><i :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', isAutomatic ? 'is-reverse' : '']"></i></span>
</span>
</div>
</div>
<transition name="el-zoom-in-top" v-if="!isAutomatic">
<gl-select-menu :domEl="automaticEl" @changeStatu="hideSelect" style="width:432px">
<el-form-item class="search-groomname">
<el-input placeholder="请输入搜索关键词" v-model="filterText"></el-input>
</el-form-item>
<div class="el-select-dropdown__wrap el-scrollbar__wrap">
<template v-if="automaticData.length > 0">
<el-tree class="filter-tree" :data="automaticData" node-key="id" :default-expanded-keys="expandedKeys" :props="defaultProps" default-expand-all :filter-node-method="filterNode" ref="tree" @node-click="handleNodeClick"></el-tree>
</template>
<div class="empty" v-else>暂无数据</div>
</div>
</gl-select-menu>
</transition>
</el-form-item>
<!-- #喜报>> : -->
<template v-for="(bulletin, index) in buttetinList">
<el-form-item :label="bulletin.label + ':'" class="group-item-box" :key="index">
<div class="group-box">
<div class="input-box" v-for="(i, k) in groupCofListInput[bulletin.storageList]" :key="k">
<!-- <el-input v-model="i.name" ></el-input> -->
<el-select v-model="i.name" :placeholder="'将' + bulletin.label + '推送至群聊'" filterable clearable @change="changeGroupName(i.name, k, groupCofListInput[bulletin.storageList])">
<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-remove" v-else @click="delGroup(groupCofListInput[bulletin.storageList], k)"></i>
</div>
</div>
<span class="group-config-text" @click="openConfigDialog(bulletin.componentName)">配置</span>
</el-form-item>
</template>
</el-form>
</div>
</div>
<GLFooter class="footer-panel">
<el-button @click="handlebattleClose" size="medium">取消</el-button>
<el-button type="primary" @click="handlebattleConfirm" size="medium" :loading="loading">保存</el-button>
</GLFooter>
<component :is="dialogComponent" ref="componentRef" v-if="isDialogVisible" :isDialogVisible="isDialogVisible" :content="config.content" @handlePreview="handlePreview" @handleClose="handleClose"></component>
<select-store v-if="relateStoreVisible" ref="relateStore" :dialogVisible="relateStoreVisible" :storeSelected="selectedList" :merchantInfo="config.merchantId" @handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreClose="handleRelateStoreClose"></select-store>
</div>
</template>
<script>
import GlSelectMenu from '../battle/components/select-dropdown.vue'
import clewWordDialog from './components/dialogs/clewWordDialog.vue'
import selectStore from './components/selectStore'
export default {
components: {
GlSelectMenu,
clewWordDialog,
selectStore
},
data() {
return {
id: this.$route.query.id ? this.$route.query.id : '',
selectGroupName: [],
isDialogVisible: false,
relateStoreVisible: false, // 选择门店
dialogComponent: '',
merchantList: [],
automaticData: [],
expandedKeys: [],
defaultProps: {
children: 'children',
label: 'name'
},
config: {
merchantId: '',
merchantName: '',
staffId: '',
automaticName: '',
groupMerchantId: ''
},
isAutomatic: true,
filterText: '',
groupCofList: {
clewWordReport: []
},
rules: {
merchantId: [{ required: true, message: '请选择门店信息', trigger: 'change' }],
groupMerchantId: { required: true, message: '请选择所属企业', trigger: ['blur', 'change'], type: 'number' },
staffId: [{ required: true, message: '请选择推送人', trigger: 'change' }]
},
groupCofListInput: {
clewWordReportValue: [
{
name: ''
}
]
},
groupToType: [
{
attr: 'clewWordReport',
type: 7
}
],
buttetinList: [
{
label: '线索文字喜报',
storageList: 'clewWordReportValue',
componentName: 'clewWordDialog'
}
]
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val)
}
},
computed: {
automaticEl() {
return this.$refs.automaticRef
}
},
mounted() {
this.getMerchantList()
if (this.id) this.getClueDetailById()
},
methods: {
changeGroupName(name, index, data) {
let result
for (let i = 0; i < data.length; i++) {
if (i !== index) {
if (data[i].name == name) result = true
}
}
if (result) {
this.$message({
message: '勿选择相同的群',
type: 'error'
})
data[index].name = ''
}
},
// 选择门店
handleRelateStoreClose() {
this.relateStoreVisible = !this.relateStoreVisible
},
handleRelateStoreConfirm(selectedData) {
selectedData.merchantId && (this.config.merchantId = selectedData.merchantId)
selectedData.merchantName && (this.config.merchantName = selectedData.merchantName)
this.$refs.battleRef.clearValidate('merchantId')
this.handleRelateStoreClose()
},
handlePreview(params) {
let { data } = params
this.config.content = data
this.isDialogVisible = false
},
handleClose() {
this.isDialogVisible = false
},
openConfigDialog(componentName) {
this.dialogComponent = componentName
this.isDialogVisible = true
},
addGroup(group) {
console.log(group)
group.push({ name: '' })
},
delGroup(group, i) {
group.splice(i, 1)
},
hideSelect() {
this.isAutomatic = true
},
openAutomatic() {
this.isAutomatic = !this.isAutomatic
},
getMerchantList(sign) {
this.$apis.battle.getMerchantList({}).then(res => {
this.merchantList = res
if (!this.id) {
this.config.groupMerchantId = res[0]?.merchantId
this.config.groupMerchantName = res[0]?.merchantName
this.getDepartmentTree()
}
})
},
filterNode(value, data) {
if (!value) return true
return data.name.indexOf(value) !== -1
},
handleNodeClick(data) {
this.hideSelect()
if (this.config.automaticName == data.name) return
this.config.automaticName = data.name
this.config.staffId = data.staffId
this.idBefEncryption = data.idBefEncryption ? data.idBefEncryption : '1688855154413617'
this.$refs.battleRef.clearValidate('staffId')
this.$apis.battle.activityreportWorktool({ cloudId: this.idBefEncryption }).then(res => {
this.selectGroupName = res.data.result || []
this.groupCofListInput = { clewWordReportValue: [{ name: '' }] }
})
},
//编辑回显
getClueDetailById() {
this.groupCofListInput = {
// xiReportValue: [],
clewWordReportValue: []
}
this.$apis.clewOrder.getClueDetailById({ id: this.id }).then(res => {
let data = res.data
// 编辑
this.config.staffId = data.staffId
this.config.automaticName = data.staffName
this.config.merchantId = data.merchantId
this.config.merchantName = data.merchantName
this.config.groupMerchantId = data.groupMerchantId
this.config.groupMerchantName = data.groupMerchantName
this.config.content = data.content
data.groupConfigList.forEach(item => {
// let groupHideAttr = this.groupToType.find(k => k.type == item.actionReportType)?.attr
let groupHideAttr = 'clewWordReport'
if (!groupHideAttr) return
if (item.groupId) {
if (item.groupId.split('_R:')[1] && item.groupId.split('_R:')[1] == item.groupName) {
groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: item.groupName })
this.idBefEncryption = item.groupId.split('_R:')[0]
} else if (item.groupName) {
groupHideAttr &&
this.groupCofList[groupHideAttr].push({
groupId: item.groupId,
roomName: item.groupName
})
} else {
this.idBefEncryption = item.groupId.split('_R:')[0]
groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: '' })
}
}
})
for (let k in this.groupCofListInput) {
if (this.groupCofListInput.hasOwnProperty(k) && !this.groupCofListInput[k][0]) {
this.groupCofListInput[k] = [{ name: '' }]
}
}
this.$apis.battle.activityreportWorktool({ cloudId: this.idBefEncryption }).then(res => {
this.selectGroupName = res.data.result || []
})
this.getDepartmentTree()
})
},
//所属企业
handleMerchatChange(val) {
this.getDepartmentTree()
this.merchantList.forEach(item => {
item.merchantId == val ? (this.config.groupMerchantName = item.merchantName) : ''
})
this.config.staffId = ''
this.config.automaticName = ''
},
async getDepartmentTree() {
let params = { addChildrensFlag: true, queryMerchantId: this.config.groupMerchantId, loginStatus: 1 }
let data = await this.$apis.saasOrder.getlistDepartmentTree(params)
this.ids = []
this.automaticData = data
await this.initData(this.automaticData)
},
initData(data) {
data.forEach((item, index) => {
this.$set(item, 'name', item.staffName ? item.staffName : item.departmentName)
let entmicroStaffResponses = this.$common.utils.deepClone(item.entmicroStaffResponses) || []
entmicroStaffResponses = entmicroStaffResponses.filter((staff, idx) => {
if (staff.staffName) {
this.$set(staff, 'name', staff.staffName)
} else {
this.$set(staff, 'name', staff.departmentName)
}
if (staff.staffId && !this.ids.includes(staff.staffId)) {
this.ids.push(staff.staffId)
return true
} else if (staff.staffId && this.ids.includes(staff.staffId)) {
return false
}
})
let child = this.$common.utils.deepClone(item.children) || []
child = child.filter((staff, idx) => {
if (staff.staffName) {
this.$set(staff, 'name', staff.staffName)
} else {
this.$set(staff, 'name', staff.departmentName)
}
if (staff.staffId && !this.ids.includes(staff.staffId)) {
this.ids.push(staff.staffId)
return true
} else if (staff.staffId && this.ids.includes(staff.staffId)) {
return false
} else if (staff.entmicroStaffResponses) {
staff.staffId = staff.id
return true
}
})
const children = [...child, ...entmicroStaffResponses]
item.children = children
//清除没有员工的部门
if (!item.staffName && item.entmicroStaffResponses === null) {
// data.splice(index, 1)
}
children.length && this.initData(children)
})
},
clearData() {
// this.$refs.battleRef.clearMutiSelect()
//所属企业默认选择第一个
this.config.groupMerchantId = this.merchantList[0]?.merchantId
this.config = {
staffId: '',
automaticName: ''
}
this.hideSelect()
},
handlebattleConfirm() {
this.$refs.battleRef.validate(valid => {
if (valid) {
let isGroupEmpty = Object.keys(this.groupCofList)
.map(item => this.groupCofList[item].length)
.every(item => item == 0)
let isGroupEmptyInput = Object.keys(this.groupCofListInput)
.map(item => this.groupCofListInput[item].length)
.every(item => item == 0)
if (isGroupEmpty && isGroupEmptyInput) {
this.$message({
message: '推送配置必须配置至少一项',
type: 'error',
customClass: 'message-Z-zinde'
})
return true
}
var params = {
merchantId: this.config.merchantId,
merchantName: this.config.merchantName,
staffId: this.config.staffId,
staffName: this.config.automaticName,
groupConfigList: [],
content: this.config.content
}
if (this.id) params.id = this.id
Object.keys(this.groupCofList).map(item => {
if (this.groupCofList[item].length) {
this.groupCofList[item].forEach(k => {
params.groupConfigList.push({
groupId: k.groupId,
groupName: k.roomName,
groupMerchantId: this.config.groupMerchantId,
groupMerchantName: this.config.groupMerchantName
})
})
} else if (this.groupCofListInput[item + 'Value'].length) {
this.groupCofListInput[item + 'Value'].forEach(k => {
params.groupConfigList.push({
groupId: this.idBefEncryption + '_R:' + k.name,
groupName: k.name,
groupMerchantId: this.config.groupMerchantId,
groupMerchantName: this.config.groupMerchantName
})
})
}
})
this.$apis.clewOrder.updateClueReportConfig(params).then(res => {
this.$message({
message: res.code == '0' ? '配置成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.data) {
this.$router.push({
path: '/bulletin/index',
query: {
activeName: '3'
}
})
}
})
}
})
},
handlebattleClose() {
this.$router.push({
path: '/bulletin/index',
query: {
activeName: '3'
}
})
this.clearData()
}
}
}
</script>
<style lang="scss" scoped>
.footer-panel {
margin-top: 20px;
}
.search-groomname {
width: 402px;
margin: 12px 16px 0;
/deep/.el-input {
width: 402px;
}
}
.addConfig-wrap {
background: #fff;
.header {
width: 100%;
height: 58px;
border-bottom: 1px solid #e5e5e5;
line-height: 58px;
padding-left: 20px;
}
.ml12 {
margin-left: 12px;
}
.config-wrap {
padding: 32px 20px;
min-height: 600px;
}
.group-item-box {
/deep/.el-form-item__content {
width: 392px;
}
}
.group-box {
width: 100%;
padding: 20px;
background: #f9f9f9;
.input-box {
display: flex;
align-items: center;
/deep/ {
.el-select,
.el-input {
width: 355px !important;
}
}
i {
cursor: pointer;
font-size: 20px;
color: #5850ff;
margin-left: 6px;
}
}
}
.group-config-text {
font-size: 12px;
color: #5850ff;
position: absolute;
left: 450px;
top: 20px;
white-space: nowrap;
cursor: pointer;
}
.placeholder {
font-size: 14px;
color: #c0c6ce;
line-height: 20px;
}
.merchantNameLabel {
width: 510px;
color: #1d1d1d;
// margin-left: 50px;
padding: 16px;
margin-top: 8px;
border: 1px solid #e6e6e6;
border-radius: 8rpx;
background: #f9f9f9;
.merchantName {
box-sizing: border-box;
width: 284px;
height: 32px;
background: #ffffff;
border: 1px solid #e6e6e6;
border-radius: 4px;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #999999;
line-height: 32px;
padding: 0 8px;
}
}
}
.is-reverse {
transform: rotate(180deg);
}
</style>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<div class="config-wrap gl-form-page"> <div class="config-wrap gl-form-page">
<el-form ref="form" :model="form" label-width="154px"> <el-form ref="form" :model="form" label-width="154px">
<el-form-item label="所属企业:"> <el-form-item label="所属企业:">
<el-select v-model="config.merchantId" placeholder="请选择" @change="handleMerchatChange"> <el-select v-model="config.merchantId" placeholder="请选择" @change="handleMerchatChange" @visible-change="hideSelect">
<el-option v-for="item in merchantList" :key="item.merchantId" :label="item.merchantName" :value="item.merchantId"></el-option> <el-option v-for="item in merchantList" :key="item.merchantId" :label="item.merchantName" :value="item.merchantId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -254,9 +254,11 @@ export default { ...@@ -254,9 +254,11 @@ export default {
getMerchantList(sign) { getMerchantList(sign) {
this.$apis.battle.getMerchantList({}).then(res => { this.$apis.battle.getMerchantList({}).then(res => {
this.merchantList = res this.merchantList = res
if (!sign) { if (!sign) {
this.config.merchantId = res[0]?.merchantId this.config.merchantId = res[0]?.merchantId
this.config.merchantName = res[0]?.merchantName this.config.merchantName = res[0]?.merchantName
this.getDepartmentTree()
} }
}) })
}, },
...@@ -341,6 +343,7 @@ export default { ...@@ -341,6 +343,7 @@ export default {
this.selectGroupName = res.data.result || [] this.selectGroupName = res.data.result || []
}) })
this.getGroupList(this.wechat.staffId) this.getGroupList(this.wechat.staffId)
this.getDepartmentTree()
} else { } else {
this.groupCofListInput = { this.groupCofListInput = {
// xiReportValue: [{ name: '' }], // xiReportValue: [{ name: '' }],
...@@ -352,7 +355,6 @@ export default { ...@@ -352,7 +355,6 @@ export default {
zhanReportValue: [{ name: '' }] zhanReportValue: [{ name: '' }]
} }
} }
this.getDepartmentTree()
}, },
getGroupList(id, isReset = false) { getGroupList(id, isReset = false) {
this.$apis.saasOrder.getGroupList({ msgStaffIdList: id }).then(res => { this.$apis.saasOrder.getGroupList({ msgStaffIdList: id }).then(res => {
...@@ -526,12 +528,22 @@ export default { ...@@ -526,12 +528,22 @@ export default {
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
}) })
if (res.data) { if (res.data) {
this.$router.go(-1) this.$router.push({
path: '/bulletin/index',
query: {
activeName: '1'
}
})
} }
}) })
}, },
handlebattleClose() { handlebattleClose() {
this.$router.go(-1) this.$router.push({
path: '/bulletin/index',
query: {
activeName: '1'
}
})
this.clearData() this.clearData()
} }
} }
...@@ -605,4 +617,7 @@ export default { ...@@ -605,4 +617,7 @@ export default {
line-height: 20px; line-height: 20px;
} }
} }
.is-reverse {
transform: rotate(180deg);
}
</style> </style>
<!-- 转化订单推送 1.1-->
<template>
<div class="activity">
<!-- 表格区域 开始 -->
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="flex-between title">
<div class="title-text">喜报列表</div>
<el-button :size="size" type="primary" class="battle-set-btn" @click="handlebattleOn()">新增</el-button>
</div>
<GLTable ref="battleRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="content" slot-scope="scope">
<div>{{ formatterContent(scope.scope) }}</div>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handlebattleOn(scope.scope.id, 'edit')">编辑</el-button>
</div>
</GLTable>
</div>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
data() {
return {
url: url,
// 搜索
searchForm: {
merchantId: '',
merchantName: '',
groupMerchantName: ''
},
tableSearchForm:{},
searchFormData: [
{
label: '4S店',
name: 'merchantName',
type: 'input',
maxlength: 128
},
{
label: '商户号',
name: 'merchantId',
type: 'input',
maxlength: 9
},
{
label: '企微名称',
name: 'groupMerchantName',
type: 'select',
width: '215px',
optionList: [],
optionId: 'merchantName',
optionLabel: 'merchantName'
}
],
getListApi: this.$apis.clewOrder.getClueReportList,
tableParams: {
listName: 'list',
tableOption: true,
// // 行数据的key
// mutiSelectUniqueKey: 'activityId',
// 多选ref的名称
// mutiSelectName: 'activity',
tableColumns: [
{
label: '4S店',
prop: 'merchantName',
formatter: cellValue => {
return cellValue.merchantName + (cellValue.merchantId || '')
}
},
{
label: '企微',
prop: 'groupMerchantName',
width: 200
},
{
label: '推送人',
prop: 'staffName',
line: 1,
width: 200
},
{
label: '内容',
prop: 'content',
addHtml: 'content'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
baseData: {
merchantList: []
}
}
},
mounted() {
this.getMerchantList()
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = JSON.parse(JSON.stringify(this.searchForm))
this.searchForm.groupMerchantName == '全部' ? (this.tableSearchForm.groupMerchantName = '') : ''
resolve()
})
},
getMerchantList() {
this.$apis.battle.getMerchantList({}).then(res => {
this.baseData.merchantList = res
this.merchantList = res
this.searchFormData[2].optionList = [{ merchantId: '全部', merchantName: '全部' }].concat(this.merchantList)
})
},
formatterContent(cellValue) {
let txt = '#1线索文字喜报'
cellValue.groupConfigList.forEach(item => {
txt += `【${item.groupName}】`
})
return txt
},
handleReset() {
this.searchForm = {
merchantId: '',
merchantName: '',
groupMerchantName: ''
}
this.tableSearchForm={
merchantId: '',
merchantName: '',
groupMerchantName: ''
}
this.handleSearch()
},
handlebattleOn(id) {
let params = {
id
}
this.$router.push({
path: '/bulletin/addClewConfig',
query: params
})
},
handleClick() {
this.handleSearch()
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.battleRef.data.length ? (this.$refs.battleRef.tableHeightValues = '') : this.$refs.battleRef.setTableHeightFun()
},
handleSearch() {
this.$refs.battleRef.refreshTable()
}
}
}
</script>
<style scoped lang="scss">
.message-Z-zinde {
z-index: 9999 !important;
}
.activity {
.container {
margin-top: 16px;
.title {
height: 32px;
line-height: 32px;
margin-bottom: 10px;
.title-text {
font-weight: 600;
font-size: 16px;
color: #333333;
margin-left: 4px;
}
}
}
}
</style>
<template>
<GLDialog :mode="mode" title="线索喜报配置" :before-close="handlebattleClose" :visible.sync="isDialogVisible" @onOk="handlebattleConfirm" @onCancel="handlebattleClose">
<div class="popup-wrap">
<div class="left-wrap">
<div class="img-wrap">
<img src="@/assets/buttetin/clew.png" />
</div>
<p class="color-3 txt-center text-14">图示效果</p>
</div>
<div class="right-wrap">
<el-form ref="form" :model="form" label-width="154px">
<div class="item-line">
<el-form-item label="编辑文本:" class="verbal-wrap">
<verbal :btnList="btnList" :maxNum="200" :mapList="mapList" ref="verbalRef"></verbal>
</el-form-item>
</div>
</el-form>
<div class="explain">
<div class="color6 weight-6 font-14">
<i class="el-icon-warning"></i>
推送机制说明
</div>
<p class="mrp">
主要推送以下2个场景:
<br />
1.当客户在C端小程序商城浏览某个商品或活动超过10秒;
<br />
2.客户发起订单支付但最终未支付。
</p>
</div>
</div>
</div>
</GLDialog>
</template>
<script>
export default {
props: {
content: {
type: String,
default: ''
},
isDialogVisible: Boolean
},
data() {
return {
mode: 'big',
btnList: [
{
type: 1,
name: '表情'
},
{
type: 2,
name: '客户姓名'
},
{
type: 2,
name: '手机号'
},
{
type: 2,
name: '线索来源'
},
{
type: 2,
name: '具体线索'
},
{
type: 2,
name: '浏览时长'
}
],
mapList: {
客户姓名: '${customerName}',
手机号: '${phone}',
线索来源: '${source}',
具体线索: '${clue}',
浏览时长: '${browseTime}'
}
}
},
created() {
this.$nextTick(() => {
this.$refs.verbalRef && this.$refs.verbalRef.update(this.content)
})
},
methods: {
handlebattleConfirm() {
this.isDialogVisible = false
let content = this.$refs.verbalRef.getTextValue()
this.$emit('handlePreview', { data: content })
},
handlebattleClose() {
this.$emit('handleClose')
}
}
}
</script>
<style lang="scss" scoped>
.popup-wrap {
display: flex;
padding: 0 72px;
.img-wrap {
width: 250px;
height: 560px;
margin-bottom: 14px;
img {
width: 100%;
height: 100%;
}
}
.right-wrap {
margin-top: 12px;
/deep/.el-form-item {
margin-bottom: 0px;
}
.item-line {
margin-bottom: 20px;
}
.switchStyle /deep/ .el-switch__label {
position: absolute;
display: none;
color: #fff;
font-size: 12px !important;
line-height: 20px;
}
.el-switch__core {
background-color: rgba(166, 166, 166, 1);
}
.switchStyle /deep/.el-switch__label--left {
z-index: 9;
left: 20px;
}
.switchStyle /deep/ .el-switch__label--right {
z-index: 9;
left: 4px;
}
.switchStyle /deep/ .el-switch__label.is-active {
display: block;
}
.switchStyle /deep/ .el-switch__core {
width: 56px !important;
}
.switchStyle /deep/ .el-switch__label {
width: 56px !important;
}
.explain {
width: 486px;
background: #f4f6fc;
padding: 16px;
margin-left: 70px;
box-sizing: border-box;
position: absolute;
bottom: 85px;
.el-icon-warning {
width: 16px;
height: 16px;
margin-right: 4px;
}
.mrp {
margin: 8px 0 0 20px;
line-height: 22px;
}
}
}
.warn {
font-size: 12px;
color: #999999;
margin-left: 154px;
}
.verbal-wrap {
/deep/ .el-form-item__content {
width: 448px;
}
/deep/ .btn-group-panel .btn-group {
flex-wrap: wrap;
justify-content: none;
.add-btn {
margin-bottom: 5px;
}
}
}
}
</style>
...@@ -3,17 +3,11 @@ ...@@ -3,17 +3,11 @@
<div class="activity"> <div class="activity">
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="flex-between title"> <div class="flex-between title">
<div class="title-text">专员列表</div> <div class="title-text">喜报列表</div>
<!-- <el-button :size="size"
type="primary"
class="battle-set-btn"
@click="battleSetHandle">批量配置专员</el-button> -->
</div> </div>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<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="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>
...@@ -23,440 +17,15 @@ ...@@ -23,440 +17,15 @@
</div> </div>
</GLTable> </GLTable>
</div> </div>
<GLDialog :mode="mode" class="battle-dialog" title="配置专员" @onOk="handlebattleConfirm" @onCancel="handlebattleClose" :visible.sync="battleVisible">
<div class="gl-form-page gl-form-min">
<el-form :model="wechat" ref="form" label-width="230px" :rules="rules">
<el-form-item label="所属企业:">
<el-select v-model="config.merchantId" placeholder="请选择" @change="handleMerchatChange">
<el-option v-for="item in merchantList" :key="item.merchantId" :label="item.merchantName" :value="item.merchantId"></el-option>
</el-select>
</el-form-item>
<!-- 推送人 -->
<el-form-item class="select-wrap" label="推送人:" prop="staffId">
<div class="common el-form-item__content">
<div class="el-input" ref="automaticRef">
<div class="el-input__inner" @click="openAutomatic">
<span v-if="wechat.automaticName == ''" class="placeholder">选择成员</span>
{{ wechat.automaticName }}
</div>
<span class="el-input__suffix" @click="openAutomatic">
<span class="el-input__suffix-inner"><i :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', isAutomatic ? 'is-reverse' : '']"></i></span>
</span>
</div>
</div>
<transition name="el-zoom-in-top" v-if="!isAutomatic">
<gl-select-menu :domEl="automaticEl" @changeStatu="hideSelect">
<el-form-item class="search-groomname">
<el-input placeholder="请输入搜索关键词" v-model="filterText"></el-input>
</el-form-item>
<div class="el-select-dropdown__wrap el-scrollbar__wrap">
<template v-if="automaticData.length > 0">
<el-tree class="filter-tree" :data="automaticData" node-key="id" :default-expanded-keys="expandedKeys" :props="defaultProps" default-expand-all :filter-node-method="filterNode" ref="tree" @node-click="handleNodeClick"></el-tree>
</template>
<div class="empty" v-else>暂无数据</div>
</div>
</gl-select-menu>
</transition>
</el-form-item>
<!-- 收款喜报 - 关联群 -->
<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="el-input" ref="groupXiRef">
<div class="el-input__inner" @click="openGroup('xiReport')">
<span class="placeholder">请选择(可多选)</span>
</div>
<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', groupHideObj.xiReport ? 'is-reverse' : '']"></i></span>
</span>
</div>
</div>
<transition name="el-zoom-in-top" v-if="!groupHideObj.xiReport">
<gl-select-menu :domEl="domXiEl" @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 roomName == '' ? groupList : stageList" class="el-select-dropdown__item" :key="kIdx" @click="e => selectGroup(e, k, 'xiReport')">
<span :class="[groupCofList.xiReport.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.xiReport" :key="kIdx">
<span class="tag-txt">{{ k.roomName }}</span>
<img class="icon-close" @click="handleGroupRemove(kIdx, 'xiReport')" src="@/assets/icon-close.png" />
</div>
</div>
</el-form-item>
<el-form-item label="手动输入群名:">
<div class="group-box">
<div class="input-box" v-for="(i, k) in groupCofListInput.xiReportValue" :key="k">
<el-input v-model="i.name" placeholder="将收款喜报推送至群聊"></el-input>
<i class="el-icon-circle-plus" v-if="k == 0" @click="addGroup(groupCofListInput.xiReportValue)"></i>
<i class="el-icon-remove" v-else @click="delGroup(groupCofListInput.xiReportValue, k)"></i>
</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 roomName == '' ? groupList : stageList" 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">{{ k.roomName }}</span>
<img class="icon-close" @click="handleGroupRemove(kIdx, 'zhanReport')" src="@/assets/icon-close.png" />
</div>
</div>
</el-form-item>
<el-form-item label="手动输入群名:">
<div class="group-box">
<div class="input-box" v-for="(i, k) in groupCofListInput.zhanReportValue" :key="k">
<el-input v-model="i.name" placeholder="将战报推送至群聊"></el-input>
<i class="el-icon-circle-plus" v-if="k == 0" @click="addGroup(groupCofListInput.zhanReportValue)"></i>
<i class="el-icon-remove" v-else @click="delGroup(groupCofListInput.zhanReportValue, k)"></i>
</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 roomName == '' ? groupList : stageList" 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">{{ k.roomName }}</span>
<img class="icon-close" @click="handleGroupRemove(kIdx, 'orderReport')" src="@/assets/icon-close.png" />
</div>
</div>
</el-form-item>
<el-form-item label="手动输入群名:">
<div class="group-box">
<div class="input-box" v-for="(i, k) in groupCofListInput.orderReportValue" :key="k">
<el-input v-model="i.name" placeholder="将补单通知推送至群聊"></el-input>
<i class="el-icon-circle-plus" v-if="k == 0" @click="addGroup(groupCofListInput.orderReportValue)"></i>
<i class="el-icon-remove" v-else @click="delGroup(groupCofListInput.orderReportValue, k)"></i>
</div>
</div>
</el-form-item>
<!-- SA喜报 - 关联群 -->
<el-form-item class="select-wrap">
<div slot="label">
将 SA喜报
<img class="icon-eye" @click="handlePoster('saReport')" src="@/assets/icon-eye.png" />
:推送至群聊:
</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 roomName == '' ? groupList : stageList" 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">{{ k.roomName }}</span>
<img class="icon-close" @click="handleGroupRemove(kIdx, 'saReport')" src="@/assets/icon-close.png" />
</div>
</div>
</el-form-item>
<el-form-item label="手动输入群名:">
<div class="group-box">
<div class="input-box" v-for="(i, k) in groupCofListInput.saReportValue" :key="k">
<el-input v-model="i.name" placeholder="将SA喜报推送至群聊"></el-input>
<i class="el-icon-circle-plus" v-if="k == 0" @click="addGroup(groupCofListInput.saReportValue)"></i>
<i class="el-icon-remove" v-else @click="delGroup(groupCofListInput.saReportValue, k)"></i>
</div>
</div>
</el-form-item>
<!-- SA个人喜报 - 关联群 -->
<el-form-item class="select-wrap">
<div slot="label">
将 SA个人喜报
<img class="icon-eye" @click="handlePoster('saPerReport')" src="@/assets/icon-eye.png" />
:推送至群聊:
</div>
<div class="common el-form-item__content">
<div class="el-input" ref="groupSaPerRef">
<div class="el-input__inner" @click="openGroup('saPerReport')">
<span class="placeholder">请选择(可多选)</span>
</div>
<span class="el-input__suffix" @click="openGroup('saPerReport')">
<span class="el-input__suffix-inner"><i :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', groupHideObj.saPerReport ? 'is-reverse' : '']"></i></span>
</span>
</div>
</div>
<transition name="el-zoom-in-top" v-if="!groupHideObj.saPerReport">
<gl-select-menu :domEl="domSaPerEl" @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 roomName == '' ? groupList : stageList" class="el-select-dropdown__item" :key="kIdx" @click="e => selectGroup(e, k, 'saPerReport')">
<span :class="[groupCofList.saPerReport.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.saPerReport" :key="kIdx">
<span class="tag-txt">{{ k.roomName }}</span>
<img class="icon-close" @click="handleGroupRemove(kIdx, 'saPerReport')" src="@/assets/icon-close.png" />
</div>
</div>
</el-form-item>
<el-form-item label="手动输入群名:">
<div class="group-box">
<div class="input-box" v-for="(i, k) in groupCofListInput.saPerReportValue" :key="k">
<el-input v-model="i.name" placeholder="将SA个人喜报推送至群聊"></el-input>
<i class="el-icon-circle-plus" v-if="k == 0" @click="addGroup(groupCofListInput.saPerReportValue)"></i>
<i class="el-icon-remove" v-else @click="delGroup(groupCofListInput.saPerReportValue, k)"></i>
</div>
</div>
</el-form-item>
<!-- 客户进度消息 - 关联群 -->
<el-form-item class="select-wrap">
<div slot="label">
将 客户进度消息
<!-- <img class="icon-eye"
@click="handlePoster('scheduleReport')"
src="@/assets/icon-eye.png" /> -->
:推送至群聊:
</div>
<div class="common el-form-item__content">
<div class="el-input" ref="groupScheduleRef">
<div class="el-input__inner" @click="openGroup('scheduleReport')">
<span class="placeholder">请选择(可多选)</span>
</div>
<span class="el-input__suffix" @click="openGroup('scheduleReport')">
<span class="el-input__suffix-inner"><i :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', groupHideObj.scheduleReport ? 'is-reverse' : '']"></i></span>
</span>
</div>
</div>
<transition name="el-zoom-in-top" v-if="!groupHideObj.scheduleReport">
<gl-select-menu :domEl="domScheduleEl" @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 roomName == '' ? groupList : stageList" class="el-select-dropdown__item" :key="kIdx" @click="e => selectGroup(e, k, 'scheduleReport')">
<span :class="[groupCofList.scheduleReport.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.scheduleReport" :key="kIdx">
<span class="tag-txt">{{ k.roomName }}</span>
<img class="icon-close" @click="handleGroupRemove(kIdx, 'scheduleReport')" src="@/assets/icon-close.png" />
</div>
</div>
</el-form-item>
<el-form-item label="手动输入群名:">
<div class="group-box">
<div class="input-box" v-for="(i, k) in groupCofListInput.scheduleReportValue" :key="k">
<el-input v-model="i.name" placeholder="将客户进度消息推送至群聊"></el-input>
<i class="el-icon-circle-plus" v-if="k == 0" @click="addGroup(groupCofListInput.scheduleReportValue)"></i>
<i class="el-icon-remove" v-else @click="delGroup(groupCofListInput.scheduleReportValue, k)"></i>
</div>
</div>
</el-form-item>
</el-form>
</div>
</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>
<script> <script>
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { dateFormat } from '@/utils/index'
import GlSelectMenu from '../battle/components/select-dropdown.vue'
export default { export default {
components: {
GlSelectMenu
},
data() { data() {
return { return {
// 推送至群聊,下拉框是否隐藏
groupHideObj: {
xiReport: true,
zhanReport: true,
orderReport: true,
saReport: true,
saPerReport: true,
scheduleReport: true
},
groupCofList: {
xiReport: [],
zhanReport: [],
orderReport: [],
saReport: [],
saPerReport: [],
scheduleReport: []
},
groupCofListInput: {
xiReportValue: [],
zhanReportValue: [],
orderReportValue: [],
saReportValue: [],
saPerReportValue: [],
scheduleReportValue: []
},
groupToType: [
{
attr: 'xiReport',
type: 1
},
{
attr: 'zhanReport',
type: 2
},
{
attr: 'orderReport',
type: 3
},
{
attr: 'saReport',
type: 4
},
{
attr: 'saPerReport',
type: 5
},
{
attr: 'scheduleReport',
type: 6
}
],
// 查看大图
isImgVisible: false,
dialogImageUrl: '',
isgroup: true,
isAutomatic: true,
merchantId: '',
merchantName: '',
size: 'small',
mode: 'mid',
battleVisible: false,
battlestaffVisible: false,
url: url, url: url,
setectList: [],
merchantList: [],
groupList: [],
// groupList: [{
// roomChatId: '1688855088375831_R:1970325371975971',
// roomName: '波波的单店'
// }, {
// roomChatId: '111',
// roomName: 'cwq'
// }, {
// roomChatId: '222',
// roomName: '啦啦啦'
// }],
// 搜索 // 搜索
searchForm: { searchForm: {
yqMerchantId: '', yqMerchantId: '',
...@@ -484,9 +53,6 @@ export default { ...@@ -484,9 +53,6 @@ export default {
maxlength: 128 maxlength: 128
} }
], ],
// 表格
// userList: [],
selectArray: [],
getListApi: this.$apis.saasOrder.getYqReportlist, getListApi: this.$apis.saasOrder.getYqReportlist,
tableParams: { tableParams: {
listName: 'list', listName: 'list',
...@@ -518,27 +84,6 @@ export default { ...@@ -518,27 +84,6 @@ export default {
] ]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
defaultProps: {
children: 'children',
label: 'name'
},
expandedKeys: [],
filterText: '',
automaticData: [],
stageList: [],
roomName: '',
config: {
merchantId: ''
},
rules: {
staffId: { required: true, message: '请选择推送人', trigger: 'change' },
groupId: { required: true, message: '请选择关联群', trigger: 'change' }
},
wechat: {
staffId: '',
automaticName: ''
// roomName: ''
},
baseData: { baseData: {
merchantList: [] merchantList: []
} }
...@@ -547,41 +92,8 @@ export default { ...@@ -547,41 +92,8 @@ export default {
mounted() { mounted() {
this.getMerchantList() this.getMerchantList()
// this.merchantList = this.$saasOrder?.merchantList || []
// this.config.merchantId = this.merchantList[0]?.merchantId
// this.config.merchantName = this.merchantList[0]?.merchantName
},
computed: {
domXiEl() {
return this.$refs.groupXiRef
},
domZhanEl() {
return this.$refs.groupZhanRef
},
domOrderEl() {
return this.$refs.groupOrderRef
},
domSaEl() {
return this.$refs.groupSaRef
},
automaticEl() {
return this.$refs.automaticRef
},
domSaPerEl() {
return this.$refs.groupSaPerRef
},
domScheduleEl() {
return this.$refs.groupScheduleRef
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val)
},
roomName(val) {
this.filterRoomName(val)
}
}, },
methods: { methods: {
formatterContent(cellValue) { formatterContent(cellValue) {
let typeToTxt = new Map([ let typeToTxt = new Map([
...@@ -601,11 +113,6 @@ export default { ...@@ -601,11 +113,6 @@ export default {
txt = [...typeToTxt.values()].filter(item => item.includes('【')) txt = [...typeToTxt.values()].filter(item => item.includes('【'))
return txt return txt
}, },
// 图片查看,
handlePoster(name) {
this.isImgVisible = true
this.dialogImageUrl = name
},
getOptionsList(formName, hasAll = true, refreshSigle) { getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) { if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle) var item = this[formName].find(k => k.name == refreshSigle)
...@@ -634,13 +141,7 @@ export default { ...@@ -634,13 +141,7 @@ export default {
getMerchantList() { getMerchantList() {
this.$apis.battle.getMerchantList({}).then(res => { this.$apis.battle.getMerchantList({}).then(res => {
this.baseData.merchantList = res this.baseData.merchantList = res
this.merchantList = res
this.getOptionsList('searchFormData') 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() {
...@@ -652,232 +153,6 @@ export default { ...@@ -652,232 +153,6 @@ export default {
} }
this.handleSearch() this.handleSearch()
}, },
clearData() {
this.setectList = []
this.$refs.battleRef.clearMutiSelect()
this.config.merchantId = this.merchantList[0]?.merchantId
this.wechat = {
staffId: '',
automaticName: ''
}
this.groupCofList = {
xiReport: [],
zhanReport: [],
orderReport: [],
saReport: [],
saPerReport: [],
scheduleReport: []
}
this.hideSelect()
},
filterNode(value, data) {
if (!value) return true
return data.name.indexOf(value) !== -1
},
filterRoomName(value) {
this.stageList = this.groupList.filter(item => {
if (item.roomName.indexOf(value) !== -1) {
return item
}
})
},
handleNodeClick(data) {
this.hideSelect()
this.wechat.automaticName = data.name
this.wechat.staffId = data.staffId
this.idBefEncryption = data.idBefEncryption
this.getGroupList(this.wechat.staffId, true)
},
hideSelect() {
// this.isgroup = true
this.groupHideObj.xiReport = true
this.groupHideObj.zhanReport = true
this.groupHideObj.orderReport = true
this.groupHideObj.saReport = true
this.isAutomatic = true
},
selectGroup(e, data, groupHideAttr) {
e.stopPropagation()
if (this.groupCofList[groupHideAttr].findIndex(i => i.roomName == data.roomName) != -1) {
return
}
// this.hideSelect()
// this.wechat.roomName = data.roomName
// this.wechat.groupId = data.roomChatId
this.groupCofList[groupHideAttr].push({
groupId: data.roomChatId,
roomName: data.roomName
})
},
openGroup(groupHideAttr) {
this.isAutomatic = true
// this.isgroup = !this.isgroup
let attrList = Object.keys(this.groupHideObj)
attrList.forEach(item => {
if (item != groupHideAttr) {
this.groupHideObj[item] = true
}
})
this.roomName = ''
this.stageList = []
this.groupHideObj[groupHideAttr] = !this.groupHideObj[groupHideAttr]
},
openAutomatic() {
// this.isgroup = true
this.groupHideObj.xiReport = true
this.groupHideObj.zhanReport = true
this.groupHideObj.orderReport = true
this.groupHideObj.saReport = true
this.groupHideObj.saPerReport = true
this.groupHideObj.scheduleReport = true
this.isAutomatic = !this.isAutomatic
},
handleGroupRemove(idx, groupHideAttr) {
this.groupCofList[groupHideAttr].splice(idx, 1)
},
//所属企业
handleMerchatChange(val) {
this.getDepartmentTree()
this.merchantList.forEach(item => {
item.merchantId == val ? (this.config.merchantName = item.merchantName) : ''
})
this.wechat = {
staffId: '',
automaticName: ''
}
this.groupCofList = {
xiReport: [],
zhanReport: [],
orderReport: [],
saReport: [],
saPerReport: [],
scheduleReport: []
}
},
battleSetHandle() {
if (this.setectList.length == 0) {
this.$message({
message: '请选择园区店',
type: 'error'
})
return
}
this.wechat = {
staffId: '',
automaticName: ''
}
this.groupCofList = {
xiReport: [],
zhanReport: [],
orderReport: [],
saReport: [],
saPerReport: [],
scheduleReport: []
}
this.getDepartmentTree()
this.battleVisible = true
},
dateFormatFun(date) {
return dateFormat(date)
},
selectionTable(val) {
this.setectList = val
},
handlestaffbattleConfirm() {
this.battlestaffVisible = false
},
handlestaffbattleClose() {
this.battlestaffVisible = false
},
handlebattleConfirm() {
if (!this.wechat.staffId) {
this.$message({
message: '请选择推送人',
type: 'error',
customClass: 'message-Z-zinde'
})
return true
}
let isGroupEmpty = Object.keys(this.groupCofList)
.map(item => this.groupCofList[item].length)
.every(item => item == 0)
let isGroupEmptyInput = Object.keys(this.groupCofListInput)
.map(item => this.groupCofListInput[item].length)
.every(item => item == 0)
if (isGroupEmpty && isGroupEmptyInput) {
this.$message({
message: '推送配置必须配置至少一项',
type: 'error',
customClass: 'message-Z-zinde'
})
return true
}
var params = {
enterpriseMerchantId: this.config.merchantId,
enterpriseMerchantName: this.config.merchantName,
staffId: this.wechat.staffId,
staffName: this.wechat.automaticName,
// groupId: this.wechat.groupId,
// groupName: this.wechat.roomName,
groupMerchantId: this.config.merchantId,
updatedBy: this.$globalState.session.accountName,
yqMerchantIdList: [],
groupConfigList: [],
merchantId: this.setectList[0]?.merchantId,
scene: 1
}
this.setectList.forEach(item => {
params.yqMerchantIdList.push(item.yqMerchantId)
})
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
})
})
} else if (this.groupCofListInput[item + 'Value'].length) {
this.groupCofListInput[item + 'Value'].forEach(k => {
params.groupConfigList.push({
groupId: this.idBefEncryption + '_R:' + k.name,
groupName: k.name,
groupMerchantId: this.config.merchantId,
actionReportType: type
})
})
}
})
console.log(params, 'params---')
this.$apis.saasOrder.updateYqConfig(params).then(res => {
this.$message({
message: res.code == '0' ? '配置成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.data) {
this.battleVisible = false
this.handleSearch()
this.clearData()
}
})
},
handlebattleClose() {
this.battleVisible = false
this.clearData()
},
handleDetails() {},
addGroup(group) {
group.push({ name: '' })
},
delGroup(group, i) {
group.splice(i, 1)
},
handlebattleOn(data, sign) { handlebattleOn(data, sign) {
let params = { let params = {
data: data, data: data,
...@@ -887,94 +162,6 @@ export default { ...@@ -887,94 +162,6 @@ export default {
path: '/bulletin/addConfig', path: '/bulletin/addConfig',
query: params query: params
}) })
// this.setectList = []
// this.setectList.push(data)
// this.wechat = {
// staffId: '',
// automaticName: ''
// }
// this.groupCofList = {
// xiReport: [],
// zhanReport: [],
// orderReport: [],
// saReport: [],
// saPerReport: [],
// scheduleReport: []
// }
// this.groupCofListInput = {
// xiReportValue: [],
// zhanReportValue: [],
// orderReportValue: [],
// saReportValue: [],
// saPerReportValue: [],
// scheduleReportValue: []
// }
// this.battleVisible = true
// // 编辑
// if (sign) {
// this.wechat.staffId = data.staffId
// this.wechat.automaticName = data.staffName
// // this.wechat.groupId = data.groupId
// // this.wechat.roomName = data.groupName
// this.config.merchantId = data.enterpriseMerchantId
// this.config.merchantName = data.enterpriseMerchantName
// data.groupConfigList.forEach(item => {
// let groupHideAttr = this.groupToType.find(k => k.type == item.actionReportType).attr
// if (item.groupId) {
// if (item.groupId.split('_R:')[1] && item.groupId.split('_R:')[1] == item.groupName) {
// this.groupCofListInput[groupHideAttr + 'Value'].push({ name: item.groupName })
// this.idBefEncryption = item.groupId.split('_R:')[0]
// } else if (item.groupName) {
// this.groupCofList[groupHideAttr].push({
// groupId: item.groupId,
// roomName: item.groupName
// })
// } else {
// this.groupCofListInput[groupHideAttr + 'Value'].push({ name: '' })
// }
// }
// })
// for (let k in this.groupCofListInput) {
// if (this.groupCofListInput.hasOwnProperty(k) && !this.groupCofListInput[k][0]) {
// this.groupCofListInput[k] = [{ name: '' }]
// }
// }
// console.log(this.groupCofListInput)
// this.getGroupList(this.wechat.staffId)
// } else {
// this.groupCofListInput = {
// xiReportValue: [{ name: '' }],
// zhanReportValue: [{ name: '' }],
// orderReportValue: [{ name: '' }],
// saReportValue: [{ name: '' }],
// saPerReportValue: [{ name: '' }],
// scheduleReportValue: [{ name: '' }]
// }
// }
// this.getDepartmentTree()
},
getGroupList(id, isReset = false) {
this.$apis.saasOrder.getGroupList({ msgStaffIdList: id }).then(res => {
if (res.code == 0) {
this.groupList = res.data
if (isReset) {
this.groupCofList = {
xiReport: [],
zhanReport: [],
orderReport: [],
saReport: [],
saPerReport: [],
scheduleReport: []
}
}
}
})
},
handleSetting() {
this.drawer = true
},
handleClick() {
this.handleSearch()
}, },
setTableFinishFun() { setTableFinishFun() {
...@@ -984,67 +171,12 @@ export default { ...@@ -984,67 +171,12 @@ export default {
handleSearch() { handleSearch() {
this.$refs.battleRef.refreshTable() this.$refs.battleRef.refreshTable()
},
async getDepartmentTree() {
let params = { addChildrensFlag: true, queryMerchantId: this.config.merchantId, loginStatus: 1 }
// let params = { addChildrensFlag: true, queryMerchantId: 44209846, loginStatus: 1 }
let data = await this.$apis.saasOrder.getlistDepartmentTree(params)
this.ids = []
this.automaticData = data
await this.initData(this.automaticData)
this.expandedKeys = [this.automaticData[0].id]
},
initData(data) {
data.forEach((item, index) => {
this.$set(item, 'name', item.staffName ? item.staffName : item.departmentName)
let entmicroStaffResponses = this.$common.utils.deepClone(item.entmicroStaffResponses) || []
entmicroStaffResponses = entmicroStaffResponses.filter((staff, idx) => {
if (staff.staffName) {
this.$set(staff, 'name', staff.staffName)
} else {
this.$set(staff, 'name', staff.departmentName)
}
if (staff.staffId && !this.ids.includes(staff.staffId)) {
this.ids.push(staff.staffId)
return true
} else if (staff.staffId && this.ids.includes(staff.staffId)) {
return false
}
})
let child = this.$common.utils.deepClone(item.children) || []
child = child.filter((staff, idx) => {
if (staff.staffName) {
this.$set(staff, 'name', staff.staffName)
} else {
this.$set(staff, 'name', staff.departmentName)
}
if (staff.staffId && !this.ids.includes(staff.staffId)) {
this.ids.push(staff.staffId)
return true
} else if (staff.staffId && this.ids.includes(staff.staffId)) {
return false
} else if (staff.entmicroStaffResponses) {
staff.staffId = staff.id
return true
}
})
const children = [...child, ...entmicroStaffResponses]
item.children = children
//清除没有员工的部门
if (!item.staffName && item.entmicroStaffResponses === null) {
// data.splice(index, 1)
}
children.length && this.initData(children)
})
} }
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.message-Z-zinde {
z-index: 9999 !important;
}
.activity { .activity {
.container { .container {
margin-top: 16px; margin-top: 16px;
...@@ -1164,34 +296,4 @@ export default { ...@@ -1164,34 +296,4 @@ export default {
} }
} }
} }
.search-groomname {
width: 400px;
margin: 12px 16px 0;
/deep/.el-input {
width: 252px;
}
}
.filter-tree {
padding: 0 16px;
}
.grey-txt {
color: #c8c8c8;
cursor: not-allowed;
}
.empty {
padding: 10px 0;
margin: 0;
text-align: center;
color: #999;
font-size: 13px;
}
.placeholder {
font-size: 14px;
color: #c0c6ce;
line-height: 20px;
}
.dialog-look {
text-align: center;
}
</style> </style>
<template>
<div class="select-store">
<!-- width="600px" -->
<GLDialog bigTitle="选择门店"
mode="big"
:visible.sync="dialogVisible"
:before-close="handleClose"
:close-on-click-modal="false"
@onOk="handleConfirm"
@onCancel="handleClose">
<glsx-combi-form ref="showSearch"
labelWidth="105px"
:formObj="searchForm"
:formData="searchFormData">
<span slot="footer">
<el-button :size="size"
type="primary"
@click="resetTable">查询</el-button>
</span>
</glsx-combi-form>
<!-- : :hasPage="false"
:getListApi="getListApi"
:tableData="storeList" -->
<GLTable ref="storeRef"
:noDataImg="url"
:tableTotal="total"
:searchForm="searchForm"
:tableParams="tableParams"
:pageConf="pageConf"
@refreshTable="getList"
:tableData="storeList"
:hasNum="false"
:setTableFinishFun="setTableFinishFun">
<div slot="radioHtml"
class="store-table"
slot-scope="scope">
<el-radio v-model="merchantId"
:label="scope.scope.merchantNo"
@click.native="handleClick(scope.scope)"></el-radio>
</div>
</GLTable>
<!-- <span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleClose">取 消</el-button>
<el-button size="small" type="primary" @click="handleConfirm">确 定</el-button>
</span> -->
</GLDialog>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'selectStore',
data() {
return {
url: url,
searchForm: {
merchantId: '',
merchantName: ''
},
// getListApi: this.$apis.common.getMerchantList,
total: 0,
storeList: [],
heightBox: 200,
merchantId: '',
merchantName: '',
// 搜索
searchFormData: [
{
label: '商户名称',
name: 'merchantName',
type: 'input',
placeholder: '请输入商户名称',
width: '300px',
labelWidth: '10px'
},
{
label: '商户ID',
name: 'merchantId',
type: 'input',
inputType: 'number',
placeholder: '请输入商户ID',
width: '300px',
labelWidth: '10px'
}
],
pageConfig: {
pageSize: 10,
currentPage: 1
},
tableParams: {
listName: 'list',
// tableOption: true,
// 行数据的key
// mutiSelectUniqueKey: 'staffId',
// checkSelectKey: 'staffId',
// checkSelectVal: [],
// 多选ref的名称
// mutiSelectName: 'list',
tableColumns: [
{
label: '',
prop: '',
width: 80,
addHtml: 'radioHtml'
},
{
label: '序号',
prop: 'idx',
width: 80
},
{
label: '商户名称',
prop: 'merchantName',
formatter: cellValue => {
return cellValue.merchantName || '-'
}
},
{
label: '商户id',
prop: 'merchantNo',
formatter: cellValue => {
return cellValue.merchantNo || '-'
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
baseData: {}
}
},
props: {
dialogVisible: {
type: Boolean,
default: false
},
storeSearchForm: {
type: Object
},
merchantInfo: {
required: true
}
// merchantId: {
// type: String,
//
// }
// orderCode: {
// type: String,
// required: true
// }
},
mounted() {
// this.userInfo = this.$globalState.session
let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 425
this.merchantId = this.merchantInfo
this.getList()
},
methods: {
getList(pageCon) {
pageCon && (this.pageConfig = pageCon)
var params = {
merchantId: this.merchantId,
...this.searchForm,
...this.pageConfig
// merchantId: '44209390',
}
this.$apis.common.getMerchantList(params).then(res => {
this.storeList = res.list
this.total = res.total
// // this.storeList = res.staffUnitList
// // var page = this.$refs.staffRef.page
// // // 添加序号
// pageConfig
let nowIndex = this.pageConfig.pageSize * (this.pageConfig.currentPage - 1)
this.storeList.forEach((item, index) => {
item.idx = index + 1 + nowIndex
})
// this.$refs.staffRef.tableHeightValues = '460px'
// })
})
},
resetTable() {
this.$refs.storeRef.page.currentPage = 1
this.getList()
},
setTableFinishFun() {
// console.log(this.$refs.staffRef.data)
// this.storeList = this.$refs.staffRef.data
//接收到的数据为空
this.$refs.staffRef.tableHeightValues = '460px'
},
handleClick(val) {
// let { merchantId, merchantName } =val
this.merchantId = val.merchantNo
this.merchantName = val.merchantName
// let temp = JSON.parse(JSON.stringify(val))
// delete temp.idx
// this.staffUuid = val.uuid
// this.store = val
},
handleClose() {
this.$emit('handleRelateStoreClose')
},
handleConfirm() {
// if (!this.staffUuid)
// return this.$message({
// message: '请先选择员工',
// type: 'error'
// })
// let parmas = {
// subOrderCode: this.orderCode,
// staffUuid: this.staffUuid
// }
// this.$apis.orderManage.signerOrder(parmas).then(res => {
// console.log(res)
// })
// this.staffUuid
this.$emit('handleRelateStoreConfirm', {
merchantId: this.merchantId,
merchantName: this.merchantName
})
}
}
}
</script>
<style lang="scss">
.select-store {
.storeDailog {
width: 500px;
}
.title {
margin-bottom: 12px;
}
.customer-tag-box {
display: flex;
margin: 20px 16px;
.tag-label {
display: inline-block;
height: 30px;
line-height: 30px;
}
.input-tag-wrapper {
max-height: 75px;
overflow: auto;
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #666;
display: inline-block;
outline: none;
padding: 5px;
flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 648px;
display: flex;
align-items: center;
cursor: pointer;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
}
}
// .customer-list {
// width: calc(100% - 280px);
// margin-right: 10px;
// }
.p-16 {
padding: 16px;
}
.store-table .el-radio__label {
display: none;
}
}
</style>
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
<div class="activity"> <div class="activity">
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="flex-between title"> <div class="flex-between title">
<div class="title-text">专员列表</div> <div class="title-text">专员列表</div>
<!-- <el-button :size="size" <!-- <el-button :size="size"
...@@ -10,7 +12,6 @@ ...@@ -10,7 +12,6 @@
class="battle-set-btn" class="battle-set-btn"
@click="battleSetHandle">批量配置专员</el-button> --> @click="battleSetHandle">批量配置专员</el-button> -->
</div> </div>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<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 class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
......
...@@ -8,11 +8,14 @@ ...@@ -8,11 +8,14 @@
import battle from './components/battle/index.vue' import battle from './components/battle/index.vue'
import saasOrder from './components/saasOrder/index.vue' import saasOrder from './components/saasOrder/index.vue'
import vehicleDamageOrder from './components/vehicleDamageOrder/index.vue' import vehicleDamageOrder from './components/vehicleDamageOrder/index.vue'
import clewOrder from './components/clewOrder/index.vue'
export default { export default {
components: { components: {
battle, battle,
saasOrder, saasOrder,
vehicleDamageOrder vehicleDamageOrder,
clewOrder
}, },
data() { data() {
return { return {
...@@ -28,18 +31,27 @@ export default { ...@@ -28,18 +31,27 @@ export default {
name: '2' name: '2'
}, },
{ {
label: '2.1', label: '1.4',
name: '3' name: '3'
},
{
label: '2.1',
name: '4'
} }
] ]
} }
}, },
created() {
this.activeName = this.$route.query.activeName ? this.$route.query.activeName : '1'
this.handleClick()
},
methods: { methods: {
handleClick() { handleClick() {
let componetObj = { let componetObj = {
1: 'saasOrder', 1: 'saasOrder',
2: 'battle', 2: 'battle',
3: 'vehicleDamageOrder' 3: 'clewOrder',
4: 'vehicleDamageOrder'
} }
this.currentComponent = componetObj[this.activeName] this.currentComponent = componetObj[this.activeName]
} }
......
...@@ -308,7 +308,9 @@ export default { ...@@ -308,7 +308,9 @@ export default {
}, },
handleSearch () { handleSearch () {
const { query } = this.$route
this.$refs.browserRef.refreshTable() this.$refs.browserRef.refreshTable()
if (query.type == 1) this.getTotal(this.$apis.seckillActivity.getBrowseListApi, query.id)
}, },
handleReset () { handleReset () {
...@@ -320,10 +322,12 @@ export default { ...@@ -320,10 +322,12 @@ export default {
this.handleSearch() this.handleSearch()
}, },
async getTotal (apiName, activityId) { async getTotal (apiName, activityId) {
const { total } = await apiName({ const { customerName, mobile } = this.searchForm, { total } = await apiName({
pageSize: 10, pageSize: 10,
pageNum: 1, pageNum: 1,
activityId activityId,
customerName,
mobile
}) })
this.total = total this.total = total
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!