update
This commit is contained in:
parent
4a8091db94
commit
33a145f222
@ -59,7 +59,8 @@
|
||||
<div style="display: inline-block;width: 48%;text-align: left;margin-right: 4%"
|
||||
class="text-coast">
|
||||
<text style="display: inline-block;width: 40px;text-align: left">
|
||||
{{ item.Serverpart_RevenueS === 0 || item.Serverpart_RevenueS ? `${item.Serverpart_S}:
|
||||
{{ item.Serverpart_RevenueS === 0 || item.Serverpart_RevenueS ?
|
||||
`${item.Serverpart_S}:
|
||||
`: '' }}
|
||||
</text>
|
||||
<text style="display: inline-block;width: calc(100% - 50px);margin-left: 10px">
|
||||
@ -69,7 +70,8 @@
|
||||
</div>
|
||||
<div style="display: inline-block;width: 48%;text-align: right" class="text-coast">
|
||||
<text style="display: inline-block;width: 40px;text-align: left">
|
||||
{{ item.Serverpart_RevenueN === 0 || item.Serverpart_RevenueN ? `${item.Serverpart_N}:
|
||||
{{ item.Serverpart_RevenueN === 0 || item.Serverpart_RevenueN ?
|
||||
`${item.Serverpart_N}:
|
||||
`: '' }}
|
||||
</text>
|
||||
<text style="display: inline-block;width: calc(100% - 50px);margin-left: 10px">
|
||||
@ -118,7 +120,7 @@ export default {
|
||||
if (e.detail.value != nowDate) {
|
||||
this.pageData.searchTime[index] = e.detail.value
|
||||
this.$forceUpdate()
|
||||
this.getDetail({ st: this.pageData.searchTime[0], et: this.pageData.searchTime[1], id: this.pageOption.id, pcode: this.pageOption.pcode })
|
||||
this.getDetail({ st: this.pageData.searchTime[0], et: this.pageData.searchTime[1], id: this.pageOption.id, pcode: this.pageOption.pcode, ServerpartShopId: this.pageOption.ServerpartShopId })
|
||||
}
|
||||
},
|
||||
toTrend() {
|
||||
@ -130,6 +132,8 @@ export default {
|
||||
title: '正在加载...',
|
||||
mask: true
|
||||
})
|
||||
console.log('obj', obj);
|
||||
|
||||
// _this.$request.$webGet('WeChat/GetRevenueReportDetils',{
|
||||
request.$webGet('CommercialApi/Revenue/GetRevenueReportDetil', {
|
||||
startTime: obj.st,
|
||||
@ -137,6 +141,7 @@ export default {
|
||||
serverpartId: obj.id,
|
||||
provinceCode: obj.pcode,
|
||||
BusinessTrade: obj.BusinessTrade || '',
|
||||
ServerpartShopId: obj.ServerpartShopId || '',
|
||||
SearchKeyName: _this.pageOption.searchKey,
|
||||
SearchKeyValue: _this.pageOption.searchValue,
|
||||
BusinessType: _this.pageOption.BusinessTypeValue > 0 ? _this.pageOption.BusinessTypeValue : '',
|
||||
|
||||
@ -200,12 +200,106 @@
|
||||
</view>
|
||||
|
||||
|
||||
<view class="modle-title">
|
||||
<view class="modle-title" style="margin-bottom: 12rpx;">
|
||||
<image src="https://eshangtech.com/ShopICO/ahyd-BID/revenue/yestoday-region.png" mode="aspectFit"></image>
|
||||
<text>运营报表</text>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 运营报表明细 (同步经营报表样式) -->
|
||||
<view class="bg-white2" style="margin-bottom: 40rpx;" v-if="mockReportData && mockReportData.length > 0">
|
||||
<view v-for="(company, cIndex) in mockReportData" :key="cIndex">
|
||||
<div class="region-cell" @tap="toggleReportItem(company)">
|
||||
<div class="region-cell-unit2 region-title">
|
||||
<text>{{ company.CompanyName }}</text>
|
||||
<div class="ct01">
|
||||
<text class="strong-text">¥{{ $util.fmoney(company.Total_Revenue, 2) }}</text>
|
||||
</div>
|
||||
</div>
|
||||
<div class="region-cell-unit2">
|
||||
<text>营收占比</text>
|
||||
<div class="ct01">
|
||||
<text class="strong-text">{{ company.Revenue_Proportion }}%</text>
|
||||
</div>
|
||||
</div>
|
||||
<div class="region-cell-unit2">
|
||||
<text class="uni-icon uni-icon-arrowright" :class="{ 'active': company.show }"></text>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<view v-if="company.show && company.children && company.children.length > 0">
|
||||
<view v-for="(cat, catIndex) in company.children" :key="catIndex">
|
||||
<!-- 二级分类:使用 region-cell 但增加左侧缩进样式 -->
|
||||
<div class="region-cell" style="padding-left: 48rpx;" @tap="toggleReportItem(cat)">
|
||||
<div class="region-cell-unit2">
|
||||
<text>{{ cat.BusinessTrade_Name }}</text>
|
||||
<div class="ct01">
|
||||
<text class="strong-text">¥{{ $util.fmoney(cat.Total_Revenue, 2) }}</text>
|
||||
</div>
|
||||
</div>
|
||||
<div class="region-cell-unit2">
|
||||
<text>营收占比</text>
|
||||
<div class="ct01">
|
||||
<text class="strong-text">{{ cat.Revenue_Proportion }}%</text>
|
||||
</div>
|
||||
</div>
|
||||
<div class="region-cell-unit2">
|
||||
<text class="uni-icon uni-icon-arrowright" :class="{ 'active': cat.show }"></text>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<view v-if="cat.show && cat.children && cat.children.length > 0">
|
||||
<view v-for="(area, aIndex) in cat.children" :key="aIndex">
|
||||
<!-- 三级/四级判定 -->
|
||||
<template v-if="area.children && area.children.length > 0">
|
||||
<div class="region-cell" style="padding-left: 72rpx;" @tap="toggleReportItem(area)">
|
||||
<div class="region-cell-unit2">
|
||||
<text>{{ area.SPRegionType_Name }}</text>
|
||||
<div class="ct01">
|
||||
<text class="strong-text">¥{{ $util.fmoney(area.Total_Revenue, 2) }}</text>
|
||||
</div>
|
||||
</div>
|
||||
<div class="region-cell-unit2">
|
||||
<text>片区占比</text>
|
||||
<div class="ct01">
|
||||
<text class="strong-text">{{ area.Revenue_Proportion }}%</text>
|
||||
</div>
|
||||
</div>
|
||||
<div class="region-cell-unit2">
|
||||
<text class="uni-icon uni-icon-arrowright" :class="{ 'active': area.show }"></text>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="region-cell-area" v-if="area.show">
|
||||
<li v-for="(s, sIndex) in area.children" :key="sIndex" @tap="toDetail(s)">
|
||||
<view>{{ s.Serverpart_Name }}</view>
|
||||
<view class="uni-flex ai-center data-number">
|
||||
<text>{{ s.Revenue_Proportion }}%</text>
|
||||
<text style="flex: 2;">¥{{ $util.fmoney(s.Total_Revenue, 2) }}</text>
|
||||
</view>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
<view v-else>
|
||||
<ul class="region-cell-area region-cell-area2">
|
||||
<li @tap="toggleReportItem(area)">
|
||||
<view>{{ area.ShopShort_Name || area.CompanyName || area.Serverpart_Name }}</view>
|
||||
<view class="uni-flex ai-center data-number">
|
||||
<text>{{ area.Revenue_Proportion }}%</text>
|
||||
<text style="flex: 2;">¥{{ $util.fmoney(area.Total_Revenue, 2) }}</text>
|
||||
</view>
|
||||
</li>
|
||||
</ul>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<uni-popup ref="popup" type="bottom" style="background: #fff">
|
||||
<div class="popupBox" style="box-sizing:border-box;height: 550px">
|
||||
<!-- <div style="display: flex;align-items: center;justify-content: space-between">-->
|
||||
@ -345,6 +439,8 @@ export default {
|
||||
showNotice: false,
|
||||
showModal: false,// 显示模式
|
||||
selectTradeId: '',//选择的业态
|
||||
mockReportData: [],
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -465,7 +561,13 @@ export default {
|
||||
this.isScreen = false
|
||||
// 请求数据的方法
|
||||
this.getList()
|
||||
this.handleGetOperationReport()
|
||||
},
|
||||
toggleReportItem(item) {
|
||||
item.show = !item.show;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
|
||||
// 查询配置的关闭方法 暂时隐藏不用
|
||||
handleClosePopup() {
|
||||
this.checkChange = this.checkBoxValue
|
||||
@ -501,6 +603,7 @@ export default {
|
||||
// 套一层方法 可以进行其他操作 只有有其他操作的 业务更改之后就没了 暂时保留
|
||||
searchList() {
|
||||
this.getList()
|
||||
this.handleGetOperationReport()
|
||||
},
|
||||
// 老方法 显示具体条目
|
||||
toggleRegion(item) {
|
||||
@ -512,14 +615,13 @@ export default {
|
||||
this.$util.toNextRoute('navigateTo', '/pages/operatingStatements/detail?pcode=' + item.Province_Code + '&id=' +
|
||||
item.Serverpart_Id + '&st=' + this.pageData.searchTime[0] + '&et=' + this.pageData.searchTime[1] +
|
||||
'&searchKey=' + JSON.parse(JSON.stringify(this.checkBoxValue)) + '&searchValue=' + this.requestText +
|
||||
'&BusinessTypeValue=' + this.BusinessTypeValue + '&SettlementModeValue=' + this.SettlementModeValue + '&BusinessTrade=' + this.selectTradeId
|
||||
'&BusinessTypeValue=' + this.BusinessTypeValue + '&SettlementModeValue=' + this.SettlementModeValue + '&BusinessTrade=' + this.selectTradeId + '&ServerpartShopId=' + item.ServerpartShop_Id
|
||||
)
|
||||
item.visited = true
|
||||
this.$forceUpdate()
|
||||
},
|
||||
// 页面请求的主要方法
|
||||
getList() {
|
||||
console.log('this.BusinessSmallTrade', this.BusinessSmallTrade)
|
||||
// copySearchText 是要显示在经营报表下方的红色字 每次请求前要清空 不能和searchText同源 不然清空搜索框 显示的文字也会消失
|
||||
this.copySearchText = ''
|
||||
uni.showLoading({
|
||||
@ -540,9 +642,6 @@ export default {
|
||||
let req;
|
||||
|
||||
|
||||
console.log('BusinessSmallTrade', this.BusinessSmallTrade)
|
||||
console.log('BusinessTrade', this.BusinessTrade)
|
||||
console.log('tradeList', this.tradeList)
|
||||
let tradeId = ''
|
||||
if (this.BusinessSmallTrade && this.BusinessSmallTrade.length > 0) {
|
||||
tradeId = this.BusinessSmallTrade.toString()
|
||||
@ -561,7 +660,6 @@ export default {
|
||||
tradeId = list.toString()
|
||||
}
|
||||
}
|
||||
console.log('tradeId', tradeId)
|
||||
this.selectTradeId = tradeId
|
||||
req = {
|
||||
startTime: searchTime[0],
|
||||
@ -628,7 +726,6 @@ export default {
|
||||
async handleGetTradeList() {
|
||||
const data = await request.$webGet('EShangApiMain/BaseInfo/GetBusinessTradeTree', {})
|
||||
const treeTable = wrapTreeNode(data.Result_Data.List);
|
||||
console.log('treeTable', treeTable)
|
||||
let list = []
|
||||
if (treeTable && treeTable.length > 0) {
|
||||
treeTable.forEach(item => {
|
||||
@ -649,6 +746,20 @@ export default {
|
||||
})
|
||||
}
|
||||
this.tradeList = list
|
||||
},
|
||||
// 请求运营报表的方法
|
||||
async handleGetOperationReport() {
|
||||
this.mockReportData = []
|
||||
let searchTime = this.pageData.searchTime
|
||||
const req = {
|
||||
ProvinceCode: "340000",
|
||||
StartTime: searchTime[0],
|
||||
EndTime: searchTime[1],
|
||||
}
|
||||
const data = await request.$webGet('CommercialApi/Revenue/GetCompanyRevenueReport', req)
|
||||
const list = wrapTreeNode(data.Result_Data.List);
|
||||
console.log('listlist', list);
|
||||
this.mockReportData = list
|
||||
}
|
||||
},
|
||||
async onLoad(query) {
|
||||
@ -687,13 +798,15 @@ export default {
|
||||
|
||||
// 调用接口拿到页面数据的方法
|
||||
this.getList()
|
||||
this.handleGetOperationReport()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page-body {
|
||||
//padding-bottom: 80rpx;
|
||||
padding-bottom: 40rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.meng {
|
||||
@ -979,7 +1092,7 @@ export default {
|
||||
}
|
||||
|
||||
.uni-icon-arrowdown {
|
||||
font-size: 22rpx;
|
||||
font-size: 18rpx;
|
||||
color: #C7C7C7;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
@ -1135,6 +1248,17 @@ export default {
|
||||
padding-bottom: 26rpx;
|
||||
}
|
||||
|
||||
.bg-white2 {
|
||||
background-color: #fff;
|
||||
margin: 0 24rpx;
|
||||
border-radius: 12rpx;
|
||||
padding-bottom: 26rpx;
|
||||
|
||||
.region-cell {
|
||||
padding-left: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.region-area-title {
|
||||
color: #000;
|
||||
font-weight: bolder;
|
||||
@ -1198,7 +1322,7 @@ export default {
|
||||
|
||||
.region-cell .uni-icon-arrowdown,
|
||||
.region-cell .uni-icon-arrowright {
|
||||
font-size: 36rpx;
|
||||
font-size: 18rpx;
|
||||
color: #5A5A5A;
|
||||
/* padding-bottom: 12rpx; */
|
||||
position: relative;
|
||||
@ -1232,6 +1356,25 @@ export default {
|
||||
|
||||
}
|
||||
|
||||
.region-cell .region-cell-unit2 {
|
||||
flex: 2;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: #929292;
|
||||
font-size: 26rpx;
|
||||
line-height: 1.5;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.region-cell .region-cell-unit2:nth-child(1) {
|
||||
flex: 5;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.region-cell .region-cell-unit2:nth-child(3) {
|
||||
flex: 2.5;
|
||||
}
|
||||
|
||||
.region-cell-image {
|
||||
width: 48rpx;
|
||||
display: flex;
|
||||
@ -1282,6 +1425,26 @@ export default {
|
||||
|
||||
}
|
||||
|
||||
.region-cell-area2:nth-child(2n) li view:first-child:before {
|
||||
content: '';
|
||||
background-color: #5596F9 !important;
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
border-radius: 8rpx;
|
||||
display: block;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.region-cell-area2:nth-child(2n+1) li view:first-child:before {
|
||||
content: '';
|
||||
background-color: #FE6D67 !important;
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
border-radius: 8rpx;
|
||||
display: block;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.region-cell-area li:nth-child(2n+1) view:first-child:before {
|
||||
content: '';
|
||||
background-color: #FE6D67;
|
||||
@ -1323,9 +1486,25 @@ export default {
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
/* 迁移自 HTML 的报表样式 - 已深度对齐经营报表 */
|
||||
.mock-report-container {
|
||||
margin: 0 24rpx 24rpx;
|
||||
border-radius: 12rpx;
|
||||
background-color: #fff;
|
||||
padding-bottom: 26rpx;
|
||||
/* 对齐经营报表容器底部间距 */
|
||||
}
|
||||
|
||||
|
||||
/* 运营报表专项微调 (利用级联复用既有样式) */
|
||||
.operation-report {
|
||||
.region-cell {
|
||||
/* 通过 padding-left 控制层级感,基础值 56rpx */
|
||||
}
|
||||
}
|
||||
|
||||
.region-cell-area li>view:last-child:after {
|
||||
content: '';
|
||||
background: url('https://eshangtech.com/ShopICO/ahyd-BID/revenue/you-jt.png')no-repeat center;
|
||||
width: 14rpx;
|
||||
height: 24rpx;
|
||||
background-size: contain;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user