update
This commit is contained in:
parent
2dccf41f27
commit
8a046ad7c3
@ -87,6 +87,14 @@
|
||||
{
|
||||
"path": "index",
|
||||
"style":
|
||||
{
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "结算审批"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "detail",
|
||||
"style":
|
||||
{
|
||||
"navigationBarTitleText": "结算审批"
|
||||
}
|
||||
|
||||
1065
pages/settlementApproval/detail.vue
Normal file
1065
pages/settlementApproval/detail.vue
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,13 @@
|
||||
<template>
|
||||
<view class="main">
|
||||
<scroll-view class="main">
|
||||
<view class="topBox">
|
||||
<picker :value="selectServiceId" :range="selectServiceList" @change="handleChangeService" range-key="label" style="margin-bottom: 16rpx">
|
||||
<view class="top">
|
||||
<picker :value="selectServiceId" :range="selectServiceList" @change="handleChangeService" range-key="label">
|
||||
<span class="service">{{ selectServiceList[selectIndex].label }}</span>
|
||||
</picker>
|
||||
<span class="time" @click="handleChangeSelect({id:3})">{{`${$moment(startDate).format('YYYY/MM')}-${$moment(endDate).format('YYYY/MM')}`}}</span>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view class="topFilterBox">
|
||||
@ -19,33 +23,36 @@
|
||||
|
||||
|
||||
<view class="dataList">
|
||||
<view class="dataItem" v-for="(item,index) in dataList" :key="index">
|
||||
<view class="dataItem" v-for="(item,index) in dataList" :key="index" @click="handleGoDetail(item)" :style="{boxShadow: item.SETTLEMENT_STATE===0 || item.SETTLEMENT_STATE===2?'0 0px 6rpx #f9b297':''}">
|
||||
<div class="content-index">{{index+1}}</div>
|
||||
<view class="itemRow" >
|
||||
<view class="projectName">{{ item.BUSINESSPROJECT_NAME }}</view>
|
||||
<view class="stateName">{{ item.SETTLEMENT_STATE===0?'待结算':item.SETTLEMENT_STATE===1?'已结算':item.SETTLEMENT_STATE===2?'结算审批中':'' }}</view>
|
||||
<view class="stateName" :style="{color: item.SETTLEMENT_STATE===2?'#FF814FFF':''}">{{ item.SETTLEMENT_STATE===0?'待结算':item.SETTLEMENT_STATE===1?'已结算':item.SETTLEMENT_STATE===2?'审批中':'' }}</view>
|
||||
</view>
|
||||
<view class="itemCenterRow" style="margin: 20rpx 0">
|
||||
<view class="value">{{ $util.getMoney(item.CURREVENUE_AMOUNT) }}</view>
|
||||
<view class="label">本月营业额</view>
|
||||
<view class="itemCenterRow" style="margin: 40rpx 0">
|
||||
<view class="value">{{ item.SETTLEMENT_TYPE===1?$util.getMoney(item.REVENUE_AMOUNT):item.SETTLEMENT_TYPE===2?$util.getMoney(item.CURREVENUE_AMOUNT):'' }}</view>
|
||||
<view class="label">{{ item.SETTLEMENT_TYPE===1?'累计营业额':item.SETTLEMENT_TYPE===2?'本月营业额':'' }}</view>
|
||||
</view>
|
||||
<view class="itemRow">
|
||||
<view class="leftName">{{item.CURRENT_PERIOD || ''}}</view>
|
||||
<!-- <view class="rightName">{{ $util.getMoney(item.REVENUE_AMOUNT) }}</view>-->
|
||||
|
||||
<view class="rightName">{{ item.MERCHANTS_NAME || '' }}</view>
|
||||
<view class="rightName">{{item.SETTLEMENT_TYPE===1?'年度结算':item.SETTLEMENT_TYPE===2?'月度结算':''}}:{{item.SETTLEMENT_DATE || ''}} </view>
|
||||
</view>
|
||||
|
||||
<view class="line"></view>
|
||||
<view class="itemRow">
|
||||
<view class="leftName"><span class="radio" style="background: #44bea3"></span>{{item.SETTLEMENT_DATE || ''}}</view>
|
||||
<view class="rightName">{{item.SETTLEMENT_TYPE===1?'年度结算':item.SETTLEMENT_TYPE===2?'月度结算':''}}</view>
|
||||
<view class="leftName"><span class="radio" style="background: #44bea3"></span>{{ item.MERCHANTS_NAME || '' }}</view>
|
||||
<view class="rightName"></view>
|
||||
</view>
|
||||
<view class="itemRow">
|
||||
<view class="leftName"><span class="radio" style="background: #398EFE"></span>{{item.SERVERPARTSHOP_NAME || ''}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="load-more" v-if="dataList.length>0">
|
||||
<text>{{!isEnd ? '正在加载,请稍后...':'——— 我是有底线的 ———'}}</text>
|
||||
</view>
|
||||
<UniPop :show="showPop" @hidePopup="closePop" type="bottom" @touchmove.prevent round="true">
|
||||
<view class="uniPopup">
|
||||
<view class="uniPopupTop">
|
||||
@ -74,7 +81,7 @@
|
||||
<view class="button" @click="handleSubmit">查询</view>
|
||||
</view>
|
||||
</UniPop>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</template>
|
||||
<script>
|
||||
import request from '@/util/index.js'
|
||||
@ -118,6 +125,9 @@ import moment from "moment";
|
||||
start:'',// 限制的开始时间
|
||||
end:'',// 限制的结束时间
|
||||
SettlementType: 0,// 结算模式
|
||||
PageIndex: 1,// 默认的页数
|
||||
isEnd: false,// 判断是否到底了
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(){
|
||||
@ -137,6 +147,14 @@ import moment from "moment";
|
||||
this.selectServiceId = this.selectServiceList[0].value
|
||||
this.handleGetPageData()
|
||||
},
|
||||
onShow(){
|
||||
let reload = uni.getStorageSync('reolad')
|
||||
if(reload==='true'){
|
||||
this.dataList = []
|
||||
this.handleGetPageData()
|
||||
uni.setStorageSync('reolad','')
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
// 改变筛选条件
|
||||
handleChangeSelect(obj){
|
||||
@ -147,6 +165,8 @@ import moment from "moment";
|
||||
this.selectFilter = obj.id
|
||||
this.handleGetPageData()
|
||||
}
|
||||
this.isEnd = false
|
||||
this.PageIndex = 1
|
||||
},
|
||||
// 改变服务区
|
||||
handleChangeService(e){
|
||||
@ -154,6 +174,8 @@ import moment from "moment";
|
||||
this.selectIndex = Number(e.target.value)
|
||||
this.selectServiceId = this.selectServiceList[Number(e.target.value)].value
|
||||
this.handleGetPageData()
|
||||
this.isEnd = false
|
||||
this.PageIndex = 1
|
||||
},
|
||||
// 关闭弹出框
|
||||
closePop(){
|
||||
@ -172,26 +194,61 @@ import moment from "moment";
|
||||
this.SettlementType = e
|
||||
},
|
||||
handleSubmit(){
|
||||
this.isEnd = false
|
||||
this.PageIndex = 1
|
||||
this.closePop()
|
||||
this.handleGetPageData()
|
||||
},
|
||||
// 跳转
|
||||
handleGoDetail(obj){
|
||||
console.log('obj',obj)
|
||||
let res = {
|
||||
...obj,
|
||||
Approvalstate: obj.SETTLEMENT_STATE === 0 ? 0 : obj.SETTLEMENT_STATE === 1 ? 9 : obj.SETTLEMENT_STATE === 2 ? 1 : ''
|
||||
}
|
||||
this.$util.toNextRoute('navigateTo', `/pages/settlementApproval/detail?obj=${JSON.stringify(res)}&staticMonth=${this.endDate}`)
|
||||
},
|
||||
async handleGetPageData(){
|
||||
this.dataList = []
|
||||
const req = {
|
||||
ServerpartId: this.selectServiceId,
|
||||
SettlementState: this.selectFilter===4?'': this.selectFilter,
|
||||
SettlementType: this.SettlementType || '',
|
||||
StartDate: this.startDate?this.$moment(this.startDate).format('YYYYMM'):'',
|
||||
EndDate: this.endDate?this.$moment(this.endDate).format('YYYYMM'):'',
|
||||
PageIndex: this.PageIndex,
|
||||
PageSize: 10
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '正在加载...'
|
||||
})
|
||||
const data = await request.$webGet('EShangApiMain/BusinessProject/GetProjectAccountList',req)
|
||||
console.log('data',data)
|
||||
this.dataList = data.Result_Data.List
|
||||
this.dataList = this.PageIndex === 1?data.Result_Data.List:[...this.dataList,...data.Result_Data.List]
|
||||
console.log('this.dataList',this.dataList)
|
||||
if(data.Result_Data.TotalCount < 10){
|
||||
this.isEnd = true
|
||||
}
|
||||
|
||||
uni.hideLoading()
|
||||
},
|
||||
// 下拉刷新
|
||||
onPullDownRefresh(){
|
||||
console.log('1111')
|
||||
this.PageIndex = 1
|
||||
this.isEnd = false
|
||||
this.dataList = []
|
||||
this.handleGetPageData()
|
||||
setTimeout(function() {
|
||||
uni.stopPullDownRefresh()
|
||||
}, 1000)
|
||||
},
|
||||
// 滚动到底部
|
||||
onReachBottom(){
|
||||
console.log('1111')
|
||||
if(!this.isEnd){
|
||||
this.PageIndex = this.PageIndex + 1
|
||||
this.handleGetPageData()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -199,11 +256,19 @@ import moment from "moment";
|
||||
|
||||
<style scoped lang="scss">
|
||||
.main{
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
.topBox{
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 24rpx 16rpx;
|
||||
background: #fff;
|
||||
.top{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 16rpx;
|
||||
.service{
|
||||
font-size: 24rpx;
|
||||
color: #010101;
|
||||
@ -212,6 +277,16 @@ import moment from "moment";
|
||||
background-color: #DEDEDE;
|
||||
text-align: center;
|
||||
}
|
||||
.time{
|
||||
font-size: 24rpx;
|
||||
color: #010101;
|
||||
border-radius: 24rpx;
|
||||
padding: 4rpx 16rpx;
|
||||
background-color: #DEDEDE;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.topFilterBox{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@ -266,7 +341,7 @@ import moment from "moment";
|
||||
text-align: center;
|
||||
background-color: #fb8b56;
|
||||
position: absolute;
|
||||
top: 90rpx;
|
||||
top: 26rpx;
|
||||
left: -4rpx;
|
||||
box-shadow: 4rpx 4rpx 2rpx 0 rgba(238,112,27,0.5)
|
||||
}
|
||||
@ -283,6 +358,8 @@ import moment from "moment";
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: #333333;
|
||||
box-sizing: border-box;
|
||||
padding-left: 40rpx;
|
||||
}
|
||||
.leftName{
|
||||
color: #686868;
|
||||
@ -319,7 +396,7 @@ import moment from "moment";
|
||||
.value{
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: red;
|
||||
color: #FF814FFF;
|
||||
}
|
||||
.label{
|
||||
font-size: 12px;
|
||||
|
||||
@ -327,6 +327,9 @@ import Tabbar from "../../components/tabbar/tabbar.vue";
|
||||
}
|
||||
}
|
||||
}
|
||||
if(item.id==='a927bf4d-f924-4034-b964-d1a8bd401d09'){
|
||||
item.isNotice = true
|
||||
}
|
||||
})
|
||||
//拿到登录用户有权限的内容 判断是否有角标
|
||||
this.dataList[3].list.forEach(item=>{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user