2022-09-09 15:12:59 +08:00

247 lines
9.2 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="page-body">
<!-- 顶部信息卡片 -->
<view class="card-header">
<!-- 顶部信息卡片第一行 -->
<view class="uni-flex ai-center jc-between fs12">
<!-- 左侧 -->
<span>服务区名称{{dataDetail.SERVERPART_NAME || ''}}</span>
<!-- 右侧 -->
<span>实收金额{{dataDetail.CASHPAY !== null ?
dataDetail.CASHPAY : ''}}</span>
</view>
<!-- 顶部信息卡片第二行 -->
<view class="uni-flex ai-center jc-between fs12">
<!-- 左侧 -->
<span>归属区域名字{{dataDetail.SPREGIONTYPE_NAME || ''}}</span>
</view>
</view>
<!-- 详情信息 -->
<view class="modle-title">
<h2>服务区营收汇总</h2>
</view>
<!-- 详情信息卡片 -->
<view class="content-detail-box main-card ino-flex ai-center uni-column">
<!-- 单列样式 -->
<!-- 服务区索引 -->
<view class="cellTopStyle">
<span class="fourth-name">服务区索引</span>
<span>{{dataDetail.SERVERPART_INDEX !== null ?
dataDetail.SERVERPART_INDEX : ''}}</span>
</view>
<!-- 归属区域索引 -->
<view class="cellTopStyle">
<span class="fourth-name">归属区域索引</span>
<span>{{dataDetail.SPREGIONTYPE_INDEX !== null ?
dataDetail.SPREGIONTYPE_INDEX : ''}}</span>
</view>
<!-- 服务区名称 -->
<view class="cellTopStyle">
<span class="fourth-name">服务区名称</span>
<span>{{dataDetail.SERVERPART_NAME || ''}}</span>
</view>
<!-- 服务区编码 -->
<view class="cellTopStyle">
<span class="fourth-name">服务区编码</span>
<span>{{dataDetail.SERVERPART_CODE || ''}}</span>
</view>
<!-- 归属区域名字 -->
<view class="cellTopStyle">
<span class="fourth-name">归属区域名字</span>
<span>{{dataDetail.SPREGIONTYPE_NAME || ''}}</span>
</view>
<!-- 客单数量 -->
<view class="cellTopStyle">
<span class="fourth-name">客单数量</span>
<span>{{dataDetail.TICKETCOUNT !== null ?
dataDetail.TICKETCOUNT : ''}}</span>
</view>
<!-- 销售总数 -->
<view class="cellTopStyle">
<span class="fourth-name">销售总数</span>
<span>{{dataDetail.TOTALCOUNT !== null ?
dataDetail.TOTALCOUNT : ''}}</span>
</view>
<!-- 总销售额 -->
<view class="cellTopStyle">
<span class="fourth-name">总销售额</span>
<span>{{dataDetail.TOTALSELLAMOUNT !== null ?
dataDetail.TOTALSELLAMOUNT : ''}}</span>
</view>
<!-- 总优惠额 -->
<view class="cellTopStyle">
<span class="fourth-name">总优惠额</span>
<span>{{dataDetail.TOTALOFFAMOUNT !== null ?
dataDetail.TOTALOFFAMOUNT : ''}}</span>
</view>
<!-- 现金合计 -->
<view class="cellTopStyle">
<span class="fourth-name">现金合计</span>
<span>{{dataDetail.CASH !== null ?
dataDetail.CASH : ''}}</span>
</view>
<!-- 信用卡合计值 -->
<view class="cellTopStyle">
<span class="fourth-name">信用卡合计值</span>
<span>{{dataDetail.CREDITCARD !== null ?
dataDetail.CREDITCARD : ''}}</span>
</view>
<!-- 微信支付合计值 -->
<view class="cellTopStyle">
<span class="fourth-name">微信支付合计值</span>
<span>{{dataDetail.TICKETBILL !== null ?
dataDetail.TICKETBILL : ''}}</span>
</view>
<!-- 会员卡合计值 -->
<view class="cellTopStyle">
<span class="fourth-name">会员卡合计值</span>
<span>{{dataDetail.VIPPERSON !== null ?
dataDetail.VIPPERSON : ''}}</span>
</view>
<!-- 微信支付 -->
<view class="cellTopStyle">
<span class="fourth-name">微信支付</span>
<span>{{dataDetail.COSTBILL !== null ?
dataDetail.COSTBILL : ''}}</span>
</view>
<!-- 支付宝 -->
<view class="cellTopStyle">
<span class="fourth-name">支付宝</span>
<span>{{dataDetail.OTHERPAY !== null ?
dataDetail.OTHERPAY : ''}}</span>
</view>
<!-- 实收金额 -->
<view class="cellTopStyle">
<span class="fourth-name">实收金额</span>
<span>{{dataDetail.CASHPAY !== null ?
dataDetail.CASHPAY : ''}}</span>
</view>
<!-- 长短款合计值 -->
<view class="cellTopStyle">
<span class="fourth-name">长短款合计值</span>
<span>{{dataDetail.DIFFERENT_PRICE !== null ?
dataDetail.DIFFERENT_PRICE : ''}}</span>
</view>
<!-- 移动支付金额合计值 -->
<view class="cellTopStyle">
<span class="fourth-name">移动支付金额合计值</span>
<span>{{dataDetail.FACT_AMOUNT !== null ?
dataDetail.FACT_AMOUNT : ''}}</span>
</view>
<!-- 到账实差合计值 -->
<view class="cellTopStyle">
<span class="fourth-name">到账实差合计值</span>
<span>{{dataDetail.SALE_CORRECT !== null ?
dataDetail.SALE_CORRECT : ''}}</span>
</view>
</view>
</view>
</template>
<script>
import {mapGetters,mapMutations} from 'vuex'
export default {
data() {
return {
pageData: {
type: null,
id: null
},
loading: true,
dataDetail: {},
}
},
methods: {
...mapMutations(['shouldReLoadingList']),
/**
* 调用接口获取数据详情
*
* Api接口地址EShangApiMain/AutoTest/GetServerpartReport
*/
getDetail(option) {
this.$request.$webGetTest("EShangApiMain/AutoTest/GetServerpartReport", {
//这里设置接口参数
SERVERPART_ID: option.SERVERPART_ID,
SearchStatisticsStartDate: option.SearchStatisticsStartDate,
SearchStatisticsEndDate: option.SearchStatisticsEndDate,
})
.then(res => {
uni.hideLoading()
this.loading = false
if (res.Result_Code !== 100) {
return
}
this.dataDetail = res.Result_Data.List.length > 0 ? res.Result_Data.List[0] : null
})
},
},
onLoad(option) {
uni.showLoading()
this.pageData = option
this.loading = true
this.getDetail(option)
this.$forceUpdate()
}
}
</script>
<style scoped>
.page-body {
min-height: 100%;
padding: 40rpx 25rpx;
background-color: #fff;
box-sizing: border-box;
padding-bottom: 196rpx;
}
.card-header {
border-radius: 10rpx;
margin: 0 26rpx 22rpx 26rpx;
background: linear-gradient(to right, #8998bb 0%, #a9b5d2 100%);
color: #FFFFFF;
padding: 24rpx 16rpx;
}
.card-header h3 {
padding-bottom: 10rpx;
font-size: 30rpx;
}
.card-header .fs12>text {
font-size: 24rpx;
}
.cellTopStyle {
line-height: 45rpx;
width: 100%;
display: flex;
align-items: center; //上下对齐
justify-content: space-between; //两端对齐
}
.fourth-name {
min-width: 120rpx;
max-width: 140rpx;
color: #ADB2BF;
font-size: 26rpx;
white-space: nowrap;
}
.modle-title {
color: #000;
padding: 36rpx 30rpx 24rpx 30rpx;
font-size: 26rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.modle-title h2 {
font-weight: bolder;
}
.content-detail-box {
margin: 0 26rpx 22rpx 26rpx;
background: #ffffff;
border-radius: 8rpx;
box-shadow: 0rpx 2rpx 8rpx 0rpx rgba(231, 231, 231, 0.67);
overflow: hidden;
position: relative;
padding: 10rpx 30rpx 16rpx 30rpx;
font-size: 26rpx;
}
.content-detail-box span {
font-size: 26rpx;
}
</style>