Commit 483e8be6 by xuyl

跳转营销SOP传参

1 parent 1a1293dd
...@@ -71,7 +71,7 @@ export function customerClusterListExport(params) { ...@@ -71,7 +71,7 @@ export function customerClusterListExport(params) {
export function customerClusterListShow(params) { export function customerClusterListShow(params) {
params.method = 'scrm.api.datahub.user.queryCrowdGroupList' params.method = 'scrm.api.datahub.user.queryCrowdGroupList'
return http3({ return http3({
url: 'http://192.168.3.226:9636/rop-scrm-datahub/router', url: '/rop-scrm-datahub/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
...@@ -83,7 +83,8 @@ export function customerClusterListShow(params) { ...@@ -83,7 +83,8 @@ export function customerClusterListShow(params) {
export function marketingPeopleListShow(params) { export function marketingPeopleListShow(params) {
params.method = 'scrm.api.datahub.user.queryCrowdListByCrowdGroupId' params.method = 'scrm.api.datahub.user.queryCrowdListByCrowdGroupId'
return http3({ return http3({
url: 'http://192.168.3.226:9636/rop-scrm-datahub/router', // http://192.168.3.226:9636
url: '/rop-scrm-datahub/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
......
<template>
<div class="scrm-sub-client-container">
<div class="pageContent">
<GLCombiForm :formObj="searchForm" :formData="searchFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<GLTable v-loading="loading" :hasNum="true" @setTableHeightEvent="setTableHeightEvent" @setTableFinishFun="setTableFinishFun" ref="marketingPlan" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams">
<template slot="options" slot-scope="scope">
<el-button class="blue-text" type="text" @click="goSOPAnalysis(scope.scope.id)">SOP分析</el-button>
<el-button class="blue-text" type="text" @click="goSOPEdit(scope.scope.id)">编辑</el-button>
<el-button class="blue-text" type="text" @click="confirm('delete')">删除</el-button>
<el-button class="blue-text" type="text" @click="confirm(scope.scope)">结束</el-button>
</template>
</GLTable>
</div>
</div>
</template>
<script>
import { getTableList } from '@/api/modules/clientManage'
import util from '@/utils/util'
export default {
data() {
return {
searchForm: {},
searchFormList: [
{
type: 'input',
inputType: 'text',
// name: 'keyword',
label: '人群名称'
},
{
type: 'select',
// name: 'type',
label: '营销状态',
optionLabel: 'label',
optionId: 'value',
optionList: [
{
label: '全部',
value: ''
}
],
placeholder: '请选择'
}
],
getListApi: getTableList,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'data',
tableColumns: [
{
label: '人群名称',
prop: 'orderNo'
},
{
label: 'SOP名称',
prop: 'name'
},
{
label: '营销时间',
prop: 'phone'
},
{
label: '完成度',
prop: 'dsdasd'
},
{
label: '营销状态',
prop: 'dsdasds'
},
{
label: '操作',
prop: 'options',
addHtml: 'options'
}
]
}
}
},
mounted() {
//没数据的时候要算高度
setTimeout(() => {
if (!this.$refs.marketingPlan.data.length) {
this.loading = true
this.$refs.marketingPlan.setTableHeightFun()
this.loading = false
}
}, 200)
},
methods: {
// 跳转SOP分析
goSOPAnalysis(){
this.$history.push(`/marketing/sop/sopAnalysisList?fromPage=${encodeURI('/npmph/clientDataOverview/marketingPeople?selectTab=2')}&id=183`)
},
// 跳转SOP编辑页面
goSOPEdit(id) {
this.$history.push(`/marketing/sop/editSop?$title=${encodeURI('编辑SOP')}&fromPage=${encodeURI('/npmph/clientDataOverview/marketingPeople?selectTab=2')}&addOrEdit=edit&id=183`)
},
// 确认删除或结束
confirm(type) {
this.$confirm(`是否确认${type == 'delete' ? '删除' : '结束'}?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$message({
type: 'success',
message: '操作成功!'
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
setTableFinishFun() {
this.$refs.marketingPlan.data.length ? (this.$refs.marketingPlan.tableHeightValues = '') : this.$refs.marketingPlan.setTableHeightFun()
},
setTableHeightEvent() {
this.$refs.marketingPlan.setTableHeightFun()
},
// 搜索表格
searchTable() {
console.log(this.searchForm)
this.$refs.marketingPlan.refreshTable()
},
//重置表格
resetTable() {
this.searchForm = {
status: '',
type: ''
}
this.$refs.marketingPlan.refreshTable()
}
}
}
</script>
<style lang="scss" scoped>
.pageContent {
padding: 20px 20px 30px;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
background-color: #fff;
}
</style>
...@@ -92,7 +92,7 @@ export default { ...@@ -92,7 +92,7 @@ export default {
type: 'input', type: 'input',
name: 'customerPhone', name: 'customerPhone',
label: '联系电话', label: '联系电话',
width:170 width: 170
}, },
{ {
type: 'input', type: 'input',
...@@ -237,8 +237,27 @@ export default { ...@@ -237,8 +237,27 @@ export default {
}, },
methods: { methods: {
// 跳转到营销SOP // 跳转到营销SOP
createMarketSOP(id) { createMarketSOP() {
this.$history.push(`/marketing/sop/editSop?$title=${encodeURI('新建SOP')}&fromPage=${encodeURI('/npmph/clientDataOverview/group?selectTab=1')}&addOrEdit=add&id=183`) let marketQuery
if (this.crowdType == 1 || this.crowdType == 2) {
marketQuery = JSON.parse(this.$route.query.crowdInfo)
}
var params = {
addOrEdit: 'add',
fromPage: '/npmph/clientDataOverview/group',
$title: encodeURI('新建SOP'),
info: {
// 人群
customerOptType: 2,
crowdList: []
}
}
params.info.crowdList.push(marketQuery)
console.log(params)
this.$common.utils.storage.set('sopInfo', params)
this.$history.push({
path: 'marketing/sop/editSop'
})
}, },
//获取跟进员工 //获取跟进员工
getStaffList() { getStaffList() {
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<GLButton type="text" @click="btnClick('detail', scope.scope)" class="blue-text" fn="查看详情">查看详情</GLButton> <GLButton type="text" @click="btnClick('detail', scope.scope)" class="blue-text" fn="查看详情">查看详情</GLButton>
<!-- <span style="margin-left: 20px" @click="btnClick('view', scope.scope)" class="blue-text">查看客户</span> --> <!-- <span style="margin-left: 20px" @click="btnClick('view', scope.scope)" class="blue-text">查看客户</span> -->
<GLButton class="blue-text leftDistance" type="text" fn="客户列表" v-if="userType !== 2" @click="btnClick('view', scope.scope)">查看客户</GLButton> <GLButton class="blue-text leftDistance" type="text" fn="客户列表" v-if="userType !== 2" @click="btnClick('view', scope.scope)">查看客户</GLButton>
<el-button type="text" class="blue-text" @click="createMarketSOP()">营销SOP</el-button> <el-button type="text" class="blue-text" @click="createMarketSOP(scope.scope)">营销SOP</el-button>
</template> </template>
</GLTable> </GLTable>
</div> </div>
...@@ -113,21 +113,45 @@ export default { ...@@ -113,21 +113,45 @@ export default {
this.$route.query.selectTab == 1 ? (this.activeName = 'first') : (this.activeName = 'second') this.$route.query.selectTab == 1 ? (this.activeName = 'first') : (this.activeName = 'second')
} }
}, },
mounted() { mounted() {},
},
methods: { methods: {
// 跳转到营销SOPs createMarketSOP(crowd) {
createMarketSOP(id) { var params = {
this.$history.push(`/marketing/sop/editSop?$title=${encodeURI('新建SOP')}&fromPage=${encodeURI('/npmph/crowdManage/index')}&addOrEdit=add&info={ addOrEdit: 'add',
customerOptType=2}`) fromPage: '/npmph/crowdManage/index',
$title: encodeURI('新建SOP'),
info: {
// 人群
customerOptType: 2,
crowdList: []
// 标签
// customerOptType: 3,
// labelList: [
// {
// id: 10,
// labelGroupId: '79009',
// labelGroupName: 'sop专用标签组1',
// labelGroupType: '自店标签',
// labelId: '37418',
// labelName: 'group1_A'
// }
// ]
}
}
params.info.crowdList.push(crowd)
this.$common.utils.storage.set('sopInfo', params)
this.$history.push({
path: 'marketing/sop/editSop'
})
}, },
btnClick(type, data) { btnClick(type, data) {
const crowdType = this.activeName == 'first' ? 1 : 2 const crowdType = this.activeName == 'first' ? 1 : 2
const transData = JSON.stringify(data)
if (type == 'detail') { if (type == 'detail') {
this.$router.push(`/crowdManage/crowdDetail/${data.crowdId}?crowdType=${crowdType}`) this.$router.push(`/crowdManage/crowdDetail/${data.crowdId}?crowdType=${crowdType}`)
} }
if (type == 'view') { if (type == 'view') {
this.$router.push(`/clientDataOverview/group/${data.crowdId}/${crowdType}`) this.$router.push(`/clientDataOverview/group/${data.crowdId}/${crowdType}?crowdInfo=${transData}`)
} }
}, },
addClick() { addClick() {
......
...@@ -580,8 +580,29 @@ export default { ...@@ -580,8 +580,29 @@ export default {
// this.$router.push('/tagsManage/viewCustomers') // this.$router.push('/tagsManage/viewCustomers')
// }, // },
// 跳转到营销SOP // 跳转到营销SOP
createMarketSOP(id) { createMarketSOP() {
this.$history.push(`/marketing/sop/editSop?$title=${encodeURI('新建SOP')}&fromPage=${encodeURI('/npmph/tagsManage/index')}&addOrEdit=add&id=183`) let getDatas = JSON.parse(
JSON.stringify(this.allListParams)
.replace(/groupId/g, 'labelGroupId')
.replace(/groupName/g, 'labelGroupName')
.replace(/groupType/g, 'labelGroupType')
)
console.log(getDatas)
var params = {
addOrEdit: 'add',
fromPage: '/npmph/tagsManage/index',
$title: encodeURI('新建SOP'),
info: {
// 标签
customerOptType: 3,
labelList: [...getDatas]
}
}
console.log(params)
this.$common.utils.storage.set('sopInfo', params)
this.$history.push({
path: 'marketing/sop/editSop'
})
}, },
toViewCustomer(info) { toViewCustomer(info) {
console.log(info) console.log(info)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!