Commit 97d9b5e2 by 王志慧

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

2 parents acea7e18 99ee4d78
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-07 16:54:06 * @Date: 2023-09-07 16:54:06
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-04 10:41:30 * @LastEditTime: 2024-01-04 15:17:51
* @FilePath: \scrm-micro-journey\src\api\modules\journeyConfig.js * @FilePath: \scrm-micro-journey\src\api\modules\journeyConfig.js
* @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
*/ */
...@@ -183,6 +183,7 @@ const setStageData = params => { ...@@ -183,6 +183,7 @@ const setStageData = params => {
url: `/process/sop/api/sopInsts/${params.instId}/instParam/stageData`, url: `/process/sop/api/sopInsts/${params.instId}/instParam/stageData`,
method: 'post', method: 'post',
data: params.data, data: params.data,
noSessionId: true,
sign: false sign: false
}) })
} }
......
...@@ -135,6 +135,9 @@ export default { ...@@ -135,6 +135,9 @@ export default {
computed: { computed: {
selectType() { selectType() {
return this.activityList.length ? this.activityList.find(act => act.itemValue == this.activeName).itemType : '' return this.activityList.length ? this.activityList.find(act => act.itemValue == this.activeName).itemType : ''
},
miniType() {
return this.activityList.length ? this.activityList.find(act => act.itemValue == this.activeName).miniType : ''
} }
}, },
methods: { methods: {
...@@ -191,7 +194,7 @@ export default { ...@@ -191,7 +194,7 @@ export default {
params.marketingUrl = this.selectItem.cardCover params.marketingUrl = this.selectItem.cardCover
params.marketingTitle = this.selectItem.cardTitle params.marketingTitle = this.selectItem.cardTitle
} }
this.$emit('selectActivity', { marketingId, marketingType: this.activeName, marketingName, marketingContent, ...params }) this.$emit('selectActivity', { marketingId, marketingType: this.activeName, miniType: this.miniType, marketingName, marketingContent, ...params })
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.pageSize = val this.pageSize = val
......
export default { export default {
data() { data() {
return { return {
journeyStatus: 2, journeyStatus: 0,
statusList: [], statusList: [],
activityType: { activityType: {
1: [ 1: [
...@@ -159,7 +159,8 @@ export default { ...@@ -159,7 +159,8 @@ export default {
this.$apis.journeyConfig.getInstIdDetail({ instId: this.query.instId }).then(res => { this.$apis.journeyConfig.getInstIdDetail({ instId: this.query.instId }).then(res => {
const instParam = JSON.parse(res.instParam) const instParam = JSON.parse(res.instParam)
const dataTypeCode = instParam.dataTypeCode const dataTypeCode = instParam.dataTypeCode
if (dataTypeCode == '"xbpzj"') { console.log(dataTypeCode)
if (dataTypeCode == 'xbpzj') {
this.statusList = this.activityType[1] this.statusList = this.activityType[1]
} else { } else {
this.statusList = this.activityType[2] this.statusList = this.activityType[2]
...@@ -174,15 +175,17 @@ export default { ...@@ -174,15 +175,17 @@ export default {
if (instStatus == 0 && activityId) { if (instStatus == 0 && activityId) {
this.journeyStatus = 2 this.journeyStatus = 2
} }
if (instStatus == 1 && activityId) { if (instStatus == 1) {
this.journeyStatus = 3 this.journeyStatus = 3
} }
if (instStatus == -1 && activityId) { if (instStatus == -1) {
this.journeyStatus = 4 this.journeyStatus = 4
} }
console.log(stages, 'this.journeyStatus')
const nodes = res.nodes const nodes = res.nodes
const configList = [] const configList = []
for (let k in stages) { for (let k in stages) {
console.log(stages[k])
let list = [] let list = []
for (let v of nodes) { for (let v of nodes) {
if (v.nodeParam && JSON.parse(v.nodeParam).stage == stages[k].value) { if (v.nodeParam && JSON.parse(v.nodeParam).stage == stages[k].value) {
...@@ -203,13 +206,15 @@ export default { ...@@ -203,13 +206,15 @@ export default {
sopList sopList
}) })
} }
console.log(configList, 'configList')
this.configList = configList this.configList = configList
}) })
}, },
async haneldOpenQY() { async haneldOpenQY() {
this.handleConfirm('开启提示', '确定开启', '旅程开启后将无法修改关联的活动链接', '', async () => { this.handleConfirm('开启提示', '确定开启', '旅程开启后将无法修改关联的活动链接', '', async () => {
await this.$apis.journeyConfig.authorizeMerchant({ merchantId: this.$globalState.session.merchantId }) await this.$apis.journeyConfig.authorizeMerchant({ merchantId: this.$globalState.session.merchantId })
this.$apis.journeyConfig.concatActivity({ instId: this.query.instId, data: { supMerchantNo: this.$globalState.session.merchantId } }).then(res => {}) await this.$apis.journeyConfig.concatActivity({ instId: this.query.instId, data: { supMerchantNo: this.$globalState.session.merchantId } })
this.setSopInsts(1)
}) })
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @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:39:03 * @LastEditTime: 2024-01-04 15:22:28
* @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
--> -->
...@@ -395,7 +395,8 @@ export default { ...@@ -395,7 +395,8 @@ export default {
title, title,
label, label,
editable, editable,
conditionsList: conditionsList[k] conditionsList: conditionsList,
index:k
} }
this.conditionVisible = true this.conditionVisible = true
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-27 11:29:17 * @Date: 2023-09-27 11:29:17
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-03 18:08:45 * @LastEditTime: 2024-01-04 16:20:31
* @FilePath: \scrm-micro-scene\src\views\journeyConfig\components\relatedActivity.vue * @FilePath: \scrm-micro-scene\src\views\journeyConfig\components\relatedActivity.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
--> -->
...@@ -15,14 +15,13 @@ ...@@ -15,14 +15,13 @@
<span v-else-if="item.getName">{{ item.getName(conditionInfo[item.name]) }}</span> <span v-else-if="item.getName">{{ item.getName(conditionInfo[item.name]) }}</span>
<span v-else>{{ conditionInfo[item.name] }}</span> <span v-else>{{ conditionInfo[item.name] }}</span>
</div> </div>
<div class="condition-panel" v-if="status == 1"> <div class="condition-panel" v-if="configInfo.length == 2">
<div class="flex"> <div class="flex">
<label class="condition-label">企微成员范围:</label> <label class="condition-label">企微成员范围:</label>
<div class="condition-select"> <div class="condition-select">
<div class="m-b-10"> <div class="m-b-10">
<el-radio-group v-model="radio"> <el-radio-group v-model="empType">
<el-radio :label="3">全部成员</el-radio> <el-radio :label="index" v-for="(item, index) in configInfo" :key="item.id">{{ item.name }}</el-radio>
<el-radio :label="6">指定成员</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<el-button size="small" @click="handleAddEmp"> <el-button size="small" @click="handleAddEmp">
...@@ -40,7 +39,7 @@ ...@@ -40,7 +39,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="condition-panel" v-else-if="status == 2"> <div class="condition-panel">
<div class="flex"> <div class="flex">
<label class="condition-label">进入条件:</label> <label class="condition-label">进入条件:</label>
<div class="condition-select"> <div class="condition-select">
...@@ -55,7 +54,7 @@ ...@@ -55,7 +54,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="condition-panel" v-else> <div class="condition-panel">
<div class="flex-column-center"> <div class="flex-column-center">
<label class="condition-label">进入条件:</label> <label class="condition-label">进入条件:</label>
<div class="condition-select"> <div class="condition-select">
...@@ -68,13 +67,13 @@ ...@@ -68,13 +67,13 @@
</div> </div>
</div> </div>
</div> </div>
<div class="flex-column-center"> <div class="flex-column-center" v-if="configInfo.length == 1">
<label class="require">*</label> <label class="require">*</label>
<label class="condition-label">页面配置:</label> <label class="condition-label">页面配置:</label>
<div class="condition-select"> <div class="condition-select">
<div class="condition-input"> <div class="condition-input">
<span>当前页面营销活动为</span> <span>当前页面营销活动为</span>
<el-input style="width: 284px;"></el-input> <el-input style="width: 284px;" v-model="activityName"></el-input>
<a @click="typeVisible = true">编辑页面</a> <a @click="typeVisible = true">编辑页面</a>
</div> </div>
</div> </div>
...@@ -94,6 +93,7 @@ import selectEmp from './selectEmp' ...@@ -94,6 +93,7 @@ import selectEmp from './selectEmp'
import selectType from './selectType' import selectType from './selectType'
import materialModel from '@/components/model/materialModel' import materialModel from '@/components/model/materialModel'
import activityModel from '@/components/model/activityModel' import activityModel from '@/components/model/activityModel'
import { use } from 'echarts'
export default { export default {
components: { components: {
selectEmp, selectEmp,
...@@ -110,12 +110,13 @@ export default { ...@@ -110,12 +110,13 @@ export default {
}, },
data() { data() {
return { return {
status: 1, empType: 0,
userList: [], userList: [],
materialList: { materialList: {
name: '素材', name: '素材',
type: 'material', type: 'material',
funName: 'material', funName: 'material',
miniType: 8,
fileType: true, fileType: true,
groupListApi: this.$apis.welcomeword.getGroupListApi, groupListApi: this.$apis.welcomeword.getGroupListApi,
materialListApi: this.$apis.welcomeword.getMaterialListApi, materialListApi: this.$apis.welcomeword.getMaterialListApi,
...@@ -128,6 +129,7 @@ export default { ...@@ -128,6 +129,7 @@ export default {
itemName: '权益卡试用', itemName: '权益卡试用',
itemValue: 3, itemValue: 3,
itemType: 'card', itemType: 'card',
miniType: 1,
getInterfaceApi: this.$apis.welcomeword.getCard, getInterfaceApi: this.$apis.welcomeword.getCard,
params: { params: {
tryAble: 1, tryAble: 1,
...@@ -137,6 +139,7 @@ export default { ...@@ -137,6 +139,7 @@ export default {
{ {
itemName: '权益套餐', itemName: '权益套餐',
itemValue: 4, itemValue: 4,
miniType: 2,
itemType: 'package', itemType: 'package',
getInterfaceApi: this.$apis.welcomeword.getPackage, getInterfaceApi: this.$apis.welcomeword.getPackage,
params: { params: {
...@@ -147,6 +150,7 @@ export default { ...@@ -147,6 +150,7 @@ export default {
itemName: '商城券', itemName: '商城券',
itemValue: 2, itemValue: 2,
itemType: 'coupon', itemType: 'coupon',
miniType: 4,
getInterfaceApi: this.$apis.welcomeword.getMerchant, getInterfaceApi: this.$apis.welcomeword.getMerchant,
params: { params: {
discountTypes: [2, 3, 4], discountTypes: [2, 3, 4],
...@@ -158,6 +162,7 @@ export default { ...@@ -158,6 +162,7 @@ export default {
{ {
itemName: '秒杀活动', itemName: '秒杀活动',
itemValue: 5, itemValue: 5,
miniType: 3,
itemType: 'activity', itemType: 'activity',
getInterfaceApi: this.$apis.welcomeword.getActivity, getInterfaceApi: this.$apis.welcomeword.getActivity,
params: { params: {
...@@ -169,6 +174,7 @@ export default { ...@@ -169,6 +174,7 @@ export default {
{ {
itemName: '众筹活动', itemName: '众筹活动',
itemValue: 6, itemValue: 6,
miniType: 5,
itemType: 'crowdfunding', itemType: 'crowdfunding',
getInterfaceApi: this.$apis.welcomeword.crowdfundingActivity, getInterfaceApi: this.$apis.welcomeword.crowdfundingActivity,
params: { params: {
...@@ -181,6 +187,7 @@ export default { ...@@ -181,6 +187,7 @@ export default {
itemName: '膨胀金活动', itemName: '膨胀金活动',
itemValue: 7, itemValue: 7,
itemType: 'crowdfunding', itemType: 'crowdfunding',
miniType: 6,
getInterfaceApi: this.$apis.welcomeword.bulgeActivity, getInterfaceApi: this.$apis.welcomeword.bulgeActivity,
params: { params: {
currentPage: 1, currentPage: 1,
...@@ -191,6 +198,7 @@ export default { ...@@ -191,6 +198,7 @@ export default {
membersVisible: false, membersVisible: false,
typeVisible: false, typeVisible: false,
selectData: [], selectData: [],
configInfo: [],
conditionItem: [ conditionItem: [
{ {
label: '客户旅程', label: '客户旅程',
...@@ -217,8 +225,18 @@ export default { ...@@ -217,8 +225,18 @@ export default {
] ]
} }
}, },
computed: {
activityName() {
if (this.configInfo.length && this.configInfo[0].value) return this.configInfo.value.match(/\d+\+(\D+)/)[1]
else return ''
}
},
mounted() { mounted() {
const { dataTypeCode } = this.conditionInfo.conditionsList const { index } = this.conditionInfo,
{ dataTypeCode, conditions } = this.conditionInfo.conditionsList[index],
condition = conditions.filter(i => i.isHide)
console.log(condition, 'condition')
this.configInfo = condition
this.$apis.journeyConfig.sopConditionList({ dataTypeCode }).then(res => { this.$apis.journeyConfig.sopConditionList({ dataTypeCode }).then(res => {
this.stepList = res this.stepList = res
}) })
...@@ -228,7 +246,8 @@ export default { ...@@ -228,7 +246,8 @@ export default {
this.userList.splice(idx, 1) this.userList.splice(idx, 1)
}, },
selectActivity(val) { selectActivity(val) {
console.log(val) const { marketingName, marketingId, miniType } = val
this.configInfo[0].value = `${miniType}+${marketingId}+${marketingName}`
}, },
// 成员弹窗 // 成员弹窗
handleConfirm() { handleConfirm() {
...@@ -244,17 +263,27 @@ export default { ...@@ -244,17 +263,27 @@ export default {
} }
}, },
handleSure() { handleSure() {
const { editable, label, conditions, order } = this.$parent.stepItem if (this.configInfo.length == 2) {
const userId = this.userList.map(i => i.userId),
staffName = this.userList.map(i => i.staffName),
desc = {}
for (let i = 0; i < userId.length; i++) {
desc[userId[i]] = staffName[i]
}
this.configInfo[this.empType].operators[0].value = userId.join(',')
this.configInfo[this.empType].operators[0].desc = desc
}
const { editable, label, order } = this.$parent.stepItem
const { instId } = this.$route.query, const { instId } = this.$route.query,
data = { data = {
[`${order}`]: { [`${order}`]: {
conditions: [], conditions: this.conditionInfo.conditionsList,
editable, editable,
value:label value: label
} }
} }
this.$apis.journeyConfig.setStageData({ instId, data }).then(res => { this.$apis.journeyConfig.setStageData({ instId, data }).then(res => {
console.log(res) this.$parent.$parent.getDetail()
}) })
this.$emit('closeCondition') this.$emit('closeCondition')
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @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 11:16:15 * @LastEditTime: 2024-01-04 13:54:59
* @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
--> -->
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</div> </div>
<div class="journey-step bg-fff pb20"> <div class="journey-step bg-fff pb20">
<div class="journey-step-title border-title"> <div class="journey-step-title border-title">
客户旅程阶段 客户旅程阶段{{ journeyStatus }}
</div> </div>
<div class="journey-step-body"> <div class="journey-step-body">
<div class="journey-step-info" v-for="(val, k) in configList" :key="k"> <div class="journey-step-info" v-for="(val, k) in configList" :key="k">
...@@ -208,7 +208,7 @@ export default { ...@@ -208,7 +208,7 @@ export default {
color: #666666; color: #666666;
margin-left: 5px; margin-left: 5px;
display: inline-block; display: inline-block;
width: 146px; width: 156px;
} }
} }
.journey-step-body { .journey-step-body {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!