Commit 5de253fe authored by youjie's avatar youjie

no message

parent cb41a0bd
......@@ -591,6 +591,14 @@
padding-left: 53rpx;
padding-right: 53rpx;
}
.PX60{
padding-left: 60rpx;
padding-right: 60rpx;
}
.PX70{
padding-left: 70rpx;
padding-right: 70rpx;
}
.PL10{
padding-left: 10rpx;
}
......
......@@ -69,11 +69,17 @@
}
}
.billDetailsCTop{
margin: 39rpx 30rpx 30rpx 30rpx;
margin: 30rpx 30rpx 30rpx 30rpx;
border-radius: 8rpx;
overflow: hidden;
box-shadow: 0rpx 10rpx 10rpx 0rpx rgba(114,114,114,0.16);
}
.billDetailsCTop.one{
margin: 0 30rpx 0 30rpx;
}
.billDetailsCTop.one:first-child{
margin: 39rpx 30rpx 0 30rpx;
}
.billDetailsCHeader{
background: #EDF5FF;
padding: 28rpx 31rpx;
......@@ -110,6 +116,13 @@
.billDetailsCCBoxOth:nth-child(2){
background: #fff;
}
.TotalListBox{
}
.TotalList img{
width: 72rpx;
height: 72rpx;
}
</style>
<template>
<view style="height: 100vh;">
......@@ -119,77 +132,92 @@
<view class="billDetailsHeaderBox PB40">
<view class="billDetailsTitle">
<headers textAlign="left" :title="pageTitle" color="#fff"></headers>
<view class="teamLeader-currency row items-center" @click="currencyVisible=true"><text>日元</text> <view class="triangle"></view></view>
<view class="teamLeader-currency row items-center" @click="currencyVisible=true"><text>{{ dataList[currentIndex].CurrencyStr?dataList[currentIndex].CurrencyStr:'人民币' }}</text> <view class="triangle"></view></view>
</view>
<view class="billDetailsTitle fixed"
:style="{ opacity: boxOption + '%' }">
<headers textAlign="left" :title="pageTitle" color="#fff"></headers>
<view class="teamLeader-currency row items-center" @click="currencyVisible=true"><text>日元</text> <view class="triangle"></view></view>
<view class="teamLeader-currency row items-center" @click="currencyVisible=true"><text>{{ dataList[currentIndex].CurrencyStr?dataList[currentIndex].CurrencyStr:'人民币' }}</text> <view class="triangle"></view></view>
</view>
<view class="billDetailsHeaderNBox MT50">
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638874816517253757.png" />
<view class="billDetailsHeaderNum row justify-between">
<view class="column">
<text class="label">自费收入</text>
<text class="value"><text>¥ </text> 600.00</text>
<text class="value"><text>¥ </text> {{ dataList[currentIndex].SelfPayingIncomeTotalPrice?dataList[currentIndex].SelfPayingIncomeTotalPrice:0 }}</text>
</view>
<view class="column">
<text class="label">自费支出</text>
<text class="value"><text>¥ </text> 520.00</text>
<text class="value"><text>¥ </text> {{ dataList[currentIndex].SelfPayingExpendTotalPrice?dataList[currentIndex].SelfPayingExpendTotalPrice:0 }}</text>
</view>
<view class="column">
<text class="label">小费收入</text>
<text class="value"><text>¥ </text> 200.00</text>
<text class="value"><text>¥ </text> {{ dataList[currentIndex].TipTotalPrice?dataList[currentIndex].TipTotalPrice:0 }}</text>
</view>
</view>
</view>
</view>
<view class="TotalListBox row justify-between PX60 PT20">
<view class="TotalList column justify-center items-center" v-for="(item,index) in TotalList">
<img :src="typeImgs[index]" />
<text class="fz24 MT10">¥ {{ item.price }}</text>
</view>
</view>
<view>
<view class="billDetailsCTop">
<view class="billDetailsCHeader row justify-between items-center">
<!-- <template v-for="(item,index) in TeamUsePriceList">
<view v-if="item.TotalPrice>0" class="billDetailsCTop one">
<view class="billDetailsCHeader row justify-between items-center"
@click="showTeamUse(index)">
<view class="billDetailsCHeaderL">
<view class="fz28">1月16</view>
<view class="fz20 MT10">2019</view>
<view class="fz28">{{ item.month }}{{ item.day }}</view>
<view class="fz20 MT10">{{ item.year }}</view>
</view>
<view class="billDetailsCHeaderR row items-center fontBold">
<text>¥2389.00</text>
<img class="ML20" :src="downImg[0]"/>
<text>¥{{ item.TotalPrice }}</text>
<img class="ML20" :src="!item.showList?downImg[0]:downImg[1]"/>
</view>
</view>
<view>
<view class="billDetailsCCBox row items-center fz28">
<img :src="typeImgs[0]" />
<view v-if="item.showList">
<template v-for="child in item.list">
<view v-if="child.price>0" class="billDetailsCCBox row items-center fz28">
<img :src="typeImgs[child.index]" />
<view class="billDetailsCCR flex1 row justify-between items-center">
<view class="ML23 fz28"></view>
<text class="fz28 fontWeight500">¥126</text>
<view class="ML23 fz28">{{ child.name }}</view>
<text class="fz28 fontWeight500">¥{{ child.price }}</text>
</view>
</view>
</template>
<u-empty v-if="item.list.length==0||!item.list" text="暂无数据" mode="data" paddingTop="0"></u-empty>
</view>
</view>
</template> -->
<view class="billDetailsCTop">
<view class="billDetailsCHeader billDetailsCHeaderOth row justify-between items-center">
<view class="billDetailsCHeaderL">
<view class="billDetailsCHeader billDetailsCHeaderOth row justify-between items-center"
@click="showOther=!showOther">
<view class="billDetailsCHeaderL row items-center" style="height: 66rpx;">
<view class="fz28">其他费用</view>
</view>
<view class="billDetailsCHeaderR row items-center fontBold">
<text>¥2389.00</text>
<img class="ML20" :src="downImg[0]"/>
<view class="billDetailsCHeaderR row items-center fontBold" style="height: 66rpx;">
<text>¥{{ dataList[currentIndex].OtherTotalPrice?dataList[currentIndex].OtherTotalPrice:0 }}</text>
<img class="ML20" :src="!showOther?downImg[0]:downImg[1]"/>
</view>
</view>
<view>
<view v-if="dataList&&dataList[currentIndex]&&showOther" class="PB20">
<view
v-for="(item,index) in 3"
v-for="(item,index) in dataList[currentIndex].OtherTotalPriceList"
class="billDetailsCCBox billDetailsCCBoxOth row items-center justify-between fz28">
<view class="billDetailsCCROth row items-center">
<view class="">06-01</view>
<view class="ML23"></view>
<view class="">{{ item.date.split('-')[1] }}月{{ item.date.split('-')[2] }}日</view>
<view class="ML23">{{ item.UseType }}</view>
</view>
<text class="fontWeight500">¥126</text>
<text class="fontWeight500">¥{{ item.TotalPrice }}</text>
</view>
<u-empty v-if="dataList[currentIndex].OtherTotalPriceList.length==0||!dataList[currentIndex].OtherTotalPriceList" text="暂无数据" mode="data" paddingTop="0"></u-empty>
</view>
</view>
</view>
<view style="height: 50rpx;"></view>
</scroll-view>
<currencyBottom v-if="currencyVisible"
:current="currentId"
......@@ -223,10 +251,49 @@ export default {
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638874829612434651.png',
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638874829685012792.png'
],
msg:{
TCIDs: '',// 领队id
},
dataList: [],
currencyList: [],
currentId: 0,
currentIndex: 0,
loading: false,
TeamUsePriceList: [],
TeamUsePriceObj:{
TotalPrice: '',
date: '',
year: '',
month: '',
showList: false,
list:[]
},
showOther: false,
TotalList: [
{
name:'车辆',
price: 0,
},
{
name:'酒店',
price: 0,
},
{
name:'门票',
price: 0,
},
{
name:'餐饮',
price: 0,
},
]
}
},
onLoad(option){
if(option.TCIDs){
this.msg.TCIDs = option.TCIDs
this.init()
}
},
created() {
......@@ -235,15 +302,108 @@ export default {
},
methods: {
showTeamUse(index){
this.TeamUsePriceList[index].showList = !this.TeamUsePriceList[index].showList
},
close(){
this.currencyVisible = false
},
popupCurrency(value){
this.currencyVisible = false
this.currentId = value
this.currentIndex = this.dataList.findIndex(item=>item.CurrencyId==value)
this.newTeamUsePrice()
},
newTeamUsePrice(){
this.TeamUsePriceList = []
this.TotalList[0].price = 0
this.TotalList[1].price = 0
this.TotalList[2].price = 0
this.TotalList[3].price = 0
this.dataList[this.currentIndex].TeamUsePriceList.forEach(x=>{
let findIndex = this.TeamUsePriceList.findIndex(item=>item.date==x.date)
if(findIndex==-1){
let TeamUsePriceObj = JSON.parse(JSON.stringify(this.TeamUsePriceObj))
TeamUsePriceObj.date = x.date
TeamUsePriceObj.year = x.date.substring(0,4)
TeamUsePriceObj.month = x.date.substring(5,7)
TeamUsePriceObj.day = x.date.substring(8,10)
TeamUsePriceObj.TotalPrice = x.TotalPrice
TeamUsePriceObj.list.push({
name: '车辆',
price: x.BusTotalPrice,
index: 0,
})
TeamUsePriceObj.list.push({
name: '酒店',
price: x.HouseTotalPrice,
index: 1,
})
TeamUsePriceObj.list.push({
name: '门票',
price: x.ScenicTotalPrice,
index: 2,
})
TeamUsePriceObj.list.push({
name: '餐饮',
price: x.DiningTotalPrice,
index: 3,
})
this.TotalList[0].price += x.BusTotalPrice
this.TotalList[1].price += x.HouseTotalPrice
this.TotalList[2].price += x.ScenicTotalPrice
this.TotalList[3].price += x.DiningTotalPrice
this.TeamUsePriceList.push(TeamUsePriceObj)
}else{
this.TeamUsePriceList[findIndex].list.push(x)
}
})
},
scroll(e) {
this.boxOption = Math.floor((e.detail.scrollTop - 100) / 1.5);
this.$forceUpdate();
},
init() {
this.loading = true;
uni.showLoading()
this.apipost("dmcstatistics_post_GetTotalPrice_V2", this.msg, (res) => {
if (res.resultCode == 1) {
this.loading = false;
uni.hideLoading()
this.dataList = res.data.sort((a,b)=>{
return new Date(b.TeamUsePriceList[0].UseTime) - new Date(a.TeamUsePriceList[0].UseTime)
})
this.dataList.forEach(x=>{
if(x.TeamUsePriceList) x.TeamUsePriceList.forEach(y=>{
y.date = this.$utils.formatDates(new Date(y.UseTime),'yyyy-MM-dd')
})
if(x.OtherTotalPriceList) x.OtherTotalPriceList.forEach(y=>{
y.date = this.$utils.formatDates(new Date(y.UseTime),'yyyy-MM-dd')
})
})
this.currentId = res.data[0].CurrencyId
this.currentIndex = 0
for(let i=0;i<res.data.length;i++){
this.currencyList.push({
name: res.data[i].CurrencyStr,
id: res.data[i].CurrencyId,
})
}
this.newTeamUsePrice()
}
}, (failed) => {
this.loading = false;
uni.hideLoading()
uni.showToast({
title: failed.message,
icon: "none",
});
}, (error) => {
this.loading = false;
uni.hideLoading()
})
},
},
}
</script>
\ No newline at end of file
......@@ -183,7 +183,7 @@
</view>
<view class="col"></view>
<view class="teamLeaderMakeNote row justify-center">
<view class="text-center" @click="goBookkeeping">记一笔</view>
<view class="text-center" @click="goUrl('/pages/teamLeader/reimbursementInfor')">记一笔</view>
</view>
</view>
......@@ -302,12 +302,8 @@ export default {
methods: {
goUrl(url){
uni.navigateTo({
url: url,
})
},
goBookkeeping(){
uni.navigateTo({
url: `/pages/teamLeader/reimbursementInfor?TCIDs=${this.msg.TCIDs}`,
url: `${url}?TCIDs=${this.msg.TCIDs}`,
})
},
close(){
......
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