From fb9781ff5240ca0b7ab375e98b8c81e926a1ea1a Mon Sep 17 00:00:00 2001 From: tianyongbao Date: Sun, 15 Feb 2026 01:26:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=87=AA=E6=B5=8B=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AE=8C=E5=96=84=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/calendar/index.vue | 21 +++++-- .../work/accounts/lendTransferRecord/list.vue | 2 +- .../accounts/posTransferRecord/addEdit.vue | 16 +++++- src/pages/work/accounts/posadvice/list.vue | 57 ++++++++++++------- src/pages/work/base/posmachine/list.vue | 21 +++++++ src/pages/work/bill/creditCardBill/list.vue | 15 ++--- .../work/bill/creditQueryRecord/list.vue | 25 ++++---- 7 files changed, 112 insertions(+), 45 deletions(-) diff --git a/src/pages/calendar/index.vue b/src/pages/calendar/index.vue index 88c1075..3fb71bb 100644 --- a/src/pages/calendar/index.vue +++ b/src/pages/calendar/index.vue @@ -81,12 +81,25 @@ export default { currentInfoList: [] // 当前 }) onMounted(() => { - initCalendar() - getCalendarList() - // 初始化当前日期标题 - updateCurrentDateTitle(dayjs().format('YYYY-MM-DD')) + // 使用 nextTick 确保 DOM 完全渲染后再初始化日历 + proxy.$nextTick(() => { + // 再延迟一小段时间确保容器尺寸计算完成 + setTimeout(() => { + initCalendar() + getCalendarList() + // 初始化当前日期标题 + updateCurrentDateTitle(dayjs().format('YYYY-MM-DD')) + }, 100) + }) }) const initCalendar = () => { + // 安全检查:确保 DOM 元素存在且有有效宽度 + if (!state.fullcalendar || !state.fullcalendar.offsetWidth) { + console.warn('日历容器未准备好,延迟初始化') + setTimeout(() => initCalendar(), 100) + return + } + state.Tcalendar = new Calendar(state.fullcalendar, { plugins: [dayGridPlugin, timeGridPlugin, listPlugin, interactionPlugin], initialView: 'dayGridMonth', diff --git a/src/pages/work/accounts/lendTransferRecord/list.vue b/src/pages/work/accounts/lendTransferRecord/list.vue index a852251..ae1a4ba 100644 --- a/src/pages/work/accounts/lendTransferRecord/list.vue +++ b/src/pages/work/accounts/lendTransferRecord/list.vue @@ -3,7 +3,7 @@ - diff --git a/src/pages/work/accounts/posTransferRecord/addEdit.vue b/src/pages/work/accounts/posTransferRecord/addEdit.vue index 0e66558..9d37351 100644 --- a/src/pages/work/accounts/posTransferRecord/addEdit.vue +++ b/src/pages/work/accounts/posTransferRecord/addEdit.vue @@ -160,6 +160,18 @@ onLoad((option) => { }else{ title.value="POS机刷卡记账-新增" } + // 如果从POS机列表页跳转过来,自动填充POS机信息 + if(option.posInfo){ + try { + const posInfo = JSON.parse(decodeURIComponent(option.posInfo)) + form.value.posId = posInfo.posId + form.value.posName = posInfo.posName + form.value.rate = posInfo.rate + form.value.ratePlus = posInfo.ratePlus || 0 + } catch(e) { + console.error('解析POS机信息失败', e) + } + } getData() }) onReady(() => { @@ -233,7 +245,7 @@ function handleCreditCard() { updateAccountsTransferRecord(form.value).then(res => { proxy.$refs['uToast'].show({ message: '修改成功', complete() { - uni.navigateTo({ url: `/pages/work/accounts/posTransferRecord/list` }) + uni.navigateBack() } }) }) @@ -241,7 +253,7 @@ function handleCreditCard() { addAccountsTransferRecord(form.value).then(res => { proxy.$refs['uToast'].show({ message: '新增成功', complete() { - uni.navigateTo({ url: `/pages/work/accounts/posTransferRecord/list` }) + uni.navigateBack() } }) }) diff --git a/src/pages/work/accounts/posadvice/list.vue b/src/pages/work/accounts/posadvice/list.vue index cd4e70a..b9d53b5 100644 --- a/src/pages/work/accounts/posadvice/list.vue +++ b/src/pages/work/accounts/posadvice/list.vue @@ -23,11 +23,13 @@ {{ item.name }} - {{ item.code }} + + 账单日 + {{ item.billDateName }} + - - 账单日 - {{ item.billDateName }} + + {{ item.code }} @@ -41,7 +43,7 @@ - 推荐POS刷卡 + 推荐POS机刷卡 {{ pos }} @@ -366,11 +368,15 @@ page { } .list-item { - margin: 0 24rpx 24rpx; + margin: 24rpx 24rpx; background-color: #fff; border-radius: 16rpx; overflow: hidden; box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08); + + &:first-child { + margin-top: 24rpx; + } .item-header { display: flex; @@ -403,46 +409,59 @@ page { flex: 1; display: flex; flex-direction: column; - gap: 8rpx; + gap: 6rpx; min-width: 0; } .card-name-row { display: flex; - align-items: baseline; - gap: 10rpx; + align-items: center; + justify-content: space-between; + gap: 12rpx; } .card-name { - font-size: 28rpx; - font-weight: 600; + font-size: 30rpx; + font-weight: 700; color: #ffffff; - line-height: 1.2; + line-height: 1.3; + flex: 1; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + .card-detail-row { + display: flex; + align-items: center; } .card-code { - font-size: 24rpx; - color: rgba(255, 255, 255, 0.75); + font-size: 21rpx; + color: rgba(255, 255, 255, 0.85); font-weight: 400; line-height: 1.2; + letter-spacing: 0.5rpx; + font-family: 'Courier New', monospace; } - .card-limit-row { + .bill-info { display: flex; align-items: center; - gap: 8rpx; + gap: 6rpx; + flex-shrink: 0; } .limit-label { - font-size: 22rpx; + font-size: 20rpx; color: rgba(255, 255, 255, 0.7); font-weight: 400; line-height: 1; } .bill-date { - font-size: 26rpx; - font-weight: 500; + font-size: 24rpx; + font-weight: 600; color: #ffffff; line-height: 1; } diff --git a/src/pages/work/base/posmachine/list.vue b/src/pages/work/base/posmachine/list.vue index 20cff5b..7cfac04 100644 --- a/src/pages/work/base/posmachine/list.vue +++ b/src/pages/work/base/posmachine/list.vue @@ -75,6 +75,10 @@ + + + 刷卡 + 修改 @@ -223,6 +227,16 @@ function dictStr(val, arr) { uni.navigateTo({ url: `/pages/work/base/posmachine/addEdit` }) isShow.value = true } + function handleSwipe(item) { + // 跳转到刷卡记账页面,传递POS机信息 + const posInfo = encodeURIComponent(JSON.stringify({ + posId: item.id, + posName: item.nameMerchantName || item.name, + rate: item.rate, + ratePlus: item.ratePlus + })) + uni.navigateTo({ url: `/pages/work/accounts/posTransferRecord/addEdit?posInfo=${posInfo}` }) + } function handleDelete(item) { uni.showModal({ title: '确认删除', @@ -472,6 +486,7 @@ page { gap: 16rpx; padding: 16rpx 24rpx 24rpx; + .btn-swipe, .btn-edit, .btn-delete { display: flex; @@ -490,6 +505,12 @@ page { } } + .btn-swipe { + background: rgba(250, 140, 22, 0.1); + color: #fa8c16; + border-color: rgba(250, 140, 22, 0.3); + } + .btn-edit { background: rgba(102, 126, 234, 0.1); color: #667eea; diff --git a/src/pages/work/bill/creditCardBill/list.vue b/src/pages/work/bill/creditCardBill/list.vue index e0d8c30..e91a8bd 100644 --- a/src/pages/work/bill/creditCardBill/list.vue +++ b/src/pages/work/bill/creditCardBill/list.vue @@ -56,16 +56,17 @@ 还款日 {{ item.repaymentDay }} - - 账单周期 - {{ item.billDatePeriod }} - - - - + 最近交易时间 {{ item.recentDealTime || '-' }} + + + + + 账单周期 + {{ item.billDatePeriod }} + diff --git a/src/pages/work/bill/creditQueryRecord/list.vue b/src/pages/work/bill/creditQueryRecord/list.vue index 5a04371..935cd85 100644 --- a/src/pages/work/bill/creditQueryRecord/list.vue +++ b/src/pages/work/bill/creditQueryRecord/list.vue @@ -3,22 +3,24 @@ - + + - + 筛选 - + 新增 - + 统计 - + 查询原因 @@ -287,17 +289,21 @@ page { padding: 12rpx 32rpx; background-color: #ffffff; display: flex; - justify-content: space-between; + justify-content: flex-end; align-items: center; + gap: 16rpx; position: relative; z-index: 100; box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05); + &.search-view-btns { + justify-content: flex-end; + } + .search-input { background: rgba(102, 126, 234, 0.08); color: #333333; flex: 1; - margin-right: 16rpx; border-radius: 24rpx; border: 2rpx solid rgba(102, 126, 234, 0.3); height: 66rpx !important; @@ -317,7 +323,6 @@ page { border: 2rpx solid rgba(102, 126, 234, 0.3); transition: all 0.3s ease; flex-shrink: 0; - margin-left: 12rpx; &:active { transform: scale(0.95); @@ -333,11 +338,7 @@ page { .filter-panel { width: 100%; - position: absolute; - left: 0; - top: 96rpx; background-color: rgba(0, 0, 0, 0.5); - z-index: 99; .filter-panel-content { background-color: #ffff;