Commit 5ade0840 by 杨明

条件

1 parent de7ce800
...@@ -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-03 15:18:52 * @LastEditTime: 2024-01-03 16:11:18
* @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
*/ */
...@@ -146,6 +146,8 @@ const getTaskList = params => { ...@@ -146,6 +146,8 @@ const getTaskList = params => {
method: 'post', method: 'post',
data: params, data: params,
noSessionId: true, noSessionId: true,
})
}
//触达类型列表 //触达类型列表
const SopTplNodeProtosList = params => { const SopTplNodeProtosList = params => {
return http_sop({ return http_sop({
...@@ -155,5 +157,24 @@ const SopTplNodeProtosList = params => { ...@@ -155,5 +157,24 @@ const SopTplNodeProtosList = params => {
sign: false sign: false
}) })
} }
//条件列表
const sopConditionList = params => {
return http_sop({
url: '/process/sop/api/sopData/condition/list',
method: 'get',
data: params,
sign: false
})
}
//条件列表
const setStageData = params => {
return http_sop({
url: `/process/sop/api/sopInsts/${params.instId}/instParam/stageData`,
method: 'post',
data: params.data,
sign: false
})
}
// entmicro.api.staff.listFollowerStaffByPage 跟进专员类型查询员工 // entmicro.api.staff.listFollowerStaffByPage 跟进专员类型查询员工
export default { SopTplNodeProtosList,getTaskList,updateParam,getStaffList,getFollowListType,querylabeltree,activityPage, byGroupIdSop, getInstIdDetail, setSopInsts, concatActivity, findMarketingTask, getActivityDetailApi, activityRelInfo, listDepartmentTree } export default { setStageData,sopConditionList,SopTplNodeProtosList,getTaskList,updateParam,getStaffList,getFollowListType,querylabeltree,activityPage, byGroupIdSop, getInstIdDetail, setSopInsts, concatActivity, findMarketingTask, getActivityDetailApi, activityRelInfo, listDepartmentTree }
...@@ -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-03 15:23:02 * @LastEditTime: 2024-01-03 15:52:18
* @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
--> -->
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<span>条件{{ k + 1 }}</span> <span>条件{{ k + 1 }}</span>
<span>{{ spiltString(v) }}</span> <span>{{ spiltString(v) }}</span>
</div> </div>
<div class="progress-edit" @click="showEdit">编辑</div> <div class="progress-edit" @click="showEdit(v, k)">编辑</div>
</div> </div>
</div> </div>
<div class="empty-panel" v-else> <div class="empty-panel" v-else>
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
</div> </div>
</div> </div>
<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"></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" :taskType="taskType" @dialogClose="dialogClose" @confirm="updateContent"></model-dialog>
</div> </div>
...@@ -266,6 +266,7 @@ export default { ...@@ -266,6 +266,7 @@ export default {
}, },
data() { data() {
return { return {
conditionInfo:{},
stage: STAGE, stage: STAGE,
stage_icon: ICON, stage_icon: ICON,
stage_info: STAGE_INFO, stage_info: STAGE_INFO,
...@@ -358,9 +359,19 @@ export default { ...@@ -358,9 +359,19 @@ export default {
dialogClose(val) { dialogClose(val) {
this.tplVisible = val this.tplVisible = val
}, },
showEdit() { showEdit(v,k) {
const { title } = this.$route.query,{label,conditionsList,editable} = this.stepItem
this.conditionInfo = {
title,
label,
editable,
conditionsList:conditionsList[k]
}
this.conditionVisible = true this.conditionVisible = true
}, },
closeCondition() {
this.conditionVisible = false
},
showStat() { showStat() {
this.statVisible = true this.statVisible = 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: 2023-12-22 16:28:03 * @LastEditTime: 2024-01-03 18:08:45
* @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
--> -->
...@@ -11,7 +11,9 @@ ...@@ -11,7 +11,9 @@
<div class="dialog-body"> <div class="dialog-body">
<div class="condition-item" v-for="(item, index) in conditionItem" :key="index"> <div class="condition-item" v-for="(item, index) in conditionItem" :key="index">
<label>{{ item.label }}:</label> <label>{{ item.label }}:</label>
<span>555</span> <span v-if="item.mark">{{ item.mark(conditionInfo[item.name]) }}</span>
<span v-else-if="item.getName">{{ item.getName(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="status == 1">
<div class="flex"> <div class="flex">
...@@ -27,6 +29,14 @@ ...@@ -27,6 +29,14 @@
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
选择成员 选择成员
</el-button> </el-button>
<div class="sale-select" v-show="this.userList && this.userList.length != 0">
<div :key="key" class="el-input-tag input-tag-wrapper">
<el-tag effect="plain" type="info" v-for="(tag, idx) in this.userList" :key="idx" closable :disable-transitions="false" @close="remove(tag, idx)">
<i class="el-icon-user-solid"></i>
{{ tag.staffName }}
</el-tag>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -65,62 +75,167 @@ ...@@ -65,62 +75,167 @@
<div class="condition-input"> <div class="condition-input">
<span>当前页面营销活动为</span> <span>当前页面营销活动为</span>
<el-input style="width: 284px;"></el-input> <el-input style="width: 284px;"></el-input>
<a @click="typeVisible=true">编辑页面</a> <a @click="typeVisible = true">编辑页面</a>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<GLDialog :bigTitle="'选择成员'" mode="big" :append-to-body="true" :visible.sync="membersVisible" @onOk="handleConfirm" @onCancel="membersVisible = !membersVisible"> <GLDialog :bigTitle="'选择成员'" mode="big" :append-to-body="true" :visible.sync="membersVisible" @onOk="handleConfirm" @onCancel="membersVisible = !membersVisible">
<selectEmp ref="membersForm" v-if="membersVisible" :selectData="selectData"></selectEmp> <selectEmp ref="membersForm" v-if="membersVisible" :selectData="userList"></selectEmp>
</GLDialog> </GLDialog>
<select-type :typeVisible="typeVisible" v-if="typeVisible" @handleCloseType="handleCloseType"></select-type> <select-type :typeVisible="typeVisible" v-if="typeVisible" @handleCloseType="handleCloseType"></select-type>
<activity-model ref="activity" @selectActivity="selectActivity" :activityList="activityList"></activity-model>
<material-model ref="material" :materialList="materialList" @handleMaterialConfirm="handleMaterialConfirm"></material-model>
</GLDialog> </GLDialog>
</template> </template>
<script> <script>
import selectEmp from './selectEmp' import selectEmp from './selectEmp'
import selectType from './selectType' import selectType from './selectType'
import materialModel from '@/components/model/materialModel'
import activityModel from '@/components/model/activityModel'
export default { export default {
components: { components: {
selectEmp, selectEmp,
materialModel,
activityModel,
selectType selectType
}, },
props: { props: {
conditionVisible: Boolean conditionVisible: Boolean,
conditionInfo: {
type: Object,
default: () => {}
}
}, },
data() { data() {
return { return {
status: 3, status: 1,
userList: [],
materialList: {
name: '素材',
type: 'material',
funName: 'material',
fileType: true,
groupListApi: this.$apis.welcomeword.getGroupListApi,
materialListApi: this.$apis.welcomeword.getMaterialListApi,
params: {
merchant: this.$globalState.session.merchantId
}
},
activityList: [
{
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: {
state: 1
}
},
{
itemName: '商城券',
itemValue: 2,
itemType: 'coupon',
getInterfaceApi: this.$apis.welcomeword.getMerchant,
params: {
discountTypes: [2, 3, 4],
directionalFlag: 1, // 1所有人可用2定向礼包专用3关联优惠券
validType: 'valid',
status: 2
}
},
{
itemName: '秒杀活动',
itemValue: 5,
itemType: 'activity',
getInterfaceApi: this.$apis.welcomeword.getActivity,
params: {
// activityStatus: 3,
activityStatusList: [1, 2],
currentPage: 1
}
},
{
itemName: '众筹活动',
itemValue: 6,
itemType: 'crowdfunding',
getInterfaceApi: this.$apis.welcomeword.crowdfundingActivity,
params: {
currentPage: 1,
activityStatus: 2
}
},
// 膨胀金活动
{
itemName: '膨胀金活动',
itemValue: 7,
itemType: 'crowdfunding',
getInterfaceApi: this.$apis.welcomeword.bulgeActivity,
params: {
currentPage: 1,
activityStatus: 2
}
}
],
membersVisible: false, membersVisible: false,
typeVisible:false, typeVisible: false,
selectData: [], selectData: [],
conditionItem: [ conditionItem: [
{ {
label: '客户旅程' label: '客户旅程',
name: 'title'
}, },
{ {
label: '旅程阶段' label: '旅程阶段',
name: 'label'
}, },
{ {
label: '手动标记' label: '手动标记',
name: 'editable',
mark: value => {
return value ? '允许' : '不允许'
}
}, },
{ {
label: '条件类型' label: '条件类型',
name: 'conditionsList',
getName: value => {
return value.name
}
} }
] ]
} }
}, },
mounted() {
const { dataTypeCode } = this.conditionInfo.conditionsList
this.$apis.journeyConfig.sopConditionList({ dataTypeCode }).then(res => {
this.stepList = res
})
},
methods: { methods: {
remove(val, idx) {
this.userList.splice(idx, 1)
},
selectActivity(val) {
console.log(val)
},
// 成员弹窗 // 成员弹窗
handleConfirm() { handleConfirm() {
console.log(this.$refs.membersForm.innerTags) console.log(this.$refs.membersForm.innerTags)
if (this.$refs.membersForm.innerTags.length) { if (this.$refs.membersForm.innerTags.length) {
// this.basicForm.userList = this.$refs.membersForm.innerTags this.membersVisible = false
this.$set(this.basicForm, 'userList', this.$refs.membersForm.innerTags) this.userList = this.$refs.membersForm.innerTags
this.selectData = this.basicForm.userList
this.openMembers()
this.isUpdate = true
this.editStatus = true
} else { } else {
this.$message({ this.$message({
type: 'error', type: 'error',
...@@ -128,8 +243,30 @@ export default { ...@@ -128,8 +243,30 @@ export default {
}) })
} }
}, },
handleCloseType() { handleSure() {
const { editable, label, conditions, order } = this.$parent.stepItem
const { instId } = this.$route.query,
data = {
[`${order}`]: {
conditions: [],
editable,
value:label
}
}
this.$apis.journeyConfig.setStageData({ instId, data }).then(res => {
console.log(res)
})
this.$emit('closeCondition')
},
handleClose() {
this.$emit('closeCondition')
},
handleCloseType(val) {
this.typeVisible = false this.typeVisible = false
if (val) {
const type = { 1: 'activity', 2: 'material' }
this.$refs[type[val]].init()
}
}, },
handleAddEmp() { handleAddEmp() {
this.membersVisible = true this.membersVisible = true
...@@ -144,6 +281,46 @@ export default { ...@@ -144,6 +281,46 @@ export default {
.require { .require {
color: red; color: red;
} }
.sale-select {
display: flex;
align-items: center;
// width: 50%;
}
.input-tag-wrapper {
max-height: 75px;
width: 500px;
overflow: auto;
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #666;
display: inline-block;
outline: none;
padding: 5px 5px 0px 5px;
flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
// width: 50%;
display: flex;
align-items: center;
margin-top: 6px;
font-size: 14px;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
}
.el-tag {
margin-right: 4px;
height: 26px;
line-height: 24px;
margin-bottom: 5px;
// background: #fff !important;
}
.condition-item { .condition-item {
line-height: 30px; line-height: 30px;
font-size: 14px; font-size: 14px;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-22 16:01:13 * @Date: 2023-12-22 16:01:13
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-12-22 17:23:13 * @LastEditTime: 2024-01-03 16:28:00
* @FilePath: \scrm-micro-scene\src\views\journeyConfig\components\selectType.vue * @FilePath: \scrm-micro-scene\src\views\journeyConfig\components\selectType.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
--> -->
...@@ -32,98 +32,7 @@ export default { ...@@ -32,98 +32,7 @@ export default {
}, },
data() { data() {
return { return {
type: 1, type: 1
materialList: {
name: '素材',
type: 'material',
funName: 'material',
fileType: true,
groupListApi: this.$apis.welcomeword.getGroupListApi,
materialListApi: this.$apis.welcomeword.getMaterialListApi,
params: {
merchant: this.$globalState.session.merchantId
}
},
activityList: [
{
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: {
state: 1
}
},
{
itemName: '商城券',
itemValue: 2,
itemType: 'coupon',
getInterfaceApi: this.$apis.welcomeword.getMerchant,
params: {
discountTypes: [2, 3, 4],
directionalFlag: 1, // 1所有人可用2定向礼包专用3关联优惠券
validType: 'valid',
status: 2
}
},
{
itemName: '秒杀活动',
itemValue: 5,
itemType: 'activity',
getInterfaceApi: this.$apis.welcomeword.getActivity,
params: {
// activityStatus: 3,
activityStatusList: [1, 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
// }
// },
{
itemName: '众筹活动',
itemValue: 6,
itemType: 'crowdfunding',
getInterfaceApi: this.$apis.welcomeword.crowdfundingActivity,
params: {
currentPage: 1,
activityStatus: 2
}
},
// 膨胀金活动
{
itemName: '膨胀金活动',
itemValue: 7,
itemType: 'crowdfunding',
getInterfaceApi: this.$apis.welcomeword.bulgeActivity,
params: {
currentPage: 1,
activityStatus: 2
}
}
]
} }
}, },
methods: { methods: {
...@@ -131,7 +40,7 @@ export default { ...@@ -131,7 +40,7 @@ export default {
this.$emit('handleCloseType') this.$emit('handleCloseType')
}, },
handleConfirm() { handleConfirm() {
this.$refs.activity.init() this.$emit('handleCloseType', this.type)
} }
} }
} }
......
...@@ -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-03 15:07:06 * @LastEditTime: 2024-01-03 18:08:30
* @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
--> -->
...@@ -242,8 +242,10 @@ export default { ...@@ -242,8 +242,10 @@ export default {
}) })
const sopList = this.groupBy(list, 'day') const sopList = this.groupBy(list, 'day')
configList.push({ configList.push({
order:k,
label: stages[k].value, label: stages[k].value,
isExpaned: false, isExpaned: false,
editable: stages[k].editable,
conditionsList: stages[k].conditions || [], conditionsList: stages[k].conditions || [],
sopList sopList
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!