Commit 5ef56d5c by 前端

Merge branch 'develop' into 'master'

v2.7.2_feat上线后,Develop合并。

See merge request !341
2 parents ae2c20b2 3bbb9b1b
Showing 78 changed files with 2387 additions and 709 deletions
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.4.8", "glsx-components": "^1.5.1",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"node-sass": "^4.0.0", "node-sass": "^4.0.0",
"vue": "^2.6.10", "vue": "^2.6.10",
......
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http } from '@/main'
const findAllByPage = params => {
params.method = 'entmicro.api.dracIm.findAllByPage'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//活动配置详情
const activityDetail = params => {
params.method = 'marketing.api.activity.config.detail'
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//活动配置列表
const activityPage = params => {
params.method = 'marketing.api.activity.config.page'
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//活动配置创建
const activityInsert = params => {
params.method = 'marketing.api.activity.config.insert'
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//活动配置创建
const activityGroupList = params => {
params.method = 'marketing.api.activity.config.group.list'
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//活动配置创建
const machetes = params => {
params.method = 'marketing.api.activity.customer.machetes'
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//活动配置编辑
const activityUpdate = params => {
params.method = 'marketing.api.activity.config.update'
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//查询活动列表
const activityPageList = params => {
params.method = 'marketing.api.activity.activityPage'
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//查询活动客户列表
const activityCustomerPage = params => {
params.method = 'marketing.api.activity.activityCustomerPage'
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//分配客户
const assignmentCustomer = params => {
params.method = 'marketing.api.activity.assignmentCustomer'
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//活动配置编辑
const queryCrowdGroupTree = params => {
params.method = 'scrm.api.datahub.crowdgroup.queryCrowdGroupTree'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
findAllByPage,
activityDetail,
activityPage,
activityPageList,
activityCustomerPage,
assignmentCustomer,
activityInsert,
activityUpdate,
queryCrowdGroupTree,
activityGroupList,
machetes
}
...@@ -55,6 +55,17 @@ const uploadVideoApi = params => { ...@@ -55,6 +55,17 @@ const uploadVideoApi = params => {
}) })
} }
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']
})
}
const getMerchantList = params => { const getMerchantList = params => {
params.method = `${defaultPath}merchant.listWithPageByCurMerchant` params.method = `${defaultPath}merchant.listWithPageByCurMerchant`
return http({ return http({
...@@ -150,4 +161,4 @@ const getMerchantInfoApi = params => { ...@@ -150,4 +161,4 @@ const getMerchantInfoApi = params => {
}) })
} }
export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadMusicApi, uploadVideoApi, getMerchantList, getSimpleMerchantList, getZoneListApi, getClassifyListApi, pictureUpload, querylabeltree, getCrowdTreeListApi, getStaffFollowerListApi, getMerchantInfoApi } export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadMusicApi, uploadVideoApi, uploadFundingVideoApi, getMerchantList, getSimpleMerchantList, getZoneListApi, getClassifyListApi, pictureUpload, querylabeltree, getCrowdTreeListApi, getStaffFollowerListApi, getMerchantInfoApi }
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http } from '@/main'
const getStaffList = params => {
params.method = 'entmicro.api.staff.findStaffByMerchantId'
return http({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
const listDepartmentTree = params => {
params.method = 'entmicro.api.department.listDepartmentTree'
return http({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
const queryCrowdTree = params => {
params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getStaffList,
listDepartmentTree,
queryCrowdTree
}
import { http, http2, http_xiaolong } from '@/main' import { http, http2 } from '@/main'
const path = 'entmicro.api.mass.' const path = 'entmicro.api.mass.'
const URL = 'rop-scrm-entmicro/router' const URL = 'rop-scrm-entmicro/router'
...@@ -378,6 +378,28 @@ const getMaterialListApi = params => { ...@@ -378,6 +378,28 @@ const getMaterialListApi = params => {
sign: true sign: true
}) })
} }
// 更新客户群发客户列表
const renewDetailList = params => {
params.method = `${path}update.merchant`
return http({
url: URL,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 客户群发统计
const renewStatistic = params => {
params.method = `${path}update.group.detail`
return http({
url: URL,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { export default {
customerList, customerList,
...@@ -416,5 +438,7 @@ export default { ...@@ -416,5 +438,7 @@ export default {
queryCrowdtree, queryCrowdtree,
followerEcho, followerEcho,
getGroupListApi, getGroupListApi,
getMaterialListApi getMaterialListApi,
renewDetailList,
renewStatistic
} }
...@@ -118,7 +118,28 @@ const momentCancel = params => { ...@@ -118,7 +118,28 @@ const momentCancel = params => {
sign: true sign: true
}) })
} }
//同步朋友圈状态
const createStatus = params => {
params.method = 'marketing.api.moment.sync.create.status'
params.sessionId = session
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//同步朋友圈员工发送状态
const publicStatus = params => {
params.method = 'marketing.api.moment.sync.staff.public.status'
params.sessionId = session
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
export default { export default {
momentDetail, momentDetail,
momentRemindUser, momentRemindUser,
...@@ -129,5 +150,7 @@ export default { ...@@ -129,5 +150,7 @@ export default {
momentStaff, momentStaff,
momentStaffCustomers, momentStaffCustomers,
getListApi, getListApi,
momentCancel momentCancel,
createStatus,
publicStatus
} }
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http } from '@/main'
const URL = '/rop-scrm-entmicro/router'
const PATH = 'entmicro.api.one.template.'
const WURL = '/rop-scrm-wechat/router'
const PATH2 = 'entmicro.api.group.'
const templateList = params => {
params.method = `${PATH}page`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const insert = params => {
params.method = `${PATH}insert`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
const update = params => {
params.method = `${PATH}update`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
const detail = params => {
params.method = `${PATH}detail`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const status = params => {
params.method = `${PATH}status`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const listDepartmentTree = params => {
params.method = 'entmicro.api.department.listDepartmentTree'
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const nameVaild = params => {
params.method = 'entmicro.api.one.template.name.valid'
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const updateNameVaild = params => {
params.method = 'entmicro.api.one.template.name.update.valid'
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const getStatus = params => {
params.method = 'scrm.api.work.wechat.access.status'
return http({
url: WURL,
method: 'POST',
data: params,
sign: true
})
}
//一客一群详情页
const getListApi = params => {
params.method = `${PATH}page`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const customerList = params => {
params.method = `${PATH2}template.customer.page`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const getFollower = params => {
params.method = 'entmicro.api.staff.listFollowerStaffByPage'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
templateList,
insert,
detail,
status,
update,
listDepartmentTree,
nameVaild,
getStatus,
updateNameVaild,
getListApi,
customerList,
getFollower
}
...@@ -54,6 +54,31 @@ const writeOffApi = params => { ...@@ -54,6 +54,31 @@ const writeOffApi = params => {
}) })
} }
// 众筹-订单核销
const crowdFundWriteOffApi = params => {
params.method = 'scrm.api.shopmall.crowd.funding.order.verfication'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 众筹-退款
const crowdFundRefundApi = params => {
params.method = 'scrm.api.shopmall.crowd.funding.order.refund'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 快递信息 // 快递信息
const addDeliveryApi = params => { const addDeliveryApi = params => {
params.method = `${defaultPath}order.addDelivery` params.method = `${defaultPath}order.addDelivery`
...@@ -101,4 +126,4 @@ const confirmReceiptGoodsApi = params => { ...@@ -101,4 +126,4 @@ const confirmReceiptGoodsApi = params => {
}) })
} }
export default { getListApi, getCountApi, getOrderDetailApi, orderExportApi, writeOffApi, addDeliveryApi, examineDetailApi, examineAllowApi, confirmReceiptGoodsApi } export default { getListApi, getCountApi, getOrderDetailApi, orderExportApi, writeOffApi, crowdFundWriteOffApi, crowdFundRefundApi, addDeliveryApi, examineDetailApi, examineAllowApi, confirmReceiptGoodsApi }
...@@ -24,6 +24,17 @@ const getCrowdfundListApi = params => { ...@@ -24,6 +24,17 @@ const getCrowdfundListApi = params => {
}) })
} }
// 众筹-导出
const exportCrowdfundApi = params => {
params.method = 'scrm.api.shopmall.crowdfunding.activity.export'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
//分页浏览明细 //分页浏览明细
const getBrowseListApi = params => { const getBrowseListApi = params => {
params.method = 'scrm.api.shopmall.customer.browse.records' params.method = 'scrm.api.shopmall.customer.browse.records'
...@@ -127,4 +138,4 @@ const getCrowdSharedApi = params => { ...@@ -127,4 +138,4 @@ const getCrowdSharedApi = params => {
}) })
} }
export default { getActivityPageApi, getCrowdfundListApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi } export default { getActivityPageApi, getCrowdfundListApi, exportCrowdfundApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi }
...@@ -91,6 +91,16 @@ const getMaterialListApi = params => { ...@@ -91,6 +91,16 @@ const getMaterialListApi = params => {
sign: true sign: true
}) })
} }
// 众筹模式活动
const crowdfundingActivity = params => {
params.method = 'scrm.api.shopmall.crowdfunding.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//模板列表 //模板列表
const templatePage = params => { const templatePage = params => {
params.method = `${path}template.page.search` params.method = `${path}template.page.search`
...@@ -144,5 +154,6 @@ export default { ...@@ -144,5 +154,6 @@ export default {
templatePage, templatePage,
createdNameList, createdNameList,
templateUpdate, templateUpdate,
templateSave templateSave,
crowdfundingActivity
} }
...@@ -221,6 +221,10 @@ html { ...@@ -221,6 +221,10 @@ html {
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
.img-circle {
border-radius: 50%;
}
.marketing .pointer { .marketing .pointer {
cursor: pointer; cursor: pointer;
} }
...@@ -338,6 +342,14 @@ html { ...@@ -338,6 +342,14 @@ html {
background-color: #999999; background-color: #999999;
} }
.marketing .txt-green {
color: #61CC43;
}
.marketing .txt-orange {
color: #FB8F28;
}
.marketing .txt-blue { .marketing .txt-blue {
color: #5850ff; color: #5850ff;
} }
...@@ -583,7 +595,7 @@ html { ...@@ -583,7 +595,7 @@ html {
font-weight: 400; font-weight: 400;
} }
.marketing .mt-10 { .marketing .mt-10 {
margin-top:10px; margin-top: 10px;
} }
.el-tooltip__popper.is-light { .el-tooltip__popper.is-light {
background: #ffffff; background: #ffffff;
...@@ -652,3 +664,56 @@ html { ...@@ -652,3 +664,56 @@ html {
color: #5850ff !important; color: #5850ff !important;
} }
} }
.scrm-box-f {
background: #ffffff;
}
.circleStatusRed {
width: 6px;
height: 6px;
border-radius: 50%;
background: #eb4e4e;
display: inline-block;
vertical-align: middle;
margin-right: 8px;
}
.circleStatusGray {
width: 6px;
height: 6px;
border-radius: 50%;
background: #999999;
display: inline-block;
vertical-align: middle;
margin-right: 8px;
}
.circleStatusGreen {
width: 6px;
height: 6px;
border-radius: 50%;
background: #2cca74;
display: inline-block;
vertical-align: middle;
margin-right: 8px;
}
.circleStatusYellow {
width: 6px;
height: 6px;
border-radius: 50%;
background: #fdb757;
display: inline-block;
vertical-align: middle;
margin-right: 8px;
}
.circleStatusPurple {
width: 6px;
height: 6px;
border-radius: 50%;
background: #5850ff;
display: inline-block;
vertical-align: middle;
margin-right: 8px;
}
...@@ -231,5 +231,20 @@ function setMinHeight(calssName = '.edit-container') { ...@@ -231,5 +231,20 @@ function setMinHeight(calssName = '.edit-container') {
let minHeight = 'calc(100vh - ' + height + ')' let minHeight = 'calc(100vh - ' + height + ')'
document.querySelector(calssName).style.minHeight = minHeight document.querySelector(calssName).style.minHeight = minHeight
} }
function isShowBtn(value) {
export { limitPrice, getExplorer, exportFn, aToExport, downloadIamge, orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, statusList, serviceStatusList, memberTypeList, stateList, orderTypesList, orderStatusList, setMinHeight } let isShowStatus = false
const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST'])
menuLevel(menu)
function menuLevel(item) {
item.forEach(itm => {
if (itm.path == value) {
isShowStatus = true
}
if (itm.children) {
menuLevel(itm.children)
}
})
}
return isShowStatus
}
export { isShowBtn, limitPrice, getExplorer, exportFn, aToExport, downloadIamge, orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, statusList, serviceStatusList, memberTypeList, stateList, orderTypesList, orderStatusList, setMinHeight }
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
<!-- radio --> <!-- radio -->
<div v-else-if="item.type === 'radio'"> <div v-else-if="item.type === 'radio'">
<el-radio-group v-model="formObj[item.name]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :disabled="item.isDisabled" @change="item.handleRadioChange"> <el-radio-group v-model="formObj[item.name]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :disabled="item.isDisabled" @change="item.handleRadioChange">
<el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :disabled="subItem.isDisabled" :label="subItem[item.optionId]">{{ subItem[item.optionLabel] }} <slot :name="subItem.suffixSonSlot" :scope="subItem"></slot></el-radio> <el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :disabled="subItem.isDisabled" :label="subItem[item.optionId]">{{ subItem[item.optionLabel] }} <slot :name="subItem.suffixSonSlot" :scope="subItem"></slot>
</el-radio>
</el-radio-group> </el-radio-group>
<slot :name="item.suffixSlot" :scope="item"></slot> <slot :name="item.suffixSlot" :scope="item"></slot>
</div> </div>
...@@ -80,7 +81,7 @@ ...@@ -80,7 +81,7 @@
<!-- 地图 --> <!-- 地图 -->
<div v-else-if="item.type === 'map'" class="flex"> <div v-else-if="item.type === 'map'" class="flex">
<Province ref="provinceForm" :subdistrict="subdistrict" :isDisabled="item.isDisabled" @selectProvince="e => handleSelectProvince(e, item)" @selectCity="e => handleSelectCity(e, item)"></Province> <Province ref="provinceForm" :subdistrict="subdistrict" :isDisabled="item.isDisabled" @selectProvince="e => handleSelectProvince(e, item)" @selectCity="e => handleSelectCity(e, item)"></Province>
<el-input style="flex: 1;" v-model="formObj[item.name]" placeholder="请选择商户地址" :disabled="item.isDisabled"></el-input> <el-input style="flex: 1;" v-model="formObj[item.name]" placeholder="请选择商户地址" :readonly="item.isReadonly"></el-input>
<el-button class="m-l-10" v-show="!item.isDisabled" @click="handleSelectMap(item)" type="primary">选择地址</el-button> <el-button class="m-l-10" v-show="!item.isDisabled" @click="handleSelectMap(item)" type="primary">选择地址</el-button>
</div> </div>
</el-form-item> </el-form-item>
...@@ -251,7 +252,8 @@ export default { ...@@ -251,7 +252,8 @@ export default {
// 图片删除 // 图片删除
handleImgDelete(targetItem, subIndex = -1) { handleImgDelete(targetItem, subIndex = -1) {
Array.isArray(this.formObj[targetItem.name]) ? this.formObj[targetItem.name].splice(subIndex, 1) : (this.formObj[targetItem.name] = '') Array.isArray(this.formObj[targetItem.name]) ? this.formObj[targetItem.name].splice(subIndex, 1) : (this.formObj[targetItem.name] = '')
this.$emit('handleImgDelete', targetItem) targetItem.handleDelete && targetItem.handleDelete(subIndex)
// this.$emit('handleImgDelete', targetItem)
}, },
// 图片查看 // 图片查看
handleImgLook(src, targetItem) { handleImgLook(src, targetItem) {
......
...@@ -18,6 +18,7 @@ import tableTooltip from '@/components/table-tooltip/index.vue' ...@@ -18,6 +18,7 @@ import tableTooltip from '@/components/table-tooltip/index.vue'
import glsxRows from '@/components/glsx-rows/index.vue' import glsxRows from '@/components/glsx-rows/index.vue'
import glsxDescriptions from '@/components/glsx-descriptions/index.vue' import glsxDescriptions from '@/components/glsx-descriptions/index.vue'
import selectTag from '@/components/selectTag/index.vue' import selectTag from '@/components/selectTag/index.vue'
import searchForm from '@/components/search-form/index.vue'
Vue.component('glsx-combi-form', glsxCombiForm) Vue.component('glsx-combi-form', glsxCombiForm)
Vue.component('glsx-dialog', glsxDialog) Vue.component('glsx-dialog', glsxDialog)
...@@ -29,3 +30,4 @@ Vue.component('table-tooltip', tableTooltip) ...@@ -29,3 +30,4 @@ Vue.component('table-tooltip', tableTooltip)
Vue.component('glsx-rows', glsxRows) Vue.component('glsx-rows', glsxRows)
Vue.component('glsx-descriptions', glsxDescriptions) Vue.component('glsx-descriptions', glsxDescriptions)
Vue.component('select-tag', selectTag) Vue.component('select-tag', selectTag)
Vue.component('search-form', searchForm)
\ No newline at end of file \ No newline at end of file
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
let cfg = require('./conf.js') let cfg = require('./conf.js')
import { Http } from 'glsx-common' import { Http } from 'glsx-common'
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function (isEnv = true) { export const fetchConfig = function(isEnv = true) {
// if (isEnv) { // if (isEnv) {
// let { request } = cfg // let { request } = cfg
// Object.assign(request, { timeout }) // Object.assign(request, { timeout })
......
...@@ -33,4 +33,3 @@ export const http = params => Vue.prototype.$http(params) ...@@ -33,4 +33,3 @@ export const http = params => Vue.prototype.$http(params)
export const http2 = params => Vue.prototype.$http2(params) export const http2 = params => Vue.prototype.$http2(params)
export const http_common = params => Vue.prototype.$http_common(params) export const http_common = params => Vue.prototype.$http_common(params)
export const http_merchant = params => Vue.prototype.$http_merchant(params) export const http_merchant = params => Vue.prototype.$http_merchant(params)
export const http_xiaolong = params => Vue.prototype.$http_xiaolong(params)
export default {
data() {
return {
crowdGroupUnitList: []
}
},
mounted() {},
methods: {
async queryCrowdGroupTree(isHead) {
let params = {
req: {
pageSize: 1000,
pageNum: 1,
merchantId: this.$globalState.session.merchantId,
keyword: ''
}
}
const crowdGroupUnitList = await this.$apis.activity.queryCrowdGroupTree(params)
console.log(crowdGroupUnitList)
return isHead ? [{ crowdGroupName: '默认客群', crowdGroupId: '0' }].concat(crowdGroupUnitList.crowdGroupUnitList) : crowdGroupUnitList.crowdGroupUnitList
},
async queryCrowdTree() {
const commonParam = { pageSize: 1000, pageNum: 1, merchantId: this.$globalState.session.merchantId }
const params1 = {
req: {
crowdType: 1,
...commonParam
}
}
const params2 = {
req: {
...commonParam,
crowdType: 2
}
}
const crowdUnitList1 = this.$apis.activity.queryCrowdTree(params1)
const crowdUnitList2 = this.$apis.activity.queryCrowdTree(params2)
const crowdUnitList = await Promise.all([crowdUnitList1, crowdUnitList2])
/*
groupArr: 勾选的人群
checked: 是否展开
isIndeterminateGroup:树节点选中
gruopCheckAll: 全选
selectGroup:右边树的选中数据
*/
this.crowdUnitList = [
{ crowdName: '推荐人群', children: crowdUnitList[0] },
{ crowdName: '自定义人群', children: crowdUnitList[1] }
]
return this.crowdUnitList
}
}
}
...@@ -27,7 +27,7 @@ Vue.use(GLTableButton) ...@@ -27,7 +27,7 @@ Vue.use(GLTableButton)
Vue.use(GLEditor) Vue.use(GLEditor)
Vue.use(GLDialog) Vue.use(GLDialog)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) { export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, request2, sign, secret, sign_common, request_common, request_merchant, xiaolong_req } = await fetchConfig(false) const { response, request, request2, sign, secret, sign_common, request_common, request_merchant } = await fetchConfig(false)
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
...@@ -40,7 +40,7 @@ export async function bootstrap({ history, common, messenger, globalState, route ...@@ -40,7 +40,7 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue.prototype.$http2 = new common.Http({ response, request: request2, 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_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_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.$http_xiaolong = new common.Http({ response, request: xiaolong_req, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$tracker = common.tracker Vue.prototype.$tracker = common.tracker
// const myToken = 'scrm-base-107ee03c-1214-48c3-a443-a2332e553b2f-rop' // 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.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: myToken } })
......
.inline-b {
display: inline-block;
}
.pull-right {
float: right;
}
.green-text {
color: #00A854;
}
.gray-text{
color:#666666;
margin-left:6px;
}
.red-text {
color: rgb(255, 0, 0);
}
.blue-text{
color:$btnBlue;
&:hover{
color: #9994FF;
cursor: pointer;
}
}
.pure-blue-text{
color:$btnBlue!important;
}
.green {
background-color: #00A854;
}
.red {
color: rgb(255, 0, 0);
}
.flex-center{
display: flex;
justify-content: center;
align-items: center;
}
.additional-text{
height: 22px;
font-size: 16px;
font-weight: 400;
color: #666666;
line-height: 22px;
}
.btn-blue {
height: 32px;
background: $btnBlue;
border-radius: 4px;
color: #fff;
font-size: 14px;
font-weight: 400;
color: #FFFFFF;
padding: 6px 27px;
}
// 单行省略
.ellipsis-1 {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
/* for Opera */
}
// 我这里以两行为例,该方法基本兼容市场上面所有主流浏览器。
.ellipsis-2 {
overflow: hidden;
height: 40px;
line-height: 20px;
position: relative;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*显示的行数*/
}
.ellipsis-2-text:after {
content: "...";
position: absolute;
bottom: 0;
right: 15px;
padding-left: 20px;
background: -webkit-linear-gradient(left, transparent, #fff 55%);
/*我在Safari上测试时发现透明到白色中间会有一个黑色的过渡后来我就写成-webkit-linear-gradient(left,rgba(255,255,255,0),rgba(255,255,255,1) 55%)*/
background: -o-linear-gradient(left, transparent, #fff 55%);
background: -moz-linear-gradient(left, transparent, #fff 55%);
background: linear-gradient(to right, transparent, #fff 55%);
}
.ellipsis-4{
overflow: hidden;
height: 40px;
line-height: 20px;
position: relative;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 4;
}
.ellipsis-4-text:after {
content: "...";
position: absolute;
bottom: 0;
right: 15px;
padding-left: 20px;
background: -webkit-linear-gradient(left, transparent, #fff 55%);
/*我在Safari上测试时发现透明到白色中间会有一个黑色的过渡后来我就写成-webkit-linear-gradient(left,rgba(255,255,255,0),rgba(255,255,255,1) 55%)*/
background: -o-linear-gradient(left, transparent, #fff 55%);
background: -moz-linear-gradient(left, transparent, #fff 55%);
background: linear-gradient(to right, transparent, #fff 55%);
}
.statusText {
vertical-align: middle;
}
\ No newline at end of file \ No newline at end of file
@import "./variables.scss";
@import "./common.scss";
@import "./resetelement.scss";
body,
html {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
background-color: $bgColor;
}
// #app {
// height: 100%;
// overflow: auto;
// }
// html, body, #app {
// width: 100%;
// height: 100%;
// }
// 默认去掉所有p元素的上下边距
p {
margin-top: 0;
margin-bottom: 0;
}
button {
border: none;
&:hover {
cursor: pointer;
}
}
// 子系统不设外边距
.scrm-sub-client-container {
// padding: 0 20px 20px 40px;
box-sizing: border-box;
}
.el-table .cell {
// line-height: 20px!important;
}
.el-select {
width: 100%;
}
.el-pagination {
display: flex;
margin-top: 18px;
}
.el-message-box__btns .el-button--small {
min-width: 68px;
}
.glsx-table .el-pagination.is-background .el-pager li:not(.disabled).active {
background-color: $btnBlue;
color: #fff;
}
/deep/ .el-input__inner:focus {
border-color: $btnBlue !important;
}
/deep/.el-range-editor.is-active,
.el-range-editor.is-active:hover {
border-color: $btnBlue;
}
.el-message-box {
width: 547px;
height: 310px;
box-sizing: border-box;
padding-bottom: 10px;
}
.el-message-box__title {
padding-left: 0;
margin-bottom: 0;
font-size: 20px;
line-height: 1;
color: #333;
}
.el-message-box__title {
display: block !important;
}
.el-message-box__headerbtn {
display: block !important;
color: #666666;
}
.el-message-box__header {
position: relative;
padding: 15px 20px;
border-bottom: 1px solid #e6e6e6;
}
.el-message-box__content {
text-align: center;
padding: 60px 0;
}
.el-icon-warning {
display: block !important;
font-size: 33px !important;
color: #5850ff !important;
position: relative;
left: 50%;
transform: translateX(-50%);
margin-bottom: 12px;
}
// .el-message-box__status.el-icon-error {
// display: block !important;
// font-size: 33px !important;
// position: relative;
// left: 50%;
// transform: translateX(-50%);
// margin-bottom: 12px;
// }
.el-tooltip__popper.is-dark {
background: #666666 !important;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06) !important;
font-size: 12px;
font-weight: 400;
color: #ffffff;
line-height: 18px;
}
.el-tooltip__popper[x-placement^="top"] .popper__arrow {
border-top-color: #666666 !important;
}
.el-tooltip__popper[x-placement^="top"] .popper__arrow:after {
border-top-color: #666666 !important;
}
\ No newline at end of file \ No newline at end of file
$bgColor:#F4F5FA;
$btnBlue:#5850ff;
$lightBtnBlue:#9994FF;
<template>
<div class="activity-main">
<el-drawer class="activity-drawer" size="50%" title="配置企微营销" :visible.sync="drawer" :before-close="handleClose">
<div class="market-container">
<div v-if="title || $slots.title">
<slot name="title">{{ title }}</slot>
</div>
<div class="market-title">营销内容</div>
<div class="market-content" v-if="drawer">
<GLEditor ref="welcome" :form="'customer'" :btnList="btnList" @previewWord="previewForm"></GLEditor>
</div>
</div>
<div class="drawer-btn">
<el-button @click="drawer = false" size="small">
取消
</el-button>
<el-button type="primary" @click="handleSaveConfig" size="small">提交</el-button>
</div>
</el-drawer>
</div>
</template>
<script>
const ATT_TYPE = {
TEXT: 1,
IMAGE: 2,
VEDIO: 3,
URL: 4,
MINIPROGRAM: 5,
FILE: 6,
ACTIVITY: 7,
MATERIAL: 10
}
export default {
name: 'marketConfig',
props: {
title: {
type: String,
default: ''
},
boxHeight: {
type: Number,
default: 200
}
},
data() {
return {
drawer: false,
welcomeStatus: false,
btnList: [
{
name: '表情',
funcName: '',
type: 'expression',
limitSize: 10
},
{
name: '图片',
funcName: '',
type: 'img',
// togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
// limitSize: 10, //限制图片大小
// limitNum: 2, //限制图片数量
// limitWidth: 10000, //限制单张图片宽度
// limitHeight: 10000,//限制单张图片高度
// Isdraggable: true, //图片拖拽
uploadApi: this.$apis.common.pictureUpload
},
// {
// name: '视频',
// funcName: '',
// type: 'video',
// // limitSize: 10,//限制视频大小
// // togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
// // limitNum: 2,//限制视频数量
// // limitWidth: 10000,//限制视频宽度
// // limitHeight: 10000,//限制视频高度
// // limitTime: 2,//限制视频时长
// uploadApi: this.$apis.common.pictureUpload
// },
// {
// name: '昵称',
// type: 'nickname',
// funName: 'nickname'
// },
{
name: '活动',
type: 'activity',
funName: 'activity',
funParams: [
{
itemName: '权益卡试用',
itemValue: 3,
itemType: 'card',
getInterfaceApi: this.$apis.welcomeword.getCard,
params: {
tryAble: 1,
merchantId: this.$globalState.session.merchantId
}
},
{
itemName: '权益套餐',
itemValue: 4,
itemType: 'package',
getInterfaceApi: this.$apis.welcomeword.getPackage,
params: {}
},
{
itemName: '商城券',
itemValue: 2,
itemType: 'coupon',
getInterfaceApi: this.$apis.welcomeword.getMerchant,
params: {
discountTypes: [2, 3, 4],
directionalFlag: 1, // 1所有人可用2定向礼包专用3关联优惠券
validType: 'valid'
}
},
{
itemName: '秒杀活动',
itemValue: 5,
itemType: 'activity',
getInterfaceApi: this.$apis.welcomeword.getActivity,
params: {
activityStatus: 2,
currentPage: 1
}
},
{
itemName: '无忧服务',
itemValue: 6,
itemType: 'merchant',
getInterfaceApi: this.$apis.welcomeword.merchant,
merchantOpen: {
merchantOpenApi: this.$apis.welcomeword.merchantOpen,
params: {
merchantId: this.$globalState.session.merchantId
}
},
params: {
merchantId: this.$globalState.session.merchantId
}
}
]
},
// {
// name: '质保卡',
// type: 'link',
// funName: 'link',
// text: '车主朋友,您好!<br>我是您的福利官,欢迎您领取电子质保卡,<br>请点击下方链接进行领取及查看:<br><span style="color:#409eff;">https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/</span><br>祝您用车愉快!<br>'
// },
// {
// name: '素材',
// type: 'material',
// funName: 'material',
// groupListApi: this.$apis.welcomeword.getGroupListApi,
// materialListApi: this.$apis.welcomeword.getMaterialListApi,
// // videoNo: true
// pdfNo: true
// },
{
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
}
]
}
},
watch: {
drawer(val) {
if (!val) {
let previewList = this.$refs.welcome.previewList
previewList.map(item => {
if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
}
})
this.$emit('handleConfigChecked', previewList)
}
}
},
methods: {
init(previewList) {
this.drawer = true
this.$nextTick(() => {
previewList.map(item => {
if (item.attType == 7) {
item.attContent = JSON.parse(item.attContent)
}
})
this.$refs.welcome.updateList(previewList)
})
},
handleSaveConfig() {
this.drawer = false
}
}
}
</script>
<style lang="scss" scoped>
.activity-drawer {
z-index: 3000 !important;
/deep/ .el-drawer__header {
border-bottom: 1px solid #e6e6e6;
padding: 18px 20px;
margin-bottom: 20px;
}
}
.market-container {
padding: 0px 20px 20px;
height: calc(100% - 64px);
}
.market-title {
font-size: 16px;
font-weight: 400;
color: #333333;
line-height: 24px;
margin-bottom: 10px;
}
.drawer-btn {
display: flex;
align-items: center;
justify-content: flex-end;
padding-right: 20px;
height: 64px;
border-top: 1px solid #e6e6e6;
}
</style>
<style>
.el-select-dropdown {
z-index: 3001 !important;
}
</style>
<template>
<div class="activity-main">
<div class="activity-main-header">
活动管理
<label>系统将自动推送基于门店重点招揽人群的活动清单,门店可将客户批量分配给指定员工进行跟进。</label>
</div>
<div class="activity-tabel scrm-box-f">
<div class="activity-tabel-form">
<GLCombiForm :rowNumber="1" ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable @setTableFinishFun="setTableFinishFun" :noDataImg="url" ref="taskForm" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDistribution(scope.scope)">任务分配</el-button>
<!-- <GLButton :disabled="scope.scope.imStatus!=1" type="text" @click="handleStatistics(scope.scope)" fn="营销统计">营销统计</GLButton> -->
</div>
</GLTable>
</div>
</div>
</div>
</template>
<script>
import url from '@/assets/activity/empty.png'
import crowd from '@/mixins/crowd'
export default {
name: 'activity',
mixins: [crowd],
data() {
return {
url: url,
tableSearchForm: {
groupTypeId: '',
activityName: '',
createTime: ''
},
searchFormData: [
{
label: '人群类型',
name: 'groupTypeId',
type: 'select',
placeholder: '请选择',
optionId: 'crowdGroupId',
optionLabel: 'crowdGroupName',
optionList: []
},
{
label: '活动名称',
name: 'activityName',
type: 'input',
placeholder: '输入关键字搜索'
},
{
label: '创建时间',
name: 'createTime',
type: 'datePicker',
placeholder: '',
isClear: true,
pickerOptions: {
disabledDate: time => {
return time.getTime() > Date.now()
}
}
}
],
pickerOptions: {
disabledDate: time => {
return time.getTime() > Date.now()
}
},
createTime: '',
dialogVisible: true,
getListApi: this.$apis.activity.activityPageList,
tableParams: {
tableOption: false,
checkSelectKey: 'id',
checkSelectVal: [],
hasNum: false,
listName: 'data',
tableColumns: [
{
label: '活动名称',
prop: 'activityName',
width: 300,
line: 1
},
{
label: '人群类型',
prop: 'groupTypeIdName',
width: 200,
line: 1
},
{
label: '客户总数',
prop: 'customerCount'
},
{
label: '已跟进',
prop: 'followCustomerCount'
},
{
label: '已到店',
prop: 'retCustomerCount'
},
{
label: '创建日期',
prop: 'createdTime',
width: '220px'
},
{
label: '操作',
prop: 'optionBtns',
width: '90px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: []
}
}
},
async mounted() {
this.searchFormData.find(item => (item.name = 'groupTypeId')).optionList = await this.queryCrowdGroupTree(1)
},
methods: {
handleSearch() {
this.$refs.taskForm.refreshTable()
},
handleReset() {
this.tableSearchForm = {}
this.$refs.taskForm.refreshTable()
},
beforeSearchFn() {
return new Promise(resolve => {
if (this.tableSearchForm.createTime) {
this.tableSearchForm.startTime = new Date(this.tableSearchForm.createTime[0]).toLocaleDateString().replace(/-/g, '/')
this.tableSearchForm.endTime = new Date(this.tableSearchForm.createTime[1]).toLocaleDateString().replace(/-/g, '/')
} else {
delete this.tableSearchForm.startTime
delete this.tableSearchForm.endTime
}
delete this.tableSearchForm.createTime
resolve()
})
},
setTableFinishFun() {
this.$refs.taskForm.data.length ? (this.$refs.taskForm.tableHeightValues = '') : this.$refs.taskForm.setTableHeightFun()
},
handleDistribution(scope) {
this.$router.push('/activity/distribution?id=' + scope.id)
}
}
}
</script>
<style lang="scss" scoped>
.activity-main-header {
font-size: 20px;
color: #333333;
line-height: 32px;
font-weight: 600;
label {
font-size: 14px;
color: #666666;
line-height: 32px;
font-weight: 400;
margin-left: 16px;
}
img {
width: 14px;
height: 14px;
margin-top: 8px;
}
}
.dialog-wrap-box {
z-index: 2001;
position: fixed;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
background: rgba(0, 0, 0, 0.5);
.dialog-wrap-panel {
background: #ffffff;
position: absolute;
top: 50%;
left: 10%;
transform: translateY(-50%);
height: 360px;
width: 80%;
.dialog-wrap-items {
position: relative;
display: flex;
width: 100%;
height: 360px;
.footer-btn {
cursor: pointer;
position: absolute;
bottom: -50px;
left: 50%;
text-align: center;
width: 120px;
margin-left: -60px;
height: 34px;
line-height: 34px;
background: #5850ff;
border-radius: 4px;
font-size: 14px;
color: #ffffff;
}
}
.dialog-wrap-item {
padding: 30px;
width: 33.33%;
text-align: center;
border-right: 1px solid #eeeeee;
.dialog-item-title {
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 22px;
}
img {
width: 200px;
height: auto;
margin: 20px;
}
.dialog-item-content {
font-size: 14px;
width: 240px;
margin: 0 auto;
font-weight: 400;
color: #333333;
line-height: 20px;
}
}
}
}
.activity-title {
font-size: 20px;
font-weight: 600;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
img {
width: 14px;
height: 14px;
margin-top: 5px;
}
}
.activity-num-box {
height: 102px;
margin: 20px 0px;
background: #ffffff;
display: flex;
.activity-num-item {
width: 33.33%;
padding-left: 20px;
.activity-num-title {
margin-top: 20px;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
}
.activity-num-count {
font-size: 30px;
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
line-height: 38px;
}
}
}
.coustom-box {
margin-top: 20px;
display: flex;
&-item {
box-sizing: border-box;
width: 25%;
margin-right: 20px;
padding: 20px;
height: 334px;
background: #ffffff;
text-align: center;
&:last-child {
margin-right: 0px;
}
.coustom-box-title {
font-size: 20px;
font-weight: 500;
color: #424242;
line-height: 28px;
letter-spacing: 1px;
margin: 10px;
}
.coustom-echart {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 20px;
.coustom-echart-desc {
margin-left: 10px;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
.coustom-echart-num {
font-size: 20px;
}
}
}
.coustom-box-content {
font-size: 14px;
font-weight: 500;
color: #a3a3a3;
line-height: 20px;
text-align: left;
height: 110px;
}
.coustom-box-config {
margin: 10px auto;
display: inline-block;
border-radius: 4px;
border: 1px solid #5850ff;
padding: 7px 28px;
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 14px;
}
}
}
.activity-tabel {
padding: 20px;
margin-top: 20px;
/deep/ {
.el-date-editor.el-input,
.el-date-editor.el-input__inner {
// width: 220px;
}
.el-form-item {
margin-right: 20px;
}
.noDataImg {
width: 400px;
height: 160px;
}
}
}
</style>
...@@ -807,6 +807,7 @@ export default { ...@@ -807,6 +807,7 @@ export default {
method = 'createCouponApi' //后台创建优惠券 method = 'createCouponApi' //后台创建优惠券
} }
console.log(params) console.log(params)
this.loading = true
this.$apis.couponManage[method](params).then(res => { this.$apis.couponManage[method](params).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
...@@ -816,6 +817,9 @@ export default { ...@@ -816,6 +817,9 @@ export default {
this.cancelJump() this.cancelJump()
} }
}) })
.finally(() => {
this.loading = false
})
} }
}) })
}, },
......
...@@ -566,6 +566,7 @@ export default { ...@@ -566,6 +566,7 @@ export default {
} else { } else {
method = 'createCouponApi' //后台创建优惠券 method = 'createCouponApi' //后台创建优惠券
} }
this.loading = true
this.$apis.couponManage[method](params).then(res => { this.$apis.couponManage[method](params).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
...@@ -575,6 +576,9 @@ export default { ...@@ -575,6 +576,9 @@ export default {
this.cancelJump() this.cancelJump()
} }
}) })
.finally(() => {
this.loading = false
})
} }
}) })
}, },
......
...@@ -457,6 +457,7 @@ export default { ...@@ -457,6 +457,7 @@ export default {
} else { } else {
method = 'createCouponApi' //后台创建优惠券 method = 'createCouponApi' //后台创建优惠券
} }
this.loading = true
this.$apis.couponManage[method](params).then(res => { this.$apis.couponManage[method](params).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
...@@ -466,6 +467,9 @@ export default { ...@@ -466,6 +467,9 @@ export default {
this.cancelJump() this.cancelJump()
} }
}) })
.finally(() => {
this.loading = false
})
} }
}) })
}, },
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="topMsg"> <div class="topMsg">
<p class="pageTitle">基本信息</p> <p class="pageTitle">基本信息</p>
</div> </div>
<div class="live-room container" style="padding-top: 20px;"> <div class="live-room container" style="padding-top: 20px;" v-loading="sloading">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm"> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm">
<el-form-item size="small" label="服务名称" prop="couponName" style="width: 440px" id="couponName"> <el-form-item size="small" label="服务名称" prop="couponName" style="width: 440px" id="couponName">
<el-input size="small" :disabled="disabledContent" v-model.trim="ruleForm.couponName" maxlength="20" placeholder="请输入服务名称,如“精洗轿车”"></el-input> <el-input size="small" :disabled="disabledContent" v-model.trim="ruleForm.couponName" maxlength="20" placeholder="请输入服务名称,如“精洗轿车”"></el-input>
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
</div> </div>
<GLFooter> <GLFooter>
<el-button @click="goBack" size="medium">取消</el-button> <el-button @click="goBack" size="medium">取消</el-button>
<el-button type="primary" v-if="showSubmit" @click="submitForm('ruleForm')" size="medium" :loading="loading">提交</el-button> <el-button type="primary" v-if="showSubmit" @click="submitForm('ruleForm')" size="medium" :loading="sloading">提交</el-button>
</GLFooter> </GLFooter>
<!-- :hasScroll="false" :noBtnOk="true" :noCancel="true" :noClose="false" --> <!-- :hasScroll="false" :noBtnOk="true" :noCancel="true" :noClose="false" -->
<glsx-dialog title="" top="30vh" :hasScroll="false" width="547px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleConfirm"> <glsx-dialog title="" top="30vh" :hasScroll="false" width="547px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleConfirm">
...@@ -209,6 +209,7 @@ export default { ...@@ -209,6 +209,7 @@ export default {
}, 1000) }, 1000)
} }
return { return {
timer: Function,
isEdit: false, isEdit: false,
showSubmit: true, showSubmit: true,
disabledDescription: false, disabledDescription: false,
...@@ -402,6 +403,8 @@ export default { ...@@ -402,6 +403,8 @@ export default {
}, },
submitForm(formName) { submitForm(formName) {
clearTimeout(this.timer)
this.timer = setTimeout(() => {
this.$refs[formName].validate((valid, errorObj) => { this.$refs[formName].validate((valid, errorObj) => {
var merchantval = true var merchantval = true
var merchantErrorObj = [] var merchantErrorObj = []
...@@ -426,6 +429,7 @@ export default { ...@@ -426,6 +429,7 @@ export default {
return false return false
} }
}) })
},500)
}, },
//创建服务 //创建服务
createService() { createService() {
...@@ -494,20 +498,15 @@ export default { ...@@ -494,20 +498,15 @@ export default {
createService(params) createService(params)
.then(res => { .then(res => {
if (res.code == 0) { if (res.code == 0) {
this.sloading = false
this.$message.success('操作成功') this.$message.success('操作成功')
this.$router.push('/couponManage/index') this.$router.push('/couponManage/index')
} else { } else {
this.sloading = false
this.$message({ this.$message({
type: 'error', type: 'error',
message: res.message message: res.message
}) })
} }
}) })
.catch(err => {
this.sloading = false
})
.finally(() => { .finally(() => {
this.sloading = false this.sloading = false
}) })
...@@ -526,20 +525,15 @@ export default { ...@@ -526,20 +525,15 @@ export default {
updateService(param) updateService(param)
.then(res => { .then(res => {
if (res.code == 0) { if (res.code == 0) {
this.sloading = false
this.$message.success('编辑服务成功') this.$message.success('编辑服务成功')
this.$router.push('/couponManage/index') this.$router.push('/couponManage/index')
} else { } else {
this.sloading = false
this.$message({ this.$message({
type: 'error', type: 'error',
message: res.message message: res.message
}) })
} }
}) })
.catch(err => {
this.sloading = false
})
.finally(() => { .finally(() => {
this.sloading = false this.sloading = false
}) })
......
...@@ -273,6 +273,16 @@ export default { ...@@ -273,6 +273,16 @@ export default {
params: { params: {
merchantId: this.$globalState.session.merchantId merchantId: this.$globalState.session.merchantId
} }
},
{
itemName: '众筹活动',
itemValue: 7,
itemType: 'crowdfunding',
getInterfaceApi: this.$apis.welcomeword.crowdfundingActivity,
params: {
currentPage: 1,
activityStatus: 2
}
} }
] ]
}, },
...@@ -379,7 +389,7 @@ export default { ...@@ -379,7 +389,7 @@ export default {
previewForm(val) { previewForm(val) {
console.log(val) console.log(val)
const value = this.$common.utils.deepClone(val) const value = this.$common.utils.deepClone(val)
if (!value[0].attContent) value.splice(0, 1) if (value[0] && !value[0].attContent) value.splice(0, 1)
this.previewVal = value this.previewVal = value
}, },
handleCancel() { handleCancel() {
...@@ -444,7 +454,7 @@ export default { ...@@ -444,7 +454,7 @@ export default {
if (previewList.length != 0) { if (previewList.length != 0) {
this.basicForm.attachmentList = previewList this.basicForm.attachmentList = previewList
} }
if (this.basicForm.attachmentList && this.basicForm.attachmentList.length) { if (this.basicForm.attachmentList && this.basicForm.attachmentList.length && this.basicForm.attachmentList[0].attType == 1 && this.basicForm.attachmentList[0].attContent != "") {
if (this.basicForm.attachmentList.length > 9) { if (this.basicForm.attachmentList.length > 9) {
return (this.attachmentText = '附件不可超过9个') return (this.attachmentText = '附件不可超过9个')
} else { } else {
...@@ -477,11 +487,14 @@ export default { ...@@ -477,11 +487,14 @@ export default {
}) })
item.attContent = replaceImg.substring(0, 600) item.attContent = replaceImg.substring(0, 600)
} else if (item.attType == 7) { } else if (item.attType == 7) {
if (item.attContent.title) {
item.attType = 4
params.crowdFunding = true
}
item.attContent = JSON.stringify(item.attContent) item.attContent = JSON.stringify(item.attContent)
} }
return item return item
}) })
console.log(params)
params.attachmentList = attachmentList params.attachmentList = attachmentList
if (params.sendType == 2) { if (params.sendType == 2) {
params.sendTimeStr = this.basicForm.sendTime + ' ' + this.basicForm.sendDate params.sendTimeStr = this.basicForm.sendTime + ' ' + this.basicForm.sendDate
...@@ -502,7 +515,7 @@ export default { ...@@ -502,7 +515,7 @@ export default {
type: 'success', type: 'success',
message: '操作成功!' message: '操作成功!'
}) })
this.$tracker.track(Object.assign({},{pageName:'群发助手',name:'新建客户群发',params})) this.$tracker.track(Object.assign({}, { pageName: '群发助手', name: '新建客户群发', params }))
} else { } else {
this.$message({ this.$message({
type: 'error', type: 'error',
......
...@@ -121,7 +121,14 @@ ...@@ -121,7 +121,14 @@
</div> </div>
</div> </div>
</div> </div>
<div class="title">数据统计</div> <div class="data">
<div class="titles">数据统计</div>
<div style="cursor:pointer;" @click="refreshData">
<i class="el-icon-refresh-right"></i>
<span style="margin-right: 8px;">更新数据</span>
</div>
<span style="color: #999;" v-if="time">更新于 {{time}}</span>
</div>
<div class="statistics-info"> <div class="statistics-info">
<div class="statistics-ul"> <div class="statistics-ul">
<div class="statistics-li statistics-border"> <div class="statistics-li statistics-border">
...@@ -201,7 +208,9 @@ export default { ...@@ -201,7 +208,9 @@ export default {
condition: {} condition: {}
}, },
statistic: {}, statistic: {},
limitUserList: [] limitUserList: [],
time: '',
timeId: Function
} }
}, },
watch: { watch: {
...@@ -216,6 +225,7 @@ export default { ...@@ -216,6 +225,7 @@ export default {
mounted() { mounted() {
this.getCustomerDetail(this.id) this.getCustomerDetail(this.id)
this.getStatistic() this.getStatistic()
this.time = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
// console.log(this.basicInfo.condition, '----') // console.log(this.basicInfo.condition, '----')
}, },
computed: { computed: {
...@@ -242,6 +252,20 @@ export default { ...@@ -242,6 +252,20 @@ export default {
this.eventBus.$emit('update', previewList) this.eventBus.$emit('update', previewList)
}) })
}, },
refreshData() {
clearTimeout(this.timeId)
this.timeId = setTimeout(() => {
const { id } = this
this.$apis.customerTransform.renewStatistic({ id }).then(res => {
if (res.code == 0) {
this.getStatistic()
this.time = res.data.createdTime
this.$emit('handleSelect')
this.$emit('handleCustomSelect')
}
})
}, 1500)
},
getStatistic() { getStatistic() {
const { id, form } = this const { id, form } = this
if (form == 'customer') { if (form == 'customer') {
...@@ -418,4 +442,18 @@ export default { ...@@ -418,4 +442,18 @@ export default {
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
} }
.titles {
font-size: 16px;
font-weight: 600;
color: #333;
margin-right: 10px;
}
.data {
padding: 20px 0 17px 20px;
border-bottom: 1px solid #d8d8d8;
display: flex;
align-items: center;
font-size: 14px;
color: #5850FF
}
</style> </style>
...@@ -7,13 +7,14 @@ ...@@ -7,13 +7,14 @@
<template v-if="item.attType == 1"> <template v-if="item.attType == 1">
<div class="preview-text text" v-html="item.attContent"></div> <div class="preview-text text" v-html="item.attContent"></div>
</template> </template>
<template v-else-if="item.attType == 7"> <template v-else-if="item.attType == 7 || item.attType == 4">
<div class="preview-activity"> <div class="preview-activity">
<div class="activity-name">{{ item.attContent.marketingName }}</div> <div class="activity-name">{{ item.attContent.marketingName }}</div>
<img v-if="item.attContent.marketingType != 5 && item.attContent.marketingType != 6" class="activity-logo" src="@/assets/guestCustom/activity-logo.png" alt /> <img v-if="item.attContent.marketingType != 5 && item.attContent.marketingType != 6 && item.attContent.marketingType != 7" class="activity-logo" src="@/assets/guestCustom/activity-logo.png" alt />
<img v-if="item.attContent.marketingType == 5" class="activity-logo" src="@/assets/guestCustom/activity-spike.png" alt /> <img v-if="item.attContent.marketingType == 5" class="activity-logo" src="@/assets/guestCustom/activity-spike.png" alt />
<img v-if="item.attContent.marketingType == 6" class="activity-logo" src="@/assets/guestCustom/activity-service.png" alt /> <img v-if="item.attContent.marketingType == 6" class="activity-logo" src="@/assets/guestCustom/activity-service.png" alt />
<div class="activity-footer"> <img v-if="item.attContent.marketingType == 7" class="link-logo" src="@/assets/guestCustom/link.png" alt />
<div class="activity-footer" v-if="item.attContent.marketingType != 7">
<img src="@/assets/guestCustom/applet-footer.png" alt /> <img src="@/assets/guestCustom/applet-footer.png" alt />
</div> </div>
</div> </div>
...@@ -78,11 +79,11 @@ export default { ...@@ -78,11 +79,11 @@ export default {
} else if (index >= 10 && index < 100) { } else if (index >= 10 && index < 100) {
index = '0' + index index = '0' + index
} }
return `<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">` return `<img style="width: 16px;height: 16px;vertical-align: middle;" src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
}) })
item.attContent = htm item.attContent = htm
} else if (item.attType != 2 && item.attType != 3) { } else if (item.attType != 2 && item.attType != 3 && item.attType != 7) {
console.log(item.attContent, JSON.parse(item.attContent).fileName) // console.log(item.attContent, JSON.parse(item.attContent).fileName)
item.attContent = JSON.parse(item.attContent) item.attContent = JSON.parse(item.attContent)
} }
}) })
...@@ -114,7 +115,7 @@ export default { ...@@ -114,7 +115,7 @@ export default {
} }
</script> </script>
<style lang="scss" scope> <style lang="scss" scoped>
.img-bg { .img-bg {
position: relative; position: relative;
width: 290px; width: 290px;
...@@ -151,11 +152,11 @@ export default { ...@@ -151,11 +152,11 @@ export default {
border-radius: 4px; border-radius: 4px;
word-break: break-all; word-break: break-all;
display: flex; display: flex;
img { // img {
width: 16px; // width: 16px;
height: 16px; // height: 16px;
vertical-align: middle; // vertical-align: middle;
} // }
} }
.text { .text {
display: inline-block; display: inline-block;
...@@ -248,4 +249,10 @@ export default { ...@@ -248,4 +249,10 @@ export default {
} }
} }
} }
.link-logo {
width: 30px;
height: 30px;
margin-left: 131px;
margin-bottom: 5px;
}
</style> </style>
...@@ -246,7 +246,7 @@ export default { ...@@ -246,7 +246,7 @@ export default {
} }
.member-left { .member-left {
width: 800px; width: calc(100% - 286px);
.member-content { .member-content {
border: 1px solid #eee; border: 1px solid #eee;
......
...@@ -249,7 +249,7 @@ export default { ...@@ -249,7 +249,7 @@ export default {
} }
} }
.member-left { .member-left {
width: 800px; width: calc(100% - 286px);
.member-content { .member-content {
border: 1px solid #eee; border: 1px solid #eee;
......
...@@ -16,6 +16,22 @@ ...@@ -16,6 +16,22 @@
<el-form-item label="姓名" style="margin-bottom: 0;"> <el-form-item label="姓名" style="margin-bottom: 0;">
<el-input :size="size" v-model.trim="searchForm.name" @keyup.enter.native="search" clearable placeholder="请输入姓名搜索"></el-input> <el-input :size="size" v-model.trim="searchForm.name" @keyup.enter.native="search" clearable placeholder="请输入姓名搜索"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="跟进专员类型">
<el-select
v-model="searchForm.status"
clearable
:size="size"
placeholder="全部"
>
<el-option
v-for="item in state"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item> <!-- <el-form-item>
<el-checkbox v-model="searchForm.checked">仅看跟进专员</el-checkbox> <el-checkbox v-model="searchForm.checked">仅看跟进专员</el-checkbox>
</el-form-item>--> </el-form-item>-->
...@@ -58,6 +74,8 @@ export default { ...@@ -58,6 +74,8 @@ export default {
props: ['selectData'], props: ['selectData'],
data() { data() {
return { return {
state: [],
stateList: [],
url: url, url: url,
searchForm: {}, searchForm: {},
checked: '', checked: '',
...@@ -125,6 +143,18 @@ export default { ...@@ -125,6 +143,18 @@ export default {
onHidePopover() { onHidePopover() {
this.popoverVisible = false this.popoverVisible = false
}, },
unique(arr) {
let res = new Set()
return arr.filter((item) => {
let id = JSON.stringify(item)
if (res.has(id)) {
return false
} else {
res.add(id)
return true
}
})
},
listDepartmentTree(isFollowerStaff) { listDepartmentTree(isFollowerStaff) {
const params = { addChildrensFlag: true } const params = { addChildrensFlag: true }
this.loading = true this.loading = true
...@@ -145,6 +175,10 @@ export default { ...@@ -145,6 +175,10 @@ export default {
}) })
this.selectData = [] this.selectData = []
} }
res[0].entmicroStaffResponses.forEach(e => {
this.state.push({value: e.followerTypeId, label: e.followerName})
})
this.state = this.unique(this.state)
} else { } else {
this.treeData = [] this.treeData = []
} }
...@@ -176,6 +210,7 @@ export default { ...@@ -176,6 +210,7 @@ export default {
this.tableEmpData = [] this.tableEmpData = []
const data = this.currentTreeData const data = this.currentTreeData
const keyword = this.searchForm.name const keyword = this.searchForm.name
const status = this.searchForm.status
let arr = [] let arr = []
// this.loading = true // this.loading = true
console.log(keyword, data, this.tableEmpData) console.log(keyword, data, this.tableEmpData)
...@@ -224,6 +259,17 @@ export default { ...@@ -224,6 +259,17 @@ export default {
}) })
} }
} }
this.stateList = this.tableEmpData
if (status) {
this.tableEmpData = []
this.stateList.forEach(i => {
if (String(i.followerTypeId).indexOf(status) != -1) {
this.tableEmpData.push(i)
}
})
} else {
this.tableEmpData = this.stateList
}
}, },
remove(item) { remove(item) {
// var idx = this.innerTags.findIndex(k => k.id == item.id) // var idx = this.innerTags.findIndex(k => k.id == item.id)
...@@ -289,7 +335,7 @@ export default { ...@@ -289,7 +335,7 @@ export default {
} }
} }
.member-left { .member-left {
width: 800px; width: calc(100% - 286px);
.member-content { .member-content {
border: 1px solid #eee; border: 1px solid #eee;
......
<template> <template>
<div> <div>
<BasicInof :eventBus="eventBus" :id="$route.params.id" :form="'customer'"></BasicInof> <BasicInof :eventBus="eventBus" :id="$route.params.id" :form="'customer'" @handleSelect="handleSelect" @handleCustomSelect="handleCustomSelect"></BasicInof>
<div class="detail-container"> <div class="detail-container">
<div class="detail-modular"> <div class="detail-modular">
<div class="title">员工详情</div> <div class="title">员工详情</div>
......
...@@ -14,6 +14,13 @@ ...@@ -14,6 +14,13 @@
>新建群发</el-button>--> >新建群发</el-button>-->
<GLButton type="primary" :size="size" icon="el-icon-plus" fn="新建客户群发" @click="btnClick('create', 1)">新建群发</GLButton> <GLButton type="primary" :size="size" icon="el-icon-plus" fn="新建客户群发" @click="btnClick('create', 1)">新建群发</GLButton>
<div class="text">企业统一选择要发送的客户,由添加客户的成员确认后发送给客户,消息内容仅管理员和负责人可创建。</div> <div class="text">企业统一选择要发送的客户,由添加客户的成员确认后发送给客户,消息内容仅管理员和负责人可创建。</div>
<div class="renew">
<div style="cursor:pointer;" @click="refreshData('1')">
<i class="el-icon-refresh-right"></i>
<span style="margin-right: 8px;">更新数据</span>
</div>
<span style="color: #999;" v-if="time">更新于 {{time}}</span>
</div>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable :key="key" ref="customer" :getListApi="customerList" :tableParams="gueastTableParams" :pageConf="gueastPageConf"> <GLTable :key="key" ref="customer" :getListApi="customerList" :tableParams="gueastTableParams" :pageConf="gueastPageConf">
...@@ -46,6 +53,13 @@ ...@@ -46,6 +53,13 @@
>新建群发</el-button>--> >新建群发</el-button>-->
<GLButton type="primary" :size="size" fn="新建客户群群发" icon="el-icon-plus" @click="btnClick('create', 2)">新建群发</GLButton> <GLButton type="primary" :size="size" fn="新建客户群群发" icon="el-icon-plus" @click="btnClick('create', 2)">新建群发</GLButton>
<div class="text">管理员或负责人统一创建内容,群主收到通知后,可选择他管理的客户群并群发。</div> <div class="text">管理员或负责人统一创建内容,群主收到通知后,可选择他管理的客户群并群发。</div>
<div class="renews">
<div style="cursor:pointer;" @click="refreshData('2')">
<i class="el-icon-refresh-right"></i>
<span style="margin-right: 8px;">更新数据</span>
</div>
<span style="color: #999;" v-if="times">更新于 {{times}}</span>
</div>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable :key="groupKey" ref="customerGroup" :getListApi="customerGroupList" :tableParams="gueastGroupTableParams" :pageConf="gueastPageConf"> <GLTable :key="groupKey" ref="customerGroup" :getListApi="customerGroupList" :tableParams="gueastGroupTableParams" :pageConf="gueastPageConf">
...@@ -82,6 +96,9 @@ export default { ...@@ -82,6 +96,9 @@ export default {
5: '链接' 5: '链接'
} }
return { return {
timeId: Function,
time:'',
times:'',
ATT_TYPE, ATT_TYPE,
activeIndex: 1, activeIndex: 1,
// 表格按钮 // 表格按钮
...@@ -309,16 +326,46 @@ export default { ...@@ -309,16 +326,46 @@ export default {
next(vm => { next(vm => {
const path = from.path const path = from.path
const pathArr = path.split('/') const pathArr = path.split('/')
if (pathArr[2] == 'addCustomerGroup' || pathArr[2] == 'detaiCustomeGroup') vm.activeIndex = 2 if (pathArr[2] == 'addCustomerGroup' || pathArr[2] == 'detaiCustomeGroup') {
vm.activeIndex = 2
}
if (vm.activeIndex == 1) {
vm.time = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
}
}) })
}, },
mounted() { mounted() {
// this.wxTips() // this.wxTips()
}, },
watch: {
activeIndex (newVal,oldVal) {
if (newVal == 2) {
this.times = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
} else if (newVal == 1) {
this.time = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
}
}
},
beforeDestroy() { beforeDestroy() {
this.$message.closeAll() this.$message.closeAll()
}, },
methods: { methods: {
refreshData(type) {
clearTimeout(this.timeId)
this.timeId = setTimeout(() => {
this.$apis.customerTransform.renewDetailList({}).then(res => {
if(res.code == '0'){
if(type == 1) {
this.time = res.data.createdTime
this.$refs.customer.refreshTable()
} else if(type == 2) {
this.times = res.data.createdTime
this.$refs.customerGroup.refreshTable()
}
}
})
}, 1500)
},
switchMenu(val) { switchMenu(val) {
this.$nextTick(() => { this.$nextTick(() => {
this.activeIndex = val this.activeIndex = val
...@@ -448,6 +495,13 @@ export default { ...@@ -448,6 +495,13 @@ export default {
color: #999; color: #999;
margin-left: 20px; margin-left: 20px;
} }
.renew,.renews {
display: flex;
position: absolute;
right: 44px;
font-size: 14px;
color: #5850FF
}
} }
} }
} }
......
<template>
<div class="ly-emotion">
<slot></slot>
</div>
</template>
<script>
import emoji from '@/utils/emo'
export default {
name: 'ly-emotion',
mounted() {
const name = this.$el.innerHTML
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(name)) + 1
if (index < 10) {
index = '00' + index
} else if (index >= 10 && index < 100) {
index = '0' + index
}
let imgHTML = `<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
this.$nextTick(() => {
this.$el.innerHTML = imgHTML
})
}
}
</script>
<style scoped>
.ly-emotion {
display: inline-block;
}
.ly-static-emotion {
width: 24px;
height: 24px;
display: inline-block;
}
</style>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</div> </div>
</div> </div>
</div> </div>
<Preview :eventBus="eventBus" :list.sync="basicInfo.attachmentList"></Preview> <Preview :previewView="previewView" :list.sync="basicInfo.attachmentList"></Preview>
</div> </div>
</div> </div>
</template> </template>
...@@ -98,6 +98,7 @@ export default { ...@@ -98,6 +98,7 @@ export default {
}, },
data() { data() {
return { return {
previewView: '',
updatedTime: '', updatedTime: '',
refreshStatus: false, refreshStatus: false,
STATUS_TYPE: STATUS, STATUS_TYPE: STATUS,
...@@ -133,12 +134,19 @@ export default { ...@@ -133,12 +134,19 @@ export default {
}, },
methods: { methods: {
handleRefresh: utils.debounce(function() { handleRefresh: utils.debounce(function() {
this.getCustomerDetail() this.publicStatus()
this.refreshStatus = true this.refreshStatus = true
setTimeout(() => { setTimeout(() => {
this.refreshStatus = false this.refreshStatus = false
}, 1000) }, 1000)
}, 1000), }, 1000),
publicStatus() {
const id = this.$route.query.id
this.$apis.friendGroup.publicStatus({ id }).then(res => {
this.getCustomerDetail()
this.$emit('refreshList')
})
},
getCustomerDetail() { getCustomerDetail() {
const id = this.$route.query.id const id = this.$route.query.id
this.$apis.friendGroup.momentDetail({ id }).then(res => { this.$apis.friendGroup.momentDetail({ id }).then(res => {
...@@ -153,33 +161,34 @@ export default { ...@@ -153,33 +161,34 @@ export default {
// } // }
return item return item
}) })
this.previewView = previewList
//图片合并 //图片合并
let previewListFilter = previewList.map(item => { // let previewListFilter = previewList.map(item => {
return { // return {
attContent: [item.attContent], // attContent: [item.attContent],
attType: item.attType // attType: item.attType
} // }
}) // })
previewListFilter = previewListFilter.reduce((prev, cur) => { // previewListFilter = previewListFilter.reduce((prev, cur) => {
let index = prev.findIndex(item => item.attType == 2) // let index = prev.findIndex(item => item.attType == 2)
if (index != -1 && prev.length) { // if (index != -1 && prev.length) {
const prevArr = prev.map(tag => { // const prevArr = prev.map(tag => {
let attContent // let attContent
if (tag.attType == 2) { // if (tag.attType == 2) {
attContent = tag.attContent.concat(cur.attContent) // attContent = tag.attContent.concat(cur.attContent)
} else { // } else {
attContent = tag.attContent // attContent = tag.attContent
} // }
return { // return {
attType: tag.attType, // attType: tag.attType,
attContent // attContent
} // }
}) // })
return prevArr // return prevArr
} // }
return prev.concat(cur) // return prev.concat(cur)
}, []) // }, [])
this.eventBus.$emit('update', previewListFilter) // this.eventBus.$emit('update', previewListFilter)
}) })
}, },
getStatistic() { getStatistic() {
......
<!-- 查看产品 - 评价信息 -->
<template>
<div class="comment-detail container edit-container">
<div style="padding: 20px">
<!-- 表格区域 开始 -->
<GLTable ref="commentRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
<div slot="starLevel" slot-scope="scope">
<img v-for="(item, index) in scope.scope.starLevel" :key="index" class="icon-star" src="@/assets/icon-star.png" />
</div>
<div slot="goodsImage" class="table-image" slot-scope="scope">
<span v-if="!scope.scope.imgUrls">-</span>
<img v-else class="img-60" :src="scope.scope.imgUrls[0]" @click="handleImgLook(scope.scope.imgUrls)" />
</div>
</GLTable>
<el-dialog v-if="isImgVisible" title="查看" :visible.sync="isImgVisible" :close-on-click-modal="false">
<div class="dialog-look">
<span v-for="(item, index) in dialogObj.imgUrls" :key="index">
<el-image style="width: 200px; height: 200px; margin-right: 10px" :src="item" :preview-src-list="[item]"></el-image>
</span>
</div>
</el-dialog>
</div>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'commentDetail',
data() {
return {
size: 'small',
url: url,
searchForm: {
goodsId: ''
},
isImgVisible: false,
// imgUrls: [],,
dialogObj: {
imgUrls: [],
uploadType: 'img'
},
// 表格
getListApi: this.$apis.proManage.getGoodsCommentListApi,
tableParams: {
listName: 'list',
tableColumns: [
{
label: '评价用户名称',
prop: 'customerName'
},
{
label: '评价时间',
prop: 'createdDateStr'
},
{
label: '评价星级',
prop: 'starLevel',
addHtml: 'starLevel'
},
{
label: '评价内容',
prop: 'commentContent',
line: 3
},
{
label: '图片',
prop: 'goodsImage',
addHtml: 'goodsImage'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }
}
},
props: {
goodsId: {
type: Object,
default: () => {}
}
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm.goodsId = this.goodsId
resolve()
})
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.commentRef.data.length ? (this.$refs.commentRef.tableHeightValues = '') : this.$refs.commentRef.setTableHeightFun()
},
handleImgLook(imgUrls) {
this.isImgVisible = !this.isImgVisible
this.dialogObj = {
imgUrls: imgUrls,
uploadType: 'img'
}
}
}
}
</script>
<style></style>
<template>
<div>
<div class="emotion-box" :style="{ height: height + 'px' }">
<div class="emotion-box-line" v-for="(line, i) in list" :key="i">
<emotion class="emotion-item" v-for="(item, i) in line" :key="i" @click.native="clickHandler(item)">{{ item }}</emotion>
</div>
</div>
</div>
</template>
<script>
import emoji from '@/utils/emo'
import Emotion from './Emotion'
export default {
props: {
height: {
type: Number,
default: 200
}
},
data() {
return {
list: emoji
}
},
methods: {
clickHandler(i) {
let emotion = `${i}`
this.$emit('emotion', emotion)
}
},
components: {
Emotion
}
}
</script>
<style scoped lang="scss">
.emotion-box {
z-index: 2004;
background-color: #fff;
border-radius: 2px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.15);
width: 300px;
box-sizing: border-box;
padding: 5px;
overflow: hidden;
overflow-y: auto;
}
.emotion-box-line {
display: flex;
}
.emotion-item {
flex: 1;
text-align: center;
cursor: pointer;
line-height: 23px;
/deep/ {
img {
width: 24px;
-webkit-user-select: none;
cursor: default;
pointer-events: none;
}
}
}
</style>
<template> <template>
<div class="img-bg"> <div class="img-bg">
<div class="preview-content"> <div class="preview-content">
<div class="preview-info" v-show="previewList.length"> <div class="preview-info" v-show="previewListFilter.length">
<img class="avatar" src="@/assets/guestCustom/default-customer.png" alt /> <img class="avatar" src="@/assets/guestCustom/default-customer.png" alt />
<div class="preview-box" v-for="item in previewList" :key="item.id"> <div class="preview-box" v-for="item in previewListFilter" :key="item.id">
<div class="preview-box-desc"> <div class="preview-box-desc">
<template v-if="item.attType == 1"> <template v-if="item.attType == 1">
<div class="preview-text text" v-html="item.attContent[0]"></div> <div class="preview-text text" v-html="item.attContent"></div>
</template> </template>
<template v-else-if="item.attType == 7"> <template v-else-if="item.attType == 7">
<div class="preview-text preview-link"> <div class="preview-text preview-link">
...@@ -14,20 +14,20 @@ ...@@ -14,20 +14,20 @@
<div>{{ item.attContent[0].marketingName }}</div> <div>{{ item.attContent[0].marketingName }}</div>
</div> </div>
</template> </template>
<template v-else-if="item.attType == 2 && !previewList.map(k => k.attType).includes(3)" v-for="(imgItem, index) in item.attContent"> <template v-else-if="item.attType == 2" v-for="(imgItem, index) in item.attContent">
<el-image style="width: 52px; height: 52px" class="img-list" :src="imgItem" fit="fit" :key="index" :preview-src-list="item.attContent"></el-image> <el-image style="width: 52px; height: 52px" class="img-list" :src="imgItem" fit="fit" :key="index" :preview-src-list="item.attContent"></el-image>
</template> </template>
<template v-else-if="item.attType == 3"> <template v-else-if="item.attType == 3">
<!-- <el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image> --> <!-- <el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image> -->
<div class="video-panel"> <div class="video-panel">
<video id="video" width="100%" height="100%" preload loop muted> <video id="video" width="100%" height="100%" preload loop muted>
<source :src="item.attContent[0]" type="video/mp4" /> <source :src="item.attContent" type="video/mp4" />
</video> </video>
<i <i
class="el-icon-video-play" class="el-icon-video-play"
@click=" @click="
videoShow = true videoShow = true
videoUrl = item.attContent[0] videoUrl = item.attContent
" "
></i> ></i>
</div> </div>
...@@ -60,7 +60,7 @@ const ATT_TYPE = { ...@@ -60,7 +60,7 @@ const ATT_TYPE = {
import emoji from '@/utils/emo' import emoji from '@/utils/emo'
export default { export default {
name: 'Preview', name: 'Preview',
props: { eventBus: Object }, props: { previewView: Array },
data() { data() {
return { return {
videoShow: false, videoShow: false,
...@@ -70,10 +70,14 @@ export default { ...@@ -70,10 +70,14 @@ export default {
} }
}, },
watch: { watch: {
previewList(val) { previewView: {
console.log(val) handler(val) {
if (val.length && val[0].attType == 1) { const previewVal = this.$common.utils.deepClone(val).filter(item => item)
const attContent = val[0].attContent[0] console.log(previewVal)
this.previewListFilter = []
for (let i in previewVal) {
if (previewVal[i].attType == 1) {
const attContent = previewVal[i].attContent
const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function(res) { const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function(res) {
let word = res.replace(/\[|\]/gi, '') let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity) const list = emoji.flat(Infinity)
...@@ -85,33 +89,34 @@ export default { ...@@ -85,33 +89,34 @@ export default {
} }
return `<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">` return `<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
}) })
val[0].attContent[0] = htm this.previewListFilter.push({
} attType: 1,
//图片合并 attContent: htm
// const previewListFilter = val.map(item=>{ })
// return { } else if (previewVal[i].attType == 2) {
// attContent: [item.attContent], const pindex = this.previewListFilter.findIndex(item => item.attType == 2)
// attType: item.attType if (pindex == -1) {
// } this.previewListFilter.push({
// }) attType: 2,
// this.previewListFilter = previewListFilter.reduce((prev, cur) => { attContent: [previewVal[i].attContent]
// let index = prev.find(item=>item.attType == ATT_TYPE.IMAGE) })
// if(index != -1 && prev.length) { } else {
// return prev[index].attContent.concat(cur.attContent) this.previewListFilter[pindex].attContent.push(previewVal[i].attContent)
// }
// return prev.concat(cur)
// },[])
// console.log(this.previewListFilter)
} }
}, } else {
created() { this.previewListFilter.push({
this.eventBus.$on('update', val => { attType: previewVal[i].attType,
setTimeout(() => { attContent: previewVal[i].attContent
this.previewList = val })
}, 100) }
}
this.$nextTick(() => {
this.previewListFilter = this.previewListFilter.filter(item => item)
}) })
}, },
mounted() {} deep: true
}
}
} }
</script> </script>
......
<!-- 树形搜索 -->
<template>
<div>
<el-popover ref="popover" placement="bottom-start" trigger="click" v-model="popoverVisible" :disabled="targetItem.isDisabled" @show="onShowPopover" @hide="onHidePopover">
<el-tree ref="tree" class="select-tree" highlight-current default-expand-all node-key="id" :expand-on-click-node="isExpand" :style="`min-width: ${treeWidth}`" :data="treeData" :current-node-key="form[targetItem.name]" :props="defaultProps" :filter-node-method="handleFilterNode" @current-change="handleNodeClick"></el-tree>
<el-input slot="reference" ref="input" v-model="form[targetItem.nameLabel]" clearable :disabled="targetItem.isDisabled" :style="`width: ${width}px`" :class="{ rotate: popoverVisible }" suffix-icon="el-icon-arrow-down" :placeholder="'请选择' + targetItem.label" @change="handleClear"></el-input>
</el-popover>
</div>
</template>
<script>
export default {
name: 'SelectTree',
data() {
return {
isExpand: false,
// 树状菜单显示状态
popoverVisible: false,
treeWidth: 'auto'
}
},
props: {
// 输入框宽度
width: String,
form: {
type: Object,
default: () => {}
},
targetItem: {
type: Object,
default: () => {}
},
treeData: {
type: Array,
default: () => []
},
defaultProps: {
type: Object,
default: () => ({
parent: 'parentId',
value: 'id',
label: 'menuName',
children: 'childlist'
})
}
},
watch: {
form(val) {
if (this.form[this.targetItem.name]) {
this.form[this.targetItem.nameLabel] = this.queryTree(this.treeData, this.form[this.targetItem.name])
this.$nextTick().then(() => {
this.$refs.tree.setCheckedKeys([this.form[this.targetItem.name]])
})
}
}
},
created() {
// 获取输入框宽度同步至树状菜单宽度
this.$nextTick(() => {
this.treeWidth = `${(this.width || this.$refs.input.$refs.input.clientWidth) - 24}px`
})
},
mounted() {
if (this.form[this.targetItem.name]) {
// console.log(this.treeData)
// console.log(this.form)
this.form[this.targetItem.nameLabel] = this.queryTree(this.treeData, this.form[this.targetItem.name])
this.$nextTick().then(() => {
this.$refs.tree.setCheckedKeys([this.form[this.targetItem.name]])
})
}
},
methods: {
// 显示时触发
onShowPopover() {
this.popoverVisible = true
this.$refs.tree.filter(false)
},
// 隐藏时触发
onHidePopover() {
this.popoverVisible = false
},
// 树节点过滤方法
handleFilterNode(query, data) {
if (!query) return true
return data[this.defaultProps.label].indexOf(query) !== -1
},
handleNodeClick(val) {
this.$emit('selected', { val: val, targetItem: this.targetItem, formName: this.targetItem.formName })
this.onHidePopover()
},
handleClear(val) {
this.$emit('selected', { val: val, targetItem: this.targetItem, formName: this.targetItem.formName })
window.event.stopPropagation()
},
// 搜索树状数据中的 ID
queryTree(tree, id) {
let stark = []
stark = stark.concat(tree)
while (stark.length) {
const temp = stark.shift()
if (temp[this.defaultProps.children]) {
stark = stark.concat(temp[this.defaultProps.children])
}
if (temp[this.defaultProps.value] === id) {
return temp[this.defaultProps.label]
}
}
return
}
}
}
</script>
<style>
.el-input.el-input--suffix.rotate .el-input__suffix .el-icon-arrow-down {
transform: rotate(-180deg);
}
.select-tree {
max-height: 400px;
overflow-y: scroll;
}
</style>
<!-- 分享弹窗 -->
<template>
<glsx-dialog title="分享" width="806px" :noCancel="true" btnOkLabel="关闭" :isVisible="isShareVisible" @closeDialog="handleShareClose" @confirmDialog="handleShareClose">
<div class="share-dialog">
<div class="flex">
<div class="flex box poster">
<div>
<p class="share-txt">海报</p>
<!-- <p>小程序码不带参数</p> -->
<el-button :size="size" type="primary" @click="handleSaveImg(shareForm.posterUrl)">保存图片</el-button>
</div>
<img :src="shareForm.posterUrl" />
</div>
<div class="flex box poster">
<div>
<p class="share-txt">小程序码</p>
<!-- <p>小程序码不带参数</p> -->
<el-button :size="size" type="primary" @click="handleSaveImg(shareForm.qrCodeUrl)">保存图片</el-button>
</div>
<img style="width: 180px; height: 180px" :src="shareForm.qrCodeUrl" />
</div>
</div>
<div class="box page-route">
<div>
<p class="route-txt">短链</p>
<div class="flex">
<p style="width: 426px;">{{ shareForm.linkUrl }}</p>
<el-button :size="size" type="primary" @click="handleSaveTxt(shareForm.linkUrl)">复制链接</el-button>
<!-- <p>链接是直播间原始页面路径,如需加入参数,详见使用方法</p> -->
</div>
</div>
</div>
</div>
</glsx-dialog>
</template>
<script>
export default {
name: 'share',
data() {
return {}
},
props: {
isShareVisible: {
type: Boolean,
default: false
},
shareForm: {
type: Object,
default: () => {}
}
},
mounted() {},
methods: {
handleSaveImg(url) {
var alink = document.createElement('a')
alink.href = url
alink.setAttribute('target', '_blank')
alink.download = '海报'
alink.click()
alink.remove()
},
handleSaveTxt(txt) {
this.$message({
message: '复制成功',
type: 'success',
customClass: 'message-Z-zinde'
})
const input = document.createElement('input')
document.body.appendChild(input)
input.setAttribute('value', txt)
input.select()
document.execCommand('Copy')
document.body.removeChild(input)
},
handleShareClose() {
this.$emit('handleShareClose')
}
}
}
</script>
<style scoped>
.share-dialog .box {
background: #f7f7f7;
border-radius: 6px;
padding: 30px;
}
.share-dialog .poster img {
width: 180px;
height: 297px;
margin-left: 45px;
}
.share-dialog .page-route {
margin-top: 16px;
}
.share-dialog .page-route .route-txt {
font-weight: bold;
padding-bottom: 10px;
}
.share-dialog .share-txt {
font-weight: bold;
margin-bottom: 50px;
}
</style>
<template> <template>
<div class> <div class>
<div class="container"> <div class="container">
<div class="edit-container"> <div>
<!-- 基础信息 --> <!-- 基础信息 -->
<div class="title"> <div class="title">
编辑朋友圈 编辑朋友圈
...@@ -41,8 +41,12 @@ ...@@ -41,8 +41,12 @@
<el-form :model="basicForm" :rules="basicRules" ref="groupForm" label-width="120px"> <el-form :model="basicForm" :rules="basicRules" ref="groupForm" label-width="120px">
<el-form-item prop="attachmentList"> <el-form-item prop="attachmentList">
<label slot="label" class="required">内容正文</label> <label slot="label" class="required">内容正文</label>
<WelcomeWords ref="welcome" :form="'customer'" :btnList="btnList" :eventBus="eventBus"></WelcomeWords> <GLEditor ref="welcome" :form="'customer'" :btnList="btnList" @previewWord="previewForm"></GLEditor>
<div v-show="attachmentShow" class="el-form-item__error">{{ attachmentText }}</div> <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>
</div>
</el-form-item> </el-form-item>
<el-form-item label="发送时间" prop="sendType"> <el-form-item label="发送时间" prop="sendType">
<el-radio-group v-model="basicForm.sendType"> <el-radio-group v-model="basicForm.sendType">
...@@ -59,7 +63,7 @@ ...@@ -59,7 +63,7 @@
</div> </div>
</div> </div>
<div class="preview"> <div class="preview">
<Preview :eventBus="eventBus"></Preview> <Preview :previewView="previewView"></Preview>
</div> </div>
</div> </div>
</div> </div>
...@@ -87,14 +91,11 @@ const ATT_TYPE = { ...@@ -87,14 +91,11 @@ const ATT_TYPE = {
} }
import Vue from 'vue' import Vue from 'vue'
import emoji from '@/utils/emo' import emoji from '@/utils/emo'
import WelcomeWords from './components/welcomeWords.vue'
import SelectMember from './components/selectMember.vue' import SelectMember from './components/selectMember.vue'
import Preview from './components/preview.vue' import Preview from './components/preview.vue'
import SelectLabel from './components/selectLabel.vue'
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
export default { export default {
components: { components: {
WelcomeWords,
SelectMember, SelectMember,
Preview Preview
}, },
...@@ -128,32 +129,47 @@ export default { ...@@ -128,32 +129,47 @@ export default {
addLoading: false, addLoading: false,
eventBus: new Vue(), eventBus: new Vue(),
taggingList: [], taggingList: [],
previewView: [],
btnList: [ btnList: [
{ {
id: 1,
name: '表情', name: '表情',
funcName: '', funcName: '',
type: 'expression', type: 'expression',
limitSize: 10 limitSize: 10
}, },
{ {
id: 2,
name: '图片', name: '图片',
funcName: '', funcName: '',
type: 'img', type: 'img',
limitSize: 10 togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
limitSize: 10, //限制图片大小
limitNum: 9, //限制图片数量
// limitWidth: 10000, //限制单张图片宽度
// limitHeight: 10000,//限制单张图片高度
Isdraggable: true, //图片拖拽
uploadApi: this.$apis.common.pictureUpload
}, },
{ {
id: 3,
name: '视频', name: '视频',
funcName: '',
type: 'video', type: 'video',
funName: 'video' limitSize: 10, //限制视频大小
togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
limitNum: 1, //限制视频数量
limitWidth: 1280, //限制视频宽度
limitHeight: 720, //限制视频高度
limitTime: 30, //限制视频时长
uploadApi: this.$apis.common.pictureUpload
} }
// { // {
// id: 4, // name: '模板',
// name: '活动', // type: 'message',
// type: 'acivity', // funName: 'message',
// funName: 'activity' // 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: { basicForm: {
...@@ -219,10 +235,12 @@ export default { ...@@ -219,10 +235,12 @@ export default {
deep: true deep: true
} }
}, },
mounted() { mounted() {},
this.setMinHeight()
},
methods: { methods: {
previewForm(val) {
console.log(val)
this.previewView = val
},
openMembers() { openMembers() {
this.membersVisible = !this.membersVisible this.membersVisible = !this.membersVisible
}, },
...@@ -331,18 +349,7 @@ export default { ...@@ -331,18 +349,7 @@ export default {
staffName: item.staffName staffName: item.staffName
} }
}) })
let previewListArr = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList let attachmentList = this.$refs.welcome.previewList
let previewList = previewListArr.reduce((prev, cur) => {
if (cur.attContent.length == 1) {
return prev.concat({ attContent: cur.attContent[0], attType: cur.attType })
} else {
let attContentImg = []
cur.attContent.forEach(imgItem => {
attContentImg.push({ attContent: imgItem, attType: cur.attType })
})
return prev.concat(attContentImg)
}
}, [])
const material = previewList.filter(item => item.attType != ATT_TYPE.TEXT) const material = previewList.filter(item => item.attType != ATT_TYPE.TEXT)
let materialType = 0 let materialType = 0
if (material && material.length > 0) { if (material && material.length > 0) {
...@@ -361,22 +368,7 @@ export default { ...@@ -361,22 +368,7 @@ export default {
if (material.length > 1) { if (material.length > 1) {
materialType = 2 materialType = 2
} }
console.log(previewList)
params.materialType = materialType params.materialType = materialType
const attachmentList = previewList.map(item => {
if (item.attType == 1) {
const list = emoji.flat(Infinity)
const cutImg = item.attContent.replaceAll('<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/', '')
const replaceImg = cutImg.replace(/(\d){3}.png">/g, function(str) {
let s = list[parseInt(str.split('.')[0]) - 1]
return `[${s}]`
})
item.attContent = replaceImg.substring(0, 600)
} else if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
}
return item
})
params.attachmentList = attachmentList params.attachmentList = attachmentList
if (params.sendType == 2) { if (params.sendType == 2) {
params.sendTimeStr = this.basicForm.sendTime + ' ' + this.basicForm.sendDate params.sendTimeStr = this.basicForm.sendTime + ' ' + this.basicForm.sendDate
...@@ -438,6 +430,24 @@ export default { ...@@ -438,6 +430,24 @@ export default {
font-weight: 100; font-weight: 100;
} }
} }
.tips-text {
display: flex;
align-items: center;
justify-self: center;
color: #000;
font-size: 14px;
padding: 6px 16px;
margin-top: 10px;
background-color: rgba(230, 233, 255, 0.49);
border: 1px solid rgba(88, 80, 255, 0.49);
border-radius: 4px;
line-height: 24px;
.tips-icon {
width: 14px;
height: 14px;
margin-right: 8px;
}
}
.info-box { .info-box {
display: inline-flex; display: inline-flex;
width: 100%; width: 100%;
......
<template> <template>
<div> <div>
<BasicInof :eventBus="eventBus" :id="$route.query.id" :form="'customer'"></BasicInof> <BasicInof :id="$route.query.id" :form="'customer'" @refreshList="refreshList"></BasicInof>
<div class="detail-container"> <div class="detail-container">
<div class="detail-modular"> <div class="detail-modular">
<div class="title">成员详情</div> <div class="title">成员详情</div>
...@@ -22,17 +22,15 @@ ...@@ -22,17 +22,15 @@
</div> </div>
</div> </div>
</div> </div>
<div <!-- <div
class="footer-panel" class="footer-panel"
:style="{ :style="{
left: footerLeft + 'px', left: footerLeft + 'px',
width: footerWidth + 'px' width: footerWidth + 'px'
}" }"
> >
<!-- <el-button type="primary" @click="handle
Next">确定</el-button>-->
<el-button type="primary" @click="handleCancel">取消</el-button> <el-button type="primary" @click="handleCancel">取消</el-button>
</div> </div> -->
<el-dialog title="已送达客户" :visible.sync="dialogVisible" width="576px" :before-close="handleClose" class="user-dialog"> <el-dialog title="已送达客户" :visible.sync="dialogVisible" width="576px" :before-close="handleClose" class="user-dialog">
<div class="user-list"> <div class="user-list">
<div class="user-item" v-for="(item, index) in userList" :key="index"> <div class="user-item" v-for="(item, index) in userList" :key="index">
...@@ -133,6 +131,9 @@ export default { ...@@ -133,6 +131,9 @@ export default {
this.searchForm.status = val this.searchForm.status = val
this.$refs.table.refreshTable() this.$refs.table.refreshTable()
}, },
refreshList() {
this.$refs.table.refreshTable()
},
handleCustomSelect(val) { handleCustomSelect(val) {
this.customIndex = val this.customIndex = val
this.getCustomerList(val) this.getCustomerList(val)
......
...@@ -2,9 +2,18 @@ ...@@ -2,9 +2,18 @@
<template> <template>
<div class="marketing pro-group"> <div class="marketing pro-group">
<div class="m-b-20 friend-title"> <div class="m-b-20 friend-title">
<div>
<GLButton :size="size" type="primary" fn="编辑朋友圈" @click="handleEdit(1)">发布朋友圈</GLButton> <GLButton :size="size" type="primary" fn="编辑朋友圈" @click="handleEdit(1)">发布朋友圈</GLButton>
<span>管理员可直接在后台为员工创建朋友圈,员工收到朋友圈新消息提醒后,可快捷将管理员创建的朋友圈发送到自己朋友圈中。</span> <span>管理员可直接在后台为员工创建朋友圈,员工收到朋友圈新消息提醒后,可快捷将管理员创建的朋友圈发送到自己朋友圈中。</span>
</div> </div>
<div class="title">
<span class="info-refresh" @click="handleRefresh">
<i :class="{ 'el-icon-refresh': true, 'wait-status': refreshStatus }"></i>
更新数据
</span>
<span class="info-time">更新于{{ this.updatedTime }}</span>
</div>
</div>
<div class="container"> <div class="container">
<!-- <div> <!-- <div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData"> <glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
...@@ -68,10 +77,12 @@ ...@@ -68,10 +77,12 @@
<script> <script>
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { utils } from 'glsx-common'
export default { export default {
name: 'friendGroup', name: 'friendGroup',
data() { data() {
return { return {
refreshStatus: false,
size: 'small', size: 'small',
loading: false, loading: false,
url: url, url: url,
...@@ -85,6 +96,7 @@ export default { ...@@ -85,6 +96,7 @@ export default {
downRules: { downRules: {
offReason: [{ required: true, message: '请输入下架备注', trigger: 'change' }] offReason: [{ required: true, message: '请输入下架备注', trigger: 'change' }]
}, },
updatedTime: '',
// 分享 // 分享
isShareVisible: false, isShareVisible: false,
shareForm: {}, shareForm: {},
...@@ -138,7 +150,7 @@ export default { ...@@ -138,7 +150,7 @@ export default {
return row.status == 2 || row.status == 1 return row.status == 2 || row.status == 1
}, },
listeners: { listeners: {
click: () => { } click: () => {}
} }
}, },
{ {
...@@ -152,7 +164,7 @@ export default { ...@@ -152,7 +164,7 @@ export default {
return row.status == -1 return row.status == -1
}, },
listeners: { listeners: {
click: () => { } click: () => {}
} }
}, },
{ {
...@@ -166,7 +178,7 @@ export default { ...@@ -166,7 +178,7 @@ export default {
return row.status == 4 return row.status == 4
}, },
listeners: { listeners: {
click: () => { } click: () => {}
} }
}, },
{ {
...@@ -252,17 +264,17 @@ export default { ...@@ -252,17 +264,17 @@ export default {
{ {
label: '已发送成员', label: '已发送成员',
prop: 'sendStaffCount', prop: 'sendStaffCount',
width: '100' width: '110'
}, },
{ {
label: '未发送成员', label: '未发送成员',
prop: 'unSendStaffCount', prop: 'unSendStaffCount',
width: '100' width: '110'
}, },
{ {
label: '已送达客户', label: '已送达客户',
prop: 'copyCustomerCount', prop: 'copyCustomerCount',
width: '100' width: '110'
} }
] ]
}, },
...@@ -300,6 +312,18 @@ export default { ...@@ -300,6 +312,18 @@ export default {
}, },
methods: { methods: {
handleRefresh: utils.debounce(function() {
this.createStatus()
this.refreshStatus = true
setTimeout(() => {
this.refreshStatus = false
}, 1000)
}, 1000),
createStatus() {
this.$apis.friendGroup.createStatus({}).then(res => {
this.getListData()
})
},
getListData() { getListData() {
this.loading = true this.loading = true
const params = { const params = {
...@@ -313,6 +337,7 @@ export default { ...@@ -313,6 +337,7 @@ export default {
} }
this.$apis.friendGroup.getListApi(params).then(res => { this.$apis.friendGroup.getListApi(params).then(res => {
this.loading = false this.loading = false
this.updatedTime = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
if (res) { if (res) {
this.tableData = res.data this.tableData = res.data
this.tableData.forEach(listM => { this.tableData.forEach(listM => {
...@@ -490,7 +515,27 @@ export default { ...@@ -490,7 +515,27 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.friend-title { .friend-title {
display: flex;
justify-content: space-between;
align-items: center;
color: #666666; color: #666666;
.title {
.info-refresh {
font-size: 14px;
color: #5850ff;
cursor: pointer;
margin-left: 20px;
.wait-status {
transition: all ease-in 1s;
transform: rotate(360deg);
}
}
.info-time {
font-size: 14px;
color: #7d7d7d;
margin-left: 10px;
}
}
span { span {
font-size: 14px; font-size: 14px;
margin-left: 10px; margin-left: 10px;
......
<template>
<div class="img-bg">
<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 />
<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 />
</div>
</template>
<template v-else-if="item.attType == 2">
<el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image>
</template>
<template v-else-if="item.attType == 3">
<!-- <el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image> -->
<video style="width: 100px" :src="item.attContent"></video>
</template>
<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 />
<span>{{ item.attContent.title }}</span>
</div>
{{ item.attContent.page }}
</div>
</template>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'Preview',
props: { eventBus: Object },
data() {
return {
previewList: [],
currentTime: ''
}
},
created() {
this.eventBus.$on('update', val => {
this.previewList = val
})
},
mounted() {
const date = new Date()
let hours = date.getHours()
hours = hours < 10 ? `0${hours}` : hours
let minutes = date.getMinutes()
minutes = minutes < 10 ? `0${minutes}` : minutes
this.currentTime = `${date.getFullYear()}年${date.getMonth() + 1}月${date.getDate()}日 ${hours}:${minutes}`
}
}
</script>
<style lang="scss" scope>
.img-bg {
position: relative;
width: 290px;
height: 566px;
background-image: url(../../../assets/guestCustom/iphone-bg.png);
background-size: 100%;
.preview-content {
position: absolute;
width: 250px;
height: 350px;
overflow-y: auto;
top: 115px;
left: 20px;
// background-color: cornflowerblue;
.preview-time {
font-size: 10px;
color: #999;
text-align: center;
margin-bottom: 15px;
}
.preview-info {
display: flex;
padding: 0 44px 20px 9px;
.avatar {
width: 26px;
height: 26px;
margin-right: 8px;
}
.preview-text {
position: relative;
max-width: 169px;
color: #333;
background-color: #fff;
border-radius: 4px;
word-wrap: break-word;
}
.text {
font-size: 16px;
padding: 8px 11px;
}
.preview-link {
display: inline-flex;
word-break: break-all;
font-size: 14px;
padding: 8px 8px 8px 11px;
img {
width: 34px;
height: 34px;
margin-left: 10px;
}
}
.preview-text::before {
content: '';
position: absolute;
left: -10px;
top: 20%;
border-width: 5px;
border-style: dashed solid dashed dashed;
border-color: transparent #fff transparent transparent;
// background-color: cornflowerblue;
}
.preview-applet {
img {
width: 20px;
height: 20px;
margin-right: 4px;
}
&-title {
display: flex;
align-self: center;
color: #999;
margin-bottom: 5px;
}
}
}
}
}
</style>
...@@ -2,23 +2,37 @@ ...@@ -2,23 +2,37 @@
<div class="select-emp-panel"> <div class="select-emp-panel">
<div class="scrm-p10 emp-tree-panel"> <div class="scrm-p10 emp-tree-panel">
<div class="popper-arrow"></div> <div class="popper-arrow"></div>
<div
class="emp-scroll-panel" <div class="emp-scroll-panel" :style="{
:style="{ height: treeHeight + 20 + 'px'
height: treeHeight + 'px' }">
}"
>
<div class="tree-title">所在门店/部门</div> <div class="tree-title">所在门店/部门</div>
<el-tree v-loading="loading" :data="listTree" :expand-on-click-node="false" highlight-current :props="defaultProps" @node-click="handleNodeClick"></el-tree> <el-tree
v-loading="loading"
:data="listTree"
:expand-on-click-node="false"
highlight-current
:props="defaultProps"
@node-click="handleNodeClick"
></el-tree>
</div> </div>
</div> </div>
<el-col <el-col
class="scrm-p10 emp-table-panel" class="scrm-p10 emp-table-panel"
:style="{ :style="{
height: treeHeight + 20 + 'px' height: treeHeight + 20 + 'px'
}" }"
> >
<GLTable v-loading="loading" ref="saleTable" :tableData="tableEmpData" :tableParams="tableParams" :hasNum="false" :hasPage="false" @selectionTable="selectionTable"></GLTable> <GLTable
v-loading="loading"
ref="saleTable"
:tableData="tableEmpData"
:tableParams="tableParams"
:hasNum="false"
:hasPage="false"
@selectionTable="selectionTable"
></GLTable>
</el-col> </el-col>
</div> </div>
</template> </template>
...@@ -70,20 +84,17 @@ export default { ...@@ -70,20 +84,17 @@ export default {
if (this.islord) { if (this.islord) {
params.islord = this.islord params.islord = this.islord
} }
params.isHavCustomer = true this.$apis.groupGuest.listDepartmentTree(params).then(res => {
this.$apis.customerTransform.listDepartmentTree(params).then(res => {
this.listTree = res this.listTree = res
this.loading = false this.loading = false
if (this.listTree.length) { if (this.listTree.length) {
this.listTree[0].entmicroStaffResponses = this.getEmployee(this.listTree) this.listTree[0].entmicroStaffResponses = this.getEmployee(this.listTree)
this.currentArr = this.$common.utils.deepClone(this.listTree[0].entmicroStaffResponses) this.currentArr = this.$common.utils.deepClone(this.listTree[0].entmicroStaffResponses)
} }
if (this.selectData && this.selectData.length) {
this.selectData.forEach(i => { this.selectData.forEach(i => {
const row = this.getEmployee(this.listTree).find(j => j.id == i.staffId) const row = this.getEmployee(this.listTree).find(j => j.id == i.staffId)
this.clearSelect(row) this.clearSelect(row)
}) })
}
this.$nextTick(() => { this.$nextTick(() => {
document.getElementsByClassName('el-tree-node__expand-icon')[0].click() document.getElementsByClassName('el-tree-node__expand-icon')[0].click()
document.getElementsByClassName('el-tree-node__content')[0].click() document.getElementsByClassName('el-tree-node__content')[0].click()
...@@ -106,6 +117,7 @@ export default { ...@@ -106,6 +117,7 @@ export default {
d.forEach(i => { d.forEach(i => {
if (i.entmicroStaffResponses) { if (i.entmicroStaffResponses) {
i.entmicroStaffResponses.forEach(j => { i.entmicroStaffResponses.forEach(j => {
// arr.push(j)
const flag = arr.find(m => m.id == j.id) const flag = arr.find(m => m.id == j.id)
if (!flag) { if (!flag) {
arr.push(j) arr.push(j)
...@@ -127,6 +139,7 @@ export default { ...@@ -127,6 +139,7 @@ export default {
} }
}) })
} }
this.tableEmpData = arr this.tableEmpData = arr
} }
// listEntmicroStaff(staffName) { // listEntmicroStaff(staffName) {
...@@ -142,12 +155,13 @@ export default { ...@@ -142,12 +155,13 @@ export default {
}, },
mounted() { mounted() {
let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
this.treeHeight = clientHeight - 650 this.treeHeight = clientHeight - 700
this.listDepartmentTree() this.listDepartmentTree()
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import '@/styles/variables.scss';
.select-emp-panel { .select-emp-panel {
display: flex; display: flex;
.emp-tree-panel { .emp-tree-panel {
...@@ -206,7 +220,7 @@ export default { ...@@ -206,7 +220,7 @@ export default {
margin-right: 10px; margin-right: 10px;
font-size: 15px; font-size: 15px;
/deep/ .el-tree-node:focus > .el-tree-node__content { /deep/ .el-tree-node:focus > .el-tree-node__content {
color: #5850ff; color: $btnBlue;
background: #f2f5fa; background: #f2f5fa;
} }
} }
......
<template>
<div class="square-main" v-loading="loading">
<GLDialog title="选择跟进专员" :visible.sync="dialogVisible">
<el-form :inline="true" :model="tableSearchForm">
<el-form-item size="small" label="员工">
<el-input v-model="tableSearchForm.staffName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item size="small">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<div class="table-box">
<GLTable :key="key" v-if="dialogVisible" ref="followTable" :layout="layout" :tableData="tableData" :hasNum="false" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable" @row-click="rowClick"></GLTable>
<div class="form-tips">必须配置至少1个跟进专员</div>
</div>
<span slot="footer" class="dialog-footer">
<a class="dialog-jump" @click="jumpUrl">新增专员</a>
<el-button size="small" @click="handleCancel">取 消</el-button>
<el-button size="small" type="primary" @click.native="handleSelect">确 定</el-button>
</span>
</GLDialog>
</div>
</template>
<script>
import { utils } from 'glsx-common'
import util from '@/utils/util'
export default {
name: 'SelectFollow',
data() {
return {
loading: false,
dialogVisible: false,
tableSearchForm: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'data',
tableOption: false,
// 行数据的key
mutiSelectUniqueKey: 'id',
checkSelectKey: 'id',
checkSelectVal: [],
// 多选ref的名称
mutiSelectName: 'salelist',
tableColumns: [
{
label: '姓名',
prop: 'staffName'
},
{
label: '部门',
prop: 'departmentName'
},
{
label: '跟进专员类型',
prop: 'followerTypeName'
}
]
},
layout: 'total',
tableData: [],
tableTotal: 0,
selectItem: [],
selectEmp: [],
checkSelect: [],
key: new Date()
}
},
methods: {
jumpUrl() {
util.openUrl(location.origin + '/settings/followUp/index')
},
getFollower() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.followTable.page.pageSize,
pageNum: this.$refs.followTable.page.pageNum
}
this.$apis.groupGuest.getFollower(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
if (res.count > 10) {
this.layout = 'total, pager'
}
this.tableData.forEach(item => {
this.selectEmp.forEach((itm, index) => {
if (itm.staffId == item.id) {
this.$refs.followTable.$refs.salelistMutiTable.toggleRowSelection(item)
this.selectEmp.splice(index, 1)
}
})
if (this.checkSelect) this.tableParams.checkSelectVal = this.checkSelect
})
})
},
init(item, checkMember) {
this.checkSelect = checkMember
this.tableSearchForm = {}
this.selectEmp = JSON.parse(JSON.stringify(item))
this.dialogVisible = true
this.$nextTick(() => {
this.$refs.followTable.page.pageNum = 1
this.getFollower()
})
},
handleSearch() {
this.getFollower()
},
selectionTable(val) {
this.selectItem = val
},
handleClose() {
this.handleCancel()
},
rowClick(row) {
if (this.checkSelect.find(i => i == row.id)) return
this.$refs.followTable.$refs.salelistMutiTable.toggleRowSelection(row)
},
handleCancel: utils.debounce(function() {
this.dialogVisible = false
this.$refs.followTable.$refs.salelistMutiTable.clearSelection()
}, 300),
handleSelect: utils.debounce(function() {
this.loading = true
let selectEmp = this.selectEmp.map(item => {
return {
id: item.staffId,
staffName: item.staffName
}
})
const selectItem = this.selectItem.concat(selectEmp)
if (selectItem.length == 0) {
this.$message.error('请选择跟进专员')
return
}
this.loading = false
this.dialogVisible = false
this.$emit('selectTable', this.selectItem.concat(selectEmp))
this.$refs.followTable.$refs.salelistMutiTable.clearSelection()
}, 300)
}
}
</script>
<style lang="scss" scoped>
@import '@/styles/variables.scss';
.dialog-jump {
color: $btnBlue;
float: left;
line-height: 24px;
text-decoration: underline;
cursor: pointer;
}
.square-main {
/deep/ {
.el-table {
height: 40vh;
overflow-y: auto;
}
.el-table::before {
left: 0;
bottom: 0;
width: 100%;
height: 0px;
}
}
}
.form-tips {
position: absolute;
bottom: 0;
right: 0;
font-size: 12px;
color: #999;
line-height: 32px;
}
.table-box {
position: relative;
}
</style>
<template> <template>
<div class="drawer-sale-panel"> <div class="drawer-sale-panel">
<el-form label-width="100px" :model="addForm" @submit.native.prevent> <el-form label-width="100px" :model="addForm">
<el-form-item label="请选择成员"> <el-form-item label="请选择成员">
<div class="sale-select"> <div class="sale-select">
<div class="el-input-tag input-tag-wrapper" @click="foucusTagInput"> <div class="el-input-tag input-tag-wrapper" @click="foucusTagInput">
<div class="tag-box"> <div class="tag-box">
<el-tag v-for="(tag, idx) in innerTags" :key="idx" type="info" closable :disable-transitions="false" @close="remove(tag)"> <el-tag v-for="(tag, idx) in innerTags" :key="idx" type="info" closable :disable-transitions="false" @close="remove(tag)">
<i class="el-icon-user-solid"></i> <!-- <i class="el-icon-user-solid"></i> -->
<img class="headPortrait" src="@/assets/headPortrait.png" />
{{ tag.staffName }} {{ tag.staffName }}
</el-tag> </el-tag>
</div> </div>
<el-input size="small" v-model.trim="newTag" placeholder="选择员工" @input="inputTag" style="outline: none; border: none" @keyup.enter.native="searchEmp"></el-input> <el-input size="small" v-model.trim="newTag" placeholder="选择员工" @input="inputTag" style="outline: none; border: none"></el-input>
</div> </div>
<div> <div>
<el-button size="small" class="sale-select-btn" type="primary" @click="searchEmp">查询</el-button> <el-button size="small" class="sale-select-btn" type="primary" @click="searchEmp">查询</el-button>
...@@ -84,16 +85,13 @@ export default { ...@@ -84,16 +85,13 @@ export default {
this.innerTags.forEach(item => { this.innerTags.forEach(item => {
userIds.push(item.userId) userIds.push(item.userId)
}) })
// this.$emit('handSelectdEmp', this.empType[this.typeIndex].id, userIds)
} }
// onCancel() {
// this.$emit('closeDrawer')
// }
}, },
mounted() {} mounted() {}
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import '@/styles/variables.scss';
.drawer-sale-panel { .drawer-sale-panel {
padding: 0px 20px; padding: 0px 20px;
.sale-reload { .sale-reload {
...@@ -130,8 +128,8 @@ export default { ...@@ -130,8 +128,8 @@ export default {
font-size: 14px; font-size: 14px;
color: #7d7d7d; color: #7d7d7d;
&.checked { &.checked {
border: 1px solid #5850ff; border: 1px solid $btnBlue;
color: #5850ff; color: $btnBlue;
} }
i { i {
position: absolute; position: absolute;
...@@ -207,15 +205,15 @@ export default { ...@@ -207,15 +205,15 @@ export default {
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
} }
::-webkit-scrollbar { // ::-webkit-scrollbar {
/*滚动条整体样式*/ // /*滚动条整体样式*/
width: 6px; // width: 6px;
height: 4px; // height: 4px;
} // }
::-webkit-scrollbar-thumb { // ::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/ // /*滚动条里面小方块*/
border-radius: 4px; // border-radius: 4px;
background-color: rgba(144, 147, 153, 0.3); // background-color: rgba(144, 147, 153, 0.3);
} // }
</style> </style>
...@@ -147,7 +147,8 @@ ...@@ -147,7 +147,8 @@
</el-radio> </el-radio>
<el-button v-show="!baseData.consultantList.length" type="text"></el-button> <el-button v-show="!baseData.consultantList.length" type="text"></el-button>
<p style="color: #5850ff;margin-left: 22px;" @click="handleNoServer">请在首页-跟进专员模块里添加类型为“在线客服”的跟进专员</p> <p style="color: #5850ff;margin-left: 22px;" @click="handleNoServer">请在首页-跟进专员模块里添加类型为“在线客服”的跟进专员</p>
<el-radio v-model="editForm.customerServerType" v-if="showGh" :label="2"> <el-radio v-model="editForm.customerServerType" :label="2">
<!-- <el-radio v-model="editForm.customerServerType" v-if="showGh" :label="2"> -->
<el-input style="width: 320px" placeholder="请输入链接" :disabled="editForm.customerServerType == 1" v-model="editForm.customerServerUrl" clearable></el-input> <el-input style="width: 320px" placeholder="请输入链接" :disabled="editForm.customerServerType == 1" v-model="editForm.customerServerUrl" clearable></el-input>
</el-radio> </el-radio>
</div> </div>
...@@ -226,11 +227,11 @@ export default { ...@@ -226,11 +227,11 @@ export default {
name: 'homeSet', name: 'homeSet',
data() { data() {
return { return {
// showGh: false,
size: 'small', size: 'small',
userInfo: {}, userInfo: {},
// 查看大图 // 查看大图
isImgVisible: false, isImgVisible: false,
showGh: false,
state: '', state: '',
dialogObj: { dialogObj: {
url: '', url: '',
...@@ -451,8 +452,8 @@ export default { ...@@ -451,8 +452,8 @@ export default {
this.externalFormList[idx].editFormData[idxx].isHide = true this.externalFormList[idx].editFormData[idxx].isHide = true
this.externalFormList[idxxx].editFormData[idxxxx].isHide = true this.externalFormList[idxxx].editFormData[idxxxx].isHide = true
} }
let href = window.location.host // let href = window.location.host
this.showGh = href.indexOf('cgacar') != -1 // this.showGh = href.indexOf('cgacar') != -1
}, },
methods: { methods: {
......
...@@ -26,6 +26,11 @@ ...@@ -26,6 +26,11 @@
<!-- 表格区域 - 全部订单/售后订单 - 开始 --> <!-- 表格区域 - 全部订单/售后订单 - 开始 -->
<GLTable ref="allOrderRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="allOrderRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="weChatName" class="flex-align" slot-scope="scope">
<img v-if="scope.scope.weChatImageUrl" class="img-36 pointer img-circle" :src="scope.scope.weChatImageUrl" />
<span class="m-l-10">{{ scope.scope.weChatName }}</span>
<span v-if="!scope.scope.shareAvatar && !scope.scope.weChatName">-</span>
</div>
<template slot="vinNo" slot-scope="scope"> <template slot="vinNo" slot-scope="scope">
{{ Array.isArray(scope.scope.vinNo) ? scope.scope.vinNo[0] : scope.scope.vinNo }} {{ Array.isArray(scope.scope.vinNo) ? scope.scope.vinNo[0] : scope.scope.vinNo }}
<el-popover popper-class="order-table-popover" placement="right-start" trigger="click"> <el-popover popper-class="order-table-popover" placement="right-start" trigger="click">
...@@ -37,12 +42,17 @@ ...@@ -37,12 +42,17 @@
<span :class="['table-circle', 'm-r-8', [2, 10, 22].includes(scope.scope.orderStatus) ? 'back-green' : [9].includes(scope.scope.orderStatus) ? 'back-blue' : [1, 21, 6].includes(scope.scope.orderStatus) ? 'back-orange' : 'back-grey']"></span> <span :class="['table-circle', 'm-r-8', [2, 10, 22].includes(scope.scope.orderStatus) ? 'back-green' : [9].includes(scope.scope.orderStatus) ? 'back-blue' : [1, 21, 6].includes(scope.scope.orderStatus) ? 'back-orange' : 'back-grey']"></span>
<span>{{ baseData.orderStatusList.map(item => item.confId).includes(scope.scope.orderStatus + '') ? baseData.orderStatusList.find(item => item.confId == scope.scope.orderStatus).confName : '-' }}</span> <span>{{ baseData.orderStatusList.map(item => item.confId).includes(scope.scope.orderStatus + '') ? baseData.orderStatusList.find(item => item.confId == scope.scope.orderStatus).confName : '-' }}</span>
</div> </div>
<div slot="shareStaffImageUrl" class="table-image" slot-scope="scope"> <div slot="shareStaffName" class="table-image" slot-scope="scope">
<el-popover v-if="scope.scope.shareStaffImageUrl" placement="top" width="160" trigger="hover" popper-class="table-popover-block"> <div>
<img class="table-popover-img" :src="scope.scope.shareStaffImageUrl" /> <img v-if="scope.scope.shareStaffImageUrl" class="img-36 pointer img-circle" style="vertical-align: middle" slot="reference" :src="scope.scope.shareStaffImageUrl" />
<img class="img-60 pointer" slot="reference" :src="scope.scope.shareStaffImageUrl" /> <span class="m-l-10">
</el-popover> <span>{{ scope.scope.shareStaffName }}</span>
<span v-else>-</span> <span class="txt-green" v-if="scope.scope.shareStaffType == 1">@微信</span>
<span class="txt-orange" v-if="scope.scope.shareStaffType == 2">@企微</span>
<span class="txt-blue" v-if="scope.scope.shareStaffType == 3">@小程序</span>
</span>
</div>
<span v-if="!scope.scope.shareStaffImageUrl && !scope.scope.shareStaffName">-</span>
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
...@@ -143,7 +153,9 @@ export default { ...@@ -143,7 +153,9 @@ export default {
deliveryType: '', deliveryType: '',
vin: '', vin: '',
shareStaffName: '', shareStaffName: '',
shareStaffType: '' shareStaffType: '',
activityName: '',
goodsName: ''
}, },
tableSearchForm: {}, tableSearchForm: {},
statisticsInfo: { statisticsInfo: {
...@@ -290,6 +302,20 @@ export default { ...@@ -290,6 +302,20 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'shareStaffTypeList' optionsName: 'shareStaffTypeList'
},
{
label: '活动名称',
name: 'activityName',
labelWidth: 56,
type: 'input',
maxlength: 100
},
{
label: '商品名称',
name: 'goodsName',
labelWidth: 56,
type: 'input',
maxlength: 100
} }
], ],
// 快递信息 // 快递信息
...@@ -393,6 +419,22 @@ export default { ...@@ -393,6 +419,22 @@ export default {
}, },
{ {
type: 'GLButton', type: 'GLButton',
name: '退款',
attrs: {
type: 'text',
fn: '退款'
},
condition: row => {
return row.orderSource == 4 && [2, 6, 21].includes(+row.orderStatus)
},
listeners: {
click: row => {
this.secondConfirm('退款', '请确定是否发起退款?', 'orderManage', 'crowdFundRefundApi', { orderCode: row.orderCode })
}
}
},
{
type: 'GLButton',
name: '订单核销', name: '订单核销',
attrs: { attrs: {
type: 'text', type: 'text',
...@@ -492,6 +534,12 @@ export default { ...@@ -492,6 +534,12 @@ export default {
} }
}, },
{ {
label: '微信名称',
prop: 'weChatName',
addHtml: 'weChatName',
width: 300
},
{
label: '客户名称', label: '客户名称',
prop: 'customerName', prop: 'customerName',
line: 2, line: 2,
...@@ -511,7 +559,7 @@ export default { ...@@ -511,7 +559,7 @@ export default {
{ {
label: '车架号', label: '车架号',
prop: 'vinNo', prop: 'vinNo',
width: 120, width: 130,
addHtml: 'vinNo' addHtml: 'vinNo'
}, },
{ {
...@@ -521,28 +569,29 @@ export default { ...@@ -521,28 +569,29 @@ export default {
width: 160 width: 160
}, },
{ {
label: '推荐人', label: '商品名称',
prop: 'shareStaffName', prop: '',
width: '180', width: '120',
formatter: cellValue => { formatter: cellValue => {
return cellValue.shareStaffName ? cellValue.shareStaffName + (cellValue.shareStaffPhone ? '+' + cellValue.shareStaffPhone : '') : '-' return cellValue.orderGoods.length ? cellValue.orderGoods.map(item => item.goodsName).join(',') : '-'
} }
}, },
{ {
label: '头像', label: '推荐人',
prop: 'shareStaffImageUrl', prop: 'shareStaffName',
addHtml: 'shareStaffImageUrl' width: 360,
addHtml: 'shareStaffName'
}, },
{ {
label: '推荐人类型', label: '推荐人手机号',
prop: 'shareStaffType', prop: 'shareStaffPhone',
width: '180', width: 130,
formatter: cellValue => { formatter: cellValue => {
return this.baseData.shareStaffTypeList.map(item => item.confId).includes(cellValue.shareStaffType + '') ? this.baseData.shareStaffTypeList.find(item => item.confId == cellValue.shareStaffType).confName : '-' return cellValue.shareStaffPhone || '-'
} }
}, },
{ {
label: '支付总价', label: '支付总价/元',
prop: 'payPrice', prop: 'payPrice',
width: '120', width: '120',
formatter: cellValue => { formatter: cellValue => {
...@@ -550,6 +599,11 @@ export default { ...@@ -550,6 +599,11 @@ export default {
} }
}, },
{ {
label: '活动名称',
prop: 'activityName',
width: '120'
},
{
label: '门店信息', label: '门店信息',
prop: 'merchantName', prop: 'merchantName',
line: 1, line: 1,
...@@ -592,7 +646,8 @@ export default { ...@@ -592,7 +646,8 @@ export default {
deliveryTypeList: deliveryTypeList, deliveryTypeList: deliveryTypeList,
refundTypeList: [ refundTypeList: [
{ confId: '1', confName: '退款退货' }, { confId: '1', confName: '退款退货' },
{ confId: '2', confName: '我要退款(无需退货)' } { confId: '2', confName: '我要退款(无需退货)' },
{ confId: '3', confName: '众筹订单退款' }
], ],
shareStaffTypeList: [ shareStaffTypeList: [
{ confId: '1', confName: '个微' }, { confId: '1', confName: '个微' },
...@@ -761,6 +816,10 @@ export default { ...@@ -761,6 +816,10 @@ export default {
}, },
handleWriteOff(row) { handleWriteOff(row) {
if (row.orderSource == 4) {
this.secondConfirm('订单核销', '请确定是否核销此订单?', 'orderManage', 'crowdFundWriteOffApi', { orderCode: row.orderCode })
return true
}
this.isWriteOffVisible = !this.isWriteOffVisible this.isWriteOffVisible = !this.isWriteOffVisible
this.orderCode = row.orderCode this.orderCode = row.orderCode
}, },
...@@ -816,7 +875,7 @@ export default { ...@@ -816,7 +875,7 @@ export default {
this.orderCode = row.orderCode this.orderCode = row.orderCode
this.$apis.orderManage.examineDetailApi({ orderCode: row.orderCode }).then(res => { this.$apis.orderManage.examineDetailApi({ orderCode: row.orderCode }).then(res => {
this.orderInfo = res || {} this.orderInfo = res || {}
this.orderInfo.refundTypeName = [1, 2].includes(this.orderInfo.refundType) ? this.baseData.refundTypeList.find(item => item.confId == this.orderInfo.refundType + '').confName : '-' this.orderInfo.refundTypeName = [1, 2, 3].includes(this.orderInfo.refundType) ? this.baseData.refundTypeList.find(item => item.confId == this.orderInfo.refundType + '').confName : '-'
this.orderInfo.createdDateStr = this.orderInfo.createdDate ? dayjs(this.orderInfo.createdDate).format('YYYY-MM-DD HH:mm:ss') : '-' this.orderInfo.createdDateStr = this.orderInfo.createdDate ? dayjs(this.orderInfo.createdDate).format('YYYY-MM-DD HH:mm:ss') : '-'
this.isExamineVisible = !this.isExamineVisible this.isExamineVisible = !this.isExamineVisible
}) })
...@@ -850,7 +909,7 @@ export default { ...@@ -850,7 +909,7 @@ export default {
handleReceiving(row) { handleReceiving(row) {
this.$apis.orderManage.examineDetailApi({ orderCode: row.orderCode }).then(res => { this.$apis.orderManage.examineDetailApi({ orderCode: row.orderCode }).then(res => {
this.orderInfo = res || {} this.orderInfo = res || {}
this.orderInfo.refundTypeName = [1, 2].includes(this.orderInfo.refundType) ? this.baseData.refundTypeList.find(item => item.confId == this.orderInfo.refundType + '').confName : '-' this.orderInfo.refundTypeName = [1, 2, 3].includes(this.orderInfo.refundType) ? this.baseData.refundTypeList.find(item => item.confId == this.orderInfo.refundType + '').confName : '-'
this.orderInfo.createdDateStr = this.orderInfo.createdDate ? dayjs(this.orderInfo.createdDate).format('YYYY-MM-DD HH:mm:ss') : '-' this.orderInfo.createdDateStr = this.orderInfo.createdDate ? dayjs(this.orderInfo.createdDate).format('YYYY-MM-DD HH:mm:ss') : '-'
this.isReceivingVisible = !this.isReceivingVisible this.isReceivingVisible = !this.isReceivingVisible
}) })
...@@ -893,7 +952,9 @@ export default { ...@@ -893,7 +952,9 @@ export default {
deliveryType: '', deliveryType: '',
vin: '', vin: '',
shareStaffName: '', shareStaffName: '',
shareStaffType: '' shareStaffType: '',
activityName: '',
goodsName: ''
} }
this.handleSearch() this.handleSearch()
} }
...@@ -922,5 +983,8 @@ export default { ...@@ -922,5 +983,8 @@ export default {
padding: 2px 4px; padding: 2px 4px;
line-height: 25px; line-height: 25px;
} }
.txt-blue {
color: #5092ff;
}
} }
</style> </style>
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<span class="detail-txt ellipsis-1" :title="detailForm[subItem.name]">{{ detailForm[subItem.name] ? detailForm[subItem.name] + (subItem.suffix || '') : '-' }}</span> <span class="detail-txt ellipsis-1" :title="detailForm[subItem.name]">{{ detailForm[subItem.name] ? detailForm[subItem.name] + (subItem.suffix || '') : '-' }}</span>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-form-item label="其他信息">{{ detailForm.formDescribe }}</el-form-item>
</el-form> </el-form>
</div> </div>
<div :class="['container', orderRefund ? 'm-b-20' : 'edit-container']"> <div :class="['container', orderRefund ? 'm-b-20' : 'edit-container']">
...@@ -141,10 +142,16 @@ export default { ...@@ -141,10 +142,16 @@ export default {
name: 'shipAddress' name: 'shipAddress'
}, },
{ {
label: '其他信息', label: '微信名称',
name: 'formDescribe', name: 'weChatName'
contentName: 'formContent', },
attrList: ['First', 'Second', 'Third'] {
label: '活动名称',
name: 'activityName'
},
{
label: '商品名称',
name: 'goodsName'
} }
], ],
// 售后信息 // 售后信息
...@@ -186,7 +193,8 @@ export default { ...@@ -186,7 +193,8 @@ export default {
deliveryTypeList: deliveryTypeList, deliveryTypeList: deliveryTypeList,
refundTypeList: [ refundTypeList: [
{ confId: '1', confName: '退款退货' }, { confId: '1', confName: '退款退货' },
{ confId: '2', confName: '退款不退货' } { confId: '2', confName: '退款不退货' },
{ confId: '3', confName: '众筹订单退款' }
], ],
shareStaffTypeList: [ shareStaffTypeList: [
{ confId: '1', confName: '个微' }, { confId: '1', confName: '个微' },
...@@ -230,6 +238,7 @@ export default { ...@@ -230,6 +238,7 @@ export default {
if (this.orderRefund) { if (this.orderRefund) {
this.orderRefund.refundTypeName = this.baseData.refundTypeList.map(item => item.confId).includes(res.orderRefund.refundType + '') ? this.baseData.refundTypeList.find(item => item.confId == res.orderRefund.refundType).confName : '-' this.orderRefund.refundTypeName = this.baseData.refundTypeList.map(item => item.confId).includes(res.orderRefund.refundType + '') ? this.baseData.refundTypeList.find(item => item.confId == res.orderRefund.refundType).confName : '-'
this.orderRefund.createdDateStr = dayjs(this.orderRefund.createdDate).format('YYYY-MM-DD HH:mm:ss') this.orderRefund.createdDateStr = dayjs(this.orderRefund.createdDate).format('YYYY-MM-DD HH:mm:ss')
this.orderRefund.refundPrice = this.orderRefund.refundPrice + '元'
} }
if (this.detailForm.shareStaffType) { if (this.detailForm.shareStaffType) {
this.detailForm.shareStaffTypeName = this.baseData.shareStaffTypeList.map(item => item.confId).includes(this.detailForm.shareStaffType + '') ? this.baseData.shareStaffTypeList.find(item => item.confId == this.detailForm.shareStaffType).confName : '-' this.detailForm.shareStaffTypeName = this.baseData.shareStaffTypeList.map(item => item.confId).includes(this.detailForm.shareStaffType + '') ? this.baseData.shareStaffTypeList.find(item => item.confId == this.detailForm.shareStaffType).confName : '-'
...@@ -238,7 +247,7 @@ export default { ...@@ -238,7 +247,7 @@ export default {
this.detailForm.subOrderCoupon.discountAmount = (this.detailForm.subOrderCoupon.discountAmount / 100).toFixed(2) this.detailForm.subOrderCoupon.discountAmount = (this.detailForm.subOrderCoupon.discountAmount / 100).toFixed(2)
} }
this.orderGoods = res.orderGoods || [] this.orderGoods = res.orderGoods || []
this.detailForm.payPrice = res.payPrice ? res.payPrice + '元' : '-' this.detailForm.payPrice = res.payPrice ? res.payPrice + '元' : '0元'
this.detailForm.orderSourceName = this.baseData.orderSourceList.map(item => item.confId).includes(res.orderSource + '') ? this.baseData.orderSourceList.find(item => item.confId == res.orderSource).confName : '-' this.detailForm.orderSourceName = this.baseData.orderSourceList.map(item => item.confId).includes(res.orderSource + '') ? this.baseData.orderSourceList.find(item => item.confId == res.orderSource).confName : '-'
this.detailForm.orderStatusName = this.baseData.orderStatusList.map(item => item.confId).includes(res.orderStatus + '') ? this.baseData.orderStatusList.find(item => item.confId == res.orderStatus).confName : '-' this.detailForm.orderStatusName = this.baseData.orderStatusList.map(item => item.confId).includes(res.orderStatus + '') ? this.baseData.orderStatusList.find(item => item.confId == res.orderStatus).confName : '-'
if (!this.detailForm.takeFee) { if (!this.detailForm.takeFee) {
...@@ -246,8 +255,15 @@ export default { ...@@ -246,8 +255,15 @@ export default {
this.detailFormData.splice(takeFeeIdx, 1) this.detailFormData.splice(takeFeeIdx, 1)
} }
// 其他信息 // 其他信息
var formDescribeObj = this.detailFormData.find(item => item.name == 'formDescribe') var formDescribeObj = {
label: '其他信息',
name: 'formDescribe',
contentName: 'formContent',
attrList: ['First', 'Second']
}
this.detailForm[formDescribeObj.name] = '' this.detailForm[formDescribeObj.name] = ''
this.detailForm[formDescribeObj.name] = this.detailForm.plateNo ? '车牌号:' + this.detailForm.plateNo + ' ' : ''
this.detailForm[formDescribeObj.name] += this.detailForm.vehicleType ? '品牌车型:' + this.detailForm.vehicleType + ' ' : ''
formDescribeObj.attrList.forEach(item => { formDescribeObj.attrList.forEach(item => {
let label = this.detailForm[formDescribeObj.name + item] let label = this.detailForm[formDescribeObj.name + item]
let value = this.detailForm[formDescribeObj.contentName + item] let value = this.detailForm[formDescribeObj.contentName + item]
...@@ -255,6 +271,8 @@ export default { ...@@ -255,6 +271,8 @@ export default {
this.detailForm[formDescribeObj.name] += label + ':' + value + ' ' this.detailForm[formDescribeObj.name] += label + ':' + value + ' '
} }
}) })
// 商品名称
this.detailForm.goodsName = this.detailForm.orderGoods.length ? this.detailForm.orderGoods.map(item => item.goodsName).join(',') : '-'
this.formToRow('detailFormData') this.formToRow('detailFormData')
}) })
}, },
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</template> </template>
<template slot="goodsVideo"> <template slot="goodsVideo">
<p class="edit-tips">作为商品详情页顶部展示</p> <p class="edit-tips">作为商品详情页顶部展示</p>
<p class="edit-tips">格式建议mp4,大小不超过50M</p> <p class="edit-tips">格式建议mp4,大小不超过20M</p>
</template> </template>
<div :style="{ 'margin-left': labelWidth }" slot="descImgs" slot-scope="scope"> <div :style="{ 'margin-left': labelWidth }" slot="descImgs" slot-scope="scope">
<div v-for="(subItem, subIndex) in editForm[scope.scope.name]" :key="subIndex" class="flex"> <div v-for="(subItem, subIndex) in editForm[scope.scope.name]" :key="subIndex" class="flex">
...@@ -582,7 +582,7 @@ export default { ...@@ -582,7 +582,7 @@ export default {
type: 'upload', type: 'upload',
uploadType: 'video', uploadType: 'video',
suffixSlot: 'goodsVideo', suffixSlot: 'goodsVideo',
limitSize: 50, limitSize: 20,
maxPhotoNum: 1, maxPhotoNum: 1,
isDisabled: false, isDisabled: false,
handleUpload: (e, file, targetItem) => { handleUpload: (e, file, targetItem) => {
......
...@@ -8,6 +8,11 @@ ...@@ -8,6 +8,11 @@
<div class="container"> <div class="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 m-b-10 w-100-percent">
<span class="table-title"></span>
<el-button :size="size" class="default-blue-btn" type="default" @click="handleExport">导出</el-button>
</div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="activity" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="activity" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="activityImg" class="table-image" slot-scope="scope"> <div slot="activityImg" class="table-image" slot-scope="scope">
...@@ -34,6 +39,7 @@ ...@@ -34,6 +39,7 @@
import shareDialog from '../productGroup/components/shareDialog' import shareDialog from '../productGroup/components/shareDialog'
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { exportFn } from '@/common/constant'
export default { export default {
name: 'crowdFundList', name: 'crowdFundList',
data() { data() {
...@@ -202,6 +208,10 @@ export default { ...@@ -202,6 +208,10 @@ export default {
} }
}, },
{ {
label: '粉丝',
prop: 'fansAmount'
},
{
label: '分享', label: '分享',
prop: 'shareAmount' prop: 'shareAmount'
}, },
...@@ -218,7 +228,7 @@ export default { ...@@ -218,7 +228,7 @@ export default {
} }
}, },
{ {
label: '剩余库存', label: '库存',
prop: 'goodsStock', prop: 'goodsStock',
width: 110 width: 110
}, },
...@@ -372,15 +382,12 @@ export default { ...@@ -372,15 +382,12 @@ export default {
}) })
}, },
//新增活动 handleExport() {
// addActivity() { var params = this.getParams()
// this.$router.push('/seckillActivity/editCrowdFund/1') this.$apis.seckillActivity.exportCrowdfundApi(params).then(res => {
// }, exportFn(res)
})
// // addOrEdit:1-新增;2-编辑;3-查看 },
// handleEdit(addOrEdit, row) {
// this.$router.push('/seckillActivity/editCrowdFund/' + addOrEdit + '/' + row.id)
// },
handleShare(row) { handleShare(row) {
this.$apis.seckillActivity.getCrowdSharedApi({ id: row.id }).then(res => { this.$apis.seckillActivity.getCrowdSharedApi({ id: row.id }).then(res => {
......
...@@ -122,6 +122,9 @@ ...@@ -122,6 +122,9 @@
<div slot="activityVideos" class="edit-tips m-t-8">最多上传6个视频</div> <div slot="activityVideos" class="edit-tips m-t-8">最多上传6个视频</div>
<div slot="posterImg" class="edit-tips m-t-8">建议尺寸640*1008</div> <div slot="posterImg" class="edit-tips m-t-8">建议尺寸640*1008</div>
<div class="form-describe-box" slot="formDescribe"> <div class="form-describe-box" slot="formDescribe">
<el-checkbox-group v-model="editForm.formDescribeCheck">
<el-checkbox v-for="(item, index) in formDescribeCheckList" :label="item.value" :key="index">{{ item.label }}</el-checkbox>
</el-checkbox-group>
<div v-for="(item, index) in formDescribeList" :key="index" class="form-describe flex-default"> <div v-for="(item, index) in formDescribeList" :key="index" class="form-describe flex-default">
<el-input class="describe-input" v-model="item.value" placeholder="请输入" maxlength="20"></el-input> <el-input class="describe-input" v-model="item.value" placeholder="请输入" maxlength="20"></el-input>
<p class="describe-delete"> <p class="describe-delete">
...@@ -147,8 +150,8 @@ ...@@ -147,8 +150,8 @@
<img :src="editForm.activityBigImg || require('@/assets/seckillActivity/icon-default.png')" /> <img :src="editForm.activityBigImg || require('@/assets/seckillActivity/icon-default.png')" />
<img class="wechat-customer" src="@/assets/seckillActivity/crowd-customer.png" /> <img class="wechat-customer" src="@/assets/seckillActivity/crowd-customer.png" />
<div class="w-100-percent txt-center"> <div class="w-100-percent txt-center">
<video v-if="editForm.activityVideos.length" class="wechat-video" controls> <video v-if="editForm.activityVideoList.length" class="wechat-video" controls>
<source :src="editForm.activityVideos[0]" type="video/mp4" /> <source :src="editForm.activityVideoList[0]" type="video/mp4" />
</video> </video>
</div> </div>
<div class="wechat-block"> <div class="wechat-block">
...@@ -261,12 +264,17 @@ export default { ...@@ -261,12 +264,17 @@ export default {
activityAddressDetailName: '', activityAddressDetailName: '',
activityBigImg: '', activityBigImg: '',
activityVideos: [], activityVideos: [],
activityVideoList: [],
activityDetail: '', activityDetail: '',
fictitiousGroupQuantity: '', fictitiousGroupQuantity: '',
fictitiousLadderQuantity: 30, fictitiousLadderQuantity: 30,
fictitiousViewQuantity: '', fictitiousViewQuantity: '',
forwardTitle: '', forwardTitle: '',
posterImg: '' posterImg: '',
// 1-否,2-是
selectCarNumberFlag: 2,
selectVehicleTypeFlag: 2,
formDescribeCheck: ['selectCarNumberFlag', 'selectVehicleTypeFlag']
// formDescribeFirst: '', // formDescribeFirst: '',
// formDescribeSecond: '', // formDescribeSecond: '',
// formDescribeThird: '' // formDescribeThird: ''
...@@ -343,11 +351,21 @@ export default { ...@@ -343,11 +351,21 @@ export default {
forwardTitle: [{ required: true, message: '请输入转发标题', trigger: 'change' }] forwardTitle: [{ required: true, message: '请输入转发标题', trigger: 'change' }]
}, },
// 表单设置 // 表单设置
describeNum: 3, formDescribeCheckList: [
{
label: '车牌号',
value: 'selectCarNumberFlag'
},
{
label: '品牌车型',
value: 'selectVehicleTypeFlag'
}
],
describeNum: 2,
describeIdxToAttr: { describeIdxToAttr: {
0: 'First', 0: 'First',
1: 'Second', 1: 'Second'
2: 'Third' // 2: 'Third'
}, },
formDescribeList: [ formDescribeList: [
{ {
...@@ -525,6 +543,7 @@ export default { ...@@ -525,6 +543,7 @@ export default {
label: '活动地址', label: '活动地址',
name: 'activityAddressDetailName', name: 'activityAddressDetailName',
type: 'map', type: 'map',
isReadonly: true,
attrObj: { attrObj: {
provinceName: 'activityAddressProvinceName', provinceName: 'activityAddressProvinceName',
provinceCode: 'activityAddressProvinceCode', provinceCode: 'activityAddressProvinceCode',
...@@ -561,21 +580,29 @@ export default { ...@@ -561,21 +580,29 @@ export default {
}, },
{ {
label: '活动视频', label: '活动视频',
name: 'activityVideos', name: 'activityVideoList',
type: 'upload', type: 'upload',
uploadType: 'video', uploadType: 'video',
suffixSlot: 'activityVideos', suffixSlot: 'activityVideos',
tips: '大图下可以展示视频,不上传则不显示', tips: '大图下可以展示视频,不上传则不显示',
limitSize: 20, limitSize: 20,
maxPhotoNum: 6, maxPhotoNum: 6,
handleDelete: idx => {
this.editForm.activityVideos.splice(idx, 1)
},
handleUpload: (e, file, targetItem) => { handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result const imgFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1] const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.loading = true this.loading = true
this.$apis.common this.$apis.common
.uploadVideoApi({ file: base64 }) .uploadFundingVideoApi({ file: base64 })
.then(res => { .then(res => {
this.editForm[targetItem.name].push(res) this.editForm[targetItem.name].push(res.vediourl)
this.editForm.activityVideos.push({
activityVideo: res.vediourl,
activityVideoCoverImage: res.imgUrl,
activityVideoTime: res.lengthInTime
})
}) })
.finally(() => { .finally(() => {
this.loading = false this.loading = false
...@@ -1085,9 +1112,10 @@ export default { ...@@ -1085,9 +1112,10 @@ export default {
if (info.activityAddressProvinceName || info.activityAddressCityName) { if (info.activityAddressProvinceName || info.activityAddressCityName) {
this.$refs.configEditFormRef.$refs.provinceForm[0].init(info.activityAddressProvinceName, info.activityAddressCityName) this.$refs.configEditFormRef.$refs.provinceForm[0].init(info.activityAddressProvinceName, info.activityAddressCityName)
} }
this.editForm.activityVideoList = []
// 活动视频 // 活动视频
if (info.activityVideos && info.activityVideos.length) { if (info.activityVideos && info.activityVideos.length) {
this.editForm.activityVideos = info.activityVideos.map(item => item.activityVideo) this.editForm.activityVideoList = info.activityVideos.map(item => item.activityVideo)
} }
// 活动详情 // 活动详情
if (info.activityDetail) { if (info.activityDetail) {
...@@ -1110,12 +1138,24 @@ export default { ...@@ -1110,12 +1138,24 @@ export default {
} }
} }
// 表单设置 // 表单设置
this.editForm.formDescribeCheck = []
this.editForm.selectCarNumberFlag = this.editForm.selectCarNumberFlag || 1
this.editForm.selectVehicleTypeFlag = this.editForm.selectVehicleTypeFlag || 1
var checkList = ['selectCarNumberFlag', 'selectVehicleTypeFlag']
checkList.forEach(item => {
if (this.editForm[item] == 2) {
this.editForm.formDescribeCheck.push(item)
}
})
this.formDescribeList = [] this.formDescribeList = []
Object.values(this.describeIdxToAttr).forEach((item, index) => { Object.values(this.describeIdxToAttr).forEach((item, index) => {
if (this.editForm['formDescribe' + item]) { if (this.editForm['formDescribe' + item]) {
this.formDescribeList.push({ value: this.editForm['formDescribe' + this.describeIdxToAttr[index]] }) this.formDescribeList.push({ value: this.editForm['formDescribe' + this.describeIdxToAttr[index]] })
} }
}) })
if (this.formDescribeList.length == 3) {
this.formDescribeList.pop()
}
if (!this.formDescribeList.length) { if (!this.formDescribeList.length) {
this.formDescribeList = [{ value: '' }] this.formDescribeList = [{ value: '' }]
} }
...@@ -1169,6 +1209,8 @@ export default { ...@@ -1169,6 +1209,8 @@ export default {
param.specificationDetailList.push(obj) param.specificationDetailList.push(obj)
}) })
} }
// 视频
delete param.activityVideoList
// 预估销量 // 预估销量
if (this.editForm.predictVolume) { if (this.editForm.predictVolume) {
param.predictVolume = (this.editForm.predictVolume * 100).toFixed(0) param.predictVolume = (this.editForm.predictVolume * 100).toFixed(0)
...@@ -1178,6 +1220,10 @@ export default { ...@@ -1178,6 +1220,10 @@ export default {
param.activityDetail = encodeURIComponent(this.editForm.activityDetail) param.activityDetail = encodeURIComponent(this.editForm.activityDetail)
} }
// 表单设置 // 表单设置
// 1-否,2-是
param.selectCarNumberFlag = param.formDescribeCheck.findIndex(item => item == 'selectCarNumberFlag') != -1 ? 2 : 1
param.selectVehicleTypeFlag = param.formDescribeCheck.findIndex(item => item == 'selectVehicleTypeFlag') != -1 ? 2 : 1
delete param.formDescribeCheck
Object.values(this.describeIdxToAttr).forEach((item, idx) => { Object.values(this.describeIdxToAttr).forEach((item, idx) => {
param['formDescribe' + item] = this.formDescribeList.length > idx ? this.formDescribeList[idx].value : '' param['formDescribe' + item] = this.formDescribeList.length > idx ? this.formDescribeList[idx].value : ''
}) })
...@@ -1532,11 +1578,12 @@ export default { ...@@ -1532,11 +1578,12 @@ export default {
.edit-activity .form-describe-box { .edit-activity .form-describe-box {
width: 597px; width: 597px;
background: #f9f9f9; background: #f9f9f9;
padding: 20px;
} }
.edit-activity .describe-btn { .edit-activity .describe-btn {
color: #5850ff; color: #5850ff;
cursor: pointer; cursor: pointer;
padding: 0 0 20px 20px; padding: 0;
} }
.edit-activity .form-describe-box .icon-add { .edit-activity .form-describe-box .icon-add {
width: 20px; width: 20px;
...@@ -1544,7 +1591,7 @@ export default { ...@@ -1544,7 +1591,7 @@ export default {
vertical-align: middle; vertical-align: middle;
} }
.edit-activity .form-describe { .edit-activity .form-describe {
padding: 0 20px 10px; padding: 0 20px 10px 0;
} }
.edit-activity .form-describe:first-child { .edit-activity .form-describe:first-child {
padding: 20px 20px 10px; padding: 20px 20px 10px;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<template> <template>
<div class="marketing"> <div class="marketing">
<div class="m-b-20"> <div class="m-b-20">
<GLButton :size="size" type="primary" class="el-icon-plus" @click="addActivity()" fn="新增秒杀活动" mode="el-button">新增秒杀活动</GLButton> <GLButton :size="size" class="default-blue-btn el-icon-plus" type="default" @click="addActivity()" fn="新增秒杀活动" mode="el-button">新增秒杀活动</GLButton>
</div> </div>
<div class="container"> <div class="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>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!