Commit 5ade0840 by 杨明

条件

1 parent de7ce800
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-07 16:54:06
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -146,6 +146,8 @@ const getTaskList = params => {
method: 'post',
data: params,
noSessionId: true,
})
}
//触达类型列表
const SopTplNodeProtosList = params => {
return http_sop({
......@@ -155,5 +157,24 @@ const SopTplNodeProtosList = params => {
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 跟进专员类型查询员工
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 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -32,7 +32,7 @@
<span>条件{{ k + 1 }}</span>
<span>{{ spiltString(v) }}</span>
</div>
<div class="progress-edit" @click="showEdit">编辑</div>
<div class="progress-edit" @click="showEdit(v, k)">编辑</div>
</div>
</div>
<div class="empty-panel" v-else>
......@@ -159,7 +159,7 @@
</div>
</div>
<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>
<model-dialog :tplVisible="tplVisible" :taskType="taskType" @dialogClose="dialogClose" @confirm="updateContent"></model-dialog>
</div>
......@@ -266,6 +266,7 @@ export default {
},
data() {
return {
conditionInfo:{},
stage: STAGE,
stage_icon: ICON,
stage_info: STAGE_INFO,
......@@ -358,9 +359,19 @@ export default {
dialogClose(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
},
closeCondition() {
this.conditionVisible = false
},
showStat() {
this.statVisible = true
},
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-27 11:29:17
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -11,7 +11,9 @@
<div class="dialog-body">
<div class="condition-item" v-for="(item, index) in conditionItem" :key="index">
<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 class="condition-panel" v-if="status == 1">
<div class="flex">
......@@ -27,6 +29,14 @@
<i class="el-icon-plus"></i>
选择成员
</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>
......@@ -65,62 +75,167 @@
<div class="condition-input">
<span>当前页面营销活动为</span>
<el-input style="width: 284px;"></el-input>
<a @click="typeVisible=true">编辑页面</a>
<a @click="typeVisible = true">编辑页面</a>
</div>
</div>
</div>
</div>
</div>
<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>
<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>
</template>
<script>
import selectEmp from './selectEmp'
import selectType from './selectType'
import materialModel from '@/components/model/materialModel'
import activityModel from '@/components/model/activityModel'
export default {
components: {
selectEmp,
materialModel,
activityModel,
selectType
},
props: {
conditionVisible: Boolean
conditionVisible: Boolean,
conditionInfo: {
type: Object,
default: () => {}
}
},
data() {
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,
typeVisible:false,
typeVisible: false,
selectData: [],
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: {
// 成员弹窗
handleConfirm() {
remove(val, idx) {
this.userList.splice(idx, 1)
},
selectActivity(val) {
console.log(val)
},
// 成员弹窗
handleConfirm() {
console.log(this.$refs.membersForm.innerTags)
if (this.$refs.membersForm.innerTags.length) {
// this.basicForm.userList = this.$refs.membersForm.innerTags
this.$set(this.basicForm, 'userList', this.$refs.membersForm.innerTags)
this.selectData = this.basicForm.userList
this.openMembers()
this.isUpdate = true
this.editStatus = true
this.membersVisible = false
this.userList = this.$refs.membersForm.innerTags
} else {
this.$message({
type: 'error',
......@@ -128,8 +243,30 @@ export default {
})
}
},
handleCloseType() {
this.typeVisible = false
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
if (val) {
const type = { 1: 'activity', 2: 'material' }
this.$refs[type[val]].init()
}
},
handleAddEmp() {
this.membersVisible = true
......@@ -144,6 +281,46 @@ export default {
.require {
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 {
line-height: 30px;
font-size: 14px;
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-22 16:01:13
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -32,98 +32,7 @@ export default {
},
data() {
return {
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
}
}
]
type: 1
}
},
methods: {
......@@ -131,7 +40,7 @@ export default {
this.$emit('handleCloseType')
},
handleConfirm() {
this.$refs.activity.init()
this.$emit('handleCloseType', this.type)
}
}
}
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -242,8 +242,10 @@ export default {
})
const sopList = this.groupBy(list, 'day')
configList.push({
order:k,
label: stages[k].value,
isExpaned: false,
editable: stages[k].editable,
conditionsList: stages[k].conditions || [],
sopList
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!