Commit 4cf0bb33 authored by 华国豪's avatar 华国豪 🙄

新增客户

parent 8ed6aef2
......@@ -28,10 +28,13 @@ export default {
<style>
@import './assets/global/font.css';
@import '//at.alicdn.com/t/font_1627123_1vlackz9u42.css';
@import '//at.alicdn.com/t/font_1627123_qxpux1x1ujg.css';
/* @import './assets/css/common.css'; */
@import './assets/css/init.css';
@import './assets/css/tablevoerride.css';
.el-table__fixed-body-wrapper .el-table__body{
padding-bottom:8px !important;
}
body,html{
padding: 0px;
margin: 0px;
......
......@@ -154,3 +154,10 @@ table { border-collapse:collapse; border-spacing:0; }
.font-size-12{
font-size: 12px;
}
/* flex */
.flex-center{
display: flex;
align-items: center;
}
\ No newline at end of file
......@@ -35,3 +35,6 @@
.el-table--border{
border-right: 1px solid #E6E6E6 !important;
}
.el-table__fixed-body-wrapper .el-table__body{
padding-bottom:8px !important;
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
.customerManage .tools{
display: flex;
justify-content: space-between;
padding-bottom: 25px;
padding-bottom: 20px;
border-bottom: 1px solid rgba(226,228,235,1);
align-items: center;
}
......@@ -29,7 +29,8 @@
padding-left: 5px;
}
.customerManage .query-box{
padding: 25px 0;
padding: 25px 10px;
background-color: white;
}
.customerManage .table-btn{
display: inline-block;
......@@ -98,6 +99,7 @@
background-color: rgba(248,250,251,1);
padding-top: 20px;
max-height: 600px;
overflow: auto;
}
.customerManage .add-box-btn.el-button{
border-radius: 0;
......@@ -152,7 +154,89 @@
display: inline-block;
margin-right: 10px;
}
.customerManage .selection-box{
display: flex;
align-items: center;
}
.customerManage .selection-box span{
font-size: 12px;
text-align: center;
}
.customerManage .selection-box .el-button {
color: #666;
background-color: #f6f8fa;
border-color: #f6f8fa;
font-size: 12px;
height: 28px;
border-radius: 14px;
padding: 5px 12px;
margin-left: 15px;
}
.customerManage .selection-box .el-button i{
margin-right: 5px;
}
.customerManage .selection-box .el-button:hover {
background: #2362fb;
border-color: #2362fb;
color: #fff;
}
.customerManage .up-img-box .uib-item{
margin-right: 30px;
width: 120px;
height: 120px;
background-color: white;
position: relative;
margin-bottom: 30px;
}
.customerManage .up-img-box .uib-item p{
position: absolute;
bottom: -30px;
font-size: 12px;
text-align: center;
width: 100%;
}
.customerManage .up-img-box .uib-item:hover .imgzhe-btn{
opacity: 1
}
.customerManage .imgzhe {
width: 100%;
height: 100%;
position: absolute;
top: 0;
}
.customerManage .imgzhe .imgzhe-btn{
background: rgba(0, 0, 0, 0.6);
width: 100%;
height: 100%;
text-align: center;
line-height: 120px;
position: absolute;
top: 0;
opacity: 1;
transition: all linear .5s
}
.customerManage .imgzhe .imgzhe-btn i{
font-size: 22px;
margin-right: 5px;
color: white;
cursor: pointer;
}
.customerManage .up-ctrl{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
.customerManage .up-ctrl>div{
width: 100%;
height: 100%;
text-align: center;
line-height: 140px;
}
.customerManage .el-dialog{
min-width: 760px;
}
</style>
<template>
<div class="customerManage">
......@@ -178,8 +262,17 @@
</div>
</div>
<div class="query-box">
<div v-if="!multipleSelection.length">
</div>
<div v-else class="flex-center">
<p class="font-size-12">已选 <span class="font-color-link">{{multipleSelection.length}}</span></p>
<div class="selection-box">
<el-button v-for="(item, index) in selectionList" :key="index" @click="item.myFun"><i :class="item.class"></i>{{item.name}}</el-button>
</div>
</div>
</div>
<div class="page-content">
<el-table
v-if="loading"
v-loading="true"
......@@ -199,7 +292,7 @@
border
row-class-name="font-size-12"
@selection-change="handleSelectionChange">
<el-table-column fixed type="selection" width="55"></el-table-column>
<el-table-column fixed type="selection" width="40"></el-table-column>
<el-table-column
fixed
prop="CustomerName"
......@@ -225,6 +318,7 @@
<el-table-column
prop="ContactNumber"
label="联系电话"
sortable
v-if="queryType[3].show"
show-overflow-tooltip>
</el-table-column>
......@@ -243,6 +337,7 @@
<el-table-column
prop="OrderCount"
label="交易订单数"
sortable
width="100"
v-if="queryType[6].show"
show-overflow-tooltip>
......@@ -250,24 +345,28 @@
<el-table-column
prop="OrderMoney"
label="交易金额"
sortable
v-if="queryType[7].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="CouponCount"
label="优惠券"
sortable
v-if="queryType[8].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="Client_Balance"
label="幸福存折"
sortable
v-if="queryType[9].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="CustomerLevelStr"
label="客户级别"
sortable
v-if="queryType[10].show"
show-overflow-tooltip>
</el-table-column>
......@@ -302,6 +401,7 @@
<el-table-column
prop="CustomerPublic"
label="距进入公海天数"
sortable
v-if="queryType[14].show"
width="120"
show-overflow-tooltip>
......@@ -316,18 +416,21 @@
<el-table-column
prop="Visit"
label="近期约访"
sortable
v-if="queryType[16].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="UpdateTime"
label="更新时间"
sortable
v-if="queryType[17].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="CreateTimestr"
label="创建时间"
sortable
v-if="queryType[18].show"
show-overflow-tooltip>
</el-table-column>
......@@ -353,38 +456,25 @@
<template slot="header" slot-scope="scope">
<el-popover
placement="bottom"
width="240"
:value="mySelectCtrl">
width="240">
<mySelect :queryType="queryType" @listenTochildEvent="showMessageFromChild"/>
<i class="el-icon-s-operation cp" @click="showMessageFromChild()" slot="reference"></i>
<i class="el-icon-s-operation cp" slot="reference"></i>
</el-popover>
</template>
</el-table-column>
<!-- <el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="提醒" placement="top">
<i class="table-btn blue iconfont icontishi"></i>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="联系客户" placement="top">
<i class="table-btn org iconfont icondianhua"></i>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="客户详情" placement="top">
<i class="table-btn green iconfont iconsuosou" @click="drawer = true"></i>
</el-tooltip>
</template>
</el-table-column> -->
</el-table>
</div>
<div>
<el-pagination
<!-- <el-pagination
class="Mypagination"
background
@current-change="handleCurrentChange"
:page-sizes="[15, 30, 60, 100]"
:page-sizes="[30, 60, 90, 100]"
:page-size="msg.pageSize"
layout="sizes, prev, pager, next"
@size-change="handleSizeChange"
:total="total">
</el-pagination>
</el-pagination> -->
</div>
<el-drawer
title="我是标题"
......@@ -408,13 +498,13 @@
</div>
</el-drawer>
<el-dialog :visible.sync="dialogTableVisible" custom-class="add-box">
<el-dialog :visible.sync="dialogTableVisible" :close-on-click-modal="false" custom-class="add-box">
<div class="add-tit" slot="title">
<p><span></span>新建客户</p>
<span icon="el-icon-close"></span>
</div>
<div class="form-box">
<el-form :model="form" class="MyEditForm" :rules="rules">
<el-form :model="form" ref="form" class="MyEditForm" :rules="rules">
<p class="form-box-tit"><span class="radius"></span> 基本信息</p>
<el-row :gutter="30">
<el-col :span="8">
......@@ -429,7 +519,7 @@
<el-form-item label="客户级别" prop="CustomerLevel">
<el-select v-model="form.CustomerLevel" placeholder="请选择客户级别">
<el-option
v-for="item in SourceEnum"
v-for="item in CustomerLevelEnum"
:key="item.ID"
:label="item.Name"
:value="item.ID">
......@@ -439,14 +529,14 @@
</div>
</el-col>
<el-col :span="8">
<div class="MyEditForm-item">
<el-form-item label="客户来源" prop="CustomerSourceType">
<el-select v-model="form.CustomerSourceType" placeholder="请选择客户来源">
<div class="MyEditForm-item label-pad-left">
<el-form-item label="所属品牌" prop="BrandIds">
<el-select v-model="form.BrandIds" placeholder="请选择所属品牌">
<el-option
v-for="item in SourceEnum"
:key="item.ID"
:label="item.Name"
:value="item.ID">
v-for="item in CustomerBrandList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
......@@ -470,10 +560,10 @@
</el-col>
<el-col :span="8">
<div class="MyEditForm-item">
<el-form-item label="客户来源" prop="CustomerSourceType">
<el-select v-model="form.CustomerSourceType" placeholder="请选择客户来源">
<el-form-item label="经营场所" prop="Premises">
<el-select v-model="form.Premises" placeholder="请选择客户来源">
<el-option
v-for="item in SourceEnum"
v-for="item in jycs"
:key="item.ID"
:label="item.Name"
:value="item.ID">
......@@ -486,8 +576,8 @@
<el-row :gutter="30">
<el-col :span="8">
<div class="MyEditForm-item">
<el-form-item label="经营场所" prop="Premises">
<el-select v-model="form.Premises" placeholder="请选择客户来源">
<el-form-item label="客户来源" prop="CustomerSourceType">
<el-select v-model="form.CustomerSourceType" placeholder="请选择客户来源">
<el-option
v-for="item in SourceEnum"
:key="item.ID"
......@@ -498,17 +588,10 @@
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="MyEditForm-item label-pad-left">
<el-form-item label="所属品牌">
<el-select v-model="form.BrandIds" placeholder="请选择所属品牌">
<el-option
v-for="item in SourceEnum"
:key="item.ID"
:label="item.Name"
:value="item.ID">
</el-option>
</el-select>
<el-col :span="16" v-if="form.CustomerSourceType === 6">
<div class="MyEditForm-item">
<el-form-item label="客户来源信息" prop="CustomerSource">
<el-input type="textarea" placeholder="请输入客户来源信息" v-model="form.CustomerSource"></el-input>
</el-form-item>
</div>
</el-col>
......@@ -527,9 +610,11 @@
<el-col :span="6">
<div class="MyEditForm-item label-pad-left">
<el-form-item label="国/省/市/区">
<el-select v-model="form.Country" placeholder="国家">
<el-select
@change="getProvinceList(form.Country,1)"
v-model="form.Country" placeholder="国家">
<el-option
v-for="item in SourceEnum"
v-for="item in countryList"
:key="item.ID"
:label="item.Name"
:value="item.ID">
......@@ -541,9 +626,11 @@
<el-col :span="6">
<div class="MyEditForm-item label-pad-left">
<el-form-item label="国/省/市/区">
<el-select v-model="form.Province" placeholder="省份">
<el-select
@change="getProvinceList(form.Province,2)"
v-model="form.Province" placeholder="省份">
<el-option
v-for="item in SourceEnum"
v-for="item in provinceList"
:key="item.ID"
:label="item.Name"
:value="item.ID">
......@@ -555,9 +642,11 @@
<el-col :span="6">
<div class="MyEditForm-item label-pad-left">
<el-form-item label="国/省/市/区">
<el-select v-model="form.City" placeholder="城市">
<el-select
@change="getProvinceList(form.City,3)"
v-model="form.City" placeholder="城市">
<el-option
v-for="item in SourceEnum"
v-for="item in cityList"
:key="item.ID"
:label="item.Name"
:value="item.ID">
......@@ -571,7 +660,7 @@
<el-form-item label="国/省/市/区">
<el-select v-model="form.District" placeholder="地区">
<el-option
v-for="item in SourceEnum"
v-for="item in district"
:key="item.ID"
:label="item.Name"
:value="item.ID">
......@@ -585,18 +674,75 @@
<el-col :span="24">
<div class="MyEditForm-item label-pad-left">
<el-form-item label="定位">
<el-input type="textarea" placeholder="请输入详情地址" v-model="form.Remark"></el-input>
<el-input type="textarea" placeholder="请输入详情地址" v-model="form.Address"></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<p class="form-box-tit"><span class="radius"></span> 上传图片</p>
<div class="up-img-box flex-center">
<div class="uib-item">
<template>
<div class="imgzhe" :style="{backgroundImage: 'url(' + form.Images + ')', backgroundSize:'100% 100%'}" v-if="form.Images.length">
<div class="imgzhe-btn">
<i @click.stop="showImg(1)" class="el-icon-search"></i>
<i @click="delImg(1)" class="el-icon-delete"></i>
</div>
</div>
<div v-else class="up-ctrl">
<el-upload :file-list="fileList" :limit="1" :http-request="uploadImg" :multiple="true"
accept="image/jpeg,image/gif,image/png,image/bmp" :show-file-list="false" action="">
<img src="../../assets/img/cust/upimg.png" alt="">
</el-upload>
</div>
</template>
<p>图片</p>
</div>
<div class="uib-item">
<template>
<div class="imgzhe" :style="{backgroundImage: 'url(' + form.BusinessCardPhotos + ')', backgroundSize:'100% 100%'}" v-if="form.BusinessCardPhotos.length">
<div class="imgzhe-btn">
<i @click.stop="showImg(2)" class="el-icon-search"></i>
<i @click="delImg(2)" class="el-icon-delete"></i>
</div>
</div>
<div v-else class="up-ctrl">
<el-upload :file-list="fileList" :limit="1" :http-request="uploadImg2" :multiple="true"
accept="image/jpeg,image/gif,image/png,image/bmp" :show-file-list="false" action="">
<img src="../../assets/img/cust/upimg.png" alt="">
</el-upload>
</div>
</template>
<p>名片照片</p>
</div>
<div class="uib-item">
<template>
<div class="imgzhe" :style="{backgroundImage: 'url(' + form.HousePhotos + ')', backgroundSize:'100% 100%'}" v-if="form.HousePhotos.length">
<div class="imgzhe-btn">
<i @click.stop="showImg(3)" class="el-icon-search"></i>
<i @click="delImg(3)" class="el-icon-delete"></i>
</div>
</div>
<div v-else class="up-ctrl">
<el-upload :file-list="fileList" :limit="1" :http-request="uploadImg3" :multiple="true"
accept="image/jpeg,image/gif,image/png,image/bmp" :show-file-list="false" action="">
<img src="../../assets/img/cust/upimg.png" alt="">
</el-upload>
</div>
</template>
<p>门牌照片</p>
</div>
</div>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" class="add-box-btn" @click="dialogFormVisible = false">确 定</el-button>
<el-button class="add-box-btn add-box-cancel" @click="dialogFormVisible = false">取 消</el-button>
<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>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</div>
</template>
<script>
......@@ -731,6 +877,9 @@ export default {
CustomerName: [
{ required: true, message: '请输入客户名称', trigger: 'blur' }
],
CustomerSource: [
{ required: true, message: '请输入客户来源信息', trigger: 'blur' }
],
CustomerLevel: [
{ required: true, message: '请选择客户级别', trigger: 'change' }
],
......@@ -745,14 +894,27 @@ export default {
],
Premises: [
{ required: true, message: '请选择经营场所', trigger: 'change'}
]
],
BrandIds: [
{ required: true, message: '请选择所属品牌', trigger: 'change'}
],
},
dialogVisible: false,
mySelectCtrl: false,
drawer: false,
loading: true,
dialogTableVisible: false,
tableData: [],
multipleSelection: [],
CustomerLevelEnum: [],
CustomerBrandList: [],
fileList: [],
countryList: "",
provinceList: "",
dialogImageUrl: '',
cityList: "",
district: "",
jycs: [],
value: '',
SourceEnum: [],
msg: {
......@@ -760,7 +922,7 @@ export default {
CustomerName: '',
Contact: '',
pageIndex: 1,
pageSize: 15,
pageSize: 30,
ContactNumber: '',
WhereType: -1,
OrderBy: ''
......@@ -775,7 +937,7 @@ export default {
Address: '',
Remark: '',
Premises: '',
CustomerStatus: '',
CustomerStatus: 0,
CustomerSourceType: '',
CustomerSource: '',
Country: '',
......@@ -783,26 +945,47 @@ export default {
City: '',
District: '',
BrandIds: '',
Images: '',
BusinessCardPhotos: '',
HousePhotos: ''
Images: [],
BusinessCardPhotos: [],
HousePhotos: [],
},
WhereTypeList: [
selectionList: [
{
id: -1,
name: '全部'
name: '转移',
class:'iconfont iconplus-transfer',
myFun: this.transfer
},{
name: '放入公海',
class:'iconfont icongonghaiguanli',
myFun: this.waters
},{
name: '更改成交状态',
class:'iconfont iconwancheng',
myFun: this.changeState
},{
name: '导出选中',
class:'iconfont icondaochu',
myFun: this.export
},{
id: 1,
name: '我负责的'
name: '删除',
class:'iconfont icondelete',
myFun: this.delete
},{
id: 2,
name: '下属的'
name: '锁定',
class:'iconfont iconsuoguan',
myFun: this.locking
},{
id: 3,
name: '我参与的'
name: '解锁',
class:'iconfont iconsuokai',
myFun: this.Unlock
},{
id: 4,
name: '我关注的'
name: '添加团队成员',
class:'iconfont icontianjia',
myFun: this.addCust
},{
name: '删除团队成员',
class:'iconfont iconjian',
myFun: this.delCust
},
]
};
......@@ -810,8 +993,141 @@ export default {
mounted() {
this.getList()
this.GetCustomerSourceEnum()
this.GetCustomerLevelEnum()
this.getJycs()
this.getCustomerBrandList()
this.getCountryList()
},
methods: {
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.form.Images.push(url);
});
},
uploadImg2(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.form.BusinessCardPhotos.push(url);
});
},
uploadImg3(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.form.HousePhotos.push(url);
});
},
showImg(i){
let url = ''
if (i === 1) {
url = this.form.Images[0]
} else if (i === 2) {
url = this.form.BusinessCardPhotos[0]
} else if (i === 3) {
url = this.form.HousePhotos[0]
}
this.dialogImageUrl = url;
this.dialogVisible = true;
},
delImg(i){
if (i === 1) {
this.form.Images = []
} else if (i === 2) {
this.form.BusinessCardPhotos = []
} else if (i === 3) {
this.form.HousePhotos = []
}
},
//锁定
locking(){
console.log('锁定')
},
//解锁
Unlock(){
console.log('解锁')
},
//添加团队成员
addCust(){
console.log('添加团队成员')
},
//删除团队成员
delCust(){
console.log('删除团队成员')
},
//删除
delete(){
console.log('删除')
},
//导出
export(){
console.log('导出')
},
// 更改状态
changeState(){
console.log('更改状态')
},
// 放入公海
waters(){
console.log('放入公海')
},
// 转移
transfer(){
console.log('转移')
},
//根据省份获取城市
getProvinceList(ID, type) {
let msg = {
Id: ID
};
if (type == 1) {
this.msg.Province = "";
this.msg.City = "";
this.msg.District = "";
} else if (type == 2) {
this.msg.City = "";
this.msg.District = "";
} else if (type == 3) {
this.msg.District = "";
}
if (this.msg.QCountry !== "") {
this.apipost2(
"dict_post_Destination_GetChildList",
msg,
res => {
if (type == 1) {
this.provinceList = res.data.data;
} else if (type == 2) {
this.cityList = res.data.data;
} else if (type == 3) {
this.district = res.data.data;
}
},
err => {}
);
}
},
//获取国家
getCountryList() {
this.apipost2(
"dict_post_Destination_GetCountry", {},
res => {
this.countryList = res.data.data;
},
err => {}
);
},
showMessageFromChild(list){
this.mySelectCtrl=!this.mySelectCtrl
if (list) {
......@@ -834,6 +1150,66 @@ export default {
handleClose(done) {
done();
},
addData(){
this.apipost('/api/Customer/CreateMyCustomer', this.form, res=>{
if (res.data.resultCode == 1) {
this.$message.success(res.data.message);
this.dialogTableVisible = false;
this.getList()
this.resetForm("form");
}
})
},
submitForm(addMsg) {
//提交创建、修改表单
this.$refs[addMsg].validate(valid => {
if (valid) {
this.addData();
} else {
return false;
}
});
},
resetForm(formName) { // 重置表单
this.form = {
CustomerId: 0,
CustomerName: '',
CustomerLevel: '',
Contact: '',
ContactNumber: '',
Address: '',
Remark: '',
Premises: '',
CustomerStatus: 0,
CustomerSourceType: '',
CustomerSource: '',
Country: '',
Province: '',
City: '',
District: '',
BrandIds: '',
Images: '',
BusinessCardPhotos: '',
HousePhotos: ''
}
this.$refs[formName].resetFields();
},
getCustomerBrandList() { // 获取品牌
this.apipost2('app_get_customer_brand', {}, res => {
if (res.data.resultCode == 1) {
this.CustomerBrandList = res.data.data;
} else {
this.$message.error(res.data.message)
}
}, err => {})
},
getJycs() {
this.apipost2('app_today_visit_GetCustomerPremisesEnum', {}, res => {
if (res.data.resultCode == 1) {
this.jycs = res.data.data
}
}, err => {})
},
getList: function (){
this.tableData = []
this.loading = true
......@@ -845,6 +1221,13 @@ export default {
}
})
},
GetCustomerLevelEnum(){
this.apipost('/api/Customer/GetCustomerLevelEnum', {}, res=>{
if (res.data.resultCode == 1) {
this.CustomerLevelEnum = res.data.data
}
})
},
GetCustomerSourceEnum(){
this.apipost('/api/Customer/GetCustomerSourceEnum', {}, res=>{
if (res.data.resultCode == 1) {
......
<style>
.customerManage .tools{
.customerManage2 .tools{
display: flex;
justify-content: space-between;
padding-bottom: 15px;
......@@ -9,39 +9,39 @@
left: 30px;
right: 30px;
}
.customerManage .tools h1{
.customerManage2 .tools h1{
font-weight: bold;
font-size: 18px;
font-family: perfectFont !important;
}
.customerManage .tools .rightmenu{
.customerManage2 .tools .rightmenu{
display: flex;
align-items: center;
}
.customerManage .tools .rightmenu .el-button{
.customerManage2 .tools .rightmenu .el-button{
border-radius: 0;
padding: 9px 30px;
margin-right: 20px;
}
.customerManage .tools .gaoji{
.customerManage2 .tools .gaoji{
font-size:12px;
font-weight:400;
color:rgba(13,36,129,1);
margin-right: 35px;
cursor: pointer;
}
.customerManage .tools .gaoji:hover{
.customerManage2 .tools .gaoji:hover{
color:rgba(13,36,129,.8);
}
.customerManage .tools .gaoji .iconfont{
.customerManage2 .tools .gaoji .iconfont{
font-size: 12px;
padding-left: 5px;
}
.customerManage .query-box{
.customerManage2 .query-box{
padding: 25px 0;
display: none;
}
.customerManage .table-btn{
.customerManage2 .table-btn{
display: inline-block;
width: 24px;
height: 24px;
......@@ -50,41 +50,41 @@
cursor: pointer;
margin-right: 10px;
}
.customerManage .table-btn.blue{
.customerManage2 .table-btn.blue{
color: rgba(13, 36, 129, 1);
background-color: rgba(13, 36, 129, .3);
}
.customerManage .table-btn.org{
.customerManage2 .table-btn.org{
color: #FFA475;
background-color: rgba(255, 164, 117, .3);
}
.customerManage .table-btn.green{
.customerManage2 .table-btn.green{
color: rgba(148, 184, 119, 1);
background-color: rgba(148, 184, 119, .3);
}
.customerManage .table-btn.blue:hover{
.customerManage2 .table-btn.blue:hover{
background-color: rgba(13, 36, 129, .5);
}
.customerManage .table-btn.org:hover{
.customerManage2 .table-btn.org:hover{
background-color: rgba(255, 164, 117, .5);
}
.customerManage .table-btn.green:hover{
.customerManage2 .table-btn.green:hover{
background-color: rgba(148, 184, 119, .5);
}
.customerManage .add-box .add-tit{
.customerManage2 .add-box .add-tit{
display: flex;
justify-content: space-between;
align-items: center;
height: 20px;
}
.customerManage .add-box .add-tit p{
.customerManage2 .add-box .add-tit p{
display: flex;
align-items: center;
font-weight: bold;
color:rgba(17,17,17,1);
font-size:14px;
}
.customerManage .add-box .add-tit p span{
.customerManage2 .add-box .add-tit p span{
display: inline-block;
width:6px;
height:6px;
......@@ -92,48 +92,48 @@
border-radius:50%;
margin-right: 10px;
}
.customerManage .add-box .el-dialog__header{
.customerManage2 .add-box .el-dialog__header{
padding: 15px 20px;
background:rgba(255,255,255,1);
}
.customerManage .add-box .dialog-footer{
.customerManage2 .add-box .dialog-footer{
text-align: center;
background-color: rgba(248,250,251,1);
padding-bottom: 20px;
}
.customerManage .add-box .el-dialog__footer{
.customerManage2 .add-box .el-dialog__footer{
padding: 0;
}
.customerManage .add-box .el-dialog__body{
.customerManage2 .add-box .el-dialog__body{
background-color: rgba(248,250,251,1);
padding-top: 20px;
}
.customerManage .add-box-btn.el-button{
.customerManage2 .add-box-btn.el-button{
border-radius: 0;
background-color: rgba(13, 36, 129, .8);
border-color: rgba(13, 36, 129, .8);
color: white;
padding: 12px 43px;
}
.customerManage .add-box-btn.el-button:hover{
.customerManage2 .add-box-btn.el-button:hover{
background-color: rgba(13, 36, 129, 1);
border-color: rgba(13, 36, 129, 1);
color: white;
}
.customerManage .add-box-btn.el-button.add-box-cancel{
.customerManage2 .add-box-btn.el-button.add-box-cancel{
color: rgba(13, 36, 129, .8);
background-color: white;
}
.customerManage .add-box-btn.el-button.add-box-cancel:hover{
.customerManage2 .add-box-btn.el-button.add-box-cancel:hover{
color: rgba(13, 36, 129, 1);
background-color: white;
}
.customerManage .form-box .form-box-tit{
.customerManage2 .form-box .form-box-tit{
display: flex;
align-items: center;
margin-bottom: 20px;
}
.customerManage .form-box .radius{
.customerManage2 .form-box .radius{
display: flex;
width:4px;
height:4px;
......@@ -141,7 +141,7 @@
border-radius:50%;
margin-right: 10px;
}
.customerManage .page-content{
.customerManage2 .page-content{
position: absolute;
bottom: 30px;
left: 30px;
......@@ -150,7 +150,7 @@
}
</style>
<template>
<div class="customerManage">
<div class="customerManage2">
<div class="tools">
<h1>客户管理</h1>
<div class="rightmenu">
......
<style>
.select-main{
font-size: 12px;
}
.select-main .select-box{
height: 300px;
overflow-y: auto;
}
.select-main .select-item{
display: flex;
align-items: center;
padding: 5px;
}
.select-main .select-item .el-switch{
margin-right: 10px;
}
.select-main .select-input{
margin-bottom: 5px;
}
.select-main .select-btn{
margin-top: 5px;
text-align: right;
}
.select-main .select-btn .crm-btn.crm-btn-mini{
margin-right: 0;
}
.select-main .el-switch__core{
width: 33px !important;
}
</style>
<template>
<div class="select-main">
<div class="select-input">
<el-input @input="queryItem" v-model="input" size="mini" placeholder="请输入内容"></el-input>
</div>
<ul class="select-box">
<li v-for="(item, index) in list" :key="index">
<div class="select-item" v-if="index!==0 && item.s">
<el-switch
size="mini"
v-model="item.show"
:active-value="true"
:inactive-value="false">
</el-switch>
<p>{{item.label}}</p>
</div>
</li>
</ul>
<div class="select-btn">
<el-button class="crm-btn crm-btn-mini query-btn" @click="changeSelectState()">保存</el-button>
<el-button class="crm-btn crm-btn-mini easy-btn" @click="changeSelectState('reset')">重置</el-button>
</div>
</div>
</template>
<script>
export default {
props:{
queryType:{
type:Array,
default:[]
}
},
data() {
return {
input: '',
list: [],
};
},watch:{
queryType: {//普通的watch监听
handler(val, oldVal){
this.init()
},
deep:true //true 深度监听
}
},
mounted() {
this.init()
},
methods: {
queryItem(text){
this.list.map(x=>{
if (x.label.indexOf(text)==-1) {
x.s = false
} else {
x.s = true
}
})
},
init(){
let $this = this
let list = JSON.parse(JSON.stringify($this.queryType))
list.forEach(el => {
el.s = true
});
$this.list = list
},
changeSelectState(type){
let i = 0;
this.list.map(x=>{
if (x.show) {
i++
}
})
if (i < 2) {
return this.$message.error('最少显示两列数据')
}
if (type) {
this.list.map(x=>{
x.show = true
})
}
this.$emit('listenTochildEvent', this.list);
}
}
}
</script>
\ No newline at end of file
......@@ -24,6 +24,7 @@ export default {
DomainUrl: domainUrl,
//常用提交数据URL
PostUrl: domainUrl,
PostUrl2: "http://testapi.oytour.com/api/common/post",
javaUrl: locationName.indexOf('testb2b') == -1 ? "http://efficient.oytour.com" : locationName.indexOf('testb2b.oytour.com') !== -1 ? "http://47.96.12.235:9001" : "http://192.168.2.215:9000",
ViittoFileUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('testb2b.oytour.com') !== -1 ? "http://staticfile.oytour.com" : 'http://192.168.2.214:8130',
UploadUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('testb2b.oytour.com') !== -1 ? "http://uploadfile.oytour.com" : "http://192.168.2.214:8130",
......@@ -154,6 +155,54 @@ export default {
window.open('http://' + URL, '_blank');
}
}
//HTTP提交数据
Vue.prototype.apipost2 = function (cmd, msg, successCall, faildCall, isOnline) {
if (msg == null || msg == "") {
msg = {}
}
var apiurl = this.domainManager().PostUrl2;
var timestamp = (new Date()).valueOf();
this.apiurl = apiurl;
if (!localStorage.userInfo && localStorage.userInfo != "" && this.$route.path.toLowerCase() != "/login") {
this.$router.push({
path: '/login'
})
}
var token = "";
var key = "";
if (this.getLocalStorage() != null) {
token = this.getLocalStorage().token;
key = this.getLocalStorage().SecretKey;
}
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
let tempLanguage=0;
var postData = {
"msg": msg,
"cmd": cmd,
"timestamp": timestamp,
"token": token,
"sign": md5Str,
"languageId":tempLanguage
}
this.$http.post(apiurl, postData, {
headers: {
'Content-Type': 'application/json',
'Referer-Viitto': this.$route.path
}
})
.then(res => {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
this.$router.push({
path: '/login'
});
} else if (res.resultCode == 10005) {
this.$router.go(-1);
} else {
successCall(res);
}
}, faildCall)
}
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
......
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