|
@@ -1,12 +1,16 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="flex">
|
|
<div class="flex">
|
|
|
<!-- 营销区域列表 -->
|
|
<!-- 营销区域列表 -->
|
|
|
- <areaTree ref="arealist" style="width:180px;flex:0 1 auto" @onClick="onClick">
|
|
|
|
|
- <template v-slot:operation="data">
|
|
|
|
|
- <!-- 新增区域 -->
|
|
|
|
|
- <addArea v-if="tool.checkAuth($route.name,'insert')" class="inline-16" :data="data.data" @onSuccess="onSuccess"></addArea>
|
|
|
|
|
- </template>
|
|
|
|
|
- </areaTree>
|
|
|
|
|
|
|
+ <div style="display:flex;flex-direction: column;">
|
|
|
|
|
+ <div :class="['allData',{'active':active}]" @click="allClick">全部</div>
|
|
|
|
|
+ <areaTree ref="arealist" style="width:180px;flex:0 1 auto" @onClick="onClick">
|
|
|
|
|
+ <template v-slot:operation="data">
|
|
|
|
|
+ <!-- 新增区域 -->
|
|
|
|
|
+ <addArea v-if="tool.checkAuth($route.name,'insert')" class="inline-16" :data="data.data" @onSuccess="onSuccess"></addArea>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </areaTree>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
<div class="hm-info-panel">
|
|
<div class="hm-info-panel">
|
|
|
<div class="container normal-panel normal-margin sticky">
|
|
<div class="container normal-panel normal-margin sticky">
|
|
|
<!-- 编辑区域 -->
|
|
<!-- 编辑区域 -->
|
|
@@ -29,7 +33,7 @@
|
|
|
<!-- 业务员信息 -->
|
|
<!-- 业务员信息 -->
|
|
|
<saler v-show="activeName === 'first'" ref="saler" :data="areaInfo">
|
|
<saler v-show="activeName === 'first'" ref="saler" :data="areaInfo">
|
|
|
<!-- 新建业务员 -->
|
|
<!-- 新建业务员 -->
|
|
|
- <el-button v-if="tool.checkAuth($route.name,'saler_insert')" slot="add" size="small" type="primary" icon="el-icon-plus" @click="$router.push({path:'/add_saler',query:{id:areaInfo.sa_saleareaid,name:areaInfo.label}})">新 建</el-button>
|
|
|
|
|
|
|
+ <el-button v-if="tool.checkAuth($route.name,'saler_insert')" slot="add" size="small" type="primary" icon="el-icon-plus" @click="$router.push({path:'/add_saler',query:{id:areaInfo.sa_saleareaid,name:areaInfo.label}})">添 加</el-button>
|
|
|
<template v-slot:detail="scope">
|
|
<template v-slot:detail="scope">
|
|
|
<el-button style="margin-right:10px" type="text" size="small" @click="$router.push({path:'/saler_detail',query:{id:scope.data.sa_salearea_hrid}})">详 情</el-button>
|
|
<el-button style="margin-right:10px" type="text" size="small" @click="$router.push({path:'/saler_detail',query:{id:scope.data.sa_salearea_hrid}})">详 情</el-button>
|
|
|
</template>
|
|
</template>
|
|
@@ -41,7 +45,7 @@
|
|
|
<!-- 经销商信息 -->
|
|
<!-- 经销商信息 -->
|
|
|
<agent v-show="activeName === 'second'" ref="agent">
|
|
<agent v-show="activeName === 'second'" ref="agent">
|
|
|
<!-- 新建经销商 -->
|
|
<!-- 新建经销商 -->
|
|
|
- <el-button v-if="tool.checkAuth($route.name,'agent_insert')" type="primary" size="small" slot="add" icon="el-icon-plus" @click="$router.push({path:'/add_agent',query:{area:areaInfo.label,id:areaInfo.sa_saleareaid}})">新 建</el-button>
|
|
|
|
|
|
|
+ <el-button v-if="tool.checkAuth($route.name,'agent_insert')" type="primary" size="small" slot="add" icon="el-icon-plus" @click="$router.push({path:'/add_agent',query:{area:areaInfo.label,id:areaInfo.sa_saleareaid}})">添 加</el-button>
|
|
|
<!-- 经销商详情 -->
|
|
<!-- 经销商详情 -->
|
|
|
<template v-slot:detail="scope">
|
|
<template v-slot:detail="scope">
|
|
|
<el-button type="text" size="small" @click="$router.push({path:'/agent_detail',query:{id:scope.data.sa_agentsid}})">详 情</el-button>
|
|
<el-button type="text" size="small" @click="$router.push({path:'/agent_detail',query:{id:scope.data.sa_agentsid}})">详 情</el-button>
|
|
@@ -98,12 +102,30 @@ export default {
|
|
|
data () {
|
|
data () {
|
|
|
return {
|
|
return {
|
|
|
areaInfo:{},
|
|
areaInfo:{},
|
|
|
- activeName:'second'
|
|
|
|
|
|
|
+ activeName:'second',
|
|
|
|
|
+ active:false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ mounted () {
|
|
|
|
|
+ this.allClick()
|
|
|
|
|
+ },
|
|
|
methods:{
|
|
methods:{
|
|
|
|
|
+ allClick () {
|
|
|
|
|
+ this.active = true
|
|
|
|
|
+ this.$refs.agent.param.content.isAll = 1
|
|
|
|
|
+ this.areaInfo = {}
|
|
|
|
|
+ this.$refs.agent.query_agent(1)
|
|
|
|
|
+
|
|
|
|
|
+ this.$refs.saler.param.content.isAll = 1
|
|
|
|
|
+ this.$refs.saler.query_saler(1)
|
|
|
|
|
+
|
|
|
|
|
+ this.$refs.arealist.setCurrentKey(null)
|
|
|
|
|
+ },
|
|
|
onClick (data) {
|
|
onClick (data) {
|
|
|
|
|
+ this.active = false
|
|
|
this.areaInfo = data
|
|
this.areaInfo = data
|
|
|
|
|
+ this.$refs.saler.param.content.isAll = null
|
|
|
|
|
+ this.$refs.agent.param.content.isAll = null
|
|
|
this.$refs.saler.query_saler(this.areaInfo.sa_saleareaid)
|
|
this.$refs.saler.query_saler(this.areaInfo.sa_saleareaid)
|
|
|
this.$refs.agent.query_agent(this.areaInfo.sa_saleareaid)
|
|
this.$refs.agent.query_agent(this.areaInfo.sa_saleareaid)
|
|
|
},
|
|
},
|
|
@@ -143,6 +165,27 @@ export default {
|
|
|
flex:1;
|
|
flex:1;
|
|
|
width:500px;
|
|
width:500px;
|
|
|
height:calc(100vh - 100px);
|
|
height:calc(100vh - 100px);
|
|
|
- overflow-y:scroll
|
|
|
|
|
|
|
+ overflow-y:scroll;
|
|
|
|
|
+}
|
|
|
|
|
+.allData {
|
|
|
|
|
+ height: 26px;
|
|
|
|
|
+ line-height: 26px;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ padding-left: 24px;
|
|
|
|
|
+ margin: 6px 0 6px 16px;
|
|
|
|
|
+ width: 131.2px;
|
|
|
|
|
+
|
|
|
|
|
+}
|
|
|
|
|
+.allData:hover {
|
|
|
|
|
+ background: #f5f7fa;
|
|
|
|
|
+}
|
|
|
|
|
+.active {
|
|
|
|
|
+ background: #4F7BFD !important;
|
|
|
|
|
+ border-radius: 3px;
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+ padding-left: 24px;
|
|
|
|
|
+ margin: 6px 0 6px 16px;
|
|
|
|
|
+ width: 131.2px;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|