This commit is contained in:
cclu 2024-07-18 19:38:09 +08:00
parent 2dccf41f27
commit 8a046ad7c3
4 changed files with 1178 additions and 25 deletions

View File

@ -87,6 +87,14 @@
{ {
"path": "index", "path": "index",
"style": "style":
{
"enablePullDownRefresh": true,
"navigationBarTitleText": "结算审批"
}
},
{
"path": "detail",
"style":
{ {
"navigationBarTitleText": "结算审批" "navigationBarTitleText": "结算审批"
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,13 @@
<template> <template>
<view class="main"> <scroll-view class="main">
<view class="topBox"> <view class="topBox">
<picker :value="selectServiceId" :range="selectServiceList" @change="handleChangeService" range-key="label" style="margin-bottom: 16rpx"> <view class="top">
<span class="service">{{ selectServiceList[selectIndex].label }}</span> <picker :value="selectServiceId" :range="selectServiceList" @change="handleChangeService" range-key="label">
</picker> <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"> <view class="topFilterBox">
@ -19,33 +23,36 @@
<view class="dataList"> <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> <div class="content-index">{{index+1}}</div>
<view class="itemRow"> <view class="itemRow" >
<view class="projectName">{{ item.BUSINESSPROJECT_NAME }}</view> <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>
<view class="itemCenterRow" style="margin: 20rpx 0"> <view class="itemCenterRow" style="margin: 40rpx 0">
<view class="value">{{ $util.getMoney(item.CURREVENUE_AMOUNT) }}</view> <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">本月营业额</view> <view class="label">{{ item.SETTLEMENT_TYPE===1?'累计营业额':item.SETTLEMENT_TYPE===2?'本月营业额':'' }}</view>
</view> </view>
<view class="itemRow"> <view class="itemRow">
<view class="leftName">{{item.CURRENT_PERIOD || ''}}</view> <view class="leftName">{{item.CURRENT_PERIOD || ''}}</view>
<!-- <view class="rightName">{{ $util.getMoney(item.REVENUE_AMOUNT) }}</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>
<view class="line"></view> <view class="line"></view>
<view class="itemRow"> <view class="itemRow">
<view class="leftName"><span class="radio" style="background: #44bea3"></span>{{item.SETTLEMENT_DATE || ''}}</view> <view class="leftName"><span class="radio" style="background: #44bea3"></span>{{ item.MERCHANTS_NAME || '' }}</view>
<view class="rightName">{{item.SETTLEMENT_TYPE===1?'年度结算':item.SETTLEMENT_TYPE===2?'月度结算':''}}</view> <view class="rightName"></view>
</view> </view>
<view class="itemRow"> <view class="itemRow">
<view class="leftName"><span class="radio" style="background: #398EFE"></span>{{item.SERVERPARTSHOP_NAME || ''}}</view> <view class="leftName"><span class="radio" style="background: #398EFE"></span>{{item.SERVERPARTSHOP_NAME || ''}}</view>
</view> </view>
</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"> <UniPop :show="showPop" @hidePopup="closePop" type="bottom" @touchmove.prevent round="true">
<view class="uniPopup"> <view class="uniPopup">
<view class="uniPopupTop"> <view class="uniPopupTop">
@ -74,7 +81,7 @@
<view class="button" @click="handleSubmit">查询</view> <view class="button" @click="handleSubmit">查询</view>
</view> </view>
</UniPop> </UniPop>
</view> </scroll-view>
</template> </template>
<script> <script>
import request from '@/util/index.js' import request from '@/util/index.js'
@ -118,6 +125,9 @@ import moment from "moment";
start:'',// start:'',//
end:'',// end:'',//
SettlementType: 0,// SettlementType: 0,//
PageIndex: 1,//
isEnd: false,//
} }
}, },
onLoad(){ onLoad(){
@ -137,6 +147,14 @@ import moment from "moment";
this.selectServiceId = this.selectServiceList[0].value this.selectServiceId = this.selectServiceList[0].value
this.handleGetPageData() this.handleGetPageData()
}, },
onShow(){
let reload = uni.getStorageSync('reolad')
if(reload==='true'){
this.dataList = []
this.handleGetPageData()
uni.setStorageSync('reolad','')
}
},
methods:{ methods:{
// //
handleChangeSelect(obj){ handleChangeSelect(obj){
@ -147,6 +165,8 @@ import moment from "moment";
this.selectFilter = obj.id this.selectFilter = obj.id
this.handleGetPageData() this.handleGetPageData()
} }
this.isEnd = false
this.PageIndex = 1
}, },
// //
handleChangeService(e){ handleChangeService(e){
@ -154,6 +174,8 @@ import moment from "moment";
this.selectIndex = Number(e.target.value) this.selectIndex = Number(e.target.value)
this.selectServiceId = this.selectServiceList[Number(e.target.value)].value this.selectServiceId = this.selectServiceList[Number(e.target.value)].value
this.handleGetPageData() this.handleGetPageData()
this.isEnd = false
this.PageIndex = 1
}, },
// //
closePop(){ closePop(){
@ -172,26 +194,61 @@ import moment from "moment";
this.SettlementType = e this.SettlementType = e
}, },
handleSubmit(){ handleSubmit(){
this.isEnd = false
this.PageIndex = 1
this.closePop() this.closePop()
this.handleGetPageData() 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(){ async handleGetPageData(){
this.dataList = []
const req = { const req = {
ServerpartId: this.selectServiceId, ServerpartId: this.selectServiceId,
SettlementState: this.selectFilter===4?'': this.selectFilter, SettlementState: this.selectFilter===4?'': this.selectFilter,
SettlementType: this.SettlementType || '', SettlementType: this.SettlementType || '',
StartDate: this.startDate?this.$moment(this.startDate).format('YYYYMM'):'', StartDate: this.startDate?this.$moment(this.startDate).format('YYYYMM'):'',
EndDate: this.endDate?this.$moment(this.endDate).format('YYYYMM'):'', EndDate: this.endDate?this.$moment(this.endDate).format('YYYYMM'):'',
PageIndex: this.PageIndex,
PageSize: 10
} }
uni.showLoading({ uni.showLoading({
title: '正在加载...' title: '正在加载...'
}) })
const data = await request.$webGet('EShangApiMain/BusinessProject/GetProjectAccountList',req) const data = await request.$webGet('EShangApiMain/BusinessProject/GetProjectAccountList',req)
console.log('data',data) 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) console.log('this.dataList',this.dataList)
if(data.Result_Data.TotalCount < 10){
this.isEnd = true
}
uni.hideLoading() 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,19 +256,37 @@ import moment from "moment";
<style scoped lang="scss"> <style scoped lang="scss">
.main{ .main{
width: 100%;
min-height: 100vh;
box-sizing: border-box;
.topBox{ .topBox{
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 24rpx 16rpx; padding: 24rpx 16rpx;
background: #fff; background: #fff;
.service{ .top{
font-size: 24rpx; display: flex;
color: #010101; align-items: center;
border-radius: 24rpx; justify-content: space-between;
padding: 4rpx 16rpx; margin-bottom: 16rpx;
background-color: #DEDEDE; .service{
text-align: center; font-size: 24rpx;
color: #010101;
border-radius: 24rpx;
padding: 4rpx 16rpx;
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{ .topFilterBox{
width: 100%; width: 100%;
display: flex; display: flex;
@ -266,7 +341,7 @@ import moment from "moment";
text-align: center; text-align: center;
background-color: #fb8b56; background-color: #fb8b56;
position: absolute; position: absolute;
top: 90rpx; top: 26rpx;
left: -4rpx; left: -4rpx;
box-shadow: 4rpx 4rpx 2rpx 0 rgba(238,112,27,0.5) box-shadow: 4rpx 4rpx 2rpx 0 rgba(238,112,27,0.5)
} }
@ -283,6 +358,8 @@ import moment from "moment";
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
color: #333333; color: #333333;
box-sizing: border-box;
padding-left: 40rpx;
} }
.leftName{ .leftName{
color: #686868; color: #686868;
@ -319,7 +396,7 @@ import moment from "moment";
.value{ .value{
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
color: red; color: #FF814FFF;
} }
.label{ .label{
font-size: 12px; font-size: 12px;

View File

@ -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=>{ this.dataList[3].list.forEach(item=>{