Commit e3e85c93 by 前端

Merge branch 'v3.6.0' into 'master'

合并V3.6.0

See merge request !474
2 parents 48dd1ef4 0cfa2d8d
......@@ -10914,9 +10914,9 @@
"dev": true
},
"qs": {
"version": "6.11.0",
"resolved": "https://registry.npmmirror.com/qs/-/qs-6.11.0.tgz",
"integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
"version": "6.11.1",
"resolved": "https://registry.npmmirror.com/qs/-/qs-6.11.1.tgz",
"integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==",
"requires": {
"side-channel": "^1.0.4"
}
......@@ -14466,9 +14466,9 @@
}
},
"word-edit": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/word-edit/-/word-edit-1.0.5.tgz",
"integrity": "sha512-YjZPBFkIw0bU5PaqdH3Ein1gH8T6qhaae6VM7HiIFPiCjXIFphxqAlbi+oddn4ZtePcfC9NtMkCHJAotiAt6jw==",
"version": "1.2.5",
"resolved": "https://registry.npmmirror.com/word-edit/-/word-edit-1.2.5.tgz",
"integrity": "sha512-T9g5xsp90jS5Ejq+LSTEkVDdJRnBcdR32qrzBduc+6uLiJLg9nY0y7Mrnh0zYw5jQFzbJPwz1rIwYOpzY40K7g==",
"requires": {
"@amap/amap-jsapi-loader": "^1.0.1",
"core-js": "^3.6.5",
......
......@@ -12,7 +12,6 @@
"dayjs": "^1.10.7",
"el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5",
"glsx-common": "^1.4.6",
"glsx-components": "^1.5.3",
"glsx-components_beta": "^1.0.4",
"lodash": "^4.17.21",
......@@ -23,7 +22,7 @@
"vuedraggable": "^2.24.3",
"vuex": "^3.1.2",
"wangeditor": "^4.7.12",
"word-edit": "^1.0.5"
"word-edit": "^1.2.5"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0",
......@@ -37,6 +36,7 @@
"eslint": "^5.16.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-vue": "^5.0.0",
"glsx-common": "^1.4.9",
"node-sass": "^4.12.0",
"prettier": "^1.19.1",
"sass-loader": "^8.0.0",
......
import { http, http_common, http2, http_merchant } from '@/main'
import {http, http_common, http2, http_merchant,http_upload} from '@/main'
const defaultPath = 'scrm.api.carlife.'
const getMerchantGoodsListApi = params => {
params.method = 'scrm.api.shopmall.goods.page.curMerchant'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
params.method = 'scrm.api.shopmall.goods.page.curMerchant'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
const getGoodsListApi = params => {
// scrm.api.shopmall.goods.getGoodsList
params.method = 'scrm.api.shopmall.goods.getGoodsList'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
// scrm.api.shopmall.goods.getGoodsList
params.method = 'scrm.api.shopmall.goods.getGoodsList'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
const uploadImgApi = params => {
params.method = `${defaultPath}common.uploadImg`
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
params.method = `${defaultPath}common.uploadImg`
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
const uploadMusicApi = params => {
params.method = 'scrm.api.carlife.common.uploadMusic'
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
params.method = 'scrm.api.carlife.common.uploadMusic'
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
const uploadVideoApi = params => {
params.method = `${defaultPath}common.uploadVideo`
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
params.method = `${defaultPath}common.uploadVideo`
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
const uploadFundingVideoApi = params => {
params.method = 'scrm.api.carlife.crowd.funding.uploadVideo'
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
params.method = 'scrm.api.carlife.crowd.funding.uploadVideo'
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
const getMerchantList = params => {
params.method = `${defaultPath}merchant.listWithPageByCurMerchant`
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true
})
params.method = `${defaultPath}merchant.listWithPageByCurMerchant`
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true
})
}
const getSimpleMerchantList = params => {
params.method = 'scrm.api.carlife.merchant.listWithPageSimpleByCurMerchant'
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true
})
params.method = 'scrm.api.carlife.merchant.listWithPageSimpleByCurMerchant'
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true
})
}
const getZoneListApi = params => {
params.method = 'scrm.api.shopmall.zoneInfo.listCurMerchantId'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
params.method = 'scrm.api.shopmall.zoneInfo.listCurMerchantId'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
const getClassifyListApi = params => {
params.method = 'scrm.api.shopmall.classify.list.curMerchant'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
params.method = 'scrm.api.shopmall.classify.list.curMerchant'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
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']
})
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']
})
}
const compressPicture = params => {
return http_upload({
url: '/rpc-scrm-entmicro-container/picture/compression/upload',
method: 'POST',
data: params,
sign: false,
noSignAttr: ['file']
})
}
const compressVideo = params => {
// params.method = '/video/compression/upload'
// params.sessionId = session
// let paramsVideo = JSON.(params)
return http_upload({
url: '/rpc-scrm-entmicro-container/video/compression/upload',
method: 'POST',
data: params,
sign: false,
noSignAttr: ['file']
})
}
const querylabeltree = params => {
params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
// params.sessionId = session
return http2({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
// params.sessionId = session
return http2({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
// 人群列表
const getCrowdTreeListApi = params => {
params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http2({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http2({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
// 跟进员工类型
const getStaffFollowerListApi = params => {
params.method = 'entmicro.api.staff.listEntFollowerType'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
params.method = 'entmicro.api.staff.listEntFollowerType'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取商户信息
const getMerchantInfoApi = params => {
params.method = 'merchants.api.merchant.findMerchantBaseInfo'
return http_merchant({
url: '/rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
params.method = 'merchants.api.merchant.findMerchantBaseInfo'
return http_merchant({
url: '/rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
// 根据商户号最上级工厂商户号
const getSuperMerchantApi = params => {
params.method = 'merchants.api.open.findSuperlativeMerchant'
return http_merchant({
url: '/rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
params.method = 'merchants.api.open.findSuperlativeMerchant'
return http_merchant({
url: '/rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
/**众筹活动订单配置开关(SAAS)【控制众筹订单列表部分字段0:展示;1:隐藏;】 */
const getCrowdfundingOrderConfig = (params = {}) => {
params.method = 'scrm.api.shopmall.crowd.funding.order.config'
params.requestType = 0 //0:门店;1:运营版
return http({
url: '/rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
params.method = 'scrm.api.shopmall.crowd.funding.order.config'
params.requestType = 0 //0:门店;1:运营版
return http({
url: '/rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getMerchantGoodsListApi,
getGoodsListApi,
uploadImgApi,
uploadMusicApi,
uploadVideoApi,
uploadFundingVideoApi,
getMerchantList,
getSimpleMerchantList,
getZoneListApi,
getClassifyListApi,
pictureUpload,
querylabeltree,
getCrowdTreeListApi,
getStaffFollowerListApi,
getMerchantInfoApi,
getSuperMerchantApi,
getCrowdfundingOrderConfig,
compressPicture,
compressVideo
}
export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadMusicApi, uploadVideoApi, uploadFundingVideoApi, getMerchantList, getSimpleMerchantList, getZoneListApi, getClassifyListApi, pictureUpload, querylabeltree, getCrowdTreeListApi, getStaffFollowerListApi, getMerchantInfoApi, getSuperMerchantApi, getCrowdfundingOrderConfig }
......@@ -61,6 +61,12 @@ import { utils } from 'glsx-common'
import util from '@/utils/util'
export default {
name: 'activityModel',
props:{
labelTypesStr:{
type:String,
default:'自店标签,企业标签,系统标签'
}
},
data() {
return {
loading: false,
......@@ -107,7 +113,7 @@ export default {
pageSize: 1000,
shopId: this.$globalState.session.merchantId,
labelGroupName: this.labelGroupName,
labelTypesStr: '自店标签,企业标签,系统标签',
labelTypesStr: this.labelTypesStr,
edition: this.$globalState.session.merchantModel
}
})
......
......@@ -23,6 +23,7 @@ Vue.prototype.defaultLabelWidth = '154px'
start()
export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params)
export const http_upload = params => Vue.prototype.$http_upload(params)
export const http2 = params => Vue.prototype.$http2(params)
export const http_common = params => Vue.prototype.$http_common(params)
export const http_merchant = params => Vue.prototype.$http_merchant(params)
......@@ -6,17 +6,18 @@
* @LastEditTime: 2022-07-12 14:14:15
*/
import Vue from 'vue'
import { message, messageBox } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import {message, messageBox} from '@/plugins/element.js'
import {fetchConfig} from '@/config'
import ElementUI from 'element-ui'
import { GLButton, GLTable, GLFooter, GLCombiForm, GLTableButton, GLDialog } from 'glsx-components' //权限按钮 (根据权限动态创建)
import {GLButton, GLTable, GLFooter, GLCombiForm, GLTableButton, GLDialog} from 'glsx-components' //权限按钮 (根据权限动态创建)
import {GLEditor} from 'word-edit'
import { getRoutes } from '@/router'
import {getRoutes} from '@/router'
import '@/assets/css/public.scss'
import render from './render'
// import 'glsx-components/src/theme/theme.scss'
import 'glsx-components/dist/glsx-components.css'
import 'word-edit/dist/glsx-components.css'
let routes = []
let router = null
let instance = null
......@@ -27,50 +28,98 @@ Vue.use(GLCombiForm)
Vue.use(GLTableButton)
Vue.use(GLEditor)
Vue.use(GLDialog)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, request2, sign, secret, sign_common, request_common, request_merchant } = await fetchConfig(false)
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
Vue.prototype.$common = common
Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox
// 集团版集团账号
Vue.prototype.$isGroupUp = globalState.session.accountLevel != 4
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, 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.$http_xiaolong = new common.Http({ response, request: xiaolong_req, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$tracker = common.tracker
// const myToken = 'scrm-base-107ee03c-1214-48c3-a443-a2332e553b2f-rop'
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: myToken } })
// Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: myToken } })
// Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: message.error, headers: { token: myToken } })
// Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: myToken } })
// Vue.prototype.$http_xiaolong = new common.Http({ response, request: xiaolong_req, sign, secret, alert: message.error, headers: { token: myToken } })
// 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)
routes = getRoutes(routesData)
subscribe({ messenger })
Vue.use(GLButton, { routes, routerBase })
export async function bootstrap({history, common, messenger, globalState, routerBase}) {
const {
response,
request,
request2,
sign,
secret,
sign_common,
request_common,
request_merchant
} = await fetchConfig(false)
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
Vue.prototype.$common = common
Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox
// 集团版集团账号
Vue.prototype.$isGroupUp = globalState.session.accountLevel != 4
Vue.prototype.$http = new common.Http({
response,
request,
sign,
secret,
alert: message.error,
headers: {token: globalState.session.token}
})
Vue.prototype.$http_upload = new common.Http({
response: {...response, data_key: 'result', code_success_value: true, code_key: 'success'},
request,
sign,
secret,
alert: message.error,
headers: {token: globalState.session.token, 'Content-Type': 'multipart/form-data'}
})
Vue.prototype.$http2 = new common.Http({
response,
request: request2,
sign,
secret,
alert: message.error,
headers: {token: globalState.session.token}
})
Vue.prototype.$http_merchant = new common.Http({
response,
request: request_merchant,
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.$http_xiaolong = new common.Http({ response, request: xiaolong_req, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$tracker = common.tracker
// const myToken = 'scrm-base-107ee03c-1214-48c3-a443-a2332e553b2f-rop'
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: myToken } })
// Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: myToken } })
// Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: message.error, headers: { token: myToken } })
// Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: myToken } })
// Vue.prototype.$http_xiaolong = new common.Http({ response, request: xiaolong_req, sign, secret, alert: message.error, headers: { token: myToken } })
// 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)
routes = getRoutes(routesData)
subscribe({messenger})
Vue.use(GLButton, {routes, routerBase})
}
export async function mount(props) {
const insts = render(props.routerBase, routes)
router = insts.router
instance = insts.vm
const insts = render(props.routerBase, routes)
router = insts.router
instance = insts.vm
}
export async function unmount() {
instance.$destroy()
instance.$el.innerHTML = ''
instance = null
router = null
instance.$destroy()
instance.$el.innerHTML = ''
instance = null
router = null
}
function subscribe({ messenger }) {
messenger.subscribe(v => {
console.log(`监听到子应用${v.from}发来消息:`, v)
})
function subscribe({messenger}) {
messenger.subscribe(v => {
console.log(`监听到子应用${v.from}发来消息:`, v)
})
}
......@@ -132,7 +132,7 @@ const SEX = {
}
import * as dayjs from 'dayjs'
import Preview from '../components/preview.vue'
import Preview from '../../sop/editSop/components/FriendGroupPreview/index.vue'
import { utils } from 'glsx-common'
export default {
name: 'BasicInof',
......
......@@ -19,19 +19,66 @@
</el-button>
<div class="sale-select" v-show="basicForm.userList && basicForm.userList.length != 0">
<div :key="key" class="el-input-tag input-tag-wrapper">
<el-tag effect="plain" type="info" v-for="(tag, idx) in basicForm.userList" :key="idx" closable :disable-transitions="false" @close="remove(tag, idx)">
<el-tag effect="plain" type="info" v-for="(tag, idx) in basicForm.userList" :key="idx" closable
:disable-transitions="false" @close="remove(tag, idx)">
<i class="el-icon-user-solid"></i>
{{ tag.staffName }}
</el-tag>
</div>
</div>
<div class="filter-footer">
<!-- <span>将消息发送给客户符合条件的客户</span> -->
<div class="filter-number">
查看客户数
<el-button type="text" v-show="isUpdate" :loading="viewLoading" @click="viewMembers">查看</el-button>
<!-- <span v-show="isUpdate" @click="viewMembers">查看</span> -->
<span v-show="!isUpdate">{{ groupNumber }}</span>
</el-form-item>
<el-form-item label="可见的客户:" prop="visibleCustomer">
<el-radio-group v-model="basicForm.visibleCustomer">
<el-radio :label="1">全部客户</el-radio>
<el-radio :label="2">筛选客户</el-radio>
</el-radio-group>
<div v-show="basicForm.visibleCustomer =='1'">
<div class="filter-footer">
<!-- <span>将消息发送给客户符合条件的客户</span> -->
<div class="filter-number">
查看客户数
<el-button type="text" v-show="isUpdate" :loading="viewLoading" @click="viewMembers('all')">查看
</el-button>
<span v-show="!isUpdate">{{ groupNumber }}</span>
</div>
</div>
</div>
<div v-show="basicForm.visibleCustomer =='2'">
<el-button
v-show="customerDataList.length == 0 ||customerDataList.every(item => item.labelList.length == 0)"
class="screeningCustomers default-blue-btn el-icon-plus m-t-10" size="small"
@click="viewMembers()"> 去选择
</el-button>
<div
v-show="customerDataList.length != 0 && customerDataList.some(item => item.labelList.length !== 0)">
<div class="customer-box m-t-10">
<div class="el-input-tag input-tag-wrapper ">
<div class="customer-title">
标签客户:预估
<el-button type="text" :loading="customerLoading"
>
<span v-if="!customerLoading">{{ estimatedNumberOfPeople }}</span>
</el-button>
人
</div>
<div>
<div v-for="(subItem, subIdx) in customerDataList" :key="subIdx">
<el-tag v-for="(k, n) in subItem.labelList" :key="n" class="customer-tag" :size="size"
type="info" :closable="true" :disable-transitions="false"
@close="handleDeleteCustomer(n, subIdx)">
<span>{{ subItem.labelGroup.name }}:{{ k.name }}</span>
</el-tag>
</div>
</div>
</div>
</div>
<div class="m-t-10 screeningCustomers">
<el-button type="text" @click="handleSelectCustomer()">编辑</el-button>
<el-button type="text" @click="handleResetCustomer()">重置</el-button>
</div>
</div>
</div>
</el-form-item>
......@@ -46,8 +93,9 @@
<GLEditor ref="welcome" :form="'customer'" :btnList="btnList" @previewWord="previewForm"></GLEditor>
<div v-show="attachmentShow" class="el-form-item__error">{{ attachmentText }}</div>
<div class="tips-text">
<img src="@/assets/guestCustom/tips.png" class="tips-icon" alt />
<span>因企业微信限制,普通图片:总像素不超过1555200,大小不超过10M,数量不超过9张。视频建议不超过1280x720,帧率30FPS,视频码率1.67 Mbps,最长不超过30S,最大不超过10MB</span>
<img src="@/assets/guestCustom/tips.png" class="tips-icon" alt/>
<!-- 因企业微信限制,普通图片:总像素不超过1555200,大小不超过10M,数量不超过9张。视频建议不超过1280x720,帧率30FPS,视频码率1.67 Mbps,最长不超过30S,最大不超过10MB-->
<span>因为企业微信限制,普通图片:数量不超过9张;视频时长不超过30s,数量只支持1个视频。</span>
</div>
</el-form-item>
<el-form-item label="发送时间:" prop="sendType">
......@@ -56,9 +104,12 @@
<el-radio :label="2">定时发送</el-radio>
</el-radio-group>
<div v-show="basicForm.sendType == 2" class="date-picker">
<el-date-picker v-model="basicForm.sendTime" size="small" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" :picker-options="dateOptions" @change="changeValue"></el-date-picker>
<el-date-picker v-model="basicForm.sendTime" size="small" type="date" value-format="yyyy-MM-dd"
placeholder="选择日期" :picker-options="dateOptions"
@change="changeValue"></el-date-picker>
-
<el-time-picker v-model="basicForm.sendDate" size="small" value-format="HH:mm:ss" placeholder="选择时间" :picker-options="timeOptions"></el-time-picker>
<el-time-picker v-model="basicForm.sendDate" size="small" value-format="HH:mm:ss"
placeholder="选择时间" :picker-options="timeOptions"></el-time-picker>
</div>
</el-form-item>
</el-form>
......@@ -69,10 +120,13 @@
</div>
</div>
</div>
<GLDialog bigTitle="选择成员" mode="big" :visible.sync="membersVisible" @onOk="handleConfirm" @onCancel="membersVisible = !membersVisible">
<GLDialog bigTitle="选择成员" mode="big" :visible.sync="membersVisible" @onOk="handleConfirm"
@onCancel="membersVisible = !membersVisible">
<!-- <SelectMembers islord="false" :selectData="selectData" ref="membersForm"></SelectMembers> -->
<SelectMember ref="membersForm" v-if="membersVisible" :selectData="selectData"></SelectMember>
</GLDialog>
<select-tag ref="selectTagForm" @tagSelected="handleDialogConfirm" :dialogVisible="isTagVisible"
:labelTypesStr="'企业标签'"></select-tag>
</div>
<GLFooter>
<el-button @click="handleCancel">取消</el-button>
......@@ -94,8 +148,9 @@ const ATT_TYPE = {
import Vue from 'vue'
import emoji from '@/utils/emo'
import SelectMember from './components/selectMember.vue'
import Preview from './components/preview.vue'
import Preview from '../sop/editSop/components/FriendGroupPreview/index.vue'
import * as dayjs from 'dayjs'
export default {
components: {
SelectMember,
......@@ -107,7 +162,7 @@ export default {
if (userList && userList.length != 0) {
callback()
} else {
callback(new Error('请选择群发账号'))
callback(new Error('请选择发表成员'))
}
}
const validatorSendType = (rule, value, callback) => {
......@@ -144,39 +199,41 @@ export default {
funcName: '',
type: 'img',
togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
limitSize: 10, //限制图片大小
// limitSize: 10, //限制图片大小
limitNum: 9, //限制图片数量
limitPx: 1555200,
// limitPx: 1555200,
paramsType: 'form-data',
// limitWidth: 10000, //限制单张图片宽度
// limitHeight: 10000,//限制单张图片高度
Isdraggable: true, //图片拖拽
uploadApi: this.$apis.common.pictureUpload
Isdraggable: true, //图片拖拽,
uploadApi: this.$apis.common.compressPicture
},
{
name: '视频',
funcName: '',
type: 'video',
limitSize: 10, //限制视频大小
// limitSize: 10, //限制视频大小
togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
limitNum: 1, //限制视频数量
limitWidth: 1280, //限制视频宽度
limitHeight: 720, //限制视频高度
// limitWidth: 1280, //限制视频宽度
// limitHeight: 720, //限制视频高度
limitTime: 30, //限制视频时长
uploadApi: this.$apis.common.pictureUpload
paramsType: 'form-data',
uploadApi: this.$apis.common.compressVideo
},
{
name: '链接',
type: 'postLink',
funName: 'postLink',
togetherItem: [ATT_TYPE.TEXT],
limitOrNot: true,
Isdraggable: true,//需要配置限制时,也传递该属性
paramsType: 'form-data',
uploadApi: this.$apis.common.compressPicture
}
// {
// name: '模板',
// type: 'message',
// funName: 'message',
// getSearchApi: this.$apis.welcomeword.createdNameList,
// templateApi: this.$apis.welcomeword.templatePage,
// templateUpdateApi: this.$apis.welcomeword.templateUpdate,
// templateSaveApi: this.$apis.welcomeword.templateSave,
// templateDetailApi: this.$apis.welcomeword.templateDetail
// }
],
basicForm: {
selectType: 1,
visibleCustomer: 1,
condition: {
sex: '',
chat: []
......@@ -187,16 +244,16 @@ export default {
basicRules: {
userList: [
// { required: true, message: '请选择群发账号', trigger: 'blur' },
{ validator: validatorUser, trigger: 'change' }
{validator: validatorUser, trigger: 'change'},
],
selectType: [{ required: true, message: '请选择客户类型', trigger: 'change' }],
visibleCustomer: [{required: true, message: '请选择可见的客户', trigger: 'change'}],
// attachmentList: [
// // { required: true, message: '请输入入群欢迎语' },
// { validator: validatorAttachment, trigger: 'change' }
// ],
sendType: [
{ required: true, message: '请选择发送时间', trigger: 'change' },
{ validator: validatorSendType, trigger: 'change' }
{required: true, message: '请选择发送时间', trigger: 'change'},
{validator: validatorSendType, trigger: 'change'}
]
},
membersVisible: false,
......@@ -223,7 +280,12 @@ export default {
firstFlag: true,
footerLeft: 40,
footerWidth: 500,
viewLoading: false
viewLoading: false,
customerDataList: [],
isTagVisible: false,
estimatedNumberOfPeople: '',
customerLoading: false,
whetherToSelectMembers: true,
}
},
watch: {
......@@ -236,17 +298,111 @@ export default {
}
},
deep: true
},
'basicForm.visibleCustomer'(newVal, oldVal) {
if (newVal !== oldVal) {
this.customerDataList = []
this.customerLoading = false
this.estimatedNumberOfPeople = ''
this.$refs.selectTagForm.labelTreeRetSelect = []
}
}
},
mounted() {},
mounted() {
},
methods: {
getCustomerByTagList(type) {
let params = {}
if (type == 'all') {
this.viewLoading = true
}
if (type == 'filtrate') {
params = {
selectType: 2,
condition: {
labelList: []
}
}
this.customerDataList &&
this.customerDataList.forEach(item => {
item.labelList.length &&
item.labelList.forEach(subItem => {
params.condition.labelList.push({
groupId: item.labelGroup.id,
groupName: item.labelGroup.name,
groupType: item.labelType,
labelId: subItem.id,
labelName: subItem.name
})
})
})
}
const userList = this.basicForm.userList.map(item => {
return {
staffId: item.staffId,
staffName: item.staffName,
masterStatus: item.masterStatus,
follow: item.follow
}
})
params.userList = userList
this.$apis.friendGroup
.momentCount(params)
.then(res => {
if (this.basicForm.visibleCustomer == 1) {
this.viewLoading = false
this.groupNumber = res
this.isUpdate = false
} else {
this.estimatedNumberOfPeople = res
this.customerLoading = false
}
})
.catch(err => {
this.viewLoading = false
this.groupNumber = 0
})
},
handleDeleteCustomer(idx, pIdx) {
this.customerDataList[pIdx].labelList.splice(idx, 1)
this.customerLoading = true
this.getCustomerByTagList('filtrate')
},
handleResetCustomer() {
this.customerDataList = []
this.customerLoading = false
this.estimatedNumberOfPeople = ''
this.$refs.selectTagForm.labelTreeRetSelect = []
},
handleDialogConfirm(val) {
this.customerDataList = val
this.customerLoading = true
this.getCustomerByTagList('filtrate')
},
handleSelectCustomer() {
this.isTagVisible = !this.isTagVisible
this.$refs.selectTagForm.init(JSON.parse(JSON.stringify(this.customerDataList)))
},
previewForm(val) {
console.log(val)
this.previewView = val
// this.previewView = val
const value = this.$common.utils.deepClone(val)
if (value[0] && !value[0].attContent) value.splice(0, 1)
this.previewView = value
},
openMembers() {
this.membersVisible = !this.membersVisible
},
handleCancel() {
if (this.editStatus || this.$refs.welcome.previewList.length > 0) {
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
......@@ -254,10 +410,11 @@ export default {
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$router.push('/friendGroup/index')
})
.catch(() => {})
.then(() => {
this.$router.push('/friendGroup/index')
})
.catch(() => {
})
} else {
this.$router.push('/friendGroup/index')
}
......@@ -271,35 +428,10 @@ export default {
})
return
}
this.viewLoading = true
const userList = this.basicForm.userList.map(item => {
return {
staffId: item.staffId,
staffName: item.staffName,
masterStatus: item.masterStatus,
follow: item.follow
}
})
let params = {
userList
}
this.$apis.friendGroup
.momentCount(params)
.then(res => {
// if (res) {
this.viewLoading = false
this.groupNumber = res
// }
this.isUpdate = false
})
.catch(err => {
this.viewLoading = false
this.groupNumber = 0
})
this.basicForm.visibleCustomer == 2 ? this.handleSelectCustomer() : this.getCustomerByTagList('all')
},
// 成员弹窗
handleConfirm() {
console.log(this.$refs.membersForm.innerTags)
if (this.$refs.membersForm.innerTags.length) {
// this.basicForm.userList = this.$refs.membersForm.innerTags
this.$set(this.basicForm, 'userList', this.$refs.membersForm.innerTags)
......@@ -341,6 +473,14 @@ export default {
if (previewList.length != 0) {
this.basicForm.attachmentList = previewList
}
if (this.basicForm.visibleCustomer == 2 && (!this.customerDataList.length || this.customerDataList.every(item => item.labelList.length == 0))) {
this.$message({
type: 'error',
message: '请筛选客户!'
})
return
}
this.$refs.groupForm.validate(v => {
if (v) {
const params = {}
......@@ -352,7 +492,9 @@ export default {
staffName: item.staffName
}
})
let attachmentList = this.$refs.welcome.previewList
// let attachmentList = this.$refs.welcome.previewList
let attachmentList = JSON.parse(JSON.stringify(this.$refs.welcome.previewList))
const material = previewList.filter(item => item.attType != ATT_TYPE.TEXT)
let materialType = 0
if (material && material.length > 0) {
......@@ -372,10 +514,32 @@ export default {
materialType = 2
}
params.materialType = materialType
// 对链接字段做处理
attachmentList.forEach(item => {
if (item.attType == 4) {
item.attContent = JSON.stringify(item.attContent)
}
})
params.attachmentList = attachmentList
// 筛选客户
if (this.basicForm.visibleCustomer) {
params.labelIdList = []
this.customerDataList &&
this.customerDataList.forEach(item => {
item.labelList.length &&
item.labelList.forEach(subItem => {
params.labelIdList.push(
subItem.id,
)
})
})
}
if (params.sendType == 2) {
params.sendTimeStr = this.basicForm.sendTime + ' ' + this.basicForm.sendDate
}
this.addLoading = true
this.$apis.friendGroup.momentInsert(params).then(res => {
this.addLoading = false
......@@ -401,8 +565,8 @@ export default {
if (date < Date.now()) {
this.timeOptions = {
selectableRange: `${dayjs()
.add(1, 'm')
.format('HH:mm')}:00 - 23:59:59`
.add(1, 'm')
.format('HH:mm')}:00 - 23:59:59`
}
} else {
this.timeOptions = {
......@@ -415,6 +579,64 @@ export default {
</script>
<style lang="scss" scoped>
.m-t-10 {
margin-top: 10px;
}
.screeningCustomers {
margin-left: 152px;
}
.customer-box {
margin-left: 152px;
.flex-wrapper {
//display: flex;
//flex-direction: column;
//justify-content: flex-start;
}
.customer-title {
box-sizing: border-box;
height: 39px;
line-height: 39px;
padding: 0 10px;
// border-bottom: 1px solid #dcdfe6;
}
.input-tag-wrapper {
max-height: 227px;
overflow: auto;
position: relative;
font-size: 14px;
padding: 0 10px 10px;
box-sizing: border-box;
color: #666;
display: inline-block !important;
outline: none;
flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
display: flex;
align-items: center;
font-size: 14px;
.el-tag.el-tag--info .el-tag__close {
color: #909399 !important;
background: transparent !important;
}
.customer-tag {
margin: 4px;
}
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
}
}
.container {
margin-bottom: 16px;
background: #ffffff;
......@@ -426,6 +648,7 @@ export default {
color: #333;
font-weight: 600;
border-bottom: 1px solid #d8d8d8;
> span {
font-size: 14px;
color: #999999;
......@@ -433,6 +656,7 @@ export default {
font-weight: 100;
}
}
.tips-text {
display: flex;
// align-items: center;
......@@ -450,28 +674,34 @@ export default {
max-width: 844px;
width: auto;
box-sizing: border-box;
.tips-icon {
width: 14px;
height: 14px;
margin: 6px 8px 0 0;
}
}
.info-box {
display: inline-flex;
width: 100%;
padding-bottom: 30px;
align-items: flex-end;
justify-content: space-between;
.preview {
flex: 1;
}
.info-content {
width: 66%;
.filter-box {
// margin-left: 120px;
margin-bottom: 10px;
min-width: 656px;
background-color: #f7f7f7;
.filter-memeber {
padding: 20px 0;
// border-bottom: 1px solid #dcdfe6;
......@@ -490,21 +720,25 @@ export default {
color: #999;
margin-left: 154px;
font-size: 14px;
.filter-number {
display: inline-block;
line-height: 20px;
padding: 7px 14px;
background-color: #e6e9ff;
color: #333;
span {
color: #5850ff;
cursor: pointer;
}
}
}
.basic-form {
padding: 32px 0 20px 20px;
/deep/.el-input {
/deep/ .el-input {
width: 320px;
}
}
......@@ -515,11 +749,13 @@ export default {
font-size: 12px;
color: #999;
}
.preview {
margin-right: 24px;
margin-bottom: 100px;
}
}
.footer-panel {
display: flex;
align-items: center;
......@@ -531,18 +767,22 @@ export default {
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
.label-text {
margin-left: 10px;
font-size: 14px;
span {
color: #5850ff;
}
}
.sale-select {
display: flex;
align-items: center;
margin-left: 154px;
}
.input-tag-wrapper {
max-height: 75px;
overflow: auto;
......@@ -564,12 +804,14 @@ export default {
align-items: center;
margin-top: 6px;
font-size: 14px;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
}
.el-tag {
margin-right: 4px;
height: 26px;
......@@ -577,6 +819,7 @@ export default {
margin-bottom: 5px;
// background: #fff !important;
}
.tag-input {
background: transparent;
border: none !important;
......@@ -586,31 +829,38 @@ export default {
padding-left: 0;
width: 100px;
}
.form-error {
color: #f56c6c;
font-size: 12px;
margin-left: 186px;
margin-top: 10px;
}
/deep/ {
.el-form-item .el-form-item {
margin-bottom: 22px;
}
.required {
display: inline-block;
line-height: 40px;
}
.required::before {
content: '*';
color: #f56c6c;
margin-right: 4 px;
margin-right: 4px;
}
.el-loading-spinner {
transform: translateY(8px);
}
.el-scrollbar {
padding-bottom: 10px;
}
.welcome-box {
min-width: 488px;
max-width: 844px;
......@@ -618,11 +868,14 @@ export default {
margin-left: 154px;
}
}
.group-content {
padding: 22px 0 20px;
}
.date-picker {
margin-left: 150px;
/deep/ {
.el-date-editor {
width: 136px;
......
......@@ -4,10 +4,11 @@
<div class="m-b-20 friend-title">
<div class="friend-title-left">
<GLButton :size="size" type="primary" fn="编辑朋友圈" @click="handleEdit(1)">发布朋友圈</GLButton>
<span class="friend-tip-text">管理员可直接在后台为员工创建朋友圈,员工收到朋友圈新消息提醒后,可快捷将管理员创建的朋友圈发送到自己朋友圈中。</span>
<span
class="friend-tip-text">管理员可直接在后台为员工创建朋友圈,员工收到朋友圈新消息提醒后,可快捷将管理员创建的朋友圈发送到自己朋友圈中。</span>
</div>
<div class="title">
<span class="info-time">{{this.sendType}}:{{ this.updatedTime }}</span>
<span class="info-time">{{ this.sendType }}:{{ this.updatedTime }}</span>
<span class="info-refresh" @click="handleRefresh">
刷新数据
......@@ -26,25 +27,47 @@
</span>
</glsx-combi-form>
</div> -->
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData"
@handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable v-loading="loading" ref="proGroupRef" @refreshTable="handleSearch" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf">
<GLTable v-loading="loading" ref="proGroupRef" @refreshTable="handleSearch" :layout="layout"
:tableData="tableData" :tableTotal="tableTotal" :searchForm="searchForm" :tableParams="tableParams"
:pageConf="pageConf">
<div slot="attachmentList" class="table-attachmentList" slot-scope="scope">
<div class="attachmentList-box">
<div v-for="(item, index) in scope.scope.previewListImg" :key="item.id">
<div class="attachmentList-image" v-if="index == 0 && item.attType == 1 && (scope.scope.materialType == 0 || scope.scope.materialType == 4)"></div>
<div class="attachmentList-image" v-if="index == 0 && item.attType == 2 && scope.scope.materialType == 1"><img :src="item.attContent[0]" alt="" /></div>
<div class="attachmentList-image" v-if="index == 0 && item.attType == 2 && scope.scope.materialType == 2">
<img :src="item.attContent[0]" alt="" />
<div class="image-num">{{ scope.scope.previewListImg.length }}</div>
<div class="image-panel"><img src="@/assets/imgNum.png" /></div>
<template v-if="scope.scope.previewListUrl && scope.scope.previewListUrl.length">
<div v-for="(item,index) in scope.scope.previewListUrl" :key="index" class="linkStyle">
<img :src="JSON.parse(item.attContent).picurl" alt=""/>
<span class="linkText">{{ JSON.parse(item.attContent).title }}</span>
</div>
<div class="attachmentList-image attachmentList-video" v-if="index == 0 && item.attType == 3 && scope.scope.materialType == 3"><img src="@/assets/guestCustom/video-list.png" /></div>
</div>
<div v-for="item in scope.scope.previewListText" :key="item.id">
<div class="attachmentList-text" v-if="item.attContent">{{ item.attContent[0] }}</div>
</div>
</template>
<template v-else>
<div v-for="(item, index) in scope.scope.previewListImg" :key="item.id">
<div class="attachmentList-image"
v-if="index == 0 && item.attType == 1 && (scope.scope.materialType == 0 )"></div>
<div class="attachmentList-image"
v-if="index == 0 && item.attType == 2 && scope.scope.materialType == 1"><img
:src="item.attContent[0]" alt=""/></div>
<div class="attachmentList-image"
v-if="index == 0 && item.attType == 2 && scope.scope.materialType == 2">
<img :src="item.attContent[0]" alt=""/>
<div class="image-num">{{ scope.scope.previewListImg.length }}</div>
<div class="image-panel"><img src="@/assets/imgNum.png"/></div>
</div>
<div class="attachmentList-image attachmentList-video"
v-if="index == 0 && item.attType == 3 && scope.scope.materialType == 3"><img
src="@/assets/guestCustom/video-list.png"/></div>
</div>
<div v-for="item in scope.scope.previewListText" :key="item.id">
<div class="attachmentList-text" v-if="item.attContent && item.attType !== 4">{{
item.attContent[0]
}}
</div>
</div>
</template>
</div>
</div>
<div slot="sendType" slot-scope="scope">
......@@ -66,7 +89,8 @@
<!-- 表格区域 end -->
</div>
<!-- 下架 -->
<glsx-dialog title="下架" :isVisible.sync="isDownVisible" @confirmDialog="handleDownConfirm" @closeDialog="handleDownClose">
<glsx-dialog title="下架" :isVisible.sync="isDownVisible" @confirmDialog="handleDownConfirm"
@closeDialog="handleDownClose">
<el-form ref="downRef" label-width="100px" :rules="downRules" :model="downForm">
<el-form-item label="下架备注" prop="offReason">
<el-input :size="size" v-model="downForm.offReason" placeholder="请输入下架备注" maxlength="30"></el-input>
......@@ -80,7 +104,8 @@
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { utils } from 'glsx-common'
import {utils} from 'glsx-common'
export default {
name: 'friendGroup',
data() {
......@@ -97,10 +122,10 @@ export default {
goodsStatus: 0
},
downRules: {
offReason: [{ required: true, message: '请输入下架备注', trigger: 'change' }]
offReason: [{required: true, message: '请输入下架备注', trigger: 'change'}]
},
updatedTime: '',
sendType:'',
sendType: '',
// 分享
isShareVisible: false,
shareForm: {},
......@@ -154,7 +179,8 @@ export default {
return row.status == 2 || row.status == 1
},
listeners: {
click: () => {}
click: () => {
}
}
},
{
......@@ -168,7 +194,8 @@ export default {
return row.status == -1
},
listeners: {
click: () => {}
click: () => {
}
}
},
{
......@@ -182,7 +209,8 @@ export default {
return row.status == 4
},
listeners: {
click: () => {}
click: () => {
}
}
},
{
......@@ -296,7 +324,7 @@ export default {
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableTotal: 0,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count'},
baseData: {
typeStatusList: [
{
......@@ -370,14 +398,16 @@ export default {
previewListFilter = previewListFilter.reduce((prev, cur) => {
let index = prev.findIndex(item => item.attType == 2)
if (index != -1 && prev.length) {
return prev.concat({ attType: cur.attType, attContent: prev[index].attContent.concat(cur.attContent) })
return prev.concat({attType: cur.attType, attContent: prev[index].attContent.concat(cur.attContent)})
}
return prev.concat(cur)
}, [])
const previewListUrl = previewListFilter.filter(item => item.attType == 4)
const previewListText = previewListFilter.filter(item => item.attType == 1)
const previewListImg = previewListFilter.filter(item => item.attType != 1)
this.$set(listM, 'previewListText', previewListText)
this.$set(listM, 'previewListImg', previewListImg)
this.$set(listM, 'previewListUrl', previewListUrl)
})
this.tableTotal = res.count
}
......@@ -461,17 +491,17 @@ export default {
return
}
this.$apis.friendGroup
.momentCancel({
id: row.id
})
.then(res => {
this.getListData()
this.$message({
type: 'success',
message: '取消成功'
.momentCancel({
id: row.id
})
.then(res => {
this.getListData()
this.$message({
type: 'success',
message: '取消成功'
})
// this.$set(this.employeelist[index], 'remindStatus', true)
})
// this.$set(this.employeelist[index], 'remindStatus', true)
})
},
dwonVisibleChange() {
this.$refs.downRef && this.$refs.downRef.clearValidate()
......@@ -536,18 +566,22 @@ export default {
display: flex;
align-items: center;
color: #666666;
.friend-title-left {
display: flex;
align-items: center;
}
.title {
display: flex;
align-items: center;
margin-left: 74px;
white-space: nowrap;
.info-refresh {
display: flex;
align-items: center;
.icon-wrap {
width: 24px;
height: 24px;
......@@ -558,24 +592,29 @@ export default {
text-align: center;
line-height: 24px;
}
.el-icon-refresh {
color: #fff;
}
font-size: 14px;
color: #5850ff;
cursor: pointer;
margin-left: 8px;
.wait-status {
transition: all ease-in 1s;
transform: rotate(360deg);
}
}
.info-time {
font-size: 14px;
color: #7d7d7d;
margin-left: 10px;
}
}
span {
font-size: 14px;
margin-left: 10px;
......@@ -584,9 +623,11 @@ export default {
// width: 80%;
}
}
.attachmentList-box {
display: flex;
align-items: center;
.attachmentList-image {
width: 36px;
height: 36px;
......@@ -597,21 +638,25 @@ export default {
align-items: center;
color: #fff;
font-size: 24px;
.image-num {
font-size: 14px;
z-index: 10;
}
.image-panel {
position: absolute;
width: 36px;
height: 36px;
top: 0px;
left: 0px;
img {
width: 36px;
height: 36px;
}
}
.el-icon-reading {
position: absolute;
font-size: 24px;
......@@ -619,9 +664,11 @@ export default {
left: 5px;
color: #fff;
}
&.attachmentList-video {
background: rgba($color: #000000, $alpha: 0.7);
position: relative;
img {
position: absolute;
top: 6px;
......@@ -630,6 +677,7 @@ export default {
height: 24px;
}
}
> img {
position: absolute;
top: 0px;
......@@ -638,10 +686,31 @@ export default {
height: 36px;
}
}
.attachmentList-text {
font-size: 14px;
text-align: left;
text-overflow: -o-ellipsis-lastline;
//text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
}
.linkStyle{
display: flex;
align-items: center;
img{
width: 36px;
height: 36px;
margin-right: 4px;
}
.linkText{
font-size: 14px;
text-align: left;
//text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
......
<template>
<div class="live-room marketing">
<div class="live-room container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData"
@handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- <div class="flex">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right">
<el-row>
......@@ -47,15 +46,19 @@
</el-form>
</div> -->
<div class="choseRow m-b-10">
<div class="choseItem" :class="{ active: currentIndex == index + 1 }" v-for="(item, index) in choseList"
:key="index" @click="tabClick(index + 1)">
<div class="choseItem" :class="{ active: currentIndex == index + 1 }" v-for="(item, index) in choseList" :key="index" @click="tabClick(index + 1)">
{{ item }}
</div>
<el-button :size="size" class="default-blue-btn m-l-20" type="default" @click="handleExport">导出</el-button>
</div>
<GLTable ref="memberOrderRef" v-if="isReload" :noDataImg="url" @setTableFinishFun="setTableFinishFun"
:searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf"
:beforeSearchFn="beforeSearchFn">
<GLTable ref="memberOrderRef" v-if="isReload" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div slot="packageName" slot-scope="scope" class="flex">
<span>{{ scope.scope.packageName }}</span>
<!-- 门店套餐 -->
<template v-if="showGh && scope.scope.packageType == 1 && scope.scope.giveGoldFlag == 2">
<div class="gold-sign">送会员</div>
</template>
</div>
<div slot="orderType" slot-scope="scope" style="width: 200px">
<template v-if="scope.scope.orderType == 1">
<span>{{ scope.scope.packageType == 1 ? '门店套餐' : '集团套餐' }}</span>
......@@ -72,8 +75,7 @@
</span>
</GLTable>
</div>
<GLDialog class="refund-fill-boxss" mode="small" okText="确定" title="提示" :hasFooter="hasFooter" :type="'error'"
@onOk="isShow = false" @onCancel="isShow = false" :visible.sync="isShow">
<GLDialog class="refund-fill-boxss" mode="small" okText="确定" title="提示" :hasFooter="hasFooter" :type="'error'" @onOk="isShow = false" @onCancel="isShow = false" :visible.sync="isShow">
<div class="dialog-refund">
<img class="img" src="../../images/warn.png" />
<div>该会员在升级黑卡会员期间,已购买过生活权益</div>
......@@ -81,8 +83,7 @@
<div>暂不支持退款</div>
</div>
</GLDialog>
<GLDialog class="refund-fill-box" mode="mid" title="退款确认" :hasFooter="hasFooter" :type="'error'"
@onOk="refundConfirmDialog" @onCancel="refundVisible = false" :visible.sync="refundVisible">
<GLDialog class="refund-fill-box" mode="mid" title="退款确认" :hasFooter="hasFooter" :type="'error'" @onOk="refundConfirmDialog" @onCancel="refundVisible = false" :visible.sync="refundVisible">
<div class="dialog-form">
<label>说明:</label>
<el-input v-model.trim="refund" type="textarea" :rows="3" placeholder="请输入退款说明"></el-input>
......@@ -214,7 +215,8 @@ export default {
{
label: '名称',
prop: 'packageName',
width: '180'
width: '180',
addHtml: 'packageName'
},
{
label: '类型',
......@@ -560,7 +562,17 @@ export default {
border-left: 1px solid #d5d5d5;
}
}
.gold-sign {
padding: 0px 4px;
border-radius: 5px;
background: #ff9140;
font-size: 10px;
color: #fff;
width: 50px;
white-space: nowrap;
height: 20px;
line-height: 20px;
}
.refund-fill-box {
.dialog-form {
padding: 26px 36px 46px 36px;
......@@ -595,4 +607,5 @@ export default {
// ::v-deep .el-dialog__footer {
// text-align: center;
// }
}</style>
}
</style>
......@@ -36,7 +36,7 @@
<el-radio :label="1">不赠送</el-radio>
</el-radio-group>
</el-form-item>
<span class="give-tip">选择赠送,客户购买该套餐后即开通一年金卡会员权益</span>
<span class="give-tip" v-if="showGh && accountLevel == 4">选择赠送,客户购买该套餐后即开通一年金卡会员权益</span>
<el-form-item size="small" label="套餐售价/元:" prop="packagePrice">
<el-input size="small" v-model="ruleForm.packagePrice" placeholder="请输入套餐售价"
@keyup.native="ruleForm.packagePrice = oninput(ruleForm.packagePrice)">
......@@ -94,12 +94,13 @@ export default {
selectGiftDialog
},
data() {
// else if (value < this.memberPrice && this.ruleForm.giveGoldFlag == 2 && this.accountLevel == 4 && this.showGh) {
// return callback(new Error('套餐售价不能低于会员卡价格'))
// }
var validatePrice = (rule, value, callback) => {
if (!value) {
return callback(new Error('请输入售价'))
} else if (value < this.memberPrice && this.ruleForm.giveGoldFlag == 2 && this.accountLevel == 4 && this.showGh) {
return callback(new Error('套餐售价不能低于会员卡价格'))
} else {
} else {
callback()
}
}
......
......@@ -57,6 +57,7 @@
</el-tabs>
</div>
<el-button
v-if="configShow"
class="default-blue-btn"
:size="size"
type="default"
......@@ -492,7 +493,8 @@ export default {
fn: '退款'
},
condition: row => {
return row.orderSource == 4 && [2, 6, 21].includes(+row.orderStatus) && row.isOffline != 0
// return row.orderSource == 4 && [2, 6, 21, 22].includes(+row.orderStatus) && row.isOffline != 0
return row.showRefund == 1 //是否展示退款按钮 1:是 0:否
},
listeners: {
click: row => {
......@@ -508,7 +510,8 @@ export default {
fn: '订单核销'
},
condition: row => {
return row.deliveryType == 1 && row.orderStatus == 21
// return row.deliveryType == 1 && row.orderStatus == 21
return row.showVerf == 1 //是否展示核销按钮 1:是 0:否
},
listeners: {
click: this.handleWriteOff
......@@ -613,7 +616,8 @@ export default {
{ confId: '4', confName: '已取消' }
],
},
showTable: false
showTable: false,
configShow: false
}
},
created () {
......@@ -634,6 +638,7 @@ export default {
methods: {
async getCrowdfundingOrderConfig () {
const { channelType } = this.$globalState.session
let tableColumns = [
{
label: '客户名称',
......@@ -747,7 +752,7 @@ export default {
}
},
{
label: '支付定金/元',
label: channelType == 2 ? '付款金额/元' : '支付定金/元',
prop: 'payPrice',
width: '120',
formatter: cellValue => {
......@@ -1023,8 +1028,9 @@ export default {
]
try {
const res = await this.$apis.common.getCrowdfundingOrderConfig(),
filterTableList = ['customerPhone', 'otherInformation', 'assignName', 'shareStaffPhone', 'verificationDate', 'vinNo', 'afterSaleStatus'],
filterFormList = ['afterSaleStatuses', 'vin', 'shareStaffSource', 'customerPhone', 'shareStaffPhone']
filterTableList = ['customerPhone', 'shareStaffName', 'otherInformation', 'assignName', 'shareStaffPhone', 'verificationDate', 'vinNo', 'afterSaleStatus'],
filterFormList = ['afterSaleStatuses','shareStaffName', 'vin', 'shareStaffSource', 'customerPhone', 'shareStaffPhone']
this.configShow = res != 1
if (res == 1) {
for (let i = 0; i < tableColumns.length; i++) {
if (filterTableList.includes(tableColumns[i].prop)) {
......
......@@ -4,10 +4,24 @@
<div class="edit-box">
<div class="container m-b-20">
<p class="edit-title">订单信息</p>
<el-form label-width="100px" :inline="true">
<el-row v-for="(item, index) in detailFormDataRow" :key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label" class="row-item">
<span class="detail-txt ellipsis-1" :title="detailForm[subItem.name]">{{ detailForm[subItem.name] ? detailForm[subItem.name] + (subItem.suffix || '') : '-' }}</span>
<el-form
label-width="100px"
:inline="true"
>
<el-row
v-for="(item, index) in detailFormDataRow"
:key="index"
>
<el-form-item
v-for="(subItem, subIndex) in item.rowList"
:key="subIndex"
:label="subItem.label"
class="row-item"
>
<span
class="detail-txt ellipsis-1"
:title="detailForm[subItem.name]"
>{{ detailForm[subItem.name] ? detailForm[subItem.name] + (subItem.suffix || '') : '-' }}</span>
</el-form-item>
</el-row>
<template v-if="detailForm.formDescribe">
......@@ -17,43 +31,88 @@
</div>
<div :class="['container', orderRefund ? 'm-b-20' : 'edit-container']">
<p class="edit-title">发货信息</p>
<el-form label-width="100px" :inline="true">
<el-form
label-width="100px"
:inline="true"
>
<el-form-item label="物流信息">
<span>{{ detailForm.deliveryCompany }}&nbsp;&nbsp;&nbsp;{{ detailForm.deliveryNumber }}</span>
</el-form-item>
</el-form>
<div v-if="orderGoods.length" class="p-l-40">
<div
v-if="orderGoods.length"
class="p-l-40"
>
<table class="show-table">
<tbody>
<tr v-for="(item, index) in orderGoods" :key="index" style="height: 70px;">
<td><img :src="item.goodsImage" class="img-60" /></td>
<tr
v-for="(item, index) in orderGoods"
:key="index"
style="height: 70px;"
>
<td><img
:src="item.goodsImage"
class="img-60"
/></td>
<td>{{ item.goodsName }}</td>
<td>{{ item.specificationData }}</td>
<td>{{ item.activityPrice ? item.activityPrice : item.retailPrice }}元 * {{ item.goodsNumber }}</td>
</tr>
<tr v-if="detailForm.subOrderCoupon" style="height: 40px;">
<td style="text-align: left;" colspan="3">优惠券</td>
<tr
v-if="detailForm.subOrderCoupon"
style="height: 40px;"
>
<td
style="text-align: left;"
colspan="3"
>优惠券</td>
<td>{{ detailForm.subOrderCoupon.discountAmount }}元</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="container edit-container" v-if="orderRefund">
<div
class="container edit-container"
v-if="orderRefund"
>
<p class="edit-title">售后信息</p>
<el-form label-width="100px" :inline="true">
<el-row v-for="(item, index) in afterInfoDataRow" :key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label">
<span class="detail-txt ellipsis-1" :title="orderRefund[subItem.name]">{{ orderRefund[subItem.name] || '-' }}</span>
<el-form
label-width="100px"
:inline="true"
>
<el-row
v-for="(item, index) in afterInfoDataRow"
:key="index"
>
<el-form-item
v-for="(subItem, subIndex) in item.rowList"
:key="subIndex"
:label="subItem.label"
>
<span
class="detail-txt ellipsis-1"
:title="orderRefund[subItem.name]"
>{{ orderRefund[subItem.name] || '-' }}</span>
</el-form-item>
</el-row>
</el-form>
<div class="form-img">
<el-form label-width="100px" :inline="true">
<el-form
label-width="100px"
:inline="true"
>
<el-form-item label="售后凭证">
<div class="flex">
<span v-for="(item, index) in orderRefund.imgUrls" :key="index">
<el-image class="img-60 comment-img" :src="item" :preview-src-list="[item]"></el-image>
<span
v-for="(item, index) in orderRefund.imgUrls"
:key="index"
>
<el-image
class="img-60 comment-img"
:src="item"
:preview-src-list="[item]"
></el-image>
</span>
</div>
</el-form-item>
......@@ -62,7 +121,10 @@
</div>
</div>
<GLFooter>
<el-button @click="handleCancel" size="medium">取消</el-button>
<el-button
@click="handleCancel"
size="medium"
>取消</el-button>
</GLFooter>
</div>
</template>
......@@ -72,7 +134,7 @@ import * as dayjs from 'dayjs'
import { orderManageStatusList, orderSourceList, deliveryTypeList } from '@/common/constant'
export default {
name: 'orderDetail',
data() {
data () {
return {
size: 'small',
title: '查看订单',
......@@ -133,18 +195,18 @@ export default {
{ confId: '2', confName: '企微' }
]
},
hideStatus: false
configShow: false
}
},
created() {},
created () { },
mounted() {
mounted () {
this.getCrowdfundingOrderConfig()
},
methods: {
async getCrowdfundingOrderConfig() {
async getCrowdfundingOrderConfig () {
let detailFormData = [
{
label: '订单编号',
......@@ -225,9 +287,9 @@ export default {
}
]
const res = await this.$apis.common.getCrowdfundingOrderConfig()
let hideStatus = res == 1
if (hideStatus) {
const filterFormList = ['customerPhone', 'shareStaffTypeName', 'vin', 'shipAddress']
let configShow = res != 1
if (!configShow) {
const filterFormList = ['customerPhone','shareStaffName', 'shareStaffTypeName', 'vin', 'shipAddress']
for (let i = 0; i < detailFormData.length; i++) {
if (filterFormList.includes(detailFormData[i].name)) {
detailFormData.splice(i, 1)
......@@ -235,14 +297,14 @@ export default {
}
}
}
this.hideStatus = hideStatus
this.configShow = configShow
this.detailFormData = detailFormData
this.setMinHeight('.edit-box')
this.routeInfo = this.$route.query
this.getInfo()
this.formToRow('afterInfoData')
},
formToRow(formName, numOfRow = 3) {
formToRow (formName, numOfRow = 3) {
var rowNum = Math.ceil(this[formName].length / numOfRow)
for (var i = 0; i < rowNum; i++) {
for (var j = 0; j < numOfRow; j++) {
......@@ -257,7 +319,7 @@ export default {
}
}
},
getInfo() {
getInfo () {
this.$apis.orderManage.getOrderDetailApi({ orderCode: this.routeInfo.orderCode }).then(res => {
this.detailForm = res
this.orderRefund = res.orderRefund || null
......@@ -289,7 +351,7 @@ export default {
this.detailFormData.splice(idx, 1)
}
// 其他信息
if (!this.hideStatus) {
if (this.configShow) {
var formDescribeObj = {
label: '其他信息',
name: 'formDescribe',
......@@ -312,7 +374,7 @@ export default {
this.formToRow('detailFormData')
})
},
handleCancel() {
handleCancel () {
this.$router.push({
path: '/orderManage/index'
})
......
......@@ -140,7 +140,7 @@ export default {
fn: '自建编辑'
},
condition: row => {
return !row.goodsStatus && row.goodsSource == 1
return !row.goodsStatus && (row.goodsSource == 1 || row.goodsSource == 3)
},
listeners: {
click: row => this.handleEdit(2, row)
......@@ -167,7 +167,7 @@ export default {
type: 'text'
},
condition: row => {
return !row.goodsStatus && (row.goodsSource == 1 || (row.goodsSource == 2 && row.originGoodsStatus))
return !row.goodsStatus && (row.goodsSource == 1 || row.goodsSource == 3 || (row.goodsSource == 2 && row.originGoodsStatus))
},
listeners: {
click: this.handleUpOrDown
......@@ -233,7 +233,7 @@ export default {
fn: '自建查看'
},
condition: row => {
return row.goodsStatus && row.goodsSource == 1
return row.goodsStatus && (row.goodsSource == 1 || row.goodsSource == 3)
},
listeners: {
click: row => this.handleEdit(3, row)
......
......@@ -30,6 +30,7 @@
<div class="flex m-b-10 w-100-percent">
<span class="table-title"></span>
<el-button
v-if="configShow"
:size="size"
class="default-blue-btn"
type="default"
......@@ -74,7 +75,7 @@
slot="linkText"
slot-scope="scope"
>
<template v-if="scope.scope.incrementFlag == 'Y' || hideStatus">
<template v-if="scope.scope.incrementFlag == 'Y' || !configShow">
{{scope.scope[scope.prop] || 0 }}
</template>
<template v-else>
......@@ -115,7 +116,7 @@
:isShareVisible="isShareVisible"
:shareForm="shareForm"
@handleShareClose="handleShareClose"
:hideStatus="hideStatus"
:hideStatus="!configShow"
></crowdFundingShare>
</div>
</template>
......@@ -252,6 +253,9 @@ export default {
attrs: {
type: 'text'
},
condition: row => {
return this.configShow
},
listeners: {
click: this.handleShare
}
......@@ -275,6 +279,9 @@ export default {
type: 'text',
fn: '数据看板'
},
condition: row => {
return this.configShow
},
listeners: {
click: row => {
this.$router.push({
......@@ -311,7 +318,7 @@ export default {
}
]
},
hideStatus: false
configShow: false
}
},
......@@ -451,11 +458,12 @@ export default {
return this.baseData.statusList.find(item => item.confId == cellValue.activityStatus).confName
}
}
]
],
{ channelType } = this.$globalState.session
const res = await this.$apis.common.getCrowdfundingOrderConfig(),
filterTableList = ['paymentModel'],
hideStatus = res == 1
if (hideStatus) {
configShow = res != 1
if (!configShow) {
for (let i = 0; i < tableColumns.length; i++) {
if (filterTableList.includes(tableColumns[i].prop)) {
tableColumns.splice(i, 1)
......@@ -463,7 +471,8 @@ export default {
}
}
}
this.hideStatus = hideStatus
this.configShow = configShow
this.channelType = channelType
this.tableParams.tableColumns = tableColumns
},
getParams () {
......
......@@ -47,7 +47,7 @@
</div>
</div>
<!-- 可配置显示隐藏 👇 -->
<template v-if="showTable">
<template v-if="configShow">
<div class="data-board-box">
<p class="edit-title">员工排行榜</p>
<div class="p-20">
......@@ -115,6 +115,7 @@
<div class="flex m-b-10 w-100-percent">
<span class="table-title">数据列表</span>
<el-button
v-if="configShow"
:size="size"
class="default-blue-btn"
type="default"
......@@ -178,6 +179,7 @@
</span>
</span>
<el-button
v-if="configShow"
:size="size"
class="default-blue-btn"
type="default"
......@@ -386,7 +388,7 @@ export default {
dataBoard: {},
activityId: '',
liveInfo: {},
showTable: false
configShow: false
}
},
computed: {
......@@ -414,7 +416,7 @@ export default {
methods: {
async getCrowdfundingOrderConfig () {
const res = await this.$apis.common.getCrowdfundingOrderConfig()
this.showTable = res != 1
this.configShow = res != 1
},
getLiveData () {
this.$apis.seckillActivity
......
......@@ -2720,7 +2720,7 @@ export default {
// 活动详情
if (info.activityDetail) {
this.editForm.activityDetail = decodeURIComponent(info.activityDetail)
this.$refs.configEditFormRef.$refs.activityDetailTextBox[0].setEdit(this.editForm.activityDetail)
this.$refs?.configEditFormRef?.$refs?.activityDetailTextBox[0]?.setEdit(this.editForm.activityDetail)
}
// 活动音乐
if (info.activityMusic) {
......
......@@ -54,6 +54,22 @@
></i>
</div>
</template>
<template v-else-if="item.attType == 4">
<div class="welcome-activity-panel">
<div class="welcome-activity-box">
<div class="welcome-activity-icon">
<img :src="handleContentJson(item.attContent).picurl"
v-if="handleContentJson(item.attContent).picurl" alt=""/>
<img src="@/assets/welcomeWord/coupon.png" v-else/>
</div>
<div class="welcome-activity-desc">
<div class="model-item-title">{{ handleContentJson(item.attContent).title }}</div>
<div class="model-item-content">{{ handleContentJson(item.attContent).desc }}</div>
</div>
</div>
</div>
</template>
</div>
</div>
</template>
......@@ -142,11 +158,127 @@ export default {
},
deep: true
}
},
methods: {
handleContentJson(val) {
if (typeof (val) == 'string') {
return JSON.parse(val)
} else {
return val
}
},
}
}
</script>
<style lang="scss" scoped>
.welcome-activity-panel {
display: flex;
margin-right: 10px;
.welcome-activity-box {
cursor: pointer;
position: relative;
min-width: 180px;
background: #fafbfe;
border-radius: 2px;
border: 1px solid #e8e8ea;
padding: 8px;
box-sizing: border-box;
display: flex;
&:hover {
.delete-solid {
opacity: 1;
}
}
.welcome-activity-icon {
width: 36px;
height: 36px;
margin-right: 8px;
position: relative;
background-size: 100% 100%;
img {
width: 100%;
height: 100%;
}
video {
object-fit: fill;
}
.el-icon-video-play {
position: absolute;
top: 7px;
left: 7px;
font-size: 22px;
color: rgba(255, 255, 255, 0.8);
}
.img-filter-box {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
color: rgba(255, 255, 255, 0.8);
display: flex;
font-size: 13px;
align-items: center;
justify-content: center;
}
}
.delete-solid {
transition: all 0.5s;
opacity: 0;
position: absolute;
top: 0px;
right: 0px;
width: 14px;
height: 14px;
background: rgba(0, 0, 0, 0.5);
display: flex;
font-size: 12px;
align-items: center;
justify-content: center;
}
.el-icon-delete-solid {
color: rgba(255, 255, 255, 0.5);
}
.model-item-title {
font-size: 14px;
font-weight: 600;
color: #333333;
line-height: 20px;
max-width: 110px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.model-item-content {
font-size: 12px;
font-weight: 400;
color: #999999;
line-height: 17px;
max-width: 110px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
span {
color: #5850ff;
}
}
}
}
.img-list {
margin-right: 3px;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!