Commit 6c9695e0 by wuwx

Merge branch 'v2.1.0' into wuwx_dev_v2.1.0

2 parents ef91a1e1 5d32bf91
......@@ -71,6 +71,17 @@ const materialDelete = params => {
})
}
// 获取业务类型
const getListEntBusinessType = (params = {}) => {
params.method = 'entmicro.api.staff.listEntBusinessType'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//素材详情
const materialDetail = params => {
params.method = `${defaultPath}detail`
......@@ -173,5 +184,6 @@ export default {
readDetailPage,
dataOverview,
sendDetailPage,
findAllDictData
findAllDictData,
getListEntBusinessType
}
......@@ -19,7 +19,7 @@
<el-input v-model="materialAddForm.materialName" :size="size" placeholder="请输入素材名称" maxlength="30"></el-input>
</el-form-item>
<el-form-item label="素材类型:" prop="materialType">
<el-radio-group v-model="materialAddForm.materialType" @change="radioChange">
<el-radio-group v-model="materialAddForm.materialType" @change="radioChange" :disabled="routeInfo.addOrEdit == 2 && routeInfo.status != 1">
<el-radio :label="1">PDF文件</el-radio>
<!-- <el-radio :label="2">自定义链接</el-radio> -->
<el-radio :label="3">图文</el-radio>
......@@ -27,8 +27,8 @@
<!-- 选择PDF -->
<div v-show="materialAddForm.materialType == 1">
<div class="pdf-show">
<input type="file" style="opacity: 0" accept=".pdf" @change="e => handlePdfChange(e)" />
<el-button icon="el-icon-plus" :size="size">选择文件</el-button>
<input type="file" style="opacity: 0" accept=".pdf" :disabled="routeInfo.addOrEdit == 2 && routeInfo.status != 1" @change="e => handlePdfChange(e)" />
<el-button icon="el-icon-plus" :size="size" :disabled="routeInfo.addOrEdit == 2 && routeInfo.status != 1">选择文件</el-button>
</div>
<div v-if="pdfUrl">{{ pdfUrl }}</div>
</div>
......@@ -42,7 +42,7 @@
</div> -->
<!-- 选择图文 -->
<div v-show="materialAddForm.materialType == 3">
<textBox @change="writeChange" ref="textBox"></textBox>
<textBox @change="writeChange" ref="textBox" @forbid="forbidEdit"></textBox>
</div>
<div class="space"></div>
</el-form-item>
......@@ -63,7 +63,7 @@
</span>
</span>
<el-checkbox-group v-model="materialAddForm.businessType">
<el-checkbox v-for="value in businessTypes" :key="value.dictValue" :label="value.dictValue">{{ value.dictLabel }}</el-checkbox>
<el-checkbox v-for="value in businessTypes" :key="value.businessName" :label="value.id">{{ value.businessName }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item prop="isNotifySender">
......@@ -244,11 +244,14 @@ export default {
},
mounted() {
this.routeInfo = this.$route.query
console.log(this.routeInfo)
this.routeInfo.addOrEdit != 1 ? this.getMaterialInfo() : ''
this.routeInfo.addOrEdit != 1 ? (this.routeInfo.status != 1 ? this.forbidEdit() : '') : ''
this.title = this.titleObj[this.routeInfo.addOrEdit]
this.materialInsert()
this.getMaterialList()
this.findAllDictData('business_type')
// this.findAllDictData('business_type')
this.getListEntBusinessType()
},
methods: {
getParams() {
......@@ -345,15 +348,25 @@ export default {
})
},
// 获取所有业务类型
findAllDictData(dictType) {
var params = {
dictType
}
this.$apis.material.findAllDictData(params).then(res => {
// findAllDictData(dictType) {
// var params = {
// dictType
// }
// this.$apis.material.findAllDictData(params).then(res => {
// if (res) {
// if (dictType == 'business_type') {
// this.businessTypes = res
// }
// }
// })
// },
getListEntBusinessType() {
var params = {}
// flag 0-跟进专员调用 1-素材调用
params.flag = 1
this.$apis.material.getListEntBusinessType(params).then(res => {
if (res) {
if (dictType == 'business_type') {
this.businessTypes = res
}
this.businessTypes = res
}
})
},
......@@ -505,6 +518,10 @@ export default {
writeChange(val) {
this.textBoxContent = val
},
// 禁用富文本
forbidEdit() {
this.$refs.textBox.forbidEdit()
},
// 打开标签
openLabel() {
this.dialogVisible = !this.dialogVisible
......
......@@ -21,7 +21,7 @@
import url from '@/assets/empty.png'
export default {
name: 'readPerDetail',
props: ['materialId'],
props: ['materialId', 'startTime', 'endTime'],
data() {
return {
url,
......@@ -29,7 +29,9 @@ export default {
customerName: '',
customerPhone: '',
staffName: '',
materialId: this.materialId
materialId: this.materialId,
startTime: this.startTime,
endTime: this.endTime
},
getListApi: this.$apis.material.readDetailPage,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
......
......@@ -13,7 +13,7 @@
import url from '@/assets/empty.png'
export default {
name: 'staffSendDetail',
props: ['materialId'],
props: ['materialId', 'startTime', 'endTime'],
data() {
return {
url,
......@@ -22,6 +22,8 @@ export default {
employeeName: '',
sortValue: '',
sort: ''
// startTime: this.$parent.startTime,
// endTime: this.$parent.endTime
},
staffSendFormData: [
{
......@@ -94,6 +96,8 @@ export default {
},
getListApi() {
var params = this.getParams()
params.startTime = this.$parent.startTime
params.endTime = this.$parent.endTime
this.$apis.material.sendDetailPage(params).then(res => {
this.sendStaffTableData = res
// 计算表格高度,数据10条以下自适应,10条以上固定高度,表格内滚动,无数据调用方法计算高度
......
......@@ -66,6 +66,10 @@ export default {
this.$nextTick(() => {
this.editor.txt.html(html)
})
},
forbidEdit() {
// this.editor.$textElem.attr('contenteditable', false)
this.editor.disable()
}
}
}
......
......@@ -149,9 +149,9 @@ export default {
type: 'select',
placeholder: '全部',
optionList: [],
optionId: 'dictValue',
optionLabel: 'dictLabel',
optionsName: 'dictValue'
optionId: 'id',
optionLabel: 'businessName',
optionsName: 'businessName'
},
{
label: '素材类型:',
......@@ -361,7 +361,8 @@ export default {
let offTop = document.querySelector('.tabelList').offsetTop
this.boxHeight = clientHeight - offTop - 80 + 'px'
this.tableHeight = clientHeight - offTop - 132 + 'px'
this.findAllDictData('business_type')
// this.findAllDictData('business_type')
this.getListEntBusinessType()
this.firstCome()
this.getListApi()
},
......@@ -387,17 +388,33 @@ export default {
this.$refs.materialGroup.currentIndex = null
},
// 获取所有业务类型
findAllDictData(dictType) {
var params = {
dictType
}
this.$apis.material.findAllDictData(params).then(res => {
// findAllDictData(dictType) {
// var params = {
// dictType
// }
// this.$apis.material.findAllDictData(params).then(res => {
// if (res) {
// this.businessTypes = res
// let idx = this.materialFormData.findIndex(item => item.name == 'businessType')
// res.unshift({
// dictValue: '',
// dictLabel: '全部'
// })
// this.materialFormData[idx].optionList = res
// }
// })
// },
getListEntBusinessType() {
var params = {}
// flag 0-跟进专员调用 1-素材调用
params.flag = 1
this.$apis.material.getListEntBusinessType(params).then(res => {
if (res) {
this.businessTypes = res
let idx = this.materialFormData.findIndex(item => item.name == 'businessType')
res.unshift({
dictValue: '',
dictLabel: '全部'
id: '',
businessName: '全部'
})
this.materialFormData[idx].optionList = res
}
......
......@@ -141,8 +141,8 @@
<el-tab-pane label="员工发送明细" name="staffSendDetail"></el-tab-pane>
<el-tab-pane label="阅读人员明细" name="readPerDetail"></el-tab-pane>
</el-tabs>
<staffSendDetail v-if="activeName == 'staffSendDetail'" :materialId="routerInfo.id"></staffSendDetail>
<readPerDetail v-if="activeName == 'readPerDetail'" :materialId="routerInfo.id"></readPerDetail>
<staffSendDetail ref="staffSendDetail" v-if="activeName == 'staffSendDetail'" :materialId="routerInfo.id" :startTime="startTime" :endTime="endTime"></staffSendDetail>
<readPerDetail ref="readPerDetail" v-if="activeName == 'readPerDetail'" :materialId="routerInfo.id" :startTime="startTime" :endTime="endTime"></readPerDetail>
</div>
</div>
</div>
......@@ -182,7 +182,9 @@ export default {
overviewInfo: {},
imgSrc: [],
imgNormal: '@/assets/material/car.png',
htmlContent: ''
htmlContent: '',
startTime: '',
endTime: ''
}
},
mounted() {
......@@ -218,8 +220,13 @@ export default {
this.detailInfo.materialUrl = decodeURIComponent(this.detailInfo.materialUrl)
let html = this.detailInfo.materialUrl
let imgHtml = html.match(/<img.*?(?:>|\/>)/g)
for (let i = 0; i < imgHtml.length; i++) {
html = html.replace(imgHtml[i], '')
// for (let i = 0; i < imgHtml.length; i++) {
// html = html.replace(imgHtml[i], '')
// }
if (imgHtml) {
for (let i = 0; i < imgHtml.length; i++) {
html = html.replace(imgHtml[i], '')
}
}
this.htmlContent = html
if (imgHtml) {
......@@ -245,11 +252,13 @@ export default {
var endTime = dayjs(this.selectTime[1]).format('YYYY-MM-DD HH:mm:ss')
params.startTime = startTime
params.endTime = endTime
this.startTime = startTime
this.endTime = endTime
}
this.$apis.material.dataOverview(params).then(res => {
this.overviewInfo = res
})
this.$refs.staffSendDetail.getListApi()
},
handleClick() {},
detailShowVisible() {
......
......@@ -226,7 +226,8 @@ export default {
if (item.object) {
item.object.objectId = item.objectId
item.object.objectType = item.objectType
item.object.objectName = item.object.packageName
// item.object.objectName = item.object.packageName
item.object.objectName = item.objectName
item.object.additionalType = item.additionalType
}
if (item.additionalType == 4) {
......
......@@ -9,14 +9,14 @@
<el-tab-pane label="权益套餐" name="4"></el-tab-pane>
<el-tab-pane label="商城券" name="2"></el-tab-pane>
<el-tab-pane label="秒杀活动" name="5"></el-tab-pane>
<el-tab-pane label="无忧服务" name="6" v-if="openFlag"></el-tab-pane>
<!-- <el-tab-pane label="无忧服务" name="6" v-if="openFlag"></el-tab-pane> -->
</el-tabs>
</div>
<div class="model-item-panel" v-if="modelList.length > 0" v-loading="loading">
<div class="model-item" :class="{ checked: selectItem == item }" v-for="(item, index) in modelList" :key="index" @click="handleSelectItem(item)">
<div class="model-item-title" :title="item.equityName" v-show="activeName == 3">{{ item.equityName }}</div>
<div class="model-item-title" :title="item.couponName" v-show="activeName == 2">{{ item.couponName }}</div>
<div class="model-item-title" :title="item.couponName" v-show="activeName == 6">{{ item.equityName }}</div>
<!-- <div class="model-item-title" :title="item.couponName" v-show="activeName == 6">{{ item.equityName }}</div> -->
<div class="model-item-title" :title="item.packageName" v-show="activeName == 4">{{ item.packageName }}</div>
<div class="model-item-title" :title="item.activityName" v-show="activeName == 5">{{ item.activityName }}</div>
<div class="model-item-content" v-show="activeName == 3">领取方式:免费领用</div>
......@@ -24,8 +24,8 @@
<div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 6">有效期:{{ item.effectiveDays }}天</div>
<div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 3">有效期:无限制</div>
<div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 2">有效期:{{ item.effectiveStartTime ? item.effectiveStartTime.split(' ')[0] : '' }}~{{ item.effectiveEndTime ? item.effectiveEndTime.split(' ')[0] : '' }}</div>
<div class="model-item-content" v-show="activeName == 6">获取方式:需先购买无忧服务套餐</div>
<div class="model-item-content" v-show="activeName == 6">获取限制:每个服务套餐限领一次</div>
<!-- <div class="model-item-content" v-show="activeName == 6">获取方式:需先购买无忧服务套餐</div>
<div class="model-item-content" v-show="activeName == 6">获取限制:每个服务套餐限领一次</div> -->
<div class="model-item-content" v-show="activeName == 3"></div>
<div class="model-item-content model-item-contents" v-show="activeName == 3">
......@@ -36,10 +36,10 @@
使用途径:
{{ item.useChannel == 1 ? '线上商品' : '到店核销' }}
</div>
<div class="model-item-content model-item-weight" v-show="activeName == 6">
<!-- <div class="model-item-content model-item-weight" v-show="activeName == 6">
赠送天数:
<span>{{ item.effectiveType == 2 ? item.effectivedDay + '天' : '永久有效' }}</span>
</div>
</div> -->
<div class="model-item-content" v-show="activeName == 4 || activeName == 5"></div>
<div class="model-item-content model-item-contents" v-show="activeName == 4">
销售价格:
......@@ -156,9 +156,9 @@ export default {
this.loading = true
let market = ''
switch (this.activeName) {
case '6':
market = 'merchant'
break
// case '6':
// market = 'merchant'
// break
case '2':
market = 'getMerchant'
break
......@@ -188,12 +188,13 @@ export default {
params.currentPage = this.pageNum
params.activityStatus = 2
}
if (this.activeName == 6) {
params.merchantId = this.$globalState.session.merchantId
}
// if (this.activeName == 6) {
// params.merchantId = this.$globalState.session.merchantId
// }
this.$apis.customerTransform[market](params)
.then(res => {
if (this.activeName == 3 || this.activeName == 6) {
// if (this.activeName == 3 || this.activeName == 6) {
if (this.activeName == 3) {
this.modelList = res
} else {
this.modelList = res.list ? res.list : res.data
......
......@@ -3,7 +3,7 @@
<div class="title">备注:为确保营销渠道正常触达,仅支持选择同条件客户(是否加企微、是否有手机号)</div>
<div class="flex-default">
<div class="customer-list">
<div class="tag-box">
<div class="customer-tag-box">
<span class="tag-label">用户标签:</span>
<div class="el-input-tag input-tag-wrapper" @click="handleClickTag">
<span v-if="!selectedLabelList.length" style="color: #BFBFBF;">请选择标签筛选客户</span>
......@@ -148,6 +148,7 @@ export default {
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm = {
combineType: 2,
tagLists: []
}
this.selectedLabelList.length &&
......@@ -230,7 +231,7 @@ export default {
.title {
margin-bottom: 12px;
}
.tag-box {
.customer-tag-box {
display: flex;
margin: 20px 16px;
.tag-label {
......
......@@ -34,8 +34,8 @@
<div class="tag-box-header">标签名称({{ selectNum }}项)</div>
<div class="tag-selected-box" :style="{ height: heightBox + 'px' }">
<template v-for="item in labelTreeRetSelect">
<el-tag :title="item.tagChecked.name" v-if="item.tagChecked" type="info" class="tag-selected-item" :key="item.tagChecked" closable :disable-transitions="false" @close="remove(item, idx)">
{{ item.tagChecked.name }}
<el-tag :title="item.tagChecked.name" v-if="item.tagChecked" type="info" class="customer-tag-selected-item" :key="item.tagChecked" closable :disable-transitions="false" @close="remove(item, idx)">
{{ item.tagChecked.name.length > 11 ? item.tagChecked.name.slice(0, 11) + '...' : item.tagChecked.name }}
</el-tag>
</template>
</div>
......@@ -358,13 +358,13 @@ export default {
}
}
}
.tag-selected-item {
.customer-tag-selected-item {
margin: 0px 6px 6px 0px;
height: 26px;
line-height: 24px;
font-size: 14px;
color: #666;
max-width: 200px;
max-width: auto !important;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!