Commit 3502868d authored by 华国豪's avatar 华国豪 🙄

1

parent 52bcf556
var BMapLib=window.BMapLib=BMapLib||{};(function(){BMapLib.CurveLine=CurveLine;function CurveLine(points,opts){var self=this;var curvePoints=getCurvePoints(points);var polyline=new BMap.Polyline(curvePoints,opts);polyline.addEventListener("lineupdate",function(){if(this.isEditing){this.enableEditing()}});polyline.cornerPoints=points;polyline.editMarkers=[];polyline.enableEditing=function(){var self=this;if(self.map){self.disableEditing();for(var i=0;i<self.cornerPoints.length;i++){var marker=new BMap.Marker(self.cornerPoints[i],{icon:new BMap.Icon("http://api.map.baidu.com/library/CurveLine/1.5/src/circle.png",new BMap.Size(16,16)),enableDragging:true,raiseOnDrag:true});marker.addEventListener("dragend",function(){self.cornerPoints.length=0;for(var i=0;i<self.editMarkers.length;i++){self.cornerPoints.push(self.editMarkers[i].getPosition())}var curvePoints=getCurvePoints(self.cornerPoints);self.setPath(curvePoints)});marker.index=i;self.editMarkers.push(marker);self.map.addOverlay(marker)}}self.isEditing=true};polyline.disableEditing=function(){this.isEditing=false;for(var i=0;i<this.editMarkers.length;i++){this.map.removeOverlay(this.editMarkers[i]);this.editMarkers[i]=null}this.editMarkers.length=0};polyline.getPath=function(){return curvePoints};return polyline}function extend(child,parent){for(var p in parent){if(parent.hasOwnProperty(p)){child[p]=parent[p]}}return child}function getCurvePoints(points){var curvePoints=[];for(var i=0;i<points.length-1;i++){var p=getCurveByTwoPoints(points[i],points[i+1]);if(p&&p.length>0){curvePoints=curvePoints.concat(p)}}return curvePoints}function getCurveByTwoPoints(obj1,obj2){if(!obj1||!obj2||!(obj1 instanceof BMap.Point)||!(obj2 instanceof BMap.Point)){return null}var B1=function(x){return 1-2*x+x*x};var B2=function(x){return 2*x-2*x*x};var B3=function(x){return x*x};curveCoordinates=[];var count=30;var isFuture=false;var t,h,h2,lat3,lng3,j,t2;var LnArray=[];var i=0;var inc=0;if(typeof(obj2)=="undefined"){if(typeof(curveCoordinates)!="undefined"){curveCoordinates=[]}return}var lat1=parseFloat(obj1.lat);var lat2=parseFloat(obj2.lat);var lng1=parseFloat(obj1.lng);var lng2=parseFloat(obj2.lng);if(lng2>lng1){if(parseFloat(lng2-lng1)>180){if(lng1<0){lng1=parseFloat(180+180+lng1)}}}if(lng1>lng2){if(parseFloat(lng1-lng2)>180){if(lng2<0){lng2=parseFloat(180+180+lng2)}}}j=0;t2=0;if(lat2==lat1){t=0;h=lng1-lng2}else{if(lng2==lng1){t=Math.PI/2;h=lat1-lat2}else{t=Math.atan((lat2-lat1)/(lng2-lng1));h=(lat2-lat1)/Math.sin(t)}}if(t2==0){t2=(t+(Math.PI/5))}h2=h/2;lng3=h2*Math.cos(t2)+lng1;lat3=h2*Math.sin(t2)+lat1;for(i=0;i<count+1;i++){curveCoordinates.push(new BMap.Point((lng1*B1(inc)+lng3*B2(inc))+lng2*B3(inc),(lat1*B1(inc)+lat3*B2(inc)+lat2*B3(inc))));inc=inc+(1/count)}return curveCoordinates}})();
\ No newline at end of file
This diff is collapsed.
......@@ -30,7 +30,7 @@ export default {
@import './assets/css/tablevoerride.css';
@import './assets/global/font.css';
@import '//at.alicdn.com/t/font_1627123_m34imq176cf.css';
@import '//at.alicdn.com/t/font_1627123_s7tjzgwbg5i.css';
@import url('//at.alicdn.com/t/font_1627123_grz80mbm3sv.css');
/* @import './assets/css/common.css'; */
@import './assets/css/init.css';
......
......@@ -7,7 +7,7 @@
<span>客户简报</span>
</div>
<div class="shang-list">
<el-row gutter="5">
<el-row :gutter="5">
<el-col :span="12">
<div class="shang-list-item">
<div class="icon">
......
This diff is collapsed.
<style>
@import '../../assets/css/customerManage.css';
</style>
<template>
<div class="customerManage">
<div class="tools">
<h1>客户审批</h1>
<div style="width: 340px;">
<el-input placeholder="请输入客户名称/手机" v-model="msg.CustomerName" class="input-with-select">
<el-button slot="append" icon="el-icon-search" @click="getList"></el-button>
</el-input>
</div>
<div>&nbsp;</div>
</div>
<div class="query-box" :style="{'padding-bottom': '10px'}">
<el-row v-if="!multipleSelection.length" :gutter="30">
<el-col :span="4">
<span class="font-size-12" style="padding-right: 10px">客户类型</span>
<el-select size="mini" v-model="msg.CustomerStatus" placeholder="请选择" @change="getList">
<el-option
v-for="item in WhereTypeList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-col>
</el-row>
<div v-else class="flex-center">
<p class="font-size-12">已选 <span class="font-color-link">{{multipleSelection.length}}</span></p>
<!-- <div class="selection-box">
<el-button v-for="(item, index) in selectionList" :key="index" @click="item.myFun"><i :class="item.class"></i>{{item.name}}</el-button>
</div> -->
</div>
</div>
<div class="page-content">
<el-table
v-if="loading"
v-loading="true"
:data="[]">
<el-table-column
v-for="(item, index) in queryType2" :key="index"
:label="item.label">
</el-table-column>
</el-table>
<el-table
v-if="!loading"
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
style="width: 100%"
height="660"
border
row-class-name="font-size-12"
@selection-change="handleSelectionChange">
<el-table-column fixed type="selection" width="40"></el-table-column>
<el-table-column
fixed
prop="CustomerName"
label="客户名称"
width="120"
show-overflow-tooltip>
<template slot-scope="scope">
<p @click="openDetails(scope)" class="font-color-link cp">{{scope.row.CustomerName}}</p>
</template>
</el-table-column>
<el-table-column
prop="Contact"
label="联系人"
v-if="queryType[1].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="ContactNumber"
label="联系电话"
v-if="queryType[2].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="creatTime"
label="提交时间"
v-if="queryType[3].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="EmName"
label="来源"
v-if="queryType[4].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="CustomerStatus"
label="状态"
v-if="queryType[5].show"
show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="scope.row.CustomerStatus === 0 || scope.row.CustomerStatus === 1" class="font-color-warning">待审批</span>
<span v-if="scope.row.CustomerStatus === 2 || scope.row.CustomerStatus === 3" class="font-color-success">已审批</span>
</template>
</el-table-column>
<el-table-column
width="40"
fixed="right">
<template slot="header" slot-scope="scope">
<el-popover
placement="bottom"
width="240">
<mySelect :queryType="queryType" @listenTochildEvent="showMessageFromChild"/>
<i class="el-icon-s-operation cp" slot="reference"></i>
</el-popover>
</template>
</el-table-column>
</el-table>
</div>
<div>
<el-pagination
class="Mypagination"
background
@current-change="handleCurrentChange"
:page-sizes="[30, 60, 90, 100]"
:page-size="msg.pageSize"
layout="sizes, prev, pager, next"
@size-change="handleSizeChange"
:total="total">
</el-pagination>
</div>
<el-drawer
:with-header="false"
size='30%'
:visible.sync="drawer"
direction="rtl"
:before-close="handleClose">
<approvalBox :CustomerId="CustomerId" :CustomerStatus="CustomerStatus" @getList="reload()"/>
</el-drawer>
</div>
</template>
<script>
import mySelect from "../dialogModel/select";
import approvalBox from "./approvalBox"
export default {
components: {
mySelect,
approvalBox
},
data() {
return {
CustomerId: 0,
queryType2: [
{
label: '客户名称',
show: true,
},{
label: '联系人',
show: true,
},{
label: '电话',
show: true,
},{
label: '提交时间',
show: true,
},{
label: '来源',
show: true,
},{
label: '状态',
show: true,
}
],
queryType: [
{
label: '客户名称',
show: true,
},{
label: '联系人',
show: true,
},{
label: '电话',
show: true,
},{
label: '提交时间',
show: true,
},{
label: '来源',
show: true,
},{
label: '状态',
show: true,
}
],
drawer: false,
loading: true,
tableData: [],
multipleSelection: [],
userInfo: {},
msg:{
pageIndex:1,
pageSize:30,
CustomerStatus:-1,
},
CustomerStatus: 0,
total: 0,
WhereTypeList: [
{
id: -1,
name: '全部'
},{
id: 1,
name: '待审批'
},{
id: 2,
name: '已审批'
}
],
};
},
mounted() {
this.getList()
},
methods: {
reload(){
console.log(1)
this.getList()
this.drawer = false
},
showMessageFromChild(list){
this.mySelectCtrl=!this.mySelectCtrl
if (list) {
this.queryType = list
this.getList()
}
},
getList(){
this.apipost('/api/CustomerExamine/GetMyDeptCustomerList',this.msg,res=>{
if(res.data.resultCode==1){
this.tableData = res.data.data.pageData
this.loading=false
}else{
this.$message.error(res.data.message)
}
},err=>{})
},
handleSizeChange(val) {
this.msg.pageSize = val
this.getList();
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
handleSelectionChange(val) {
this.multipleSelection = val.map(x=>
x.CustomerId
)
},
handleClose(done) {
done();
},
openDetails(scope){
this.drawer = true
this.CustomerStatus = scope.row.CustomerStatus
this.CustomerId = scope.row.CustomerId
this.CustomerName = scope.row.CustomerName
this.drawer = true
},
}
};
</script>
<style>
.customerMap{
width: 100%;
height: 100%;
}
.color-info{
position: absolute;
left: 30px;
top: 15px;
padding: 10px 20px;
background-color: rgba(206, 206, 206, .5);
}
.color-info>span{
font-size: 14px;
display: flex;
align-items: center;
justify-content: space-around;
width: 120px;
}
.color-info .raius-color{
height: 10px;
width: 10px;
display: inline-block;
background-color: #1eb3ff;
border-radius: 50%;
}
.color-info .g .raius-color{
background-color: #5fffa3;
}
</style>
<template>
<div class="customerMap">
<div :style="{height:'100%',width:'100%'}" ref="myEchart" id="centerMpBaidu"></div>
<div class="color-info">
<span class="b">&nbsp;&nbsp;&nbsp;正式:
<span class="raius-color"></span>
<el-switch
@change="changeSwitch"
size="mini"
v-model="value1">
</el-switch>
</span>
<br>
<span class="g">非正式:
<span class="raius-color"></span>
<el-switch
@change="changeSwitch"
size="mini"
style="display: block"
v-model="value2"
active-color="#13ce66">
</el-switch>
</span>
</div>
</div>
</template>
<script>
export default {
data() {
return {
map: null,
value1: true,
value2: true,
baiduMapData: [],
changebaiduMapData: [],
centerP: null,
options0: {
size: BMAP_POINT_SIZE_BIGGER,
shape: BMAP_POINT_SHAPE_CIRCLE,
color: '#1eb3ff'
},
options1: {
size: BMAP_POINT_SIZE_BIGGER,
shape: BMAP_POINT_SHAPE_CIRCLE,
color: '#5fffa3'
},
list0: [],
list1: [],
};
},
methods: {
changeSwitch(e){
let list = [];
let data = JSON.parse(JSON.stringify(this.baiduMapData));
let value1 = this.value1;
let value2 = this.value2;
if (value1 && value2) {
this.creatMap(data)
} else {
data.forEach(item => {
if(value1 && !value2 && item.type == 0) {
list.push(item)
} else if (!value1 && value2 && item.type == 1){
list.push(item)
}
})
this.creatMap(list)
}
},
creatMap(arr, type){
let _this = this
//实例化,并设置最大最小缩放层级
if(this.map) {
this.map.clearOverlays()
} else {
this.map = new BMap.Map("centerMpBaidu", {
minZoom: 3,
maxZoom: 20,
});
//设置中心点、默认缩放层级
if (_this.centerP) {
this.map.centerAndZoom(new BMap.Point(_this.centerP.Lng, _this.centerP.Lat), 10);
} else {
this.map.centerAndZoom(new BMap.Point(104.0727017791, 30.6643622306), 10);
}
this.map.setMapStyleV2({
styleId: '33046c341768c2774ab011cc7cf013d1'
});
this.map.enableScrollWheelZoom(true);
}
//可以鼠标缩放
const points = arr;
let list0 = [], list1 = [];
points.forEach(item => {
let obj = new BMap.Point(item.Lng, item.Lat)
obj.CustomerId = item.CustomerId
if(item.type == 0) {
list0.push(obj)
} else if (item.type == 1){
list1.push(obj)
}
})
this.list0 = list0;
this.list1 = list1;
this.changePointsColor(this.list0,this.options0);
this.changePointsColor(this.list1,this.options1);
},
changePointsColor(points, options){
var map = this.map;
var pointCollection = new BMap.PointCollection(points, options); // 初始化PointCollection
map.addOverlay(pointCollection); // 添加Overlay
this.markerClick(pointCollection);// 给点添加点击事件
},
markerClick(pointCollection){
var _this = this;
var map = this.map;
var data = this.markdatas;
pointCollection.addEventListener('click', function (e) {
_this.apipost2('financestatistics_post_GetCustomerInfoForB2BKB', {CustomerId: e.point.CustomerId}, res=>{
if(res.data.resultCode == 1) {
const infoWindow = new BMap.InfoWindow(`
<p style="font-size: 14px;">联系人:${res.data.data.Contact}</p>
<p style="font-size: 14px;">联系电话:${res.data.data.ContactNumber}</p>
<p style="font-size: 14px;">门店名称:${res.data.data.CustomerName}</p>
<p style="font-size: 14px;">门店地址:${res.data.data.Address}</p>
<p style="font-size: 14px;">关联销售:${res.data.data.EmName}</p>
`)
_this.map.openInfoWindow(infoWindow, e.point);
}
})
});
}
},
mounted() {
let userInfo = this.getLocalStorage();
let RB_Branch_id = userInfo.RB_Branch_id;
let departState = this.$route.query.departState;
if (departState === 'true') {
RB_Branch_id = -1
}
this.apipost2('admin_get_GetBranchLngLat', {BranchId: RB_Branch_id}, r=>{
if (r.data.resultCode == 1) {
this.centerP = r.data.data[0]
}
})
this.apipost2('financestatistics_post_GetB2BBoardClientAddressList', {BranchId: RB_Branch_id, ProvinceName: ''}, r=>{
if (r.data.resultCode == 1) {
let _this = this;
let data = r.data.data
data.ActivateList.map(x=>{
x.type = 0
})
data.InActiveList.map(x=>{
x.type = 0
})
data.NotVisit.map(x=>{
x.type = 1
})
let baiduMapData = [...data.ActivateList, ...data.InActiveList, ...data.NotVisit];
// let baiduMapData = [...data.NotVisit, ...data.ActivateList];
this.baiduMapData = baiduMapData
this.creatMap(this.baiduMapData)
}
})
}
};
</script>
\ No newline at end of file
<style>
.seb-item{
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 20px;
background-color: white;
border-bottom: 1px solid #f8fafb;
}
.seb-item .cp{
opacity: 0;
transition: all linear .3s;
}
.seb-item:hover .cp{
opacity: 1;
}
.seb-item .cp:hover{
color: #409eff !important;
}
.seb-item .cp{
padding-left: 10px;
}
</style>
<template>
<div class="sceneEditBox">
<template v-for="(item, index) in sceneDataList" >
<div class="seb-item" :key="index">
<span>{{item.SceneName}}</span>
<div>
<i class="el-icon-edit cp" @click="MsgBus.$emit('sceneBoxShow', LableType, 1, item)"></i>
<i class="el-icon-delete cp" @click="deleteRow(item.ID)"></i>
</div>
</div>
</template>
<div style="margin-top: 15px;text-align: right;">
<span class="font-color-link cp" @click="MsgBus.$emit('sceneBoxShow', LableType, 1)">新建场景</span>
</div>
</div>
</template>
<script>
export default {
props: ['LableType', 'sceneData'],
data(){
return {
sceneDataList: [],
}
},
watch: {
LableType:{
handler(val, oldVal){
},
deep:true
},
sceneData: {
handler(val, oldVal){
this.sceneDataList = this.sceneData.filter(x=>
x.WhereType === 0
)
}
}
},beforeCreate(){
},beforeDestroy() {
this.MsgBus.$off('editScene');
},
mounted () {
this.sceneDataList = this.sceneData.filter(x=>
x.WhereType === 0
)
let $this = this
this.MsgBus.$on('editScene', function (){
console.log(1)
$this.GetSceneEmployeeList()
})
},
methods: {
GetSceneEmployeeList(){
this.apipost('/api/Scene/GetSceneEmployeeList', {LableType: this.LableType}, res=>{
if (res.data.resultCode == 1) {
this.sceneDataList = res.data.data.filter(x=>
x.WhereType === 0
)
}
})
},
deleteRow(ID){
this.$confirm('您确定要删除这一条数据吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apipost('/api/Scene/DelSceneEmployee', {ID: ID}, res=>{
this.MsgBus.$emit('editScene')
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
}
}
</script>
\ No newline at end of file
......@@ -113,7 +113,7 @@
</el-col>
</el-row>
<el-row :gutter="25" class="bottom" >
<el-col :span="15" style="height: 100%;">
<el-col :span="16" style="height: 100%;">
<el-card style="height: 100%;">
<div slot="header" class="clearfix">
<span>数据说明</span>
......@@ -133,7 +133,7 @@
</div>
</el-card>
</el-col>
<el-col :span="9" style="height: 100%;">
<el-col :span="8" style="height: 100%;">
<el-card style="height: 100%;">
<div slot="header" class="clearfix">
<el-row style="width:100%">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment