Commit 0cda5ae9 authored by 黄奎's avatar 黄奎

新增权限控制

parent 8b006cf9
......@@ -303,7 +303,6 @@ export default {
SceneName: '',
IsDefault: 0,
}
console.log(val)
},
deep:true
}
......@@ -324,7 +323,6 @@ export default {
arr.push(item[i])
}
arr.map((x, index)=>{
console.log(x)
this.sceneList.map((s, sIndex)=>{
if(x.name === s.FieldName) {
let msg = {
......
<style>
.activity {
.activity {
overflow: auto;
height: 100%;
position: relative;
padding: 0 15px;
}
.activity .btn-list {
}
.activity .btn-list {
height: 30px;
padding-bottom: 20px;
display: flex;
align-items: center;
}
.activity .btn-list .btn-list-item {
}
.activity .btn-list .btn-list-item {
padding: 5px 10px;
font-size: 12px;
color: #666666;
......@@ -21,92 +23,110 @@
align-items: center;
transition: all linear 0.3s;
margin-right: 10px;
}
.activity .btn-list .btn-list-item.active,
.activity .btn-list .btn-list-item:hover {
}
.activity .btn-list .btn-list-item.active,
.activity .btn-list .btn-list-item:hover {
color: #ffffff;
background: #409efe;
}
.activity .btn-list .btn-list-item i {
}
.activity .btn-list .btn-list-item i {
padding-right: 5px;
}
.activity .genjin {
}
.activity .genjin {
background-color: #ffffff;
padding: 20px 30px;
}
.activity .genjin .MyEditForm-item {
}
.activity .genjin .MyEditForm-item {
padding: 0;
margin-bottom: 10px;
}
.activity .genjin .el-col-6 {
}
.activity .genjin .el-col-6 {
padding-top: 10px;
box-shadow: 0px 6px 14px 0px rgba(176, 176, 176, 0.2);
}
.activity .el-input__prefix {
}
.activity .el-input__prefix {
right: 5px;
top: -17px;
left: inherit;
}
.activity .el-date-editor.el-input {
}
.activity .el-date-editor.el-input {
width: 100%;
}
.activity .genjin-ctrl {
}
.activity .genjin-ctrl {
display: flex;
align-items: center;
justify-content: space-between;
}
.activity .genjin-ctrl .genjin-ctrl-left {
}
.activity .genjin-ctrl .genjin-ctrl-left {
display: flex;
align-items: center;
font-size: 12px;
color: #999999;
}
.activity .genjin-ctrl .genjin-ctrl-left .ctrl-btn {
}
.activity .genjin-ctrl .genjin-ctrl-left .ctrl-btn {
display: flex;
margin-right: 30px;
line-height: 17px;
cursor: pointer;
}
.activity .genjin-ctrl .genjin-ctrl-left div:hover {
}
.activity .genjin-ctrl .genjin-ctrl-left div:hover {
color: #111111;
}
.activity .genjin-ctrl .genjin-ctrl-left div i {
}
.activity .genjin-ctrl .genjin-ctrl-left div i {
padding-right: 10px;
}
.activity .genjin-ctrl .fabu-btn {
}
.activity .genjin-ctrl .fabu-btn {
padding: 5px 10px;
border: 1px solid #409efe;
color: #409efe;
font-size: 12px;
cursor: pointer;
}
.activity .line-item .time {
}
.activity .line-item .time {
display: flex;
margin-bottom: 15px;
}
.activity .line-item .time > span {
}
.activity .line-item .time>span {
display: flex;
align-items: center;
color: #666666;
font-size: 12px;
background: rgba(243, 246, 253, 1);
padding: 5px 10px;
}
.activity .line-item .time .raduis {
}
.activity .line-item .time .raduis {
width: 6px;
height: 6px;
background: rgba(98, 98, 98, 1);
border-radius: 50%;
display: inline-block;
margin-right: 6px;
}
.activity .img-box {
}
.activity .img-box {
display: flex;
align-items: center;
width: 100%;
flex-wrap: wrap;
}
.activity .img-box .img-item {
}
.activity .img-box .img-item {
width: 98px;
height: 98px;
border: 1px solid #ccc;
......@@ -117,11 +137,13 @@
background-position: 50%;
position: relative;
overflow: hidden;
}
.activity .img-box .img-item:hover .img-item-del {
}
.activity .img-box .img-item:hover .img-item-del {
opacity: 1;
}
.activity .img-box .img-item .img-item-del {
}
.activity .img-box .img-item .img-item-del {
width: 15px;
height: 15px;
line-height: 10px;
......@@ -135,8 +157,9 @@
cursor: pointer;
opacity: 0;
transition: all linear 0.5s;
}
.activity .img-box .img-item-add > div {
}
.activity .img-box .img-item-add>div {
width: 98px;
height: 98px;
line-height: 98px;
......@@ -149,9 +172,10 @@
position: relative;
font-weight: 100;
transition: all linear 0.5s;
}
.activity .img-box .img-item-add > div::before,
.activity .img-box .img-item-add > div::after {
}
.activity .img-box .img-item-add>div::before,
.activity .img-box .img-item-add>div::after {
content: " ";
position: absolute;
top: 50%;
......@@ -160,45 +184,56 @@
background-color: #2362fb;
width: 2px;
height: 39.5px;
}
.activity .img-box .img-item-add > div:hover {
}
.activity .img-box .img-item-add>div:hover {
border-color: #111111;
}
.activity .img-box .img-item-add > div::after {
}
.activity .img-box .img-item-add>div::after {
width: 39.5px;
height: 2px;
}
.activity .file-box {
}
.activity .file-box {
padding: 5px 10px;
border: 1px dashed #dfdfdf;
}
.activity .file-box .tit {
}
.activity .file-box .tit {
margin-bottom: 10px;
}
.activity .file-box .tit i {
}
.activity .file-box .tit i {
padding-right: 5px;
}
.activity .file-item {
}
.activity .file-item {
margin-bottom: 10px;
}
.activity .file-item .del {
}
.activity .file-item .del {
padding-left: 10px;
font-size: 14px;
line-height: 20px;
color: #ccc;
}
.activity .file-item .del:hover {
}
.activity .file-item .del:hover {
color: #2362fb !important;
}
.activity .line-item .content-item {
}
.activity .line-item .content-item {
margin-left: 30px;
padding: 8px 8px 20px 30px;
position: relative;
}
.activity .line-item .content-item:nth-child(1):before {
}
.activity .line-item .content-item:nth-child(1):before {
top: 24px;
}
.activity .line-item .content-item::before {
}
.activity .line-item .content-item::before {
position: absolute;
content: " ";
width: 1px;
......@@ -206,44 +241,53 @@
left: 0;
bottom: 0;
background-color: #e6e6e6;
}
.content-item .iconfont {
}
.content-item .iconfont {
padding: 5px;
background-color: #409efe;
color: white;
position: absolute;
left: -13px;
top: 4px;
}
.content .content-fz .cfz-top {
}
.content .content-fz .cfz-top {
display: flex;
align-items: top;
}
.content .content-fz .cfz-top > div {
}
.content .content-fz .cfz-top>div {
margin-right: 10px;
}
.content .content-fz .cfz-top .tag {
}
.content .content-fz .cfz-top .tag {
margin-left: 30px;
}
.content .content-fz .cfz-top .tag span {
}
.content .content-fz .cfz-top .tag span {
padding: 7px 17px;
color: #666666;
background: rgba(243, 246, 253, 1);
margin-top: 3px;
display: inline-block;
}
.cfz-bot {
}
.cfz-bot {
padding-left: 37px;
}
.cfz-bot > div {
}
.cfz-bot>div {
margin-top: 10px;
padding: 12px 20px;
background: rgba(243, 246, 253, 1);
}
.cfz-bot .mb-10 {
}
.cfz-bot .mb-10 {
margin-bottom: 10px;
}
.img-box .img-box-item {
}
.img-box .img-box-item {
width: 98px;
height: 98px;
display: inline-block;
......@@ -253,33 +297,30 @@
background-position: 50%;
position: relative;
cursor: pointer;
}
.xg-lxr {
}
.xg-lxr {
margin-bottom: 10px;
}
}
</style>
<template>
<div class="activity" id="activity">
<div class="btn-list">
<div class="btn-list" v-if="detailsData.IsCreate==1||detailsData.IsRead==1">
<template v-for="(item, index) in btnList">
<div class="btn-list-item" v-if="showType === 2 && index < 1" :key="index" :class="{'active': type === item.id}" @click="ChangeType(item)"><i class="iconfont icontianjia"></i>{{item.name}}</div>
<div class="btn-list-item" v-if="showType === 2 && index < 1" :key="index" :class="{'active': type === item.id}"
@click="ChangeType(item)"><i class="iconfont icontianjia"></i>{{item.name}}</div>
</template>
</div>
<!-- 写跟进 -->
<template>
<div class="genjin" v-if="type === 1">
<el-form :model="FollowUpMsg" ref="form" class="MyEditForm" >
<div class="genjin" v-if="type === 1 &&(detailsData.IsCreate==1||detailsData.IsRead==1)">
<el-form :model="FollowUpMsg" ref="form" class="MyEditForm">
<el-row :gutter="40" style="margin-bottom: 10px;">
<el-col :span="6">
<div class="MyEditForm-item">
<el-form-item label="跟进方式" class="label-pad-left">
<el-select
filterable
v-model="FollowUpMsg.FollowUpType" placeholder="请选择">
<el-option
v-for="item in GetFollowUpTypeEnumList"
:label='item.Name'
:value='item.ID'
<el-select filterable v-model="FollowUpMsg.FollowUpType" placeholder="请选择">
<el-option v-for="item in GetFollowUpTypeEnumList" :label='item.Name' :value='item.ID'
:key='item.ID'>
</el-option>
</el-select>
......@@ -289,12 +330,8 @@
<el-col :span="6">
<div class="MyEditForm-item MyEditForm-item-time">
<el-form-item label="下次联系时间" class="label-pad-left">
<el-date-picker
value-format="yyyy-MM-dd HH:mm:ss"
v-model="FollowUpMsg.NextContactDate"
:clearable="false"
type="datetime"
placeholder="选择日期时间">
<el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="FollowUpMsg.NextContactDate"
:clearable="false" type="datetime" placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
</div>
......@@ -304,7 +341,8 @@
<el-col :span="24">
<div class="MyEditForm-item">
<el-form-item>
<el-input :autosize="autosize" type="textarea" placeholder="请输入内容" v-model="FollowUpMsg.ContactContent"></el-input>
<el-input :autosize="autosize" type="textarea" placeholder="请输入内容"
v-model="FollowUpMsg.ContactContent"></el-input>
</el-form-item>
</div>
</el-col>
......@@ -312,12 +350,11 @@
</el-form>
<div v-if="gjImgList.length" style="margin-bottom: 15px;">
<div class="img-box">
<div v-for="(item, index) in gjImgList" :key="index" class="img-item" :style="{'background-image': `url(${item.url})`}" @click="previewFile(item.url)">
<div v-for="(item, index) in gjImgList" :key="index" class="img-item"
:style="{'background-image': `url(${item.url})`}" @click="previewFile(item.url)">
<div class="img-item-del" @click="deleteImg(index)">×</div>
</div>
<el-upload
class="img-item-add"
:file-list="fileList" :limit="9" :http-request="uploadImg" :multiple="true"
<el-upload class="img-item-add" :file-list="fileList" :limit="9" :http-request="uploadImg" :multiple="true"
accept="image/jpeg,image/gif,image/png,image/bmp" :show-file-list="false" action="">
<div></div>
</el-upload>
......@@ -328,7 +365,9 @@
<div class="file-box">
<p class="font-size-12 tit"><i class="iconfont iconfujian"></i><span>附件</span></p>
<div class="font-size-12">
<p v-for="(item, index) in fjList" :key="index" class="file-item">{{item.name}} <span class="font-color-info">{{item.size}}</span> <span class="del cp" @click="deleteFile(index)">×</span></p>
<p v-for="(item, index) in fjList" :key="index" class="file-item">{{item.name}} <span
class="font-color-info">{{item.size}}</span> <span class="del cp"
@click="deleteFile(index)">×</span></p>
</div>
<p class="font-color-link font-size-12 cp" @click="deleteFile(-1)">全部删除</p>
</div>
......@@ -345,18 +384,14 @@
</div>
<div class="genjin-ctrl">
<div class="genjin-ctrl-left">
<el-upload
class="upload-demo"
:file-list="fileList" :limit="9" :http-request="uploadImg" :multiple="true"
<el-upload class="upload-demo" :file-list="fileList" :limit="9" :http-request="uploadImg" :multiple="true"
accept="image/jpeg,image/gif,image/png,image/bmp" :show-file-list="false" action="">
<div class="ctrl-btn">
<i class="iconfont icontupian"></i>
<span>图片</span>
</div>
</el-upload>
<el-upload
class="upload-demo"
:file-list="fileList" :limit="9" :http-request="uploadImg2" :multiple="true"
<el-upload class="upload-demo" :file-list="fileList" :limit="9" :http-request="uploadImg2" :multiple="true"
:show-file-list="false" action="">
<div class="ctrl-btn">
<i class="iconfont iconfujian"></i>
......@@ -364,19 +399,10 @@
</div>
</el-upload>
<div class="ctrl-btn">
<el-popover
placement="bottom"
width="140"
trigger="click">
<el-popover placement="bottom" width="140" trigger="click">
<div>
<el-select
filterable
v-model="FollowUpMsg.BusinessId" @change="changeBusiness" placeholder="请选择">
<el-option
v-for="item in BusinessList"
:label='item.BusinessName'
:value='item.ID'
:key='item.ID'>
<el-select filterable v-model="FollowUpMsg.BusinessId" @change="changeBusiness" placeholder="请选择">
<el-option v-for="item in BusinessList" :label='item.BusinessName' :value='item.ID' :key='item.ID'>
</el-option>
</el-select>
</div>
......@@ -393,7 +419,7 @@
</div>
<div class="genjin" style="margin-top: 20px">
<div v-if="logList.length">
<div class="line-item" v-for="(item, index) in logList" :key="index" >
<div class="line-item" v-for="(item, index) in logList" :key="index">
<div class="time">
<span>
<span class="raduis"></span>
......@@ -408,7 +434,7 @@
<p class="content-ea"><span>{{subItem.UpdateDate}}</span> <span> {{subItem.LogInfo}}</span></p>
</div>
</div>
<div class="content-item" v-else :key="subIndex" >
<div class="content-item" v-else :key="subIndex">
<i class="iconfont iconcompany"></i>
<div class="content-fz">
<div class="cfz-top">
......@@ -426,20 +452,26 @@
<div class="cfz-bot">
<div>
<p class="mb-10">{{subItem.LogInfo}}</p>
<p class="xg-lxr" v-if="subItem.CustomerFollowUpModel.ContactName"><span class="font-color-info">相关联系人:</span> <span>{{subItem.CustomerFollowUpModel.ContactName}}</span></p>
<p class="xg-lxr" v-if="subItem.CustomerFollowUpModel.ContactName"><span
class="font-color-info">相关联系人:</span>
<span>{{subItem.CustomerFollowUpModel.ContactName}}</span></p>
<div class="img-box mb-10" v-if="subItem.CustomerFollowUpModel.FollowUpImgList">
<div v-for="(img, imgIndex) in subItem.CustomerFollowUpModel.FollowUpImgList" :key="imgIndex" class="img-box-item" :style="`background-image:url(${img.FileUrl})`" @click="previewFile(img.FileUrl)"></div>
<div v-for="(img, imgIndex) in subItem.CustomerFollowUpModel.FollowUpImgList" :key="imgIndex"
class="img-box-item" :style="`background-image:url(${img.FileUrl})`"
@click="previewFile(img.FileUrl)"></div>
</div>
<div class="mb-10" v-if="subItem.CustomerFollowUpModel.FollowUpFileList" style="display: flex;">
<div class="font-color-info">附件:</div>
<div>
<p v-for="(file, fileIndex) in subItem.CustomerFollowUpModel.FollowUpFileList" :key="fileIndex">
<span >&nbsp;&nbsp;{{file.FileName}} </span>&nbsp;&nbsp;&nbsp;&nbsp;
<p v-for="(file, fileIndex) in subItem.CustomerFollowUpModel.FollowUpFileList"
:key="fileIndex">
<span>&nbsp;&nbsp;{{file.FileName}} </span>&nbsp;&nbsp;&nbsp;&nbsp;
<span class="font-color-link cp" @click="previewFile(file.FileUrl)"> 预览</span>
</p>
</div>
</div>
<p> <span class="font-color-info">下次联系时间:</span> <span>{{subItem.CustomerFollowUpModel.NextContactDateStr}}</span></p>
<p> <span class="font-color-info">下次联系时间:</span>
<span>{{subItem.CustomerFollowUpModel.NextContactDateStr}}</span></p>
</div>
</div>
</div>
......@@ -455,18 +487,23 @@
</div>
</template>
<div v-if="addContactsShow">
<addContacts :ID="CustomerId" @addContactsOk="addContactsOk"/>
<addContacts :ID="CustomerId" @addContactsOk="addContactsOk" />
</div>
</div>
</template>
<script>
import addContacts from "../dialogModel/addContacts";
export default {
import addContacts from "../dialogModel/addContacts";
export default {
components: {
addContacts,
},
props: {
//直客数据信息
detailsData: {
type: Object,
default: null,
},
CustomerId: {
type: Number,
default: 0,
......@@ -478,8 +515,7 @@ export default {
},
data() {
return {
activities: [
{
activities: [{
content: "支持使用图标",
timestamp: "2018-04-12 20:46",
size: "large",
......@@ -521,26 +557,14 @@ export default {
ContactContent: "",
},
GetFollowUpTypeEnumList: [],
btnList: [
{
btnList: [{
id: 1,
name: "写跟进",
},
// ,{
// id: 2,
// name: '创建任务',
// }
{
id: 4,
name: "创建商机",
},
// {
// id: 5,
// name: '创建合同',
// },{
// id: 6,
// name: '创建回款',
// },
],
gjImgList: [],
fjList: [],
......@@ -566,10 +590,10 @@ export default {
},
mounted() {
let $this = this;
this.MsgBus.$on("closeaddContacts", function() {
this.MsgBus.$on("closeaddContacts", function () {
$this.addContactsShow = false;
});
document.getElementById("activity").addEventListener("scroll", function() {
document.getElementById("activity").addEventListener("scroll", function () {
//全部动态
if (this.scrollHeight - this.scrollTop === this.clientHeight) {
$this.logMsg.pageIndex = $this.logMsg.pageIndex + 1;
......@@ -590,8 +614,10 @@ export default {
},
GetBusinessList() {
this.apipost(
"/api/Customer/GetBusinessList",
{ CustomerId: this.CustomerId, CustomerType: 1 },
"/api/Customer/GetBusinessList", {
CustomerId: this.CustomerId,
CustomerType: 1
},
(res) => {
if (res.data.resultCode == 1) {
this.BusinessList = res.data.data;
......@@ -791,5 +817,5 @@ export default {
}
},
},
};
};
</script>
\ No newline at end of file
......@@ -3,83 +3,77 @@
</style>
<template>
<div class="Business">
<div class="add-Enclosure">
<el-button icon="el-icon-plus" class="crm-btn query-btn crm-btn-mini margin-right0" @click="addBusiness">新建商机</el-button>
<div class="add-Enclosure" v-if="detailsData.IsCreate==1||detailsData.IsRead==1">
<el-button icon="el-icon-plus" class="crm-btn query-btn crm-btn-mini margin-right0" @click="addBusiness">新建商机
</el-button>
</div>
<el-table
v-loading="loading"
stripe
ref="multipleTable"
:data="dataList"
tooltip-effect="dark"
style="width: 100%"
<el-table v-loading="loading" stripe ref="multipleTable" :data="dataList" tooltip-effect="dark" style="width: 100%"
row-class-name="font-size-12">
<el-table-column
prop="BusinessName"
label="商机名称"
show-overflow-tooltip>
<el-table-column prop="BusinessName" label="商机名称" show-overflow-tooltip>
<template slot-scope="scope">
<p @click="openDetails(scope)" class="font-color-link cp">{{scope.row.BusinessName}}</p>
</template>
</el-table-column>
<el-table-column
prop="BudgetPrice"
label="商机金额"
show-overflow-tooltip>
<el-table-column prop="BudgetPrice" label="商机金额" show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="CustomerName"
label="客户名称"
show-overflow-tooltip>
<el-table-column prop="CustomerName" label="客户名称" show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="BusinessStatusStr"
label="商机阶段"
show-overflow-tooltip>
<el-table-column prop="BusinessStatusStr" label="商机阶段" show-overflow-tooltip>
</el-table-column>
</el-table>
</div>
</template>
<script>
export default {
props: ['ID', 'BusinessType'],
export default {
props: {
//直客数据信息
detailsData: {
type: Object,
default: null,
},
ID: {
type: Number,
default: 0,
},
},
data() {
return {
dataList: [],
loading: false
};
},watch:{
},
watch: {
},
mounted() {
this.GetBusinessList()
},
methods: {
openDetails(scope){
console.log(scope.row.ID)
openDetails(scope) {
this.MsgBus.$emit('busnessDrawerShow', scope.row.ID, 1)
},
GetBusinessList(){
this.apipost('/api/Customer/GetBusinessList', {CustomerId: this.ID, CustomerType: 1}, res=>{
GetBusinessList() {
this.apipost('/api/Customer/GetBusinessList', {
CustomerId: this.ID,
CustomerType: 1
}, res => {
if (res.data.resultCode == 1) {
console.log(res.data.data)
this.dataList = res.data.data
} else {
this.$message.error(res.data.message);
}
})
},
addBusiness(){
let $this= this
addBusiness() {
let $this = this
this.MsgBus.$emit('addBusinessBoxOpen', $this.ID, 0, true)
},
guanlian(){
guanlian() {
},
jiechuguanlian(){
jiechuguanlian() {
},
}
}
}
</script>
\ No newline at end of file
......@@ -82,8 +82,9 @@
<p>{{detailsData.SurName + detailsData.Name}}</p>
</div>
<div class="right" v-if="!hiddenMenu">
{{detailsData.IsCreate}}
<el-button class="crm-btn query-btn" @click="editCust">编辑</el-button>
IsRead {{detailsData.IsRead}};
IsCreate {{detailsData.IsCreate}}
<el-button class="crm-btn query-btn" @click="editCust" v-if="detailsData.IsCreate==1||detailsData.IsRead==1">编辑</el-button>
<el-dropdown @command="handleCommand" style="top: 1px;" v-if="detailsData.IsCreate==1">
<el-button class="crm-btn crm-btn-more easy-btn margin-right0">
<i class="iconfont icongengduo"></i>
......@@ -105,27 +106,23 @@
<span class="info-lable">创建时间:</span><span>{{detailsData.CreateDate ? detailsData.CreateDate : ''}}</span>
</el-col>
</el-row>
</div>
<div class="content">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="活动" name="1">
<Activity v-if="activeName === '1'" :CustomerId="CustomerId" :showType="2" />
<Activity v-if="activeName === '1'" :CustomerId="CustomerId" :detailsData="detailsData" :showType="2" />
</el-tab-pane>
<el-tab-pane label="详细资料" name="2">
<Details v-if="activeName === '2'" :detailsData="detailsData" />
</el-tab-pane>
<el-tab-pane label="团队" name="10">
<guestTeam v-if="activeName === '10'" :GuestId="CustomerId" />
<guestTeam v-if="activeName === '10'" :GuestId="CustomerId" :detailsData="detailsData" />
</el-tab-pane>
<el-tab-pane label="商机" name="5">
<Business v-if="activeName === '5'" :ID="CustomerId" />
<Business v-if="activeName === '5'" :ID="CustomerId" :detailsData="detailsData"/>
</el-tab-pane>
<el-tab-pane label="订单" name="6">
<Agreement v-if="activeName === '6'" :ID="CustomerId" />
</el-tab-pane>
<el-tab-pane label="回款" name="7" v-if="false">
<!-- <MoneyBack /> -->
<Agreement v-if="activeName === '6'" :ID="CustomerId" :detailsData="detailsData" />
</el-tab-pane>
<el-tab-pane label="附件" name="8">
<Enclosure :ID='CustomerId' :type='1' :isGuest="true" v-if="activeName === '8'" />
......
......@@ -530,6 +530,7 @@
$this.dialogTableVisible = false;
});
this.GetSceneEmployeeList();
//保存场景
this.MsgBus.$on("sceneSave", function (msg) {
$this.sceneList = [...msg];
$this.GetSceneEmployeeList();
......@@ -540,6 +541,7 @@
$this.msg.Data = obj;
$this.getList();
});
//编辑场景
this.MsgBus.$on("editScene", function () {
$this.GetSceneEmployeeList();
});
......
......@@ -6,12 +6,12 @@
</style>
<template>
<div class="addTeamman">
<div class="addTeamman-ctrl">
<el-button icon="el-icon-plus" class="crm-btn crm-btn-mini query-btn" @click="addTeammanShow=true"
v-if="IsRead === 0">团队成员</el-button>
<el-button class="crm-btn query-btn crm-btn-mini easy-btn" @click="bianji" v-if="IsRead === 0">编辑</el-button>
<el-button class="crm-btn query-btn crm-btn-mini easy-btn" @click="yichu" v-if="IsRead === 0">移除</el-button>
<el-button class="crm-btn query-btn crm-btn-mini org-btn margin-right0" @click="tuichu">退出团队</el-button>
<div class="addTeamman-ctrl" v-if="detailsData.IsCreate==1||detailsData.IsRead==1">
<el-button icon="el-icon-plus" class="crm-btn crm-btn-mini query-btn" @click="addTeammanShow=true">团队成员
</el-button>
<el-button class="crm-btn query-btn crm-btn-mini easy-btn" @click="bianji">编辑</el-button>
<el-button class="crm-btn query-btn crm-btn-mini easy-btn" @click="yichu">移除</el-button>
<el-button class="crm-btn query-btn crm-btn-mini org-btn margin-right0">退出团队</el-button>
</div>
<el-table v-loading="loading" stripe ref="multipleTable" :data="dataList" tooltip-effect="dark" style="width: 100%"
@selection-change="handleSelectionChange" row-class-name="font-size-12">
......@@ -48,14 +48,15 @@
editGuestTeamPower
},
props: {
//直客客户信息
detailsData: {
type: Object,
default: null
},
GuestId: {
type: Number,
default: 0
},
IsRead: {
type: Number,
default: 0
}
},
data() {
return {
......
<style>
@import '../../assets/css/customerManage.css';
@import '../../assets/css/customerManage.css';
.el-table__fixed-body-wrapper table{
padding-bottom: 8px!important;
}
.el-table__fixed-body-wrapper{
.el-table__fixed-body-wrapper table {
padding-bottom: 8px !important;
}
.el-table__fixed-body-wrapper {
overflow: auto;
}
}
</style>
<template>
<div class="customerManage">
......@@ -19,7 +20,8 @@
</div> -->
<div class="rightmenu">
<!-- <el-button class="crm-btn query-btn" @click="getList">查询</el-button> -->
<el-button icon="el-icon-present" class="crm-btn org-btn" @click="addSendMsg.isAll=true;addSendMsg.sendObj='所有客户',transferVisible=true">发送下次出行事件涵</el-button>
<el-button icon="el-icon-present" class="crm-btn org-btn"
@click="addSendMsg.isAll=true;addSendMsg.sendObj='所有客户',transferVisible=true">发送下次出行事件涵</el-button>
<!-- <el-dropdown>
<el-button class="crm-btn crm-btn-more easy-btn margin-right0">
<i class="iconfont icongengduo"></i>
......@@ -90,7 +92,8 @@
<div class="scene-wrapper" v-if="sceneList.length > 0">
<ul class="list">
<li class="list-item" v-for="(item, index) in sceneList" :key="index">
<span v-if="item.formType !== 'datetime'">{{item.str}}&nbsp;{{item.regionStr}}{{item.nameFC ? item.nameFC : item.value}}</span>
<span
v-if="item.formType !== 'datetime'">{{item.str}}&nbsp;{{item.regionStr}}{{item.nameFC ? item.nameFC : item.value}}</span>
<span v-else>{{item.str}}&nbsp;{{item.start}}-{{item.end}}</span>
<i class="el-icon-close icon" @click="deleteScene(index)"></i>
</li>
......@@ -98,111 +101,45 @@
</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 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="sceneList.length > 0 ? '600' : '660'"
border
row-class-name="font-size-12"
<el-table v-if="!loading" ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%"
:height="sceneList.length > 0 ? '600' : '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="GuestName"
label="客户名称"
width="120"
v-if="queryType[0].show"
<el-table-column fixed prop="GuestName" label="客户名称" width="120" v-if="queryType[0].show"
show-overflow-tooltip>
<template slot-scope="scope">
<p @click="openDetails(scope)" class="font-color-link cp">{{scope.row.GuestName}}</p>
</template>
</el-table-column>
<el-table-column
prop="BirthdayMonth"
label="生日日期"
width="120"
v-if="queryType[1].show"
<el-table-column prop="BirthdayMonth" label="生日日期" width="120" v-if="queryType[1].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="MobilePhone"
label="手机号码"
width="120"
v-if="queryType[2].show"
<el-table-column prop="MobilePhone" label="手机号码" width="120" v-if="queryType[2].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="Address"
label="地址"
v-if="queryType[3].show"
show-overflow-tooltip>
<el-table-column prop="Address" label="地址" v-if="queryType[3].show" show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="SexStr"
label="性别"
v-if="queryType[4].show"
show-overflow-tooltip>
<el-table-column prop="SexStr" label="性别" v-if="queryType[4].show" show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="TripCount"
label="参团次数"
sortable
v-if="queryType[5].show"
show-overflow-tooltip>
<el-table-column prop="TripCount" label="参团次数" sortable v-if="queryType[5].show" show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="Old"
label="年龄"
sortable
v-if="queryType[6].show"
show-overflow-tooltip>
<el-table-column prop="Old" label="年龄" sortable v-if="queryType[6].show" show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="PassportNo"
label="护照号"
sortable
v-if="queryType[7].show"
show-overflow-tooltip>
<el-table-column prop="PassportNo" label="护照号" sortable v-if="queryType[7].show" show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="Duty"
label="职业"
sortable
v-if="queryType[8].show"
show-overflow-tooltip>
<el-table-column prop="Duty" label="职业" sortable v-if="queryType[8].show" show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="CustomerName"
label="关联同行"
sortable
v-if="queryType[9].show"
<el-table-column prop="CustomerName" label="关联同行" sortable v-if="queryType[9].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="ProductName"
label="上次出行产品"
sortable
v-if="queryType[10].show"
width="200"
<el-table-column prop="ProductName" label="上次出行产品" sortable v-if="queryType[10].show" width="200"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="UnitPrice"
label="上次出行单价"
sortable
v-if="queryType[11].show"
<el-table-column prop="UnitPrice" label="上次出行单价" sortable v-if="queryType[11].show"
show-overflow-tooltip>
</el-table-column>
<!-- <el-table-column
......@@ -221,14 +158,10 @@
</p>
</template>
</el-table-column> -->
<el-table-column
width="40"
fixed="right">
<el-table-column width="40" fixed="right">
<template slot="header" slot-scope="scope">
<el-popover
placement="bottom"
width="240">
<mySelect :queryType="queryType" @listenTochildEvent="showMessageFromChild"/>
<el-popover placement="bottom" width="240">
<mySelect :queryType="queryType" @listenTochildEvent="showMessageFromChild" />
<i class="el-icon-s-operation cp" slot="reference"></i>
</el-popover>
</template>
......@@ -236,34 +169,24 @@
</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 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='70%'
:visible.sync="drawer"
direction="rtl"
:before-close="handleClose">
<customerInfoBox :CustomerId="CustomerId" :hiddenMenu="true"/>
<el-drawer :with-header="false" size='70%' :visible.sync="drawer" direction="rtl" :before-close="handleClose">
<customerInfoBox :CustomerId="CustomerId" :hiddenMenu="true" />
</el-drawer>
<!-- <div v-if="dialogTableVisible">
<customerDialogBox @getList="getList" :name="dialogTableVisibleName" :CustomerId="CustomerId"/>
</div> -->
<el-dialog :visible.sync="transferVisible" :close-on-click-modal="false" width="450px" custom-class="transfer-box add-box add-box2">
<el-dialog :visible.sync="transferVisible" :close-on-click-modal="false" width="450px"
custom-class="transfer-box add-box add-box2">
<div class="add-tit" slot="title">
<p><span></span>发送下次出行事件涵</p>
<span icon="el-icon-close"></span>
</div>
<el-form :model="addSendMsg" ref="form" class="MyEditForm" >
<el-form :model="addSendMsg" ref="form" class="MyEditForm">
<div class="MyEditForm-item">
<el-form-item label="计划标题" class="label-pad-left">
<el-input v-model="addSendMsg.Tittle" placeholder="请输入计划标题,如果不填系统将自动生成"></el-input>
......@@ -280,15 +203,13 @@
<div class="MyEditForm-item">
<el-form-item label="接收人员" class="label-pad-left">
<el-input :readonly="true" v-model="addSendMsg.sendObj"></el-input>
<div style="font-size:12px;color:red;margin-left: 10px; margin-top: 2px;">消息将发送给关联的同行,由同行转发给客人,暂不支持直接转发</div>
<div style="font-size:12px;color:red;margin-left: 10px; margin-top: 2px;">
消息将发送给关联的同行,由同行转发给客人,暂不支持直接转发</div>
</el-form-item>
</div>
<div class="MyEditForm-item">
<el-form-item label="发送时间" class="label-pad-left">
<el-date-picker
type="datetime"
v-model="addSendMsg.SendTime"
placeholder="选择日期时间">
<el-date-picker type="datetime" v-model="addSendMsg.SendTime" placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
</div>
......@@ -297,15 +218,14 @@
<el-button type="primary" class="add-box-btn" @click="transfer(2)">确 定</el-button>
<el-button class="add-box-btn add-box-cancel" @click="transferVisible = false">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import mySelect from "../dialogModel/select";
import customerInfoBox from "../guestManagement/customerInfoBox";
// import customerDialogBox from "./customerDialogBox";
export default {
import mySelect from "../dialogModel/select";
import customerInfoBox from "../guestManagement/customerInfoBox";
// import customerDialogBox from "./customerDialogBox";
export default {
components: {
mySelect,
customerInfoBox,
......@@ -313,86 +233,80 @@ export default {
},
data() {
return {
queryType2: [
{
queryType2: [{
label: '客户名称',
show: true,
},{
}, {
label: '生日日期',
show: true,
},{
}, {
label: '手机号码',
show: true,
},{
}, {
label: '地址',
show: true,
}
,{
}, {
label: '性别',
show: true,
},{
}, {
label: '参团次数',
show: true,
},{
}, {
label: '年龄',
show: true,
},{
}, {
label: '护照号',
show: true,
},{
}, {
label: '职业',
show: true,
},{
}, {
label: '关联同行',
show: true,
},{
}, {
label: '上次出行产品',
show: true,
},{
}, {
label: '上次出行单价',
show: true,
}
],
queryType: [
{
}],
queryType: [{
label: '客户名称',
show: true,
},{
}, {
label: '生日日期',
show: true,
},{
}, {
label: '手机号码',
show: true,
},{
}, {
label: '地址',
show: true,
}
,{
}, {
label: '性别',
show: true,
},{
}, {
label: '参团次数',
show: true,
},{
}, {
label: '年龄',
show: true,
},{
}, {
label: '护照号',
show: true,
},{
}, {
label: '职业',
show: true,
},{
}, {
label: '关联同行',
show: true,
},{
}, {
label: '上次出行产品',
show: true,
},{
}, {
label: '上次出行单价',
show: true,
}
],
}],
CustomerId: 0,
CustomerIdStr: '',
transferVisible: false,
......@@ -406,7 +320,6 @@ export default {
EmployeeList: [],
value: '',
userInfo: {},
msg: {
GusetName: '',
pageIndex: 1,
......@@ -421,27 +334,25 @@ export default {
SceneEmployeeList: [],
sceneID: 36,
visible: false,
addSendMsg:{
Tittle:"",
addSendMsg: {
Tittle: "",
Type: 6,
SendType: '2',
Details: [],
SendTime: '',
isAll:false,
isAll: false,
}
};
},
mounted() {
this.userInfo = this.getLocalStorage();
console.log(this.queryType)
this.getList()
//this.Employee()
let $this = this
this.MsgBus.$on('closeCustomerDialogBox', function (){
this.MsgBus.$on('closeCustomerDialogBox', function () {
$this.dialogTableVisible = false
})
this.GetSceneEmployeeList()
this.MsgBus.$on('sceneSave', function (msg){
this.MsgBus.$on('sceneSave', function (msg) {
$this.sceneList = [...msg]
$this.GetSceneEmployeeList()
let obj = {}
......@@ -451,19 +362,19 @@ export default {
$this.msg.Data = obj
$this.getList()
})
this.MsgBus.$on('editScene', function (){
console.log(1)
this.MsgBus.$on('editScene', function () {
$this.GetSceneEmployeeList()
})
},beforeDestroy() {
},
beforeDestroy() {
this.MsgBus.$off('sceneSave');
this.MsgBus.$off('editScene');
},
methods: {
sendPresent(){
sendPresent() {
},
changeWhere(item){
changeWhere(item) {
this.msg.ID = item.ID
this.sceneID = item.ID
this.msg.Data = item.WhereData ? JSON.parse(item.WhereData) : {}
......@@ -471,14 +382,16 @@ export default {
this.visible = false
this.getList()
},
GetSceneEmployeeList(){
this.apipost('/api/Scene/GetSceneEmployeeList', {LableType: 5}, res=>{
GetSceneEmployeeList() {
this.apipost('/api/Scene/GetSceneEmployeeList', {
LableType: 5
}, res => {
if (res.data.resultCode == 1) {
this.SceneEmployeeList = res.data.data
}
})
},
deleteScene(index){
deleteScene(index) {
this.sceneList.splice(index, 1)
let obj = {}
this.sceneList.forEach(element => {
......@@ -489,35 +402,35 @@ export default {
},
// 转移
transfer(){
this.apipost('/api/SellEvent/AddNextTripActivity', this.addSendMsg, res=>{
transfer() {
this.apipost('/api/SellEvent/AddNextTripActivity', this.addSendMsg, res => {
if (res.data.resultCode == 1) {
this.multipleSelection = []
this.transferVisible = false
this.$message.success(res.data.message);
this.getList()
this.addSendMsg = {
Tittle:"",
Tittle: "",
Type: 6,
SendType: '2',
Details: [],
isAll:false,
isAll: false,
}
}
})
},
showMessageFromChild(list){
this.mySelectCtrl=!this.mySelectCtrl
showMessageFromChild(list) {
this.mySelectCtrl = !this.mySelectCtrl
if (list) {
this.queryType = list
this.getList()
}
},
editCust(){
editCust() {
this.dialogTableVisibleName = '修改直客'
this.dialogTableVisible = true
},
openDetails(scope){
openDetails(scope) {
this.drawer = true
this.CustomerId = scope.row.Id
this.CustomerName = scope.row.GuestName
......@@ -533,10 +446,10 @@ export default {
handleClose(done) {
done();
},
getList: function (){
getList: function () {
this.tableData = []
this.loading = true
this.apipost('/api/sellevent/GetAllNextTripGuest', this.msg, res=>{
this.apipost('/api/sellevent/GetAllNextTripGuest', this.msg, res => {
if (res.data.resultCode == 1) {
this.tableData = res.data.data.pageData;
this.total = res.data.data.count;
......@@ -546,9 +459,9 @@ export default {
},
handleSelectionChange(val) {
this.multipleSelection = val
this.addSendMsg.isAll=false
if(val && val.length>0){
let list = val.map(x=> {
this.addSendMsg.isAll = false
if (val && val.length > 0) {
let list = val.map(x => {
return {
GuestName: x.GuestName,
GuestId: x.Id,
......@@ -559,11 +472,12 @@ export default {
}
})
this.addSendMsg.Details = list
this.addSendMsg.sendObj=val.length==1?val[0].GuestName:val[0].GuestName+"等"+val.length+"人"
}else{
this.addSendMsg.sendObj=""
this.addSendMsg.sendObj = val.length == 1 ? val[0].GuestName : val[0].GuestName + "等" + val.length +
"人"
} else {
this.addSendMsg.sendObj = ""
}
}
}
};
};
</script>
\ No newline at end of file
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