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
0fb8942c
Commit
0fb8942c
authored
Jan 04, 2026
by
李驰骋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
票账管理页面调整
parent
2727ebc4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
197 additions
and
78 deletions
+197
-78
.gitignore
.gitignore
+2
-0
launch.json
.hbuilderx/launch.json
+1
-1
market-support-query.nvue
pages/billing-invoice/market-support-query.nvue
+187
-70
usercenter.nvue
pages/usercenter/usercenter.nvue
+7
-7
No files found.
.gitignore
View file @
0fb8942c
/.DS_Store
/unpackage
/unpackage/
/unpackage/dist/
/unpackage/
.hbuilderx/launch.json
View file @
0fb8942c
...
...
@@ -16,7 +16,7 @@
"type"
:
"uniCloud"
},
{
"playground"
:
"
standard
"
,
"playground"
:
"
custom
"
,
"type"
:
"uni-app:app-android"
},
{
...
...
pages/billing-invoice/market-support-query.nvue
View file @
0fb8942c
...
...
@@ -6,7 +6,16 @@
</view>
<view class="main">
<view class="middle view">
<view class="text-block text-block-last">
<view class="text-block">
<text class="middle-date">查询条件</text>
<view class="middle-date-des">
<picker @change="bindPickerOptionChange" :value="conditionOptionIndex" :range="dateOptions" range-key="label">
<text class="uni-input">{{dateOptions[conditionOptionIndex].label}}</text>
</picker>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
</view>
</view>
<view class="text-block" v-if="condition.option !== 'BT'">
<text class="middle-date">查询日期</text>
<view class="middle-date-des">
<view class="picker-year">
...
...
@@ -22,50 +31,81 @@
</view>
</view>
</view>
<view class="text-block" v-if="condition.option === 'BT'" key="start-date">
<text class="middle-date">开始日期</text>
<view class="middle-date-des">
<view class="picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<picker class="picker-block" @change="bindPickerStartDateChange" mode="date"
:value="condition.posting_date_start" fields='day'>
<text class="uni-input">{{condition.posting_date_start || '请选择开始日期'}}</text>
</picker>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
</view>
</view>
</view>
<view class="text-block text-block-last" v-if="condition.option === 'BT'" key="end-date">
<text class="middle-date">结束日期</text>
<view class="middle-date-des">
<view class="picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<picker class="picker-block" @change="bindPickerEndDateChange" mode="date"
:value="condition.posting_date_end" fields='day'>
<text class="uni-input">{{condition.posting_date_end || '请选择结束日期'}}</text>
</picker>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
</view>
</view>
</view>
</view>
<view class="planout-block">
<button class="btn" type="default" @tap="search">
<text class="btn-text">查询</text>
</button>
</view>
<scroll-view :style='scrollHeight' class="scroll-area" scroll-y="true" lower-threshold='150'
@scrolltolower='scrolltolower'>
<list class="scroll-area view" loadmoreoffset='100' show-scrollbar='false' @loadmore="scrolltolower">
<cell class="list-cell" v-for="(item,index) in lists" :key='index'>
<view class="middle view planout-block-item">
<view class="text-block">
<text class="middle-date middle-date-select">客户编码</text>
<text class="middle-date-des middle-date-des-select">{{item.billto_bp}}</text>
</view>
<view class="text-block">
<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>
<list class="scroll-area view" scrollable loadmoreoffset='100' show-scrollbar='false' @loadmore="scrolltolower">
<cell class="list-cell" v-for="(item,index) in lists" :key='index'>
<view class="middle view planout-block-item">
<view class="text-block">
<text class="middle-date middle-date-select">客户编码</text>
<text class="middle-date-des middle-date-des-select">{{item.billto_bp}}</text>
</view>
<view class="text-block">
<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="empty-block"></view>
</cell>
<cell>
<view class="loading-more" v-if='lists.length>0'>
<text class="loading-more-text">-- 到底了 --</text>
<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="loading-more" v-else>
<text class="loading-more-text">暂无数据</text>
<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>
</cell>
</list>
</scroll-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>
...
...
@@ -88,9 +128,21 @@
loadingText: '加载中...',
refreshing: false,
isOpened: 'none',
condition: {
posting_date: ''
},
isLoading: false, // 添加加载状态,防止重复请求
// 日期查询选项:是、介于、小于等于、大于等于
dateOptions: [
{ label: '是', value: 'EQ' },
{ label: '介于', value: 'BT' },
{ label: '小于等于', value: 'LE' },
{ label: '大于等于', value: 'GE' }
],
conditionOptionIndex: 0, // 默认选择"是"
condition: {
option: 'EQ', // 默认是"是"
posting_date: '', // 单个日期(用于EQ、LE、GE)
posting_date_start: '', // 开始日期(用于BT)
posting_date_end: '' // 结束日期(用于BT)
},
lists: [],
page: {
page: 1,
...
...
@@ -110,11 +162,6 @@
'height': `${this.sysinfo.safeArea.height }px`,
}
},
scrollHeight() {
return {
'height': `${this.sysinfo.safeArea.height - 180 - 44}px`,
}
},
...mapState(['sysinfo', 'userInfo', 'userBpData'])
},
created() {
...
...
@@ -122,35 +169,74 @@
// this.queryData(1);
},
methods: {
bindPickerOptionChange(e) {
this.conditionOptionIndex = e.detail.value
this.condition.option = this.dateOptions[e.detail.value].value
// 切换选项时清空日期
this.condition.posting_date = ''
this.condition.posting_date_start = ''
this.condition.posting_date_end = ''
},
bindPickerDateChange(e) {
this.condition.posting_date = e.detail.value
},
bindPickerStartDateChange(e) {
this.condition.posting_date_start = e.detail.value
},
bindPickerEndDateChange(e) {
this.condition.posting_date_end = e.detail.value
},
search() {
this.lists = [];
this.page.page = 1;
this.page.totalCount = 0; // 重置总数
this.queryData(1);
},
scrolltolower() {
if (this.lists.length >= this.page.totalCount) {
// 防止重复请求
if (this.isLoading) {
return;
}
// 判断是否已加载完所有数据
if (this.lists.length >= this.page.totalCount && this.page.totalCount > 0) {
return;
}
this.page.page++;
this.queryData(this.page.page);
},
async queryData(pageNo) {
// 防止重复请求
if (this.isLoading) {
return;
}
this.isLoading = true;
// 构建查询条件对象,与PC端格式保持一致
const allConditions = {}
// 处理日期条件,单个日期查询(EQ),转换为SAP格式数组(属性名小写,与PC端保持一致)
if (this.condition.posting_date) {
allConditions.posting_date = [{
sign: 'I',
option: 'EQ',
low: this.condition.posting_date,
high: ''
}]
// 处理日期条件,根据选项类型构建不同的查询条件(属性名小写,与PC端保持一致)
if (this.condition.option === 'BT') {
// 介于:需要开始日期和结束日期
if (this.condition.posting_date_start || this.condition.posting_date_end) {
allConditions.posting_date = [{
sign: 'I',
option: 'BT',
low: this.condition.posting_date_start || '',
high: this.condition.posting_date_end || ''
}]
}
} else if (this.condition.option === 'EQ' || this.condition.option === 'LE' || this.condition.option === 'GE') {
// 是、小于等于、大于等于:只需要单个日期
if (this.condition.posting_date) {
allConditions.posting_date = [{
sign: 'I',
option: this.condition.option,
low: this.condition.posting_date,
high: ''
}]
}
}
// 处理客户条件(如果存在)
if (this.condition.customer && this.condition.customer.length > 0) {
const customer = this.condition.customer.map(v => ({
...
...
@@ -162,12 +248,12 @@
// 字段名使用小写,与PC端保持一致
allConditions.customer = customer
}
// 获取用户编号和角色信息,参考 ticket-order.nvue 的方式
const userCode = this.userInfo?.code || ''
// 从 userBpData 获取第一个角色的 ROLE_ID
const roleId = this.userBpData?.ROLES && this.userBpData.ROLES.length > 0
? this.userBpData.ROLES[0].ROLE_ID
const roleId = this.userBpData?.ROLES && this.userBpData.ROLES.length > 0
? this.userBpData.ROLES[0].ROLE_ID
: ''
let params = {
user_bp: userCode,
...
...
@@ -175,22 +261,41 @@
...allConditions,
page: pageNo,
pagesize: this.page.pagesize,
totalCount:
this.page.totalCount,
totalCount:
pageNo === 1 ? 0 : this.page.totalCount, // 第一页时重置totalCount
is_result: 1,
sort: []
}
uni.showLoading({
title: '加载中'
});
const res = await apiGetMarketSupportFee(params);
uni.hideLoading();
if (res && res.data) {
try {
if (pageNo === 1) {
this.lists = res.data || [];
} else {
this.lists = this.lists.concat(res.data || []
);
uni.showLoading({
title: '加载中'
}
);
}
this.page.totalCount = res?.TOTALCOUNT || res?.totalCount || res?.Total || this.page.totalCount;
const res = await apiGetMarketSupportFee(params);
if (pageNo === 1) {
uni.hideLoading();
}
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;
}
}
}
...
...
@@ -236,8 +341,10 @@
.main {
position: relative;
flex-direction: column;
flex: 1;
margin-top: -164rpx;
padding: 0 16rpx;
min-height: 0;
}
.middle {
...
...
@@ -282,6 +389,16 @@
display: flex;
align-items: center;
justify-content: flex-start;
position: relative;
}
.middle-date-des picker {
flex: 1;
min-width: 0;
width: 100%;
display: flex;
align-items: center;
justify-content: flex-start;
}
.picker-year {
...
...
@@ -386,7 +503,7 @@
}
.scroll-area {
overflow-y: scroll
;
flex: 1
;
}
.list-cell {
...
...
pages/usercenter/usercenter.nvue
View file @
0fb8942c
...
...
@@ -35,6 +35,13 @@
</view>
<text class="entry-bill-text">销售订单</text>
</view>
<view class="entry-block" @click="goPage('ticket-order')" v-if='!isChildCustomer'>
<view class="entry-bill">
<image class="entry-bill-icon entry-bill-icon_billing"
src="@/static/image/usercenter_ticketorder@3x.png" mode=""></image>
</view>
<text class="entry-bill-text">制票通知单</text>
</view>
<view class="entry-block" @click="goPage('billing-invoice')">
<view class="entry-bill">
...
...
@@ -44,13 +51,6 @@
</view>
<text class="entry-bill-text">账票管理</text>
</view>
<view class="entry-block" @click="goPage('ticket-order')" v-if='!isChildCustomer'>
<view class="entry-bill">
<image class="entry-bill-icon entry-bill-icon_billing"
src="@/static/image/usercenter_ticketorder@3x.png" mode=""></image>
</view>
<text class="entry-bill-text">制票通知单</text>
</view>
<!-- <view class="entry-block" @click="goPage('produce-order')">
<view class="entry-bill">
...
...
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