fix: 自测功能优化完善。
This commit is contained in:
@@ -81,12 +81,25 @@ export default {
|
|||||||
currentInfoList: [] // 当前
|
currentInfoList: [] // 当前
|
||||||
})
|
})
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
initCalendar()
|
// 使用 nextTick 确保 DOM 完全渲染后再初始化日历
|
||||||
getCalendarList()
|
proxy.$nextTick(() => {
|
||||||
// 初始化当前日期标题
|
// 再延迟一小段时间确保容器尺寸计算完成
|
||||||
updateCurrentDateTitle(dayjs().format('YYYY-MM-DD'))
|
setTimeout(() => {
|
||||||
|
initCalendar()
|
||||||
|
getCalendarList()
|
||||||
|
// 初始化当前日期标题
|
||||||
|
updateCurrentDateTitle(dayjs().format('YYYY-MM-DD'))
|
||||||
|
}, 100)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
const initCalendar = () => {
|
const initCalendar = () => {
|
||||||
|
// 安全检查:确保 DOM 元素存在且有有效宽度
|
||||||
|
if (!state.fullcalendar || !state.fullcalendar.offsetWidth) {
|
||||||
|
console.warn('日历容器未准备好,延迟初始化')
|
||||||
|
setTimeout(() => initCalendar(), 100)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
state.Tcalendar = new Calendar(state.fullcalendar, {
|
state.Tcalendar = new Calendar(state.fullcalendar, {
|
||||||
plugins: [dayGridPlugin, timeGridPlugin, listPlugin, interactionPlugin],
|
plugins: [dayGridPlugin, timeGridPlugin, listPlugin, interactionPlugin],
|
||||||
initialView: 'dayGridMonth',
|
initialView: 'dayGridMonth',
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<u-sticky offsetTop="0rpx" customNavHeight="0rpx">
|
<u-sticky offsetTop="0rpx" customNavHeight="0rpx">
|
||||||
|
|
||||||
<view class="search-view">
|
<view class="search-view">
|
||||||
<u--input v-model="queryParams.name" border="false" placeholder="请输入借贷账户名称" class="search-input"
|
<u--input v-model="queryParams.name" border="false" placeholder="请输入借贷账户" class="search-input"
|
||||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||||
</u--input>
|
</u--input>
|
||||||
<view class="filter-btn" @click="filterPanel = !filterPanel">
|
<view class="filter-btn" @click="filterPanel = !filterPanel">
|
||||||
|
|||||||
@@ -160,6 +160,18 @@ onLoad((option) => {
|
|||||||
}else{
|
}else{
|
||||||
title.value="POS机刷卡记账-新增"
|
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()
|
getData()
|
||||||
})
|
})
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
@@ -233,7 +245,7 @@ function handleCreditCard() {
|
|||||||
updateAccountsTransferRecord(form.value).then(res => {
|
updateAccountsTransferRecord(form.value).then(res => {
|
||||||
proxy.$refs['uToast'].show({
|
proxy.$refs['uToast'].show({
|
||||||
message: '修改成功', complete() {
|
message: '修改成功', complete() {
|
||||||
uni.navigateTo({ url: `/pages/work/accounts/posTransferRecord/list` })
|
uni.navigateBack()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -241,7 +253,7 @@ function handleCreditCard() {
|
|||||||
addAccountsTransferRecord(form.value).then(res => {
|
addAccountsTransferRecord(form.value).then(res => {
|
||||||
proxy.$refs['uToast'].show({
|
proxy.$refs['uToast'].show({
|
||||||
message: '新增成功', complete() {
|
message: '新增成功', complete() {
|
||||||
uni.navigateTo({ url: `/pages/work/accounts/posTransferRecord/list` })
|
uni.navigateBack()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -23,11 +23,13 @@
|
|||||||
<view class="header-info">
|
<view class="header-info">
|
||||||
<view class="card-name-row">
|
<view class="card-name-row">
|
||||||
<text class="card-name">{{ item.name }}</text>
|
<text class="card-name">{{ item.name }}</text>
|
||||||
<text class="card-code">{{ item.code }}</text>
|
<view class="bill-info">
|
||||||
|
<text class="limit-label">账单日</text>
|
||||||
|
<text class="bill-date">{{ item.billDateName }}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="card-limit-row">
|
<view class="card-detail-row">
|
||||||
<text class="limit-label">账单日</text>
|
<text class="card-code">{{ item.code }}</text>
|
||||||
<text class="bill-date">{{ item.billDateName }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -41,7 +43,7 @@
|
|||||||
<view class="pos-section" v-if="item.advicePosNames">
|
<view class="pos-section" v-if="item.advicePosNames">
|
||||||
<view class="section-header">
|
<view class="section-header">
|
||||||
<uni-icons type="shop" size="16" color="#667eea"></uni-icons>
|
<uni-icons type="shop" size="16" color="#667eea"></uni-icons>
|
||||||
<text class="section-title">推荐POS刷卡</text>
|
<text class="section-title">推荐POS机刷卡</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="pos-tags">
|
<view class="pos-tags">
|
||||||
<text class="pos-tag" v-for="(pos, idx) in item.advicePosNames.split('、')" :key="idx">{{ pos }}</text>
|
<text class="pos-tag" v-for="(pos, idx) in item.advicePosNames.split('、')" :key="idx">{{ pos }}</text>
|
||||||
@@ -366,11 +368,15 @@ page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.list-item {
|
.list-item {
|
||||||
margin: 0 24rpx 24rpx;
|
margin: 24rpx 24rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
|
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
margin-top: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.item-header {
|
.item-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -403,46 +409,59 @@ page {
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 8rpx;
|
gap: 6rpx;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-name-row {
|
.card-name-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: baseline;
|
align-items: center;
|
||||||
gap: 10rpx;
|
justify-content: space-between;
|
||||||
|
gap: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-name {
|
.card-name {
|
||||||
font-size: 28rpx;
|
font-size: 30rpx;
|
||||||
font-weight: 600;
|
font-weight: 700;
|
||||||
color: #ffffff;
|
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 {
|
.card-code {
|
||||||
font-size: 24rpx;
|
font-size: 21rpx;
|
||||||
color: rgba(255, 255, 255, 0.75);
|
color: rgba(255, 255, 255, 0.85);
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
|
letter-spacing: 0.5rpx;
|
||||||
|
font-family: 'Courier New', monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-limit-row {
|
.bill-info {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8rpx;
|
gap: 6rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.limit-label {
|
.limit-label {
|
||||||
font-size: 22rpx;
|
font-size: 20rpx;
|
||||||
color: rgba(255, 255, 255, 0.7);
|
color: rgba(255, 255, 255, 0.7);
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bill-date {
|
.bill-date {
|
||||||
font-size: 26rpx;
|
font-size: 24rpx;
|
||||||
font-weight: 500;
|
font-weight: 600;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,10 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="operate" @click.stop>
|
<view class="operate" @click.stop>
|
||||||
|
<view class="btn-swipe" @click="handleSwipe(item)">
|
||||||
|
<uni-icons type="wallet" size="16" color="#fa8c16"></uni-icons>
|
||||||
|
<text>刷卡</text>
|
||||||
|
</view>
|
||||||
<view class="btn-edit" @click="handleEdit(item)">
|
<view class="btn-edit" @click="handleEdit(item)">
|
||||||
<uni-icons type="compose" size="16" color="#667eea"></uni-icons>
|
<uni-icons type="compose" size="16" color="#667eea"></uni-icons>
|
||||||
<text>修改</text>
|
<text>修改</text>
|
||||||
@@ -223,6 +227,16 @@ function dictStr(val, arr) {
|
|||||||
uni.navigateTo({ url: `/pages/work/base/posmachine/addEdit` })
|
uni.navigateTo({ url: `/pages/work/base/posmachine/addEdit` })
|
||||||
isShow.value = true
|
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) {
|
function handleDelete(item) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '确认删除',
|
title: '确认删除',
|
||||||
@@ -472,6 +486,7 @@ page {
|
|||||||
gap: 16rpx;
|
gap: 16rpx;
|
||||||
padding: 16rpx 24rpx 24rpx;
|
padding: 16rpx 24rpx 24rpx;
|
||||||
|
|
||||||
|
.btn-swipe,
|
||||||
.btn-edit,
|
.btn-edit,
|
||||||
.btn-delete {
|
.btn-delete {
|
||||||
display: flex;
|
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 {
|
.btn-edit {
|
||||||
background: rgba(102, 126, 234, 0.1);
|
background: rgba(102, 126, 234, 0.1);
|
||||||
color: #667eea;
|
color: #667eea;
|
||||||
|
|||||||
@@ -56,16 +56,17 @@
|
|||||||
<text class="info-label">还款日</text>
|
<text class="info-label">还款日</text>
|
||||||
<text class="info-value">{{ item.repaymentDay }}</text>
|
<text class="info-value">{{ item.repaymentDay }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-item">
|
<view class="info-item">
|
||||||
<text class="info-label">账单周期</text>
|
|
||||||
<text class="info-value">{{ item.billDatePeriod }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="info-row">
|
|
||||||
<view class="info-item">
|
|
||||||
<text class="info-label">最近交易时间</text>
|
<text class="info-label">最近交易时间</text>
|
||||||
<text class="info-value">{{ item.recentDealTime || '-' }}</text>
|
<text class="info-value">{{ item.recentDealTime || '-' }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="info-row">
|
||||||
|
<view class="info-item">
|
||||||
|
<text class="info-label">账单周期</text>
|
||||||
|
<text class="info-value">{{ item.billDatePeriod }}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="stats-body" v-if="auth.hasPermi('invest:posmachine:list')">
|
<view class="stats-body" v-if="auth.hasPermi('invest:posmachine:list')">
|
||||||
|
|||||||
@@ -3,22 +3,24 @@
|
|||||||
<u-sticky offsetTop="0rpx" customNavHeight="0rpx">
|
<u-sticky offsetTop="0rpx" customNavHeight="0rpx">
|
||||||
|
|
||||||
<view class="search-view">
|
<view class="search-view">
|
||||||
<u--input v-model="queryParams.queryInstitution" border="false" placeholder="请输入" class="search-input"
|
<u--input v-model="queryParams.queryInstitution" border="false" placeholder="请输入查询机构" class="search-input"
|
||||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||||
</u--input>
|
</u--input>
|
||||||
|
</view>
|
||||||
|
<view class="search-view search-view-btns">
|
||||||
<view class="filter-btn" @click="filterPanel = !filterPanel">
|
<view class="filter-btn" @click="filterPanel = !filterPanel">
|
||||||
<uni-icons type="list" size="20" color="#667eea"></uni-icons>
|
<uni-icons type="list" size="18" color="#667eea"></uni-icons>
|
||||||
<text>筛选</text>
|
<text>筛选</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="add-btn" @click="handleAdd()">
|
<view class="add-btn" @click="handleAdd()">
|
||||||
<uni-icons type="plusempty" size="20" color="#667eea"></uni-icons>
|
<uni-icons type="plusempty" size="18" color="#667eea"></uni-icons>
|
||||||
<text>新增</text>
|
<text>新增</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="stats-btn" @click="handleQueryAnalysis()">
|
<view class="stats-btn" @click="handleQueryAnalysis()">
|
||||||
<uni-icons type="bars" size="20" color="#667eea"></uni-icons>
|
<uni-icons type="bars" size="18" color="#667eea"></uni-icons>
|
||||||
<text>统计</text>
|
<text>统计</text>
|
||||||
</view>
|
</view>
|
||||||
<u-transition :show="filterPanel" mode="fade">
|
<u-transition :show="filterPanel" mode="fade" :customStyle="{ position: 'absolute', left: 0, right: 0, top: '100%', zIndex: 99 }">
|
||||||
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
|
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
|
||||||
<view class="filter-panel-content">
|
<view class="filter-panel-content">
|
||||||
<view class="filter-title">查询原因</view>
|
<view class="filter-title">查询原因</view>
|
||||||
@@ -287,17 +289,21 @@ page {
|
|||||||
padding: 12rpx 32rpx;
|
padding: 12rpx 32rpx;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: flex-end;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
gap: 16rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||||
|
|
||||||
|
&.search-view-btns {
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
.search-input {
|
.search-input {
|
||||||
background: rgba(102, 126, 234, 0.08);
|
background: rgba(102, 126, 234, 0.08);
|
||||||
color: #333333;
|
color: #333333;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin-right: 16rpx;
|
|
||||||
border-radius: 24rpx;
|
border-radius: 24rpx;
|
||||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||||
height: 66rpx !important;
|
height: 66rpx !important;
|
||||||
@@ -317,7 +323,6 @@ page {
|
|||||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
margin-left: 12rpx;
|
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
transform: scale(0.95);
|
transform: scale(0.95);
|
||||||
@@ -333,11 +338,7 @@ page {
|
|||||||
|
|
||||||
.filter-panel {
|
.filter-panel {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 96rpx;
|
|
||||||
background-color: rgba(0, 0, 0, 0.5);
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
z-index: 99;
|
|
||||||
|
|
||||||
.filter-panel-content {
|
.filter-panel-content {
|
||||||
background-color: #ffff;
|
background-color: #ffff;
|
||||||
|
|||||||
Reference in New Issue
Block a user