fix: 功能优化及代码提交。
This commit is contained in:
382
src/pages/statistic/accounts/dailyLiabilities/index.vue
Normal file
382
src/pages/statistic/accounts/dailyLiabilities/index.vue
Normal file
@@ -0,0 +1,382 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.time" border="false" type="select" placeholder="" suffixIcon="calendar"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
|
||||
<u-transition :show="filterPanel" mode="fade">
|
||||
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
|
||||
<view class="filter-panel-content">
|
||||
|
||||
<view class="select-header">记录日期</view>
|
||||
<view class="selcet-content" style="padding: 0 24rpx">
|
||||
<u-input
|
||||
:disabled="true"
|
||||
:disabledColor="'#fff'"
|
||||
class="dateInput"
|
||||
border="surround"
|
||||
v-model="queryParams.startTime"
|
||||
placeholder="请选择开始时间"
|
||||
>
|
||||
<template v-slot:suffix>
|
||||
<u-icon name="calendar" @click="openOrCloseDate(true)"></u-icon>
|
||||
</template>
|
||||
</u-input>
|
||||
<u-input
|
||||
:disabled="true"
|
||||
:disabledColor="'#fff'"
|
||||
class="dateInput"
|
||||
border="surround"
|
||||
v-model="queryParams.endTime"
|
||||
placeholder="请选择结束时间"
|
||||
>
|
||||
<template v-slot:suffix>
|
||||
<u-icon name="calendar" @click="openOrCloseDate(false)"></u-icon>
|
||||
</template>
|
||||
</u-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-box">
|
||||
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
|
||||
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
|
||||
</view>
|
||||
<u-datetime-picker
|
||||
:closeOnClickOverlay="true"
|
||||
:show="timeShow"
|
||||
v-model="time"
|
||||
mode="date"
|
||||
:minDate="-2209017600000"
|
||||
@close="openOrCloseDate"
|
||||
@cancel="openOrCloseDate"
|
||||
@confirm="confirm"
|
||||
></u-datetime-picker>
|
||||
</view>
|
||||
</u-transition>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<u-list @scrolltolower="loadmore" :spaceHeight="116" lowerThreshold="100">
|
||||
<u-list-item v-for="(item, index) in listData" :key="index">
|
||||
<view class="list-item">
|
||||
<view class="item-header">
|
||||
<u--text lines="2" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
|
||||
:text="item.name+':'+item.totalBalance" size="30rpx" color="#333333" :bold="true"></u--text>
|
||||
</view>
|
||||
<!-- <view class="item-row">
|
||||
<text class="row-label">账户类型:</text>
|
||||
<text class="row-value">{{ dictStr(item.type, accountType) }}</text>
|
||||
</view> -->
|
||||
<!-- <view class="item-row">
|
||||
<text class="row-label">净资产:</text>
|
||||
<text class="row-value">{{ item.totalBalance }}</text>
|
||||
</view> -->
|
||||
<view class="item-row">
|
||||
<text class="row-label">信用卡余额:</text>
|
||||
<text class="row-value">{{ item.creditBalance }}</text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">投资账户余额:</text>
|
||||
<text class="row-value">{{ item.investBalance }}</text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">储蓄账户余额:</text>
|
||||
<text class="row-value">{{ item.debitBalance }}</text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">借贷账户余额:</text>
|
||||
<text class="row-value">{{ item.lendingBalance }}</text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">记录时间:</text>
|
||||
<text class="row-value">{{ item.recordDate }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-list-item>
|
||||
<view>
|
||||
</view>
|
||||
<u-loadmore :status="status" loadingIcon="semicircle" height="88" fontSize="32rpx" @loadmore="loadmore" />
|
||||
</u-list>
|
||||
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
|
||||
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
|
||||
</view>
|
||||
<!-- 悬停按钮返回工作台-->
|
||||
<suspend></suspend>
|
||||
<refresh></refresh>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { listDailyLiabilities } from '@/api/invest/dailyLiabilities'
|
||||
import {onLoad,onShow} from "@dcloudio/uni-app";
|
||||
import dayjs from 'dayjs'
|
||||
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
|
||||
import {reactive ,toRefs,ref,computed }from "vue";
|
||||
import { timeHandler } from '@/utils/common.ts'
|
||||
const pageNum = ref(1)
|
||||
const listData = ref([])
|
||||
const isShow = ref(false)
|
||||
const status = ref('loadmore')
|
||||
const settingPickShow = ref(false)
|
||||
const settingColumns = ref([])
|
||||
const timeShow= ref(false)
|
||||
const time =ref( Number(new Date()))
|
||||
const flag= ref(true)
|
||||
const data = reactive({
|
||||
filterPanel: false,
|
||||
queryParams: {
|
||||
name: null,
|
||||
}
|
||||
})
|
||||
const { filterPanel, queryParams} = toRefs(data)
|
||||
const windowHeight = computed(() => {
|
||||
uni.getSystemInfoSync().windowHeight - 50
|
||||
})
|
||||
onLoad(() => {
|
||||
getList()
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
if (isShow.value) {
|
||||
listData.value=[]
|
||||
getList()
|
||||
isShow.value = false
|
||||
}
|
||||
});
|
||||
|
||||
function loadmore() {
|
||||
pageNum.value += 1
|
||||
if (status.value == 'loadmore') {
|
||||
getList()
|
||||
}
|
||||
}
|
||||
function openOrCloseDate(data) {
|
||||
timeShow.value = !timeShow.value
|
||||
flag.value = data
|
||||
}
|
||||
function confirm(e) {
|
||||
const date = timeHandler(new Date(e.value), '-', ':')
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
dayjs(date).format(formatValue)
|
||||
if (flag.value) {
|
||||
queryParams.value.startTime = dayjs(date).format(formatValue)
|
||||
} else {
|
||||
queryParams.value.endTime = dayjs(date).format(formatValue)
|
||||
}
|
||||
timeShow.value = false
|
||||
}
|
||||
function getList() {
|
||||
status.value = 'loading'
|
||||
listDailyLiabilities({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {
|
||||
listData.value = listData.value.concat(res.rows)
|
||||
if (listData.value.length < res.total) {
|
||||
status.value = 'loadmore'
|
||||
} else {
|
||||
status.value = 'nomore'
|
||||
}
|
||||
}).catch(() => {
|
||||
status.value = 'nomore'
|
||||
})
|
||||
}
|
||||
|
||||
function settingConfirm(e) {
|
||||
queryParams.value.settingId = e.value[0].settingId
|
||||
queryParams.value.settingName = e.value[0].settingName
|
||||
settingPickShow.value = false
|
||||
}
|
||||
function settingCancel() {
|
||||
settingPickShow.value = false
|
||||
}
|
||||
|
||||
|
||||
|
||||
function searchSubmit() {
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
|
||||
|
||||
function resetQuery() {
|
||||
queryParams.value.startTime = ''
|
||||
queryParams.value.time = ''
|
||||
queryParams.value.endTime = ''
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.btnAdd {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
display:float;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.search-view {
|
||||
padding: 12rpx 32rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
.search-input {
|
||||
background: #F5F5F5;
|
||||
color: #333333;
|
||||
margin-right: 36rpx;
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 96rpx;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
|
||||
.filter-panel-content {
|
||||
background-color: #ffff;
|
||||
padding: 0 30rpx 30rpx;
|
||||
|
||||
.filter-title {
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.state-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
.state-item {
|
||||
width: 210rpx;
|
||||
height: 72rpx;
|
||||
border: 1rpx solid rgba(0, 0, 0, 0.25);
|
||||
border-radius: 72rpx;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
margin: 0 20rpx 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: rgba(222, 241, 255, 1);
|
||||
border: 1rpx solid rgba(22, 119, 255, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
display: flex;
|
||||
padding: 24rpx 30rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-item {
|
||||
margin: 0 24rpx 24rpx;
|
||||
padding: 32rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.item-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-bottom: 16rpx;
|
||||
|
||||
.status {
|
||||
.status-item {
|
||||
width: 120rpx;
|
||||
height: 44rpx;
|
||||
text-align: center;
|
||||
line-height: 44rpx;
|
||||
border-radius: 4rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.status1 {
|
||||
background: #F0F0F0;
|
||||
color: #8C8C8C;
|
||||
}
|
||||
|
||||
.status2 {
|
||||
background: rgba(38, 129, 255, 0.2);
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status3 {
|
||||
background: #F7F7F7;
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status4 {
|
||||
background: rgba(255, 85, 51, 0.2);
|
||||
color: #FF5533;
|
||||
}
|
||||
|
||||
.status5 {
|
||||
background: #F7F7F7;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.status7 {
|
||||
background: rgba(255, 129, 51, 0.2);
|
||||
color: #FF8133;
|
||||
}
|
||||
|
||||
.status8 {
|
||||
background: rgba(65, 217, 165, 0.2);
|
||||
color: #41D9A5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-row {
|
||||
padding: 16rpx 0;
|
||||
|
||||
.row-label {
|
||||
color: rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
.row-value {
|
||||
color: rgba(0, 0, 0, 0.85)
|
||||
}
|
||||
}
|
||||
|
||||
.operate {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.btn {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-left: 5rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.circulation {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
margin-right: 24rpx;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.filling {
|
||||
background: #2681FF;
|
||||
border-radius: 8rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -75,6 +75,7 @@
|
||||
{ path: '/pages/statistic/accounts/posStatics/index', text: 'POS机统计', icon: 'shop-filled' , permission: 'invest:posStatics:list' },
|
||||
{ path: '/pages/statistic/accounts/sleepAccounts/index', text: '睡眠账户统计', icon: 'cloud-upload' , permission: 'invest:debitCard' },
|
||||
{ path: '/pages/statistic/accounts/openCardStatics/index', text: '储蓄卡开卡统计', icon: 'map' , permission: 'invest:debitCard' },
|
||||
{ path: '/pages/statistic/accounts/dailyLiabilities/index', text: '每日净资产统计', icon: 'calendar' , permission: 'invest:dailyLiabilities:list' },
|
||||
])
|
||||
const investGridList=ref([
|
||||
{ path: '/pages/statistic/accounts/investDealAnalysis/index', text: '投资收益统计', icon: 'arrow-down', permission: 'invest:investDealAnalysis:list' },
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
title="储蓄账户记账"
|
||||
title="储蓄账户转账"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
@@ -67,7 +67,7 @@ import {reactive ,toRefs,ref,computed ,getCurrentInstance }from "vue";
|
||||
const datePickShow = ref(false)
|
||||
const showOutAccount = ref(false)
|
||||
const showInAccount = ref(false)
|
||||
const title = ref("储蓄账户记账")
|
||||
const title = ref("储蓄账户转账")
|
||||
const inAccountList = ref([])
|
||||
const outAccountList = ref([])
|
||||
const data = reactive({
|
||||
@@ -114,9 +114,9 @@ const { form, queryOutAccountParams, queryInAccountParams, rules} = toRefs(data)
|
||||
onLoad((option) => {
|
||||
form.value.id = option.id
|
||||
if(form.value.id!=null){
|
||||
title.value="储蓄账户记账-修改"
|
||||
title.value="储蓄账户转账-修改"
|
||||
}else{
|
||||
title.value="储蓄账户记账-新增"
|
||||
title.value="储蓄账户转账-新增"
|
||||
}
|
||||
getData()
|
||||
})
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
title="储蓄账户记账详情"
|
||||
title="储蓄账户转账详情"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
|
||||
Reference in New Issue
Block a user