Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
wly-APP
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘川
wly-APP
Commits
c779c57a
Commit
c779c57a
authored
Jan 04, 2026
by
李驰骋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
票账管理页面调整
parent
b4df8231
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
88 additions
and
60 deletions
+88
-60
market-support-query.nvue
pages/billing-invoice/market-support-query.nvue
+88
-60
No files found.
pages/billing-invoice/market-support-query.nvue
View file @
c779c57a
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view class="text-block" v-if="condition.option === 'BT'">
<view class="text-block" v-if="condition.option === 'BT'"
key="start-date"
>
<text class="middle-date">开始日期</text>
<text class="middle-date">开始日期</text>
<view class="middle-date-des">
<view class="middle-date-des">
<view class="picker-year">
<view class="picker-year">
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view class="text-block text-block-last" v-if="condition.option === 'BT'">
<view class="text-block text-block-last" v-if="condition.option === 'BT'"
key="end-date"
>
<text class="middle-date">结束日期</text>
<text class="middle-date">结束日期</text>
<view class="middle-date-des">
<view class="middle-date-des">
<view class="picker-year">
<view class="picker-year">
...
@@ -69,44 +69,43 @@
...
@@ -69,44 +69,43 @@
<text class="btn-text">查询</text>
<text class="btn-text">查询</text>
</button>
</button>
</view>
</view>
<scroll-view :style='scrollHeight' class="scroll-area" scroll-y="true" lower-threshold='150'
<list class="scroll-area view" scrollable loadmoreoffset='100' show-scrollbar='false' @loadmore="scrolltolower">
@scrolltolower='scrolltolower'>
<cell class="list-cell" v-for="(item,index) in lists" :key='index'>
<list class="scroll-area view" loadmoreoffset='100' show-scrollbar='false' @loadmore="scrolltolower">
<view class="middle view planout-block-item">
<cell class="list-cell" v-for="(item,index) in lists" :key='index'>
<view class="text-block">
<view class="middle view planout-block-item">
<text class="middle-date middle-date-select">客户编码</text>
<view class="text-block">
<text class="middle-date-des middle-date-des-select">{{item.billto_bp}}</text>
<text class="middle-date middle-date-select">客户编码</text>
</view>
<text class="middle-date-des middle-date-des-select">{{item.billto_bp}}</text>
<view class="text-block">
</view>
<text class="middle-date middle-date-select">客户名称</text>
<view class="text-block">
<text class="middle-date-des middle-date-des-select">{{item.billto_name}}</text>
<text class="middle-date middle-date-select">客户名称</text>
<text class="middle-date-des middle-date-des-select">{{item.billto_name}}</text>
</view>
<view class="text-block">
<text class="middle-date middle-date-select">上账日期</text>
<text class="middle-date-des middle-date-des-select">{{item.posting_date}}</text>
</view>
<view class="text-block">
<text class="middle-date middle-date-select">摘要</text>
<text class="middle-date-des middle-date-des-select">{{item.zy}}</text>
</view>
<view class="text-block text-block-last">
<text class="middle-date middle-date-select">金额</text>
<text class="middle-date-des middle-date-des-select">{{item.forward_amount}}</text>
</view>
</view>
</view>
<view class="empty-block"></view>
<view class="text-block">
</cell>
<text class="middle-date middle-date-select">上账日期</text>
<cell>
<text class="middle-date-des middle-date-des-select">{{item.posting_date}}</text>
<view class="loading-more" v-if='lists.length>0'>
<text class="loading-more-text">-- 到底了 --</text>
</view>
</view>
<view class="loading-more" v-else>
<view class="text-block">
<text class="loading-more-text">暂无数据</text>
<text class="middle-date middle-date-select">摘要</text>
<text class="middle-date-des middle-date-des-select">{{item.zy}}</text>
</view>
</view>
</cell>
<view class="text-block text-block-last">
</list>
<text class="middle-date middle-date-select">金额</text>
</scroll-view>
<text class="middle-date-des middle-date-des-select">{{item.forward_amount}}</text>
</view>
</view>
<view class="empty-block"></view>
</cell>
<cell>
<view class="loading-more" v-if='lists.length>0'>
<text class="loading-more-text" v-if="lists.length >= page.totalCount && page.totalCount > 0">-- 到底了 --</text>
<text class="loading-more-text" v-else-if="isLoading">加载中...</text>
<text class="loading-more-text" v-else>上拉加载更多</text>
</view>
<view class="loading-more" v-else>
<text class="loading-more-text">暂无数据</text>
</view>
</cell>
</list>
</view>
</view>
</view>
</view>
...
@@ -129,6 +128,7 @@
...
@@ -129,6 +128,7 @@
loadingText: '加载中...',
loadingText: '加载中...',
refreshing: false,
refreshing: false,
isOpened: 'none',
isOpened: 'none',
isLoading: false, // 添加加载状态,防止重复请求
// 日期查询选项:是、介于、小于等于、大于等于
// 日期查询选项:是、介于、小于等于、大于等于
dateOptions: [
dateOptions: [
{ label: '是', value: 'EQ' },
{ label: '是', value: 'EQ' },
...
@@ -162,11 +162,6 @@
...
@@ -162,11 +162,6 @@
'height': `${this.sysinfo.safeArea.height }px`,
'height': `${this.sysinfo.safeArea.height }px`,
}
}
},
},
scrollHeight() {
return {
'height': `${this.sysinfo.safeArea.height - 180 - 44}px`,
}
},
...mapState(['sysinfo', 'userInfo', 'userBpData'])
...mapState(['sysinfo', 'userInfo', 'userBpData'])
},
},
created() {
created() {
...
@@ -194,19 +189,31 @@
...
@@ -194,19 +189,31 @@
search() {
search() {
this.lists = [];
this.lists = [];
this.page.page = 1;
this.page.page = 1;
this.page.totalCount = 0; // 重置总数
this.queryData(1);
this.queryData(1);
},
},
scrolltolower() {
scrolltolower() {
if (this.lists.length >= this.page.totalCount) {
// 防止重复请求
if (this.isLoading) {
return;
}
// 判断是否已加载完所有数据
if (this.lists.length >= this.page.totalCount && this.page.totalCount > 0) {
return;
return;
}
}
this.page.page++;
this.page.page++;
this.queryData(this.page.page);
this.queryData(this.page.page);
},
},
async queryData(pageNo) {
async queryData(pageNo) {
// 防止重复请求
if (this.isLoading) {
return;
}
this.isLoading = true;
// 构建查询条件对象,与PC端格式保持一致
// 构建查询条件对象,与PC端格式保持一致
const allConditions = {}
const allConditions = {}
// 处理日期条件,根据选项类型构建不同的查询条件(属性名小写,与PC端保持一致)
// 处理日期条件,根据选项类型构建不同的查询条件(属性名小写,与PC端保持一致)
if (this.condition.option === 'BT') {
if (this.condition.option === 'BT') {
// 介于:需要开始日期和结束日期
// 介于:需要开始日期和结束日期
...
@@ -229,7 +236,7 @@
...
@@ -229,7 +236,7 @@
}]
}]
}
}
}
}
// 处理客户条件(如果存在)
// 处理客户条件(如果存在)
if (this.condition.customer && this.condition.customer.length > 0) {
if (this.condition.customer && this.condition.customer.length > 0) {
const customer = this.condition.customer.map(v => ({
const customer = this.condition.customer.map(v => ({
...
@@ -241,12 +248,12 @@
...
@@ -241,12 +248,12 @@
// 字段名使用小写,与PC端保持一致
// 字段名使用小写,与PC端保持一致
allConditions.customer = customer
allConditions.customer = customer
}
}
// 获取用户编号和角色信息,参考 ticket-order.nvue 的方式
// 获取用户编号和角色信息,参考 ticket-order.nvue 的方式
const userCode = this.userInfo?.code || ''
const userCode = this.userInfo?.code || ''
// 从 userBpData 获取第一个角色的 ROLE_ID
// 从 userBpData 获取第一个角色的 ROLE_ID
const roleId = this.userBpData?.ROLES && this.userBpData.ROLES.length > 0
const roleId = this.userBpData?.ROLES && this.userBpData.ROLES.length > 0
? this.userBpData.ROLES[0].ROLE_ID
? this.userBpData.ROLES[0].ROLE_ID
: ''
: ''
let params = {
let params = {
user_bp: userCode,
user_bp: userCode,
...
@@ -254,22 +261,41 @@
...
@@ -254,22 +261,41 @@
...allConditions,
...allConditions,
page: pageNo,
page: pageNo,
pagesize: this.page.pagesize,
pagesize: this.page.pagesize,
totalCount:
this.page.totalCount,
totalCount:
pageNo === 1 ? 0 : this.page.totalCount, // 第一页时重置totalCount
is_result: 1,
is_result: 1,
sort: []
sort: []
}
}
uni.showLoading({
title: '加载中'
try {
});
if (pageNo === 1) {
const res = await apiGetMarketSupportFee(params);
uni.showLoading({
uni.hideLoading();
title: '加载中'
if (res && res.data) {
});
}
const res = await apiGetMarketSupportFee(params);
if (pageNo === 1) {
if (pageNo === 1) {
this.lists = res.data || [];
uni.hideLoading();
} else {
this.lists = this.lists.concat(res.data || []);
}
}
this.page.totalCount = res?.TOTALCOUNT || res?.totalCount || res?.Total || this.page.totalCount;
if (res && res.data) {
if (pageNo === 1) {
this.lists = res.data || [];
} else {
this.lists = this.lists.concat(res.data || []);
}
// 更新总数,优先使用后端返回的总数
const totalCount = res?.TOTALCOUNT || res?.totalCount || res?.Total || 0;
if (totalCount > 0) {
this.page.totalCount = totalCount;
}
}
} catch (error) {
console.error('查询失败', error);
if (pageNo === 1) {
uni.hideLoading();
}
} finally {
this.isLoading = false;
}
}
}
}
}
}
...
@@ -315,8 +341,10 @@
...
@@ -315,8 +341,10 @@
.main {
.main {
position: relative;
position: relative;
flex-direction: column;
flex-direction: column;
flex: 1;
margin-top: -164rpx;
margin-top: -164rpx;
padding: 0 16rpx;
padding: 0 16rpx;
min-height: 0;
}
}
.middle {
.middle {
...
@@ -475,7 +503,7 @@
...
@@ -475,7 +503,7 @@
}
}
.scroll-area {
.scroll-area {
overflow-y: scroll
;
flex: 1
;
}
}
.list-cell {
.list-cell {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment