开头少调两个接口

This commit is contained in:
cclu 2023-03-24 18:59:43 +08:00
parent cabd938f9d
commit ea42a5c4d5
4 changed files with 85 additions and 32 deletions

View File

@ -1,6 +1,6 @@
import request from '@/util/index.js' import request from '@/util/index.js'
const methods = { const methods = {
async getData(obj,isServerPartDetail) { // 获取远程数据 async getData(obj,isServerPartDetail,value) { // 获取远程数据 value判断是不是正常进来 是的话俩接口不调
let _this = this let _this = this
/* ts /* ts
type serverpartRegion = { type serverpartRegion = {
@ -44,9 +44,18 @@ const methods = {
const tradeData = await request.$webGet('CommercialApi/BaseInfo/GetBusinessTradeList', requestParamas) const tradeData = await request.$webGet('CommercialApi/BaseInfo/GetBusinessTradeList', requestParamas)
if (tradeData.Result_Code != 100) return if (tradeData.Result_Code != 100) return
// 计划营收金额 // 计划营收金额
const budgetAmount = await request.$webGet('CommercialApi/Revenue/GetBudgetExpenseList', requestParamasBudget) let budgetAmount = {
Result_Data:{
List:[]
}
}
if (!value){
budgetAmount = await request.$webGet('CommercialApi/Revenue/GetBudgetExpenseList', requestParamasBudget)
if (budgetAmount.Result_Code != 100) return if (budgetAmount.Result_Code != 100) return
}
// 移动支付分账数据 // 移动支付分账数据
const mobileShare = await request.$webGet('CommercialApi/Revenue/GetMobileShare', requestParamas) const mobileShare = await request.$webGet('CommercialApi/Revenue/GetMobileShare', requestParamas)
@ -57,8 +66,16 @@ const methods = {
if (mallDeliver.Result_Code != 100) return if (mallDeliver.Result_Code != 100) return
// 片区车流量 // 片区车流量
const bayonetCount = await request.$webGet('CommercialApi/Revenue/GetSPBayonetList', requestParamas) let bayonetCount = {
Result_Data:{
List:[]
}
}
if (!value){
bayonetCount = await request.$webGet('CommercialApi/Revenue/GetSPBayonetList', requestParamas)
if (bayonetCount.Result_Code != 100) return if (bayonetCount.Result_Code != 100) return
}
if (isServerPartDetail) { // 是服务区营收推送页面 if (isServerPartDetail) { // 是服务区营收推送页面
return _this.getSeverpartReginList(data.Result_Data.List, busniessCounts.Result_Data.List, return _this.getSeverpartReginList(data.Result_Data.List, busniessCounts.Result_Data.List,

View File

@ -16,7 +16,10 @@
</div> </div>
<view class="other"> <view class="other">
<view v-if="user.Membership_Id" > <view v-if="user.Membership_Id" >
<p class="title">对客营收<span class="text">(门店上传 {{showHeadMsg.uploadState?showHeadMsg.uploadState:''}})</span></p> <view class="topTitle">
<p class="title">对客营收:</p>
<span class="text">门店上传 <text style="margin-left: 4px" :style="{color:isBig?'red':''}">{{showHeadMsg.uploadState?showHeadMsg.uploadState:''}}</text></span>
</view>
<view class="box" @click="handlePage"> <view class="box" @click="handlePage">
<p class="allPrice">{{showHeadMsg.totalMoneyShow|| '0.00'}}</p> <p class="allPrice">{{showHeadMsg.totalMoneyShow|| '0.00'}}</p>
<image class="start" src="https://ahyd.eshangtech.com/UploadImageDir/ahyd_DIB/index/start.svg"></image> <image class="start" src="https://ahyd.eshangtech.com/UploadImageDir/ahyd_DIB/index/start.svg"></image>
@ -95,15 +98,15 @@
</view> </view>
<view class="detailItem"> <view class="detailItem">
<p class="itemName"> <p class="itemName">
入区率<text class="itemUnit"></text> 入区率<text class="itemUnit">/%</text>
</p> </p>
<p class="price">{{carInfo.Entry_Rate?carInfo.Entry_Rate + '%':'' }}</p> <p class="price">{{carInfo.Entry_Rate?carInfo.Entry_Rate :'' }}</p>
</view> </view>
<view class="detailItem"> <view class="detailItem">
<p class="itemName"> <p class="itemName">
停留时长<text class="itemUnit"></text> 停留时长<text class="itemUnit">/分钟</text>
</p> </p>
<p class="price">{{carInfo.Stay_Times?carInfo.Stay_Times + '分钟':'' }}</p> <p class="price">{{carInfo.Stay_Times?carInfo.Stay_Times:'' }}</p>
</view> </view>
</view> </view>
@ -131,9 +134,9 @@
</p> </p>
<p class="money">{{ item.value }}</p> <p class="money">{{ item.value }}</p>
<view v-if="index === 0 || index === 2" class="active"> <view v-if="index === 0 || index === 2" class="active">
<image class="addIcon" :src="Number(item.add)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image> <image v-if="Number(item.add)!==0" class="addIcon" :src="Number(item.add)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
<text class="add">{{ item.add }}</text> <text v-if="Number(item.add)!==0" class="add">{{ item.add }}</text>
<text class="yesterday">(相比昨日)</text> <text v-if="Number(item.add)!==0" class="yesterday">(相比昨日)</text>
</view> </view>
<view v-else class="other">本月累计</view> <view v-else class="other">本月累计</view>
<image :src="item.imgIcon" class="imgIcon"></image> <image :src="item.imgIcon" class="imgIcon"></image>
@ -347,6 +350,7 @@ export default {
selectTab:1, selectTab:1,
single:timestampToTime((new Date(lastDay).getTime())), single:timestampToTime((new Date(lastDay).getTime())),
thisDay:'', thisDay:'',
isBig:false,//
showPage: false, showPage: false,
opacity: 0, // opacity: 0, //
customBarH: this.CustomBar, customBarH: this.CustomBar,
@ -484,7 +488,7 @@ export default {
this.theRequest = this.defaultMsg() || {} this.theRequest = this.defaultMsg() || {}
this.theRequest.time = this.lastDay this.theRequest.time = this.lastDay
this.theRequest.month = this.$util.cutDate(this.lastDay, 'YYYYMM') this.theRequest.month = this.$util.cutDate(this.lastDay, 'YYYYMM')
this.initData() this.initData(true)
this.initYesterdayData() this.initYesterdayData()
// //
this.getCarInfo() this.getCarInfo()
@ -799,10 +803,10 @@ export default {
}) })
return [_data2, _data1]; return [_data2, _data1];
}, },
async initData() { // async initData(value) { //
let _this = this let _this = this
const [reginList, totalData, busniessTypePie, busniessTradePie, busniessAreaPie, bayonetPie] = const [reginList, totalData, busniessTypePie, busniessTradePie, busniessAreaPie, bayonetPie] =
await anhuiYestodayRevenueData.getData(this.theRequest) // await anhuiYestodayRevenueData.getData(this.theRequest,null,value) //
this.nowDayAllPay=totalData.cashPay this.nowDayAllPay=totalData.cashPay
console.log('totalData',totalData) console.log('totalData',totalData)
@ -928,7 +932,13 @@ export default {
this.showHeadMsg[i] = this.$util.fmoney(this.showHeadMsg[i], 2) this.showHeadMsg[i] = this.$util.fmoney(this.showHeadMsg[i], 2)
} }
} }
console.log(this.showHeadMsg)
let index = this.showHeadMsg.uploadState.indexOf('/')
let first = this.showHeadMsg.uploadState.slice(0,index)
let second = this.showHeadMsg.uploadState.slice(index+1,1000)
if (Number(first)-Number(second)>0){
this.isBig = true
}
_this.$forceUpdate() _this.$forceUpdate()
}, },
@ -1041,12 +1051,18 @@ $iphoneHeight: env(safe-area-inset-bottom);
width: calc(100% - 32px); width: calc(100% - 32px);
position: absolute; position: absolute;
top: 104px; top: 104px;
.topTitle{
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
.title { .title {
font-size: 28rpx; font-size: 28rpx;
font-family: PingFangSC-Semibold, PingFang SC; font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600; font-weight: 600;
color: #782717; color: #782717;
line-height: 40rpx; line-height: 40rpx;
}
.text { .text {
font-size: 28rpx; font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
@ -1056,6 +1072,7 @@ $iphoneHeight: env(safe-area-inset-bottom);
margin-left: 8px; margin-left: 8px;
} }
} }
.box { .box {
display: flex; display: flex;
align-items: center; align-items: center;
@ -1416,7 +1433,7 @@ $iphoneHeight: env(safe-area-inset-bottom);
} }
} }
.name{ .name{
font-size: 28rpx; font-size: 32rpx;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #160002; color: #160002;
@ -1424,8 +1441,8 @@ $iphoneHeight: env(safe-area-inset-bottom);
} }
} }
.price{ .price{
font-size: 28rpx; font-size: 32rpx;
font-family: PingFangSC-Semibold, PingFang SC; font-family: DINAlternate-Bold, DINAlternate;
font-weight: 600; font-weight: 600;
color: #160002; color: #160002;
line-height: 40rpx; line-height: 40rpx;

View File

@ -35,7 +35,12 @@
</view> </view>
<view v-if="item.value === 4" class="fourth"> <view v-if="item.value === 4" class="fourth">
<view v-for="(item, index) in item.list" :key="index" class="useListItem" @click="handleGo(item)"> <view v-for="(item, index) in item.list" :key="index" class="useListItem" @click="handleGo(item)">
<image class="img" :src="item.imagePath"></image> <view v-if="!item.isNotice" class="imgParent">
<view class="img">
<image style="width: 100%;height: 100%" :src="item.imagePath"></image>
</view>
</view>
<image v-else class="img_normal" :src="item.imagePath"></image>
<span class="name">{{ item.name }}</span> <span class="name">{{ item.name }}</span>
<span v-if="item.notice!==0 && item.isNotice" class="notice" style="{ background: red }">{{item.notice}}</span> <span v-if="item.notice!==0 && item.isNotice" class="notice" style="{ background: red }">{{item.notice}}</span>
</view> </view>
@ -238,10 +243,24 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
position: relative; position: relative;
.imgParent{
width: 30px;
height: 30px;
margin-bottom: 6px;
overflow: hidden;
.img { .img {
width: 30px; width: 30px;
height: 30px; height: 30px;
margin-bottom: 8px; margin-bottom: 6px;
transform: translateX(30px);
border-right: 30px solid transparent;
filter: drop-shadow(-30px 0px #ccc);
}
}
.img_normal{
width: 30px;
height: 30px;
margin-bottom: 6px;
} }
.name { .name {
font-size: 28rpx; font-size: 28rpx;

View File

@ -413,7 +413,7 @@ import Tabbar from "../../components/tabbar/tabbar.vue";
font-weight: 400; font-weight: 400;
color: #782717; color: #782717;
line-height: 36rpx; line-height: 36rpx;
width: 95%; width: 98%;
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;