Commit 17c40614 by 杨明

Merge branch 'v3.23.1' of http://192.168.3.233:8090/saas/scrm-micro-scene into v3.23.1

2 parents 264be84d e5ca3e02
...@@ -156,6 +156,7 @@ const getTaskList = params => { ...@@ -156,6 +156,7 @@ const getTaskList = params => {
method: 'post', method: 'post',
data: params, data: params,
noSessionId: true, noSessionId: true,
sign: false
}) })
} }
//触达类型列表 //触达类型列表
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08 * @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-04 13:37:31 * @LastEditTime: 2024-01-04 13:39:03
* @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue * @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
<template> <template>
<div :class="{ 'collapse-item': true, 'is-active': stepItem.isExpaned }"> <div :class="{ 'collapse-item': true, 'is-active': stepItem.isExpaned }" ref="collapseRef">
<div class="collapse-item-tab flex-column-center plr20" @click="handleExpand(item)"> <div class="collapse-item-tab flex-column-center plr20" @click="handleExpand(item)">
<i class="el-icon-caret-bottom" v-show="stepItem.isExpaned"></i> <i class="el-icon-caret-bottom" v-show="stepItem.isExpaned"></i>
<i class="el-icon-caret-right" v-show="!stepItem.isExpaned"></i> <i class="el-icon-caret-right" v-show="!stepItem.isExpaned"></i>
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
<stat-dialog v-if="statVisible" :statVisible="statVisible"></stat-dialog> <stat-dialog v-if="statVisible" :statVisible="statVisible"></stat-dialog>
<edit-condition v-if="conditionVisible" :conditionVisible="conditionVisible" :conditionInfo="conditionInfo" @closeCondition="closeCondition"></edit-condition> <edit-condition v-if="conditionVisible" :conditionVisible="conditionVisible" :conditionInfo="conditionInfo" @closeCondition="closeCondition"></edit-condition>
<select-tag ref="selectTagRef" @tagSelected="handleTagSelect"></select-tag> <select-tag ref="selectTagRef" @tagSelected="handleTagSelect"></select-tag>
<model-dialog :tplVisible="tplVisible" :taskType="taskType" @dialogClose="dialogClose" @confirm="updateContent"></model-dialog> <model-dialog :tplVisible="tplVisible" v-bind="sopItem" @dialogClose="dialogClose" @confirm="updateContent"></model-dialog>
</div> </div>
</template> </template>
<script> <script>
...@@ -246,6 +246,7 @@ import editCondition from './editCondition' ...@@ -246,6 +246,7 @@ import editCondition from './editCondition'
import SelectTag from './SelectTag' import SelectTag from './SelectTag'
import ModelDialog from './Model.vue' import ModelDialog from './Model.vue'
import model from '@/mixins/model' import model from '@/mixins/model'
import { utils } from 'glsx-common'
export default { export default {
mixins: [model], mixins: [model],
components: { components: {
...@@ -276,7 +277,7 @@ export default { ...@@ -276,7 +277,7 @@ export default {
statVisible: false, statVisible: false,
conditionVisible: false, conditionVisible: false,
tplVisible: false, tplVisible: false,
taskType: 1 sopItem: {}
} }
}, },
created() {}, created() {},
...@@ -287,6 +288,7 @@ export default { ...@@ -287,6 +288,7 @@ export default {
methods: { methods: {
//获取已选择标签 //获取已选择标签
handleTagSelect(data) { handleTagSelect(data) {
console.log(data)
let dataTag = [], let dataTag = [],
options options
data.forEach(group => { data.forEach(group => {
...@@ -294,7 +296,7 @@ export default { ...@@ -294,7 +296,7 @@ export default {
labelList.forEach(label => { labelList.forEach(label => {
dataTag.push({ dataTag.push({
groupId: group.labelGroup.id, groupId: group.labelGroup.id,
groupName: group.labelGroup.id, groupName: group.labelGroup.name,
groupType: group.labelType, groupType: group.labelType,
labelId: label.id, labelId: label.id,
labelName: label.name labelName: label.name
...@@ -308,13 +310,41 @@ export default { ...@@ -308,13 +310,41 @@ export default {
} }
this.updateParam(options) this.updateParam(options)
}, },
recursionTreeTag(selectItem, dataTag) {
if (dataTag.length == 0) return
selectItem.push({
labelGroup: {
id: dataTag[0].groupId,
name: dataTag[0].groupName
},
labelType: dataTag[0].groupType,
labelList: []
})
for (let i = 0; i < dataTag.length; i++) {
let len = selectItem.length - 1,
item = dataTag[i]
if (selectItem[len].labelGroup.id == item.groupId) {
selectItem[len].labelList.push({
id: item.labelId,
name: item.labelName
})
dataTag.splice(i--, 1)
}
}
if (dataTag.length > 0) {
this.recursionTreeTag(selectItem, dataTag)
}
// return selectItem
},
//设置条件 //设置条件
setCriteria(item) { setCriteria(item) {
let selectItem = []
let dataTag = utils.deepClone(item.dataTag)
this.recursionTreeTag(selectItem, dataTag)
this.sopItem = item this.sopItem = item
this.$refs.selectTagRef.init() this.$refs.selectTagRef.init(selectItem)
}, },
updateContent(data) { updateContent(data) {
console.log(data)
let taskParam = data, let taskParam = data,
options = { options = {
taskParam, taskParam,
...@@ -323,10 +353,9 @@ export default { ...@@ -323,10 +353,9 @@ export default {
this.updateParam(options) this.updateParam(options)
}, },
updateParam(options) { updateParam(options) {
console.log(this.sopItem)
let { day, stage, stageid, taskType, nodeId } = this.sopItem let { day, stage, stageid, taskType, nodeId } = this.sopItem
let dataTag = options.dataTag || this.sopItem.dataTag, let dataTag = options.dataTag || this.sopItem.dataTag,
taskParam = options.taskParam || {}, taskParam = options.taskParam || this.sopItem.taskParam,
data = { data = {
day, day,
stage, stage,
...@@ -336,14 +365,12 @@ export default { ...@@ -336,14 +365,12 @@ export default {
taskParam, taskParam,
dataTag dataTag
} }
console.log(data)
this.$apis.journeyConfig.updateParam({ nodeId, data }).then(res => { this.$apis.journeyConfig.updateParam({ nodeId, data }).then(res => {
console.log(res) if (res.code == 200) {
this.$parent.getDetail()
this.tplVisible = false
}
}) })
// {
//
// }
}, },
/* 编辑内容 /* 编辑内容
* 门店助手跟进提醒 * 门店助手跟进提醒
...@@ -352,8 +379,8 @@ export default { ...@@ -352,8 +379,8 @@ export default {
* 企微群发/企微朋友圈 * 企微群发/企微朋友圈
*/ */
editContent(item) { editContent(item) {
console.log(item)
this.sopItem = item this.sopItem = item
this.taskType = item.taskType
this.tplVisible = true this.tplVisible = true
}, },
dialogClose(val) { dialogClose(val) {
......
<template> <template>
<GLDialog :title="title" :visible.sync="visible" mode="big" :before-close="handleClose"> <GLDialog v-if="visible" :title="title" :visible.sync="visible" mode="big" :before-close="handleClose">
<el-form :model="tplForm" class="basic-form" :rules="tplRules" ref="tplForm" label-width="154px"> <el-form :model="tplForm" class="basic-form" :rules="tplRules" ref="tplForm" label-width="154px">
<template v-if="[7, 8, 9, 10].includes(taskType)"> <template v-if="[7, 8, 9, 10].includes(taskType)">
<el-form-item label="跟进员工类型:"> <el-form-item label="跟进员工类型:">
...@@ -50,6 +50,10 @@ export default { ...@@ -50,6 +50,10 @@ export default {
taskType: { taskType: {
type: String, type: String,
default: '7' default: '7'
},
taskParam: {
type: Object,
default: () => {}
} }
}, },
data() { data() {
...@@ -58,7 +62,8 @@ export default { ...@@ -58,7 +62,8 @@ export default {
tplForm: { tplForm: {
followerTypeId: '', followerTypeId: '',
staffUserIds: '', staffUserIds: '',
attachments: [] attachments: [],
attContentList: []
}, },
tplRules: { tplRules: {
// userList: [{ validator: validatorUser, trigger: 'change' }], // userList: [{ validator: validatorUser, trigger: 'change' }],
...@@ -182,9 +187,19 @@ export default { ...@@ -182,9 +187,19 @@ export default {
tplVisible(newVal) { tplVisible(newVal) {
this.visible = newVal this.visible = newVal
this.getFollowListType() this.getFollowListType()
if (this.taskParam) {
this.tplForm = {
...this.taskParam
}
if (this.tplForm.attContentList.length) {
this.$nextTick(() => {
this.$refs.welcome && this.$refs.welcome.updateList(this.tplForm.attContentList)
})
}
}
}, },
taskType(newVal) { taskType(newVal) {
this.changeEdit(newVal) this.changeEdit(newVal, 999999)
switch (this.taskType) { switch (this.taskType) {
case 7: case 7:
this.title = '企微提醒模版' this.title = '企微提醒模版'
...@@ -202,9 +217,6 @@ export default { ...@@ -202,9 +217,6 @@ export default {
} }
} }
}, },
mounted() {
this.merchantId = this.$globalState.session.merchantId
},
methods: { methods: {
renderParameter(options) { renderParameter(options) {
let { marketingId, marketingType } = options let { marketingId, marketingType } = options
...@@ -323,21 +335,19 @@ export default { ...@@ -323,21 +335,19 @@ export default {
staffUserIds.push(val.userId) staffUserIds.push(val.userId)
}) })
this.tplForm.staffUserIds = staffUserIds.join(',') this.tplForm.staffUserIds = staffUserIds.join(',')
this.tplForm.followName = this.followList.filter(item=>item.id ==val )[0].followName this.tplForm.followName = this.followList.filter(item => item.id == val)[0].followName
}) })
}, },
previewForm(val) { previewForm(val) {
const value = this.$common.utils.deepClone(val) const value = this.$common.utils.deepClone(val)
console.log(value, 111111111111)
if (value[0] && !value[0].attContent) value.splice(0, 1) if (value[0] && !value[0].attContent) value.splice(0, 1)
this.tplForm.attContentList=this.$common.utils.deepClone(value) this.tplForm.attContentList = this.$common.utils.deepClone(value)
value.forEach(activity => { value.forEach(activity => {
if (activity.attType == 7) { if (activity.attType == 7) {
activity.attType = 4 activity.attType = 4
activity.attContent = this.renderParameter(activity.attContent) activity.attContent = this.renderParameter(activity.attContent)
} }
}) })
console.log(this.tplForm)
this.tplForm.attachments = value this.tplForm.attachments = value
}, },
handleClose() { handleClose() {
......
...@@ -6,16 +6,29 @@ ...@@ -6,16 +6,29 @@
</GLDialog> </GLDialog>
</template> </template>
<script> <script>
const STAGE = Object.freeze({
1: '门店助手短信',
2: 'AI外呼',
3: '门店助手朋友圈',
4: '门店助手1v1',
5: '跟进提醒',
6: '客户信息查询',
7: '企微提醒',
8: '企微群发',
9: '企微朋友圈',
10: '发送短信'
})
export default { export default {
props: { props: {
statVisible: Boolean statVisible: Boolean
}, },
data() { data() {
return { return {
stage: STAGE,
loading:false, loading:false,
tableSearchForm:{}, tableSearchForm:{},
getListApi: this.$apis.journeyConfig.getTaskList, getListApi: this.$apis.journeyConfig.getTaskList,
pageConf: { pageSize: 'pageNumber', pageNum: 'pageNumber', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNumber', totalCount: 'total' },
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableColumns: [ tableColumns: [
...@@ -25,7 +38,10 @@ export default { ...@@ -25,7 +38,10 @@ export default {
}, },
{ {
label: '触达方式', label: '触达方式',
prop: 'taskType' prop: 'taskType',
formatter: cellValue => {
return this.stage[cellValue.taskType] ? this.stage[cellValue.taskType] : '--'
}
}, },
{ {
label: '今日营销客户数', label: '今日营销客户数',
...@@ -55,7 +71,6 @@ export default { ...@@ -55,7 +71,6 @@ export default {
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
this.loading = true this.loading = true
console.log(1111111111)
this.tableSearchForm = { this.tableSearchForm = {
instId:this.query.instId instId:this.query.instId
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!