Commit d98b2917 authored by 华国豪's avatar 华国豪 🙄
parents b6392659 60b3b70d
...@@ -324,6 +324,34 @@ ...@@ -324,6 +324,34 @@
text-indent: 25px; 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> </style>
<template> <template>
...@@ -338,7 +366,7 @@ ...@@ -338,7 +366,7 @@
</li> </li>
<li> <li>
<button class="hollowFixedBtn" @click="getList()">{{$t('pub.searchBtn')}}</button> <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="outerVisible=true">导入</button>
<button class="normalBtn" @click="getDownList">模板下载</button> <button class="normalBtn" @click="getDownList">模板下载</button>
</li> </li>
...@@ -378,7 +406,7 @@ ...@@ -378,7 +406,7 @@
<th>操作</th> <th>操作</th>
</tr> </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.contact}}</td>
<td>{{item.contactNumber}}</td> <td>{{item.contactNumber}}</td>
<td>{{item.customerName}}</td> <td>{{item.customerName}}</td>
...@@ -389,22 +417,29 @@ ...@@ -389,22 +417,29 @@
<p v-else>{{$t('salesModule.noYuefang')}}</p> <p v-else>{{$t('salesModule.noYuefang')}}</p>
</td> </td>
<td> <td>
<div @click="goUrl(type,item.customerId,1)">
<p v-if="item.customerVisitList[1]"> <p v-if="item.customerVisitList[1]">
{{item.customerVisitList[1].visitDateTime}}</p> <span style="cursor: pointer;text-decoration: underline;">{{item.customerVisitList[1].visitDateTime}}</span></p>
<p v-else>{{$t('pub.noMsg')}}</p> <p v-else>
<span style="cursor: pointer;text-decoration: underline;">{{$t('pub.noMsg')}}</span></p>
</div>
</td> </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.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.inquireCount}}</td>
<td>{{item.allianceName}}</td> <td>{{item.allianceName}}</td>
<td><span style="cursor: pointer;text-decoration: underline;" @click.stop="goUrC('CouponsList',item.customerAccountId)">{{item.couponNum}}</span></td> <td><span style="cursor: pointer;text-decoration: underline;" @click.stop="goUrC('CouponsList',item.customerAccountId)">{{item.couponNum}}</span></td>
<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-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-button style="padding:4px" @click.stop="goUrlT('empBankAccount',item.customerId)" type="danger" icon="iconfont icon-guanliyuan" circle></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" content="详情" placement="top-start"> <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-button style="padding:4px" @click.stop="goUrC('CustomerAnalysis',item.customerId)" type="success" icon="iconfont icon-icon-test6" circle></el-button>
</el-tooltip> </el-tooltip>
</td> </td>
</tr> </tr>
...@@ -412,62 +447,6 @@ ...@@ -412,62 +447,6 @@
<td colspan="12" style="text-align:center">暂无数据</td> <td colspan="12" style="text-align:center">暂无数据</td>
</tr> </tr>
</table> </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" <el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
layout="total,prev, pager, next, jumper" :page-size="this.msg.pageSize" :total="total"> layout="total,prev, pager, next, jumper" :page-size="this.msg.pageSize" :total="total">
</el-pagination> </el-pagination>
...@@ -617,6 +596,115 @@ ...@@ -617,6 +596,115 @@
<div slot="tip" class="el-upload__tip">只能上传Excel文件</div> <div slot="tip" class="el-upload__tip">只能上传Excel文件</div>
</el-upload> </el-upload>
</el-dialog> </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> </div>
</template> </template>
...@@ -624,6 +712,7 @@ ...@@ -624,6 +712,7 @@
export default { export default {
data() { data() {
return { return {
addLayer1:false,
allowAdd: true, allowAdd: true,
defaultImg: 'this.src="' + require("../../assets/img/litheader.png") + '"', defaultImg: 'this.src="' + require("../../assets/img/litheader.png") + '"',
BusinessCardPhotos: '', BusinessCardPhotos: '',
...@@ -742,9 +831,173 @@ ...@@ -742,9 +831,173 @@
zw: [], //职务 zw: [], //职务
khly: [], //客户来源 khly: [], //客户来源
outerVisible: false, 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: { 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() { getImportFileUrl() {
let url = let url =
...@@ -947,11 +1200,12 @@ ...@@ -947,11 +1200,12 @@
} }
}, err => {}) }, err => {})
}, },
goUrl(type, id) { goUrl(type, id,num) {
this.$router.push({ this.$router.push({
name: 'MyCustomerDetail', name: 'MyCustomerDetail',
query: { query: {
"id": id "id": id,
"num":num
} }
}) })
}, },
...@@ -991,7 +1245,6 @@ ...@@ -991,7 +1245,6 @@
this.total = res.data.data.count; this.total = res.data.data.count;
this.loading = false; this.loading = false;
} }
console.log("this.dataList",this.dataList)
}, err => {}) }, err => {})
}, },
getCustomerBrandList() { // 获取品牌 getCustomerBrandList() { // 获取品牌
......
...@@ -591,7 +591,10 @@ ...@@ -591,7 +591,10 @@
}, },
}, },
mounted(){ 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.getCustomerBrandList()
this.getMyCustomerInfo() this.getMyCustomerInfo()
this.getVisitList() this.getVisitList()
......
<style> <style>
.flightPerformance .fpTable th { .flightPerformance .fpTable th {
border-bottom: 1px solid #d1d1d1; border-bottom: 1px solid #d1d1d1;
border-right: 1px solid #d1d1d1; border-right: 1px solid #d1d1d1;
background: #E6E6E6; background: #e6e6e6;
height: 40px; height: 40px;
font-size: 14px; font-size: 14px;
color: #333; color: #333;
} }
.flightPerformance .fpTable { .flightPerformance .fpTable {
width: 1000px; width: 1000px;
margin-bottom: 30px; margin-bottom: 30px;
border-collapse: collapse; border-collapse: collapse;
} }
.flightPerformance .creatName { .flightPerformance .creatName {
color: green; color: green;
font-weight: bold; font-weight: bold;
margin-right: 10px; margin-right: 10px;
} }
.flightPerformance .fpTable tr { .flightPerformance .fpTable tr {
background: #fff; background: #fff;
text-align: center; text-align: center;
height: 40px; height: 40px;
} }
.flightPerformance .fpTable tr td { .flightPerformance .fpTable tr td {
font-size: 12px; font-size: 12px;
border: 1px solid #E5E5E5; border: 1px solid #e5e5e5;
} }
.flightPerformance .fpTable tbody tr:last-child {
border-bottom: 2px solid #333;
}
.flightPerformance .fpTable tbody tr:last-child {
border-bottom: 2px solid #333;
}
</style> </style>
<template> <template>
...@@ -44,35 +43,68 @@ ...@@ -44,35 +43,68 @@
<li> <li>
<span> <span>
<em>操作人</em> <em>操作人</em>
<el-select v-model="msg.CreateBy" filterable :placeholder="$t('system.ph_in')"> <el-select
v-model="msg.CreateBy"
filterable
:placeholder="$t('system.ph_in')"
>
<el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option> <el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option>
<el-option v-for="item in EmployeeList" :label="item.EmName" :value="item.EmployeeId" <el-option
:key="item.EmployeeId"></el-option> v-for="item in EmployeeList"
:label="item.EmName"
:value="item.EmployeeId"
:key="item.EmployeeId"
></el-option>
</el-select> </el-select>
</span> </span>
</li> </li>
<li> <li>
<span> <span>
<em>月份</em> <em>月份</em>
<el-date-picker v-model='msg.QMonth' value-format="yyyy-MM" type="month"></el-date-picker> <el-date-picker
v-model="msg.QMonth"
value-format="yyyy-MM"
type="month"
></el-date-picker>
</span> </span>
</li> </li>
<li style="line-height:34px;font-size:14px;">
单买机票计算方式:<span style="color:red;">(售价-成本价)&nbsp;X&nbsp;{{singlePercent}}</span>
</li>
<li> <li>
<input type="button" class="hollowFixedBtn" @click="getList()" :value="$t('pub.searchBtn')" /> <input
<input type="button" class="hollowFixedBtn" @click="DownLoad()" value="导出" /> type="button"
class="hollowFixedBtn"
@click="getList()"
:value="$t('pub.searchBtn')"
/>
<input
type="button"
class="hollowFixedBtn"
@click="DownLoad()"
value="导出"
/>
</li> </li>
</ul> </ul>
</div> </div>
<table class="fpTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading" <table
v-for="(item,index) in dataList.resultList" :key="index"> class="fpTable"
<tbody v-for="(subItem,subIndex) in item.TicketList" :key="subIndex"> border="0"
<tr v-if="subIndex==0"> cellspacing="0"
cellpadding="0"
v-loading="loading"
v-for="(item, index) in dataList.resultList"
:key="index"
>
<tbody v-for="(subItem, subIndex) in item.TicketList" :key="subIndex">
<tr v-if="subIndex == 0">
<td colspan="6"> <td colspan="6">
<span class="creatName">{{item.CreateByName}}</span> <span class="creatName">{{ item.CreateByName }}</span>
{{msg.QMonth}} {{ msg.QMonth }}
提成数据</td> 提成数据
</td>
</tr> </tr>
<tr v-if="index==0&&subIndex==0"> <tr v-if="index == 0 && subIndex == 0">
<th>序号</th> <th>序号</th>
<th>公司</th> <th>公司</th>
<th>团号</th> <th>团号</th>
...@@ -80,185 +112,262 @@ ...@@ -80,185 +112,262 @@
<th>金额</th> <th>金额</th>
<th>小计</th> <th>小计</th>
</tr> </tr>
<template v-for="(childItem,childIndex) in subItem.SubList" > <template v-for="(childItem, childIndex) in subItem.SubList">
<tr :key="childIndex"> <tr :key="childIndex">
<td width="10%"> <td width="10%">
{{childIndex+1}} {{ childIndex + 1 }}
</td> </td>
<td width="20%" :rowspan="subItem.SubList.length+1" style="border-bottom:2px solid black" <td
v-if="childIndex==0"> width="20%"
{{subItem.OutBranchName}} :rowspan="subItem.SubList.length + 1"
style="border-bottom:2px solid black"
v-if="childIndex == 0"
>
{{ subItem.OutBranchName }}
</td> </td>
<td width="30%"> <td width="30%">
<template v-if="childItem.TCID>0"> <template v-if="childItem.TCID > 0">
<a style="color:blue;cursor:pointer" @click='goUrlT("RegistrationList",childItem.TCID,"报名清单")'> <template v-if="childItem.TicketType==2">
({{childItem.TCID}}){{childItem.TCNUM}} <a style="color:blue;cursor:pointer" @click="goUrlT('TicketManager', childItem.TCID, '票务关闭')">{{ childItem.TCNUM }}</a>
</template>
<template v-if="childItem.TicketType==1">
<a style="color:blue;cursor:pointer" @click="goUrlT('RegistrationList', childItem.TCID, '报名清单')">({{ childItem.TCID }}){{ childItem.TCNUM }}
</a> </a>
</template>
</template> </template>
<template v-else> <template v-else>
{{childItem.TCNUM}} {{childItem.TCNUM}}
</template> </template>
</td> </td>
<td width="10%">{{childItem.TicketNum}}</td> <td width="10%">{{ childItem.TicketNum }}</td>
<td width="10%" :rowspan="subItem.SubList.length+1" style="border-bottom:2px solid black" <!--单卖机票-->
v-if="childIndex==0">{{dataList.UnitPrice}}</td> <template v-if="childItem.TicketType == 2">
<td width="10%">{{childItem.TicketNum*dataList.UnitPrice}}</td> <td width="10%">
</tr> {{ childItem.SalePrice - childItem.CostPrice }}
<tr v-if="childIndex==subItem.SubList.length-1" :key="childIndex+500"> </td>
<td></td> <td width="10%">
<td style="font-weight:bold;">合计</td> {{
<td style="color:red;"> childItem.TicketNum *(childItem.SalePrice - childItem.CostPrice) *singlePercent
{{getPeopleCount(subItem.SubList)}} }}
</td> </td>
<td style="color:red;"> </template>
{{getCount(subItem.SubList)}} <template v-else>
</td> <td
width="10%"
:rowspan="subItem.SubList.length + 1"
style="border-bottom:2px solid black"
v-if="childIndex == 0"
>
{{ dataList.UnitPrice }}
</td>
<td width="10%">
{{ childItem.TicketNum * dataList.UnitPrice }}
</td>
</template>
</tr> </tr>
<template v-if="childItem.TicketType == 2">
<tr
v-if="childIndex == subItem.SubList.length - 1"
:key="childIndex + 500">
<td></td>
<td style="font-weight:bold;">合计</td>
<td style="color:red;">
{{ getPeopleCount(subItem.SubList) }}
</td>
<td>
</td>
<td style="color:red;">
{{ getSingleCount(subItem.SubList) }}
</td>
</tr>
</template>
<template v-else>
<tr
v-if="childIndex == subItem.SubList.length - 1"
:key="childIndex + 500"
>
<td></td>
<td style="font-weight:bold;">合计</td>
<td style="color:red;">
{{ getPeopleCount(subItem.SubList) }}
</td>
<td style="color:red;">
{{ getCount(subItem.SubList) }}
</td>
</tr>
</template>
</template> </template>
<tr v-if="subIndex==item.TicketList.length-1"> <tr v-if="subIndex == item.TicketList.length - 1">
<td></td> <td></td>
<td></td> <td></td>
<td style="font-weight:bold;">总计</td> <td style="font-weight:bold;">总计</td>
<td> <td>
<span style="color:red;">{{getTotalNum(item.TicketList)}}</span> <span style="color:red;">{{ getTotalNum(item.TicketList) }}</span>
</td>
<td>{{ dataList.UnitPrice }}</td>
<td>
<span style="color:red;">{{ getTotalCount(item.TicketList) }}</span>
</td> </td>
<td>{{dataList.UnitPrice}}</td>
<td><span style="color:red;">{{getTotalCount(item.TicketList)}}</span></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
msg: { msg: {
LineId: 0, //线路编号 LineId: 0, //线路编号
OutBranchId: -1, //出团公司 OutBranchId: -1, //出团公司
AirLineID: 0, //航空公司编号 AirLineID: 0, //航空公司编号
CreateBy: 0, //操作人 CreateBy: 0, //操作人
QMonth: '', //月份 QMonth: "" //月份
}, },
loading: false, //单机票百分比
dataList: {}, singlePercent:0.1,
//航空公司下拉 loading: false,
airlineList: [], dataList: {},
//操作人下拉 //航空公司下拉
EmployeeList: [], airlineList: [],
} //操作人下拉
EmployeeList: []
};
},
mounted() {
this.getEmployeeList();
if (this.$route.query.UserId) {
this.msg.CreateBy = Number(this.$route.query.UserId);
}
if (this.$route.query.Periods) {
var str = this.$route.query.Periods;
this.msg.QMonth = str.substring(0, 4) + "-" + str.substring(4);
} else {
let date = new Date(),
y = date.getFullYear(),
m =
date.getMonth() < 10
? "0" + (date.getMonth() + 1)
: date.getMonth() + 1;
this.msg.QMonth = y + "-" + m;
}
this.initAirlines();
this.getList();
},
methods: {
//单卖机票计算
getSingleCount(list) {
let count = 0;
list.forEach(x => {
count += x.TicketNum*(x.SalePrice-x.CostPrice)*this.singlePercent;
});
return count;
},
//页面跳转
goUrlT(path, obj, title) {
this.$router.push({
name: path,
query: {
id: obj,
blank: "y",
tab: title
}
});
},
//获取列表数据
getList() {
this.loading = true;
this.apipost("AirTicket_get_GetTicketPerformance", this.msg, res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.dataList = res.data.data;
} else {
this.Error(res.data.message);
}
});
}, },
mounted() { //获取没个的人数
this.getEmployeeList(); getPeopleCount(subList) {
if (this.$route.query.UserId) { let count = 0;
this.msg.CreateBy = Number(this.$route.query.UserId); subList.forEach(x => {
} count += x.TicketNum;
if (this.$route.query.Periods) { });
var str = this.$route.query.Periods; return count;
this.msg.QMonth = str.substring(0, 4) + "-" + str.substring(4);
} else {
let date = new Date(),
y = date.getFullYear(),
m = date.getMonth() < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
this.msg.QMonth = y + '-' + m;
}
this.initAirlines();
this.getList()
}, },
methods: { //计算小计
//页面跳转 getCount(list) {
goUrlT(path, obj, title) { let count = 0;
this.$router.push({ list.forEach(x => {
name: path, count += x.TicketNum;
query: { });
"id": obj, return count * this.dataList.UnitPrice;
blank: 'y', },
tab: title //计算总计
getTotalCount(list) {
let count = 0;
list.forEach(x => {
x.SubList.forEach(y => {
if(y.TicketType!=2)
{
count += y.TicketNum * this.dataList.UnitPrice;
} }
}) else
}, {
//获取列表数据 count += y.TicketNum*(y.SalePrice-y.CostPrice)*this.singlePercent;
getList() {
this.loading = true;
this.apipost("AirTicket_get_GetTicketPerformance", this.msg, res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.dataList = res.data.data;
} else {
this.Error(res.data.message);
} }
}); });
}, });
//获取没个的人数 return count ;
getPeopleCount(subList) { },
let count = 0; //获取总计人数
subList.forEach(x => { getTotalNum(list) {
count += x.TicketNum; let count = 0;
}); list.forEach(x => {
return count; x.SubList.forEach(y => {
}, count += y.TicketNum;
//计算小计
getCount(list) {
let count = 0;
list.forEach(x => {
count += x.TicketNum;
}); });
return count * this.dataList.UnitPrice; });
}, return count;
//计算总计 },
getTotalCount(list) { //初始化航空公司下拉
let count = 0; initAirlines() {
list.forEach(x => { this.apipost(
x.SubList.forEach(y => { "airline_post_GetList",
count += y.TicketNum {},
}) res => {
}) if (res.data.resultCode == 1) {
return count * this.dataList.UnitPrice; this.airlineList = res.data.data;
}, }
//获取总计人数 },
getTotalNum(list) { err => {}
let count = 0; );
list.forEach(x => { },
x.SubList.forEach(y => { //根据当前员工所在部门获取该部门及子部门员工信息
count += y.TicketNum getEmployeeList() {
}) this.apipost(
}) "admin_get_GetEmployeeByUserDepartmentId",
return count; {},
}, res => {
//初始化航空公司下拉 if (res.data.resultCode == 1) {
initAirlines() { this.EmployeeList = res.data.data;
this.apipost( }
"airline_post_GetList", {}, },
res => { err => {}
if (res.data.resultCode == 1) { );
this.airlineList = res.data.data; },
} //下载业绩数据
}, DownLoad() {
err => {} this.loading = true;
); var fileName = "机票业绩下载" + this.msg.QMonth + ".xls";
}, this.GetLocalFile(
//根据当前员工所在部门获取该部门及子部门员工信息 "AirTicket_get_DownLoadGetTicketPerformance",
getEmployeeList() { this.msg,
this.apipost( fileName,
"admin_get_GetEmployeeByUserDepartmentId", {}, res => {
res => { this.loading = false;
if (res.data.resultCode == 1) { }
this.EmployeeList = res.data.data; );
}
},
err => {}
);
},
//下载业绩数据
DownLoad() {
this.loading = true;
var fileName = "机票业绩下载" + this.msg.QMonth + ".xls";
this.GetLocalFile("AirTicket_get_DownLoadGetTicketPerformance", this.msg, fileName,
res => {
this.loading = false;
});
}
} }
} }
};
</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