Commit 5bd60c7d by 杨明

fixed

1 parent ad6207d6
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-07 16:54:06
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-09-25 22:24:16
* @FilePath: \scrm-micro-journey\src\api\modules\journeyConfig.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { http_sop } from '@/main'
//查询模板实例客户分页列表
const getCustomersList = params => {
return http_sop({
url: `http://gateway.platform.dev.glsx.com.cn/process/sop/api/sopInsts/customers`,
method: 'get',
data: params,
sign: false
})
}
//查询模板实例客户详细信息
const getCustomersDetail = params => {
return http_sop({
url: `http://gateway.platform.dev.glsx.com.cn/process/sop/api/sopInsts/customers/detail`,
method: 'get',
data: params,
sign: false
})
}
//查询模板实例客户详细信息
const stageUpdate = params => {
return http_sop({
url: `http://gateway.platform.dev.glsx.com.cn//process/sop/api/sopInsts/customers/stageUpdate`,
method: 'post',
data: params,
noNeed: true,
sign: false
})
}
//查询模板实例客户详细信息
const exportExcel = params => {
return http_sop({
url: `http://gateway.platform.dev.glsx.com.cn/process/sop/api/sopInsts/customers/export`,
method: 'get',
data: params,
sign: false
})
}
export default { getCustomersList, getCustomersDetail, stageUpdate, exportExcel }
......@@ -2,11 +2,11 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-07 16:54:06
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-09-07 17:04:56
* @LastEditTime: 2023-09-25 19:31:03
* @FilePath: \scrm-micro-journey\src\api\modules\journeyConfig.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { http } from '@/main'
import { http, http_sop } from '@/main'
//活动列表
const activityPage = params => {
params.method = `scrm.api.shopmall.bulge.activity.page`
......@@ -17,4 +17,64 @@ const activityPage = params => {
sign: true
})
}
export default { activityPage }
//活动详情
const getActivityDetailApi = params => {
params.method = `scrm.api.shopmall.activity.detail`
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
//活动任务详情
const findMarketingTask = params => {
params.method = `marketing.api.supermarket.findMarketingTask`
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//活动列表
const byGroupIdSop = params => {
return http_sop({
url: 'http://gateway.platform.dev.glsx.com.cn/process/sop/api/sopInsts/byGroupId',
method: 'get',
data: params,
sign: false
})
}
//活动列表
const getInstIdDetail = params => {
return http_sop({
url: 'http://gateway.platform.dev.glsx.com.cn/process/sop/api/sopInsts/' + params.instId,
method: 'get',
// data: params,
sign: false
})
}
//更新SOP门店模板实例状态
const setSopInsts = params => {
return http_sop({
url: `http://gateway.platform.dev.glsx.com.cn/process/sop/api/sopInsts/${params.instId}/status`,
method: 'post',
data: params.status,
noNeed: true,
sign: false
})
}
//更新SOP门店模板实例初始参数里的门店自定义参数(关联活动)
const concatActivity = params => {
return http_sop({
url: `http://gateway.platform.dev.glsx.com.cn//process/sop/api/sopInsts/${params.instId}/instParam/customData`,
method: 'post',
data: params.data,
noNeed: true,
sign: false
})
}
export default { activityPage, byGroupIdSop, getInstIdDetail, setSopInsts, concatActivity, findMarketingTask, getActivityDetailApi }
......@@ -149,4 +149,4 @@ img {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
\ No newline at end of file
}
......@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-08-13 14:12:11
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-11-23 17:20:32
* @LastEditTime: 2023-09-22 20:06:55
* @FilePath: \scrm\scrm-sub-blog\src\main.js
*/
import Vue from 'vue'
......@@ -21,3 +21,4 @@ start()
export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params)
export const http_common = params => Vue.prototype.$http_common(params)
export const http_sop = params => Vue.prototype.$http_sop(params)
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-11-23 11:06:49
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-09-05 16:08:47
* @LastEditTime: 2023-09-25 09:59:38
* @FilePath: \live\src\setup\qiankun.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -20,7 +20,7 @@ let instance = null
Vue.use(ElementUI)
Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState }) {
const { response, request, sign, secret, sign_common, request_common } = await fetchConfig(common)
const { response, request, sign, secret, sign_common, request_common, response_sop } = await fetchConfig(common)
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
......@@ -28,6 +28,7 @@ export async function bootstrap({ history, common, messenger, globalState }) {
Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_sop = new common.Http({ response: response_sop, request, sign, secret, alert: message.error, headers: { token: globalState.session.token, 'Content-Type': 'application/json' } })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
......
......@@ -2,70 +2,37 @@
<div class="journey">
<div class="container">
<div class="sticky">
<GLCombiForm
ref="showSearch"
:rowNumber="2"
:formObj="searchForm"
:formData="searchFormData"
:searchSelectObj="searchSelectObj"
@handleOk="handleSearch"
@handleRest="handleReset"
:key="FormKey"
></GLCombiForm>
<div :class="['sticky-btns',{'hiddenExport':viewType == 1}]">
<GLCombiForm ref="showSearch" :rowNumber="2" :formObj="searchForm" :formData="searchFormData" :searchSelectObj="searchSelectObj" @handleOk="handleSearch" @handleRest="handleReset" :key="FormKey"></GLCombiForm>
<div :class="['sticky-btns', { hiddenExport: viewType == 1 }]">
<div class="btns">
<el-button
type="default"
@click="handleExport"
plain
>状态刷新</el-button>
<el-button
type="default"
@click="changeViewType"
>切换为看板视图</el-button>
<el-button
type="default"
@click="handleExport"
>导出</el-button>
<el-button type="default" @click="handleRefresh" plain>状态刷新</el-button>
<el-button type="default" @click="changeViewType">切换为看板视图</el-button>
<el-button type="default" @click="handleExport">导出</el-button>
</div>
</div>
</div>
<template v-if="viewType == 1">
<div class="journey-data-view">
<data-view
:params="tableSearchForm"
ref="dataView"
></data-view>
<data-view :params="tableSearchForm" ref="dataView" :stageList="stageList"></data-view>
</div>
</template>
<template v-else>
<div class="flex">
<div class="flex-default tabs">
<el-tabs
v-model="searchForm.requestSource"
@tab-click="handleSearch"
>
<el-tab-pane
:label="i"
:name="index"
:key="index"
v-for="(i,index) in requestSourceList"
></el-tab-pane>
<el-tabs v-model="searchForm.requestSource" @tab-click="handleSearch">
<el-tab-pane :label="i" :name="index" :key="index" v-for="(i, index) in requestSourceList"></el-tab-pane>
</el-tabs>
</div>
</div>
<div class="journey-table">
<journey-table
ref="table"
:params="tableSearchForm"
></journey-table>
<journey-table ref="table" :params="tableSearchForm" :stageList="stageList"></journey-table>
</div>
</template>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
<script type="text/ecmascript-6">
import { combiFormConfig } from './index/config'
import journeyTable from './index/table.vue'
import dataView from './index/dataView.vue'
......@@ -80,14 +47,34 @@ export default {
return {
requestSourceList: ['全部', '进行中', '高意向', '成功续保', '战败'],
viewType: 11,
journeyList: [],
FormKey: Date.now()
}
},
mounted () {
this.getList()
this.getCustomersList();
},
methods: {
getList() {
this.$apis.journeyConfig.byGroupIdSop({ groupId: 'M153312087', pageNumber: 1 }).then(res => {
this.journeyList = res.list || []
this.journeyList.forEach(item => {
const stages = JSON.parse(item.instParam).stages
item.journeyItem = []
for (let k in stages) {
item.journeyItem.push({
label: stages[k].value,
value: k,
})
}
})
this.searchFormData[0].optionList = this.journeyList
this.searchForm.sopJourneyId = this.journeyList[0].instId
this.getStage(this.searchForm.sopJourneyId)
this.handleSearch()
})
},
handleSearch () {
const { viewType, $refs } = this,
el = viewType == 1 ? $refs.dataView : $refs.table,
......@@ -110,7 +97,9 @@ export default {
this.handleSearch()
},
handleExport () {
this.$apis.journey.exportExcel({...this.searchForm, pageSize: 10000,pageNumber: 1}).then(res=>{
console.log(res)
})
},
changeViewType () {
this.viewType = this.viewType == 1 ? 0 : 1
......@@ -119,7 +108,7 @@ export default {
}
</script>
<style scoped lang='scss'>
<style scoped lang="scss">
.journey {
padding: 20px;
background-color: #fff;
......
let _this = null
const defaultFormData = {
a: '',
b: '',
c: '',
d: '',
requestSource: '0'
}
export default {
created () {
created() {
_this = this
},
data () {
data() {
return {
searchForm: {
...defaultFormData
......@@ -24,34 +20,24 @@ export default {
searchFormData: [
{
label: '旅程',
name: 'a',
name: 'sopJourneyId',
type: 'select',
labelWidth: 56,
optionList: [
{
confId: '',
confName: '全部'
},
{
confId: '0',
confName: '未支付'
},
],
optionId: 'confId',
optionLabel: 'confName',
optionList: [],
optionId: 'instId',
optionLabel: 'instName',
changeAttr: e => {
_this.searchFormData.find(i => i.name === 'b').isDisabled = !e
this.getStage(e)
}
},
{
label: '旅程阶段',
name: 'b',
name: 'sopJourneyStage',
type: 'select',
labelWidth: 56,
isDisabled: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionId: 'value',
optionLabel: 'label'
},
{
type: 'selectInput',
......@@ -70,10 +56,10 @@ export default {
},
{
label: '微信昵称',
name: 'nickName'
name: 'wechatNickname'
}
],
handleSelectChange (value) {
handleSelectChange(value) {
_this.searchSelectObj.keyword.value = ''
}
},
......@@ -84,7 +70,7 @@ export default {
labelWidth: 56,
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionLabel: 'confName'
},
{
label: '进入旅程时间',
......@@ -93,15 +79,21 @@ export default {
labelWidth: 72,
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
},
}
],
stageList: [],
tableSearchForm: {
...defaultFormData
}
}
},
methods: {
getSelectInputParams () {
getStage(e) {
const step = _this.searchFormData.find(i => i.name === 'sopJourneyStage')
step.optionList = _this.journeyList.find(i => i.instId == e).journeyItem
this.stageList = step.optionList
},
getSelectInputParams() {
const list = Object.keys(this.searchSelectObj)
var params = {}
list.forEach(i => {
......@@ -109,6 +101,6 @@ export default {
item.value && (params[item.attr] = item.value)
})
return params
},
},
}
\ No newline at end of file
}
}
}
......@@ -2,54 +2,33 @@
<div class="data-view">
<div class="title">旅程看板</div>
<div class="carousel-box">
<el-carousel
ref="carousel"
:autoplay="false"
:loop="false"
height="100%"
arrow="never"
class="carousel"
@change="viewIndex = $event"
>
<template v-for="(i,index) in viewList">
<el-carousel ref="carousel" :autoplay="false" :loop="false" height="100%" arrow="never" class="carousel" @change="viewIndex = $event">
<template v-for="(i, index) in viewList">
<template>
<el-carousel-item
:key="index"
class="carousel-item"
>
<template v-for="(c,cindex) in i">
<el-carousel-item :key="index" class="carousel-item">
<template v-for="(c, cindex) in i">
<template>
<div
:key="cindex"
class="group"
>
<div :key="cindex" class="group">
<div class="title">
<div class="text flex">
<div class="icon"></div>
{{ c.title }}
</div>
<div class="line-box">
<div
class="line"
:style="[{'width':c.width}]"
></div>
<div class="line" :style="[{ width: (100 * (cindex + 1)) / i.length + '%' }]"></div>
</div>
</div>
<div class="content">
<template v-for="(item,ind) in c.list">
<template v-for="(item, ind) in c.list">
<template>
<div
:key="ind"
class="item"
>
<div :key="ind" class="item">
<div class="top flex">
<div class="icon">
<template v-if="item.icon">
<img :src="item.icon">
<img :src="item.icon" />
</template>
<template v-else>
<img src="@/assets/icon/default-avatar.png">
<img src="@/assets/icon/default-avatar.png" />
</template>
</div>
<div class="text">
......@@ -72,17 +51,11 @@
</template>
</template>
</el-carousel>
<div
class="arrow left"
@click="$refs.carousel.prev()"
>
<img :src="viewIndex == 0 ? leftIcon:leftActiveIcon" />
<div class="arrow left" @click="$refs.carousel.prev()">
<img :src="viewIndex == 0 ? leftIcon : leftActiveIcon" />
</div>
<div
class="arrow right"
@click="$refs.carousel.next()"
>
<img :src="viewIndex < viewList.length - 1 ?rightActiveIcon:rightIcon" />
<div class="arrow right" @click="$refs.carousel.next()">
<img :src="viewIndex < viewList.length - 1 ? rightActiveIcon : rightIcon" />
</div>
</div>
</div>
......@@ -96,7 +69,11 @@ export default {
params: {
type: Object,
default: () => { }
}
},
stageList: {
type: Array,
default: () => { }
},
},
data () {
return {
......@@ -154,17 +131,25 @@ export default {
leftIcon: require('@/assets/icon/left.png'),
leftActiveIcon: require('@/assets/icon/left-active.png'),
rightIcon: require('@/assets/icon/right.png'),
rightActiveIcon: require('@/assets/icon/right-active.png')
rightActiveIcon: require('@/assets/icon/right-active.png'),
pageNumber:1
}
},
mounted () {
this.refreshTable()
},
methods: {
refreshTable () {
const params = JSON.parse(JSON.stringify(this.params))
params.requestSource = ''
console.log(JSON.parse(JSON.stringify(params)))
async refreshTable () {
const params = {
...JSON.parse(JSON.stringify(this.params)),
pageSize: 10,
pageNumber: this.pageNumber
}
const stageList = this.stageList
for(let k of stageList) {
const list = await this.$apis.journey.getCustomersList(params)
this.viewList.push(list.list)
}
},
}
}
......
<template>
<div class="journey-table">
<GLTable
ref="tableRef"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
>
<div
class="table-btns"
slot="auth-button"
slot-scope="scope"
>
<GLTableButton
:buttonList="tableButtonList"
:buttonItem="scope.scope"
></GLTableButton>
<GLTable ref="tableRef" :noDataImg="url" :tableParams="tableParams" :tableData="tableData" :pageConf="pageConf" @refreshTable="refreshTable" :tableTotal="tableTotal">
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope"></GLTableButton>
</div>
</GLTable>
<el-drawer
:visible.sync="showDrawer"
direction="rtl"
size="720px"
>
<el-drawer :visible.sync="showDrawer" direction="rtl" size="720px">
<template #title>
<div class="drawer-title">编辑客户旅程</div>
</template>
<div class="customer-detail">
<div class="info flex">
<div class="icon">
<template v-if="currentItem.icon">
<img :src="currentItem.icon">
<template v-if="userInfo.icon">
<img :src="userInfo.icon" />
</template>
<template v-else>
<img src="@/assets/icon/default-avatar.png">
<img src="@/assets/icon/default-avatar.png" />
</template>
</div>
<div class="text">
<div class="name">恒河猴</div>
18888888888
<div class="name">{{ userInfo.customerName }}</div>
{{ userInfo.customerPhone }}
</div>
</div>
<div class="tags">
<div class="label">旅程阶段:</div>
<template v-for="(i,index) in currentItem.mainOrderCode">
<template v-for="(i, index) in stageList">
<template>
<div
:key="index"
class="tags-item flex"
>
<el-button
:class="['text',{'disabled':i.disabled || i == 2},{'active':i.active || i == 1}]"
:disabled="i.disabled"
>{{ i }}恒河猴</el-button>
<div :key="index" class="tags-item flex">
<el-button :class="['text', { active: index == stageIndex }]" :disabled="index < stageIndex" @click="editStage(index)">{{ i.label }}</el-button>
<div class="arrow"></div>
</div>
</template>
......@@ -63,38 +38,29 @@
<div class="file">
<div class="title flex">
<div class="icon">
<img src="@/assets/icon/file.png">
<img src="@/assets/icon/file.png" />
</div>
智能档案
</div>
<template v-for="(i,index) in fileObject">
<template v-for="(i, index) in fileObject">
<template>
<div
:key="index"
class="file-item flex"
>
<div :key="index" class="file-item flex">
<div class="label">{{ i.label }}:</div>
<div class="value">恒河猴{{ i.key }}</div>
<div class="value">{{ userInfo.carMaintenanceInsurances[0][i.key] }}</div>
</div>
</template>
</template>
</div>
</div>
<div class="footer flex">
<el-button
type="default"
@click="showDrawer = false"
>取消</el-button>
<el-button
type="primary"
@click="handleConfirm"
>确定</el-button>
<el-button type="default" @click="showDrawer = false">取消</el-button>
<el-button type="primary" @click="handleConfirm">确定</el-button>
</div>
</el-drawer>
</div>
</template>
<script type='text/ecmascript-6'>
<script type="text/ecmascript-6">
import url from '@/assets/empty.png'
export default {
name: '',
......@@ -102,15 +68,22 @@ export default {
params: {
type: Object,
default: () => { }
},
stageList: {
type: Object,
default: () => { }
}
},
data () {
return {
currentItem: {},
userInfo: {
carMaintenanceInsurances:[{}]
},
tableSearchForm: {},
tableData: [],
tableTotal: 0,
url,
// 表格
getListApi: this.$apis.a.getListApi,
tableParams: {
listName: 'list',
tableOption: {
......@@ -119,17 +92,17 @@ export default {
tableColumns: [
{
label: '客户姓名',
prop: 'orderCode',
prop: 'customerName',
minWidth: '100px'
},
{
label: '客户电话',
prop: 'orderCode',
prop: 'customerPhone',
minWidth: '100px'
},
{
label: '微信昵称',
prop: 'orderCode',
prop: 'wechatNickname',
minWidth: '100px'
},
{
......@@ -140,7 +113,7 @@ export default {
},
{
label: '进入旅程时间',
prop: 'orderCode',
prop: 'sopJourneyEnterTime',
minWidth: '160px'
},
{
......@@ -150,7 +123,7 @@ export default {
},
{
label: '旅程阶段',
prop: 'orderCode',
prop: 'sopJourneyStage',
minWidth: '100px'
},
{
......@@ -160,7 +133,7 @@ export default {
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNumber', totalCount: 'total' },
// 表格按钮
tableButtonList: [
{
......@@ -172,37 +145,38 @@ export default {
condition: row => true,
listeners: {
click: row => {
this.currentItem = row
this.showDrawer = true
this.getCustomersDetail(row)
}
}
},
],
showDrawer: true,
showDrawer: false,
stageIndex:'',
fileObject: [
{
label: '车牌号',
key: ''
key: 'carNumber'
},
{
label: '车架号',
key: ''
key: 'carVin'
},
{
label: '品牌车型',
key: ''
key: 'carModel'
},
{
label: '购车日期',
key: ''
key: 'carBuyDate'
},
{
label: '近期保养',
key: ''
key: 'carPreviousMaintenanceDate'
},
{
label: '保险到期日期',
key: ''
key: 'carCpyInsEndTime'
}
]
}
......@@ -210,26 +184,57 @@ export default {
mounted () {
},
methods: {
beforeSearchFn () {
return new Promise(resolve => {
console.log(JSON.parse(JSON.stringify(this.params)))
this.tableSearchForm = this.params
// delete this.tableSearchForm.createDate
resolve()
})
},
// beforeSearchFn () {
// return new Promise(resolve => {
// console.log(JSON.parse(JSON.stringify(this.params)))
// this.tableSearchForm = this.params
// // delete this.tableSearchForm.createDate
// resolve()
// })
// },
refreshTable () {
this.$refs.tableRef.refreshTable()
this.$nextTick(()=>{
console.log(this.$refs)
const params = {
...JSON.parse(JSON.stringify(this.params)),
pageSize: this.$refs.tableRef.page.pageSize,
pageNumber: this.$refs.tableRef.page.pageNumber
}
this.loading = true
this.$apis.journey.getCustomersList(params).then(res => {
this.loading = false
if (res) {
this.tableData = res.list
this.tableTotal = res.total || 0
}
})
})
},
getCustomersDetail(row) {
this.$apis.journey.getCustomersDetail({oneId:row.oneId,sopJourneyId:row.sopJourneyId,orgId:row.orgId}).then(res => {
this.userInfo = res
this.stageIndex = this.stageList.findIndex(i=>i.label == this.userInfo.sopJourneyStage)
console.log(this.stageIndex)
})
},
editStage(index) {
this.stageIndex = index
this.userInfo.sopJourneyStage = this.stageList[index].label
},
handleConfirm () {
this.showDrawer = false
const {oneId,sopJourneyId,orgId,sopJourneyStage} = this.userInfo
this.$apis.journey.stageUpdate({oneId,sopJourneyId,orgId,sopJourneyStage,oprBy:this.$globalState.session.ccountName}).then(res=>{
this.showDrawer = false
})
}
}
}
</script>
<style scoped lang='scss'>
<style scoped lang="scss">
.flex {
display: flex;
align-items: center;
......@@ -359,6 +364,8 @@ export default {
.label {
color: #666666;
margin-left: auto;
width: 120px;
text-align: right;
}
.value {
width: calc(100% - 100px);
......@@ -374,4 +381,4 @@ export default {
justify-content: flex-end;
}
}
</style>
\ No newline at end of file
</style>
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-09-08 11:15:08
* @LastEditTime: 2023-09-25 15:41:52
* @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -16,8 +16,8 @@
</div>
</div>
<div class="collapse-item-panel" :style="{ display: stepItem.isExpaned ? 'block' : 'none' }">
<div class="task-item" v-for="(item, index) in stepItem.taskList" :key="index">
<template v-if="item.status.includes(1) && item.progressList">
<div class="task-item">
<template v-if="stepItem.conditionsList.length">
<div class="task-item-head flex-column-center">
<div class="task-item-icon">
<img src="@/assets/config/log.png" />
......@@ -26,15 +26,15 @@
<div class="task-item-desc">(描述用户触发何种条件后,将自动变更为该旅程阶段)</div>
</div>
<div class="progress-item-content bg-fff">
<div class="progress-item" v-for="(v, k) in item.progressList" :key="k">
<div class="progress-item" v-for="(v, k) in stepItem.conditionsList" :key="k">
<span>条件{{ k + 1 }}</span>
<span>AI电话</span>
<span>{{ spiltString(v, 0) }}</span>
<img src="@/assets/config/arrow.png" />
<span>已查看</span>
<span>{{ spiltString(v, 1) }}</span>
</div>
</div>
</template>
<template v-if="item.status.includes(2) && item.sopList">
<template v-if="stepItem.sopList.length">
<div class="task-item-sop flex">
<div class="task-sop-l">
<div class="task-item-head flex-column-center">
......@@ -45,18 +45,18 @@
<div class="task-item-desc">(系统面向当前旅程阶段客户的营销计划)</div>
</div>
<div class="task-item-content bg-fff">
<div class="step-item" v-for="(v, k) in item.sopList" :key="k">
<div class="step-item" v-for="(v, k) in stepItem.sopList" :key="k">
<div class="step-item-day">
<img src="@/assets/config/step-border.png" />
<span>{{ v.day }}</span>
<span>第{{ v[0].day }}天</span>
</div>
<div class="step-item-content">
<div v-for="(value, key) in v.times" :key="key" class="step-time-item flex-column-center">
<div v-for="(value, key) in v" :key="key" class="step-time-item flex-column-center">
<div>
<div class="step-item-desc">
<span>[{{ value.time }}]发送 | 门店助手1V1 |本功能将给跟进员工推送微信1v1任务,由员工向每个客户微信转发对应的营销内容。</span>
<span>[{{ stage_time[value.taskType] }}]发送 | {{ stage[value.taskType] }} |{{ stage_info[value.taskType] }}</span>
</div>
<div class="step-item-name">活动名称</div>
<div class="step-item-name">{{ stage_prefix[value.taskType] }}{{ value.textContent.defaultValue }}</div>
</div>
<!-- <div class="step-detail-btn" @click="getEmpDetail">详情</div> -->
</div>
......@@ -73,23 +73,23 @@
</div>
<div class="task-item-content bg-fff">
<div class="calendar-panel">
<div class="calendar-item" v-for="(v, k) in item.sopList" :key="k">
<div class="calendar-item" v-for="(v, k) in stepItem.sopList" :key="k">
<div class="calendar-day">第{{ k + 1 }}天</div>
<div class="calendar-time flex-column-center" v-for="(value, key) in v.times" :key="key">
<div class="calendar-time flex-column-center" v-for="(value, key) in v" :key="key">
<el-popover placement="top-start" width="100" trigger="click">
<div class="popover-panel" v-for="(t, pkey) in v.times" :key="pkey">
<div class="popover-panel" v-for="(t, pkey) in v" :key="pkey">
<div class="flex-column-center">
<span>{{ t.time }}</span>
<div :class="['stage-icon', `stage-${t.process}`]"></div>
<span>{{ stage_time[t.taskType] }}</span>
<div :class="['stage-icon', `stage-${t.taskType}`]"></div>
</div>
<div class="stage-desc">{{ stage[t.process] }}</div>
<div class="stage-desc">{{ stage[t.taskType] }}</div>
</div>
<div slot="reference" class="flex-column-center" v-if="v.times.length <= 2">
<span>{{ value.time }}</span>
<div :class="['stage-icon', `stage-${value.process}`]"></div>
<div slot="reference" class="flex-column-center" v-if="v.length <= 2">
<span>{{ stage_time[value.taskType] }}</span>
<div :class="['stage-icon', `stage-${value.taskType}`]"></div>
</div>
<div slot="reference" class="flex-column-center" v-if="v.times.length > 2 && key == 0">
<div slot="reference" class="flex-column-center" v-if="v.length > 2 && key == 0">
<span>3条内容</span>
</div>
</el-popover>
......@@ -106,15 +106,38 @@
</div>
</template>
<script>
const STAGE = {
1: '门店助手1v1',
2: '门店助手朋友圈',
3: '发送短信',
4: 'AI外呼',
const STAGE = Object.freeze({
4: '门店助手1v1',
3: '门店助手朋友圈',
1: '发送短信',
2: 'AI外呼',
5: '跟进提醒',
6: '修改旅程阶段',
7: '获取客户信息'
}
6: '查询到保'
})
const STAGE_INFO = Object.freeze({
4: '本功能将给跟进员工推送1v1任务,由员工向每个客户微信转发对应的营销内容。',
3: '本功能将给跟进员工推送朋友圈任务,由员工一键将营销内容发布微信朋友圈',
1: '本功能将给跟进员工推送短信营销任务,由员工一键确认后系统自动推送营销短信给客户',
2: '本功能将给跟进员工推送AI外呼任务,由员工一键确认后AI外呼平台自动对客户进行外呼',
5: '本功能将给跟进员工推送跟进提醒,提醒员工给客户打一个电话或其他跟进行为。',
6: '本功能配合第三方平台,定时获取到保信息并更新。'
})
const STAGE_TIME = Object.freeze({
4: '09:00',
3: '09:00',
1: '09:00',
2: '16:00',
5: '09:00',
6: '09:00'
})
const STAGE_PREFIX = Object.freeze({
4: '',
3: '',
1: '短信模版:',
2: 'AI话术模版:',
5: '提醒模版:',
6: '查询内容:'
})
// import empDetail from './empDetail'
export default {
components: {
......@@ -129,11 +152,17 @@ export default {
data() {
return {
stage: STAGE,
stage_info: STAGE_INFO,
stage_time: STAGE_TIME,
stage_prefix: STAGE_PREFIX,
empVisible: false
}
},
created() {},
methods: {
spiltString(str, n) {
return str.split('-')[n]
},
//查看详情
getEmpDetail() {
this.empVisible = true
......@@ -202,7 +231,7 @@ export default {
.progress-item {
position: relative;
padding-left: 20px;
width: 50%;
min-width: 50%;
display: flex;
align-items: center;
img {
......
......@@ -6,7 +6,7 @@
</el-form-item>
<el-form-item label="活动链接:" size="small" prop="activityId">
<div class="flex-column-center">
<el-select filterable v-model="addForm.activityId" placeholder="请选择" @change="getActivity" :disabled="journeyStatus != 1">
<el-select filterable v-model="addForm.activityId" placeholder="请选择" @change="getActivity" :disabled="journeyStatus == 1">
<el-option v-for="item in activityList" :key="item.id" :label="item.activityName" :value="item.id"></el-option>
</el-select>
<div class="add-btn-a" @click="jumpActivity">创建活动</div>
......@@ -34,11 +34,11 @@
</div>
<div class="activity-detail-item">
<label>AI话术:</label>
<span>{{ activityInfo.ai }}人</span>
<span>{{ activityInfo.aiSpeech }}人</span>
</div>
<div class="activity-detail-item">
<label>营销短信:</label>
<span>{{ activityInfo.message }}人</span>
<span>{{ activityInfo.textMessage }}人</span>
</div>
</div>
</div>
......@@ -52,7 +52,9 @@ export default {
data() {
return {
dialogVisible: false,
addForm: {},
addForm: {
name: this.$route.query.title
},
activityInfo: {
message: '【东莞睿博】千元礼包,钜惠来袭,诚邀参与#活动名称#活动',
total: 20,
......@@ -68,9 +70,18 @@ export default {
methods: {
//获取活动信息
getActivity() {
console.log(this.addForm.activityId)
this.$apis.journeyConfig.getActivityDetailApi({ id: this.addForm.activityId }).then(res => {
console.log(res)
})
this.$apis.journeyConfig.findMarketingTask({ activityId: this.addForm.activityId }).then(res => {
console.log(res)
})
},
init() {
init(info) {
if (info.activityId) {
this.activityInfo = info
this.addForm.activityId = info.activityId
}
this.dialogVisible = true
this.getActivityList()
},
......@@ -80,7 +91,7 @@ export default {
},
//活动列表
getActivityList() {
this.$apis.journeyConfig.activityPage({ pageSize: 10000, currentPage: 1 }).then(res => {
this.$apis.journeyConfig.activityPage({ pageSize: 10000, currentPage: 1, activityStatus: 2 }).then(res => {
this.activityList = res.list || []
})
},
......@@ -89,7 +100,13 @@ export default {
this.$refs.addForm.validate(valid => {
if (valid) {
this.handleClose()
this.$emit('setProcess')
this.$emit('setProcess', {
activityId: 10596, // 活动id
activityName: '活动名称',
activityUrl: '活动访问地址',
aiSpeech: '默认AI营销话术',
textMessage: '默认短信'
})
}
})
},
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-09-08 11:25:01
* @LastEditTime: 2023-09-25 19:37:31
* @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -38,6 +38,7 @@ export default {
data() {
return {
journeyStatus: 1,
activityInfo: {},
statusList: [
{
describe: '步骤一:关联营销活动',
......@@ -96,7 +97,7 @@ export default {
status: 3,
btnName: '去停用',
clickFun: () => {
this.handleClose()
this.handleClose(-1)
}
},
{
......@@ -114,13 +115,11 @@ export default {
icon: 'el-icon-success',
isDisabled: true,
status: 4,
btnName: '已停用',
clickFun: () => {
this.handleConcat()
}
btnName: '已停用'
}
],
configList: [
configList: [],
configList2: [
{
label: '可报价',
isExpaned: false,
......@@ -203,17 +202,78 @@ export default {
]
}
},
created() {},
mounted() {
const query = this.$route.query
this.query = query
this.getDetail()
},
methods: {
getDetail() {
this.$apis.journeyConfig.getInstIdDetail({ instId: this.query.instId }).then(res => {
const instParam = JSON.parse(res.instParam)
const stages = instParam.stages
const instStatus = res.instStatus
this.activityInfo = instParam.customData
const activityId = this.activityInfo.activityId
if (instStatus == 0 && !activityId) {
this.journeyStatus = 1
}
if (instStatus == 0 && activityId) {
this.journeyStatus = 2
}
if (instStatus == 1 && activityId) {
this.journeyStatus = 3
}
if (instStatus == -1 && activityId) {
this.journeyStatus = 4
}
const nodes = res.nodes
const configList = []
for (let k in stages) {
let list = []
for (let v of nodes) {
if (v.nodeParam && JSON.parse(v.nodeParam).stage == stages[k].value) {
list.push(JSON.parse(v.nodeParam))
}
}
list = list.filter(item => item.day)
list.sort((a, b) => {
return a.day - b.day
})
const sopList = this.groupBy(list, 'day')
configList.push({
label: stages[k].value,
isExpaned: false,
conditionsList: stages[k].conditions || [],
sopList
})
}
this.configList = configList
})
},
groupBy(list, name) {
const m = new Map()
list.map(item => {
m.set(item[name], [...(m.get(item[name]) || ''), item])
})
return [...m.values()]
},
//关闭
handleClose() {
this.handleConfirm('关闭提示', '确定关闭', '旅程关闭后将禁用无法重新开启', '', () => {
this.journeyStatus = 4
this.setSopInsts(-1)
})
},
setSopInsts(status) {
this.$apis.journeyConfig.setSopInsts({ instId: this.query.instId, status }).then(res => {
this.getDetail()
})
},
//关联活动成功
setProcess() {
this.journeyStatus = 2
setProcess(data) {
this.$apis.journeyConfig.concatActivity({ instId: this.query.instId, data }).then(res => {
this.getDetail()
})
},
handleConfirm(title, btnName, content, customClass, callback) {
this.$confirm(content, title, {
......@@ -230,7 +290,7 @@ export default {
//开启
haneldOpen() {
this.handleConfirm('开启提示', '确定开启', '旅程开启后将无法修改关联的活动链接', '', () => {
this.journeyStatus = 3
this.setSopInsts(1)
})
},
//关联活动
......@@ -239,7 +299,7 @@ export default {
},
//打开活动
concatActivity() {
this.$refs.activityForm.init()
this.$refs.activityForm.init(this.activityInfo)
}
}
}
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-09-11 14:20:49
* @LastEditTime: 2023-09-25 15:55:48
* @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -14,9 +14,9 @@
<div class="journey-item" v-for="item in journeyList" :key="item.id">
<div class="journey-item-head flex-column-center ">
<img src="@/assets/config/icon-1.png" />
<span>{{ item.title }}</span>
<span>{{ item.instName }}</span>
<a @click="handleEdit(item)">编辑</a>
<div :class="{ 'journey-item-status flex-center': true, 'is-disable': item.status != 1 }">
<div :class="{ 'journey-item-status flex-center': true, 'is-disable': item.instStatus != 1 }">
<i :class="`${getStatusValue(item, 'icon')}`"></i>
<span>{{ getStatusValue(item, 'label') }}</span>
</div>
......@@ -40,27 +40,27 @@
</template>
<script>
const STATUS = [
{ label: '已启用', value: 1, icon: 'el-icon-check' },
{ label: '未启用', value: 2, icon: 'el-icon-close' },
{ label: '已禁用', value: 3, icon: 'el-icon-remove-outline' }
{ label: '已启用', value: 0, icon: 'el-icon-check' },
{ label: '未启用', value: 1, icon: 'el-icon-close' },
{ label: '已禁用', value: -1, icon: 'el-icon-remove-outline' }
]
export default {
data() {
return {
searchForm: {},
journeyAllList: [],
searchFormData: [
{
label: '旅程',
name: 'answer',
name: 'instName',
type: 'select',
optionList: [],
optionId: 'value',
optionLabel: 'label',
multiple: true
optionId: 'instName',
optionLabel: 'instName'
},
{
label: '状态',
name: 'answer',
name: 'instStatus',
type: 'select',
optionList: STATUS,
optionId: 'value',
......@@ -68,65 +68,104 @@ export default {
multiple: true
}
],
journeyList: [
{
id: 1,
title: '续保客户旅程1',
status: 1,
journeyItem: [
{
label: '待跟进',
process: 1
},
{
label: '有意向',
process: 2
},
{
label: '可报价',
process: 3
},
{
label: '已成交',
process: 4
},
{
label: '战败',
process: 5
}
]
},
{
id: 2,
title: '续保客户旅程2',
status: 2,
journeyItem: []
},
{
id: 2,
title: '续保客户旅程3',
status: 3,
journeyItem: []
}
]
journeyList: []
// journeyList: [
// {
// id: 1,
// title: '续保客户旅程1',
// status: 1,
// journeyItem: [
// {
// label: '待跟进',
// process: 1
// },
// {
// label: '有意向',
// process: 2
// },
// {
// label: '可报价',
// process: 3
// },
// {
// label: '已成交',
// process: 4
// },
// {
// label: '战败',
// process: 5
// }
// ]
// },
// {
// id: 2,
// title: '续保客户旅程2',
// status: 2,
// journeyItem: []
// },
// {
// id: 2,
// title: '续保客户旅程3',
// status: 3,
// journeyItem: []
// }
// ]
}
},
mounted() {
this.byGroupIdSop()
},
methods: {
byGroupIdSop() {
//this.$globalState.session.merchantId
this.$apis.journeyConfig.byGroupIdSop({ groupId: 'M153312087', pageNumber: 1 }).then(res => {
this.journeyAllList = res.list || []
this.journeyAllList.forEach(item => {
const stages = JSON.parse(item.instParam).stages
item.journeyItem = []
let process = 0
for (let k in stages) {
process++
item.journeyItem.push({
label: stages[k].value,
process
})
}
})
console.log(this.journeyAllList)
this.searchFormData[0].optionList = this.journeyAllList
this.handleSearch()
})
},
//状态值映射
getStatusValue(val, prop) {
return STATUS.find(item => item.value == val.status)[prop]
console.log(val)
return STATUS.find(item => item.value == val.instStatus)[prop]
},
handleEdit(item) {
this.$router.push({
path: '/journeyConfig/config',
query: {
title: item.title
title: item.instName,
instId: item.instId
}
})
},
handleSearch() {},
handleReset() {}
handleSearch() {
const { instStatus, instName } = this.searchForm
this.journeyList = this.journeyAllList
console.log(instStatus, instName)
if (instName) {
this.journeyList = this.journeyList.filter(item => item.instName == instName)
}
if (instStatus && instStatus.length) {
this.journeyList = this.journeyList.filter(item => instStatus.includes(item.instStatus))
}
},
handleReset() {
this.searchForm = {}
this.handleSearch()
}
}
}
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!