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