Commit 88df58e1 authored by zhengke's avatar zhengke

Merge branch 'master' of http://gitlab.oytour.com/huaguohao/crm

parents fad01280 c4a68a5a
......@@ -26,7 +26,7 @@ export default {
<style>
@import "./assets/css/tablevoerride.css";
@import "./assets/global/font.css";
@import "//at.alicdn.com/t/font_1627123_thgo3iypqwi.css";
@import "//at.alicdn.com/t/font_1627123_khj62ff3f6k.css";
@import url("//at.alicdn.com/t/font_1627123_grz80mbm3sv.css");
/* @import './assets/css/common.css'; */
@import "./assets/css/init.css";
......
<style>
@import '../../assets/css/customerManage.css';
.SelectedAccount_box{
display: flex;
flex-wrap: wrap;
}
.SelectedAccount{
margin: 5px;
}
.sub-header div.active{
color: #0D2481;
}
.sub-header div{
padding: 20px 15px;
}
.sub-header{
display: flex;
padding: 0 20px;
background-color: #fff;
}
/* .customerManage .tools{
padding-top: 20px;
} */
.vux-flexbox{
width: 100%;
text-align: left;
display: flex;
box-align: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.vux-flex-row {
box-direction: row;
box-orient: horizontal;
-webkit-box-orient: horizontal;
-ms-flex-direction: row;
flex-direction: row;
}
.el-table__fixed-body-wrapper table{
padding-bottom: 8px!important;
}
.scene-container {
position: relative;
width: 180px;
}
.scene-list{
max-height: 240px;
overflow-y: auto;
font-size: 12px;
margin-bottom: 10px;
}
.scene-list .scene-list-item{
color: #333;
padding: 10px 15px;
cursor: pointer;
background-color: #fff;
}
.scene-list .scene-list-item-select, .scene-list .scene-list-item::before {
background-color: #f7f8fa;
color: #2362fb;
}
.handle-interval{
border-top: 1px solid #efefef;
}
.handle-button{
padding: 6px 20px;
font-size: 12px;
cursor: pointer;
color: #2362fb;
}
.handle-button .handle-button-icon{
margin-right: 8px;
margin-top: 3px;
}
.handle-button .handle-button-name{
font-size: 12px;
}
.popover-class{
padding: 0 !important;
}
.select-no{
display: none;
}
.scene-wrapper{
min-height: 50px;
background: #fff;
border-top: 1px solid #e1e1e1;
font-size: 13px;
overflow-x: scroll;
color: #aaa;
margin-top: 20px;
}
.scene-wrapper .list, .scene-wrapper{
width: 100%;
display: flex;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start;
}
.scene-wrapper .list{
-ms-flex-negative: 0;
flex-shrink: 0;
}
.scene-wrapper .list .list-item{
height: 30px;
padding: 0 10px;
margin: 10px 15px 0 0;
border: 1px solid #e1e1e1;
border-radius: 3px;
-ms-flex-negative: 0;
flex-shrink: 0;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.scene-wrapper .list .list-item .icon{
margin-left: 20px;
cursor: pointer;
}
</style>
<template>
<div class="customerManage">
<div class="sub-header">
<div v-for="(item,index) in headerList" :key="index"
:class="selectTitle==item.id?'active':''"
@click="clickTitle(item)">{{item.title}}</div>
</div>
<div class="tools"></div>
<div class="page-content">
<el-table
v-loading="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-column
fixed
prop="CustomerName"
label="渠道"
width="120"
align="center"
show-overflow-tooltip>
<template slot-scope="scope">
<p class="cp">{{scope.row.Name}}</p>
</template>
</el-table-column>
<el-table-column
prop="IsAppLogin"
label="账号"
show-overflow-tooltip>
<template slot-scope="scope">
<div class="SelectedAccount_box">
<el-tag class="SelectedAccount"
v-for="(item,index) in scope.row.list"
:key="index" closable
@click="editAccount(item)"
@close="handleClose(item)">{{item.Name}}</el-tag>
</div>
</template>
</el-table-column>
<el-table-column
align="center"
prop="IsCarefor"
fixed="right"
width="100"
label="新建">
<template slot-scope="scope">
<el-button class="button-new-tag" size="small" @click="addAccount(scope.row)">+ 账号 </el-button>
</template>
</el-table-column>
</el-table>
</div>
<div>
</div>
<!-- 添加账号弹窗 -->
<div v-if="addCustomerShow">
<addCustomer :obj="newObj" @addCustomerOk="addCustomerOk"/>
</div>
</div>
</template>
<script>
import addCustomer from "../dialogModel/addCustomer";
export default {
components: {
addCustomer
},
data() {
return {
newObj:{},
list:[],
selectTitle:1,
headerList:[
{title:'客户来源',id:1}
],
visible: false,
CustomerId: 0,
CustomerIdStr: '',
addCustomerShow: false,
loading:false,
tableData:[],
sceneList:[]
};
},
mounted() {
this.getList()
let $this = this
this.MsgBus.$on('closeCustomerDialogBox', function (){
$this.dialogTableVisible = false
})
this.MsgBus.$on('closeaaddCustomer', function (){
$this.addCustomerShow = false
})
},beforeDestroy() {
this.MsgBus.$off('sceneSave');
this.MsgBus.$off('editScene');
},
methods: {
addCustomerOk(){
this.addCustomerShow = false
this.getList()
},
editAccount(row){
this.newObj = {
ID:row.ID,
SNO:row.SNO,
Name:row.Name,
title: '编辑账号'
}
setTimeout(()=>{
this.addCustomerShow = true
},100)
},
addAccount(row){
this.newObj = {
ID:row.ID,
title: '新建账号'
}
setTimeout(()=>{
this.addCustomerShow = true
},100)
},
clickTitle(item){
this.selectTitle = item.id
},
//删除
handleClose(row){
let tips = '确定将这条账号删除?'
tips = '是否把账号“'+ row.Name + '”删除?'
this.$confirm(tips, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apipost('/api/Customer/DelGuestSourceAccount', {
SAccountId: row.ID
}, res=>{
if (res.data.resultCode == 1) {
this.$message.success(res.data.message);
this.getList()
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
},
getList: function (){
this.tableData = []
this.loading = true
this.apipost('/api/Customer/GetCustomerSourceEnum', {}, res=>{
if (res.data.resultCode == 1) {
let data = res.data.data;
let addList = function(arr) {
arr.forEach(item => {
item.list = []
});
};
addList(data);
this.tableData = res.data.data;
this.loading = false;
this.getGetGuestSourceAccountList()
}
})
},
getGetGuestSourceAccountList(){
this.apipost('/api/Customer/GetGuestSourceAccountList', {}, res=>{
if (res.data.resultCode == 1) {
this.list = res.data.data
for(let i=0;i<this.tableData.length;i++){
for(let j=0;j<this.list.length;j++){
if(this.tableData[i].ID==this.list[j].SNO){
let obj = {
ID: this.list[j].ID,
Name: this.list[j].Name,
SNO: this.list[j].SNO,
UpdateBy: this.list[j].UpdateBy,
UpdateDate: this.list[j].UpdateDate,
}
this.tableData[i].list.push(obj)
}
}
}
}
})
},
}
};
</script>
<style>
.addCustomer .add-tit{
display: flex;
justify-content: space-between;
align-items: center;
height: 20px;
}
.addCustomer .add-tit p{
display: flex;
align-items: center;
font-weight: bold;
color:rgba(17,17,17,1);
font-size:14px;
}
.addCustomer .add-tit p span{
display: inline-block;
width:6px;
height:6px;
background:rgba(13,36,129,1);
border-radius:50%;
margin-right: 10px;
}
.addCustomer .el-dialog__header{
padding: 15px 20px;
background:rgba(255,255,255,1);
}
.addCustomer .dialog-footer{
text-align: center;
background-color: rgba(248,250,251,1);
padding-bottom: 20px;
}
.addCustomer .el-dialog__footer{
padding: 0;
}
.addCustomer .el-tag.el-tag--info{
background-color: rgba(0,0,0,0);
border-color: rgba(0,0,0,0);
display: inline-block;
white-space: nowrap;
overflow: hidden;
text-overflow:ellipsis;
}
</style>
<template>
<el-dialog @closed="closedDialog" :modal="false" :visible.sync="dialogTableVisible" width="450px" :close-on-click-modal="false" class="addCustomer">
<div class="add-tit" slot="title">
<p><span></span>{{obj.title}}</p>
<span icon="el-icon-close"></span>
</div>
<div class="form-box" >
<el-form :model="form" ref="form" class="MyEditForm">
<div class="MyEditForm-item">
<el-form-item label="账号" class="label-pad-left" prop="Name">
<el-input placeholder="请输入账号" v-model="form.Name" clearable></el-input>
</el-form-item>
</div>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" class="add-box-btn" @click="submitForm('form')">确 定</el-button>
<el-button class="add-box-btn add-box-cancel" @click="dialogTableVisible = false, resetForm('form')">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
props: {
obj:Object
},
data() {
return {
title:"",
dialogTableVisible: true,
TransferOther: [],
form: {
Name: '',
SNO: '',
ID: 0,
}
};
},
watch:{
},
mounted() {
if(this.obj.title=='新建账号'){
this.form.SNO = this.obj.ID
}else{
this.form = {
ID: this.obj.ID,
SNO: this.obj.SNO,
Name: this.obj.Name,
}
}
let $this = this
setTimeout(()=>{
$this.dialogTableVisible = true
},50)
},
methods: {
closedDialog(){
this.MsgBus.$emit('closeaaddCustomer')
},
addData(){
if (!this.form.Name) {
return this.$message.error('请输入账号')
}
this.apipost('/api/Customer/SetGuestSourceAccount', this.form, res=>{
if (res.data.resultCode == 1) {
this.resetForm("form");
this.dialogTableVisible = false;
this.$emit('addCustomerOk')
this.$message.success(res.data.message)
} else {
this.$message.error(res.data.message)
}
})
},
submitForm(addMsg) {
//提交创建、修改表单
this.$refs[addMsg].validate(valid => {
if (valid) {
this.addData();
} else {
return false;
}
});
},
resetForm(formName) { // 重置表单
this.form = {
Name: '',
SNO: '',
ID: '',
}
this.$refs[formName].resetFields();
},
}
}
</script>
\ No newline at end of file
......@@ -117,7 +117,7 @@
v-if="queryType[0].show"
show-overflow-tooltip>
<template slot-scope="scope">
<div style="width:100%;min-height:38px" class="cp" @click="openDetails(scope)">
<div style="width:100%;min-height:38px;line-height:38px;" class="cp" @click="openDetails(scope)">
<p class="font-color-link cp">{{scope.row.GusetName}}</p>
</div>
</template>
......
......@@ -15,6 +15,7 @@ import contractManagement from "./components/contractManagement/contractManageme
import guestManagement from "./components/guestManagement/guestManagement"
import customerApr from "./components/approval/customerApr"
import customerMap from "./components/customerManage/customerMap"
import customerConfiguration from "./components/customerManage/customerConfiguration"
Vue.use(Router);
export default new Router({
......@@ -417,6 +418,14 @@ export default new Router({
meta: {
title: "客户地图"
}
},
{
path: "/customerConfiguration",
name: "customerConfiguration",
component: customerConfiguration,
meta: {
title: "客户配置"
}
}
]
},
......
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