Commit 238438a2 authored by 黄奎's avatar 黄奎

页面修改

parent 0d1d85af
<style> <style>
.page_MyCustomer ._mc_addbox{height: 52px;width: 100%; margin-top: 20px;} .page_MyCustomer ._mc_addbox {
.page_MyCustomer ._mc_addbox>li{float: left; width: 116px; font-size: 14px; height: 52px; color: #666; text-align: center; line-height: 52px; background: #E9E9E9; cursor: pointer;} height: 52px;
.page_MyCustomer ._mc_addbox>li.active{background: #fff; color: #333;} width: 100%;
.page_MyCustomer ._mc_addbox .divActive{margin: -3px auto; width: 26px; height: 3px; background: #E95252;} margin-top: 20px;
.page_MyCustomer ._mc_edit{overflow: auto;display: none;position:absolute; }
z-index: 50; bottom:0;left: 0;border-top:3px solid #38425d;background-color:#f9f9f9; padding: 10px;width: 100%;min-width: 1146px;}
.page_MyCustomer .edHeightOne{display: block!important;height: 450px;} .page_MyCustomer ._mc_addbox>li {
.page_MyCustomer ._mc_list{overflow-x: auto; background: #fff; padding-top: 20px; padding-left: 15px;} float: left;
.page_MyCustomer ._mc_list>ul>li{padding: 20px 20px 0 20px;width: 260px;box-sizing: border-box; height:410px; width: 116px;
float: left;border: 1px solid #F1F2F5;background: #fff; margin-right:10px;margin-bottom: 20px; border-radius: 10px; position: relative; cursor: pointer;} font-size: 14px;
.page_MyCustomer ._mc_list>ul>li:hover{box-shadow:0px 0px 10px rgba(191,191,191,1);transition: all linear 0.3s;} height: 52px;
.page_MyCustomer ._mc_list>ul>li .iconDelete{cursor: pointer; display: none; position: absolute; top: -4px; right: 0; color: #E95252; z-index: 5; } color: #666;
.page_MyCustomer ._mc_list>ul>li:hover .iconDelete{display: block;} text-align: center;
.page_MyCustomer ._mc_list>ul>li .iconDelete1{cursor: pointer; display: none; position: absolute; top: -4px; right:16px; color: #2CA4F0; z-index: 5; } line-height: 52px;
.page_MyCustomer ._mc_list>ul>li:hover .iconDelete1{display: block;} background: #E9E9E9;
.page_MyCustomer ._mc_list>ul>li .iconDelete2{cursor: pointer; display: none; position: absolute; top: -4px; right:32px; color: #34BFA3; z-index: 5; } cursor: pointer;
.page_MyCustomer ._mc_list>ul>li:hover .iconDelete2{display: block;} }
.page_MyCustomer ._mc_list>ul>li>img{position: absolute; z-index: 5;}
.page_MyCustomer ._head_info_box{text-align: center;font-size: 14px;color: #333333} .page_MyCustomer ._mc_addbox>li.active {
.page_MyCustomer ._head_info_box img{height: 48px;width: 48px;border-radius: 50%;margin-bottom: 5px} background: #fff;
.page_MyCustomer ._head_info_box p{margin-bottom: 8px;} color: #333;
.page_MyCustomer ._head_info_box .icon-img_dianhua{color: #09D49D} }
.page_MyCustomer ._addr{color: #666666}
.page_MyCustomer ._record{padding: 5px 10px 15px;border-bottom: 1px solid #F5F5F5;min-height: 120px} .page_MyCustomer ._mc_addbox .divActive {
.page_MyCustomer ._record p{margin-bottom: 10px;text-align: center;font-size: 14px;border-radius: 4px;padding: 2px;color: white;background-color: #257BF1;} margin: -3px auto;
.page_MyCustomer ._record p._other_n{color: #666666;background-color: #F5F5F5;} width: 26px;
.page_MyCustomer ._record p._fist_n{color: #09D49D;background-color: #E9F7F1;} height: 3px;
.page_MyCustomer ._record p._other{color: #257BF1;background-color: #E4EFFF;} background: #E95252;
.page_MyCustomer ._bt{font-size: 14px;margin-top: 15px;text-align: center; color: #666;} }
.page_MyCustomer ._bt span{color: #FF9000}
.page_MyCustomer ._edHeight{height:340px;} .page_MyCustomer ._mc_edit {
.page_MyCustomer ._scrollbar::-webkit-scrollbar{width: 4px;height: 8px;} overflow: auto;
.page_MyCustomer ._scrollbar::-webkit-scrollbar-thumb{border-radius: 4px;-webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);background: #c9c9c9;} display: none;
.page_MyCustomer ._scrollbar::-webkit-scrollbar-track{-webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);border-radius: 4px;background: #EDEDED;} position: absolute;
.page_MyCustomer ._mc_edit ._tit{padding-left: 10px;border-left: 3px solid #E95252; font-size: 16px; font-family: 'PingFangSc-Fine'; color: #000000} z-index: 50;
.page_MyCustomer ._mc_edit ._info_box ul._form li{float: left;} bottom: 0;
.page_MyCustomer ._check_list{padding-left: 120px;margin-bottom: 20px;} left: 0;
.page_MyCustomer ._check_box .el-form-item{margin-bottom: 0} border-top: 3px solid #38425d;
.page_MyCustomer ._info_box .el-form-item__label{font-size: 12px; color: #666;} background-color: #f9f9f9;
._remark textarea{resize: none;width: 646px;height: 100px} padding: 10px;
width: 100%;
min-width: 1146px;
}
.page_MyCustomer .edHeightOne {
display: block !important;
height: 450px;
}
.page_MyCustomer ._mc_list {
overflow-x: auto;
background: #fff;
padding-top: 20px;
padding-left: 15px;
}
.page_MyCustomer ._mc_list>ul>li {
padding: 20px 20px 0 20px;
width: 260px;
box-sizing: border-box;
height: 410px;
float: left;
border: 1px solid #F1F2F5;
background: #fff;
margin-right: 10px;
margin-bottom: 20px;
border-radius: 10px;
position: relative;
cursor: pointer;
}
.page_MyCustomer ._mc_list>ul>li:hover {
box-shadow: 0px 0px 10px rgba(191, 191, 191, 1);
transition: all linear 0.3s;
}
.page_MyCustomer ._mc_list>ul>li .iconDelete {
cursor: pointer;
display: none;
position: absolute;
top: -4px;
right: 0;
color: #E95252;
z-index: 5;
}
.page_MyCustomer ._mc_list>ul>li:hover .iconDelete {
display: block;
}
.page_MyCustomer ._mc_list>ul>li .iconDelete1 {
cursor: pointer;
display: none;
position: absolute;
top: -4px;
right: 16px;
color: #2CA4F0;
z-index: 5;
}
.page_MyCustomer ._mc_list>ul>li:hover .iconDelete1 {
display: block;
}
.page_MyCustomer ._mc_list>ul>li .iconDelete2 {
cursor: pointer;
display: none;
position: absolute;
top: -4px;
right: 32px;
color: #34BFA3;
z-index: 5;
}
.page_MyCustomer ._mc_list>ul>li:hover .iconDelete2 {
display: block;
}
.page_MyCustomer ._mc_list>ul>li>img {
position: absolute;
z-index: 5;
}
.page_MyCustomer ._head_info_box {
text-align: center;
font-size: 14px;
color: #333333
}
.page_MyCustomer ._head_info_box img {
height: 48px;
width: 48px;
border-radius: 50%;
margin-bottom: 5px
}
.page_MyCustomer ._head_info_box p {
margin-bottom: 8px;
}
.page_MyCustomer ._head_info_box .icon-img_dianhua {
color: #09D49D
}
.page_MyCustomer ._addr {
color: #666666
}
.page_MyCustomer ._record {
padding: 5px 10px 15px;
border-bottom: 1px solid #F5F5F5;
min-height: 120px
}
.page_MyCustomer ._record p {
margin-bottom: 10px;
text-align: center;
font-size: 14px;
border-radius: 4px;
padding: 2px;
color: white;
background-color: #257BF1;
}
.page_MyCustomer ._record p._other_n {
color: #666666;
background-color: #F5F5F5;
}
.page_MyCustomer ._record p._fist_n {
color: #09D49D;
background-color: #E9F7F1;
}
.page_MyCustomer ._record p._other {
color: #257BF1;
background-color: #E4EFFF;
}
.page_MyCustomer ._bt {
font-size: 14px;
margin-top: 15px;
text-align: center;
color: #666;
}
.page_MyCustomer ._bt span {
color: #FF9000
}
.page_MyCustomer ._edHeight {
height: 340px;
}
.page_MyCustomer ._scrollbar::-webkit-scrollbar {
width: 4px;
height: 8px;
}
.page_MyCustomer ._scrollbar::-webkit-scrollbar-thumb {
border-radius: 4px;
-webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
background: #c9c9c9;
}
.page_MyCustomer ._scrollbar::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
border-radius: 4px;
background: #EDEDED;
}
.page_MyCustomer ._mc_edit ._tit {
padding-left: 10px;
border-left: 3px solid #E95252;
font-size: 16px;
font-family: 'PingFangSc-Fine';
color: #000000
}
.page_MyCustomer ._mc_edit ._info_box ul._form li {
float: left;
}
.page_MyCustomer ._check_list {
padding-left: 120px;
margin-bottom: 20px;
}
.page_MyCustomer ._check_box .el-form-item {
margin-bottom: 0
}
.page_MyCustomer ._info_box .el-form-item__label {
font-size: 12px;
color: #666;
}
._remark textarea {
resize: none;
width: 646px;
height: 100px
}
.page_MyCustomer .avatar-uploader .el-upload { .page_MyCustomer .avatar-uploader .el-upload {
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;
border-radius: 6px; border-radius: 6px;
...@@ -46,9 +249,11 @@ ...@@ -46,9 +249,11 @@
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
.page_MyCustomer .avatar-uploader .el-upload:hover { .page_MyCustomer .avatar-uploader .el-upload:hover {
border-color: #409EFF; border-color: #409EFF;
} }
.page_MyCustomer .avatar-uploader-icon { .page_MyCustomer .avatar-uploader-icon {
font-size: 28px; font-size: 28px;
color: #8c939d; color: #8c939d;
...@@ -57,22 +262,50 @@ ...@@ -57,22 +262,50 @@
line-height: 148px; line-height: 148px;
text-align: center; text-align: center;
} }
.page_MyCustomer .avatar { .page_MyCustomer .avatar {
width: 148px; width: 148px;
height: 148px; height: 148px;
display: block; display: block;
} }
.page_MyCustomerSearch{width: 100%; min-height: auto; overflow: hidden; padding:0 0 20px 0;}
.page_MyCustomerSearch li{float: left; font-size: 12px; color: #666; margin:20px 0 0px 0;} .page_MyCustomerSearch {
.page_MyCustomerSearch li>span {display: inline-block; } width: 100%;
.page_MyCustomerSearch li span>em{display: inline-block; min-width: 60px; text-align: right; font-style: normal; margin:0 12px 0 0;} min-height: auto;
.page_MyCustomerSearch li:last-child{float: right;} overflow: hidden;
.page_MyCustomerSearch ._class_b{ padding: 0 0 20px 0;
}
.page_MyCustomerSearch li {
float: left;
font-size: 12px;
color: #666;
margin: 20px 0 0px 0;
}
.page_MyCustomerSearch li>span {
display: inline-block;
}
.page_MyCustomerSearch li span>em {
display: inline-block;
min-width: 60px;
text-align: right;
font-style: normal;
margin: 0 12px 0 0;
}
.page_MyCustomerSearch li:last-child {
float: right;
}
.page_MyCustomerSearch ._class_b {
color: #257BF1 !important color: #257BF1 !important
} }
.xqBtn{
.xqBtn {
background: #09D49D; background: #09D49D;
color:#fff!important; color: #fff !important;
width: 100%; width: 100%;
display: inline-block; display: inline-block;
border-radius: 4px; border-radius: 4px;
...@@ -80,17 +313,21 @@ ...@@ -80,17 +313,21 @@
height: 38px; height: 38px;
line-height: 38px; line-height: 38px;
text-align: center; text-align: center;
} }
.page_MyCustomer .upload-demo{
.page_MyCustomer .upload-demo {
text-align: center; text-align: center;
} }
</style> </style>
<template> <template>
<div class="page_MyCustomer"> <div class="page_MyCustomer">
<div class="page_MyCustomerSearch"> <div class="page_MyCustomerSearch">
<li> <li>
<span> <span>
<em>{{$t('salesModule.keyWords')}}</em><el-input class='w220' v-model='msg.CustomerName' @keyup.enter.native="getList()" :placeholder="$t('salesModule.enterPhone')" ></el-input> <em>{{$t('salesModule.keyWords')}}</em>
<el-input class='w220' v-model='msg.CustomerName' @keyup.enter.native="getList()"
:placeholder="$t('salesModule.enterPhone')"></el-input>
</span> </span>
</li> </li>
<li> <li>
...@@ -122,31 +359,38 @@ ...@@ -122,31 +359,38 @@
<ul class="clearfix"> <ul class="clearfix">
<li v-for="(item,index) in dataList" @click="goUrl(type,item.customerId)"> <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="iconDelete1 iconfont icon-kehuguanxi_kehu"
@click.stop="goUrlT('empBankAccount',item.customerId)"></i>
<i class="iconDelete iconfont icon-kehuguanxi_delete1" @click.stop="deleteCustomer(item)"></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/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"/> <img src="../../assets/img/nopass.png" style="left: 152px; top:75px;" v-show="type==3" />
<div class="_head_info_box"> <div class="_head_info_box">
<img v-if='!item.icon' src="../../assets/img/litheader.png"/> <img v-if='!item.icon' src="../../assets/img/litheader.png" />
<img v-if='item.icon' :onerror="defaultImg" :src='item.icon'/> <img v-if='item.icon' :onerror="defaultImg" :src='item.icon' />
<p>{{item.contact}}</p> <p>{{item.contact}}</p>
<p><i class="iconfont icon-img_dianhua"></i>{{item.contactNumber}}</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> <p class="_addr">{{item.customerName}} <i class="iconfont icon-shimingrenzheng"
<i class="iconfont icon-heimingdan" v-show="item.customerStatus===4" :title="$t('salesModule.OntheBlackList')"></i> :class="{'_class_b': item.RealNameAuthentication===1}"></i>
<i class="iconfont icon-heimingdan" v-show="item.customerStatus===4"
:title="$t('salesModule.OntheBlackList')"></i>
</p> </p>
</div> </div>
<div class="_record" v-if="item.customerAccountId!=0"> <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-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="_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-if="item.customerVisitList[1]">
{{$t('salesModule.Visit')}}{{item.customerVisitList[1].visitDateTime}}</p>
<p class="_other" v-else>{{$t('salesModule.noVisit')}}</p> <p class="_other" v-else>{{$t('salesModule.noVisit')}}</p>
<p class="_other">{{$t('salesModule.TotalVisit')}}{{item.visiteCount}}</p> <p class="_other">{{$t('salesModule.TotalVisit')}}{{item.visiteCount}}</p>
<p class="_fist_n">{{$t('salesModule.HappinessPassbook')}} <span> {{item.cL_Balance}}</span></p> <p class="_fist_n">{{$t('salesModule.HappinessPassbook')}} <span> {{item.cL_Balance}}</span></p>
</div> </div>
<div class="_record" v-else> <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-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="_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-if="item.customerVisitList[1]">
{{$t('salesModule.Visit')}}{{item.customerVisitList[1].visitDateTime}}</p>
<p class="_other_n" v-else>{{$t('salesModule.noVisit')}}</p> <p class="_other_n" v-else>{{$t('salesModule.noVisit')}}</p>
<p class="_fist_n">{{$t('salesModule.HappinessPassbook')}} <span> {{item.cL_Balance}}</span></p> <p class="_fist_n">{{$t('salesModule.HappinessPassbook')}} <span> {{item.cL_Balance}}</span></p>
</div> </div>
...@@ -158,7 +402,8 @@ ...@@ -158,7 +402,8 @@
<p>{{$t('salesModule.belongUnion')}} <span> {{item.allianceName}}</span></p> <p>{{$t('salesModule.belongUnion')}} <span> {{item.allianceName}}</span></p>
</el-col> </el-col>
<el-col :span="6" style="text-align:right;padding:0"> <el-col :span="6" style="text-align:right;padding:0">
<span class="xqBtn" @click.stop="goUrC('CustomerAnalysis',item.customerId)">{{$t('fnc.xiangqing')}}</span> <span class="xqBtn"
@click.stop="goUrC('CustomerAnalysis',item.customerId)">{{$t('fnc.xiangqing')}}</span>
</el-col> </el-col>
</el-row> </el-row>
...@@ -167,13 +412,8 @@ ...@@ -167,13 +412,8 @@
<div class="clearfix"></div> <div class="clearfix"></div>
<p v-show="dataList.length==0" class="fz14 color333 alcenter">{{$t('system.content_noData')}}</p> <p v-show="dataList.length==0" class="fz14 color333 alcenter">{{$t('system.content_noData')}}</p>
</ul> </ul>
<el-pagination <el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
background layout="total,prev, pager, next, jumper" :page-size="this.msg.pageSize" :total="total">
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
layout="total,prev, pager, next, jumper"
:page-size="this.msg.pageSize"
:total="total">
</el-pagination> </el-pagination>
</div> </div>
<div class="_mc_edit _scrollbar" :class="addShow==true?'edHeightOne':''"> <div class="_mc_edit _scrollbar" :class="addShow==true?'edHeightOne':''">
...@@ -186,18 +426,21 @@ ...@@ -186,18 +426,21 @@
<el-form class="_info_box clearfix" :model="addMsg" :rules="rules" ref="addMsg" label-width="120px"> <el-form class="_info_box clearfix" :model="addMsg" :rules="rules" ref="addMsg" label-width="120px">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('restaurant.res_ContactNumber')" prop="contactNumber" > <el-form-item :label="$t('restaurant.res_ContactNumber')" prop="contactNumber">
<el-input :disabled="isOldPerson" v-model="addMsg.contactNumber" @input='searchHistory(addMsg.contactNumber)' :placeholder="$t('pub.pleaseImport')"></el-input> <el-input :disabled="isOldPerson" v-model="addMsg.contactNumber"
@input='searchHistory(addMsg.contactNumber)' :placeholder="$t('pub.pleaseImport')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('salesModule.storeName')" prop="customerName"> <el-form-item :label="$t('salesModule.storeName')" prop="customerName">
<el-input :disabled="isOldPerson" v-model="addMsg.customerName" :placeholder="$t('pub.pleaseImport')" maxlength="20"></el-input> <el-input :disabled="isOldPerson" v-model="addMsg.customerName" :placeholder="$t('pub.pleaseImport')"
maxlength="20"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('hotel.suplier_contact')" prop="contact"> <el-form-item :label="$t('hotel.suplier_contact')" prop="contact">
<el-input :disabled="isOldPerson" v-model="addMsg.contact" :placeholder="$t('pub.pleaseImport')" maxlength="20"></el-input> <el-input :disabled="isOldPerson" v-model="addMsg.contact" :placeholder="$t('pub.pleaseImport')"
maxlength="20"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
...@@ -207,42 +450,31 @@ ...@@ -207,42 +450,31 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('pub.area')"> <el-form-item :label="$t('pub.area')">
<el-select filterable v-model='addMsg.Province' @change='getCity'> <el-select filterable v-model='addMsg.Province' @change='getCity'>
<el-option v-for='item in provinceList' <el-option v-for='item in provinceList' :label='item.Name' :value='item.ID' :key='item.ID'>
:label='item.Name'
:value='item.ID'
:key='item.ID'>
</el-option> </el-option>
</el-select> </el-select>
<el-select filterable v-model='addMsg.City' @change='getRegion'> <el-select filterable v-model='addMsg.City' @change='getRegion'>
<el-option v-for='item in cityList' <el-option v-for='item in cityList' :label='item.Name' :value='item.ID' :key='item.ID'>
:label='item.Name'
:value='item.ID'
:key='item.ID'>
</el-option> </el-option>
</el-select> </el-select>
<el-select filterable v-model='addMsg.District'> <el-select filterable v-model='addMsg.District'>
<el-option v-for='item in regionList' <el-option v-for='item in regionList' :label='item.Name' :value='item.ID' :key='item.ID'>
:label='item.Name'
:value='item.ID'
:key='item.ID'>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('hotel.hotel_detailinfo')" prop="address"> <el-form-item :label="$t('hotel.hotel_detailinfo')" prop="address">
<el-input v-model="addMsg.address" :placeholder="$t('salesModule.HouseNumber')" maxlength="50" ></el-input> <el-input v-model="addMsg.address" :placeholder="$t('salesModule.HouseNumber')" maxlength="50"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('salesModule.Belongbrand')" prop="brandIds"> <el-form-item :label="$t('salesModule.Belongbrand')" prop="brandIds">
<el-select filterable class='multiple_input' multiple v-model='addMsg.brandIds' :placeholder="$t('pub.pleaseSel')"> <el-select filterable class='multiple_input' multiple v-model='addMsg.brandIds'
<el-option v-for='item in CustomerBrandList' :placeholder="$t('pub.pleaseSel')">
:label='item.name' <el-option v-for='item in CustomerBrandList' :label='item.name' :value='item.id' :key='item.id'>
:value='item.id'
:key='item.id'>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -250,10 +482,7 @@ ...@@ -250,10 +482,7 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('visaT.post')" prop="Duty"> <el-form-item :label="$t('visaT.post')" prop="Duty">
<el-select filterable v-model='addMsg.Duty' :placeholder="$t('pub.pleaseSel')"> <el-select filterable v-model='addMsg.Duty' :placeholder="$t('pub.pleaseSel')">
<el-option v-for='item in zw' <el-option v-for='item in zw' :label='item.Name' :value='item.ID' :key='item.ID'>
:label='item.Name'
:value='item.ID'
:key='item.ID'>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -261,10 +490,7 @@ ...@@ -261,10 +490,7 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('salesModule.premises')" prop="Premises"> <el-form-item :label="$t('salesModule.premises')" prop="Premises">
<el-select filterable v-model='addMsg.Premises' :placeholder="$t('pub.pleaseSel')"> <el-select filterable v-model='addMsg.Premises' :placeholder="$t('pub.pleaseSel')">
<el-option v-for='item in jycs' <el-option v-for='item in jycs' :label='item.Name' :value='item.ID' :key='item.ID'>
:label='item.Name'
:value='item.ID'
:key='item.ID'>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -272,10 +498,7 @@ ...@@ -272,10 +498,7 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('salesModule.CustomerSource')" prop="CustomerSourceType"> <el-form-item :label="$t('salesModule.CustomerSource')" prop="CustomerSourceType">
<el-select filterable v-model='addMsg.CustomerSourceType' :placeholder="$t('pub.pleaseSel')"> <el-select filterable v-model='addMsg.CustomerSourceType' :placeholder="$t('pub.pleaseSel')">
<el-option v-for='item in khly' <el-option v-for='item in khly' :label='item.Name' :value='item.ID' :key='item.ID'>
:label='item.Name'
:value='item.ID'
:key='item.ID'>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -296,12 +519,8 @@ ...@@ -296,12 +519,8 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('salesModule.BusinessPhoto')"> <el-form-item :label="$t('salesModule.BusinessPhoto')">
<el-upload class="avatar-uploader" <el-upload class="avatar-uploader" action="" :http-request="uploadImg"
action="" accept="image/jpeg,image/gif,image/png,image/bmp" :show-file-list="false">
:http-request="uploadImg"
accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false"
>
<img v-if="BusinessCardPhotos" :src="BusinessCardPhotos" class="avatar"> <img v-if="BusinessCardPhotos" :src="BusinessCardPhotos" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
...@@ -309,12 +528,8 @@ ...@@ -309,12 +528,8 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('salesModule.doorPhoto')"> <el-form-item :label="$t('salesModule.doorPhoto')">
<el-upload class="avatar-uploader" <el-upload class="avatar-uploader" action="" :http-request="uploadImg1"
action="" accept="image/jpeg,image/gif,image/png,image/bmp" :show-file-list="false">
:http-request="uploadImg1"
accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false"
>
<img v-if="HousePhotos" :src="HousePhotos" class="avatar"> <img v-if="HousePhotos" :src="HousePhotos" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
...@@ -322,12 +537,8 @@ ...@@ -322,12 +537,8 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('salesModule.businessPhoto')"> <el-form-item :label="$t('salesModule.businessPhoto')">
<el-upload class="avatar-uploader" <el-upload class="avatar-uploader" action="" :http-request="uploadImg2"
action="" accept="image/jpeg,image/gif,image/png,image/bmp" :show-file-list="false">
:http-request="uploadImg2"
accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false"
>
<img v-if="Images" :src="Images" class="avatar"> <img v-if="Images" :src="Images" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
...@@ -354,96 +565,139 @@ ...@@ -354,96 +565,139 @@
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data(){ data() {
return{ return {
allowAdd:true, allowAdd: true,
defaultImg: 'this.src="' + require("../../assets/img/litheader.png") + '"', defaultImg: 'this.src="' + require("../../assets/img/litheader.png") + '"',
BusinessCardPhotos:'', BusinessCardPhotos: '',
HousePhotos:'', HousePhotos: '',
Images:'', Images: '',
isOldPerson:false, isOldPerson: false,
type:2, type: 2,
msg:{ msg: {
pageIndex:1, pageIndex: 1,
pageSize:12, pageSize: 12,
CustomerStatus:2, CustomerStatus: 2,
CustomerName:'', CustomerName: '',
Address:'', Address: '',
Country:'-1', Country: '-1',
Province:'-1', Province: '-1',
City:'-1', City: '-1',
District:'-1', District: '-1',
}, },
addMsg:{ addMsg: {
CustomerId:0, CustomerId: 0,
customerName:'', customerName: '',
contact:'', contact: '',
contactNumber:'', contactNumber: '',
address:'', address: '',
brandIds:[], brandIds: [],
remark:'', remark: '',
Duty:'', Duty: '',
Premises:'', Premises: '',
CustomerId:'0', CustomerId: '0',
BusinessCardPhotos:[], BusinessCardPhotos: [],
HousePhotos:[], HousePhotos: [],
Images:[], Images: [],
CustomerSourceType:'', CustomerSourceType: '',
CustomerSource:'', CustomerSource: '',
Country:'2', Country: '2',
Province:'', Province: '',
City:'', City: '',
District:'', District: '',
}, },
addMsgS:{ addMsgS: {
isPreFilled:true, isPreFilled: true,
customerInfo:{}, customerInfo: {},
customerVisit:{ customerVisit: {
remark:'', remark: '',
expectVisitDateTime:'', expectVisitDateTime: '',
expectHour:0 expectHour: 0
} }
}, },
rules:{ rules: {
contact:[{required: true, message:this.$t('rule.EnterContratPerson'), trigger: "blur"}], contact: [{
customerName:[{required: true, message:this.$t('rule.EnterCustomer'), trigger: "blur"}], required: true,
contactNumber:[ message: this.$t('rule.EnterContratPerson'),
{required: true, message:this.$t('rule.EnterPNum'), trigger: "blur"}, trigger: "blur"
{ pattern: /^1[123457890]\d{9}$/, message:this.$t('rule.EnterRightNum') } }],
customerName: [{
required: true,
message: this.$t('rule.EnterCustomer'),
trigger: "blur"
}],
contactNumber: [{
required: true,
message: this.$t('rule.EnterPNum'),
trigger: "blur"
},
{
pattern: /^1[123457890]\d{9}$/,
message: this.$t('rule.EnterRightNum')
}
], ],
brandIds:[{required: true, message:this.$t('rule.ChoiceBrand'), trigger: "change"}], brandIds: [{
Duty:[{required: true, message:this.$t('rule.ChoiceJob'), trigger: "change"}], required: true,
remark:[{required: false, message: this.$t('rule.ChoiceJob'), trigger: "change"}], message: this.$t('rule.ChoiceBrand'),
Premises:[{required: true, message:this.$t('rule.ChoiceJYCS'), trigger: "change"}], trigger: "change"
CustomerSourceType:[{required: true, message:this.$t('rule.ChoiceCusFrom'), trigger: "change"}], }],
customerName:[{required: true, message:this.$t('rule.EnterCusName'), trigger: "blur"}], Duty: [{
address:[{required: true, message:this.$t('visaT.qsradder'), trigger: "blur"}], required: true,
}, message: this.$t('rule.ChoiceJob'),
dataList:[], trigger: "change"
CustomerBrandList:[], }],
checkedCities:[], remark: [{
checkAll:false, required: false,
addShow:false, message: this.$t('rule.ChoiceJob'),
noData:false, trigger: "change"
loading:true, }],
isIndeterminate:true, Premises: [{
required: true,
message: this.$t('rule.ChoiceJYCS'),
trigger: "change"
}],
CustomerSourceType: [{
required: true,
message: this.$t('rule.ChoiceCusFrom'),
trigger: "change"
}],
customerName: [{
required: true,
message: this.$t('rule.EnterCusName'),
trigger: "blur"
}],
address: [{
required: true,
message: this.$t('visaT.qsradder'),
trigger: "blur"
}],
},
dataList: [],
CustomerBrandList: [],
checkedCities: [],
checkAll: false,
addShow: false,
noData: false,
loading: true,
isIndeterminate: true,
total: 0, total: 0,
currentPage: 1, currentPage: 1,
provinceList:[], provinceList: [],
cityList:[], cityList: [],
regionList:[], regionList: [],
jycs:[], //经营场所 jycs: [], //经营场所
zw:[], //职务 zw: [], //职务
khly:[], //客户来源 khly: [], //客户来源
outerVisible:false, outerVisible: false,
} }
},methods:{ },
methods: {
//导入 //导入
getImportFileUrl() { getImportFileUrl() {
let url = let url =
this.domainManager().UploadFileUrl + this.domainManager().UploadFileUrl +
"?cmd=dmc_post_LocalFileUpload&fileType=1&fileLimit=1&Type=2&uid=" + "?cmd=dmc_post_LocalFileUpload&fileType=1&fileLimit=1&Type=9&EmployeeId=" +
this.getLocalStorage().EmployeeId + this.getLocalStorage().EmployeeId +
"&importType=" + "&importType=" +
this.importType; this.importType;
...@@ -460,12 +714,13 @@ export default { ...@@ -460,12 +714,13 @@ export default {
//下载模板文件 //下载模板文件
getDownList() { getDownList() {
this.apipost( this.apipost(
"AirTicket_post_DownAirticket", {}, "app_customer_GetCustomerTemplate", {},
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.downList = this.downList =
this.domainManager().LocalTemplateFileDownLoadUrl + this.domainManager().LocalTemplateFileDownLoadUrl +
res.data.data.FileUrl; res.data.data.FileUrl;
window.open(this.downList);
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -473,19 +728,20 @@ export default { ...@@ -473,19 +728,20 @@ export default {
err => {} err => {}
); );
}, },
deleteCustomer(obj) {
deleteCustomer(obj){
this.$confirm(this.$t('tips.shifoushanchu'), this.$t('tips.tips'), { this.$confirm(this.$t('tips.shifoushanchu'), this.$t('tips.tips'), {
confirmButtonText: this.$t('pub.sureBtn'), confirmButtonText: this.$t('pub.sureBtn'),
cancelButtonText: this.$t('pub.cancelBtn'), cancelButtonText: this.$t('pub.cancelBtn'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.apipost('app_customer_Remove',{ID:obj.customerId},res=>{ this.apipost('app_customer_Remove', {
if(res.data.resultCode==1){ ID: obj.customerId
}, res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message); this.Success(res.data.message);
this.getList() this.getList()
} }
},err=>{}) }, err => {})
}).catch(() => { }).catch(() => {
this.Error('已取消删除!'); this.Error('已取消删除!');
}); });
...@@ -496,7 +752,7 @@ export default { ...@@ -496,7 +752,7 @@ export default {
newArr.push(file.file); newArr.push(file.file);
let path = "/Upload/Temporary/"; let path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => { this.UploadSelfFileT(path, newArr, x => {
this.BusinessCardPhotos= this.domainManager().ViittoFileUrl + x.data.FilePath this.BusinessCardPhotos = this.domainManager().ViittoFileUrl + x.data.FilePath
}); });
}, },
uploadImg1(file) { uploadImg1(file) {
...@@ -505,7 +761,7 @@ export default { ...@@ -505,7 +761,7 @@ export default {
newArr.push(file.file); newArr.push(file.file);
let path = "/Upload/Temporary/"; let path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => { this.UploadSelfFileT(path, newArr, x => {
this.HousePhotos= this.domainManager().ViittoFileUrl + x.data.FilePath this.HousePhotos = this.domainManager().ViittoFileUrl + x.data.FilePath
}); });
}, },
uploadImg2(file) { uploadImg2(file) {
...@@ -514,249 +770,272 @@ export default { ...@@ -514,249 +770,272 @@ export default {
newArr.push(file.file); newArr.push(file.file);
let path = "/Upload/Temporary/"; let path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => { this.UploadSelfFileT(path, newArr, x => {
this.Images=this.domainManager().ViittoFileUrl + x.data.FilePath this.Images = this.domainManager().ViittoFileUrl + x.data.FilePath
}); });
}, },
searchHistory(val){ searchHistory(val) {
if(val.length==11){ if (val.length == 11) {
this.apipost('app_customer_GetCustomerByContactNumber',{ContactNumber:val},res=>{ this.apipost('app_customer_GetCustomerByContactNumber', {
if(res.data.resultCode==1){ ContactNumber: val
if(res.data.data.customerInfo.customerId>0) }, res => {
{ if (res.data.resultCode == 1) {
if (res.data.data.customerInfo.customerId > 0) {
this.isOldPerson=true this.isOldPerson = true
let x=res.data.data.customerInfo let x = res.data.data.customerInfo
this.addMsg=x this.addMsg = x
this.addMsg.Province=x.province this.addMsg.Province = x.province
this.addMsg.customerId=x.customerId this.addMsg.customerId = x.customerId
this.getCity1() this.getCity1()
this.addMsg.City=x.city this.addMsg.City = x.city
this.getRegion1() this.getRegion1()
this.addMsg.District=x.district this.addMsg.District = x.district
this.addMsg.Duty=x.duty this.addMsg.Duty = x.duty
this.addMsg.Premises=x.premises this.addMsg.Premises = x.premises
this.addMsg.CustomerSourceType=x.customerSourceType this.addMsg.CustomerSourceType = x.customerSourceType
let dictid=[] let dictid = []
res.data.data.brandList.forEach(x=>{ res.data.data.brandList.forEach(x => {
dictid.push(x.dictId) dictid.push(x.dictId)
}) })
this.addMsg.brandIds=dictid this.addMsg.brandIds = dictid
if(x.businessCardPhotos&&x.businessCardPhotos.length>0) if (x.businessCardPhotos && x.businessCardPhotos.length > 0) {
{ this.BusinessCardPhotos = x.businessCardPhotos[0]
this.BusinessCardPhotos=x.businessCardPhotos[0]
} }
if(x.images&&x.images.length>0) if (x.images && x.images.length > 0) {
{ this.Images = x.images[0]
this.Images=x.images[0]
} }
if(x.housePhotos&&x.housePhotos.length>0) if (x.housePhotos && x.housePhotos.length > 0) {
{ this.HousePhotos = x.housePhotos[0]
this.HousePhotos=x.housePhotos[0]
} }
} }
this.allowAdd=true this.allowAdd = true
}else{ } else {
if(res.data.message.indexOf('已注册客户信息')!=-1) if (res.data.message.indexOf('已注册客户信息') != -1) {
{ this.allowAdd = false
this.allowAdd=false
} }
this.$message.error(res.data.message) this.$message.error(res.data.message)
} }
},err=>{}) }, err => {})
}else{} } else {}
}, },
getJycs(){ getJycs() {
this.apipost('app_today_visit_GetCustomerPremisesEnum',{},res=>{ this.apipost('app_today_visit_GetCustomerPremisesEnum', {}, res => {
if(res.data.resultCode==1){ if (res.data.resultCode == 1) {
this.jycs=res.data.data this.jycs = res.data.data
} }
},err=>{}) }, err => {})
}, },
getZw(){ getZw() {
this.apipost('app_today_visit_GetCustomerDutyEnum',{},res=>{ this.apipost('app_today_visit_GetCustomerDutyEnum', {}, res => {
if(res.data.resultCode==1){ if (res.data.resultCode == 1) {
this.zw=res.data.data this.zw = res.data.data
} }
},err=>{}) }, err => {})
}, },
getKhly(){ getKhly() {
this.apipost('app_customer_GetCustomerSourceEnum',{},res=>{ this.apipost('app_customer_GetCustomerSourceEnum', {}, res => {
if(res.data.resultCode==1){ if (res.data.resultCode == 1) {
this.khly=res.data.data this.khly = res.data.data
} }
},err=>{}) }, err => {})
}, },
getProvince(){ getProvince() {
this.apipost('app_customer_GetChildList',{Id:2,"level":1},res=>{ this.apipost('app_customer_GetChildList', {
if(res.data.resultCode==1){ Id: 2,
this.provinceList=res.data.data "level": 1
}, res => {
if (res.data.resultCode == 1) {
this.provinceList = res.data.data
} }
},err=>{}) }, err => {})
}, },
getCity(){ getCity() {
this.apipost('app_customer_GetChildList',{Id:this.addMsg.Province,"level":2},res=>{ this.apipost('app_customer_GetChildList', {
if(res.data.resultCode==1){ Id: this.addMsg.Province,
this.cityList=res.data.data "level": 2
this.regionList=[] }, res => {
this.addMsg.City='' if (res.data.resultCode == 1) {
this.addMsg.District='' this.cityList = res.data.data
this.regionList = []
this.addMsg.City = ''
this.addMsg.District = ''
} }
},err=>{}) }, err => {})
}, },
getRegion(){ getRegion() {
this.apipost('app_customer_GetChildList',{Id:this.addMsg.City,"level":3},res=>{ this.apipost('app_customer_GetChildList', {
if(res.data.resultCode==1){ Id: this.addMsg.City,
this.regionList=res.data.data "level": 3
this.addMsg.District='' }, res => {
if (res.data.resultCode == 1) {
this.regionList = res.data.data
this.addMsg.District = ''
} }
},err=>{}) }, err => {})
}, },
getCity1(){ getCity1() {
this.apipost('app_customer_GetChildList',{Id:this.addMsg.Province,"level":2},res=>{ this.apipost('app_customer_GetChildList', {
if(res.data.resultCode==1){ Id: this.addMsg.Province,
this.cityList=res.data.data "level": 2
}, res => {
if (res.data.resultCode == 1) {
this.cityList = res.data.data
} }
},err=>{}) }, err => {})
}, },
getRegion1(){ getRegion1() {
this.apipost('app_customer_GetChildList',{Id:this.addMsg.City,"level":3},res=>{ this.apipost('app_customer_GetChildList', {
if(res.data.resultCode==1){ Id: this.addMsg.City,
this.regionList=res.data.data "level": 3
}, res => {
if (res.data.resultCode == 1) {
this.regionList = res.data.data
} }
},err=>{}) }, err => {})
}, },
goUrl(type,id){ goUrl(type, id) {
this.$router.push({ name: 'MyCustomerDetail',query:{"id":id} }) this.$router.push({
name: 'MyCustomerDetail',
query: {
"id": id
}
})
}, },
goUrC(path,customerId){ goUrC(path, customerId) {
this.$router.push({ name:path,query:{"customerId":customerId,blank: 'y'} }) this.$router.push({
name: path,
query: {
"customerId": customerId,
blank: 'y'
}
})
}, },
goUrlT(path,id){ goUrlT(path, id) {
this.$router.push({ name:path,query:{"id":id,"type":8} }) this.$router.push({
name: path,
query: {
"id": id,
"type": 8
}
})
}, },
clickGetList(type){ clickGetList(type) {
this.msg.pageIndex=1 this.msg.pageIndex = 1
this.currentPage = 1 this.currentPage = 1
this.msg.CustomerStatus=type this.msg.CustomerStatus = type
this.getList() this.getList()
}, },
getList(){ // 获取列表数据 getList() { // 获取列表数据
this.apipost('app_get_my_customer_list',this.msg,res=>{ this.apipost('app_get_my_customer_list', this.msg, res => {
if(res.data.resultCode==0){ if (res.data.resultCode == 0) {
this.loading = false; this.loading = false;
this.dataList=[] this.dataList = []
}else{ } else {
this.dataList = res.data.data.pageData; this.dataList = res.data.data.pageData;
this.total = res.data.data.count; this.total = res.data.data.count;
this.loading = false; this.loading = false;
} }
},err=>{}) }, err => {})
}, },
getCustomerBrandList(){ // 获取品牌 getCustomerBrandList() { // 获取品牌
this.apipost('app_get_customer_brand',{},res=>{ this.apipost('app_get_customer_brand', {}, res => {
if(res.data.resultCode==1){ if (res.data.resultCode == 1) {
this.CustomerBrandList = res.data.data; this.CustomerBrandList = res.data.data;
}else{ } else {
this.$message.error(res.data.message) this.$message.error(res.data.message)
} }
},err=>{}) }, err => {})
}, },
saveVisa(){ // 保存 saveVisa() { // 保存
if(this.addMsg.District=='') if (this.addMsg.District == '') {
{ this.addMsg.District = 0
this.addMsg.District=0
} }
this.addMsgS.customerInfo = this.addMsg this.addMsgS.customerInfo = this.addMsg
if(this.BusinessCardPhotos) if (this.BusinessCardPhotos) {
{ this.addMsg.BusinessCardPhotos=[] this.addMsg.BusinessCardPhotos = []
this.addMsg.BusinessCardPhotos.push(this.BusinessCardPhotos) this.addMsg.BusinessCardPhotos.push(this.BusinessCardPhotos)
} }
if(this.HousePhotos) if (this.HousePhotos) {
{ this.addMsg.HousePhotos=[] this.addMsg.HousePhotos = []
this.addMsg.HousePhotos.push(this.HousePhotos) this.addMsg.HousePhotos.push(this.HousePhotos)
} }
if(this.Images) if (this.Images) {
{ this.addMsg.Images=[] this.addMsg.Images = []
this.addMsg.Images.push(this.Images) this.addMsg.Images.push(this.Images)
} }
let sheng='' let sheng = ''
let shi='' let shi = ''
let qu='' let qu = ''
if(this.addMsg.District=='') if (this.addMsg.District == '') {
{ this.addMsg.District = 0
this.addMsg.District=0
} }
if(this.addMsg.City=='') if (this.addMsg.City == '') {
{ this.addMsg.City = 0
this.addMsg.City=0
} }
this.provinceList.forEach(item=>{ this.provinceList.forEach(item => {
if(this.addMsg.Province==item.ID) if (this.addMsg.Province == item.ID) {
{ sheng = item.Name
sheng=item.Name
} }
}) })
this.cityList.forEach(item=>{ this.cityList.forEach(item => {
if(this.addMsg.City==item.ID) if (this.addMsg.City == item.ID) {
{ shi = item.Name
shi=item.Name
} }
}) })
this.regionList.forEach(item=>{ this.regionList.forEach(item => {
if(this.addMsg.District==item.ID) if (this.addMsg.District == item.ID) {
{ qu = item.Name
qu=item.Name
} }
}) })
let AreaName=sheng+shi+qu let AreaName = sheng + shi + qu
this.addMsg.address=AreaName+','+this.addMsg.address this.addMsg.address = AreaName + ',' + this.addMsg.address
this.apipost('app_add_new_visit_customer',this.addMsgS,res=>{ this.apipost('app_add_new_visit_customer', this.addMsgS, res => {
if(res.data.resultCode==1){ if (res.data.resultCode == 1) {
this.addMsg={ this.addMsg = {
customerName:'', customerName: '',
contact:'', contact: '',
contactNumber:'', contactNumber: '',
address:'', address: '',
brandIds:[], brandIds: [],
remark:'', remark: '',
Duty:'', Duty: '',
Premises:'', Premises: '',
CustomerId:'0', CustomerId: '0',
BusinessCardPhotos:[], BusinessCardPhotos: [],
HousePhotos:[], HousePhotos: [],
Images:[], Images: [],
CustomerSourceType:'', CustomerSourceType: '',
CustomerSource:'', CustomerSource: '',
Country:'2', Country: '2',
Province:'', Province: '',
City:'', City: '',
District:'', District: '',
} }
this.addMsgS.customerVisit.expectVisitDateTime ='' this.addMsgS.customerVisit.expectVisitDateTime = ''
this.$message.success(res.data.message) this.$message.success(res.data.message)
this.addShow=false this.addShow = false
this.getList() this.getList()
}else{ } else {
this.$message.error(res.data.message) this.$message.error(res.data.message)
} }
},err=>{}) }, err => {})
}, },
cancelEdit(){ // 取消新增 cancelEdit() { // 取消新增
this.addShow=false this.addShow = false
this.addMsg={ this.addMsg = {
customerName:'', customerName: '',
contact:'', contact: '',
contactNumber:'', contactNumber: '',
address:'', address: '',
remark:'', remark: '',
brandIds:[], brandIds: [],
} }
this.BusinessCardPhotos='', this.BusinessCardPhotos = '',
this.HousePhotos='', this.HousePhotos = '',
this.Images='', this.Images = '',
this.addMsgS.customerVisit.expectVisitDateTime ='' this.addMsgS.customerVisit.expectVisitDateTime = ''
this.resetForm('addMsg') this.resetForm('addMsg')
}, },
resetForm(formName) { // 重置表单 resetForm(formName) { // 重置表单
...@@ -766,7 +1045,8 @@ export default { ...@@ -766,7 +1045,8 @@ export default {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getList(); this.getList();
}, },
},mounted(){ },
mounted() {
this.getList() this.getList()
this.getCustomerBrandList() this.getCustomerBrandList()
this.getProvince() this.getProvince()
...@@ -774,5 +1054,6 @@ export default { ...@@ -774,5 +1054,6 @@ export default {
this.getZw() this.getZw()
this.getKhly() this.getKhly()
} }
} }
</script> </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