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

新增权限控制

parent 8b006cf9
...@@ -303,7 +303,6 @@ export default { ...@@ -303,7 +303,6 @@ export default {
SceneName: '', SceneName: '',
IsDefault: 0, IsDefault: 0,
} }
console.log(val)
}, },
deep:true deep:true
} }
...@@ -324,7 +323,6 @@ export default { ...@@ -324,7 +323,6 @@ export default {
arr.push(item[i]) arr.push(item[i])
} }
arr.map((x, index)=>{ arr.map((x, index)=>{
console.log(x)
this.sceneList.map((s, sIndex)=>{ this.sceneList.map((s, sIndex)=>{
if(x.name === s.FieldName) { if(x.name === s.FieldName) {
let msg = { let msg = {
......
<style> <style>
.activity { .activity {
overflow: auto; overflow: auto;
height: 100%; height: 100%;
position: relative; position: relative;
padding: 0 15px; padding: 0 15px;
} }
.activity .btn-list {
height: 30px; .activity .btn-list {
padding-bottom: 20px; height: 30px;
display: flex; padding-bottom: 20px;
align-items: center; display: flex;
} align-items: center;
.activity .btn-list .btn-list-item { }
padding: 5px 10px;
font-size: 12px; .activity .btn-list .btn-list-item {
color: #666666; padding: 5px 10px;
background: rgba(13, 36, 129, 0.1); font-size: 12px;
cursor: pointer; color: #666666;
display: flex; background: rgba(13, 36, 129, 0.1);
align-items: center; cursor: pointer;
transition: all linear 0.3s; display: flex;
margin-right: 10px; align-items: center;
} transition: all linear 0.3s;
.activity .btn-list .btn-list-item.active, margin-right: 10px;
.activity .btn-list .btn-list-item:hover { }
color: #ffffff;
background: #409efe; .activity .btn-list .btn-list-item.active,
} .activity .btn-list .btn-list-item:hover {
.activity .btn-list .btn-list-item i { color: #ffffff;
padding-right: 5px; background: #409efe;
} }
.activity .genjin {
background-color: #ffffff; .activity .btn-list .btn-list-item i {
padding: 20px 30px; padding-right: 5px;
} }
.activity .genjin .MyEditForm-item {
padding: 0; .activity .genjin {
margin-bottom: 10px; background-color: #ffffff;
} padding: 20px 30px;
.activity .genjin .el-col-6 { }
padding-top: 10px;
box-shadow: 0px 6px 14px 0px rgba(176, 176, 176, 0.2); .activity .genjin .MyEditForm-item {
} padding: 0;
.activity .el-input__prefix { margin-bottom: 10px;
right: 5px; }
top: -17px;
left: inherit; .activity .genjin .el-col-6 {
} padding-top: 10px;
.activity .el-date-editor.el-input { box-shadow: 0px 6px 14px 0px rgba(176, 176, 176, 0.2);
width: 100%; }
}
.activity .genjin-ctrl { .activity .el-input__prefix {
display: flex; right: 5px;
align-items: center; top: -17px;
justify-content: space-between; left: inherit;
} }
.activity .genjin-ctrl .genjin-ctrl-left {
display: flex; .activity .el-date-editor.el-input {
align-items: center; width: 100%;
font-size: 12px; }
color: #999999;
} .activity .genjin-ctrl {
.activity .genjin-ctrl .genjin-ctrl-left .ctrl-btn { display: flex;
display: flex; align-items: center;
margin-right: 30px; justify-content: space-between;
line-height: 17px; }
cursor: pointer;
} .activity .genjin-ctrl .genjin-ctrl-left {
.activity .genjin-ctrl .genjin-ctrl-left div:hover { display: flex;
color: #111111; align-items: center;
} font-size: 12px;
.activity .genjin-ctrl .genjin-ctrl-left div i { color: #999999;
padding-right: 10px; }
}
.activity .genjin-ctrl .fabu-btn { .activity .genjin-ctrl .genjin-ctrl-left .ctrl-btn {
padding: 5px 10px; display: flex;
border: 1px solid #409efe; margin-right: 30px;
color: #409efe; line-height: 17px;
font-size: 12px; cursor: pointer;
cursor: pointer; }
}
.activity .line-item .time { .activity .genjin-ctrl .genjin-ctrl-left div:hover {
display: flex; color: #111111;
margin-bottom: 15px; }
}
.activity .line-item .time > span { .activity .genjin-ctrl .genjin-ctrl-left div i {
display: flex; padding-right: 10px;
align-items: center; }
color: #666666;
font-size: 12px; .activity .genjin-ctrl .fabu-btn {
background: rgba(243, 246, 253, 1); padding: 5px 10px;
padding: 5px 10px; border: 1px solid #409efe;
} color: #409efe;
.activity .line-item .time .raduis { font-size: 12px;
width: 6px; cursor: pointer;
height: 6px; }
background: rgba(98, 98, 98, 1);
border-radius: 50%; .activity .line-item .time {
display: inline-block; display: flex;
margin-right: 6px; margin-bottom: 15px;
} }
.activity .img-box {
display: flex; .activity .line-item .time>span {
align-items: center; display: flex;
width: 100%; align-items: center;
flex-wrap: wrap; color: #666666;
} font-size: 12px;
.activity .img-box .img-item { background: rgba(243, 246, 253, 1);
width: 98px; padding: 5px 10px;
height: 98px; }
border: 1px solid #ccc;
display: inline-block; .activity .line-item .time .raduis {
margin: 0 4px 4px 0; width: 6px;
background-size: contain; height: 6px;
background-repeat: no-repeat; background: rgba(98, 98, 98, 1);
background-position: 50%; border-radius: 50%;
position: relative; display: inline-block;
overflow: hidden; margin-right: 6px;
} }
.activity .img-box .img-item:hover .img-item-del {
opacity: 1; .activity .img-box {
} display: flex;
.activity .img-box .img-item .img-item-del { align-items: center;
width: 15px; width: 100%;
height: 15px; flex-wrap: wrap;
line-height: 10px; }
text-align: center;
background-color: rgba(98, 98, 98, 0.5); .activity .img-box .img-item {
color: white; width: 98px;
font-size: 12px; height: 98px;
position: absolute; border: 1px solid #ccc;
right: 0; display: inline-block;
top: 0; margin: 0 4px 4px 0;
cursor: pointer; background-size: contain;
opacity: 0; background-repeat: no-repeat;
transition: all linear 0.5s; background-position: 50%;
} position: relative;
.activity .img-box .img-item-add > div { overflow: hidden;
width: 98px; }
height: 98px;
line-height: 98px; .activity .img-box .img-item:hover .img-item-del {
font-size: 60px; opacity: 1;
color: #ccc; }
text-align: center;
cursor: pointer; .activity .img-box .img-item .img-item-del {
display: inline-block; width: 15px;
border: 1px dashed #ddd; height: 15px;
position: relative; line-height: 10px;
font-weight: 100; text-align: center;
transition: all linear 0.5s; background-color: rgba(98, 98, 98, 0.5);
} color: white;
.activity .img-box .img-item-add > div::before, font-size: 12px;
.activity .img-box .img-item-add > div::after { position: absolute;
content: " "; right: 0;
position: absolute; top: 0;
top: 50%; cursor: pointer;
left: 50%; opacity: 0;
transform: translate(-50%, -50%); transition: all linear 0.5s;
background-color: #2362fb; }
width: 2px;
height: 39.5px; .activity .img-box .img-item-add>div {
} width: 98px;
.activity .img-box .img-item-add > div:hover { height: 98px;
border-color: #111111; line-height: 98px;
} font-size: 60px;
.activity .img-box .img-item-add > div::after { color: #ccc;
width: 39.5px; text-align: center;
height: 2px; cursor: pointer;
} display: inline-block;
.activity .file-box { border: 1px dashed #ddd;
padding: 5px 10px; position: relative;
border: 1px dashed #dfdfdf; font-weight: 100;
} transition: all linear 0.5s;
.activity .file-box .tit { }
margin-bottom: 10px;
} .activity .img-box .img-item-add>div::before,
.activity .file-box .tit i { .activity .img-box .img-item-add>div::after {
padding-right: 5px; content: " ";
} position: absolute;
.activity .file-item { top: 50%;
margin-bottom: 10px; left: 50%;
} transform: translate(-50%, -50%);
.activity .file-item .del { background-color: #2362fb;
padding-left: 10px; width: 2px;
font-size: 14px; height: 39.5px;
line-height: 20px; }
color: #ccc;
} .activity .img-box .img-item-add>div:hover {
.activity .file-item .del:hover { border-color: #111111;
color: #2362fb !important; }
}
.activity .line-item .content-item { .activity .img-box .img-item-add>div::after {
margin-left: 30px; width: 39.5px;
padding: 8px 8px 20px 30px; height: 2px;
position: relative; }
}
.activity .line-item .content-item:nth-child(1):before { .activity .file-box {
top: 24px; padding: 5px 10px;
} border: 1px dashed #dfdfdf;
.activity .line-item .content-item::before { }
position: absolute;
content: " "; .activity .file-box .tit {
width: 1px; margin-bottom: 10px;
top: 0; }
left: 0;
bottom: 0; .activity .file-box .tit i {
background-color: #e6e6e6; padding-right: 5px;
} }
.content-item .iconfont {
padding: 5px; .activity .file-item {
background-color: #409efe; margin-bottom: 10px;
color: white; }
position: absolute;
left: -13px; .activity .file-item .del {
top: 4px; padding-left: 10px;
} font-size: 14px;
.content .content-fz .cfz-top { line-height: 20px;
display: flex; color: #ccc;
align-items: top; }
}
.content .content-fz .cfz-top > div { .activity .file-item .del:hover {
margin-right: 10px; color: #2362fb !important;
} }
.content .content-fz .cfz-top .tag {
margin-left: 30px; .activity .line-item .content-item {
} margin-left: 30px;
.content .content-fz .cfz-top .tag span { padding: 8px 8px 20px 30px;
padding: 7px 17px; position: relative;
color: #666666; }
background: rgba(243, 246, 253, 1);
margin-top: 3px; .activity .line-item .content-item:nth-child(1):before {
display: inline-block; top: 24px;
} }
.cfz-bot {
padding-left: 37px; .activity .line-item .content-item::before {
} position: absolute;
.cfz-bot > div { content: " ";
margin-top: 10px; width: 1px;
padding: 12px 20px; top: 0;
background: rgba(243, 246, 253, 1); left: 0;
} bottom: 0;
.cfz-bot .mb-10 { background-color: #e6e6e6;
margin-bottom: 10px; }
}
.img-box .img-box-item { .content-item .iconfont {
width: 98px; padding: 5px;
height: 98px; background-color: #409efe;
display: inline-block; color: white;
margin: 0 4px 4px 0; position: absolute;
background-size: contain; left: -13px;
background-repeat: no-repeat; top: 4px;
background-position: 50%; }
position: relative;
cursor: pointer; .content .content-fz .cfz-top {
} display: flex;
.xg-lxr { align-items: top;
margin-bottom: 10px; }
}
.content .content-fz .cfz-top>div {
margin-right: 10px;
}
.content .content-fz .cfz-top .tag {
margin-left: 30px;
}
.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 {
padding-left: 37px;
}
.cfz-bot>div {
margin-top: 10px;
padding: 12px 20px;
background: rgba(243, 246, 253, 1);
}
.cfz-bot .mb-10 {
margin-bottom: 10px;
}
.img-box .img-box-item {
width: 98px;
height: 98px;
display: inline-block;
margin: 0 4px 4px 0;
background-size: contain;
background-repeat: no-repeat;
background-position: 50%;
position: relative;
cursor: pointer;
}
.xg-lxr {
margin-bottom: 10px;
}
</style> </style>
<template> <template>
<div class="activity" id="activity"> <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"> <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}"
</template> @click="ChangeType(item)"><i class="iconfont icontianjia"></i>{{item.name}}</div>
</div> </template>
<!-- 写跟进 --> </div>
<template> <!-- 写跟进 -->
<div class="genjin" v-if="type === 1"> <template>
<el-form :model="FollowUpMsg" ref="form" class="MyEditForm" > <div class="genjin" v-if="type === 1 &&(detailsData.IsCreate==1||detailsData.IsRead==1)">
<el-row :gutter="40" style="margin-bottom: 10px;"> <el-form :model="FollowUpMsg" ref="form" class="MyEditForm">
<el-col :span="6"> <el-row :gutter="40" style="margin-bottom: 10px;">
<div class="MyEditForm-item"> <el-col :span="6">
<el-form-item label="跟进方式" class="label-pad-left"> <div class="MyEditForm-item">
<el-select <el-form-item label="跟进方式" class="label-pad-left">
filterable <el-select filterable v-model="FollowUpMsg.FollowUpType" placeholder="请选择">
v-model="FollowUpMsg.FollowUpType" placeholder="请选择"> <el-option v-for="item in GetFollowUpTypeEnumList" :label='item.Name' :value='item.ID'
<el-option :key='item.ID'>
v-for="item in GetFollowUpTypeEnumList" </el-option>
:label='item.Name' </el-select>
:value='item.ID' </el-form-item>
:key='item.ID'> </div>
</el-option> </el-col>
</el-select> <el-col :span="6">
</el-form-item> <div class="MyEditForm-item MyEditForm-item-time">
</div> <el-form-item label="下次联系时间" class="label-pad-left">
</el-col> <el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="FollowUpMsg.NextContactDate"
<el-col :span="6"> :clearable="false" type="datetime" placeholder="选择日期时间">
<div class="MyEditForm-item MyEditForm-item-time"> </el-date-picker>
<el-form-item label="下次联系时间" class="label-pad-left"> </el-form-item>
<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>
</el-col>
</el-row>
<el-row>
<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-form-item>
</div>
</el-col>
</el-row>
</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 class="img-item-del" @click="deleteImg(index)">×</div>
</div> </div>
<el-upload </el-col>
class="img-item-add" </el-row>
:file-list="fileList" :limit="9" :http-request="uploadImg" :multiple="true" <el-row>
accept="image/jpeg,image/gif,image/png,image/bmp" :show-file-list="false" action=""> <el-col :span="24">
<div></div> <div class="MyEditForm-item">
</el-upload> <el-form-item>
<el-input :autosize="autosize" type="textarea" placeholder="请输入内容"
v-model="FollowUpMsg.ContactContent"></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
</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 class="img-item-del" @click="deleteImg(index)">×</div>
</div> </div>
<p class="font-color-link font-size-12 cp" @click="deleteImg(-1)">全部删除</p> <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>
</div> </div>
<div v-if="fjList.length" style="margin-bottom: 15px;"> <p class="font-color-link font-size-12 cp" @click="deleteImg(-1)">全部删除</p>
<div class="file-box"> </div>
<p class="font-size-12 tit"><i class="iconfont iconfujian"></i><span>附件</span></p> <div v-if="fjList.length" style="margin-bottom: 15px;">
<div class="font-size-12"> <div class="file-box">
<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 class="font-size-12 tit"><i class="iconfont iconfujian"></i><span>附件</span></p>
</div> <div class="font-size-12">
<p class="font-color-link font-size-12 cp" @click="deleteFile(-1)">全部删除</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> </div>
<p class="font-color-link font-size-12 cp" @click="deleteFile(-1)">全部删除</p>
</div> </div>
<div v-if="FollowUpMsg.BusinessId > 0" style="margin-bottom: 15px;"> </div>
<div class="file-box"> <div v-if="FollowUpMsg.BusinessId > 0" style="margin-bottom: 15px;">
<p class="font-size-12 tit"><i class="iconfont iconfujian"></i><span>商机</span></p> <div class="file-box">
<div class="font-size-12"> <p class="font-size-12 tit"><i class="iconfont iconfujian"></i><span>商机</span></p>
<el-tag closable @close="deleteBusiness"> <div class="font-size-12">
{{FollowUpMsg.BusinessName}} <el-tag closable @close="deleteBusiness">
</el-tag> {{FollowUpMsg.BusinessName}}
</div> </el-tag>
</div> </div>
</div> </div>
<div class="genjin-ctrl"> </div>
<div class="genjin-ctrl-left"> <div class="genjin-ctrl">
<el-upload <div class="genjin-ctrl-left">
class="upload-demo" <el-upload class="upload-demo" :file-list="fileList" :limit="9" :http-request="uploadImg" :multiple="true"
:file-list="fileList" :limit="9" :http-request="uploadImg" :multiple="true" accept="image/jpeg,image/gif,image/png,image/bmp" :show-file-list="false" action="">
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"
:show-file-list="false" action="">
<div class="ctrl-btn">
<i class="iconfont iconfujian"></i>
<span>附件</span>
</div>
</el-upload>
<div class="ctrl-btn"> <div class="ctrl-btn">
<el-popover <i class="iconfont icontupian"></i>
placement="bottom" <span>图片</span>
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-option>
</el-select>
</div>
<div slot="reference">
<i class="iconfont iconguanlianbg"></i>
<span>关联商机</span>
</div>
</el-popover>
</div> </div>
</el-upload>
<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>
<span>附件</span>
</div>
</el-upload>
<div class="ctrl-btn">
<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-option>
</el-select>
</div>
<div slot="reference">
<i class="iconfont iconguanlianbg"></i>
<span>关联商机</span>
</div>
</el-popover>
</div> </div>
<div class="fabu-btn" @click="CreateContactFollowUp">发布</div>
</div> </div>
<div class="fabu-btn" @click="CreateContactFollowUp">发布</div>
</div> </div>
<div class="genjin" style="margin-top: 20px"> </div>
<div v-if="logList.length"> <div class="genjin" style="margin-top: 20px">
<div class="line-item" v-for="(item, index) in logList" :key="index" > <div v-if="logList.length">
<div class="time"> <div class="line-item" v-for="(item, index) in logList" :key="index">
<span> <div class="time">
<span class="raduis"></span> <span>
<span>{{item.DateTimeStr}}</span> <span class="raduis"></span>
</span> <span>{{item.DateTimeStr}}</span>
</div> </span>
<div class="content font-size-12"> </div>
<template v-for="(subItem, subIndex) in item.LogList"> <div class="content font-size-12">
<div class="content-item font-color-info" :key="subIndex" v-if="!subItem.CustomerFollowUpModel"> <template v-for="(subItem, subIndex) in item.LogList">
<i class="iconfont iconcompany"></i> <div class="content-item font-color-info" :key="subIndex" v-if="!subItem.CustomerFollowUpModel">
<div class="content"> <i class="iconfont iconcompany"></i>
<p class="content-ea"><span>{{subItem.UpdateDate}}</span> <span> {{subItem.LogInfo}}</span></p> <div class="content">
</div> <p class="content-ea"><span>{{subItem.UpdateDate}}</span> <span> {{subItem.LogInfo}}</span></p>
</div> </div>
<div class="content-item" v-else :key="subIndex" > </div>
<i class="iconfont iconcompany"></i> <div class="content-item" v-else :key="subIndex">
<div class="content-fz"> <i class="iconfont iconcompany"></i>
<div class="cfz-top"> <div class="content-fz">
<div> <div class="cfz-top">
<img src="../../assets/img/cust/kehu2.png" alt=""> <div>
</div> <img src="../../assets/img/cust/kehu2.png" alt="">
<div>
<p>{{subItem.CustomerFollowUpModel.CreateByStr}}</p>
<p class="font-color-info">{{subItem.UpdateDateStr}}</p>
</div>
<div class="tag">
<span>{{subItem.CustomerFollowUpModel.FollowUpTypeStr}}</span>
</div>
</div> </div>
<div class="cfz-bot"> <div>
<div> <p>{{subItem.CustomerFollowUpModel.CreateByStr}}</p>
<p class="mb-10">{{subItem.LogInfo}}</p> <p class="font-color-info">{{subItem.UpdateDateStr}}</p>
<p class="xg-lxr" v-if="subItem.CustomerFollowUpModel.ContactName"><span class="font-color-info">相关联系人:</span> <span>{{subItem.CustomerFollowUpModel.ContactName}}</span></p> </div>
<div class="img-box mb-10" v-if="subItem.CustomerFollowUpModel.FollowUpImgList"> <div class="tag">
<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> <span>{{subItem.CustomerFollowUpModel.FollowUpTypeStr}}</span>
</div> </div>
<div class="mb-10" v-if="subItem.CustomerFollowUpModel.FollowUpFileList" style="display: flex;"> </div>
<div class="font-color-info">附件:</div> <div class="cfz-bot">
<div> <div>
<p v-for="(file, fileIndex) in subItem.CustomerFollowUpModel.FollowUpFileList" :key="fileIndex"> <p class="mb-10">{{subItem.LogInfo}}</p>
<span >&nbsp;&nbsp;{{file.FileName}} </span>&nbsp;&nbsp;&nbsp;&nbsp; <p class="xg-lxr" v-if="subItem.CustomerFollowUpModel.ContactName"><span
<span class="font-color-link cp" @click="previewFile(file.FileUrl)"> 预览</span> class="font-color-info">相关联系人:</span>
</p> <span>{{subItem.CustomerFollowUpModel.ContactName}}</span></p>
</div> <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>
<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;
<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>
</div> </div>
<p> <span class="font-color-info">下次联系时间:</span>
<span>{{subItem.CustomerFollowUpModel.NextContactDateStr}}</span></p>
</div> </div>
</div> </div>
</div> </div>
</template> </div>
</div> </template>
</div> </div>
</div> </div>
<div v-else class="nodata font-color-info">
<p>暂无数据</p>
</div>
</div> </div>
</template>
<div v-if="addContactsShow"> <div v-else class="nodata font-color-info">
<addContacts :ID="CustomerId" @addContactsOk="addContactsOk"/> <p>暂无数据</p>
</div>
</div> </div>
</template>
<div v-if="addContactsShow">
<addContacts :ID="CustomerId" @addContactsOk="addContactsOk" />
</div> </div>
</div>
</template> </template>
<script> <script>
import addContacts from "../dialogModel/addContacts"; import addContacts from "../dialogModel/addContacts";
export default { export default {
components: { components: {
addContacts, addContacts,
},
props: {
CustomerId: {
type: Number,
default: 0,
}, },
showType: { props: {
type: Number, //直客数据信息
default: 0, detailsData: {
type: Object,
default: null,
},
CustomerId: {
type: Number,
default: 0,
},
showType: {
type: Number,
default: 0,
},
}, },
}, data() {
data() { return {
return { activities: [{
activities: [ content: "支持使用图标",
{ timestamp: "2018-04-12 20:46",
content: "支持使用图标", size: "large",
timestamp: "2018-04-12 20:46", type: "primary",
size: "large", icon: "el-icon-more",
type: "primary", },
icon: "el-icon-more", {
content: "支持自定义颜色",
timestamp: "2018-04-03 20:46",
color: "#0bbd87",
},
{
content: "支持自定义尺寸",
timestamp: "2018-04-03 20:46",
size: "large",
},
{
content: "默认样式的节点",
timestamp: "2018-04-03 20:46",
},
],
addContactsShow: false,
fileList: [],
autosize: {
minRows: 4,
}, },
{ type: 1,
content: "支持自定义颜色", FollowUpMsg: {
timestamp: "2018-04-03 20:46", ID: 0,
color: "#0bbd87", CustomerId: "",
ContactId: 0,
ContactName: "",
BusinessId: "",
BusinessName: "",
FollowUpType: "",
FollowUpImgList: [],
FollowUpFileList: [],
NextContactDate: "",
ContactContent: "",
}, },
{ GetFollowUpTypeEnumList: [],
content: "支持自定义尺寸", btnList: [{
timestamp: "2018-04-03 20:46", id: 1,
size: "large", name: "写跟进",
},
{
id: 4,
name: "创建商机",
},
],
gjImgList: [],
fjList: [],
logList: [],
BusinessList: [],
logMsg: {
Type: 1,
pageIndex: 1,
pageSize: 3,
CustomerId: 0,
CustomerType: 1,
}, },
{ };
content: "默认样式的节点", },
timestamp: "2018-04-03 20:46", watch: {
}, CustomerId: {
], handler(val, oldVal) {
addContactsShow: false, this.GetLogPageList();
fileList: [], this.GetBusinessList();
autosize: {
minRows: 4,
},
type: 1,
FollowUpMsg: {
ID: 0,
CustomerId: "",
ContactId: 0,
ContactName: "",
BusinessId: "",
BusinessName: "",
FollowUpType: "",
FollowUpImgList: [],
FollowUpFileList: [],
NextContactDate: "",
ContactContent: "",
},
GetFollowUpTypeEnumList: [],
btnList: [
{
id: 1,
name: "写跟进",
},
// ,{
// id: 2,
// name: '创建任务',
// }
{
id: 4,
name: "创建商机",
}, },
// { deep: true,
// id: 5,
// name: '创建合同',
// },{
// id: 6,
// name: '创建回款',
// },
],
gjImgList: [],
fjList: [],
logList: [],
BusinessList: [],
logMsg: {
Type: 1,
pageIndex: 1,
pageSize: 3,
CustomerId: 0,
CustomerType: 1,
},
};
},
watch: {
CustomerId: {
handler(val, oldVal) {
this.GetLogPageList();
this.GetBusinessList();
}, },
deep: true,
}, },
}, mounted() {
mounted() { let $this = this;
let $this = this; this.MsgBus.$on("closeaddContacts", function () {
this.MsgBus.$on("closeaddContacts", function() { $this.addContactsShow = false;
$this.addContactsShow = false; });
}); document.getElementById("activity").addEventListener("scroll", function () {
document.getElementById("activity").addEventListener("scroll", function() { //全部动态
//全部动态 if (this.scrollHeight - this.scrollTop === this.clientHeight) {
if (this.scrollHeight - this.scrollTop === this.clientHeight) { $this.logMsg.pageIndex = $this.logMsg.pageIndex + 1;
$this.logMsg.pageIndex = $this.logMsg.pageIndex + 1; $this.GetLogPageList(1);
$this.GetLogPageList(1);
}
});
this.GetFollowUpTypeEnum();
this.GetLogPageList();
this.GetBusinessList();
},
methods: {
changeBusiness(val) {
this.BusinessList.map((x) => {
if (val === x.ID) {
this.FollowUpMsg.BusinessName = x.BusinessName;
} }
}); });
this.GetFollowUpTypeEnum();
this.GetLogPageList();
this.GetBusinessList();
}, },
GetBusinessList() { methods: {
this.apipost( changeBusiness(val) {
"/api/Customer/GetBusinessList", this.BusinessList.map((x) => {
{ CustomerId: this.CustomerId, CustomerType: 1 }, if (val === x.ID) {
(res) => { this.FollowUpMsg.BusinessName = x.BusinessName;
if (res.data.resultCode == 1) {
this.BusinessList = res.data.data;
} else {
this.$message.error(res.data.message);
} }
} });
); },
}, GetBusinessList() {
addBusiness() { this.apipost(
let $this = this; "/api/Customer/GetBusinessList", {
this.MsgBus.$emit("addBusinessBoxOpen", $this.CustomerId, 0, true); CustomerId: this.CustomerId,
}, CustomerType: 1
previewFile(file) { },
if (file.IsPicture()) { (res) => {
this.MsgBus.$emit("showImg", file); if (res.data.resultCode == 1) {
return; this.BusinessList = res.data.data;
}
window.open(file, "_blank");
},
GetLogPageList(t) {
this.logMsg.CustomerId = this.CustomerId;
this.apipost(
"/api/Customer/GetLogPageByCustomerId",
this.logMsg,
(res) => {
if (res.data.resultCode == 1) {
let data = res.data.data;
if (t) {
this.logList = this.logList.concat(data.pageData);
} else { } else {
this.logList = data.pageData; this.$message.error(res.data.message);
} }
} }
);
},
addBusiness() {
let $this = this;
this.MsgBus.$emit("addBusinessBoxOpen", $this.CustomerId, 0, true);
},
previewFile(file) {
if (file.IsPicture()) {
this.MsgBus.$emit("showImg", file);
return;
} }
); window.open(file, "_blank");
}, },
GetFollowUpTypeEnum() { GetLogPageList(t) {
this.apipost("/api/Customer/GetFollowUpTypeEnum", {}, (res) => { this.logMsg.CustomerId = this.CustomerId;
if (res.data.resultCode == 1) { this.apipost(
let data = res.data.data; "/api/Customer/GetLogPageByCustomerId",
this.GetFollowUpTypeEnumList = data; this.logMsg,
} (res) => {
}); if (res.data.resultCode == 1) {
}, let data = res.data.data;
CreateContactFollowUp() { if (t) {
this.FollowUpMsg.CustomerId = this.CustomerId; this.logList = this.logList.concat(data.pageData);
if (this.gjImgList.length) { } else {
this.gjImgList.map((x) => { this.logList = data.pageData;
this.FollowUpMsg.FollowUpImgList.push({ }
FileName: x.name, }
FileUrl: x.url, }
}); );
}); },
} GetFollowUpTypeEnum() {
if (this.fjList.length) { this.apipost("/api/Customer/GetFollowUpTypeEnum", {}, (res) => {
this.fjList.map((x) => {
this.FollowUpMsg.FollowUpFileList.push({
FileName: x.name,
FileUrl: x.url,
});
});
}
if (this.FollowUpMsg.BusinessId === "") {
this.FollowUpMsg.BusinessId = 0;
}
this.apipost(
"/api/Customer/CreateGuestContactFollowUp",
this.FollowUpMsg,
(res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.$message.success(res.data.message); let data = res.data.data;
this.fjList = []; this.GetFollowUpTypeEnumList = data;
this.gjImgList = [];
this.FollowUpMsg = {
ID: 0,
CustomerId: "",
ContactId: 0,
ContactName: "",
BusinessId: "",
BusinessName: "",
FollowUpType: "",
FollowUpImgList: [],
FollowUpFileList: [],
NextContactDate: "",
ContactContent: "",
};
this.logMsg.pageIndex = 1;
this.GetLogPageList();
} }
});
},
CreateContactFollowUp() {
this.FollowUpMsg.CustomerId = this.CustomerId;
if (this.gjImgList.length) {
this.gjImgList.map((x) => {
this.FollowUpMsg.FollowUpImgList.push({
FileName: x.name,
FileUrl: x.url,
});
});
} }
); if (this.fjList.length) {
}, this.fjList.map((x) => {
addContactsOk() { this.FollowUpMsg.FollowUpFileList.push({
this.GetContactByCustomerID(); FileName: x.name,
}, FileUrl: x.url,
deleteBusiness() { });
this.$confirm("是否删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.FollowUpMsg.BusinessName = "";
this.FollowUpMsg.BusinessId = "";
this.$message.success("操作成功");
})
.catch(() => {
this.$message({
type: "info",
message: "已取消",
}); });
}); }
}, if (this.FollowUpMsg.BusinessId === "") {
//删除附件 this.FollowUpMsg.BusinessId = 0;
deleteFile(index) { }
let str = index === -1 ? "是否全部删除?" : "是否删除"; this.apipost(
this.$confirm(str, "提示", { "/api/Customer/CreateGuestContactFollowUp",
confirmButtonText: "确定", this.FollowUpMsg,
cancelButtonText: "取消", (res) => {
type: "warning", if (res.data.resultCode == 1) {
}) this.$message.success(res.data.message);
.then(() => { this.fjList = [];
if (index === -1) { this.gjImgList = [];
this.fjList = []; this.FollowUpMsg = {
} else { ID: 0,
this.fjList.splice(index, 1); CustomerId: "",
ContactId: 0,
ContactName: "",
BusinessId: "",
BusinessName: "",
FollowUpType: "",
FollowUpImgList: [],
FollowUpFileList: [],
NextContactDate: "",
ContactContent: "",
};
this.logMsg.pageIndex = 1;
this.GetLogPageList();
}
} }
this.$message.success("操作成功"); );
}) },
.catch(() => { addContactsOk() {
this.$message({ this.GetContactByCustomerID();
type: "info", },
message: "已取消", deleteBusiness() {
this.$confirm("是否删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.FollowUpMsg.BusinessName = "";
this.FollowUpMsg.BusinessId = "";
this.$message.success("操作成功");
})
.catch(() => {
this.$message({
type: "info",
message: "已取消",
});
}); });
}); },
}, //删除附件
// 上传附件 deleteFile(index) {
uploadImg2(file) { let str = index === -1 ? "是否全部删除?" : "是否删除";
console.log(file); this.$confirm(str, "提示", {
let newArr = []; confirmButtonText: "确定",
newArr.push(file.file); cancelButtonText: "取消",
let path = "/Upload/Temporary/"; type: "warning",
this.UploadSelfFileT(path, newArr, (x) => { })
let url = this.domainManager().ViittoFileUrl + x.data.FilePath; .then(() => {
this.fjList.push({ if (index === -1) {
name: file.file.name, this.fjList = [];
url: url, } else {
size: (file.file.size / 1024).toFixed(2) + "kb", this.fjList.splice(index, 1);
}); }
}); this.$message.success("操作成功");
}, })
//删除图片 .catch(() => {
deleteImg(index) { this.$message({
let str = index === -1 ? "是否全部删除?" : "是否删除"; type: "info",
this.$confirm(str, "提示", { message: "已取消",
confirmButtonText: "确定", });
cancelButtonText: "取消", });
type: "warning", },
}) // 上传附件
.then(() => { uploadImg2(file) {
if (index === -1) { console.log(file);
this.gjImgList = []; let newArr = [];
} else { newArr.push(file.file);
this.gjImgList.splice(index, 1); let path = "/Upload/Temporary/";
} this.UploadSelfFileT(path, newArr, (x) => {
this.$message.success("操作成功"); let url = this.domainManager().ViittoFileUrl + x.data.FilePath;
}) this.fjList.push({
.catch(() => { name: file.file.name,
this.$message({ url: url,
type: "info", size: (file.file.size / 1024).toFixed(2) + "kb",
message: "已取消",
}); });
}); });
}, },
//上传图片 //删除图片
uploadImg(file) { deleteImg(index) {
let newArr = []; let str = index === -1 ? "是否全部删除?" : "是否删除";
newArr.push(file.file); this.$confirm(str, "提示", {
let path = "/Upload/Temporary/"; confirmButtonText: "确定",
this.UploadSelfFileT(path, newArr, (x) => { cancelButtonText: "取消",
let url = this.domainManager().ViittoFileUrl + x.data.FilePath; type: "warning",
this.gjImgList.push({ })
name: file.file.name, .then(() => {
url: url, if (index === -1) {
size: (file.file.size / 1024).toFixed(2) + "kb", this.gjImgList = [];
} else {
this.gjImgList.splice(index, 1);
}
this.$message.success("操作成功");
})
.catch(() => {
this.$message({
type: "info",
message: "已取消",
});
});
},
//上传图片
uploadImg(file) {
let newArr = [];
newArr.push(file.file);
let path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, (x) => {
let url = this.domainManager().ViittoFileUrl + x.data.FilePath;
this.gjImgList.push({
name: file.file.name,
url: url,
size: (file.file.size / 1024).toFixed(2) + "kb",
});
}); });
}); },
}, ChangeType(param) {
ChangeType(param) { if (param.id === 3) {
if (param.id === 3) { this.addContactsShow = true;
this.addContactsShow = true; } else if (param.id < 3) {
} else if (param.id < 3) { this.type = param.id;
this.type = param.id; } else if (param.id === 4) {
} else if (param.id === 4) { this.addBusiness();
this.addBusiness(); }
} },
}, },
}, };
}; </script>
</script> \ No newline at end of file
...@@ -2,84 +2,78 @@ ...@@ -2,84 +2,78 @@
</style> </style>
<template> <template>
<div class="Business"> <div class="Business">
<div class="add-Enclosure"> <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> <el-button icon="el-icon-plus" class="crm-btn query-btn crm-btn-mini margin-right0" @click="addBusiness">新建商机
</div> </el-button>
<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>
<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>
<el-table-column
prop="CustomerName"
label="客户名称"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="BusinessStatusStr"
label="商机阶段"
show-overflow-tooltip>
</el-table-column>
</el-table>
</div> </div>
<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>
<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>
<el-table-column prop="CustomerName" label="客户名称" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="BusinessStatusStr" label="商机阶段" show-overflow-tooltip>
</el-table-column>
</el-table>
</div>
</template> </template>
<script> <script>
export default { export default {
props: ['ID', 'BusinessType'], props: {
data() { //直客数据信息
return { detailsData: {
dataList: [], type: Object,
loading: false default: null,
}; },
},watch:{ ID: {
type: Number,
}, default: 0,
mounted() { },
this.GetBusinessList()
},
methods: {
openDetails(scope){
console.log(scope.row.ID)
this.MsgBus.$emit('busnessDrawerShow', scope.row.ID, 1)
},
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(){ data() {
let $this= this return {
this.MsgBus.$emit('addBusinessBoxOpen', $this.ID, 0, true) dataList: [],
loading: false
};
}, },
guanlian(){ watch: {
}, },
jiechuguanlian(){ mounted() {
this.GetBusinessList()
}, },
methods: {
openDetails(scope) {
this.MsgBus.$emit('busnessDrawerShow', scope.row.ID, 1)
},
GetBusinessList() {
this.apipost('/api/Customer/GetBusinessList', {
CustomerId: this.ID,
CustomerType: 1
}, res => {
if (res.data.resultCode == 1) {
this.dataList = res.data.data
} else {
this.$message.error(res.data.message);
}
})
},
addBusiness() {
let $this = this
this.MsgBus.$emit('addBusinessBoxOpen', $this.ID, 0, true)
},
guanlian() {
},
jiechuguanlian() {
},
}
} }
}
</script> </script>
\ No newline at end of file
...@@ -82,8 +82,9 @@ ...@@ -82,8 +82,9 @@
<p>{{detailsData.SurName + detailsData.Name}}</p> <p>{{detailsData.SurName + detailsData.Name}}</p>
</div> </div>
<div class="right" v-if="!hiddenMenu"> <div class="right" v-if="!hiddenMenu">
{{detailsData.IsCreate}} IsRead {{detailsData.IsRead}};
<el-button class="crm-btn query-btn" @click="editCust">编辑</el-button> 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-dropdown @command="handleCommand" style="top: 1px;" v-if="detailsData.IsCreate==1">
<el-button class="crm-btn crm-btn-more easy-btn margin-right0"> <el-button class="crm-btn crm-btn-more easy-btn margin-right0">
<i class="iconfont icongengduo"></i> <i class="iconfont icongengduo"></i>
...@@ -105,27 +106,23 @@ ...@@ -105,27 +106,23 @@
<span class="info-lable">创建时间:</span><span>{{detailsData.CreateDate ? detailsData.CreateDate : ''}}</span> <span class="info-lable">创建时间:</span><span>{{detailsData.CreateDate ? detailsData.CreateDate : ''}}</span>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<div class="content"> <div class="content">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="活动" name="1"> <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>
<el-tab-pane label="详细资料" name="2"> <el-tab-pane label="详细资料" name="2">
<Details v-if="activeName === '2'" :detailsData="detailsData" /> <Details v-if="activeName === '2'" :detailsData="detailsData" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="团队" name="10"> <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>
<el-tab-pane label="商机" name="5"> <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>
<el-tab-pane label="订单" name="6"> <el-tab-pane label="订单" name="6">
<Agreement v-if="activeName === '6'" :ID="CustomerId" /> <Agreement v-if="activeName === '6'" :ID="CustomerId" :detailsData="detailsData" />
</el-tab-pane>
<el-tab-pane label="回款" name="7" v-if="false">
<!-- <MoneyBack /> -->
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="附件" name="8"> <el-tab-pane label="附件" name="8">
<Enclosure :ID='CustomerId' :type='1' :isGuest="true" v-if="activeName === '8'" /> <Enclosure :ID='CustomerId' :type='1' :isGuest="true" v-if="activeName === '8'" />
......
...@@ -530,6 +530,7 @@ ...@@ -530,6 +530,7 @@
$this.dialogTableVisible = false; $this.dialogTableVisible = false;
}); });
this.GetSceneEmployeeList(); this.GetSceneEmployeeList();
//保存场景
this.MsgBus.$on("sceneSave", function (msg) { this.MsgBus.$on("sceneSave", function (msg) {
$this.sceneList = [...msg]; $this.sceneList = [...msg];
$this.GetSceneEmployeeList(); $this.GetSceneEmployeeList();
...@@ -540,6 +541,7 @@ ...@@ -540,6 +541,7 @@
$this.msg.Data = obj; $this.msg.Data = obj;
$this.getList(); $this.getList();
}); });
//编辑场景
this.MsgBus.$on("editScene", function () { this.MsgBus.$on("editScene", function () {
$this.GetSceneEmployeeList(); $this.GetSceneEmployeeList();
}); });
......
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
</style> </style>
<template> <template>
<div class="addTeamman"> <div class="addTeamman">
<div class="addTeamman-ctrl"> <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 icon="el-icon-plus" class="crm-btn crm-btn-mini query-btn" @click="addTeammanShow=true">团队成员
v-if="IsRead === 0">团队成员</el-button> </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="bianji">编辑</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 easy-btn" @click="yichu">移除</el-button>
<el-button class="crm-btn query-btn crm-btn-mini org-btn margin-right0" @click="tuichu">退出团队</el-button> <el-button class="crm-btn query-btn crm-btn-mini org-btn margin-right0">退出团队</el-button>
</div> </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%"
@selection-change="handleSelectionChange" row-class-name="font-size-12"> @selection-change="handleSelectionChange" row-class-name="font-size-12">
...@@ -48,14 +48,15 @@ ...@@ -48,14 +48,15 @@
editGuestTeamPower editGuestTeamPower
}, },
props: { props: {
//直客客户信息
detailsData: {
type: Object,
default: null
},
GuestId: { GuestId: {
type: Number, type: Number,
default: 0 default: 0
}, },
IsRead: {
type: Number,
default: 0
}
}, },
data() { data() {
return { return {
......
<style> <style>
@import '../../assets/css/customerManage.css'; @import '../../assets/css/customerManage.css';
.el-table__fixed-body-wrapper table{ .el-table__fixed-body-wrapper table {
padding-bottom: 8px!important; padding-bottom: 8px !important;
} }
.el-table__fixed-body-wrapper{
overflow: auto; .el-table__fixed-body-wrapper {
} overflow: auto;
}
</style> </style>
<template> <template>
<div class="customerManage"> <div class="customerManage">
<div class="tools"> <div class="tools">
<h1>下次出行事件客户</h1> <h1>下次出行事件客户</h1>
<!-- <div style="width: 340px;"> <!-- <div style="width: 340px;">
<el-input placeholder="请输入直客名称/手机号" v-model="msg.GusetName" class="input-with-select"> <el-input placeholder="请输入直客名称/手机号" v-model="msg.GusetName" class="input-with-select">
<el-button slot="append" icon="el-icon-search" @click="getList"></el-button> <el-button slot="append" icon="el-icon-search" @click="getList"></el-button>
</el-input> </el-input>
</div> --> </div> -->
<div class="rightmenu"> <div class="rightmenu">
<!-- <el-button class="crm-btn query-btn" @click="getList">查询</el-button> --> <!-- <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"
<!-- <el-dropdown> @click="addSendMsg.isAll=true;addSendMsg.sendObj='所有客户',transferVisible=true">发送下次出行事件涵</el-button>
<!-- <el-dropdown>
<el-button class="crm-btn crm-btn-more easy-btn margin-right0"> <el-button class="crm-btn crm-btn-more easy-btn margin-right0">
<i class="iconfont icongengduo"></i> <i class="iconfont icongengduo"></i>
</el-button> </el-button>
...@@ -29,11 +31,11 @@ ...@@ -29,11 +31,11 @@
<el-dropdown-item><i class="iconfont icondaochu"></i> 导出</el-dropdown-item> <el-dropdown-item><i class="iconfont icondaochu"></i> 导出</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> --> </el-dropdown> -->
</div>
</div> </div>
</div> <div class="query-box" :style="{'padding-bottom': sceneList.length > 0 ? '0px' : '10px'}">
<div class="query-box" :style="{'padding-bottom': sceneList.length > 0 ? '0px' : '10px'}"> <el-row v-if="!multipleSelection.length" :gutter="30">
<el-row v-if="!multipleSelection.length" :gutter="30"> <!-- <el-col :span="4">
<!-- <el-col :span="4">
<span class="font-size-12" style="padding-right: 10px">场景</span> <span class="font-size-12" style="padding-right: 10px">场景</span>
<el-popover <el-popover
placement="bottom" placement="bottom"
...@@ -65,7 +67,7 @@ ...@@ -65,7 +67,7 @@
</el-select> </el-select>
</el-popover> </el-popover>
</el-col> --> </el-col> -->
<!-- <el-col :span="10"> <!-- <el-col :span="10">
<span class="font-size-12" style="padding-right: 10px">距离生日天数</span> <span class="font-size-12" style="padding-right: 10px">距离生日天数</span>
<el-select size="mini" v-model="t" placeholder="请选择" @change="changeBirthday"> <el-select size="mini" v-model="t" placeholder="请选择" @change="changeBirthday">
<el-option label="今日生日" value="0"></el-option> <el-option label="今日生日" value="0"></el-option>
...@@ -77,135 +79,70 @@ ...@@ -77,135 +79,70 @@
<el-option label="还有7天生日" value="6"></el-option> <el-option label="还有7天生日" value="6"></el-option>
</el-select> </el-select>
</el-col> --> </el-col> -->
<!-- <el-col :span="4"> <!-- <el-col :span="4">
<el-button icon="iconfont iconshaixuan" class="crm-btn query-btn crm-btn-mini margin-right0" @click="MsgBus.$emit('sceneBoxShow', 5)">高级筛选</el-button> <el-button icon="iconfont iconshaixuan" class="crm-btn query-btn crm-btn-mini margin-right0" @click="MsgBus.$emit('sceneBoxShow', 5)">高级筛选</el-button>
</el-col> --> </el-col> -->
</el-row> </el-row>
<div v-else class="flex-center"> <div v-else class="flex-center">
<p class="font-size-12">已选 <span class="font-color-link">{{multipleSelection.length}}</span></p> <p class="font-size-12">已选 <span class="font-color-link">{{multipleSelection.length}}</span></p>
<div class="selection-box"> <div class="selection-box">
<el-button @click="transferVisible=true"><i class="el-icon-present"></i>发送事件</el-button> <el-button @click="transferVisible=true"><i class="el-icon-present"></i>发送事件</el-button>
</div>
</div>
<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-else>{{item.str}}&nbsp;{{item.start}}-{{item.end}}</span>
<i class="el-icon-close icon" @click="deleteScene(index)"></i>
</li>
</ul>
</div> </div>
</div> </div>
<div class="scene-wrapper" v-if="sceneList.length > 0"> <div class="page-content">
<ul class="list"> <el-table v-if="loading" v-loading="true" :data="[]">
<li class="list-item" v-for="(item, index) in sceneList" :key="index"> <el-table-column v-for="(item, index) in queryType2" :key="index" :label="item.label">
<span v-if="item.formType !== 'datetime'">{{item.str}}&nbsp;{{item.regionStr}}{{item.nameFC ? item.nameFC : item.value}}</span> </el-table-column>
<span v-else>{{item.str}}&nbsp;{{item.start}}-{{item.end}}</span> </el-table>
<i class="el-icon-close icon" @click="deleteScene(index)"></i> <el-table v-if="!loading" ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%"
</li> :height="sceneList.length > 0 ? '600' : '660'" border row-class-name="font-size-12"
</ul> @selection-change="handleSelectionChange">
</div> <el-table-column fixed type="selection" width="40"></el-table-column>
</div> <el-table-column fixed prop="GuestName" label="客户名称" width="120" v-if="queryType[0].show"
<div class="page-content"> show-overflow-tooltip>
<el-table <template slot-scope="scope">
v-if="loading" <p @click="openDetails(scope)" class="font-color-link cp">{{scope.row.GuestName}}</p>
v-loading="true" </template>
:data="[]"> </el-table-column>
<el-table-column <el-table-column prop="BirthdayMonth" label="生日日期" width="120" v-if="queryType[1].show"
v-for="(item, index) in queryType2" :key="index" show-overflow-tooltip>
:label="item.label"> </el-table-column>
</el-table-column> <el-table-column prop="MobilePhone" label="手机号码" width="120" v-if="queryType[2].show"
</el-table> show-overflow-tooltip>
<el-table </el-table-column>
v-if="!loading" <el-table-column prop="Address" label="地址" v-if="queryType[3].show" show-overflow-tooltip>
ref="multipleTable" </el-table-column>
:data="tableData" <el-table-column prop="SexStr" label="性别" v-if="queryType[4].show" show-overflow-tooltip>
tooltip-effect="dark" </el-table-column>
style="width: 100%" <el-table-column prop="TripCount" label="参团次数" sortable v-if="queryType[5].show" show-overflow-tooltip>
:height="sceneList.length > 0 ? '600' : '660'" </el-table-column>
border <el-table-column prop="Old" label="年龄" sortable v-if="queryType[6].show" show-overflow-tooltip>
row-class-name="font-size-12" </el-table-column>
@selection-change="handleSelectionChange"> <el-table-column prop="PassportNo" label="护照号" sortable v-if="queryType[7].show" show-overflow-tooltip>
<el-table-column fixed type="selection" width="40"></el-table-column> </el-table-column>
<el-table-column <el-table-column prop="Duty" label="职业" sortable v-if="queryType[8].show" show-overflow-tooltip>
fixed </el-table-column>
prop="GuestName" <el-table-column prop="CustomerName" label="关联同行" sortable v-if="queryType[9].show"
label="客户名称" show-overflow-tooltip>
width="120" </el-table-column>
v-if="queryType[0].show" <el-table-column prop="ProductName" label="上次出行产品" sortable v-if="queryType[10].show" width="200"
show-overflow-tooltip> show-overflow-tooltip>
<template slot-scope="scope"> </el-table-column>
<p @click="openDetails(scope)" class="font-color-link cp">{{scope.row.GuestName}}</p> <el-table-column prop="UnitPrice" label="上次出行单价" sortable v-if="queryType[11].show"
</template> show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column <!-- <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"
show-overflow-tooltip>
</el-table-column>
<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>
<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>
<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>
<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"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="UnitPrice"
label="上次出行单价"
sortable
v-if="queryType[11].show"
show-overflow-tooltip>
</el-table-column>
<!-- <el-table-column
prop="IsCarefor" prop="IsCarefor"
fixed="right" fixed="right"
width="50" width="50"
...@@ -221,349 +158,326 @@ ...@@ -221,349 +158,326 @@
</p> </p>
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column <el-table-column width="40" fixed="right">
width="40" <template slot="header" slot-scope="scope">
fixed="right"> <el-popover placement="bottom" width="240">
<template slot="header" slot-scope="scope"> <mySelect :queryType="queryType" @listenTochildEvent="showMessageFromChild" />
<el-popover <i class="el-icon-s-operation cp" slot="reference"></i>
placement="bottom" </el-popover>
width="240"> </template>
<mySelect :queryType="queryType" @listenTochildEvent="showMessageFromChild"/> </el-table-column>
<i class="el-icon-s-operation cp" slot="reference"></i> </el-table>
</el-popover> </div>
</template> <div>
</el-table-column> <el-pagination class="Mypagination" background @current-change="handleCurrentChange"
</el-table> :page-sizes="[30, 60, 90, 100]" :page-size="msg.pageSize" layout="sizes, prev, pager, next"
</div> @size-change="handleSizeChange" :total="total">
<div> </el-pagination>
<el-pagination </div>
class="Mypagination" <el-drawer :with-header="false" size='70%' :visible.sync="drawer" direction="rtl" :before-close="handleClose">
background <customerInfoBox :CustomerId="CustomerId" :hiddenMenu="true" />
@current-change="handleCurrentChange" </el-drawer>
:page-sizes="[30, 60, 90, 100]" <!-- <div v-if="dialogTableVisible">
: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>
<!-- <div v-if="dialogTableVisible">
<customerDialogBox @getList="getList" :name="dialogTableVisibleName" :CustomerId="CustomerId"/> <customerDialogBox @getList="getList" :name="dialogTableVisibleName" :CustomerId="CustomerId"/>
</div> --> </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"
<div class="add-tit" slot="title"> custom-class="transfer-box add-box add-box2">
<p><span></span>发送下次出行事件涵</p> <div class="add-tit" slot="title">
<span icon="el-icon-close"></span> <p><span></span>发送下次出行事件涵</p>
</div> <span icon="el-icon-close"></span>
<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>
</el-form-item>
</div>
<div class="MyEditForm-item">
<el-form-item label="发送方式" class="label-pad-left">
<el-select v-model="addSendMsg.SendType" placeholder="请选择">
<el-option label='同业助手' value='2'></el-option>
<el-option label='短信' value='1'></el-option>
</el-select>
</el-form-item>
</div>
<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>
</el-form-item>
</div> </div>
<div class="MyEditForm-item"> <el-form :model="addSendMsg" ref="form" class="MyEditForm">
<el-form-item label="发送时间" class="label-pad-left"> <div class="MyEditForm-item">
<el-date-picker <el-form-item label="计划标题" class="label-pad-left">
type="datetime" <el-input v-model="addSendMsg.Tittle" placeholder="请输入计划标题,如果不填系统将自动生成"></el-input>
v-model="addSendMsg.SendTime" </el-form-item>
placeholder="选择日期时间"> </div>
</el-date-picker> <div class="MyEditForm-item">
</el-form-item> <el-form-item label="发送方式" class="label-pad-left">
<el-select v-model="addSendMsg.SendType" placeholder="请选择">
<el-option label='同业助手' value='2'></el-option>
<el-option label='短信' value='1'></el-option>
</el-select>
</el-form-item>
</div>
<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>
</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>
</el-form-item>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<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> </div>
</el-form> </el-dialog>
<div slot="footer" class="dialog-footer"> </div>
<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> </template>
<script> <script>
import mySelect from "../dialogModel/select"; import mySelect from "../dialogModel/select";
import customerInfoBox from "../guestManagement/customerInfoBox"; import customerInfoBox from "../guestManagement/customerInfoBox";
// import customerDialogBox from "./customerDialogBox"; // import customerDialogBox from "./customerDialogBox";
export default { export default {
components: { components: {
mySelect, mySelect,
customerInfoBox, customerInfoBox,
// customerDialogBox // customerDialogBox
},
data() {
return {
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: [
{
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,
mySelectCtrl: false,
drawer: false,
loading: true,
dialogTableVisible: false,
dialogTableVisibleName: '新建直客',
tableData: [],
multipleSelection: [],
EmployeeList: [],
value: '',
userInfo: {},
msg: {
GusetName: '',
pageIndex: 1,
pageSize: 30,
ContactNumber: '',
WhereType: -1,
OrderBy: '',
ID: 36
}, },
total: 0, data() {
sceneList: [], return {
SceneEmployeeList: [], queryType2: [{
sceneID: 36, label: '客户名称',
visible: false, show: true,
addSendMsg:{ }, {
Tittle:"", label: '生日日期',
Type: 6, show: true,
SendType: '2', }, {
Details: [], label: '手机号码',
SendTime: '', show: true,
isAll:false, }, {
} label: '地址',
}; show: true,
}, }, {
mounted() { label: '性别',
this.userInfo = this.getLocalStorage(); show: true,
console.log(this.queryType) }, {
this.getList() label: '参团次数',
//this.Employee() show: true,
let $this = this }, {
this.MsgBus.$on('closeCustomerDialogBox', function (){ label: '年龄',
$this.dialogTableVisible = false show: true,
}) }, {
this.GetSceneEmployeeList() label: '护照号',
this.MsgBus.$on('sceneSave', function (msg){ show: true,
$this.sceneList = [...msg] }, {
$this.GetSceneEmployeeList() label: '职业',
let obj = {} show: true,
msg.forEach(element => { }, {
obj[element.name] = element label: '关联同行',
}); show: true,
$this.msg.Data = obj }, {
$this.getList() label: '上次出行产品',
}) show: true,
this.MsgBus.$on('editScene', function (){ }, {
console.log(1) label: '上次出行单价',
$this.GetSceneEmployeeList() show: true,
}) }],
},beforeDestroy() { queryType: [{
this.MsgBus.$off('sceneSave'); label: '客户名称',
this.MsgBus.$off('editScene'); show: true,
}, }, {
methods: { label: '生日日期',
sendPresent(){ show: true,
}, {
}, label: '手机号码',
changeWhere(item){ show: true,
this.msg.ID = item.ID }, {
this.sceneID = item.ID label: '地址',
this.msg.Data = item.WhereData ? JSON.parse(item.WhereData) : {} show: true,
this.msg.WhereType = item.WhereType }, {
this.visible = false label: '性别',
this.getList() show: true,
}, }, {
GetSceneEmployeeList(){ label: '参团次数',
this.apipost('/api/Scene/GetSceneEmployeeList', {LableType: 5}, res=>{ show: true,
if (res.data.resultCode == 1) { }, {
this.SceneEmployeeList = res.data.data label: '年龄',
} show: true,
}) }, {
}, label: '护照号',
deleteScene(index){ show: true,
this.sceneList.splice(index, 1) }, {
let obj = {} label: '职业',
this.sceneList.forEach(element => { show: true,
obj[element.name] = element }, {
}); label: '关联同行',
this.msg.Data = obj show: true,
this.getList() }, {
}, label: '上次出行产品',
show: true,
// 转移 }, {
transfer(){ label: '上次出行单价',
this.apipost('/api/SellEvent/AddNextTripActivity', this.addSendMsg, res=>{ show: true,
if (res.data.resultCode == 1) { }],
this.multipleSelection = [] CustomerId: 0,
this.transferVisible = false CustomerIdStr: '',
this.$message.success(res.data.message); transferVisible: false,
this.getList() mySelectCtrl: false,
this.addSendMsg = { drawer: false,
Tittle:"", loading: true,
dialogTableVisible: false,
dialogTableVisibleName: '新建直客',
tableData: [],
multipleSelection: [],
EmployeeList: [],
value: '',
userInfo: {},
msg: {
GusetName: '',
pageIndex: 1,
pageSize: 30,
ContactNumber: '',
WhereType: -1,
OrderBy: '',
ID: 36
},
total: 0,
sceneList: [],
SceneEmployeeList: [],
sceneID: 36,
visible: false,
addSendMsg: {
Tittle: "",
Type: 6, Type: 6,
SendType: '2', SendType: '2',
Details: [], Details: [],
isAll:false, SendTime: '',
isAll: false,
} }
} };
}) },
}, mounted() {
showMessageFromChild(list){ this.userInfo = this.getLocalStorage();
this.mySelectCtrl=!this.mySelectCtrl
if (list) {
this.queryType = list
this.getList() this.getList()
} let $this = this
}, this.MsgBus.$on('closeCustomerDialogBox', function () {
editCust(){ $this.dialogTableVisible = false
this.dialogTableVisibleName = '修改直客' })
this.dialogTableVisible = true this.GetSceneEmployeeList()
}, this.MsgBus.$on('sceneSave', function (msg) {
openDetails(scope){ $this.sceneList = [...msg]
this.drawer = true $this.GetSceneEmployeeList()
this.CustomerId = scope.row.Id let obj = {}
this.CustomerName = scope.row.GuestName msg.forEach(element => {
}, obj[element.name] = element
handleSizeChange(val) { });
this.msg.pageSize = val $this.msg.Data = obj
this.getList(); $this.getList()
}, })
handleCurrentChange(val) { this.MsgBus.$on('editScene', function () {
this.msg.pageIndex = val; $this.GetSceneEmployeeList()
this.getList();
},
handleClose(done) {
done();
},
getList: function (){
this.tableData = []
this.loading = true
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;
this.loading = false;
}
})
},
handleSelectionChange(val) {
this.multipleSelection = val
this.addSendMsg.isAll=false
if(val && val.length>0){
let list = val.map(x=> {
return {
GuestName: x.GuestName,
GuestId: x.Id,
CustomerName: x.CustomerName,
CustomerId: x.CustomerId,
GuestPhone: x.MobilePhone,
SentId: x.CustomeMobile,
}
}) })
this.addSendMsg.Details = list },
this.addSendMsg.sendObj=val.length==1?val[0].GuestName:val[0].GuestName+"等"+val.length+"人" beforeDestroy() {
}else{ this.MsgBus.$off('sceneSave');
this.addSendMsg.sendObj="" this.MsgBus.$off('editScene');
},
methods: {
sendPresent() {
},
changeWhere(item) {
this.msg.ID = item.ID
this.sceneID = item.ID
this.msg.Data = item.WhereData ? JSON.parse(item.WhereData) : {}
this.msg.WhereType = item.WhereType
this.visible = false
this.getList()
},
GetSceneEmployeeList() {
this.apipost('/api/Scene/GetSceneEmployeeList', {
LableType: 5
}, res => {
if (res.data.resultCode == 1) {
this.SceneEmployeeList = res.data.data
}
})
},
deleteScene(index) {
this.sceneList.splice(index, 1)
let obj = {}
this.sceneList.forEach(element => {
obj[element.name] = element
});
this.msg.Data = obj
this.getList()
},
// 转移
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: "",
Type: 6,
SendType: '2',
Details: [],
isAll: false,
}
}
})
},
showMessageFromChild(list) {
this.mySelectCtrl = !this.mySelectCtrl
if (list) {
this.queryType = list
this.getList()
}
},
editCust() {
this.dialogTableVisibleName = '修改直客'
this.dialogTableVisible = true
},
openDetails(scope) {
this.drawer = true
this.CustomerId = scope.row.Id
this.CustomerName = scope.row.GuestName
},
handleSizeChange(val) {
this.msg.pageSize = val
this.getList();
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
handleClose(done) {
done();
},
getList: function () {
this.tableData = []
this.loading = true
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;
this.loading = false;
}
})
},
handleSelectionChange(val) {
this.multipleSelection = val
this.addSendMsg.isAll = false
if (val && val.length > 0) {
let list = val.map(x => {
return {
GuestName: x.GuestName,
GuestId: x.Id,
CustomerName: x.CustomerName,
CustomerId: x.CustomerId,
GuestPhone: x.MobilePhone,
SentId: x.CustomeMobile,
}
})
this.addSendMsg.Details = list
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
</script>
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