去除模块权限验证

This commit is contained in:
zzy 2022-09-09 15:12:59 +08:00
parent 0cd090c677
commit 70c6d91160
17 changed files with 4037 additions and 8 deletions

View File

@ -568,6 +568,106 @@
} }
} }
] ]
},
{
"root": "pages/autoTest/endaccountreport",
"pages": [
{
"path": "index",
"style":
{
"enablePullDownRefresh": true,
"navigationBarTitleText": "服务区营收数据汇总"
}
},
{
"path": "detail",
"style":
{
"navigationBarTitleText": "服务区营收数据汇总详情"
}
}
]
},
{
"root": "pages/autoTest/abnormalauditreport",
"pages": [
{
"path": "index",
"style":
{
"enablePullDownRefresh": true,
"navigationBarTitleText": "服务区现场稽核异常汇总"
}
},
{
"path": "detail",
"style":
{
"navigationBarTitleText": "服务区现场稽核异常汇总详情"
}
}
]
},
{
"root": "pages/autoTest/serverpartreport",
"pages": [
{
"path": "index",
"style":
{
"enablePullDownRefresh": true,
"navigationBarTitleText": "服务区营收汇总"
}
},
{
"path": "detail",
"style":
{
"navigationBarTitleText": "服务区营收汇总详情"
}
}
]
},
{
"root": "pages/autoTest/abnormalauditsummary",
"pages": [
{
"path": "index",
"style":
{
"enablePullDownRefresh": true,
"navigationBarTitleText": "现场稽核异常表服务区站点汇总"
}
},
{
"path": "detail",
"style":
{
"navigationBarTitleText": "现场稽核异常表服务区站点汇总详情"
}
}
]
},
{
"root": "pages/autoTest/abnormalaudit",
"pages": [
{
"path": "index",
"style":
{
"enablePullDownRefresh": true,
"navigationBarTitleText": "现场稽核异常表"
}
},
{
"path": "detail",
"style":
{
"navigationBarTitleText": "现场稽核异常表详情"
}
}
]
} }
], ],
"globalStyle": { "globalStyle": {

View File

@ -0,0 +1,107 @@
<template>
<view class="card cardBorder" @tap='goDetail' v-if="item">
<!-- 卡片第一行数据 -->
<view class="uni-flex jc-between">
<!-- 左侧 -->
<!-- 门店名称 -->
<p class="contentName">{{item.SHOPNAME || ''}}</p>
<!-- 右侧 -->
<!-- 收银机号 -->
<text class="typeText">{{item.MACHINECODE || ''}}</text>
</view>
<!-- 卡片第一行角标 -->
<view class="content-index" style="background-color:#FB8B56">{{i+1}}</view>
<!-- 卡片第二行数据 -->
<view class="uni-flex jc-between">
<!-- 左侧 -->
<!-- 服务区名称 -->
<text class="content-type-text">{{item.SERVERPART_NAME || ''}}</text>
</view>
<!-- 卡片第三行数据 -->
<view class="uni-flex content-box-cashpay">
<!-- 中间 -->
<!-- 长短款额 -->
<text class="content-price">{{item.DIFFERENT_PRICE !== null ?
item.DIFFERENT_PRICE : ''}}</text>
<text style="font-size: 24upx;"></text>
<!-- 右侧 -->
<!-- 稽查类型 -->
<text class="other-coast">{{item.CHECK_TYPE || ''}}</text>
</view>
<!-- 分割线 -->
<view class="bb1"></view>
<!-- 卡片第四行顶部数据 -->
<view class="uni-flex jc-between align-center" v-if="item.WORKER_NAME || item.CHECK_ENDDATE">
<!-- 左侧 -->
<view class="uni-flex align-top">
<!-- 稽查人名称 -->
<!-- 圆点 -->
<text class="G-icon A-icon"></text>
<span class="content-span">稽查人名称{{item.WORKER_NAME || ''}}</span>
</view>
<!-- 右侧 -->
<!-- 稽查时间 -->
<text class="content-span lh15">{{item.CHECK_ENDDATE ?
this.$util.changeStringToDate(item.CHECK_ENDDATE.toString()) : ''}}</text>
</view>
<!-- 卡片第四行中间数据 -->
<view class="uni-flex jc-between" v-if="item.CASHIER_NAME">
<!-- 左侧 -->
<view class="uni-flex align-top">
<!-- 收银员名称 -->
<!-- 圆点 -->
<p class="B-icon A-icon"></p>
<span class="content-span">收银员名称{{item.CASHIER_NAME || ''}}</span>
</view>
</view>
</view>
</template>
<script>
export default {
props: {//
item: {
type: Object,
required: true
},
i: {
type: Number,
required: true
},
},
data() {//
return {
}
},
computed: {},
methods: {//
goDetail() {
this.$emit('goDetail', this.item)
},
dateEmpty(v) {
return this.$util.cutDate(v, 'YYYY/MM/DD')
},
},
}
</script>
<!-- 注意style样式增加scoped私有属性标记后组件样式不能在引用的地方进行修改 -->
<style scoped>
@import url('/common/css/listUnit.css');
.cardBorder {//
box-shadow: 0 0px 6rpx #E2E2E2;
}
.content-box-cashpay {
position: relative;
}
.other-coast {//
color: #D1A271;
background: linear-gradient(to top, #EBDDCF, #FCFBF8);
border-radius: 6rpx;
font-size: 20rpx;
padding: 0 10rpx;
margin-left: 16rpx;
margin-top: 3rpx;
position: absolute;
right: 0rpx;
bottom: 30rpx;
}
</style>

View File

@ -0,0 +1,297 @@
<template>
<view class="page-body">
<!-- 顶部信息卡片 -->
<view class="card-header">
<!-- 顶部信息卡片第一行 -->
<view class="uni-flex ai-center jc-between fs12">
<!-- 左侧 -->
<span>门店名称{{dataDetail.SHOPNAME || ''}}</span>
<!-- 右侧 -->
<span>长短款额{{dataDetail.DIFFERENT_PRICE !== null ?
dataDetail.DIFFERENT_PRICE : ''}}</span>
</view>
<!-- 顶部信息卡片第二行 -->
<view class="uni-flex ai-center jc-between fs12">
<!-- 左侧 -->
<span>服务区名称{{dataDetail.SERVERPART_NAME || ''}}</span>
<!-- 右侧 -->
<span>稽查类型{{dataDetail.CHECK_TYPE || ''}}</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.PROVINCE_CODE !== null ?
dataDetail.PROVINCE_CODE : ''}}</span>
</view>
<!-- 服务区编码 -->
<view class="cellTopStyle">
<span class="fourth-name">服务区编码</span>
<span>{{dataDetail.SERVERPARTCODE || ''}}</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.SHOPCODE || ''}}</span>
</view>
<!-- 门店名称 -->
<view class="cellTopStyle">
<span class="fourth-name">门店名称</span>
<span>{{dataDetail.SHOPNAME || ''}}</span>
</view>
<!-- 收银机号 -->
<view class="cellTopStyle">
<span class="fourth-name">收银机号</span>
<span>{{dataDetail.MACHINECODE || ''}}</span>
</view>
<!-- 日结时间 -->
<view class="cellTopStyle">
<span class="fourth-name">日结时间</span>
<span>{{dataDetail.ENDACCOUNT_DATE ?
this.$util.changeStringToDate(dataDetail.ENDACCOUNT_DATE.toString()) : ''}}</span>
</view>
<!-- 稽查时间 -->
<view class="cellTopStyle">
<span class="fourth-name">稽查时间</span>
<span>{{dataDetail.CHECK_ENDDATE ?
this.$util.changeStringToDate(dataDetail.CHECK_ENDDATE.toString()) : ''}}</span>
</view>
<!-- 销售起始时间 -->
<view class="cellTopStyle">
<span class="fourth-name">销售起始时间</span>
<span>{{dataDetail.CHECK_STARTDATE ?
this.$util.changeStringToDate(dataDetail.CHECK_STARTDATE.toString()) : ''}}</span>
</view>
<!-- 间隔时长 -->
<view class="cellTopStyle">
<span class="fourth-name">间隔时长</span>
<span>{{dataDetail.TIME_INTERVAL !== null ?
dataDetail.TIME_INTERVAL : ''}}</span>
</view>
<!-- 异常类型 -->
<view class="cellTopStyle">
<span class="fourth-name">异常类型</span>
<span>{{dataDetail.ABNORMALAUDIT_TYPE !== null ?
abnormalauditType[dataDetail.ABNORMALAUDIT_TYPE] : ''}}</span>
</view>
<!-- 抹平状态 -->
<view class="cellTopStyle">
<span class="fourth-name">抹平状态</span>
<span>{{dataDetail.ERASE_TYPE !== null ?
eraseType[dataDetail.ERASE_TYPE] : ''}}</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.CASH_PAYMENT !== null ?
dataDetail.CASH_PAYMENT : ''}}</span>
</view>
<!-- 稽核金额 -->
<view class="cellTopStyle">
<span class="fourth-name">稽核金额</span>
<span>{{dataDetail.CHECK_CASHPAY !== null ?
dataDetail.CHECK_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.REPLENISH_AMOUNT !== null ?
dataDetail.REPLENISH_AMOUNT : ''}}</span>
</view>
<!-- 账期总销售额 -->
<view class="cellTopStyle">
<span class="fourth-name">账期总销售额</span>
<span>{{dataDetail.ENDACCOUNT_REVENUE !== null ?
dataDetail.ENDACCOUNT_REVENUE : ''}}</span>
</view>
<!-- 稽查类型 -->
<view class="cellTopStyle">
<span class="fourth-name">稽查类型</span>
<span>{{dataDetail.CHECK_TYPE || ''}}</span>
</view>
<!-- 是否打印小票01 -->
<view class="cellTopStyle">
<span class="fourth-name">是否打印小票</span>
<span>{{dataDetail.PRINTBILL_STATE !== null ?
dataDetail.PRINTBILL_STATE : ''}}</span>
</view>
<!-- 是否推送提醒01 -->
<view class="cellTopStyle">
<span class="fourth-name">是否推送提醒</span>
<span>{{dataDetail.PUSH_STATE !== null ?
dataDetail.PUSH_STATE : ''}}</span>
</view>
<!-- 稽查人名称 -->
<view class="cellTopStyle">
<span class="fourth-name">稽查人名称</span>
<span>{{dataDetail.WORKER_NAME || ''}}</span>
</view>
<!-- 收银员名称 -->
<view class="cellTopStyle">
<span class="fourth-name">收银员名称</span>
<span>{{dataDetail.CASHIER_NAME || ''}}</span>
</view>
<!-- 上传时间 -->
<view class="cellTopStyle">
<span class="fourth-name">上传时间</span>
<span>{{dataDetail.DOWNLOAD_DATE ? dataDetail.DOWNLOAD_DATE.replace('T',' ') : ''}}</span>
</view>
<!-- 有效状态 -->
<view class="cellTopStyle">
<span class="fourth-name">有效状态</span>
<span>{{dataDetail.ABNORMALAUDIT_VALID !== null ?
isvalid[dataDetail.ABNORMALAUDIT_VALID] : ''}}</span>
</view>
<!-- 备注 -->
<view class="cellTopStyle">
<span class="fourth-name">备注</span>
<span>{{dataDetail.ABNORMALAUDIT_DESC || ''}}</span>
</view>
</view>
</view>
</template>
<script>
import {mapGetters,mapMutations} from 'vuex'
export default {
data() {
return {
pageData: {
type: null,
id: null
},
loading: true,
abnormalauditType: null,
eraseType: null,
isvalid: null,
dataDetail: {},
}
},
methods: {
...mapMutations(['shouldReLoadingList']),
/**
* 调用接口获取数据详情
*
* Api接口地址EShangApiMain/Audit/GetABNORMALAUDITDetail
*/
getDetail(option) {
this.$request.$webGetTest("EShangApiMain/Audit/GetABNORMALAUDITDetail", {
//
ABNORMALAUDITId: option.ABNORMALAUDITId,
})
.then(res => {
uni.hideLoading()
this.loading = false
if (res.Result_Code !== 100) {
return
}
this.dataDetail = res.Result_Data
})
},
//
async getType() {
this.abnormalauditType = await this.$util.getFieldEnumByField({
FieldExplainField: 'ABNORMALAUDIT_TYPE'
})
this.eraseType = await this.$util.getFieldEnumByField({
FieldExplainField: 'ERASE_TYPE'
})
this.isvalid = await this.$util.getFieldEnumByField({
FieldExplainField: 'ISVALID'
})
}
},
onLoad(option) {
uni.showLoading()
this.pageData = option
this.loading = true
this.getType()
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>

View File

@ -0,0 +1,439 @@
<template>
<view class="content">
<!-- 顶部筛选菜单 -->
<view class="uni-flex ai-center screen-box menu-list">
<view class="menu" v-for="(item,index) in menuList" :key="index" @click="handleClick(item)">
<view class="menu-image round" style="height:75rpx;width:75rpx;padding: 18rpx;"
:style="activeType==item.id ? 'background:#f0f7fe;' : 'background:#f6f7f8;'">
<image :src="activeType==item.id? item.active: item.src" mode="aspectFit" style="height:100%;"></image>
</view>
<view class="menuName" :style="activeType==item.id ? 'color:#5B96E9' :'color:#808D97'">{{item.name}}</view>
</view>
</view>
<!-- 数据卡片列表 -->
<view v-if="pageList.length>0">
<list-unit v-for="(item,index) in pageList" :key="index" :item="item" :i="index"
@goDetail="goDetail"></list-unit>
</view>
<!-- 无数据时的页面显示 -->
<view v-else-if="pageData.isLoading===false">
<noFound :nodata="pageList.length>0 ? false : true" :text="searchTime[0]+'至'+searchTime[1]+'无数据,'">
<text name="other">请选择其它日期进行查询</text>
</noFound>
</view>
<!-- 底部提示 -->
<view class="load-more" v-if="pageList.length>0">
<text>{{!pageData.isEnd ? '正在加载,请稍后...':'——— 我是有底线的 ———'}}</text>
</view>
<!-- 更多筛选的弹窗 -->
<UniPop :show="showPop" @hidePopup="closePop" type="bottom" @touchmove.prevent round="true">
<view class="padding-bottom">
<!-- 日期选项 -->
<view class="moduleTitle">{{popData.dateName}}</view>
<!-- 固定日期选项 -->
<view class="uni-flex align-center">
<view v-for="(d,index) in popData.dateList" :key="index" @click="selectDate(index,d.value)" class="tag-item"
:class="{'actived':dateIndex==index}">{{d.name}}</view>
</view>
<!-- 自定义日期选项 -->
<view class="uni-flex align-center screen-box" style="justify-content: space-between; margin: 0 120rpx;" v-if="popData.dateList[dateIndex].value==0">
<picker mode="date" @change="bindDateChange($event,0)" :value="searchTime[0]"
:end="pageData.endDate" start="2019/12/01" class="screen-unit">
<text>{{searchTime[0]}}</text>
<!-- <image src="/static/images/tab_down.png" mode="aspectFit"></image> -->
</picker>
<text class="mr20"></text>
<picker mode="date" @change="bindDateChange($event,1)" :value="searchTime[1]"
:end="pageData.endDate" start="2019/12/01" class="screen-unit">
<text>{{searchTime[1]}}</text>
<!-- <image src="/static/images/tab_down.png" mode="aspectFit"></image> -->
</picker>
</view>
<!-- 其他选项 -->
<view class="moduleTitle">{{popData.typeName}}</view>
<view class="uni-flex ai-center menu-list">
<view class="menu" v-for="(item,index) in popData.selectList" :key="index" @click="bindPartChange(item)">
<view class="menu-image round" style="height:74rpx;width:74rpx;border-radius:20rpx;line-height:74rpx;"
:style="'background:' + (popData.colors[index] ? popData.colors[index] : popData.colors[index-popData.colors.length]) + ';'">
<image :src="activeType==item.id ? item.active: item.src" mode="aspectFit" style="height:100%;"></image>
</view>
<view class="menuName" :style="selectTypeIndex==item.typeId ?
'color:' + (popData.colors[index]? popData.colors[index] :
popData.colors[index % 7]) : 'color:#120E2B'">{{item.name}}</view>
</view>
</view>
<view class="popbtn" @click="reloadList">确定</view>
</view>
</UniPop>
</view>
</template>
<script>
import {mapGetters,mapMutations} from 'vuex'
//
import ListUnit from "./components/listUnit.vue"
//
import UniPop from '@/components/uni-popup.vue'
export default {
components: {//import使
ListUnit,
UniPop
},
data() {//
const today = this.$util.cutDate(new Date(), 'YYYY/MM/DD')
const week = this.$util.cutDate(new Date(),'YYYY/MM/DD',-6)
const month = this.$util.cutDate(new Date(),'YYYY/MM/DD',-30)
const threeMonth = this.$util.cutDate(new Date(),'YYYY/MM/DD',-90)
return {
activeType: -1,//
selectTypeIndex: -1,//
dateIndex: 0, //
showPop: false,
searchTime: [week, today],
pageData: {
pageIndex: 1,
pageSize: 10,
isEnd: false,
isLoading: true,
endDate: today
},
menuList: [ //
{
name: '全部',
src: '/static/images/expense/type/yifq.png',
active: '/static/images/expense/type/yifqz.png',
id: -1
},
{
name: '长短款异常',
src: '/static/images/expense/type/yifq.png',
active: '/static/images/expense/type/yifqz.png',
id: 0
},
{
name: '结账前稽核',
src: '/static/images/expense/type/yifq.png',
active: '/static/images/expense/type/yifqz.png',
id: 2
},
{
name: '更多筛选',
src: '/static/images/expense/type/shaix.png',
active: '/static/images/expense/type/shaixz.png',
id: 99
},
],
popData:{
//
colors: ['#5B96E9', '#F0A038', '#5B96E9', '#57BAAE', '#D9675C', '#5B96E9', '#57BAAE'],
//
dateName:"日期",
//
dateList: [//
{
name: '近七天',
value: [week,today]
},
{
name: '近一月',
value: [month,today]
},
{
name: '近三月',
value: [threeMonth,today]
},
{
name: '自定义',
value: 0
},
],
typeName:"抹平状态",
selectList: [//
{
name: '全部',
src: '/static/images/expense/type/qb.png',
typeId: -1
},
{
name: '长短款相同',
src: '/static/images/expense/type/qb.png',
typeId: 0
},
{
name: '长短款不相同',
src: '/static/images/expense/type/qb.png',
typeId: 1
},
{
name: '长短款抹平',
src: '/static/images/expense/type/qb.png',
typeId: 2
},
],
},
pageList: []
}
},
computed: {// data
...mapGetters({
reloading: 'shouldReLoadingList'
})
},
methods: {//
...mapMutations(['shouldReLoadingList']),
selectDate(dayIndex, dayValue) {
this.dateIndex = dayIndex
if (dayValue !== 0) {
this.searchTime = this.popData.dateList[this.dateIndex].value
}
this.$forceUpdate()
},
/**
* 日期缓存刷新
* @param {Object} e
* @param {Object} index
*/
bindDateChange(e, index) {
this.searchTime[index] = e.detail.value
this.$forceUpdate()
},
/**
* 查询数据稽查数据
*/
searchList() {
uni.showLoading({
title: '正在加载'
})
this.pageData.isLoading = true
this.pageData.isEnd = false
this.pageData.pageIndex = 1
this.getList()
uni.pageScrollTo({
scrollTop: 0,
duration: 300
})
},
/**
* 调用接口获取
*
* Api接口地址EShangApiMain/Audit/GetABNORMALAUDITList
*/
getList() {
this.$request.$webPostTest("EShangApiMain/Audit/GetABNORMALAUDITList", {
QueryType: 0,//01
SearchParameter: {
//
ABNORMALAUDIT_TYPE: this.activeType === -1 ? null : this.activeType,
CHECK_STARTDATE_SEARCH: this.searchTime[0],
CHECK_ENDDATE_SEARCH: this.searchTime[1],
ERASE_TYPE: this.selectTypeIndex === -1 ? null : this.selectTypeIndex
},
pageIndex: this.pageData.pageIndex,
pageSize: this.pageData.pageSize,
}).then(res => {
if (!res.Result_Code || res.Result_Code != 100) {
this.pageData.isLoading = false
this.pageList = []
} else {
//
let list = res.Result_Data.List.filter(p => {
//if (this.activeType == 1) {
//return p.CHECKACCOUNT_DESC.length == 0
//} else if (this.activeType == 2) {
//return p.CHECKACCOUNT_DESC.length > 0
//} else {
return true
//}
})
if (list.length > 0) {
if (this.pageData.pageIndex == 1) {
this.pageList = list
} else {
this.pageList = [...this.pageList, ...list]
}
}
if (list.length < this.pageData.pageSize) { //
this.pageData.isEnd = true
}
this.$forceUpdate()
}
uni.hideLoading()
let _this = this
setTimeout(function() {
_this.pageData.isLoading = false
}, 500)
})
},
/**
* 加载下一页
*/
loadMore() {
if (!this.pageData.isEnd) {
this.pageData.pageIndex += 1
this.getList()
}
},
/**
* 绑定信息卡片点击跳转页面
* @param {Object} item
*/
goDetail(item) {
this.$util.toNextRoute('navigateTo', '/pages/autoTest/abnormalaudit/detail?ABNORMALAUDITId=' + item.ABNORMALAUDIT_ID)
},
reloadList() {
this.showPop = false
this.pageData.pageIndex = 1
uni.showLoading({
title: '正在加载'
})
this.pageData.isLoading = true
this.pageData.isEnd = false
this.pageList = []
this.getList()
this.$forceUpdate()
},
closePop() {
this.showPop = false
},
handleClick(item) {//
if (item.id == 99) {// id=99
this.showPop = true
} else {
this.activeType = item.id
this.reloadList()
}
},
bindPartChange(item) {
this.selectTypeIndex = item.typeId
},
},
onPullDownRefresh() {
uni.showLoading({
title: '正在加载'
})
this.pageData.pageIndex = 1
this.pageData.isLoading = true
this.pageData.isEnd = false
this.getList()
setTimeout(function() {
uni.stopPullDownRefresh()
}, 1000)
},
//
onReachBottom() {
//
this.loadMore()
},
//
onShow() {
let _this = this
if (this.reloading) {
uni.showLoading({
title: '正在加载'
})
this.pageData.isLoading = true
this.pageData.pageIndex = 1
this.pageData.isEnd = false
this.getList()
this.shouldReLoadingList(false)
}
},
//
onLoad() {
uni.showLoading({
title: '正在加载'
})
this.pageData.isLoading = true
this.getList()
},
//
onUnload() {
this.$util.addUserBehavior()
},
}
</script>
<style scoped>
.menu-list {//
width: 100%;
background-color: #fff;
flex-wrap: wrap;
}
.moduleTitle {
text-align: left;
margin: 16rpx 0 0 24rpx;
font-weight: 700;
font-size: 30rpx;
padding: 24rpx 0 12rpx 0;
}
.popbtn {
width: 639rpx;
height: 80rpx;
line-height: 80rpx;
color: #fff;
font-size: 28rpx;
background: #5b96e9;
border-radius: 8rpx;
margin: 48rpx auto 24rpx auto;
}
.screen-box {
background-color: #fff;
padding: 0 0rpx;
position: sticky;
top: 0;
z-index: 1;
}
.screen-box .screen-unit {
display: flex;
align-items: center;
width: auto;
padding: 0 0rpx;
line-height: 3;
}
.screen-box text {
line-height: 3;
}
.tag-item {
width: 150rpx;
height: 66rpx;
background: #ffffff;
border: 1rpx solid #efefef;
border-radius: 8rpx;
color: #808D97;
font-size: 24rpx;
text-align: center;
line-height: 64rpx;
margin: 24rpx 0 24rpx 24rpx;
}
.tag-item.actived {
background: #e8f3fd;
border: 1rpx solid #e8f3fd;
color: #4D95F0;
}
.padding-bottom {
padding-bottom: 24rpx;
}
.round {
border-radius: 50%;
}
.menu {
text-align: center;
min-width: 185rpx;
padding: 24rpx 0;
}
.menuName {
color: #120E2B;
font-size: 24rpx;
text-align: center;
margin-top: 16rpx;
}
.menu-image {
padding: 12rpx 8rpx;
height: 80rpx;
box-sizing: border-box;
margin: 0 auto;
text-align: center;
}
.menu-image image {
max-width: 100%;
max-height: 100%;
}
</style>

View File

@ -0,0 +1,122 @@
<template>
<view class="card cardBorder" @tap='goDetail' v-if="item">
<!-- 卡片第一行数据 -->
<view class="uni-flex jc-between">
<!-- 左侧 -->
<!-- 服务区名称 -->
<p class="contentName">{{item.SERVERPART_NAME || ''}}</p>
<!-- 右侧 -->
<!-- 服务区索引 -->
<text class="typeText">{{item.SERVERPART_INDEX !== null ?
item.SERVERPART_INDEX : ''}}</text>
</view>
<!-- 卡片第一行角标 -->
<view class="content-index" style="background-color:#FB8B56">{{i+1}}</view>
<!-- 卡片第二行数据 -->
<view class="uni-flex jc-between">
<!-- 左侧 -->
<!-- 归属区域名字 -->
<text class="content-type-text">{{item.SPREGIONTYPE_NAME || ''}}</text>
</view>
<!-- 卡片第三行数据 -->
<view class="uni-flex content-box-cashpay">
<!-- 中间 -->
<!-- 稽核金额 -->
<text class="content-price">{{item.CHECK_CASHPAY !== null ?
item.CHECK_CASHPAY : ''}}</text>
<text style="font-size: 24upx;"></text>
<!-- 右侧 -->
<!-- 对客现金 -->
<text class="other-coast">{{item.CASH_PAYMENT !== null ?
item.CASH_PAYMENT : ''}}</text>
</view>
<!-- 分割线 -->
<view class="bb1"></view>
<!-- 卡片第四行顶部数据 -->
<view class="uni-flex jc-between align-center" v-if="item.DIFFERENT_PRICE || item.TOTALSELLAMOUNT">
<!-- 左侧 -->
<view class="uni-flex align-top">
<!-- 长短款额 -->
<!-- 圆点 -->
<text class="G-icon A-icon"></text>
<span class="content-span">长短款额{{item.DIFFERENT_PRICE !== null ?
item.DIFFERENT_PRICE : ''}}</span>
</view>
<!-- 右侧 -->
<!-- 对客营收 -->
<text class="content-span lh15">{{item.TOTALSELLAMOUNT !== null ?
item.TOTALSELLAMOUNT : ''}}</text>
</view>
<!-- 卡片第四行中间数据 -->
<view class="uni-flex jc-between" v-if="item.DIFFERENT_PRICE_Less">
<!-- 左侧 -->
<view class="uni-flex align-top">
<!-- 短款合计 -->
<!-- 圆点 -->
<p class="B-icon A-icon"></p>
<span class="content-span">短款合计{{item.DIFFERENT_PRICE_Less !== null ?
item.DIFFERENT_PRICE_Less : ''}}</span>
</view>
</view>
<!-- 卡片第四行底部数据 -->
<view class="uni-flex jc-between" v-if="item.DIFFERENT_PRICE_More">
<!-- 左侧 -->
<view class="uni-flex align-top">
<!-- 长款合计 -->
<!-- 圆点 -->
<p class="G-icon A-icon"></p>
<span class="content-span">长款合计{{item.DIFFERENT_PRICE_More !== null ?
item.DIFFERENT_PRICE_More : ''}}</span>
</view>
</view>
</view>
</template>
<script>
export default {
props: {//
item: {
type: Object,
required: true
},
i: {
type: Number,
required: true
},
},
data() {//
return {
}
},
computed: {},
methods: {//
goDetail() {
this.$emit('goDetail', this.item)
},
dateEmpty(v) {
return this.$util.cutDate(v, 'YYYY/MM/DD')
},
},
}
</script>
<!-- 注意style样式增加scoped私有属性标记后组件样式不能在引用的地方进行修改 -->
<style scoped>
@import url('/common/css/listUnit.css');
.cardBorder {//
box-shadow: 0 0px 6rpx #E2E2E2;
}
.content-box-cashpay {
position: relative;
}
.other-coast {//
color: #D1A271;
background: linear-gradient(to top, #EBDDCF, #FCFBF8);
border-radius: 6rpx;
font-size: 20rpx;
padding: 0 10rpx;
margin-left: 16rpx;
margin-top: 3rpx;
position: absolute;
right: 0rpx;
bottom: 30rpx;
}
</style>

View File

@ -0,0 +1,195 @@
<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.CHECK_CASHPAY !== null ?
dataDetail.CHECK_CASHPAY : ''}}</span>
</view>
<!-- 顶部信息卡片第二行 -->
<view class="uni-flex ai-center jc-between fs12">
<!-- 左侧 -->
<span>归属区域名字{{dataDetail.SPREGIONTYPE_NAME || ''}}</span>
<!-- 右侧 -->
<span>长短款额{{dataDetail.DIFFERENT_PRICE !== null ?
dataDetail.DIFFERENT_PRICE : ''}}</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.SPREGIONTYPE_NAME || ''}}</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.TOTALSELLAMOUNT !== null ?
dataDetail.TOTALSELLAMOUNT : ''}}</span>
</view>
<!-- 对客现金 -->
<view class="cellTopStyle">
<span class="fourth-name">对客现金</span>
<span>{{dataDetail.CASH_PAYMENT !== null ?
dataDetail.CASH_PAYMENT : ''}}</span>
</view>
<!-- 稽核金额 -->
<view class="cellTopStyle">
<span class="fourth-name">稽核金额</span>
<span>{{dataDetail.CHECK_CASHPAY !== null ?
dataDetail.CHECK_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.DIFFERENT_PRICE_Less !== null ?
dataDetail.DIFFERENT_PRICE_Less : ''}}</span>
</view>
<!-- 长款合计 -->
<view class="cellTopStyle">
<span class="fourth-name">长款合计</span>
<span>{{dataDetail.DIFFERENT_PRICE_More !== null ?
dataDetail.DIFFERENT_PRICE_More : ''}}</span>
</view>
<!-- 账期总销售额 -->
<view class="cellTopStyle">
<span class="fourth-name">账期总销售额</span>
<span>{{dataDetail.ENDACCOUNT_REVENUE !== null ?
dataDetail.ENDACCOUNT_REVENUE : ''}}</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/GetAbnormalauditReport
*/
getDetail(option) {
this.$request.$webGetTest("EShangApiMain/AutoTest/GetAbnormalauditReport", {
//
SERVERPART_ID: option.SERVERPART_ID,
CHECK_ENDDATE_Start: option.CHECK_ENDDATE_Start,
CHECK_ENDDATE_End: option.CHECK_ENDDATE_End,
})
.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>

View File

@ -0,0 +1,435 @@
<template>
<view class="content">
<!-- 顶部筛选菜单 -->
<view class="uni-flex ai-center screen-box menu-list">
<view class="menu" v-for="(item,index) in menuList" :key="index" @click="handleClick(item)">
<view class="menu-image round" style="height:75rpx;width:75rpx;padding: 18rpx;"
:style="activeType==item.id ? 'background:#f0f7fe;' : 'background:#f6f7f8;'">
<image :src="activeType==item.id? item.active: item.src" mode="aspectFit" style="height:100%;"></image>
</view>
<view class="menuName" :style="activeType==item.id ? 'color:#5B96E9' :'color:#808D97'">{{item.name}}</view>
</view>
</view>
<!-- 数据卡片列表 -->
<view v-if="pageList.length>0">
<list-unit v-for="(item,index) in pageList" :key="index" :item="item" :i="index"
@goDetail="goDetail"></list-unit>
</view>
<!-- 无数据时的页面显示 -->
<view v-else-if="pageData.isLoading===false">
<noFound :nodata="pageList.length>0 ? false : true" :text="searchTime[0]+'至'+searchTime[1]+'无数据,'">
<text name="other">请选择其它日期进行查询</text>
</noFound>
</view>
<!-- 底部提示 -->
<view class="load-more" v-if="pageList.length>0">
<text>{{!pageData.isEnd ? '正在加载,请稍后...':'——— 我是有底线的 ———'}}</text>
</view>
<!-- 更多筛选的弹窗 -->
<UniPop :show="showPop" @hidePopup="closePop" type="bottom" @touchmove.prevent round="true">
<view class="padding-bottom">
<!-- 日期选项 -->
<view class="moduleTitle">{{popData.dateName}}</view>
<!-- 固定日期选项 -->
<view class="uni-flex align-center">
<view v-for="(d,index) in popData.dateList" :key="index" @click="selectDate(index,d.value)" class="tag-item"
:class="{'actived':dateIndex==index}">{{d.name}}</view>
</view>
<!-- 自定义日期选项 -->
<view class="uni-flex align-center screen-box" style="justify-content: space-between; margin: 0 120rpx;" v-if="popData.dateList[dateIndex].value==0">
<picker mode="date" @change="bindDateChange($event,0)" :value="searchTime[0]"
:end="pageData.endDate" start="2019/12/01" class="screen-unit">
<text>{{searchTime[0]}}</text>
<!-- <image src="/static/images/tab_down.png" mode="aspectFit"></image> -->
</picker>
<text class="mr20"></text>
<picker mode="date" @change="bindDateChange($event,1)" :value="searchTime[1]"
:end="pageData.endDate" start="2019/12/01" class="screen-unit">
<text>{{searchTime[1]}}</text>
<!-- <image src="/static/images/tab_down.png" mode="aspectFit"></image> -->
</picker>
</view>
<!-- 其他选项 -->
<view class="moduleTitle">{{popData.typeName}}</view>
<view class="uni-flex ai-center menu-list">
<view class="menu" v-for="(item,index) in popData.selectList" :key="index" @click="bindPartChange(item)">
<view class="menu-image round" style="height:74rpx;width:74rpx;border-radius:20rpx;line-height:74rpx;"
:style="'background:' + (popData.colors[index] ? popData.colors[index] : popData.colors[index-popData.colors.length]) + ';'">
<image :src="activeType==item.id ? item.active: item.src" mode="aspectFit" style="height:100%;"></image>
</view>
<view class="menuName" :style="selectTypeIndex==item.typeId ?
'color:' + (popData.colors[index]? popData.colors[index] :
popData.colors[index % 7]) : 'color:#120E2B'">{{item.name}}</view>
</view>
</view>
<view class="popbtn" @click="reloadList">确定</view>
</view>
</UniPop>
</view>
</template>
<script>
import {mapGetters,mapMutations} from 'vuex'
//
import ListUnit from "./components/listUnit.vue"
//
import UniPop from '@/components/uni-popup.vue'
export default {
components: {//import使
ListUnit,
UniPop
},
data() {//
const today = this.$util.cutDate(new Date(), 'YYYY/MM/DD')
const week = this.$util.cutDate(new Date(),'YYYY/MM/DD',-6)
const month = this.$util.cutDate(new Date(),'YYYY/MM/DD',-30)
const threeMonth = this.$util.cutDate(new Date(),'YYYY/MM/DD',-90)
return {
activeType: -1,//
selectTypeIndex: -1,//
dateIndex: 0, //
showPop: false,
searchTime: [week, today],
pageData: {
pageIndex: 1,
pageSize: 10,
isEnd: false,
isLoading: true,
endDate: today
},
menuList: [ //
{
name: '全部',
src: '/static/images/expense/type/yifq.png',
active: '/static/images/expense/type/yifqz.png',
id: -1
},
{
name: '半小时内稽核',
src: '/static/images/expense/type/yifq.png',
active: '/static/images/expense/type/yifqz.png',
id: 1
},
{
name: '结账前稽核',
src: '/static/images/expense/type/yifq.png',
active: '/static/images/expense/type/yifqz.png',
id: 2
},
{
name: '更多筛选',
src: '/static/images/expense/type/shaix.png',
active: '/static/images/expense/type/shaixz.png',
id: 99
},
],
popData:{
//
colors: ['#5B96E9', '#F0A038', '#5B96E9', '#57BAAE', '#D9675C', '#5B96E9', '#57BAAE'],
//
dateName:"日期",
//
dateList: [//
{
name: '近七天',
value: [week,today]
},
{
name: '近一月',
value: [month,today]
},
{
name: '近三月',
value: [threeMonth,today]
},
{
name: '自定义',
value: 0
},
],
typeName:"抹平状态",
selectList: [//
{
name: '全部',
src: '/static/images/expense/type/qb.png',
typeId: -1
},
{
name: '长短款相同',
src: '/static/images/expense/type/qb.png',
typeId: 0
},
{
name: '长短款不相同',
src: '/static/images/expense/type/qb.png',
typeId: 1
},
{
name: '长短款抹平',
src: '/static/images/expense/type/qb.png',
typeId: 2
},
],
},
pageList: []
}
},
computed: {// data
...mapGetters({
reloading: 'shouldReLoadingList'
})
},
methods: {//
...mapMutations(['shouldReLoadingList']),
selectDate(dayIndex, dayValue) {
this.dateIndex = dayIndex
if (dayValue !== 0) {
this.searchTime = this.popData.dateList[this.dateIndex].value
}
this.$forceUpdate()
},
/**
* 日期缓存刷新
* @param {Object} e
* @param {Object} index
*/
bindDateChange(e, index) {
this.searchTime[index] = e.detail.value
this.$forceUpdate()
},
/**
* 查询数据稽查数据
*/
searchList() {
uni.showLoading({
title: '正在加载'
})
this.pageData.isLoading = true
this.pageData.isEnd = false
this.pageData.pageIndex = 1
this.getList()
uni.pageScrollTo({
scrollTop: 0,
duration: 300
})
},
/**
* 调用接口获取
*
* Api接口地址EShangApiMain/AutoTest/GetAbnormalauditReport
*/
getList() {
this.$request.$webGetTest("EShangApiMain/AutoTest/GetAbnormalauditReport", {
ABNORMALAUDIT_TYPE: this.activeType === -1 ? '' : this.activeType,
CHECK_ENDDATE_Start: this.searchTime[0],
CHECK_ENDDATE_End: this.searchTime[1],
ERASE_TYPE: this.selectTypeIndex === -1 ? '' : this.selectTypeIndex,
pageIndex: this.pageData.pageIndex,
pageSize: this.pageData.pageSize,
}).then(res => {
if (!res.Result_Code || res.Result_Code != 100) {
this.pageData.isLoading = false
this.pageList = []
} else {
//
let list = res.Result_Data.List.filter(p => {
//if (this.activeType == 1) {
//return p.CHECKACCOUNT_DESC.length == 0
//} else if (this.activeType == 2) {
//return p.CHECKACCOUNT_DESC.length > 0
//} else {
return true
//}
})
if (list.length > 0) {
if (this.pageData.pageIndex == 1) {
this.pageList = list
} else {
this.pageList = [...this.pageList, ...list]
}
}
if (list.length < this.pageData.pageSize) { //
this.pageData.isEnd = true
}
this.$forceUpdate()
}
uni.hideLoading()
let _this = this
setTimeout(function() {
_this.pageData.isLoading = false
}, 500)
})
},
/**
* 加载下一页
*/
loadMore() {
if (!this.pageData.isEnd) {
this.pageData.pageIndex += 1
this.getList()
}
},
/**
* 绑定信息卡片点击跳转页面
* @param {Object} item
*/
goDetail(item) {
this.$util.toNextRoute('navigateTo', '/pages/autoTest/abnormalauditreport/detail?SERVERPART_ID=' + item.SERVERPART_ID + '&CHECK_ENDDATE_Start=' + this.searchTime[0] + '&CHECK_ENDDATE_End=' + this.searchTime[1])
},
reloadList() {
this.showPop = false
this.pageData.pageIndex = 1
uni.showLoading({
title: '正在加载'
})
this.pageData.isLoading = true
this.pageData.isEnd = false
this.pageList = []
this.getList()
this.$forceUpdate()
},
closePop() {
this.showPop = false
},
handleClick(item) {//
if (item.id == 99) {// id=99
this.showPop = true
} else {
this.activeType = item.id
this.reloadList()
}
},
bindPartChange(item) {
this.selectTypeIndex = item.typeId
},
},
onPullDownRefresh() {
uni.showLoading({
title: '正在加载'
})
this.pageData.pageIndex = 1
this.pageData.isLoading = true
this.pageData.isEnd = false
this.getList()
setTimeout(function() {
uni.stopPullDownRefresh()
}, 1000)
},
//
onReachBottom() {
//
this.loadMore()
},
//
onShow() {
let _this = this
if (this.reloading) {
uni.showLoading({
title: '正在加载'
})
this.pageData.isLoading = true
this.pageData.pageIndex = 1
this.pageData.isEnd = false
this.getList()
this.shouldReLoadingList(false)
}
},
//
onLoad() {
uni.showLoading({
title: '正在加载'
})
this.pageData.isLoading = true
this.getList()
},
//
onUnload() {
this.$util.addUserBehavior()
},
}
</script>
<style scoped>
.menu-list {//
width: 100%;
background-color: #fff;
flex-wrap: wrap;
}
.moduleTitle {
text-align: left;
margin: 16rpx 0 0 24rpx;
font-weight: 700;
font-size: 30rpx;
padding: 24rpx 0 12rpx 0;
}
.popbtn {
width: 639rpx;
height: 80rpx;
line-height: 80rpx;
color: #fff;
font-size: 28rpx;
background: #5b96e9;
border-radius: 8rpx;
margin: 48rpx auto 24rpx auto;
}
.screen-box {
background-color: #fff;
padding: 0 0rpx;
position: sticky;
top: 0;
z-index: 1;
}
.screen-box .screen-unit {
display: flex;
align-items: center;
width: auto;
padding: 0 0rpx;
line-height: 3;
}
.screen-box text {
line-height: 3;
}
.tag-item {
width: 150rpx;
height: 66rpx;
background: #ffffff;
border: 1rpx solid #efefef;
border-radius: 8rpx;
color: #808D97;
font-size: 24rpx;
text-align: center;
line-height: 64rpx;
margin: 24rpx 0 24rpx 24rpx;
}
.tag-item.actived {
background: #e8f3fd;
border: 1rpx solid #e8f3fd;
color: #4D95F0;
}
.padding-bottom {
padding-bottom: 24rpx;
}
.round {
border-radius: 50%;
}
.menu {
text-align: center;
min-width: 185rpx;
padding: 24rpx 0;
}
.menuName {
color: #120E2B;
font-size: 24rpx;
text-align: center;
margin-top: 16rpx;
}
.menu-image {
padding: 12rpx 8rpx;
height: 80rpx;
box-sizing: border-box;
margin: 0 auto;
text-align: center;
}
.menu-image image {
max-width: 100%;
max-height: 100%;
}
</style>

View File

@ -0,0 +1,121 @@
<template>
<view class="card cardBorder" @tap='goDetail' v-if="item">
<!-- 卡片第一行数据 -->
<view class="uni-flex jc-between">
<!-- 左侧 -->
<!-- 服务区名称 -->
<p class="contentName">{{item.SERVERPART_NAME || ''}}</p>
</view>
<!-- 卡片第一行角标 -->
<view class="content-index" style="background-color:#FB8B56">{{i+1}}</view>
<!-- 卡片第二行数据 -->
<view class="uni-flex jc-between">
<!-- 左侧 -->
<!-- 归属区域名字 -->
<text class="content-type-text">{{item.SPREGIONTYPE_NAME || ''}}</text>
</view>
<!-- 卡片第三行数据 -->
<view class="uni-flex content-box-cashpay">
<!-- 中间 -->
<!-- 长短款额 -->
<text class="content-price">{{item.DIFFERENT_PRICE !== null ?
item.DIFFERENT_PRICE : ''}}</text>
<text style="font-size: 24upx;"></text>
<!-- 右侧 -->
<!-- 稽查类型 -->
<text class="other-coast">{{item.CHECK_TYPE || ''}}</text>
</view>
<!-- 分割线 -->
<view class="bb1"></view>
<!-- 卡片第四行顶部数据 -->
<view class="uni-flex jc-between align-center" v-if="item.ABNORMALAUDIT_TYPE">
<!-- 左侧 -->
<view class="uni-flex align-top">
<!-- 异常类型 -->
<!-- 圆点 -->
<text class="G-icon A-icon"></text>
<span class="content-span">异常类型{{item.ABNORMALAUDIT_TYPE !== null ?
abnormalauditType[item.ABNORMALAUDIT_TYPE] : ''}}</span>
</view>
</view>
<!-- 卡片第四行中间数据 -->
<view class="uni-flex jc-between" v-if="item.ERASE_TYPE">
<!-- 左侧 -->
<view class="uni-flex align-top">
<!-- 抹平状态 -->
<!-- 圆点 -->
<p class="B-icon A-icon"></p>
<span class="content-span">抹平状态{{item.ERASE_TYPE !== null ?
eraseType[item.ERASE_TYPE] : ''}}</span>
</view>
</view>
<!-- 卡片第四行底部数据 -->
<view class="uni-flex jc-between" v-if="item.CHECK_CASHPAY">
<!-- 左侧 -->
<view class="uni-flex align-top">
<!-- 稽核金额 -->
<!-- 圆点 -->
<p class="G-icon A-icon"></p>
<span class="content-span">稽核金额{{item.CHECK_CASHPAY !== null ?
item.CHECK_CASHPAY : ''}}</span>
</view>
</view>
</view>
</template>
<script>
export default {
props: {//
item: {
type: Object,
required: true
},
i: {
type: Number,
required: true
},
abnormalauditType: {
type: Object,
required: false
},
eraseType: {
type: Object,
required: false
},
},
data() {//
return {
}
},
computed: {},
methods: {//
goDetail() {
this.$emit('goDetail', this.item)
},
dateEmpty(v) {
return this.$util.cutDate(v, 'YYYY/MM/DD')
},
},
}
</script>
<!-- 注意style样式增加scoped私有属性标记后组件样式不能在引用的地方进行修改 -->
<style scoped>
@import url('/common/css/listUnit.css');
.cardBorder {//
box-shadow: 0 0px 6rpx #E2E2E2;
}
.content-box-cashpay {
position: relative;
}
.other-coast {//
color: #D1A271;
background: linear-gradient(to top, #EBDDCF, #FCFBF8);
border-radius: 6rpx;
font-size: 20rpx;
padding: 0 10rpx;
margin-left: 16rpx;
margin-top: 3rpx;
position: absolute;
right: 0rpx;
bottom: 30rpx;
}
</style>

View File

@ -0,0 +1,205 @@
<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.DIFFERENT_PRICE !== null ?
dataDetail.DIFFERENT_PRICE : ''}}</span>
</view>
<!-- 顶部信息卡片第二行 -->
<view class="uni-flex ai-center jc-between fs12">
<!-- 左侧 -->
<span>归属区域名字{{dataDetail.SPREGIONTYPE_NAME || ''}}</span>
<!-- 右侧 -->
<span>稽查类型{{dataDetail.CHECK_TYPE || ''}}</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.SPREGIONTYPE_NAME || ''}}</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.ABNORMALAUDIT_TYPE !== null ?
abnormalauditType[dataDetail.ABNORMALAUDIT_TYPE] : ''}}</span>
</view>
<!-- 抹平状态 -->
<view class="cellTopStyle">
<span class="fourth-name">抹平状态</span>
<span>{{dataDetail.ERASE_TYPE !== null ?
eraseType[dataDetail.ERASE_TYPE] : ''}}</span>
</view>
<!-- 稽核金额 -->
<view class="cellTopStyle">
<span class="fourth-name">稽核金额</span>
<span>{{dataDetail.CHECK_CASHPAY !== null ?
dataDetail.CHECK_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.CHECK_TYPE || ''}}</span>
</view>
<!-- 服务区索引 -->
<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.SERVERPART_CODE || ''}}</span>
</view>
<!-- 归属区域索引 -->
<view class="cellTopStyle">
<span class="fourth-name">归属区域索引</span>
<span>{{dataDetail.SPREGIONTYPE_INDEX !== null ?
dataDetail.SPREGIONTYPE_INDEX : ''}}</span>
</view>
</view>
</view>
</template>
<script>
import {mapGetters,mapMutations} from 'vuex'
export default {
data() {
return {
pageData: {
type: null,
id: null
},
loading: true,
abnormalauditType: null,
eraseType: null,
dataDetail: {},
}
},
methods: {
...mapMutations(['shouldReLoadingList']),
/**
* 调用接口获取数据详情
*
* Api接口地址EShangApiMain/AutoTest/GetAbnormalauditSummary
*/
getDetail(option) {
this.$request.$webGetTest("EShangApiMain/AutoTest/GetAbnormalauditSummary", {
//
SERVERPART_ID: option.SERVERPART_ID,
ABNORMALAUDIT_TYPE: option.ABNORMALAUDIT_TYPE,
ERASE_TYPE: option.ERASE_TYPE,
})
.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
})
},
//
async getType() {
this.abnormalauditType = await this.$util.getFieldEnumByField({
FieldExplainField: 'ABNORMALAUDIT_TYPE'
})
this.eraseType = await this.$util.getFieldEnumByField({
FieldExplainField: 'ERASE_TYPE'
})
}
},
onLoad(option) {
uni.showLoading()
this.pageData = option
this.loading = true
this.getType()
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>

View File

@ -0,0 +1,449 @@
<template>
<view class="content">
<!-- 顶部筛选菜单 -->
<view class="uni-flex ai-center screen-box menu-list">
<view class="menu" v-for="(item,index) in menuList" :key="index" @click="handleClick(item)">
<view class="menu-image round" style="height:75rpx;width:75rpx;padding: 18rpx;"
:style="activeType==item.id ? 'background:#f0f7fe;' : 'background:#f6f7f8;'">
<image :src="activeType==item.id? item.active: item.src" mode="aspectFit" style="height:100%;"></image>
</view>
<view class="menuName" :style="activeType==item.id ? 'color:#5B96E9' :'color:#808D97'">{{item.name}}</view>
</view>
</view>
<!-- 数据卡片列表 -->
<view v-if="pageList.length>0">
<list-unit v-for="(item,index) in pageList" :key="index" :item="item" :i="index"
:abnormalauditType="abnormalauditType"
:eraseType="eraseType"
@goDetail="goDetail"></list-unit>
</view>
<!-- 无数据时的页面显示 -->
<view v-else-if="pageData.isLoading===false">
<noFound :nodata="pageList.length>0 ? false : true" :text="searchTime[0]+'至'+searchTime[1]+'无数据,'">
<text name="other">请选择其它日期进行查询</text>
</noFound>
</view>
<!-- 底部提示 -->
<view class="load-more" v-if="pageList.length>0">
<text>{{!pageData.isEnd ? '正在加载,请稍后...':'——— 我是有底线的 ———'}}</text>
</view>
<!-- 更多筛选的弹窗 -->
<UniPop :show="showPop" @hidePopup="closePop" type="bottom" @touchmove.prevent round="true">
<view class="padding-bottom">
<!-- 日期选项 -->
<view class="moduleTitle">{{popData.dateName}}</view>
<!-- 固定日期选项 -->
<view class="uni-flex align-center">
<view v-for="(d,index) in popData.dateList" :key="index" @click="selectDate(index,d.value)" class="tag-item"
:class="{'actived':dateIndex==index}">{{d.name}}</view>
</view>
<!-- 自定义日期选项 -->
<view class="uni-flex align-center screen-box" style="justify-content: space-between; margin: 0 120rpx;" v-if="popData.dateList[dateIndex].value==0">
<picker mode="date" @change="bindDateChange($event,0)" :value="searchTime[0]"
:end="pageData.endDate" start="2019/12/01" class="screen-unit">
<text>{{searchTime[0]}}</text>
<!-- <image src="/static/images/tab_down.png" mode="aspectFit"></image> -->
</picker>
<text class="mr20"></text>
<picker mode="date" @change="bindDateChange($event,1)" :value="searchTime[1]"
:end="pageData.endDate" start="2019/12/01" class="screen-unit">
<text>{{searchTime[1]}}</text>
<!-- <image src="/static/images/tab_down.png" mode="aspectFit"></image> -->
</picker>
</view>
<!-- 其他选项 -->
<view class="moduleTitle">{{popData.typeName}}</view>
<view class="uni-flex ai-center menu-list">
<view class="menu" v-for="(item,index) in popData.selectList" :key="index" @click="bindPartChange(item)">
<view class="menu-image round" style="height:74rpx;width:74rpx;border-radius:20rpx;line-height:74rpx;"
:style="'background:' + (popData.colors[index] ? popData.colors[index] : popData.colors[index-popData.colors.length]) + ';'">
<image :src="activeType==item.id ? item.active: item.src" mode="aspectFit" style="height:100%;"></image>
</view>
<view class="menuName" :style="selectTypeIndex==item.typeId ?
'color:' + (popData.colors[index]? popData.colors[index] :
popData.colors[index % 7]) : 'color:#120E2B'">{{item.name}}</view>
</view>
</view>
<view class="popbtn" @click="reloadList">确定</view>
</view>
</UniPop>
</view>
</template>
<script>
import {mapGetters,mapMutations} from 'vuex'
//
import ListUnit from "./components/listUnit.vue"
//
import UniPop from '@/components/uni-popup.vue'
export default {
components: {//import使
ListUnit,
UniPop
},
data() {//
const today = this.$util.cutDate(new Date(), 'YYYY/MM/DD')
const week = this.$util.cutDate(new Date(),'YYYY/MM/DD',-6)
const month = this.$util.cutDate(new Date(),'YYYY/MM/DD',-30)
const threeMonth = this.$util.cutDate(new Date(),'YYYY/MM/DD',-90)
return {
activeType: -1,//
selectTypeIndex: -1,//
dateIndex: 0, //
showPop: false,
searchTime: [week, today],
abnormalauditType: null,
eraseType: null,
pageData: {
pageIndex: 1,
pageSize: 10,
isEnd: false,
isLoading: true,
endDate: today
},
menuList: [ //
{
name: '全部',
src: '/static/images/expense/type/yifq.png',
active: '/static/images/expense/type/yifqz.png',
id: -1
},
{
name: '长短款异常',
src: '/static/images/expense/type/yifq.png',
active: '/static/images/expense/type/yifqz.png',
id: 0
},
{
name: '半小时内稽核',
src: '/static/images/expense/type/yifq.png',
active: '/static/images/expense/type/yifqz.png',
id: 1
},
{
name: '更多筛选',
src: '/static/images/expense/type/shaix.png',
active: '/static/images/expense/type/shaixz.png',
id: 99
},
],
popData:{
//
colors: ['#5B96E9', '#F0A038', '#5B96E9', '#57BAAE', '#D9675C', '#5B96E9', '#57BAAE'],
//
dateName:"日期",
//
dateList: [//
{
name: '近七天',
value: [week,today]
},
{
name: '近一月',
value: [month,today]
},
{
name: '近三月',
value: [threeMonth,today]
},
{
name: '自定义',
value: 0
},
],
typeName:"抹平状态",
selectList: [//
{
name: '全部',
src: '/static/images/expense/type/qb.png',
typeId: -1
},
{
name: '长短款相同',
src: '/static/images/expense/type/qb.png',
typeId: 0
},
{
name: '长短款不相同',
src: '/static/images/expense/type/qb.png',
typeId: 1
},
{
name: '长短款抹平',
src: '/static/images/expense/type/qb.png',
typeId: 2
},
],
},
pageList: []
}
},
computed: {// data
...mapGetters({
reloading: 'shouldReLoadingList'
})
},
methods: {//
...mapMutations(['shouldReLoadingList']),
selectDate(dayIndex, dayValue) {
this.dateIndex = dayIndex
if (dayValue !== 0) {
this.searchTime = this.popData.dateList[this.dateIndex].value
}
this.$forceUpdate()
},
/**
* 日期缓存刷新
* @param {Object} e
* @param {Object} index
*/
bindDateChange(e, index) {
this.searchTime[index] = e.detail.value
this.$forceUpdate()
},
/**
* 查询数据稽查数据
*/
searchList() {
uni.showLoading({
title: '正在加载'
})
this.pageData.isLoading = true
this.pageData.isEnd = false
this.pageData.pageIndex = 1
this.getList()
uni.pageScrollTo({
scrollTop: 0,
duration: 300
})
},
/**
* 调用接口获取
*
* Api接口地址EShangApiMain/AutoTest/GetAbnormalauditSummary
*/
getList() {
this.$request.$webGetTest("EShangApiMain/AutoTest/GetAbnormalauditSummary", {
ABNORMALAUDIT_TYPE: this.activeType === -1 ? '' : this.activeType,
CHECK_ENDDATE_Start: this.searchTime[0],
CHECK_ENDDATE_End: this.searchTime[1],
ERASE_TYPE: this.selectTypeIndex === -1 ? '' : this.selectTypeIndex,
pageIndex: this.pageData.pageIndex,
pageSize: this.pageData.pageSize,
}).then(res => {
if (!res.Result_Code || res.Result_Code != 100) {
this.pageData.isLoading = false
this.pageList = []
} else {
//
let list = res.Result_Data.List.filter(p => {
//if (this.activeType == 1) {
//return p.CHECKACCOUNT_DESC.length == 0
//} else if (this.activeType == 2) {
//return p.CHECKACCOUNT_DESC.length > 0
//} else {
return true
//}
})
if (list.length > 0) {
if (this.pageData.pageIndex == 1) {
this.pageList = list
} else {
this.pageList = [...this.pageList, ...list]
}
}
if (list.length < this.pageData.pageSize) { //
this.pageData.isEnd = true
}
this.$forceUpdate()
}
uni.hideLoading()
let _this = this
setTimeout(function() {
_this.pageData.isLoading = false
}, 500)
})
},
/**
* 加载下一页
*/
loadMore() {
if (!this.pageData.isEnd) {
this.pageData.pageIndex += 1
this.getList()
}
},
/**
* 绑定信息卡片点击跳转页面
* @param {Object} item
*/
goDetail(item) {
this.$util.toNextRoute('navigateTo', '/pages/autoTest/abnormalauditsummary/detail?SERVERPART_ID=' + item.SERVERPART_ID + '&ABNORMALAUDIT_TYPE=' + item.ABNORMALAUDIT_TYPE + '&ERASE_TYPE=' + item.ERASE_TYPE)
},
reloadList() {
this.showPop = false
this.pageData.pageIndex = 1
uni.showLoading({
title: '正在加载'
})
this.pageData.isLoading = true
this.pageData.isEnd = false
this.pageList = []
this.getList()
this.$forceUpdate()
},
closePop() {
this.showPop = false
},
handleClick(item) {//
if (item.id == 99) {// id=99
this.showPop = true
} else {
this.activeType = item.id
this.reloadList()
}
},
bindPartChange(item) {
this.selectTypeIndex = item.typeId
},
//
async getType() {
this.abnormalauditType = await this.$util.getFieldEnumByField({
FieldExplainField: 'ABNORMALAUDIT_TYPE'
})
this.eraseType = await this.$util.getFieldEnumByField({
FieldExplainField: 'ERASE_TYPE'
})
}
},
onPullDownRefresh() {
uni.showLoading({
title: '正在加载'
})
this.pageData.pageIndex = 1
this.pageData.isLoading = true
this.pageData.isEnd = false
this.getList()
setTimeout(function() {
uni.stopPullDownRefresh()
}, 1000)
},
//
onReachBottom() {
//
this.loadMore()
},
//
onShow() {
let _this = this
if (this.reloading) {
uni.showLoading({
title: '正在加载'
})
this.pageData.isLoading = true
this.pageData.pageIndex = 1
this.pageData.isEnd = false
this.getList()
this.shouldReLoadingList(false)
}
},
//
onLoad() {
uni.showLoading({
title: '正在加载'
})
this.pageData.isLoading = true
this.getList()
this.getType()
},
//
onUnload() {
this.$util.addUserBehavior()
},
}
</script>
<style scoped>
.menu-list {//
width: 100%;
background-color: #fff;
flex-wrap: wrap;
}
.moduleTitle {
text-align: left;
margin: 16rpx 0 0 24rpx;
font-weight: 700;
font-size: 30rpx;
padding: 24rpx 0 12rpx 0;
}
.popbtn {
width: 639rpx;
height: 80rpx;
line-height: 80rpx;
color: #fff;
font-size: 28rpx;
background: #5b96e9;
border-radius: 8rpx;
margin: 48rpx auto 24rpx auto;
}
.screen-box {
background-color: #fff;
padding: 0 0rpx;
position: sticky;
top: 0;
z-index: 1;
}
.screen-box .screen-unit {
display: flex;
align-items: center;
width: auto;
padding: 0 0rpx;
line-height: 3;
}
.screen-box text {
line-height: 3;
}
.tag-item {
width: 150rpx;
height: 66rpx;
background: #ffffff;
border: 1rpx solid #efefef;
border-radius: 8rpx;
color: #808D97;
font-size: 24rpx;
text-align: center;
line-height: 64rpx;
margin: 24rpx 0 24rpx 24rpx;
}
.tag-item.actived {
background: #e8f3fd;
border: 1rpx solid #e8f3fd;
color: #4D95F0;
}
.padding-bottom {
padding-bottom: 24rpx;
}
.round {
border-radius: 50%;
}
.menu {
text-align: center;
min-width: 185rpx;
padding: 24rpx 0;
}
.menuName {
color: #120E2B;
font-size: 24rpx;
text-align: center;
margin-top: 16rpx;
}
.menu-image {
padding: 12rpx 8rpx;
height: 80rpx;
box-sizing: border-box;
margin: 0 auto;
text-align: center;
}
.menu-image image {
max-width: 100%;
max-height: 100%;
}
</style>

View File

@ -0,0 +1,122 @@
<template>
<view class="card cardBorder" @tap='goDetail' v-if="item">
<!-- 卡片第一行数据 -->
<view class="uni-flex jc-between">
<!-- 左侧 -->
<!-- 服务区名称 -->
<p class="contentName">{{item.SERVERPART_NAME || ''}}</p>
<!-- 右侧 -->
<!-- 站点类型 -->
<text class="typeText">{{item.STATISTICS_TYPE !== null ?
serverpartsiteType[item.STATISTICS_TYPE] : ''}}</text>
</view>
<!-- 卡片第一行角标 -->
<view class="content-index" style="background-color:#FB8B56">{{i+1}}</view>
<!-- 卡片第二行数据 -->
<view class="uni-flex jc-between">
<!-- 左侧 -->
<!-- 片区名称 -->
<text class="content-type-text">{{item.SPREGIONTYPE_NAME || ''}}</text>
</view>
<!-- 卡片第三行数据 -->
<view class="uni-flex content-box-cashpay">
<!-- 中间 -->
<!-- 实收金额 -->
<text class="content-price">{{item.CASHPAY !== null ?
item.CASHPAY : ''}}</text>
<text style="font-size: 24upx;"></text>
<!-- 右侧 -->
<!-- 现金 -->
<text class="other-coast">{{item.CASH !== null ?
item.CASH : ''}}</text>
</view>
<!-- 分割线 -->
<view class="bb1"></view>
<!-- 卡片第四行顶部数据 -->
<view class="uni-flex jc-between align-center" v-if="item.TICKETCOUNT">
<!-- 左侧 -->
<view class="uni-flex align-top">
<!-- 客单数量 -->
<!-- 圆点 -->
<text class="G-icon A-icon"></text>
<span class="content-span">客单数量{{item.TICKETCOUNT !== null ?
item.TICKETCOUNT : ''}}</span>
</view>
</view>
<!-- 卡片第四行中间数据 -->
<view class="uni-flex jc-between" v-if="item.TOTALCOUNT">
<!-- 左侧 -->
<view class="uni-flex align-top">
<!-- 销售总数 -->
<!-- 圆点 -->
<p class="B-icon A-icon"></p>
<span class="content-span">销售总数{{item.TOTALCOUNT !== null ?
item.TOTALCOUNT : ''}}</span>
</view>
</view>
<!-- 卡片第四行底部数据 -->
<view class="uni-flex jc-between" v-if="item.DIFFERENT_PRICE">
<!-- 左侧 -->
<view class="uni-flex align-top">
<!-- 长短款 -->
<!-- 圆点 -->
<p class="G-icon A-icon"></p>
<span class="content-span">长短款{{item.DIFFERENT_PRICE !== null ?
item.DIFFERENT_PRICE : ''}}</span>
</view>
</view>
</view>
</template>
<script>
export default {
props: {//
item: {
type: Object,
required: true
},
i: {
type: Number,
required: true
},
serverpartsiteType: {
type: Object,
required: false
},
},
data() {//
return {
}
},
computed: {},
methods: {//
goDetail() {
this.$emit('goDetail', this.item)
},
dateEmpty(v) {
return this.$util.cutDate(v, 'YYYY/MM/DD')
},
},
}
</script>
<!-- 注意style样式增加scoped私有属性标记后组件样式不能在引用的地方进行修改 -->
<style scoped>
@import url('/common/css/listUnit.css');
.cardBorder {//
box-shadow: 0 0px 6rpx #E2E2E2;
}
.content-box-cashpay {
position: relative;
}
.other-coast {//
color: #D1A271;
background: linear-gradient(to top, #EBDDCF, #FCFBF8);
border-radius: 6rpx;
font-size: 20rpx;
padding: 0 10rpx;
margin-left: 16rpx;
margin-top: 3rpx;
position: absolute;
right: 0rpx;
bottom: 30rpx;
}
</style>

View File

@ -0,0 +1,208 @@
<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>
<!-- 右侧 -->
<span>长短款{{dataDetail.DIFFERENT_PRICE !== null ?
dataDetail.DIFFERENT_PRICE : ''}}</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_NAME || ''}}</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.CASHPAY !== null ?
dataDetail.CASHPAY : ''}}</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.DIFFERENT_PRICE !== null ?
dataDetail.DIFFERENT_PRICE : ''}}</span>
</view>
<!-- 站点类型 -->
<view class="cellTopStyle">
<span class="fourth-name">站点类型</span>
<span>{{dataDetail.STATISTICS_TYPE !== null ?
serverpartsiteType[dataDetail.STATISTICS_TYPE] : ''}}</span>
</view>
</view>
</view>
</template>
<script>
import {mapGetters,mapMutations} from 'vuex'
export default {
data() {
return {
pageData: {
type: null,
id: null
},
loading: true,
serverpartids: null,
serverpartsiteType: null,
dataDetail: {},
}
},
methods: {
...mapMutations(['shouldReLoadingList']),
/**
* 调用接口获取数据详情
*
* Api接口地址EShangApiMain/AutoTest/GetEndaccountReport
*/
getDetail(option) {
this.$request.$webGetTest("EShangApiMain/AutoTest/GetEndaccountReport", {
//
SearchStatisticsStartDate: option.SearchStatisticsStartDate,
SearchStatisticsEndDate: option.SearchStatisticsEndDate,
SERVERPART_ID: option.SERVERPART_ID,
})
.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
})
},
//
async getType() {
this.serverpartids = await this.$util.getFieldEnumByField({
FieldExplainField: 'ServerpartIds'
})
this.serverpartsiteType = await this.$util.getFieldEnumByField({
FieldExplainField: 'SERVERPARTSITE_TYPE'
})
}
},
onLoad(option) {
uni.showLoading()
this.pageData = option
this.loading = true
this.getType()
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>

View File

@ -0,0 +1,449 @@
<template>
<view class="content">
<!-- 顶部筛选菜单 -->
<view class="uni-flex ai-center screen-box menu-list">
<view class="menu" v-for="(item,index) in menuList" :key="index" @click="handleClick(item)">
<view class="menu-image round" style="height:75rpx;width:75rpx;padding: 18rpx;"
:style="activeType==item.id ? 'background:#f0f7fe;' : 'background:#f6f7f8;'">
<image :src="activeType==item.id? item.active: item.src" mode="aspectFit" style="height:100%;"></image>
</view>
<view class="menuName" :style="activeType==item.id ? 'color:#5B96E9' :'color:#808D97'">{{item.name}}</view>
</view>
</view>
<!-- 数据卡片列表 -->
<view v-if="pageList.length>0">
<list-unit v-for="(item,index) in pageList" :key="index" :item="item" :i="index"
:serverpartsiteType="serverpartsiteType"
@goDetail="goDetail"></list-unit>
</view>
<!-- 无数据时的页面显示 -->
<view v-else-if="pageData.isLoading===false">
<noFound :nodata="pageList.length>0 ? false : true" :text="searchTime[0]+'至'+searchTime[1]+'无数据,'">
<text name="other">请选择其它日期进行查询</text>
</noFound>
</view>
<!-- 底部提示 -->
<view class="load-more" v-if="pageList.length>0">
<text>{{!pageData.isEnd ? '正在加载,请稍后...':'——— 我是有底线的 ———'}}</text>
</view>
<!-- 更多筛选的弹窗 -->
<UniPop :show="showPop" @hidePopup="closePop" type="bottom" @touchmove.prevent round="true">
<view class="padding-bottom">
<!-- 日期选项 -->
<view class="moduleTitle">{{popData.dateName}}</view>
<!-- 固定日期选项 -->
<view class="uni-flex align-center">
<view v-for="(d,index) in popData.dateList" :key="index" @click="selectDate(index,d.value)" class="tag-item"
:class="{'actived':dateIndex==index}">{{d.name}}</view>
</view>
<!-- 自定义日期选项 -->
<view class="uni-flex align-center screen-box" style="justify-content: space-between; margin: 0 120rpx;" v-if="popData.dateList[dateIndex].value==0">
<picker mode="date" @change="bindDateChange($event,0)" :value="searchTime[0]"
:end="pageData.endDate" start="2019/12/01" class="screen-unit">
<text>{{searchTime[0]}}</text>
<!-- <image src="/static/images/tab_down.png" mode="aspectFit"></image> -->
</picker>
<text class="mr20"></text>
<picker mode="date" @change="bindDateChange($event,1)" :value="searchTime[1]"
:end="pageData.endDate" start="2019/12/01" class="screen-unit">
<text>{{searchTime[1]}}</text>
<!-- <image src="/static/images/tab_down.png" mode="aspectFit"></image> -->
</picker>
</view>
<!-- 其他选项 -->
<view class="moduleTitle">{{popData.typeName}}</view>
<view class="uni-flex ai-center menu-list">
<view class="menu" v-for="(item,index) in popData.selectList" :key="index" @click="bindPartChange(item)">
<view class="menu-image round" style="height:74rpx;width:74rpx;border-radius:20rpx;line-height:74rpx;"
:style="'background:' + (popData.colors[index] ? popData.colors[index] : popData.colors[index-popData.colors.length]) + ';'">
<image :src="activeType==item.id ? item.active: item.src" mode="aspectFit" style="height:100%;"></image>
</view>
<view class="menuName" :style="selectTypeIndex==item.typeId ?
'color:' + (popData.colors[index]? popData.colors[index] :
popData.colors[index % 7]) : 'color:#120E2B'">{{item.name}}</view>
</view>
</view>
<view class="popbtn" @click="reloadList">确定</view>
</view>
</UniPop>
</view>
</template>
<script>
import {mapGetters,mapMutations} from 'vuex'
//
import ListUnit from "./components/listUnit.vue"
//
import UniPop from '@/components/uni-popup.vue'
export default {
components: {//import使
ListUnit,
UniPop
},
data() {//
const today = this.$util.cutDate(new Date(), 'YYYY/MM/DD')
const week = this.$util.cutDate(new Date(),'YYYY/MM/DD',-6)
const month = this.$util.cutDate(new Date(),'YYYY/MM/DD',-30)
const threeMonth = this.$util.cutDate(new Date(),'YYYY/MM/DD',-90)
return {
activeType: -1,//
selectTypeIndex: -1,//
dateIndex: 0, //
showPop: false,
searchTime: [week, today],
serverpartsiteType: null,
pageData: {
pageIndex: 1,
pageSize: 10,
isEnd: false,
isLoading: true,
endDate: today
},
menuList: [ //
{
name: '全部',
src: '/static/images/expense/type/yifq.png',
active: '/static/images/expense/type/yifqz.png',
id: -1
},
{
name: '服务区',
src: '/static/images/expense/type/yifq.png',
active: '/static/images/expense/type/yifqz.png',
id: 1000
},
{
name: '加油站',
src: '/static/images/expense/type/yifq.png',
active: '/static/images/expense/type/yifqz.png',
id: 2000
},
{
name: '更多筛选',
src: '/static/images/expense/type/shaix.png',
active: '/static/images/expense/type/shaixz.png',
id: 99
},
],
popData:{
//
colors: ['#5B96E9', '#F0A038', '#5B96E9', '#57BAAE', '#D9675C', '#5B96E9', '#57BAAE'],
//
dateName:"日期",
//
dateList: [//
{
name: '近七天',
value: [week,today]
},
{
name: '近一月',
value: [month,today]
},
{
name: '近三月',
value: [threeMonth,today]
},
{
name: '自定义',
value: 0
},
],
typeName:"站点类型",
selectList: [//
{
name: '全部',
src: '/static/images/expense/type/qb.png',
typeId: -1
},
{
name: '替代服务区',
src: '/static/images/expense/type/qb.png',
typeId: 1001
},
{
name: '区域',
src: '/static/images/expense/type/qb.png',
typeId: 1010
},
{
name: '业务部门',
src: '/static/images/expense/type/qb.png',
typeId: 3000
},
{
name: '子公司',
src: '/static/images/expense/type/qb.png',
typeId: 4000
},
],
},
pageList: []
}
},
computed: {// data
...mapGetters({
reloading: 'shouldReLoadingList'
})
},
methods: {//
...mapMutations(['shouldReLoadingList']),
selectDate(dayIndex, dayValue) {
this.dateIndex = dayIndex
if (dayValue !== 0) {
this.searchTime = this.popData.dateList[this.dateIndex].value
}
this.$forceUpdate()
},
/**
* 日期缓存刷新
* @param {Object} e
* @param {Object} index
*/
bindDateChange(e, index) {
this.searchTime[index] = e.detail.value
this.$forceUpdate()
},
/**
* 查询数据稽查数据
*/
searchList() {
uni.showLoading({
title: '正在加载'
})
this.pageData.isLoading = true
this.pageData.isEnd = false
this.pageData.pageIndex = 1
this.getList()
uni.pageScrollTo({
scrollTop: 0,
duration: 300
})
},
/**
* 调用接口获取
*
* Api接口地址EShangApiMain/AutoTest/GetEndaccountReport
*/
getList() {
this.$request.$webGetTest("EShangApiMain/AutoTest/GetEndaccountReport", {
STATISTICS_TYPE: this.activeType === -1 ? '' : this.activeType,
SearchStatisticsStartDate: this.searchTime[0],
SearchStatisticsEndDate: this.searchTime[1],
STATISTICS_TYPE: this.selectTypeIndex === -1 ? '' : this.selectTypeIndex,
pageIndex: this.pageData.pageIndex,
pageSize: this.pageData.pageSize,
}).then(res => {
if (!res.Result_Code || res.Result_Code != 100) {
this.pageData.isLoading = false
this.pageList = []
} else {
//
let list = res.Result_Data.List.filter(p => {
//if (this.activeType == 1) {
//return p.CHECKACCOUNT_DESC.length == 0
//} else if (this.activeType == 2) {
//return p.CHECKACCOUNT_DESC.length > 0
//} else {
return true
//}
})
if (list.length > 0) {
if (this.pageData.pageIndex == 1) {
this.pageList = list
} else {
this.pageList = [...this.pageList, ...list]
}
}
if (list.length < this.pageData.pageSize) { //
this.pageData.isEnd = true
}
this.$forceUpdate()
}
uni.hideLoading()
let _this = this
setTimeout(function() {
_this.pageData.isLoading = false
}, 500)
})
},
/**
* 加载下一页
*/
loadMore() {
if (!this.pageData.isEnd) {
this.pageData.pageIndex += 1
this.getList()
}
},
/**
* 绑定信息卡片点击跳转页面
* @param {Object} item
*/
goDetail(item) {
this.$util.toNextRoute('navigateTo', '/pages/autoTest/endaccountreport/detail?SearchStatisticsStartDate=' + this.searchTime[0] + '&SearchStatisticsEndDate=' + this.searchTime[1] + '&SERVERPART_ID=' + item.SERVERPART_ID)
},
reloadList() {
this.showPop = false
this.pageData.pageIndex = 1
uni.showLoading({
title: '正在加载'
})
this.pageData.isLoading = true
this.pageData.isEnd = false
this.pageList = []
this.getList()
this.$forceUpdate()
},
closePop() {
this.showPop = false
},
handleClick(item) {//
if (item.id == 99) {// id=99
this.showPop = true
} else {
this.activeType = item.id
this.reloadList()
}
},
bindPartChange(item) {
this.selectTypeIndex = item.typeId
},
//
async getType() {
this.serverpartsiteType = await this.$util.getFieldEnumByField({
FieldExplainField: 'SERVERPARTSITE_TYPE'
})
}
},
onPullDownRefresh() {
uni.showLoading({
title: '正在加载'
})
this.pageData.pageIndex = 1
this.pageData.isLoading = true
this.pageData.isEnd = false
this.getList()
setTimeout(function() {
uni.stopPullDownRefresh()
}, 1000)
},
//
onReachBottom() {
//
this.loadMore()
},
//
onShow() {
let _this = this
if (this.reloading) {
uni.showLoading({
title: '正在加载'
})
this.pageData.isLoading = true
this.pageData.pageIndex = 1
this.pageData.isEnd = false
this.getList()
this.shouldReLoadingList(false)
}
},
//
onLoad() {
uni.showLoading({
title: '正在加载'
})
this.pageData.isLoading = true
this.getList()
this.getType()
},
//
onUnload() {
this.$util.addUserBehavior()
},
}
</script>
<style scoped>
.menu-list {//
width: 100%;
background-color: #fff;
flex-wrap: wrap;
}
.moduleTitle {
text-align: left;
margin: 16rpx 0 0 24rpx;
font-weight: 700;
font-size: 30rpx;
padding: 24rpx 0 12rpx 0;
}
.popbtn {
width: 639rpx;
height: 80rpx;
line-height: 80rpx;
color: #fff;
font-size: 28rpx;
background: #5b96e9;
border-radius: 8rpx;
margin: 48rpx auto 24rpx auto;
}
.screen-box {
background-color: #fff;
padding: 0 0rpx;
position: sticky;
top: 0;
z-index: 1;
}
.screen-box .screen-unit {
display: flex;
align-items: center;
width: auto;
padding: 0 0rpx;
line-height: 3;
}
.screen-box text {
line-height: 3;
}
.tag-item {
width: 150rpx;
height: 66rpx;
background: #ffffff;
border: 1rpx solid #efefef;
border-radius: 8rpx;
color: #808D97;
font-size: 24rpx;
text-align: center;
line-height: 64rpx;
margin: 24rpx 0 24rpx 24rpx;
}
.tag-item.actived {
background: #e8f3fd;
border: 1rpx solid #e8f3fd;
color: #4D95F0;
}
.padding-bottom {
padding-bottom: 24rpx;
}
.round {
border-radius: 50%;
}
.menu {
text-align: center;
min-width: 185rpx;
padding: 24rpx 0;
}
.menuName {
color: #120E2B;
font-size: 24rpx;
text-align: center;
margin-top: 16rpx;
}
.menu-image {
padding: 12rpx 8rpx;
height: 80rpx;
box-sizing: border-box;
margin: 0 auto;
text-align: center;
}
.menu-image image {
max-width: 100%;
max-height: 100%;
}
</style>

View File

@ -0,0 +1,103 @@
<template>
<view class="card cardBorder" @tap='goDetail' v-if="item">
<!-- 卡片第一行数据 -->
<view class="uni-flex jc-between">
<!-- 左侧 -->
<!-- 服务区名称 -->
<p class="contentName">{{item.SERVERPART_NAME || ''}}</p>
<!-- 右侧 -->
<!-- 服务区索引 -->
<text class="typeText">{{item.SERVERPART_INDEX !== null ?
item.SERVERPART_INDEX : ''}}</text>
</view>
<!-- 卡片第一行角标 -->
<view class="content-index" style="background-color:#FB8B56">{{i+1}}</view>
<!-- 卡片第二行数据 -->
<view class="uni-flex jc-between">
<!-- 左侧 -->
<!-- 归属区域名字 -->
<text class="content-type-text">{{item.SPREGIONTYPE_NAME || ''}}</text>
</view>
<!-- 卡片第三行数据 -->
<view class="uni-flex content-box-cashpay">
<!-- 中间 -->
<!-- 实收金额 -->
<text class="content-price">{{item.CASHPAY !== null ?
item.CASHPAY : ''}}</text>
<text style="font-size: 24upx;"></text>
</view>
<!-- 分割线 -->
<view class="bb1"></view>
<!-- 卡片第四行顶部数据 -->
<view class="uni-flex jc-between align-center" v-if="item.TICKETCOUNT">
<!-- 左侧 -->
<view class="uni-flex align-top">
<!-- 客单数量 -->
<!-- 圆点 -->
<text class="G-icon A-icon"></text>
<span class="content-span">客单数量{{item.TICKETCOUNT !== null ?
item.TICKETCOUNT : ''}}</span>
</view>
</view>
<!-- 卡片第四行中间数据 -->
<view class="uni-flex jc-between" v-if="item.TOTALCOUNT">
<!-- 左侧 -->
<view class="uni-flex align-top">
<!-- 销售总数 -->
<!-- 圆点 -->
<p class="B-icon A-icon"></p>
<span class="content-span">销售总数{{item.TOTALCOUNT !== null ?
item.TOTALCOUNT : ''}}</span>
</view>
</view>
</view>
</template>
<script>
export default {
props: {//
item: {
type: Object,
required: true
},
i: {
type: Number,
required: true
},
},
data() {//
return {
}
},
computed: {},
methods: {//
goDetail() {
this.$emit('goDetail', this.item)
},
dateEmpty(v) {
return this.$util.cutDate(v, 'YYYY/MM/DD')
},
},
}
</script>
<!-- 注意style样式增加scoped私有属性标记后组件样式不能在引用的地方进行修改 -->
<style scoped>
@import url('/common/css/listUnit.css');
.cardBorder {//
box-shadow: 0 0px 6rpx #E2E2E2;
}
.content-box-cashpay {
position: relative;
}
.other-coast {//
color: #D1A271;
background: linear-gradient(to top, #EBDDCF, #FCFBF8);
border-radius: 6rpx;
font-size: 20rpx;
padding: 0 10rpx;
margin-left: 16rpx;
margin-top: 3rpx;
position: absolute;
right: 0rpx;
bottom: 30rpx;
}
</style>

View File

@ -0,0 +1,246 @@
<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>

View File

@ -0,0 +1,430 @@
<template>
<view class="content">
<!-- 顶部筛选菜单 -->
<view class="uni-flex ai-center screen-box menu-list">
<view class="menu" v-for="(item,index) in menuList" :key="index" @click="handleClick(item)">
<view class="menu-image round" style="height:75rpx;width:75rpx;padding: 18rpx;"
:style="activeType==item.id ? 'background:#f0f7fe;' : 'background:#f6f7f8;'">
<image :src="activeType==item.id? item.active: item.src" mode="aspectFit" style="height:100%;"></image>
</view>
<view class="menuName" :style="activeType==item.id ? 'color:#5B96E9' :'color:#808D97'">{{item.name}}</view>
</view>
</view>
<!-- 数据卡片列表 -->
<view v-if="pageList.length>0">
<list-unit v-for="(item,index) in pageList" :key="index" :item="item" :i="index"
@goDetail="goDetail"></list-unit>
</view>
<!-- 无数据时的页面显示 -->
<view v-else-if="pageData.isLoading===false">
<noFound :nodata="pageList.length>0 ? false : true" :text="searchTime[0]+'至'+searchTime[1]+'无数据,'">
<text name="other">请选择其它日期进行查询</text>
</noFound>
</view>
<!-- 底部提示 -->
<view class="load-more" v-if="pageList.length>0">
<text>{{!pageData.isEnd ? '正在加载,请稍后...':'——— 我是有底线的 ———'}}</text>
</view>
<!-- 更多筛选的弹窗 -->
<UniPop :show="showPop" @hidePopup="closePop" type="bottom" @touchmove.prevent round="true">
<view class="padding-bottom">
<!-- 日期选项 -->
<view class="moduleTitle">{{popData.dateName}}</view>
<!-- 固定日期选项 -->
<view class="uni-flex align-center">
<view v-for="(d,index) in popData.dateList" :key="index" @click="selectDate(index,d.value)" class="tag-item"
:class="{'actived':dateIndex==index}">{{d.name}}</view>
</view>
<!-- 自定义日期选项 -->
<view class="uni-flex align-center screen-box" style="justify-content: space-between; margin: 0 120rpx;" v-if="popData.dateList[dateIndex].value==0">
<picker mode="date" @change="bindDateChange($event,0)" :value="searchTime[0]"
:end="pageData.endDate" start="2019/12/01" class="screen-unit">
<text>{{searchTime[0]}}</text>
<!-- <image src="/static/images/tab_down.png" mode="aspectFit"></image> -->
</picker>
<text class="mr20"></text>
<picker mode="date" @change="bindDateChange($event,1)" :value="searchTime[1]"
:end="pageData.endDate" start="2019/12/01" class="screen-unit">
<text>{{searchTime[1]}}</text>
<!-- <image src="/static/images/tab_down.png" mode="aspectFit"></image> -->
</picker>
</view>
<!-- 其他选项 -->
<view class="moduleTitle">{{popData.typeName}}</view>
<view class="uni-flex ai-center menu-list">
<view class="menu" v-for="(item,index) in popData.selectList" :key="index" @click="bindPartChange(item)">
<view class="menu-image round" style="height:74rpx;width:74rpx;border-radius:20rpx;line-height:74rpx;"
:style="'background:' + (popData.colors[index] ? popData.colors[index] : popData.colors[index-popData.colors.length]) + ';'">
<image :src="activeType==item.id ? item.active: item.src" mode="aspectFit" style="height:100%;"></image>
</view>
<view class="menuName" :style="selectTypeIndex==item.typeId ?
'color:' + (popData.colors[index]? popData.colors[index] :
popData.colors[index % 7]) : 'color:#120E2B'">{{item.name}}</view>
</view>
</view>
<view class="popbtn" @click="reloadList">确定</view>
</view>
</UniPop>
</view>
</template>
<script>
import {mapGetters,mapMutations} from 'vuex'
//
import ListUnit from "./components/listUnit.vue"
//
import UniPop from '@/components/uni-popup.vue'
export default {
components: {//import使
ListUnit,
UniPop
},
data() {//
const today = this.$util.cutDate(new Date(), 'YYYY/MM/DD')
const week = this.$util.cutDate(new Date(),'YYYY/MM/DD',-6)
const month = this.$util.cutDate(new Date(),'YYYY/MM/DD',-30)
const threeMonth = this.$util.cutDate(new Date(),'YYYY/MM/DD',-90)
return {
activeType: -1,//
selectTypeIndex: -1,//
dateIndex: 0, //
showPop: false,
searchTime: [week, today],
pageData: {
pageIndex: 1,
pageSize: 10,
isEnd: false,
isLoading: true,
endDate: today
},
menuList: [ //
{
name: '全部',
src: '/static/images/expense/type/yifq.png',
active: '/static/images/expense/type/yifqz.png',
id: -1
},
{
name: '服务区',
src: '/static/images/expense/type/yifq.png',
active: '/static/images/expense/type/yifqz.png',
id: 1000
},
{
name: '加油站',
src: '/static/images/expense/type/yifq.png',
active: '/static/images/expense/type/yifqz.png',
id: 2000
},
{
name: '更多筛选',
src: '/static/images/expense/type/shaix.png',
active: '/static/images/expense/type/shaixz.png',
id: 99
},
],
popData:{
//
colors: ['#5B96E9', '#F0A038', '#5B96E9', '#57BAAE', '#D9675C', '#5B96E9', '#57BAAE'],
//
dateName:"日期",
//
dateList: [//
{
name: '近七天',
value: [week,today]
},
{
name: '近一月',
value: [month,today]
},
{
name: '近三月',
value: [threeMonth,today]
},
{
name: '自定义',
value: 0
},
],
typeName:"统计类型",
selectList: [//
{
name: '全部',
src: '/static/images/expense/type/qb.png',
typeId: -1
},
{
name: '正式数据',
src: '/static/images/expense/type/qb.png',
typeId: 1000
},
{
name: '测试数据',
src: '/static/images/expense/type/qb.png',
typeId: 2000
},
],
},
pageList: []
}
},
computed: {// data
...mapGetters({
reloading: 'shouldReLoadingList'
})
},
methods: {//
...mapMutations(['shouldReLoadingList']),
selectDate(dayIndex, dayValue) {
this.dateIndex = dayIndex
if (dayValue !== 0) {
this.searchTime = this.popData.dateList[this.dateIndex].value
}
this.$forceUpdate()
},
/**
* 日期缓存刷新
* @param {Object} e
* @param {Object} index
*/
bindDateChange(e, index) {
this.searchTime[index] = e.detail.value
this.$forceUpdate()
},
/**
* 查询数据稽查数据
*/
searchList() {
uni.showLoading({
title: '正在加载'
})
this.pageData.isLoading = true
this.pageData.isEnd = false
this.pageData.pageIndex = 1
this.getList()
uni.pageScrollTo({
scrollTop: 0,
duration: 300
})
},
/**
* 调用接口获取
*
* Api接口地址EShangApiMain/AutoTest/GetServerpartReport
*/
getList() {
this.$request.$webGetTest("EShangApiMain/AutoTest/GetServerpartReport", {
STATISTICS_TYPE: this.activeType === -1 ? '' : this.activeType,
SearchStatisticsStartDate: this.searchTime[0],
SearchStatisticsEndDate: this.searchTime[1],
STATISTIC_TYPE: this.selectTypeIndex === -1 ? '' : this.selectTypeIndex,
pageIndex: this.pageData.pageIndex,
pageSize: this.pageData.pageSize,
}).then(res => {
if (!res.Result_Code || res.Result_Code != 100) {
this.pageData.isLoading = false
this.pageList = []
} else {
//
let list = res.Result_Data.List.filter(p => {
//if (this.activeType == 1) {
//return p.CHECKACCOUNT_DESC.length == 0
//} else if (this.activeType == 2) {
//return p.CHECKACCOUNT_DESC.length > 0
//} else {
return true
//}
})
if (list.length > 0) {
if (this.pageData.pageIndex == 1) {
this.pageList = list
} else {
this.pageList = [...this.pageList, ...list]
}
}
if (list.length < this.pageData.pageSize) { //
this.pageData.isEnd = true
}
this.$forceUpdate()
}
uni.hideLoading()
let _this = this
setTimeout(function() {
_this.pageData.isLoading = false
}, 500)
})
},
/**
* 加载下一页
*/
loadMore() {
if (!this.pageData.isEnd) {
this.pageData.pageIndex += 1
this.getList()
}
},
/**
* 绑定信息卡片点击跳转页面
* @param {Object} item
*/
goDetail(item) {
this.$util.toNextRoute('navigateTo', '/pages/autoTest/serverpartreport/detail?SERVERPART_ID=' + item.SERVERPART_ID + '&SearchStatisticsStartDate=' + this.searchTime[0] + '&SearchStatisticsEndDate=' + this.searchTime[1])
},
reloadList() {
this.showPop = false
this.pageData.pageIndex = 1
uni.showLoading({
title: '正在加载'
})
this.pageData.isLoading = true
this.pageData.isEnd = false
this.pageList = []
this.getList()
this.$forceUpdate()
},
closePop() {
this.showPop = false
},
handleClick(item) {//
if (item.id == 99) {// id=99
this.showPop = true
} else {
this.activeType = item.id
this.reloadList()
}
},
bindPartChange(item) {
this.selectTypeIndex = item.typeId
},
},
onPullDownRefresh() {
uni.showLoading({
title: '正在加载'
})
this.pageData.pageIndex = 1
this.pageData.isLoading = true
this.pageData.isEnd = false
this.getList()
setTimeout(function() {
uni.stopPullDownRefresh()
}, 1000)
},
//
onReachBottom() {
//
this.loadMore()
},
//
onShow() {
let _this = this
if (this.reloading) {
uni.showLoading({
title: '正在加载'
})
this.pageData.isLoading = true
this.pageData.pageIndex = 1
this.pageData.isEnd = false
this.getList()
this.shouldReLoadingList(false)
}
},
//
onLoad() {
uni.showLoading({
title: '正在加载'
})
this.pageData.isLoading = true
this.getList()
},
//
onUnload() {
this.$util.addUserBehavior()
},
}
</script>
<style scoped>
.menu-list {//
width: 100%;
background-color: #fff;
flex-wrap: wrap;
}
.moduleTitle {
text-align: left;
margin: 16rpx 0 0 24rpx;
font-weight: 700;
font-size: 30rpx;
padding: 24rpx 0 12rpx 0;
}
.popbtn {
width: 639rpx;
height: 80rpx;
line-height: 80rpx;
color: #fff;
font-size: 28rpx;
background: #5b96e9;
border-radius: 8rpx;
margin: 48rpx auto 24rpx auto;
}
.screen-box {
background-color: #fff;
padding: 0 0rpx;
position: sticky;
top: 0;
z-index: 1;
}
.screen-box .screen-unit {
display: flex;
align-items: center;
width: auto;
padding: 0 0rpx;
line-height: 3;
}
.screen-box text {
line-height: 3;
}
.tag-item {
width: 150rpx;
height: 66rpx;
background: #ffffff;
border: 1rpx solid #efefef;
border-radius: 8rpx;
color: #808D97;
font-size: 24rpx;
text-align: center;
line-height: 64rpx;
margin: 24rpx 0 24rpx 24rpx;
}
.tag-item.actived {
background: #e8f3fd;
border: 1rpx solid #e8f3fd;
color: #4D95F0;
}
.padding-bottom {
padding-bottom: 24rpx;
}
.round {
border-radius: 50%;
}
.menu {
text-align: center;
min-width: 185rpx;
padding: 24rpx 0;
}
.menuName {
color: #120E2B;
font-size: 24rpx;
text-align: center;
margin-top: 16rpx;
}
.menu-image {
padding: 12rpx 8rpx;
height: 80rpx;
box-sizing: border-box;
margin: 0 auto;
text-align: center;
}
.menu-image image {
max-width: 100%;
max-height: 100%;
}
</style>

View File

@ -7,7 +7,7 @@
:key="item.id" :key="item.id"
:item ="item" :item ="item"
:doCout="toDoMsg ? toDoMsg[item.id] : 0" :doCout="toDoMsg ? toDoMsg[item.id] : 0"
:active="item.id=='d5a9e3ef-3699-448f-abcc-819179df60bd' || menus[item.id]==1 || this.membershipType === 9999" :active="1"
@handleClick="toPage" @handleClick="toPage"
></menuItem> ></menuItem>
@ -213,14 +213,15 @@
title: ' 温馨提示', title: ' 温馨提示',
content: '该模块正在开发,尽请期待', content: '该模块正在开发,尽请期待',
}) })
} else if (_this.menus && (_this.menus[item.id] == 1 || // } else if (_this.menus && (_this.menus[item.id] == 1 ||
this.user.Membership_Type === 9999)) { // 访 // this.user.Membership_Type === 9999)) { // 访
} else {
this.$util.toNextRoute('navigateTo', item.homeUrl) this.$util.toNextRoute('navigateTo', item.homeUrl)
} else if (this.user.Membership_Type !== 9999) { // } else if (this.user.Membership_Type !== 9999) {
uni.showToast({ // uni.showToast({
title: '您没有该模块权限', // title: '',
icon: 'none' // icon: 'none'
}) // })
} }
}, },
toPage(item) { toPage(item) {