Commit cc810b68 authored by 黄媛媛's avatar 黄媛媛

update

parent 8dddb1d8
......@@ -324,6 +324,34 @@
text-indent: 25px;
}
.MyCustomerDetailbottomLayer{overflow: auto; position:absolute;height:200px;
z-index:50;bottom:0;left: 0;border-top:1px solid #d1d1d1;background-color:#FFFFFF;padding: 20px 20px 0;width: 100%;}
.MyCustomerDetailbottomLayer>p{border-left: 3px solid #E95252; text-indent: 15px; height: 14px; font-size: 14px; margin-bottom:20px; line-height: 14px; color: #000;}
.MyCustomerDetailbottomLayer .el-form-item__label{font-size: 12px!important;}
.MyCustomerDetailbottomLayer .avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
.MyCustomerDetailbottomLayer .avatar-uploader .el-upload:hover {
border-color: #409EFF;
}
.MyCustomerDetailbottomLayer .avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 148px;
height: 148px;
line-height: 148px;
text-align: center;
}
.MyCustomerDetailbottomLayer .avatar {
width: 148px;
height: 148px;
display: block;
}
</style>
<template>
......@@ -338,7 +366,7 @@
</li>
<li>
<button class="hollowFixedBtn" @click="getList()">{{$t('pub.searchBtn')}}</button>
<button class="normalBtn" @click="addShow=true;isOldPerson=false">{{$t('salesModule.addCustomer')}}</button>
<button class="normalBtn" @click="addShow=true;isOldPerson=false,addLayer1=false">{{$t('salesModule.addCustomer')}}</button>
<button class="normalBtn" @click="outerVisible=true">导入</button>
<button class="normalBtn" @click="getDownList">模板下载</button>
</li>
......@@ -378,7 +406,7 @@
<th>操作</th>
</tr>
<tr @click="goUrl(type,item.customerId)" v-for="(item,i) in dataList" :key="i">
<tr v-for="(item,i) in dataList" :key="i">
<td>{{item.contact}}</td>
<td>{{item.contactNumber}}</td>
<td>{{item.customerName}}</td>
......@@ -389,22 +417,29 @@
<p v-else>{{$t('salesModule.noYuefang')}}</p>
</td>
<td>
<div @click="goUrl(type,item.customerId,1)">
<p v-if="item.customerVisitList[1]">
{{item.customerVisitList[1].visitDateTime}}</p>
<p v-else>{{$t('pub.noMsg')}}</p>
<span style="cursor: pointer;text-decoration: underline;">{{item.customerVisitList[1].visitDateTime}}</span></p>
<p v-else>
<span style="cursor: pointer;text-decoration: underline;">{{$t('pub.noMsg')}}</span></p>
</div>
</td>
<td>{{item.visiteCount}}</td>
<td><span @click="goUrl(type,item.customerId,2)" style="cursor: pointer;text-decoration: underline;">{{item.visiteCount}}</span></td>
<td>{{item.cL_Balance}}</td>
<td>{{item.tradeTotal}}</td>
<td><span @click="goUrl(type,item.customerId,3)" style="cursor: pointer;text-decoration: underline;">{{item.tradeTotal}}</span></td>
<td>{{item.inquireCount}}</td>
<td>{{item.allianceName}}</td>
<td><span style="cursor: pointer;text-decoration: underline;" @click.stop="goUrC('CouponsList',item.customerAccountId)">{{item.couponNum}}</span></td>
<td>
<el-tooltip class="item" effect="dark" content="编辑" placement="top-start">
<el-button @click.stop="EditMsg(item)" style="padding:4px" type="primary" icon="iconfont icon-bianji" circle></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="账户管理" placement="top-start">
<el-button style="padding:4px" @click.stop="goUrlT('empBankAccount',item.customerId)" type="danger" icon="iconfont icon-guanliyuan" circle></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="详情" placement="top-start">
<el-button style="padding:4px" @click.stop="goUrC('CustomerAnalysis',item.customerId)" type="primary" icon="iconfont icon-icon-test6" circle></el-button>
<el-tooltip class="item" effect="dark" content="交易详情" placement="top-start">
<el-button style="padding:4px" @click.stop="goUrC('CustomerAnalysis',item.customerId)" type="success" icon="iconfont icon-icon-test6" circle></el-button>
</el-tooltip>
</td>
</tr>
......@@ -412,62 +447,6 @@
<td colspan="12" style="text-align:center">暂无数据</td>
</tr>
</table>
<!-- <ul class="clearfix">
<li v-for="(item,index) in dataList" @click="goUrl(type,item.customerId)">
<i class="iconDelete1 iconfont icon-kehuguanxi_kehu"
@click.stop="goUrlT('empBankAccount',item.customerId)"></i>
<i class="iconDelete iconfont icon-kehuguanxi_delete1" @click.stop="deleteCustomer(item)"></i>
<img src="../../assets/img/vip.png" style="left: 134px; top: 50px;" v-show="item.isMember==1&&type==2" />
<img src="../../assets/img/nopass.png" style="left: 152px; top:75px;" v-show="type==3" />
<div class="_head_info_box">
<img v-if='!item.icon' src="../../assets/img/litheader.png" />
<img v-if='item.icon' :onerror="defaultImg" :src='item.icon' />
<p>{{item.contact}}</p>
<p><i class="iconfont icon-img_dianhua"></i>{{item.contactNumber}}</p>
<p class="_addr">{{item.customerName}} <i class="iconfont icon-shimingrenzheng"
:class="{'_class_b': item.RealNameAuthentication===1}"></i>
<i class="iconfont icon-heimingdan" v-show="item.customerStatus===4"
:title="$t('salesModule.OntheBlackList')"></i>
</p>
</div>
<div class="_record" v-if="item.customerAccountId!=0">
<p class="_fist_n" v-if="item.customerVisitList.length>0">
{{$t('salesModule.Yuefang')}}{{item.customerVisitList[0].visitDateTime}}</p>
<p class="_fist_n" v-else>{{$t('salesModule.noYuefang')}}</p>
<p class="_other" v-if="item.customerVisitList[1]">
{{$t('salesModule.Visit')}}{{item.customerVisitList[1].visitDateTime}}</p>
<p class="_other" v-else>{{$t('salesModule.noVisit')}}</p>
<p class="_other">{{$t('salesModule.TotalVisit')}}{{item.visiteCount}}</p>
<p class="_fist_n">{{$t('salesModule.HappinessPassbook')}} <span> {{item.cL_Balance}}</span></p>
</div>
<div class="_record" v-else>
<p class="_fist_n" v-if="item.customerVisitList.length>0">
{{$t('salesModule.Yuefang')}}{{item.customerVisitList[0].visitDateTime}}</p>
<p class="_fist_n" v-else>{{$t('salesModule.noYuefang')}}</p>
<p class="_other_n" v-if="item.customerVisitList[1]">
{{$t('salesModule.Visit')}}{{item.customerVisitList[1].visitDateTime}}</p>
<p class="_other_n" v-else>{{$t('salesModule.noVisit')}}</p>
<p class="_fist_n">{{$t('salesModule.HappinessPassbook')}} <span> {{item.cL_Balance}}</span></p>
</div>
<div class="_bt">
<el-row :gutter="24">
<el-col :span="18">
<p>{{$t('salesModule.CumulativeTurnover')}} <span> {{item.tradeTotal}}</span></p>
<p>{{$t('salesModule.InquiryAndDemand')}} <span> {{item.inquireCount}}</span></p>
<p>{{$t('salesModule.belongUnion')}} <span> {{item.allianceName}}</span></p>
</el-col>
<el-col :span="6" style="text-align:right;padding:0">
<span class="xqBtn"
@click.stop="goUrC('CustomerAnalysis',item.customerId)">{{$t('fnc.xiangqing')}}</span>
</el-col>
</el-row>
</div>
</li>
<div class="clearfix"></div>
<p v-show="dataList.length==0" class="fz14 color333 alcenter">{{$t('system.content_noData')}}</p>
</ul> -->
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
layout="total,prev, pager, next, jumper" :page-size="this.msg.pageSize" :total="total">
</el-pagination>
......@@ -617,6 +596,115 @@
<div slot="tip" class="el-upload__tip">只能上传Excel文件</div>
</el-upload>
</el-dialog>
<div class="MyCustomerDetailbottomLayer ownScrollbarStyle" style="height:500px;" v-show="addLayer1">
<p>修改客户信息</p>
<p class="fz12 color333 fbold" style="border: none; padding-left: 3px;">可直接保存</p>
<el-form label-width="80px">
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="门店名称:">
<el-input class='w200' v-model='updateMsg.CustomerName'></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="联系人姓名">
<el-input class='w200' v-model='updateMsg.Contact'></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
</el-col>
</el-row>
<el-row :gutter="20" style='margin-top:13px;'>
<el-col :span="24">
<p class="fz12 color333 fbold" style="border: none; margin-bottom: 15px; padding-left: 20px;">需审核信息<span class="colorE95252 fz12 fwnormal">
(编辑门店地址后,客户将重新进入审核流程)
</span>
</p>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="区域:">
<el-select class='w200' filterable v-model='updateMsg.Province' @change='getCityNew'>
<el-option v-for='item in provinceList'
:label='item.Name'
:value='item.ID'
:key='item.ID'>
</el-option>
</el-select>
<el-select class='w200' filterable v-model='updateMsg.City' @change='getRegionNew'>
<el-option v-for='item in cityList'
:label='item.Name'
:value='item.ID'
:key='item.ID'>
</el-option>
</el-select>
<el-select class='w200' filterable v-model='updateMsg.District'>
<el-option v-for='item in regionList'
:label='item.Name'
:value='item.ID'
:key='item.ID'>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="详细地址:">
<el-input v-model='updateMsg.Address' ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="名片照片:">
<el-upload class="avatar-uploader"
action=""
:http-request="uploadImgNew"
accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false"
>
<img v-if="BusinessCardPhotosNew" :src="BusinessCardPhotosNew" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="门牌照片:">
<el-upload class="avatar-uploader"
action=""
:http-request="uploadImg1New"
accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false"
>
<img v-if="HousePhotosNew" :src="HousePhotosNew" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="营业执照:">
<el-upload class="avatar-uploader"
action=""
:http-request="uploadImg2New"
accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false"
>
<img v-if="ImagesNew" :src="ImagesNew" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<input type="button" class="normalBtn" value="保存" @click="saveUpdate()"/>
<input type="button" class="hollowFixedBtn" value="取消" @click="addLayer1=false"/>
</el-col>
</el-row>
</el-form>
</div>
</div>
</template>
......@@ -624,6 +712,7 @@
export default {
data() {
return {
addLayer1:false,
allowAdd: true,
defaultImg: 'this.src="' + require("../../assets/img/litheader.png") + '"',
BusinessCardPhotos: '',
......@@ -742,9 +831,173 @@
zw: [], //职务
khly: [], //客户来源
outerVisible: false,
updateMsg:{
CustomerName:'',
CustomerId:0,
Address:'',
Country:2,
Province:0,
Contact:'',
City:0,
District:0,
HousePhotos:[],
BusinessCardPhotos:[],
Images:[],
},
cityList:[],
regionList:[],
id:'',
ImagesNew:'',
BusinessCardPhotosNew:'',
HousePhotosNew:'',
}
},
methods: {
EditMsg(item){
this.addLayer1=true;
this.id=item.customerId;
this.getMyCustomerInfo();
},
saveUpdate(){
if(this.updateMsg.District=='')
{
this.updateMsg.District=0
}
if(this.BusinessCardPhotos)
{ this.updateMsg.BusinessCardPhotos=[]
this.updateMsg.BusinessCardPhotos.push(this.BusinessCardPhotos)
}
if(this.HousePhotos)
{ this.updateMsg.HousePhotos=[]
this.updateMsg.HousePhotos.push(this.HousePhotos)
}
if(this.Images)
{ this.updateMsg.Images=[]
this.updateMsg.Images.push(this.Images)
}
let sheng=''
let shi=''
let qu=''
if(this.updateMsg.District=='')
{
this.updateMsg.District=0
}
if(this.updateMsg.City=='')
{
this.updateMsg.City=0
}
this.provinceList.forEach(item=>{
if(this.updateMsg.Province==item.ID)
{
sheng=item.Name
}
})
this.cityList.forEach(item=>{
if(this.updateMsg.City==item.ID)
{
shi=item.Name
}
})
this.regionList.forEach(item=>{
if(this.updateMsg.District==item.ID)
{
qu=item.Name
}
})
let AreaName=sheng+shi+qu
this.updateMsg.Address=AreaName+','+this.updateMsg.Address
this.apipost('app_customer_UpdateCustomerAddress',this.updateMsg,res=>{
if(res.data.resultCode==1){
this.addLayer1=false;
this.$message.success(res.data.message)
this.getList()
this.addLayer1=false
}else{
this.$message.error(res.data.message)
}
},err=>{})
},
uploadImgNew(file) {
//上传
let newArr = [];
newArr.push(file.file);
let path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => {
this.BusinessCardPhotosNew= this.domainManager().ViittoFileUrl + x.data.FilePath
});
},
uploadImg1New(file) {
//上传
let newArr = [];
newArr.push(file.file);
let path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => {
this.HousePhotosNew= this.domainManager().ViittoFileUrl + x.data.FilePath
});
},
uploadImg2New(file) {
//上传
let newArr = [];
newArr.push(file.file);
let path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => {
this.ImagesNew= this.domainManager().ViittoFileUrl + x.data.FilePath
});
},
getMyCustomerInfo(){
this.apipost('app_GetMyCustomerInfo',{customerId:this.id},res=>{
if(res.data.resultCode==1){
let x=res.data.data;
// this.customerInfo=res.data.data
// if(this.customerInfo.address.indexOf(',')!=-1){
// this.customerInfo.address=this.customerInfo.address.split(',')[1]
// }else{
// this.customerInfo.address=this.customerInfo.address
// }
// this.contact=res.data.data.contact
this.updateMsg.CustomerName=x.customerName
this.updateMsg.Contact=x.ContactName
this.updateMsg.CustomerId=x.customerId
this.updateMsg.Address=x.address
this.updateMsg.Province=x.province
this.getCityNew()
this.updateMsg.City=x.city
this.getRegionNew()
this.updateMsg.District=x.district
if(x.businessCardPhotos&&x.businessCardPhotos.length>0)
{
this.BusinessCardPhotos=x.businessCardPhotos[0]
}
if(x.images&&x.images.length>0)
{
this.Images=x.images[0]
}
if(x.housePhotos&&x.housePhotos.length>0)
{
this.HousePhotos=x.housePhotos[0]
}
}else{}
},err=>{})
},
getCityNew(){
this.apipost('app_customer_GetChildList',{Id:this.updateMsg.Province,"level":2},res=>{
if(res.data.resultCode==1){
this.cityList=res.data.data;
// this.regionList=[]
// this.updateMsg.City=''
// this.updateMsg.District=''
}
},err=>{})
},
getRegionNew(){
this.apipost('app_customer_GetChildList',{Id:this.updateMsg.City,"level":3},res=>{
if(res.data.resultCode==1){
this.regionList=res.data.data
// this.updateMsg.District=''
}
},err=>{})
},
//导入
getImportFileUrl() {
let url =
......@@ -947,11 +1200,12 @@
}
}, err => {})
},
goUrl(type, id) {
goUrl(type, id,num) {
this.$router.push({
name: 'MyCustomerDetail',
query: {
"id": id
"id": id,
"num":num
}
})
},
......@@ -991,7 +1245,6 @@
this.total = res.data.data.count;
this.loading = false;
}
console.log("this.dataList",this.dataList)
}, err => {})
},
getCustomerBrandList() { // 获取品牌
......
......@@ -591,7 +591,10 @@
},
},
mounted(){
this.id=this.$route.query.id
this.id=this.$route.query.id;
if(this.$route.query.num){
this.type=Number(this.$route.query.num);
}
this.getCustomerBrandList()
this.getMyCustomerInfo()
this.getVisitList()
......
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