Commit 3ff1f6c0 by wangql
2 parents 39e12b84 1eb01c14
import { http } from '@/main' import { http, http_common } from '@/main'
const defaultPath = 'scrm.api.carlife.' const defaultPath = 'scrm.api.carlife.'
const getMerchantGoodsListApi = params => { const getMerchantGoodsListApi = params => {
...@@ -75,4 +74,14 @@ const getClassifyListApi = params => { ...@@ -75,4 +74,14 @@ const getClassifyListApi = params => {
}) })
} }
export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadVideoApi, getMerchantList, getZoneListApi, getClassifyListApi } const pictureUpload = params => {
params.method = "glsx.accounts.biz.common.pictureUpload"
return http_common({
url: '/router?method=glsx.accounts.biz.common.pictureUpload',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadVideoApi, getMerchantList, getZoneListApi, getClassifyListApi, pictureUpload }
import { http } from '@/main' import { http } from '@/main'
const path = 'org.ore.api.mass.' const path = 'entmicro.api.mass.'
const URL = 'rop-scrm-entmicro/router' const URL = 'rop-scrm-entmicro/router'
const customerList = params => { const customerList = params => {
params.type = 1 params.type = 1
...@@ -43,9 +43,10 @@ const detail = params => { ...@@ -43,9 +43,10 @@ const detail = params => {
sign: true sign: true
}) })
} }
const remindUserGroup = params => {
params.type = 2
params.method = `${path}remindUserGroup` const listDepartmentTree = params => {
params.method = 'entmicro.api.department.listDepartmentTree'
return http({ return http({
url: URL, url: URL,
method: 'GET', method: 'GET',
...@@ -53,9 +54,19 @@ const remindUserGroup = params => { ...@@ -53,9 +54,19 @@ const remindUserGroup = params => {
sign: true sign: true
}) })
} }
const listRemindOperate = params => {
params.type = 2 const querylabeltree = params => {
params.method = `${path}listRemindOperate` params.method = 'scrm.api.datahub.label.querylabeltree'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
const groupList = params => {
params.method = 'entmicro.api.customer.group.list.by.merchant'
return http({ return http({
url: URL, url: URL,
method: 'GET', method: 'GET',
...@@ -63,9 +74,8 @@ const listRemindOperate = params => { ...@@ -63,9 +74,8 @@ const listRemindOperate = params => {
sign: true sign: true
}) })
} }
const customerCount = params => {
const listDepartmentTree = params => { params.method = 'entmicro.api.mass.detail.customer.filter.count'
params.method = 'cn.com.glsx.entmicro.department.listDepartmentTree'
return http({ return http({
url: URL, url: URL,
method: 'GET', method: 'GET',
...@@ -73,12 +83,82 @@ const listDepartmentTree = params => { ...@@ -73,12 +83,82 @@ const listDepartmentTree = params => {
sign: true sign: true
}) })
} }
// 客户群发、客户群群发基本信息详情
const querylabeltree = params => { const customerDetail = params => {
params.method = 'datahub.api.label.querylabeltree' params.method = `${path}detail`
return http({ return http({
url: '/rop-scrm-datahub/router', url: URL,
method: 'POST', method: 'GET',
data: params,
sign: true
})
}
// 客户群发统计
const detailStatistic = params => {
params.method = `${path}detail.statistic`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 客户群群发统计
const groupDetailStatistic = params => {
params.method = `${path}group.detail.statistic`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 客户群发员工列表
const staffList = params => {
params.method = `${path}staff.list`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 客户群发客户列表
const customerDetailList = params => {
params.method = `${path}customer.list`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 客户群群发列表
const groupDetailList = params => {
params.method = `${path}group.detail.sender.list`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 根据id提醒用户
const listRemindOperate = params => {
params.method = `${path}listRemindOperate`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 详情页客户群提醒
const remindUserGroup = params => {
params.method = `${path}remindUserGroup`
return http({
url: URL,
method: 'GET',
data: params, data: params,
sign: true sign: true
}) })
...@@ -91,5 +171,13 @@ export default { ...@@ -91,5 +171,13 @@ export default {
remindUserGroup, remindUserGroup,
listRemindOperate, listRemindOperate,
listDepartmentTree, listDepartmentTree,
querylabeltree querylabeltree,
groupList,
customerCount,
customerDetail,
detailStatistic,
groupDetailStatistic,
staffList,
customerDetailList,
groupDetailList
} }
...@@ -2,8 +2,8 @@ import { http } from '@/main' ...@@ -2,8 +2,8 @@ import { http } from '@/main'
// const defaultPath = 'scrm.api.live.' // const defaultPath = 'scrm.api.live.'
//计算提示面板出现的次数,第一次显示,之后不显示 //计算提示面板出现的次数,第一次显示,之后不显示
const getLoginCount =params=>{ const getLoginCount = params => {
params.method='org.ore.api.common.findLoginCount' params.method = 'entmicro.api.common.findLoginCount'
return http({ return http({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
...@@ -30,7 +30,7 @@ const effectiveService = params => { ...@@ -30,7 +30,7 @@ const effectiveService = params => {
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll:true returnAll: true
}) })
} }
//删除 //删除
...@@ -41,7 +41,7 @@ const deleteService = params => { ...@@ -41,7 +41,7 @@ const deleteService = params => {
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll:true returnAll: true
}) })
} }
//删除 //删除
...@@ -52,7 +52,7 @@ const createService = params => { ...@@ -52,7 +52,7 @@ const createService = params => {
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll:true returnAll: true
}) })
} }
...@@ -76,9 +76,9 @@ const updateService = params => { ...@@ -76,9 +76,9 @@ const updateService = params => {
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll:true returnAll: true
}) })
} }
export { getServiceListApi,effectiveService, deleteService,createService,detailService,updateService,getLoginCount}
\ No newline at end of file \ No newline at end of file
export { getServiceListApi, effectiveService, deleteService, createService, detailService, updateService, getLoginCount }
\ No newline at end of file \ No newline at end of file
...@@ -124,7 +124,7 @@ const orderStatusList=[ ...@@ -124,7 +124,7 @@ const orderStatusList=[
confName: '退款失败' confName: '退款失败'
}, },
{ {
confId: 2, confId: 6,
confName: '已经退款' confName: '已经退款'
}, },
] ]
......
<!-- 弹窗 --> <!-- 弹窗 -->
<template> <template>
<div> <div>
<el-dialog :title="title" :visible.sync="isVisible" :show-close="showClose" :before-close="handleClose" :close-on-click-modal="false" :width="width"> <el-dialog :title="title" :visible.sync="isVisible" :show-close="showClose" :before-close="handleClose" :close-on-click-modal="false" :modal-append-to-body="false" :width="width">
<el-scrollbar> <el-scrollbar v-if="hasScroll">
<span slot="title"> <span slot="title">
{{ title }} <span class="main-title">{{ title }}</span>
<span class="dialog-sub-title"> <span class="dialog-sub-title">
<slot name="sub-title"></slot> <slot name="sub-title"></slot>
</span> </span>
</span> </span>
<slot></slot> <slot></slot>
</el-scrollbar> </el-scrollbar>
<template v-if="!hasScroll">
<span slot="title">
<span class="main-title">{{ title }}</span>
<span class="dialog-sub-title">
<slot name="sub-title"></slot>
</span>
</span>
<slot></slot>
</template>
<div slot="footer"> <div slot="footer">
<slot name="btn-start"></slot> <slot name="btn-start"></slot>
<el-button type="primary" v-if="!noClose" :size="btnSize" @click="handleClose">关闭</el-button> <el-button :type="typeName" v-if="!noClose" :size="btnSize" @click="handleClose">{{btnCloseLabel}}</el-button>
<el-button type="primary" v-if="!noBtnOk" :size="btnSize" @click="handleConfirm">{{ btnOkLabel }}</el-button> <el-button type="primary" v-if="!noBtnOk" :size="btnSize" @click="handleConfirm">{{ btnOkLabel }}</el-button>
<el-button v-if="!noCancel" type="primary" :size="btnSize" @click="handleClose">{{ btnCancelLabel }}</el-button> <el-button type="primary" v-if="!noCancel" :size="btnSize" @click="handleClose">{{ btnCancelLabel }}</el-button>
<slot name="btn-middle"></slot> <slot name="btn-middle"></slot>
</div> </div>
</el-dialog> </el-dialog>
...@@ -29,6 +39,10 @@ export default { ...@@ -29,6 +39,10 @@ export default {
return {} return {}
}, },
props: { props: {
hasScroll:{
type: Boolean,
default: true
},
title: { title: {
type: String, type: String,
default: '' default: ''
...@@ -41,6 +55,10 @@ export default { ...@@ -41,6 +55,10 @@ export default {
type: Boolean, type: Boolean,
default: true default: true
}, },
btnCloseLabel:{
type: String,
default: '关闭'
},
btnOkLabel: { btnOkLabel: {
type: String, type: String,
default: '确定' default: '确定'
...@@ -61,6 +79,10 @@ export default { ...@@ -61,6 +79,10 @@ export default {
type: Boolean, type: Boolean,
default: true default: true
}, },
typeName:{
type:String,
default:''
},
width: { width: {
type: String, type: String,
default: '580px' default: '580px'
......
...@@ -18,7 +18,8 @@ module.exports = { ...@@ -18,7 +18,8 @@ module.exports = {
code_message_map: {} code_message_map: {}
}, },
request: { request: {
baseURL: 'http://scrm.test.glsx.com.cn/', // baseURL: 'http://scrm.test.glsx.com.cn/',
baseURL: 'http://192.168.2.42:8064/',
// 设置超时时间 // 设置超时时间
timeout: 180000, timeout: 180000,
// 携带凭证 // 携带凭证
......
...@@ -9,8 +9,9 @@ ...@@ -9,8 +9,9 @@
// 根据环境引入不同配置 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'
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function(isEnv = true) { export const fetchConfig = function (isEnv = true) {
if (isEnv) { if (isEnv) {
let { request } = cfg let { request } = cfg
Object.assign(request, { timeout }) Object.assign(request, { timeout })
...@@ -18,6 +19,7 @@ export const fetchConfig = function(isEnv = true) { ...@@ -18,6 +19,7 @@ export const fetchConfig = function(isEnv = true) {
} }
//return window.fetch('https://', {}).then(res => res.json()) //return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' }) // request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
...@@ -20,3 +20,4 @@ Vue.prototype.size = 'small' ...@@ -20,3 +20,4 @@ Vue.prototype.size = 'small'
start() start()
export { bootstrap, mount, unmount } from '@/setup' export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params) export const http = params => Vue.prototype.$http(params)
export const http_common = params => Vue.prototype.$http_common(params)
...@@ -126,13 +126,13 @@ const staticRoutes = Object.freeze([ ...@@ -126,13 +126,13 @@ const staticRoutes = Object.freeze([
}, },
{ {
name: 'detailCustomer', name: 'detailCustomer',
path: '/customerTransform/detailCustomer', path: '/customerTransform/detailCustomer/:id',
component: resolve => require([`@/views/customerTransform/detailCustomer.vue`], resolve), component: resolve => require([`@/views/customerTransform/detailCustomer.vue`], resolve),
meta: {} meta: {}
}, },
{ {
name: 'detaiCustomeGroup', name: 'detaiCustomeGroup',
path: '/customerTransform/detaiCustomeGroup', path: '/customerTransform/detaiCustomeGroup/:id',
component: resolve => require([`@/views/customerTransform/detaiCustomeGroup.vue`], resolve), component: resolve => require([`@/views/customerTransform/detaiCustomeGroup.vue`], resolve),
meta: {} meta: {}
}, },
......
...@@ -3,14 +3,16 @@ import { message, messageBox } from '@/plugins/element.js' ...@@ -3,14 +3,16 @@ import { message, messageBox } from '@/plugins/element.js'
import { fetchConfig } from '@/config' import { fetchConfig } from '@/config'
import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建) import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import ElementUI from 'element-ui'
import render from './render' import render from './render'
import 'glsx-components/dist/glsx-components.css' import 'glsx-components/dist/glsx-components.css'
let routes = [] let routes = []
let router = null let router = null
let instance = null let instance = null
Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState }) { export async function bootstrap({ history, common, messenger, globalState }) {
const { response, request, sign, secret } = await fetchConfig() const { response, request, sign, secret, sign_common, request_common } = await fetchConfig()
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
...@@ -18,6 +20,7 @@ export async function bootstrap({ history, common, messenger, globalState }) { ...@@ -18,6 +20,7 @@ export async function bootstrap({ history, common, messenger, globalState }) {
Vue.prototype.$message = message Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox Vue.prototype.$messageBox = messageBox
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState // Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const routesData = common.utils.deepClone(globalState.routers) const routesData = common.utils.deepClone(globalState.routers)
......
...@@ -24,7 +24,7 @@ export async function start() { ...@@ -24,7 +24,7 @@ export async function start() {
// .forEach(item => { // .forEach(item => {
// urlParams[item.split('=')[0]] = item.split('=')[1] // urlParams[item.split('=')[0]] = item.split('=')[1]
// }) // })
var token = Object.keys(urlParams).includes('sessionId') ? urlParams.sessionId : 'mini-3ab7a37c-3bfa-4a83-bbf8-9e59c6e10330-rop' var token = Object.keys(urlParams).includes('sessionId') ? urlParams.sessionId : 'mini-f4e9b4ba-b16f-491f-bf84-40f2b896dc93-rop'
Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: token } }) Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: token } })
Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
render('/', routes) render('/', routes)
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
<div class="info-box"> <div class="info-box">
<div class="info-content"> <div class="info-content">
<el-form :model="basicForm" :rules="basicRules" ref="basicForm" label-width="120px"> <el-form :model="basicForm" :rules="basicRules" ref="basicForm" label-width="120px">
<el-form-item label="群聊名称" prop="groupName"> <el-form-item label="群聊名称" prop="massName">
<el-input v-model="basicForm.groupName" placeholder="群发名称仅内部可见" maxlength="10"></el-input> <el-input v-model="basicForm.massName" placeholder="群发名称仅内部可见" maxlength="10"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="userList"> <el-form-item prop="userList">
<label slot="label" class="required">选择群主</label> <label slot="label" class="required">选择群主</label>
...@@ -16,12 +16,17 @@ ...@@ -16,12 +16,17 @@
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
全部账号 全部账号
</el-button> </el-button>
<span>已选择{{ basicForm.userList ? basicForm.userList.length : 0 }}人</span> <!-- <span>已选择{{ basicForm.userList ? basicForm.userList.length : 0 }}人</!-->
<div class="sale-select" v-show="basicForm.userList"> <div class="sale-select" v-show="basicForm.userList">
<div :key="key" class="el-input-tag input-tag-wrapper"> <div :key="key" class="el-input-tag input-tag-wrapper">
<el-tag v-for="(tag, idx) in basicForm.userList" :key="idx" closable :disable-transitions="false" @close="remove(tag)"> <el-tag
{{ tag.staffName }} v-for="(tag, idx) in basicForm.userList"
</el-tag> :key="idx"
closable
:disable-transitions="false"
@close="remove(tag)"
>{{ tag.staffName }}</el-tag>
<el-input size="small" style="outline: none; border: none"></el-input>
</div> </div>
</div> </div>
<div class="form-tips">群主收到通知后,可选择他管理的客户群并群发该内容。</div> <div class="form-tips">群主收到通知后,可选择他管理的客户群并群发该内容。</div>
...@@ -32,7 +37,7 @@ ...@@ -32,7 +37,7 @@
<div> <div>
<el-form :model="basicForm" :rules="basicRules" ref="groupForm" label-width="120px"> <el-form :model="basicForm" :rules="basicRules" ref="groupForm" label-width="120px">
<el-form-item prop="attachmentList"> <el-form-item prop="attachmentList">
<label slot="label" class="required">入群欢迎语</label> <label slot="label" class="required">群发内容</label>
<WelcomeWords ref="welcome" :eventBus="eventBus"></WelcomeWords> <WelcomeWords ref="welcome" :eventBus="eventBus"></WelcomeWords>
</el-form-item> </el-form-item>
<el-form-item label="发送时间" prop="sendType"> <el-form-item label="发送时间" prop="sendType">
...@@ -41,9 +46,19 @@ ...@@ -41,9 +46,19 @@
<el-radio :label="2">定时发送</el-radio> <el-radio :label="2">定时发送</el-radio>
</el-radio-group> </el-radio-group>
<div v-show="basicForm.sendType == 2" class="date-picker"> <div v-show="basicForm.sendType == 2" class="date-picker">
<el-date-picker v-model="sendTime" size="small" type="date" placeholder="选择日期"></el-date-picker> <el-date-picker
- v-model="basicForm.sendTime"
<el-time-picker v-model="sendDate" size="small" placeholder="选择时间"></el-time-picker> size="small"
type="date"
value-format="yyyy-MM-DD"
placeholder="选择日期"
></el-date-picker>-
<el-time-picker
v-model="basicForm.sendDate"
size="small"
value-format="HH:mm:ss"
placeholder="选择时间"
></el-time-picker>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -65,7 +80,13 @@ ...@@ -65,7 +80,13 @@
<el-button type="primary" @click="handleSubmit">确定</el-button> <el-button type="primary" @click="handleSubmit">确定</el-button>
<el-button type="primary" @click="handleCancel">取消</el-button> <el-button type="primary" @click="handleCancel">取消</el-button>
</div> </div>
<glsx-dialog :title="'选择成员'" :width="'712px'" :isVisible="membersVisible" @confirmDialog="handleConfirm" @closeDialog="membersVisible = !membersVisible"> <glsx-dialog
:title="'选择成员'"
:width="'712px'"
:isVisible="membersVisible"
@confirmDialog="handleConfirm"
@closeDialog="membersVisible = !membersVisible"
>
<SelectMembers ref="membersForm"></SelectMembers> <SelectMembers ref="membersForm"></SelectMembers>
</glsx-dialog> </glsx-dialog>
</div> </div>
...@@ -105,7 +126,25 @@ export default { ...@@ -105,7 +126,25 @@ export default {
callback() callback()
} }
} else { } else {
callback(new Error('请输入入群欢迎语')) callback(new Error('请输入群发内容'))
}
}
const validatorSendType = (rule, value, callback) => {
console.log(value)
if (value) {
if (value == 2) {
if (!this.basicForm.sendTime) {
callback(new Error('请选择日期'))
}
if (!this.basicForm.sendDate) {
callback(new Error('请选择时间'))
}
if (this.basicForm.sendTime && this.basicForm.sendDate) {
callback()
}
} else {
callback()
}
} }
} }
return { return {
...@@ -116,23 +155,26 @@ export default { ...@@ -116,23 +155,26 @@ export default {
// { required: true, message: '请选择群发账号', trigger: 'blur' }, // { required: true, message: '请选择群发账号', trigger: 'blur' },
{ validator: validatorUser, trigger: 'change' } { validator: validatorUser, trigger: 'change' }
], ],
groupName: [{ required: true, message: '请输入群聊名称', trigger: 'blur' }], massName: [{ required: true, message: '请输入群聊名称', trigger: 'blur' }],
attachmentList: [ attachmentList: [
// { required: true, message: '请输入入群欢迎语' }, // { required: true, message: '请输入入群欢迎语' },
{ validator: validatorAttachment, trigger: 'change' } { validator: validatorAttachment, trigger: 'change' }
], ],
sendType: [{ required: true, message: '请选择发送时间', trigger: 'change' }] sendType: [
{ required: true, message: '请选择发送时间', trigger: 'change' },
{ validator: validatorSendType, trigger: 'change' }
]
}, },
membersVisible: false, membersVisible: false,
key: new Date() key: new Date()
} }
}, },
// mounted() { mounted() {
// // let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
// this.footerLeft = document.querySelector('.base-container-right').offsetLeft this.footerLeft = document.querySelector('.base-container-right').offsetLeft
// this.footerWidth = document.documentElement.clientWidth - this.footerLeft this.footerWidth = document.documentElement.clientWidth - this.footerLeft
// // this.boxHeight = clientHeight - 200 this.boxHeight = clientHeight - 200
// }, },
methods: { methods: {
openMembers() { openMembers() {
this.membersVisible = !this.membersVisible this.membersVisible = !this.membersVisible
...@@ -142,9 +184,20 @@ export default { ...@@ -142,9 +184,20 @@ export default {
}, },
// 成员弹窗 // 成员弹窗
handleConfirm() { handleConfirm() {
console.log(this.$refs.membersForm.innerTags) if (this.$refs.membersForm.innerTags.length == 0) {
this.$message({
type: 'error',
message: '请选择群主'
})
// } else if (this.$refs.membersForm.innerTags.length > 1) {
// this.$message({
// type: 'error',
// message: '只可选择一个群主'
// })
} else {
this.basicForm.userList = this.$refs.membersForm.innerTags this.basicForm.userList = this.$refs.membersForm.innerTags
this.openMembers() this.openMembers()
}
}, },
remove(val) { remove(val) {
console.log(val, '00000') console.log(val, '00000')
...@@ -159,8 +212,8 @@ export default { ...@@ -159,8 +212,8 @@ export default {
const params = { const params = {
type: 2, type: 2,
attachmentList: this.basicForm.attachmentList, attachmentList: this.basicForm.attachmentList,
selectType: this.basicForm.selectType, sendType: this.basicForm.sendType,
sendType: this.basicForm.sendType massName: this.basicForm.massName
} }
params.userList = this.basicForm.userList.map(item => { params.userList = this.basicForm.userList.map(item => {
return { return {
...@@ -168,6 +221,9 @@ export default { ...@@ -168,6 +221,9 @@ export default {
staffName: item.staffName staffName: item.staffName
} }
}) })
if (params.sendType == 2) {
params.sendTime = this.basicForm.sendTime + ' ' + this.basicForm.sendDate
}
console.log(params) console.log(params)
this.$apis.customerTransform this.$apis.customerTransform
.insert(params) .insert(params)
...@@ -197,6 +253,7 @@ export default { ...@@ -197,6 +253,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.container { .container {
margin-top: 26px;
margin-bottom: 84px; margin-bottom: 84px;
background: #ffffff; background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
...@@ -253,4 +310,60 @@ export default { ...@@ -253,4 +310,60 @@ export default {
color: #f56c6c; color: #f56c6c;
margin-right: 4 px; margin-right: 4 px;
} }
.label-text {
margin-left: 10px;
font-size: 14px;
span {
color: #5850ff;
}
}
.sale-select {
display: flex;
align-items: center;
}
.input-tag-wrapper {
max-width: 300px;
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #606266;
display: inline-block;
outline: none;
padding: 0 10px 0 5px;
flex-wrap: wrap;
line-height: 32px;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 100%;
display: flex;
align-items: center;
/deep/ input {
/* input { */
/* background-color: red!important; 调试用的样式 */
outline: none !important;
border: none !important;
}
/deep/ .el-input {
min-width: 150px;
width: auto;
flex: 1;
}
}
.el-tag {
margin-right: 4px;
height: 26px;
line-height: 24px;
}
.tag-input {
background: transparent;
border: none !important;
font-size: 14px;
height: 32px;
outline: none;
padding-left: 0;
width: 100px;
}
</style> </style>
...@@ -6,20 +6,35 @@ ...@@ -6,20 +6,35 @@
<div class="content-text"> <div class="content-text">
<div class="detail-item"> <div class="detail-item">
<div class="detail-label">创建者:</div> <div class="detail-label">创建者:</div>
<div class="detail-value">超级管理员</div> <div class="detail-value">{{basicInfo.createdBy ? basicInfo.createdBy : '-'}}</div>
</div> </div>
<div class="detail-item"> <div class="detail-item">
<div class="detail-label">群发内容:</div> <div class="detail-label">群发类型:</div>
<div class="detail-value">超级管理员</div> <div class="detail-value">{{basicInfo.sendType == 1 ? '立即发送': '定时发送'}}</div>
<div class="detail-tips">详见右侧视图</div> </div>
<div class="detail-item" v-show="form == 'customer'">
<div class="detail-label">发送状态:</div>
<div class="detail-value">{{STATUS_TYPE[basicInfo.status]}}</div>
</div>
<div class="detail-item" v-show="form == 'customer' && basicInfo.sendType == 2">
<div class="detail-label">发送时间:</div>
<div class="detail-value">{{basicInfo.sendTime}}</div>
</div> </div>
<div class="detail-item"> <div class="detail-item">
<div class="detail-label">创建者:</div> <div class="detail-label">群发对象:</div>
<div class="detail-value">超级管理员</div> <div class="detail-value">
<span v-for="(item, index) in basicInfo.userList" :key="item.id">
[{{item.staffName}}]
<span v-show="basicInfo.userList.length -1 != index">、</span>
</span>
</div>
</div> </div>
<div class="detail-item"> <div class="detail-item">
<div class="detail-label">创建者:</div> <div class="detail-label">群发内容:</div>
<div class="detail-value">超级管理员</div> <div
class="detail-value"
>[共{{basicInfo.attachmentList ? basicInfo.attachmentList.length : '0'}}条]</div>
<div class="detail-tips">详见右侧视图</div>
</div> </div>
</div> </div>
<div class="title">数据统计</div> <div class="title">数据统计</div>
...@@ -27,59 +42,99 @@ ...@@ -27,59 +42,99 @@
<div class="statistics-ul"> <div class="statistics-ul">
<div class="statistics-li statistics-border"> <div class="statistics-li statistics-border">
<div class="statistics-number"> <div class="statistics-number">
<span>0</span> <span>{{form == 'customer' ? statistic.senderStaffCount: statistic.senderStaffCount}}</span>
人 人
</div> </div>
<div>已发送群主</div> <div>已发送{{form == 'customer' ? '成员': '群主'}}</div>
</div> </div>
<div class="statistics-li"> <div class="statistics-li">
<div class="statistics-number"> <div class="statistics-number">
<span>0</span> <span>{{form == 'customer' ? statistic.senderCustomerCount :statistic.senderGroupCount}}</span>
人 人
</div> </div>
<div>已发送群主</div> <div>送达{{form == 'customer' ? '客户': '群聊'}}</div>
</div> </div>
</div> </div>
<div class="statistics-ul"> <div class="statistics-ul">
<div class="statistics-li statistics-border"> <div class="statistics-li statistics-border">
<div class="statistics-number"> <div class="statistics-number">
<span>0</span> <span>{{form == 'customer' ?statistic.unSenderStaffCount:statistic.unSenderStaffCount}}</span>
人 人
</div> </div>
<div>已发送群主</div> <div>未发送{{form == 'customer' ? '成员': '群主'}}</div>
</div> </div>
<div class="statistics-li"> <div class="statistics-li">
<div class="statistics-number"> <div class="statistics-number">
<span>0</span> <span>{{form == 'customer' ?statistic.unSenderCustomerCount:statistic.unSenderGroupCount}}</span>
人 人
</div> </div>
<div>已发送群主</div> <div>未送达{{form == 'customer' ? '客户': '群聊'}}</div>
</div> </div>
</div> </div>
<div class="statistics-ul"> <div v-if="form == 'customer'" class="statistics-ul">
<div class="statistics-li"> <div class="statistics-li">
<div class="statistics-number"> <div class="statistics-number">
<span>0</span> <span>{{statistic.senderCustomerFailureCount}}</span>
人 人
</div> </div>
<div>已发送群主</div> <div>客户送达失败</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<Preview></Preview> <Preview :eventBus="eventBus" :list.sync="basicInfo.attachmentList"></Preview>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
const STATUS = {
'-1': '创建失败',
'0': '创建成功',
'1': '发送成功',
'2': '发送失败'
}
import Preview from '../components/preview.vue' import Preview from '../components/preview.vue'
export default { export default {
name: 'BasicInof', name: 'BasicInof',
props: ['form', 'id', 'eventBus'],
components: { components: {
Preview Preview
}, },
data() {}, data() {
methods: {} return {
STATUS_TYPE: STATUS,
basicInfo: {},
statistic: {}
}
},
mounted() {
this.getCustomerDetail(this.id)
console.log(this.form)
this.getStatistic()
},
methods: {
getCustomerDetail(id) {
this.$apis.customerTransform.customerDetail({ id }).then(res => {
console.log(res)
this.basicInfo = res
this.eventBus.$emit('update', this.basicInfo.attachmentList)
})
},
getStatistic() {
const { id, form } = this
if (form == 'customer') {
this.$apis.customerTransform.detailStatistic({ id }).then(res => {
console.log(res)
this.statistic = res
})
} else if (form == 'customerGroup') {
this.$apis.customerTransform.groupDetailStatistic({ id }).then(res => {
console.log(res)
this.statistic = res
})
}
}
}
} }
</script> </script>
<style lang="scss" scope> <style lang="scss" scope>
...@@ -120,7 +175,7 @@ export default { ...@@ -120,7 +175,7 @@ export default {
} }
.statistics-info { .statistics-info {
display: flex; display: flex;
justify-content: space-between; justify-content: space-around;
margin-top: 24px; margin-top: 24px;
margin-left: 52px; margin-left: 52px;
.statistics-ul { .statistics-ul {
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
<div class="preview-content"> <div class="preview-content">
<div class="preview-time">{{ currentTime }}</div> <div class="preview-time">{{ currentTime }}</div>
<div class="preview-info" v-for="item in previewList" :key="item.id"> <div class="preview-info" v-for="item in previewList" :key="item.id">
<img class="avatar" src="@/assets/logo.png" alt="" /> <img class="avatar" src="@/assets/logo.png" alt />
<template v-if="item.attType == 1"> <template v-if="item.attType == 1">
<div class="preview-text text">{{ item.attContent }}</div> <div class="preview-text text">{{ item.attContent }}</div>
</template> </template>
<template v-else-if="item.attType == 4"> <template v-else-if="item.attType == 4">
<div class="preview-text preview-link"> <div class="preview-text preview-link">
{{ item.attContent.url }} {{ item.attContent.url }}
<img src="@/assets/guestCustom/preview-link.png" alt="" /> <img src="@/assets/guestCustom/preview-link.png" alt />
</div> </div>
</template> </template>
<template v-else-if="item.attType == 2"> <template v-else-if="item.attType == 2">
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<template v-else-if="item.attType == 5"> <template v-else-if="item.attType == 5">
<div class="preview-text text preview-applet"> <div class="preview-text text preview-applet">
<div class="preview-applet-title"> <div class="preview-applet-title">
<img :src="item.attContent.picUrl" alt="" /> <img :src="item.attContent.picUrl" alt />
<span>{{ item.attContent.title }}</span> <span>{{ item.attContent.title }}</span>
</div> </div>
{{ item.attContent.page }} {{ item.attContent.page }}
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<script> <script>
export default { export default {
name: 'Preview', name: 'Preview',
props: { eventBus: Object }, props: { eventBus: Object, list: Array },
data() { data() {
return { return {
previewList: [], previewList: [],
...@@ -45,6 +45,9 @@ export default { ...@@ -45,6 +45,9 @@ export default {
} }
}, },
created() { created() {
this.$nextTick(() => {
console.log(1, this.list)
})
this.eventBus.$on('update', val => { this.eventBus.$on('update', val => {
console.log(val) console.log(val)
this.previewList = val this.previewList = val
......
...@@ -2,14 +2,18 @@ ...@@ -2,14 +2,18 @@
<div class="select-emp-panel"> <div class="select-emp-panel">
<div class="scrm-p10 emp-tree-panel"> <div class="scrm-p10 emp-tree-panel">
<div class="popper-arrow"></div> <div class="popper-arrow"></div>
<div <div class="emp-scroll-panel" :style="{
class="emp-scroll-panel"
:style="{
height: treeHeight + 'px' height: treeHeight + 'px'
}" }">
>
<div class="tree-title">所在门店/部门</div> <div class="tree-title">所在门店/部门</div>
<el-tree :data="listTree" :expand-on-click-node="false" highlight-current :props="defaultProps" @node-click="handleNodeClick"></el-tree> <el-tree
v-loading="loading"
:data="listTree"
:expand-on-click-node="false"
highlight-current
:props="defaultProps"
@node-click="handleNodeClick"
></el-tree>
</div> </div>
</div> </div>
<el-col <el-col
...@@ -18,7 +22,15 @@ ...@@ -18,7 +22,15 @@
height: treeHeight + 20 + 'px' height: treeHeight + 20 + 'px'
}" }"
> >
<GLTable ref="saleTable" :tableData="tableEmpData" :tableParams="tableParams" :hasNum="false" :hasPage="false" @selectionTable="selectionTable"></GLTable> <GLTable
v-loading="loading"
ref="saleTable"
:tableData="tableEmpData"
:tableParams="tableParams"
:hasNum="false"
:hasPage="false"
@selectionTable="selectionTable"
></GLTable>
</el-col> </el-col>
</div> </div>
</template> </template>
...@@ -57,7 +69,9 @@ export default { ...@@ -57,7 +69,9 @@ export default {
] ]
}, },
tableEmpData: [], tableEmpData: [],
group: {} group: {},
currentArr: [],
loading: true
} }
}, },
methods: { methods: {
...@@ -67,8 +81,10 @@ export default { ...@@ -67,8 +81,10 @@ export default {
listDepartmentTree() { listDepartmentTree() {
this.$apis.customerTransform.listDepartmentTree({ merchantId: 10001001, addChildrensFlag: true }).then(res => { this.$apis.customerTransform.listDepartmentTree({ merchantId: 10001001, addChildrensFlag: true }).then(res => {
this.listTree = res this.listTree = res
this.loading = false
this.listTree[0].entmicroStaffResponses = this.getEmployee(this.listTree) this.listTree[0].entmicroStaffResponses = this.getEmployee(this.listTree)
console.log(this.listTree) console.log(this.listTree)
this.currentArr = this.$common.utils.deepClone(this.listTree[0].entmicroStaffResponses)
this.selectData.forEach(i => { this.selectData.forEach(i => {
const row = this.getEmployee(this.listTree).find(j => j.id == i.staffId) const row = this.getEmployee(this.listTree).find(j => j.id == i.staffId)
console.log(row) console.log(row)
...@@ -90,6 +106,7 @@ export default { ...@@ -90,6 +106,7 @@ export default {
handleNodeClick(data) { handleNodeClick(data) {
this.departmentId = data.id this.departmentId = data.id
this.tableEmpData = data.entmicroStaffResponses this.tableEmpData = data.entmicroStaffResponses
this.currentArr = this.$common.utils.deepClone(data.entmicroStaffResponses)
// this.listEntmicroStaff() // this.listEntmicroStaff()
}, },
getEmployee(d, arr = []) { getEmployee(d, arr = []) {
...@@ -104,6 +121,17 @@ export default { ...@@ -104,6 +121,17 @@ export default {
} }
}) })
return arr return arr
},
searchTable(search) {
const arr = []
this.currentArr.forEach(item => {
console.log(item.staffName.indexOf(search) != -1)
if (item.staffName.indexOf(search) != -1) {
console.log(item)
arr.push(item)
}
})
this.tableEmpData = arr
} }
// listEntmicroStaff(staffName) { // listEntmicroStaff(staffName) {
// let params = { // let params = {
...@@ -118,7 +146,7 @@ export default { ...@@ -118,7 +146,7 @@ export default {
}, },
mounted() { mounted() {
let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
this.treeHeight = clientHeight - 450 this.treeHeight = clientHeight - 650
this.listDepartmentTree() this.listDepartmentTree()
} }
} }
......
...@@ -11,11 +11,28 @@ ...@@ -11,11 +11,28 @@
</div> </div>
<div class="checkbox-group-box" :style="{ 'max-height': heightBox + 'px' }"> <div class="checkbox-group-box" :style="{ 'max-height': heightBox + 'px' }">
<div v-for="(item, index) in labelTreeRets" :key="index"> <div v-for="(item, index) in labelTreeRets" :key="index">
<span class="el-tree-node__expand-icon el-icon-caret-right" :class="{ expanded: item.checked }" @click="item.checked = !item.checked"></span> <span
<el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll" @change="handleCheckAllChange(item.checkAll, index)">{{ item.labelGroup.name }}({{ item.tagChecked.length }}/{{ item.labelList.length }} 项)</el-checkbox> class="el-tree-node__expand-icon el-icon-caret-right"
:class="{ expanded: item.checked }"
@click="item.checked = !item.checked"
></span>
<el-checkbox
:indeterminate="item.isIndeterminate"
v-model="item.checkAll"
@change="handleCheckAllChange(item.checkAll, index)"
>{{ item.labelGroup.name }}({{ item.tagChecked.length }}/{{ item.labelList.length }} 项)</el-checkbox>
<div style="margin: 15px 0"></div> <div style="margin: 15px 0"></div>
<el-checkbox-group class="tag-group" v-model="item.tagChecked" @change="handleCheckedChange(item.tagChecked, index)" v-show="item.checked"> <el-checkbox-group
<el-checkbox v-for="(itm, idx) in item.labelList" :label="itm" :key="idx">{{ itm.name }}</el-checkbox> class="tag-group"
v-model="item.tagChecked"
@change="handleCheckedChange(item.tagChecked, index)"
v-show="item.checked"
>
<el-checkbox
v-for="(itm, idx) in item.labelList"
:label="itm"
:key="idx"
>{{ itm.name }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
</div> </div>
...@@ -27,9 +44,14 @@ ...@@ -27,9 +44,14 @@
<div class="tag-box-header">标签名称({{ selectNum }}项)</div> <div class="tag-box-header">标签名称({{ selectNum }}项)</div>
<div class="tag-selected-box"> <div class="tag-selected-box">
<template v-for="item in labelTreeRets"> <template v-for="item in labelTreeRets">
<el-tag class="tag-selected-item" v-for="(tag, idx) in item.tagChecked" :key="idx" closable :disable-transitions="false" @close="remove(item, idx)"> <el-tag
{{ tag.name }} class="tag-selected-item"
</el-tag> v-for="(tag, idx) in item.tagChecked"
:key="idx"
closable
:disable-transitions="false"
@close="remove(item, idx)"
>{{ tag.name }}</el-tag>
</template> </template>
</div> </div>
</div> </div>
...@@ -37,14 +59,14 @@ ...@@ -37,14 +59,14 @@
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button> <el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="dialogVisible = false">确 定</el-button> <el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { utils } from 'glsx-common'
export default { export default {
name: 'SelectLabel', name: 'SelectLabel',
data() { data() {
...@@ -93,14 +115,14 @@ export default { ...@@ -93,14 +115,14 @@ export default {
} }
}, },
methods: { methods: {
init() { init(item) {
this.dialogVisible = true this.dialogVisible = true
this.querylabeltree() this.querylabeltree(item)
}, },
handleSearch() { handleSearch() {
this.querylabeltree() this.querylabeltree()
}, },
querylabeltree() { querylabeltree(selectItem) {
this.$apis.customerTransform this.$apis.customerTransform
.querylabeltree({ .querylabeltree({
labelTreeReq: { labelTreeReq: {
...@@ -111,7 +133,7 @@ export default { ...@@ -111,7 +133,7 @@ export default {
} }
}) })
.then(res => { .then(res => {
console.log(res) if (selectItem && selectItem.length > 0) {
this.labelTreeRets = res.labelTreeRets.map(item => { this.labelTreeRets = res.labelTreeRets.map(item => {
return { return {
labelGroup: item.labelGroup, labelGroup: item.labelGroup,
...@@ -122,11 +144,63 @@ export default { ...@@ -122,11 +144,63 @@ export default {
checkAll: false checkAll: false
} }
}) })
//回显
selectItem.forEach(item => {
this.labelTreeRets.forEach(tag => {
if (item.labelGroup.id == tag.labelGroup.id) {
this.$nextTick(() => {
tag.tagChecked = item.labelList
})
}
})
})
this.labelTreeRets.forEach((item, index) => {
this.$nextTick(() => {
this.handleCheckedChange(item.tagChecked, index)
})
})
} else {
this.labelTreeRets = res.labelTreeRets.map(item => {
return {
labelGroup: item.labelGroup,
labelList: item.labelList,
checked: false,
tagChecked: [],
isIndeterminate: false,
checkAll: false
}
})
}
}) })
}, },
remove(item, idx) { remove(item, idx) {
item.tagChecked.splice(idx, 1) item.tagChecked.splice(idx, 1)
if (item.tagChecked.length == 0) item.checkAll = false if (item.tagChecked.length == 0) {
this.$nextTick(() => {
item.checkAll = false
})
}
this.labelTreeRets.forEach((item, index) => {
this.$nextTick(() => {
this.handleCheckedChange(item.tagChecked, index)
})
})
},
//选中
handleSelect() {
this.dialogVisible = false
let labelTreeRets = this.labelTreeRets
.map(item => {
if (item.tagChecked.length) {
return {
labelGroup: item.labelGroup,
labelList: item.tagChecked
}
}
})
.filter(item => item)
console.log(labelTreeRets)
this.$emit('tagSelected', labelTreeRets)
}, },
//全选 //全选
handleCheckAllChange(val, index) { handleCheckAllChange(val, index) {
...@@ -154,7 +228,6 @@ export default { ...@@ -154,7 +228,6 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.tag-panel { .tag-panel {
display: flex; display: flex;
...@@ -163,6 +236,7 @@ export default { ...@@ -163,6 +236,7 @@ export default {
/deep/ { /deep/ {
.el-checkbox__label { .el-checkbox__label {
width: 100%; width: 100%;
vertical-align: middle;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
...@@ -219,6 +293,8 @@ export default { ...@@ -219,6 +293,8 @@ export default {
} }
.tag-group { .tag-group {
margin-left: 40px; margin-left: 40px;
display: flex;
flex-wrap: wrap;
.el-checkbox { .el-checkbox {
width: 40%; width: 40%;
margin-bottom: 6px; margin-bottom: 6px;
......
...@@ -4,16 +4,33 @@ ...@@ -4,16 +4,33 @@
<el-form-item label="请选择成员"> <el-form-item label="请选择成员">
<div class="sale-select"> <div class="sale-select">
<div class="el-input-tag input-tag-wrapper" @click="foucusTagInput"> <div class="el-input-tag input-tag-wrapper" @click="foucusTagInput">
<el-tag v-for="(tag, idx) in innerTags" :key="idx" closable :disable-transitions="false" @close="remove(tag)"> <el-tag
{{ tag.staffName }} v-for="(tag, idx) in innerTags"
</el-tag> :key="idx"
<el-input size="small" v-model.trim="newTag" placeholder="选择员工" @input="inputTag" style="outline: none; border: none"></el-input> closable
:disable-transitions="false"
@close="remove(tag)"
>{{ tag.staffName }}</el-tag>
<el-input
size="small"
v-model.trim="newTag"
placeholder="选择员工"
@input="inputTag"
style="outline: none; border: none"
></el-input>
</div>
<div>
<el-button size="small" class="sale-select-btn" type="primary" @click="searchEmp">查询</el-button>
</div> </div>
<div><el-button size="small" class="sale-select-btn" type="primary" @click="searchEmp">查询</el-button></div>
</div> </div>
<div> <div>
<div class="select-sale-panel"> <div class="select-sale-panel">
<select-emp :selectData="selectData" @group="handlGroup" @selectTable="selectTable" ref="selectEmpTabel"></select-emp> <select-emp
:selectData="selectData"
@group="handlGroup"
@selectTable="selectTable"
ref="selectEmpTabel"
></select-emp>
<div class="popper__arrow"></div> <div class="popper__arrow"></div>
</div> </div>
</div> </div>
...@@ -66,7 +83,7 @@ export default { ...@@ -66,7 +83,7 @@ export default {
}, },
//查询 //查询
searchEmp() { searchEmp() {
this.$refs.selectEmpTabel.listDepartmentTree(this.newTag) this.$refs.selectEmpTabel.searchTable(this.newTag)
}, },
onSubmit() { onSubmit() {
if (this.innerTags.length == 0) { if (this.innerTags.length == 0) {
......
...@@ -3,23 +3,31 @@ ...@@ -3,23 +3,31 @@
<!-- <div class="required">入群欢迎语</div> --> <!-- <div class="required">入群欢迎语</div> -->
<div class="content"> <div class="content">
<div class="content-bg"> <div class="content-bg">
<el-input type="textarea" :rows="9" maxlength="600" show-word-limit v-model="guestForm.name" @input="textInput" placeholder="请输入内容"></el-input> <el-input
type="textarea"
:rows="9"
maxlength="600"
show-word-limit
v-model="guestForm.name"
@input="textInput"
placeholder="请输入内容"
></el-input>
<div v-for="itm in previewList" :key="itm.id"> <div v-for="itm in previewList" :key="itm.id">
<div class="welcome-file" v-if="itm.attType != 1"> <div class="welcome-file" v-if="itm.attType != 1">
<template v-if="itm.attType == 2"> <template v-if="itm.attType == 2">
<img src="@/assets/guestCustom/icon-img.png" alt="" /> <img src="@/assets/guestCustom/icon-img.png" alt />
<span>{{ itm.attContent }}</span> <span>{{ itm.attContent }}</span>
</template> </template>
<template v-else-if="itm.attType == 3"> <template v-else-if="itm.attType == 3">
<img src="@/assets/guestCustom/icon-img.png" alt="" /> <img src="@/assets/guestCustom/icon-img.png" alt />
<span>{{ itm.attContent }}</span> <span>{{ itm.attContent }}</span>
</template> </template>
<template v-else-if="itm.attType == 4"> <template v-else-if="itm.attType == 4">
<img src="@/assets/guestCustom/icon-link.png" alt="" /> <img src="@/assets/guestCustom/icon-link.png" alt />
<span>{{ itm.attContent.url }}</span> <span>{{ itm.attContent.url }}</span>
</template> </template>
<template v-else-if="itm.attType == 5"> <template v-else-if="itm.attType == 5">
<img src="@/assets/guestCustom/icon-applet.png" alt="" /> <img src="@/assets/guestCustom/icon-applet.png" alt />
<span>{{ itm.attContent.title }}</span> <span>{{ itm.attContent.title }}</span>
</template> </template>
<i class="el-icon-circle-close" @click="close(index)"></i> <i class="el-icon-circle-close" @click="close(index)"></i>
...@@ -30,14 +38,36 @@ ...@@ -30,14 +38,36 @@
<i class="el-icon-circle-plus-outline"></i> <i class="el-icon-circle-plus-outline"></i>
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
<!-- <div id="video"></div> --> <!-- <div id="video"></div> -->
<input v-if="item.type == 'img'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input" :accept="item.accept || 'image/png, image/jpeg, image/jpg'" @change="e => handleImgChange(e, item)" /> <input
<input v-if="item.type == 'video'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input" :accept="item.accept || 'video/*'" @change="e => handleVideoChange(e, item)" /> v-if="item.type == 'img'"
<el-link v-if="item.type == 'popup'" style="opacity: 0" @click="switchDailog(item.funName)">{{ item.name }}</el-link> type="file"
style="opacity: 0"
:id="item.name + 'file'"
ref="file"
class="welcome-input"
:accept="item.accept || 'image/png, image/jpeg, image/jpg'"
@change="e => handleImgChange(e, item)"
/>
<input
v-if="item.type == 'video'"
type="file"
style="opacity: 0"
:id="item.name + 'file'"
ref="file"
class="welcome-input"
:accept="item.accept || 'video/*'"
@change="e => handleVideoChange(e, item)"
/>
<el-link
v-if="item.type == 'popup'"
style="opacity: 0"
@click="switchDailog(item.funName)"
>{{ item.name }}</el-link>
</div> </div>
</div> </div>
</div> </div>
<div class="tips-text"> <div class="tips-text">
<img src="../../../assets/guestCustom/tips.png" class="tips-icon" alt="" /> <img src="../../../assets/guestCustom/tips.png" class="tips-icon" alt />
<span>客户每个月最多接收来自同一企业的管理员的 4 条群发消息,4条消息可在同一天发送,达到上限后,无法再接收管理员的群发消息。</span> <span>客户每个月最多接收来自同一企业的管理员的 4 条群发消息,4条消息可在同一天发送,达到上限后,无法再接收管理员的群发消息。</span>
</div> </div>
</div> </div>
...@@ -52,11 +82,23 @@ ...@@ -52,11 +82,23 @@
- -
<el-time-picker v-model="sendDate" size="small" placeholder="选择时间"></el-time-picker> <el-time-picker v-model="sendDate" size="small" placeholder="选择时间"></el-time-picker>
</div> </div>
</div> --> </div>-->
<glsx-dialog :title="dialogTitle" :width="'712px'" :isVisible="dialogVisible" @confirmDialog="handleConfirm" @closeDialog="dialogVisible = !dialogVisible"> <glsx-dialog
:title="dialogTitle"
:width="'712px'"
:isVisible="dialogVisible"
@confirmDialog="handleConfirm"
@closeDialog="dialogVisible = !dialogVisible"
>
<slot> <slot>
<el-form v-if="dialogTitle == '添加网页消息'" :model="linkForm" :rules="linkRules" ref="linkForm" label-width="120px"> <el-form
v-if="dialogTitle == '添加网页消息'"
:model="linkForm"
:rules="linkRules"
ref="linkForm"
label-width="120px"
>
<el-form-item label="网页标题" prop="title"> <el-form-item label="网页标题" prop="title">
<el-input v-model="linkForm.title" placeholder="请输入网页标题"></el-input> <el-input v-model="linkForm.title" placeholder="请输入网页标题"></el-input>
</el-form-item> </el-form-item>
...@@ -64,7 +106,13 @@ ...@@ -64,7 +106,13 @@
<el-input v-model="linkForm.url" placeholder="以http或https开头"></el-input> <el-input v-model="linkForm.url" placeholder="以http或https开头"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form v-else-if="dialogTitle == '添加小程序'" :model="appletForm" :rules="appletRules" ref="appletForm" label-width="120px"> <el-form
v-else-if="dialogTitle == '添加小程序'"
:model="appletForm"
:rules="appletRules"
ref="appletForm"
label-width="120px"
>
<el-form-item label="小程序标题" prop="title"> <el-form-item label="小程序标题" prop="title">
<el-input v-model="appletForm.title" placeholder="请输入小程序标题"></el-input> <el-input v-model="appletForm.title" placeholder="请输入小程序标题"></el-input>
</el-form-item> </el-form-item>
...@@ -81,8 +129,20 @@ ...@@ -81,8 +129,20 @@
<i class="el-icon-circle-plus"></i> <i class="el-icon-circle-plus"></i>
<div class="upload-text">上传封面</div> <div class="upload-text">上传封面</div>
</div> </div>
<input type="file" style="opacity: 0" ref="file" class="form-upload img-w-h" accept="image/png, image/jpeg, image/gif, image/jpg" @change="handleImg" /> <input
<el-image v-show="appletForm.picUrl" style="width: 140px" :src="appletForm.picUrl" fit="contain"></el-image> type="file"
style="opacity: 0"
ref="file"
class="form-upload img-w-h"
accept="image/png, image/jpeg, image/gif, image/jpg"
@change="handleImg"
/>
<el-image
v-show="appletForm.picUrl"
style="width: 140px"
:src="appletForm.picUrl"
fit="contain"
></el-image>
</div> </div>
<div class="form-tips">建议图片大小在2M以内,建议尺寸:352*282px</div> <div class="form-tips">建议图片大小在2M以内,建议尺寸:352*282px</div>
...@@ -160,7 +220,6 @@ export default { ...@@ -160,7 +220,6 @@ export default {
}, },
methods: { methods: {
handleImgChange(e, targetItem) { handleImgChange(e, targetItem) {
console.log(e, targetItem)
var reader = new FileReader() var reader = new FileReader()
var file = e.srcElement.files[0] var file = e.srcElement.files[0]
console.log(file) console.log(file)
...@@ -245,7 +304,6 @@ export default { ...@@ -245,7 +304,6 @@ export default {
} }
}, },
switchDailog(funName) { switchDailog(funName) {
console.log(funName)
if (funName == 'link') { if (funName == 'link') {
this.dialogTitle = '添加网页消息' this.dialogTitle = '添加网页消息'
} else if (funName == 'applet') { } else if (funName == 'applet') {
...@@ -295,9 +353,7 @@ export default { ...@@ -295,9 +353,7 @@ export default {
this.eventBus.$emit('update', this.previewList) this.eventBus.$emit('update', this.previewList)
}, },
textInput(val) { textInput(val) {
console.log(val)
const hasText = this.previewList.some(item => item.attType == 1) const hasText = this.previewList.some(item => item.attType == 1)
console.log(hasText)
if (hasText) { if (hasText) {
this.$set(this.previewList, 0, { this.$set(this.previewList, 0, {
attContent: val, attContent: val,
...@@ -309,7 +365,6 @@ export default { ...@@ -309,7 +365,6 @@ export default {
attType: ATT_TYPE.TEXT attType: ATT_TYPE.TEXT
}) })
} }
console.log(this.previewList)
} }
} }
} }
......
<template> <template>
<div> <div style="margin-top: 26px;">
<BasicInof></BasicInof> <BasicInof :form="'customerGroup'" :eventBus="eventBus" :id="$route.params.id"></BasicInof>
<div class="detail-container"> <div class="group-detail-container">
<glsx-combi-form ref="showSearch" labelWidth="90px" :formObj="searchForm" :formData="searchFormData"> <glsx-combi-form
ref="showSearch"
labelWidth="90px"
:formObj="searchForm"
:formData="searchFormData"
>
<span slot="footer" class="search-btns"> <span slot="footer" class="search-btns">
<el-button :size="size" type="primary" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleReset">重置</el-button>
</span> </span>
</glsx-combi-form> </glsx-combi-form>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="table" :tableData="tableData" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf"> <GLTable
ref="table"
:getListApi="getListApi"
:searchForm="searchForm"
:tableParams="tableParams"
:hasPage="false"
:pageConf="pageConf"
>
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" :disabled="scope.scope.isRemind == 1" @click="btnClick('edit', scope.scope)">提醒发送</el-button> <el-button
type="text"
:disabled="scope.scope.remindStatus == 1"
@click="remind(scope.scope)"
>提醒发送</el-button>
</div> </div>
</GLTable> </GLTable>
</div> </div>
...@@ -22,12 +38,13 @@ ...@@ -22,12 +38,13 @@
width: footerWidth + 'px' width: footerWidth + 'px'
}" }"
> >
<el-button type="primary" @click="handleNext">确定</el-button> <!-- <el-button type="primary" @click="handleNext">确定</el-button> -->
<el-button type="primary" @click="handleCancel">取消</el-button> <el-button type="primary" @click="handleCancel">取消</el-button>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Vue from 'vue'
import BasicInof from './components/basicInfo.vue' import BasicInof from './components/basicInfo.vue'
export default { export default {
components: { components: {
...@@ -36,53 +53,61 @@ export default { ...@@ -36,53 +53,61 @@ export default {
data() { data() {
return { return {
searchForm: {}, searchForm: {},
eventBus: new Vue(),
searchFormData: [ searchFormData: [
{ {
label: '群聊名称', label: '群聊名称',
name: 'zoneName', name: 'keyWord',
type: 'input', type: 'input',
maxlength: 20 maxlength: 20
}, },
{ {
label: '群主', label: '群主',
name: 'createDate', name: 'staffId',
type: 'select', type: 'select',
isClear: true, isClear: true,
optionLabel: 'label', optionLabel: 'staffName',
optionId: 'value', optionId: 'staffId',
optionList: [ optionList: []
{
label: 12,
value: 12
}
]
}, },
{ {
label: '送达状态', label: '送达状态',
name: 'createDate', name: 'status',
type: 'select', type: 'select',
isClear: true, isClear: true,
optionLabel: 'label', optionLabel: 'label',
optionId: 'value', optionId: 'value',
optionList: [ optionList: [
{ {
label: 12, label: '全部',
value: 12 value: ''
},
{
label: '未发送',
value: '0'
},
{
label: '已发送',
value: '1'
},
{
label: '发送失败',
value: '2'
} }
] ]
} }
], ],
tableParams: { tableParams: {
listName: 'list', listName: '',
tableOption: false, tableOption: false,
tableColumns: [ tableColumns: [
{ {
label: '群聊名称', label: '群聊名称',
prop: 'zoneName' prop: 'groupName'
}, },
{ {
label: '群主', label: '群主',
prop: 'zoneName' prop: 'staffName'
}, },
{ {
label: '群主所在部门', label: '群主所在部门',
...@@ -90,18 +115,25 @@ export default { ...@@ -90,18 +115,25 @@ export default {
}, },
{ {
label: '群客户人数', label: '群客户人数',
prop: 'zoneName' prop: 'departmentName'
}, },
{ {
label: '消息送达状态', label: '消息送达状态',
prop: 'zoneName' prop: 'status',
formatter: cellValue => {
return {
0: '未发送',
1: '已发送',
2: '发送失败'
}[cellValue.status]
}
}, },
{ {
label: '确认发送时间', label: '确认发送时间',
prop: 'createdDate', prop: 'senderTime'
formatter: cellValue => { // formatter: cellValue => {
return new Date(cellValue.createdDate).toLocaleDateString().replace(/\//g, '-') // return new Date(cellValue.createdDate).toLocaleDateString().replace(/\//g, '-')
} // }
}, },
{ {
label: '操作', label: '操作',
...@@ -113,27 +145,57 @@ export default { ...@@ -113,27 +145,57 @@ export default {
] ]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
tableData: [ getListApi: this.$apis.customerTransform.groupDetailList
{
zoneName: 'fasd',
isRemind: 1
},
{
zoneName: 'fasd',
isRemind: 2
}
]
} }
}, },
mounted() {
const id = this.$route.params.id
this.getCustomerDetail(id)
this.searchForm.massId = id
let clientHeight = document.documentElement.clientHeight
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.boxHeight = clientHeight - 200
},
methods: { methods: {
handleCancel() { handleCancel() {
this.$router.go(-1) this.$router.go(-1)
},
remind(data) {
this.$apis.customerTransform
.listRemindOperate({
id: data.id,
type: 2
})
.then(res => {
console.log(res)
this.handleSearch()
this.$message({
type: 'success',
message: '已提醒!'
})
// this.$set(this.employeelist[index], 'isRemind', true)
})
},
handleSearch() {
this.$refs.table.refreshTable()
},
handleReset() {
this.searchForm = {
massId: this.$route.params.id
}
},
getCustomerDetail(id) {
this.$apis.customerTransform.customerDetail({ id }).then(res => {
this.searchFormData[1].optionList = res.userList
})
} }
} }
} }
</script> </script>
<style lang="scss" scope> <style lang="scss" scope>
.detail-container { .group-detail-container {
margin-top: 26px;
margin-bottom: 84px; margin-bottom: 84px;
padding: 20px; padding: 20px;
background-color: #ffffff; background-color: #ffffff;
...@@ -152,5 +214,6 @@ export default { ...@@ -152,5 +214,6 @@ export default {
width: 100%; width: 100%;
background: #ffffff; background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1); box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
z-index: 1;
} }
</style> </style>
<template> <template>
<div> <div style="margin-top: 26px;">
<BasicInof></BasicInof> <BasicInof :eventBus="eventBus" :id="$route.params.id" :form="'customer'"></BasicInof>
<div class="detail-container"> <div class="detail-container">
<div class="detail-modular"> <div class="detail-modular">
<div class="title">员工详情</div> <div class="title">员工详情</div>
<div class="detail-info"> <div class="detail-info">
<el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect"> <el-menu
<el-menu-item index="1">全部</el-menu-item> :default-active="activeIndex"
<el-menu-item index="2">已发送员工</el-menu-item> class="el-menu-demo"
<el-menu-item index="3">未发送员工</el-menu-item> mode="horizontal"
<el-menu-item index="4">员工发送失败</el-menu-item> @select="handleSelect"
>
<el-menu-item index="0">全部</el-menu-item>
<el-menu-item index="1">已发送员工</el-menu-item>
<el-menu-item index="2">未发送员工</el-menu-item>
<el-menu-item index="3">员工发送失败</el-menu-item>
</el-menu> </el-menu>
<div class="detail-total">共 {{ employeelist.length || 0 }} 人</div> <div class="detail-total">共 {{ employeelist.length || 0 }} 人</div>
<div class="info-list"> <div v-if="employeelist.length != 0" class="info-list">
<div class="info-item" v-for="item in employeelist" :key="item.id"> <div class="info-item" v-for="(item, index) in employeelist" :key="item.id">
<img class="info-avatar" src="../../assets/logo.png" alt="" /> <img class="info-avatar" :src="item.avatar" alt />
<div class="info-content"> <div class="info-content">
<div class="info-text"> <div class="info-text">
<div class="info-name"> <div class="info-name">
{{ item.name }} {{ item.staffName }}
<span :class="[item.status == 1 ? 'unsend' : 'send']">{{ item.status == 1 ? '未' : '已' }}发送</span> <span
:class="[item.status == 1 ? 'unsend' : 'send']"
>{{ item.status == 1 ? '未' : '已' }}发送</span>
</div> </div>
<div class="info-num">共{{ item.num }}个客户</div> <div class="info-num">共{{ item.customerCount }}个客户</div>
</div> </div>
<div class="info-right"> <div class="info-right">
<div v-if="item.status == 1">已提醒</div> <div v-if="item.remindStatus == 1">已提醒</div>
<el-button size="mini" type="primary">提醒</el-button> <el-button
:disabled="item.remindStatus == 1"
size="mini"
type="primary"
@click="remind(item, index)"
>提醒</el-button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<el-empty v-else image-size="200"></el-empty>
</div> </div>
</div> </div>
<div class="detail-modular"> <div class="detail-modular">
<div class="title">客户详情</div> <div class="title">客户详情</div>
<div class="detail-info"> <div class="detail-info">
<el-menu :default-active="customIndex" class="el-menu-demo" mode="horizontal" @select="handleCustomSelect"> <el-menu
<el-menu-item index="1">全部</el-menu-item> :default-active="customIndex"
<el-menu-item index="2">已发送员工</el-menu-item> class="el-menu-demo"
<el-menu-item index="3">未发送员工</el-menu-item> mode="horizontal"
<el-menu-item index="4">员工发送失败</el-menu-item> @select="handleCustomSelect"
>
<el-menu-item index="0">全部</el-menu-item>
<el-menu-item index="1">已发送客户</el-menu-item>
<el-menu-item index="2">未发送客户</el-menu-item>
<el-menu-item index="3">客户接受失败</el-menu-item>
</el-menu> </el-menu>
<div class="detail-total">共 {{ employeelist.length || 0 }} 人</div> <div class="detail-total">共 {{ customerlist.length || 0 }} 人</div>
<div class="info-list"> <div v-if="customerlist.length != 0" class="info-list">
<div class="info-item" v-for="item in employeelist" :key="item.id"> <div class="info-item" v-for="item in customerlist" :key="item.id">
<img class="info-avatar" src="../../assets/logo.png" alt="" /> <img class="info-avatar" :src="item.avatar" alt />
<div class="info-content info-custom"> <div class="info-content info-custom">
<div class="info-text"> <div class="info-text">
<div class="info-name"> <div class="info-name">
{{ item.name }} {{ item.customerName }}
<div :class="[item.status == 1 ? 'unsend' : 'send']">{{ item.status == 1 ? '未' : '已' }}发送</div> <div
:class="[item.status == 0 ? 'unsend' : 'send']"
>{{ item.status == 0 ? '未' : '已' }}发送</div>
</div> </div>
</div> </div>
<div class="info-right"> <div class="info-right">
<div>通过 胡悦发送</div> <div>通过 {{item.staffName}}发送</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<el-empty v-else image-size="200"></el-empty>
</div> </div>
</div> </div>
</div> </div>
...@@ -68,12 +89,14 @@ ...@@ -68,12 +89,14 @@
width: footerWidth + 'px' width: footerWidth + 'px'
}" }"
> >
<el-button type="primary" @click="handleNext">确定</el-button> <!-- <el-button type="primary" @click="handle
Next">确定</el-button>-->
<el-button type="primary" @click="handleCancel">取消</el-button> <el-button type="primary" @click="handleCancel">取消</el-button>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Vue from 'vue'
import BasicInof from './components/basicInfo.vue' import BasicInof from './components/basicInfo.vue'
export default { export default {
components: { components: {
...@@ -81,8 +104,8 @@ export default { ...@@ -81,8 +104,8 @@ export default {
}, },
data() { data() {
return { return {
activeIndex: '1', activeIndex: '0',
customIndex: '1', customIndex: '0',
employeelist: [ employeelist: [
{ {
id: 1, id: 1,
...@@ -126,19 +149,74 @@ export default { ...@@ -126,19 +149,74 @@ export default {
num: 1, num: 1,
url: 'dfsa' url: 'dfsa'
} }
] ],
customerlist: [],
basicInfo: {},
eventBus: new Vue()
} }
}, },
mounted() {
this.getStaffList()
this.getCustomerList()
let clientHeight = document.documentElement.clientHeight
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.boxHeight = clientHeight - 200
},
methods: { methods: {
handleSelect(val) { handleSelect(val) {
console.log(val)
this.activeIndex = val this.activeIndex = val
this.getStaffList(val)
}, },
handleCustomSelect(val) { handleCustomSelect(val) {
this.customIndex = val this.customIndex = val
this.getCustomerList(val)
}, },
handleCancel() { handleCancel() {
this.$router.go(-1) this.$router.go(-1)
},
remind(data, index) {
if (!data.remindStatus) {
this.$apis.customerTransform
.listRemindOperate({
id: data.id,
type: 1
})
.then(res => {
this.getStaffList(this.activeIndex)
this.$message({
type: 'success',
message: '已提醒!'
})
// this.$set(this.employeelist[index], 'remindStatus', true)
})
}
},
getCustomerDetail(id) {
this.$apis.customerTransform.customerDetail({ id }).then(res => {
console.log(res)
this.basicInfo = res
})
},
getStaffList(status = 0) {
const id = this.$route.params.id
this.$apis.customerTransform.staffList({ id, status }).then(res => {
console.log(res)
this.employeelist = res
})
},
getCustomerList(status = 0) {
const id = this.$route.params.id
this.$apis.customerTransform.customerDetailList({ id, status }).then(res => {
console.log(res)
this.customerlist = res
})
},
remindUserGroup() {
const id = this.$route.params.id
this.$apis.customerTransform.remindUserGroup({ id, type: 1 }).then(res => {
console.log(res)
})
} }
} }
} }
...@@ -260,5 +338,6 @@ export default { ...@@ -260,5 +338,6 @@ export default {
width: 100%; width: 100%;
background: #ffffff; background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1); box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
z-index: 1;
} }
</style> </style>
<template> <template>
<div class="send-assistant"> <div class="send-assistant">
<div class="menu-sub"> <div class="menu-sub">
<div class="menu-sub-item" :class="[activeIndex == '1' ? 'active' : '']" @click="switchMenu(1)">客户群发</div> <div
<div class="menu-sub-item" :class="[activeIndex == '2' ? 'active' : '']" @click="switchMenu(2)">客户群群发</div> class="menu-sub-item"
:class="[activeIndex == '1' ? 'active' : '']"
@click="switchMenu(1)"
>客户群发</div>
<div
class="menu-sub-item"
:class="[activeIndex == '2' ? 'active' : '']"
@click="switchMenu(2)"
>客户群群发</div>
</div> </div>
<div v-show="activeIndex == 1" class="container"> <div v-if="activeIndex == 1" class="container">
<div class="container-header"> <div class="container-header">
<div class="text">企业统一选择要发送的客户,由添加客户的成员确认后发送给客户,消息内容仅管理员和负责人可创建。</div> <div class="text">企业统一选择要发送的客户,由添加客户的成员确认后发送给客户,消息内容仅管理员和负责人可创建。</div>
<el-button type="primary" icon="el-icon-plus" @click="btnClick('create', 1)">新建群发</el-button> <el-button type="primary" icon="el-icon-plus" @click="btnClick('create', 1)">新建群发</el-button>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="gueast" :getListApi="customerList" :tableParams="gueastTableParams" :pageConf="gueastPageConf"> <GLTable
<!-- <div slot="entmicro-name" class="entmicro" slot-scope="scope"> ref="customer"
<span v-for="(i, index) in scope.scope.userList" :key="index">{{ i.name }}({{ i.tips }});</span> :getListApi="customerList"
</div> --> :tableParams="gueastTableParams"
:pageConf="gueastPageConf"
>
<div slot="entmicro-name" class="entmicro" slot-scope="scope">
<span v-for="(i, index) in scope.scope.attachmentList" :key="index">
[共{{scope.scope.attachmentList.length}}条]
<span v-show="i.attType == 1">{{i.attContent}}</span>
<span v-show="i.attType == 2 || i.attType == 3">[{{ATT_TYPE[i.attType]}}]</span>
<span v-show="i.attType == 4 || i.attType == 5">[{{ATT_TYPE[i.attType]}}]</span>
</span>
</div>
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" :disabled="scope.scope.isRemind == 1" @click="btnClick('edit', 1, scope.scope)">提醒发送</el-button> <el-button
<el-button type="text" @click="btnClick('detail', 2, scope.scope)">详情</el-button> type="text"
:disabled="scope.scope.isRemind == 0"
@click="btnClick('remind', 1, scope.scope)"
>提醒发送</el-button>
<el-button type="text" @click="btnClick('detail', 1, scope.scope)">详情</el-button>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
<div v-show="activeIndex == 2" class="container"> <div v-if="activeIndex == 2" class="container">
<div class="container-header"> <div class="container-header">
<div class="text">管理员或负责人统一创建内容,群主收到通知后,可选择他管理的客户群并群发。</div> <div class="text">管理员或负责人统一创建内容,群主收到通知后,可选择他管理的客户群并群发。</div>
<el-button type="primary" icon="el-icon-plus" @click="btnClick('create', 2)">新建群发</el-button> <el-button type="primary" icon="el-icon-plus" @click="btnClick('create', 2)">新建群发</el-button>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="gueast" :getListApi="customerGroupList" :tableParams="gueastGroupTableParams" :pageConf="gueastPageConf"> <GLTable
<!-- <div slot="entmicro-name" class="entmicro" slot-scope="scope"> ref="customerGroup"
<span v-for="(i, index) in scope.scope.userList" :key="index">{{ i.name }}({{ i.tips }});</span> :getListApi="customerGroupList"
</div> --> :tableParams="gueastGroupTableParams"
:pageConf="gueastPageConf"
>
<div slot="entmicro-name" class="entmicro" slot-scope="scope">
<span v-for="(i, index) in scope.scope.attachmentList" :key="index">
[共{{scope.scope.attachmentList.length}}条]
<span v-show="i.attType == 1">{{i.attContent}}</span>
<span v-show="i.attType == 2 || i.attType == 3">[{{ATT_TYPE[i.attType]}}]</span>
<span v-show="i.attType == 4 || i.attType == 5">[{{ATT_TYPE[i.attType]}}]</span>
</span>
</div>
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" :disabled="scope.scope.isRemind == 1" @click="btnClick('edit', 2, scope.scope)">提醒发送</el-button> <el-button
type="text"
:disabled="scope.scope.isRemind == 0"
@click="btnClick('remind', 2, scope.scope)"
>提醒发送</el-button>
<el-button type="text" @click="btnClick('detail', 2, scope.scope)">详情</el-button> <el-button type="text" @click="btnClick('detail', 2, scope.scope)">详情</el-button>
</div> </div>
</GLTable> </GLTable>
...@@ -44,7 +80,14 @@ ...@@ -44,7 +80,14 @@
export default { export default {
name: 'SendAssistant', name: 'SendAssistant',
data() { data() {
const ATT_TYPE = {
2: '图文消息',
3: '图文消息',
4: '链接',
5: '链接'
}
return { return {
ATT_TYPE,
activeIndex: '1', activeIndex: '1',
gueastTableParams: { gueastTableParams: {
listName: 'data', listName: 'data',
...@@ -64,8 +107,8 @@ export default { ...@@ -64,8 +107,8 @@ export default {
label: '群发内容', label: '群发内容',
prop: 'massName', prop: 'massName',
line: 2, line: 2,
minWidth: '100px' minWidth: '100px',
// addHtml: 'entmicro-name' addHtml: 'entmicro-name'
}, },
{ {
label: '发送时间', label: '发送时间',
...@@ -96,8 +139,7 @@ export default { ...@@ -96,8 +139,7 @@ export default {
label: '操作', label: '操作',
prop: 'optionBtns', prop: 'optionBtns',
width: '140px', width: '140px',
addHtml: 'optionBtns', addHtml: 'optionBtns'
fixed: 'right'
} }
] ]
}, },
...@@ -110,14 +152,14 @@ export default { ...@@ -110,14 +152,14 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '群发名称', label: '群发名称',
prop: 'name' prop: 'massName'
}, },
{ {
label: '群发内容', label: '群发内容',
prop: 'massName', prop: 'massName',
line: 2, line: 2,
minWidth: '100px' minWidth: '100px',
// addHtml: 'entmicro-name' addHtml: 'entmicro-name'
}, },
{ {
label: '发送时间', label: '发送时间',
...@@ -148,16 +190,31 @@ export default { ...@@ -148,16 +190,31 @@ export default {
label: '操作', label: '操作',
prop: 'optionBtns', prop: 'optionBtns',
width: '140px', width: '140px',
addHtml: 'optionBtns', addHtml: 'optionBtns'
fixed: 'right'
} }
] ]
} }
} }
}, },
watch: {
$route(val) {
console.log(val)
if (val.path == '/customerTransform/index') {
this.$refs.customer.refreshTable()
this.$refs.customerGroup.refreshTable()
}
}
},
methods: { methods: {
switchMenu(val) { switchMenu(val) {
this.activeIndex = val this.activeIndex = val
this.$nextTick(() => {
if (val == 1) {
if (this.$refs.customer) this.$refs.customer.refreshTable()
} else {
if (this.$refs.customerGroup) this.$refs.customerGroup.refreshTable()
}
})
}, },
/** /**
* name: 按钮名称 * name: 按钮名称
...@@ -175,10 +232,27 @@ export default { ...@@ -175,10 +232,27 @@ export default {
break break
case 'detail': case 'detail':
if (type == 1) { if (type == 1) {
this.$router.push('/customerTransform/detailCustomer') this.$router.push('/customerTransform/detailCustomer/' + rowData.id)
} else {
this.$router.push('/customerTransform/detaiCustomeGroup/' + rowData.id)
}
break
case 'remind':
var params = {
id: rowData.id,
type
}
// if (type == 1) {
this.$apis.customerTransform.listRemindOperate(params).then(res => {
console.log(res)
if (type == 1) {
this.$refs.customer.refreshTable()
} else { } else {
this.$router.push('/customerTransform/detaiCustomeGroup') this.$refs.customerGroup.refreshTable()
} }
})
// } else {
// }
break break
default: default:
console.log(11) console.log(11)
...@@ -190,6 +264,7 @@ export default { ...@@ -190,6 +264,7 @@ export default {
<style lang="scss" scope> <style lang="scss" scope>
.send-assistant { .send-assistant {
margin-top: 26px;
.menu-sub { .menu-sub {
.menu-sub-item { .menu-sub-item {
display: inline-block; display: inline-block;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</div> </div>
<div class="cardDetail" v-if="!isShowEditWrap"> <div class="cardDetail" v-if="!isShowEditWrap">
<p>{{ ruleForm.cardName }}</p> <p>{{ ruleForm.cardName }}</p>
<img src="@/assets/edit.png" class="editIcon" @click="isShowEditWrap = true" alt="" /> <img src="@/assets/edit.png" class="editIcon" @click="openEditWrap" alt="" />
<div> <div>
<span>售价:</span> <span>售价:</span>
<span class="price" v-if="ruleForm.price">¥{{ ruleForm.price }}</span> <span class="price" v-if="ruleForm.price">¥{{ ruleForm.price }}</span>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-button size="small" class="cancelBtn" @click="isShowEditWrap = false">取消</el-button> <el-button size="small" class="cancelBtn" @click="cancelEdit">取消</el-button>
<el-button size="small" class="saveBtn" type="primary" @click="submitRuleForm('ruleForm')">保存</el-button> <el-button size="small" class="saveBtn" type="primary" @click="submitRuleForm('ruleForm')">保存</el-button>
</div> </div>
</div> </div>
...@@ -55,10 +55,10 @@ ...@@ -55,10 +55,10 @@
<el-form-item size="small" label="会员用户"> <el-form-item size="small" label="会员用户">
<el-input :size="size" v-model="searchForm.userInfo" placeholder="请输入会员用户或手机号" clearable></el-input> <el-input :size="size" v-model="searchForm.userInfo" placeholder="请输入会员用户或手机号" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="门店" style="margin-left:-10px"> <el-form-item size="small" label="门店" style="margin-left: -10px">
<el-input :size="size" v-model="searchForm.merchantName" placeholder="请输入门店" clearable></el-input> <el-input :size="size" v-model="searchForm.merchantName" placeholder="请输入门店" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="状态" style="margin-left:-10px"> <el-form-item size="small" label="状态" style="margin-left: -10px">
<el-select size="small" v-model="searchForm.status" placeholder="请选择"> <el-select size="small" v-model="searchForm.status" placeholder="请选择">
<el-option v-for="item in memberCenterStatus" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option> <el-option v-for="item in memberCenterStatus" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select> </el-select>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</GLTable> </GLTable>
</div> </div>
<glsx-dialog title="权益详情" width="712px" :noBtnOk="true" :noCancel="true" :noClose="false" btnCancelLabel="关闭" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose"> <glsx-dialog title="权益详情" width="712px" :noBtnOk="true" :noCancel="true" :noClose="false" btnCancelLabel="关闭" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose">
<el-scrollbar> <!-- <el-scrollbar> -->
<div class="modal-body"> <div class="modal-body">
<div class="equity-name">汽车权益</div> <div class="equity-name">汽车权益</div>
<div class="equity-panel"> <div class="equity-panel">
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
</div> </div>
</div> </div>
</div> </div>
</el-scrollbar> <!-- </el-scrollbar> -->
</glsx-dialog> </glsx-dialog>
</div> </div>
</template> </template>
...@@ -173,7 +173,6 @@ export default { ...@@ -173,7 +173,6 @@ export default {
prop: 'accountName', prop: 'accountName',
width: '180', width: '180',
addHtml: 'accountName' addHtml: 'accountName'
// formatter: cellValue => { // formatter: cellValue => {
// return cellValue.startTime + '-' + cellValue.endTime // return cellValue.startTime + '-' + cellValue.endTime
// } // }
...@@ -181,7 +180,6 @@ export default { ...@@ -181,7 +180,6 @@ export default {
{ {
label: '会员类型', label: '会员类型',
prop: 'memberType', prop: 'memberType',
line: 1,
formatter: cellValue => { formatter: cellValue => {
return this.baseDataList.memberTypeList.find(item => item.confId == cellValue.memberType).confName return this.baseDataList.memberTypeList.find(item => item.confId == cellValue.memberType).confName
} }
...@@ -193,18 +191,17 @@ export default { ...@@ -193,18 +191,17 @@ export default {
{ {
label: '开通方式', label: '开通方式',
prop: 'activeTypeDesc', prop: 'activeTypeDesc',
line: 1
}, },
{ {
label: '开通日期', label: '开通日期',
prop: 'activeTime', prop: 'activeTime',
line: 1
// addHtml: 'activeTime' // addHtml: 'activeTime'
}, },
{ {
label: '状态', label: '状态',
prop: 'status', prop: 'status',
width: '80',
formatter: cellValue => { formatter: cellValue => {
return this.baseDataList.statusList.find(item => item.confId == cellValue.status).confName return this.baseDataList.statusList.find(item => item.confId == cellValue.status).confName
} }
...@@ -225,6 +222,7 @@ export default { ...@@ -225,6 +222,7 @@ export default {
marketPrice: '', marketPrice: '',
linkUrl: '' linkUrl: ''
}, },
copyRuleForm: {},
rules: { rules: {
cardName: [ cardName: [
{ required: true, message: '请输入会员卡名称', trigger: 'blur' }, { required: true, message: '请输入会员卡名称', trigger: 'blur' },
...@@ -283,13 +281,23 @@ export default { ...@@ -283,13 +281,23 @@ export default {
}, },
getCardContentFun() { getCardContentFun() {
getCardContent({ merchantId: this.merchantId }).then(res => { getCardContent({ merchantId: this.merchantId }).then(res => {
this.ruleForm.equityId = res[0].id
this.ruleForm.cardName = res[0].cardClassName this.ruleForm.cardName = res[0].cardClassName
this.ruleForm.price = res[0].price this.ruleForm.price = res[0].price
this.ruleForm.marketPrice = res[0].marketPrice this.ruleForm.marketPrice = res[0].marketPrice
this.ruleForm.linkUrl = res[0].url this.ruleForm.linkUrl = res[0].url
this.ruleForm.equityId = res[0].id
}) })
}, },
openEditWrap() {
this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm))
this.isShowEditWrap = true
},
//点击取消编辑按钮
cancelEdit() {
this.ruleForm = this.copyRuleForm
this.isShowEditWrap = false
},
submitRuleForm(formName) { submitRuleForm(formName) {
this.$refs[formName].validate(valid => { this.$refs[formName].validate(valid => {
if (!valid) { if (!valid) {
...@@ -373,7 +381,7 @@ export default { ...@@ -373,7 +381,7 @@ export default {
font-size: 17px; font-size: 17px;
color: #8e5310; color: #8e5310;
font-weight: 700; font-weight: 700;
top: 50px; top: 54px;
left: 95px; left: 95px;
} }
} }
...@@ -434,7 +442,7 @@ export default { ...@@ -434,7 +442,7 @@ export default {
.pageTitle { .pageTitle {
position: relative; position: relative;
padding: 0 0px; padding: 0 40px;
height: 20px; height: 20px;
font-size: 20px; font-size: 20px;
font-weight: 700; font-weight: 700;
...@@ -448,13 +456,12 @@ export default { ...@@ -448,13 +456,12 @@ export default {
.el-range-editor.is-active, .el-range-editor.is-active,
.el-range-editor.is-active:hover { .el-range-editor.is-active:hover {
border-color: #5850ff; border-color: #5850ff;
width: 215px; width: 215px;
} }
.el-range-editor--small.el-input__inner { .el-range-editor--small.el-input__inner {
width: 215px; width: 215px;
} }
/deep/.el-input--small .el-input__inner{ /deep/.el-input--small .el-input__inner {
width: 215px; width: 215px;
} }
/deep/ .el-dialog__header .el-dialog__title { /deep/ .el-dialog__header .el-dialog__title {
...@@ -529,6 +536,7 @@ export default { ...@@ -529,6 +536,7 @@ export default {
} }
} }
/deep/ .el-dialog__footer { /deep/ .el-dialog__footer {
padding: 20px;
text-align: center; text-align: center;
} }
</style> </style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="live-room"> <div class="live-room">
<div class="live-room container"> <div class="live-room container">
<div class="flex"> <div class="flex">
<el-form :inline="true" style="width:100%" :model="searchForm" label-width="70px" label-position="left"> <el-form :inline="true" style="width:100%" :model="searchForm" label-width="70px" label-position="right">
<el-row> <el-row>
<el-form-item size="small" label="订单编号"> <el-form-item size="small" label="订单编号">
<el-input :size="size" v-model="searchForm.orderCode" placeholder="请输入订单编号" clearable></el-input> <el-input :size="size" v-model="searchForm.orderCode" placeholder="请输入订单编号" clearable></el-input>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<el-form-item size="small" label="名称" style="margin-left:20px"> <el-form-item size="small" label="名称" style="margin-left:20px">
<el-input :size="size" v-model="searchForm.packageName" placeholder="请输入名称" clearable></el-input> <el-input :size="size" v-model="searchForm.packageName" placeholder="请输入名称" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="类型" style="margin-left:-10px"> <el-form-item size="small" label="类型" style="margin-left:-10px;">
<el-select size="small" v-model="searchForm.orderType" placeholder="请选择"> <el-select size="small" v-model="searchForm.orderType" placeholder="请选择">
<el-option v-for="item in orderTypeList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option> <el-option v-for="item in orderTypeList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select> </el-select>
...@@ -32,8 +32,11 @@ ...@@ -32,8 +32,11 @@
</el-form> </el-form>
</div> </div>
<GLTable ref="memberOrderRef" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="memberOrderRef" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<!-- <span slot="shareImgUrl" slot-scope="scope">
<img class="img-60" :src="scope.scope.shareImgUrl" />
</span> -->
<span class="table-btns" slot="auth-button" slot-scope="scope" :data="scope.scope"> <span class="table-btns" slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="handleDetail(scope.scope)">详情</el-button> <el-button type="text" @click="handleDetail(scope.scope)" v-if="scope.scope.orderType==1">详情</el-button>
</span> </span>
</GLTable> </GLTable>
</div> </div>
...@@ -83,7 +86,7 @@ export default { ...@@ -83,7 +86,7 @@ export default {
{ {
label: '名称', label: '名称',
prop: 'packageName', prop: 'packageName',
width: '180' width: '180',
// formatter: cellValue => { // formatter: cellValue => {
// return cellValue.startTime + '-' + cellValue.endTime // return cellValue.startTime + '-' + cellValue.endTime
// } // }
...@@ -102,7 +105,7 @@ export default { ...@@ -102,7 +105,7 @@ export default {
{ {
label: '实收金额', label: '实收金额',
prop: 'realPayPrice', prop: 'realPayPrice',
line: 1
}, },
{ {
label: '订单状态', label: '订单状态',
...@@ -120,12 +123,10 @@ export default { ...@@ -120,12 +123,10 @@ export default {
{ {
label: '用户信息', label: '用户信息',
prop: 'accountName', prop: 'accountName',
line: 1
}, },
{ {
label: '订单号', label: '订单号',
prop: 'orderCode', prop: 'orderCode'
} }
] ]
}, },
......
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
<div class="topMsg"> <div class="topMsg">
<div class="orderNo">订单编号:{{ detail.orderCode }}</div> <div class="orderNo">订单编号:{{ detail.orderCode }}</div>
<div class="orderTime">下单时间:{{ detail.createDate }}</div> <div class="orderTime">下单时间:{{ detail.createDate }}</div>
<el-button type="primary" size="small" class="backBtn" @click="goBack">返回</el-button> <el-button type="primary" size="small" class="backBtn" @click="goBack">
返回
</el-button>
</div> </div>
<div class="midMsgWrap"> <div class="midMsgWrap">
<div class="midMsgTitle"> <div class="midMsgTitle">
...@@ -16,7 +18,7 @@ ...@@ -16,7 +18,7 @@
<div class="midMsgContent"> <div class="midMsgContent">
<div class="item"> <div class="item">
<div>付款状态:已付款</div> <div>付款状态:已付款</div>
<div>付款金额:{{ detail.realPayPrice }}元</div> <div>付款金额:{{ detail.realPayPrice }}<span v-show="detail.realPayPrice">元</span></div>
<div>付款方式:微信支付</div> <div>付款方式:微信支付</div>
<div>付款时间:{{ detail.createDate }}</div> <div>付款时间:{{ detail.createDate }}</div>
</div> </div>
...@@ -37,6 +39,7 @@ ...@@ -37,6 +39,7 @@
</div> </div>
</div> </div>
<div id="tableWrap"> <div id="tableWrap">
<div class="tableWrapBox">
<el-table :data="tableData" style="width: 100%" :header-cell-style="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }"> <el-table :data="tableData" style="width: 100%" :header-cell-style="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<el-table-column label="商品名称" align="center"> <el-table-column label="商品名称" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -59,7 +62,7 @@ ...@@ -59,7 +62,7 @@
<el-table-column prop="totalPrice" label="小计/元" align="center"></el-table-column> <el-table-column prop="totalPrice" label="小计/元" align="center"></el-table-column>
<el-table-column prop="realPayPrice" label="实收金额" align="center"> <el-table-column prop="realPayPrice" label="实收金额" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="color: #eb4e4e">{{ scope.row.realPayPrice }}</span> <span style="color:#EB4E4E">{{ scope.row.realPayPrice }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="orderStatus" label="状态" align="center"> <el-table-column prop="orderStatus" label="状态" align="center">
...@@ -69,6 +72,8 @@ ...@@ -69,6 +72,8 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -79,8 +84,8 @@ export default { ...@@ -79,8 +84,8 @@ export default {
data() { data() {
return { return {
tableData: [{}], tableData: [{}],
detail: {}, //this.$route.query.detail, detail: {},//this.$route.query.detail,
mylist: [] mylist:[]
} }
}, },
created() { created() {
...@@ -95,11 +100,11 @@ export default { ...@@ -95,11 +100,11 @@ export default {
}) })
}, },
methods: { methods: {
getOrderPageDetail() { getOrderPageDetail(){
getOrderPageDetail({ id: this.$route.query.id }).then(res => { getOrderPageDetail({id:this.$route.query.id}).then(res=>{
// this.mylist=res.list // this.mylist=res.list
if (res.code == '0') { if(res.code=='0'){
this.detail = res.data this.detail=res.data
this.$set(this.tableData[0], 'couponList', this.detail.couponList) this.$set(this.tableData[0], 'couponList', this.detail.couponList)
this.$set(this.tableData[0], 'orderType', this.detail.orderType) this.$set(this.tableData[0], 'orderType', this.detail.orderType)
this.$set(this.tableData[0], 'effectiveNum', this.detail.effectiveNum) this.$set(this.tableData[0], 'effectiveNum', this.detail.effectiveNum)
...@@ -108,9 +113,11 @@ export default { ...@@ -108,9 +113,11 @@ export default {
this.$set(this.tableData[0], 'totalPrice', this.detail.originalPrice) this.$set(this.tableData[0], 'totalPrice', this.detail.originalPrice)
this.$set(this.tableData[0], 'realPayPrice', this.detail.realPayPrice) this.$set(this.tableData[0], 'realPayPrice', this.detail.realPayPrice)
this.$set(this.tableData[0], 'orderStatus', this.detail.orderStatus) this.$set(this.tableData[0], 'orderStatus', this.detail.orderStatus)
} else { }else{
this.$message.error(`${res.message}`) this.$message.error(`${res.message}`)
} }
}) })
}, },
...@@ -135,8 +142,9 @@ export default { ...@@ -135,8 +142,9 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.container { .container {
padding-top: 0px; padding: 0 0 20px;
.topMsg { .topMsg {
margin-right: 20px;
display: flex; display: flex;
height: 56px; height: 56px;
align-items: center; align-items: center;
...@@ -162,6 +170,7 @@ export default { ...@@ -162,6 +170,7 @@ export default {
} }
} }
.midMsgWrap { .midMsgWrap {
border-bottom: 1px solid#DCDFE6; border-bottom: 1px solid#DCDFE6;
margin-bottom: 30px; margin-bottom: 30px;
.midMsgTitle { .midMsgTitle {
...@@ -196,5 +205,10 @@ export default { ...@@ -196,5 +205,10 @@ export default {
} }
} }
} }
.tableWrapBox{
margin-left: 30px;
margin-right: 30px;
border: 1px solid rgba(0, 0, 0, 0.06);
}
} }
</style> </style>
...@@ -7,16 +7,16 @@ ...@@ -7,16 +7,16 @@
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新增直播</el-button> <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新增直播</el-button>
</el-form-item> </el-form-item>
</el-form> --> </el-form> -->
<el-form :inline="true" style="width:100%" :model="searchForm" label-width="85px" label-position="right"> <el-form :inline="true" style="width: 100%" :model="searchForm" label-width="85px" label-position="right">
<el-row> <el-row>
<!-- <el-col :span="6"></el-col> --> <!-- <el-col :span="6"></el-col> -->
<el-form-item size="small" label="服务名称"> <el-form-item size="small" label="服务名称">
<el-input :size="size" v-model="searchForm.couponName" placeholder="请输入服务名称" clearable></el-input> <el-input :size="size" v-model="searchForm.couponName" placeholder="请输入服务名称" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="核销用户" style="margin-left:-10px"> <el-form-item size="small" label="核销用户">
<el-input :size="size" v-model="searchForm.userReq" placeholder="请输入核销用户" clearable></el-input> <el-input :size="size" v-model="searchForm.userReq" placeholder="请输入核销用户" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="核销员"> <el-form-item size="small" label="核销员" style="margin-left: -10px">
<el-input :size="size" v-model="searchForm.verificationOperator" placeholder="请输入核销员" clearable></el-input> <el-input :size="size" v-model="searchForm.verificationOperator" placeholder="请输入核销员" clearable></el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<el-date-picker :size="size" v-model="searchForm.daterange" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions || {}"></el-date-picker> <el-date-picker :size="size" v-model="searchForm.daterange" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions || {}"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item size="small" style="float:right"> <el-form-item size="small" style="float: right">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" @click="handleReset">重置</el-button> <el-button :size="size" @click="handleReset">重置</el-button>
</el-form-item> </el-form-item>
...@@ -91,12 +91,14 @@ export default { ...@@ -91,12 +91,14 @@ export default {
{ {
label: '剩余待核销次数', label: '剩余待核销次数',
prop: 'residueAmount', prop: 'residueAmount',
line: 1 formatter: cellValue => {
return cellValue.residueAmount || cellValue.residueAmount == 0 ? cellValue.residueAmount : '不限制次数'
}
}, },
{ {
label: '核销用户', label: '核销用户',
prop: 'userName', prop: 'userName',
line: 1
}, },
{ {
label: '核销员', label: '核销员',
...@@ -105,27 +107,16 @@ export default { ...@@ -105,27 +107,16 @@ export default {
{ {
label: '关联订单号', label: '关联订单号',
prop: 'orderCode', prop: 'orderCode',
line: 1
}, },
{ {
label: '核销日期', label: '核销日期',
prop: 'verificationTime', prop: 'verificationTime',
line: 1,
addHtml: 'verificationTime' addHtml: 'verificationTime'
} }
// {
// label: '直播状态',
// prop: 'liveStatus',
// width: '80'
// // formatter: cellValue => {
// // return this.baseDataList.liveStatusList.find(item => item.confId == cellValue.liveStatus).confName
// // }
// }
] ]
} }
// baseDataList: {
// liveStatusList: liveStatusList
// }
} }
}, },
methods: { methods: {
...@@ -203,7 +194,7 @@ export default { ...@@ -203,7 +194,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.el-input--small .el-input__inner{ /deep/.el-input--small .el-input__inner {
width: 215px; width: 215px;
} }
.el-range-editor.is-active, .el-range-editor.is-active,
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- //提示面板组件 --> <!-- //提示面板组件 -->
<tip-panel panelWidth="616px" panelMinHeight="60px" :panelContent="panelContent" v-if="isFirstShow" @closePanel="closePanel"></tip-panel> <tip-panel panelWidth="616px" panelMinHeight="60px" :panelContent="panelContent" v-if="isFirstShow" @closePanel="closePanel"></tip-panel>
<div class="live-room container"> <div class="live-room container">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="100px" label-position="right"> <el-form :inline="true" style="width:100%" :model="searchForm" label-width="100px" label-position="right">
<el-row> <el-row>
<el-form-item size="small"> <el-form-item size="small">
<el-button :size="size" type="primary" icon="el-icon-plus" @click="handleCreate">创建服务</el-button> <el-button :size="size" type="primary" icon="el-icon-plus" @click="handleCreate">创建服务</el-button>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<el-input :size="size" v-model="searchForm.couponName" placeholder="请输入服务名称" clearable></el-input> <el-input :size="size" v-model="searchForm.couponName" placeholder="请输入服务名称" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" style="float: right"> <el-form-item size="small" style="float:right">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" @click="handleReset">重置</el-button> <el-button :size="size" @click="handleReset">重置</el-button>
</el-form-item> </el-form-item>
...@@ -47,7 +47,8 @@ ...@@ -47,7 +47,8 @@
</template> </template>
<script> <script>
import { getServiceListApi, effectiveService, deleteService, getLoginCount } from '@/api/modules/service' import { getServiceListApi, effectiveService, deleteService,getLoginCount } from '@/api/modules/service'
import { serviceStatusList } from '@/common/constant' import { serviceStatusList } from '@/common/constant'
import tipPanel from '@/components/tipPanel/index.vue' import tipPanel from '@/components/tipPanel/index.vue'
export default { export default {
...@@ -98,11 +99,12 @@ export default { ...@@ -98,11 +99,12 @@ export default {
label: '剩余库存', label: '剩余库存',
prop: 'residueAmount', prop: 'residueAmount',
line: 1 line: 1
// addHtml: 'activeTime'
}, },
{ {
label: '状态', label: '状态',
prop: 'status', prop: 'status',
width: '80', // width: '80',
formatter: cellValue => { formatter: cellValue => {
return this.baseDataList.serviceStatusList.find(item => item.confId == cellValue.status).confName return this.baseDataList.serviceStatusList.find(item => item.confId == cellValue.status).confName
} }
...@@ -110,7 +112,7 @@ export default { ...@@ -110,7 +112,7 @@ export default {
{ {
label: '创建时间', label: '创建时间',
prop: 'createdDate', prop: 'createdDate',
width: 95 width:95
} }
] ]
}, },
...@@ -255,6 +257,7 @@ export default { ...@@ -255,6 +257,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.el-input--small .el-input__inner{ /deep/.el-input--small .el-input__inner{
width: 215px; width: 215px;
} }
......
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
</span> </span>
</GLTable> </GLTable>
</div> </div>
<glsx-dialog title="示例效果" width="1142px" :noBtnOk="true" :noCancel="true" :noClose="false" btnCancelLabel="关闭" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose"> <!-- btnCancelLabel="关闭" -->
<glsx-dialog title="示例效果" width="1142px" :hasScroll="false" :noBtnOk="true" :noCancel="true" :noClose="false" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose">
<div class="content-body"> <div class="content-body">
<div class="content-item col1"> <div class="content-item col1">
<div class="subTitle"> <div class="subTitle">
...@@ -54,6 +55,7 @@ ...@@ -54,6 +55,7 @@
import glsxDialog from '@/components/glsx-dialog' import glsxDialog from '@/components/glsx-dialog'
import { getSetMealListApi, deleteSetMeal, upDownPackage } from '@/api/modules/setmeal' import { getSetMealListApi, deleteSetMeal, upDownPackage } from '@/api/modules/setmeal'
import { getLoginCount } from '@/api/modules/service' import { getLoginCount } from '@/api/modules/service'
import { stateList } from '@/common/constant' import { stateList } from '@/common/constant'
import tipPanel from '@/components/tipPanel/index.vue' import tipPanel from '@/components/tipPanel/index.vue'
export default { export default {
...@@ -220,11 +222,14 @@ export default { ...@@ -220,11 +222,14 @@ export default {
margin-bottom: 20px; margin-bottom: 20px;
} }
/deep/ .el-dialog__header .el-dialog__title { /deep/ .el-dialog__header {
.main-title{
font-size: 16px; font-size: 16px;
font-weight: 700; font-weight: 700;
color: #000000; color: #000000;
}
} }
/deep/ .el-dialog__body { /deep/ .el-dialog__body {
border-top: 1px solid #e6e6e6; border-top: 1px solid #e6e6e6;
...@@ -232,6 +237,7 @@ export default { ...@@ -232,6 +237,7 @@ export default {
padding: 20px 25px; padding: 20px 25px;
.content-body { .content-body {
display: flex; display: flex;
.col2 { .col2 {
margin-left: 40px; margin-left: 40px;
} }
...@@ -243,10 +249,21 @@ export default { ...@@ -243,10 +249,21 @@ export default {
font-weight: 700; font-weight: 700;
color: #000000; color: #000000;
} }
.imageWrap,.twoImageWrap{
margin-left: 25px;
img{
border: 1.5px solid rgba(0, 0, 0, 0.03);
box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.03);
}
img+img{
margin-left: 22px;
}
}
} }
} }
} }
/deep/ .el-dialog__footer { /deep/ .el-dialog__footer {
text-align: center; text-align: center;
padding: 20px;
} }
</style> </style>
...@@ -18,9 +18,7 @@ ...@@ -18,9 +18,7 @@
<img src="@/assets/closeIcon.png" @click="closeChoseItemFun(item, index)" alt="" /> <img src="@/assets/closeIcon.png" @click="closeChoseItemFun(item, index)" alt="" />
</div> </div>
</div> </div>
<div class="el-form-item__error" v-if="setmealContentRules"> <div class="el-form-item__error" v-if="setmealContentRules">请选择套餐</div>
请选择套餐
</div>
<div class="totalWrap" v-if="this.choseItemList.length > 0"> <div class="totalWrap" v-if="this.choseItemList.length > 0">
<span>合计:</span> <span>合计:</span>
<span>{{ totalPrice }}元</span> <span>{{ totalPrice }}元</span>
...@@ -32,6 +30,7 @@ ...@@ -32,6 +30,7 @@
<template slot="append">元</template> <template slot="append">元</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="说明" prop="notes" style="width: 670px"> <el-form-item size="small" label="说明" prop="notes" style="width: 670px">
<el-input size="small" :rows="6" type="textarea" v-model="ruleForm.notes" placeholder="请输入" maxlength="200" show-word-limit></el-input> <el-input size="small" :rows="6" type="textarea" v-model="ruleForm.notes" placeholder="请输入" maxlength="200" show-word-limit></el-input>
</el-form-item> </el-form-item>
...@@ -45,9 +44,9 @@ ...@@ -45,9 +44,9 @@
}" }"
> >
<el-button type="primary" @click="submitForm('ruleForm')" size="small">创建</el-button> <el-button type="primary" @click="submitForm('ruleForm')" size="small">创建</el-button>
<el-button type="primary" @click="resetForm('ruleForm')" size="small">取消</el-button> <el-button type="primary" @click="goBack" size="small">取消</el-button>
</div> </div>
<glsx-dialog title="套餐服务" width="1142px" btnCancelLabel="关闭" btnSize="small" :isVisible="setmealDialogVisible" @closeDialog="handleClose" @confirmDialog="handleConfirm"> <glsx-dialog title="套餐服务" class="setmealServiceDialog" width="1142px" :noCancel="true" :noClose="false" btnSize="small" :isVisible="setmealDialogVisible" @closeDialog="handleClose" @confirmDialog="handleConfirm">
<div class="content-body"> <div class="content-body">
<div class="subTitle"> <div class="subTitle">
<span>请选择套餐服务:</span> <span>请选择套餐服务:</span>
...@@ -90,12 +89,15 @@ ...@@ -90,12 +89,15 @@
<span class="redText">{{ selectNum }}</span> <span class="redText">{{ selectNum }}</span>
项 项
</span> </span>
<span class="bottomText" style="margin-left:20px">合计:</span> <span class="bottomText" style="margin-left: 20px">合计:</span>
<span class="smallRedText">¥</span> <span class="smallRedText">¥</span>
<span class="redText">{{ totalPrice }}</span> <span class="redText">{{ totalPrice }}</span>
</div> </div>
</div> </div>
</glsx-dialog> </glsx-dialog>
<glsx-dialog title="" class="tipDialog" width="547px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isTipDialogVisible" :showClose="false" @closeDialog="handleTipClose" @confirmDialog="handleTipConfirm">
<div class="content-body">当前有内容信息未保存,是否继续返回</div>
</glsx-dialog>
</div> </div>
</template> </template>
...@@ -114,23 +116,29 @@ export default { ...@@ -114,23 +116,29 @@ export default {
packagePrice: '', packagePrice: '',
notes: '' notes: ''
}, },
copyRuleForm: {}, //用于检查页面信息是否改动
rules: { rules: {
packageName: [{ required: true, message: '请输入套餐名称', trigger: 'blur' }], packageName: [{ required: true, message: '请输入套餐名称', trigger: 'blur' }],
packagePrice: [{ required: true, message: '请输入售价', trigger: 'blur' }] packagePrice: [{ required: true, message: '请输入售价', trigger: 'blur' }]
}, },
allItemList: [], allItemList: [],
choseItemList: [], //['一年12次洗车劵×1', '车身打蜡×2', '全车镀膜×1'], choseItemList: [], //['一年12次洗车劵×1', '车身打蜡×2', '全车镀膜×1'],
copyChoseItemList: [], //用于检查页面信息是否改动
merchantId: 44184606, merchantId: 44184606,
merchantName: '', merchantName: '',
setmealContentRules: false, setmealContentRules: false,
//弹窗 //弹窗
setmealDialogVisible: false, setmealDialogVisible: false,
//弹窗2(提示弹窗)
isTipDialogVisible: false,
selectNum: 0, selectNum: 0,
totalPrice: 0, totalPrice: 0,
copyTotalPrice: 0, //用于检查页面信息是否改动
id: this.$route.query.id || 0 id: this.$route.query.id || 0
} }
}, },
created() { created() {
this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm)) //深拷贝一份数据
if (window.__POWERED_BY_QIANKUN__) { if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中 //运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId this.merchantId = this.$globalState.session.merchantId
...@@ -182,6 +190,9 @@ export default { ...@@ -182,6 +190,9 @@ export default {
this.ruleForm = res.data this.ruleForm = res.data
this.choseItemList = res.data.list || [] this.choseItemList = res.data.list || []
this.totalPrice = res.data.referencePrice this.totalPrice = res.data.referencePrice
this.copyTotalPrice = this.totalPrice
this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm)) //深拷贝一份数据
this.copyChoseItemList = this.choseItemList
} }
}) })
}, },
...@@ -316,12 +327,17 @@ export default { ...@@ -316,12 +327,17 @@ export default {
console.log('配置接口', res.data) console.log('配置接口', res.data)
}) })
}, },
resetForm(formName) { // resetForm(formName) {
// this.$refs[formName].resetFields()
this.$router.go(-1) // this.$router.go(-1)
}, // },
goBack() { goBack() {
// this.$router.go(-1)
if (JSON.stringify(this.ruleForm) == JSON.stringify(this.copyRuleForm) && this.choseItemList.length == this.copyChoseItemList.length && this.totalPrice == this.copyTotalPrice) {
this.$router.go(-1) this.$router.go(-1)
} else {
this.isTipDialogVisible = true
}
}, },
oninput(value) { oninput(value) {
let str = value let str = value
...@@ -339,8 +355,8 @@ export default { ...@@ -339,8 +355,8 @@ export default {
if (len1 == '-') { if (len1 == '-') {
str = '' str = ''
} //限制只能输入一个小数点 } //限制只能输入一个小数点
if(Number(value)>=99999){ if (Number(value) >= 99999) {
return str=99999 return (str = 99999)
} }
if (str.indexOf('.') != -1) { if (str.indexOf('.') != -1) {
let str_ = str.substr(str.indexOf('.') + 1) let str_ = str.substr(str.indexOf('.') + 1)
...@@ -382,6 +398,12 @@ export default { ...@@ -382,6 +398,12 @@ export default {
// return preValue + choseItem.vipPrice * choseItem.serviceQuantity // return preValue + choseItem.vipPrice * choseItem.serviceQuantity
// }, 0) // }, 0)
this.getSetmealServiceFun() this.getSetmealServiceFun()
},
handleTipClose() {
this.isTipDialogVisible = false
},
handleTipConfirm() {
this.$router.go(-1)
} }
} }
} }
...@@ -455,6 +477,8 @@ export default { ...@@ -455,6 +477,8 @@ export default {
} }
} }
.totalWrap { .totalWrap {
margin-top: 5px;
margin-bottom: -5px;
span { span {
font-size: 14px; font-size: 14px;
...@@ -483,8 +507,10 @@ export default { ...@@ -483,8 +507,10 @@ export default {
width: 25px; width: 25px;
height: 25px; height: 25px;
border-radius: 50%; border-radius: 50%;
.el-dialog__close { .el-dialog__close {
color: #5850ff; color: #5850ff;
font-weight: bold;
} }
} }
/deep/ .el-dialog__header .el-dialog__title { /deep/ .el-dialog__header .el-dialog__title {
...@@ -496,10 +522,11 @@ export default { ...@@ -496,10 +522,11 @@ export default {
/deep/ .el-dialog__body { /deep/ .el-dialog__body {
border-top: 1px solid #e6e6e6; border-top: 1px solid #e6e6e6;
border-bottom: 1px solid #e6e6e6; border-bottom: 1px solid #e6e6e6;
padding: 20px 25px; padding: 0px 25px;
.content-body { .content-body {
max-height: 400px; max-height: 446px;
.subTitle { .subTitle {
margin-top: 20px;
margin-bottom: 20px; margin-bottom: 20px;
span:first-child { span:first-child {
font-size: 16px; font-size: 16px;
...@@ -585,6 +612,8 @@ export default { ...@@ -585,6 +612,8 @@ export default {
} }
} }
.amountTo { .amountTo {
margin-top: 17px;
margin-bottom: 28px;
text-align: center; text-align: center;
.bottomText { .bottomText {
font-size: 16px; font-size: 16px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!