合并代码
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
# 生产环境配置
|
||||
VITE_API_BASE_URL=http://114.55.111.44:3001/api
|
||||
VITE_UPLOAD_BASE_URL=http://114.55.111.44:3001/api/upload
|
||||
VITE_API_BASE_URL=https://www.zrbjr.com/api
|
||||
VITE_UPLOAD_BASE_URL=https://www.zrbjr.com/api/upload
|
||||
|
||||
@@ -5,38 +5,23 @@
|
||||
<!-- <p class="subtitle">智能匹配,循环增值</p> -->
|
||||
</div>
|
||||
|
||||
<!-- 统计卡片 -->
|
||||
<!-- <div class="stats-cards">
|
||||
<div class="stat-card">
|
||||
<div class="stat-number">{{ stats.userStats?.initiated_orders || 0 }}</div>
|
||||
<div class="stat-label">发起订单</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="stat-number">{{ stats.userStats?.participated_allocations || 0 }}</div>
|
||||
<div class="stat-label">参与分配</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- 操作区域 -->
|
||||
<div class="action-section">
|
||||
<div class="create-order-card">
|
||||
<h3>货款匹配</h3>
|
||||
|
||||
<!-- 匹配类型选择 -->
|
||||
<div class="matching-type-selector">
|
||||
<div class="type-tabs">
|
||||
<button
|
||||
:class="['type-tab', { active: matchingType === 'small' }]"
|
||||
@click="matchingType = 'small'"
|
||||
>
|
||||
小额匹配
|
||||
</button>
|
||||
<button
|
||||
:class="['type-tab', { active: matchingType === 'large' }]"
|
||||
@click="matchingType = 'large'"
|
||||
>
|
||||
大额匹配
|
||||
</button>
|
||||
<div class="card-header">
|
||||
<h3>货款匹配</h3>
|
||||
<div class="toggle-container">
|
||||
<span class="toggle-label">开启大额匹配</span>
|
||||
<label class="apple-switch">
|
||||
<input
|
||||
type="checkbox"
|
||||
v-model="tempMatchingType"
|
||||
true-value="large"
|
||||
false-value="small"
|
||||
@change="handleMatchingTypeChange"
|
||||
>
|
||||
<span class="apple-switch-slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -102,7 +87,7 @@
|
||||
<div v-if="matchingType === 'large'" class="tips">
|
||||
<p>• 金额范围:5000-50000元</p>
|
||||
<p>• 15000元以下:分成3笔随机金额</p>
|
||||
<p>• 15000元以上:随机分拆,每笔1000-8000元</p>
|
||||
<p>• 15000元以上:随机分拆,每笔100-10000元</p>
|
||||
<p>• 优先匹配已完成进货的用户</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -339,6 +324,27 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 大额匹配确认弹窗 -->
|
||||
<el-dialog
|
||||
v-model="showLargeMatchingConfirm"
|
||||
title="开启大额匹配"
|
||||
width="90%"
|
||||
:style="{ maxWidth: '500px' }"
|
||||
>
|
||||
<div class="confirm-dialog-content">
|
||||
<p>确认要开启大额匹配吗?</p>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="cancelLargeMatching">取消</el-button>
|
||||
<el-button type="primary" @click="confirmLargeMatching">
|
||||
确认开启
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -377,13 +383,36 @@ export default {
|
||||
actualAmount: 0,
|
||||
voucher: '',
|
||||
description: ''
|
||||
}
|
||||
},
|
||||
showLargeMatchingConfirm: false,
|
||||
tempMatchingType: 'small' // 临时存储切换前的类型
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
await this.loadData()
|
||||
},
|
||||
methods: {
|
||||
handleMatchingTypeChange() {
|
||||
if (this.tempMatchingType === 'large') {
|
||||
// 如果要切换到大额匹配,显示确认对话框
|
||||
this.showLargeMatchingConfirm = true
|
||||
} else {
|
||||
// 直接切换到小额匹配
|
||||
this.matchingType = this.tempMatchingType
|
||||
}
|
||||
},
|
||||
|
||||
confirmLargeMatching() {
|
||||
this.matchingType = 'large'
|
||||
this.showLargeMatchingConfirm = false
|
||||
this.$message.success('已开启大额匹配模式')
|
||||
},
|
||||
|
||||
cancelLargeMatching() {
|
||||
this.tempMatchingType = 'small' // 重置开关状态
|
||||
this.showLargeMatchingConfirm = false
|
||||
},
|
||||
|
||||
async loadData() {
|
||||
try {
|
||||
await Promise.all([
|
||||
@@ -635,7 +664,7 @@ export default {
|
||||
} else if (amount <= 15000) {
|
||||
return '分成3笔随机金额'
|
||||
} else {
|
||||
return '随机分拆,每笔1000-8000元'
|
||||
return '随机分拆,每笔100-10000元'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -651,8 +680,8 @@ export default {
|
||||
return '3'
|
||||
} else {
|
||||
// 15000以上随机分拆,估算笔数范围
|
||||
const minCount = Math.ceil(amount / 8000) // 按最大单笔8000计算最少笔数
|
||||
const maxCount = Math.floor(amount / 1000) // 按最小单笔1000计算最多笔数
|
||||
const minCount = Math.ceil(amount / 10000) // 按最大单笔10000计算最少笔数
|
||||
const maxCount = Math.floor(amount / 100) // 按最小单笔100计算最多笔数
|
||||
return `${minCount}-${Math.min(maxCount, 10)}` // 限制最大显示笔数为10
|
||||
}
|
||||
},
|
||||
@@ -790,6 +819,7 @@ export default {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
background: linear-gradient(to bottom, #72c9ffae, #f3f3f3);
|
||||
}
|
||||
|
||||
.header {
|
||||
@@ -841,6 +871,76 @@ export default {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.toggle-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.toggle-label {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.apple-switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 34px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.apple-switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.apple-switch-slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #e0e0e0;
|
||||
transition: .4s;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.apple-switch-slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
left: 2px;
|
||||
bottom: 2px;
|
||||
background-color: white;
|
||||
transition: .4s;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.apple-switch input:checked + .apple-switch-slider {
|
||||
background-color: #4CD964;
|
||||
}
|
||||
|
||||
.apple-switch input:checked + .apple-switch-slider:before {
|
||||
transform: translateX(18px);
|
||||
}
|
||||
|
||||
/* 移除原有的匹配类型选择器样式 */
|
||||
.matching-type-selector,
|
||||
.type-tabs,
|
||||
.type-tab {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.create-order-card {
|
||||
background: white;
|
||||
padding: 20px;
|
||||
@@ -903,15 +1003,18 @@ export default {
|
||||
}
|
||||
|
||||
.create-btn {
|
||||
width: 100%;
|
||||
width: 50%;
|
||||
padding: 12px;
|
||||
background: #3498db;
|
||||
background: #0099ff;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
border-radius: 1000px; /* 保持胶囊形状 */
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
transition: background 0.3s;
|
||||
display: block; /* 改为块级元素 */
|
||||
margin: 0 auto; /* 水平居中 */
|
||||
text-align: center; /* 文字居中 */
|
||||
}
|
||||
|
||||
.create-btn:hover {
|
||||
|
||||
@@ -65,13 +65,6 @@
|
||||
<span class="balance-label">我的余额</span>
|
||||
<span class="balance-value">¥{{ accountInfo.balance }}</span>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div class="balance-item">
|
||||
<router-link to="/mymatching">
|
||||
<span class="balance-label">匹配记录</span>
|
||||
<span class="balance-arrow">></span>
|
||||
</router-link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -485,35 +478,24 @@ export default {
|
||||
}
|
||||
|
||||
.balance-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.divider {
|
||||
width: 1px;
|
||||
height: 40px;
|
||||
background-color: rgba(255, 255, 255, 0.3);
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.balance-label {
|
||||
font-size: 14px;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
margin-bottom: 5px;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
letter-spacing: 0.5px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.balance-value {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
font-size: 28px;
|
||||
font-weight: 600;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.balance-arrow {
|
||||
font-size: 16px;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
letter-spacing: 0.5px;
|
||||
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
/* 我的订单 */
|
||||
|
||||
@@ -10,22 +10,6 @@
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- 账户信息 -->
|
||||
<div class="account-info">
|
||||
<el-card>
|
||||
<div class="account-balance">
|
||||
<div class="balance-item">
|
||||
<span class="label">账户余额:</span>
|
||||
<span class="amount">¥{{ accountInfo.balance || '0.00' }}</span>
|
||||
</div>
|
||||
<div class="balance-item">
|
||||
<span class="label">账户类型:</span>
|
||||
<span class="type">{{ accountInfo.account_type === 'public' ? '公户' : '用户账户' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<!-- 待转账 -->
|
||||
<div class="pending-transfers" v-if="pendingAllocations.length > 0 || pendingTransfers.length > 0">
|
||||
<el-card>
|
||||
@@ -140,12 +124,41 @@
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>转账记录</span>
|
||||
<el-select v-model="statusFilter" placeholder="状态筛选" size="small" style="width: 120px">
|
||||
<el-option label="全部" value="" />
|
||||
<el-option label="待确认" value="pending" />
|
||||
<el-option label="已确认" value="confirmed" />
|
||||
<el-option label="已拒绝" value="rejected" />
|
||||
</el-select>
|
||||
</div>
|
||||
<!-- 状态筛选导航栏 -->
|
||||
<div class="status-filter-nav">
|
||||
<div
|
||||
class="filter-item"
|
||||
:class="{ active: statusFilter === '' }"
|
||||
@click="statusFilter = ''"
|
||||
>
|
||||
<span class="filter-text">全部</span>
|
||||
<span class="filter-count">{{ totalCount }}</span>
|
||||
</div>
|
||||
<div
|
||||
class="filter-item"
|
||||
:class="{ active: statusFilter === 'pending' }"
|
||||
@click="statusFilter = 'pending'"
|
||||
>
|
||||
<span class="filter-text">待确认</span>
|
||||
<span class="filter-count">{{ pendingCount }}</span>
|
||||
</div>
|
||||
<div
|
||||
class="filter-item"
|
||||
:class="{ active: statusFilter === 'confirmed' }"
|
||||
@click="statusFilter = 'confirmed'"
|
||||
>
|
||||
<span class="filter-text">已确认</span>
|
||||
<span class="filter-count">{{ confirmedCount }}</span>
|
||||
</div>
|
||||
<div
|
||||
class="filter-item"
|
||||
:class="{ active: statusFilter === 'rejected' }"
|
||||
@click="statusFilter = 'rejected'"
|
||||
>
|
||||
<span class="filter-text">已拒绝</span>
|
||||
<span class="filter-count">{{ rejectedCount }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -235,206 +248,8 @@
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<!-- 发起转账对话框 -->
|
||||
<el-dialog
|
||||
v-model="showCreateTransfer"
|
||||
title="发起转账"
|
||||
width="90%"
|
||||
:style="{ maxWidth: '500px' }"
|
||||
@close="resetTransferForm"
|
||||
>
|
||||
<el-form
|
||||
ref="transferFormRef"
|
||||
:model="transferForm"
|
||||
:rules="transferRules"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="收款用户" prop="to_user_id">
|
||||
<el-select
|
||||
v-model="transferForm.to_user_id"
|
||||
placeholder="请选择收款用户"
|
||||
filterable
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="user in userList"
|
||||
:key="user.id"
|
||||
:label="`${user.real_name || user.username} (${user.username})`"
|
||||
:value="user.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="转账金额" prop="amount">
|
||||
<el-input
|
||||
v-model="transferForm.amount"
|
||||
placeholder="请输入转账金额"
|
||||
type="number"
|
||||
step="0.01"
|
||||
>
|
||||
<template #prepend>¥</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="转账类型" prop="transfer_type">
|
||||
<el-select v-model="transferForm.transfer_type" placeholder="请选择转账类型">
|
||||
<el-option label="普通转账" value="user_to_user" />
|
||||
<el-option label="初始转账" value="initial" />
|
||||
<el-option label="返还转账" value="return" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="转账说明" prop="description">
|
||||
<el-input
|
||||
v-model="transferForm.description"
|
||||
type="textarea"
|
||||
placeholder="请输入转账说明"
|
||||
:rows="3"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="转账凭证">
|
||||
<el-upload
|
||||
ref="uploadRef"
|
||||
:action="uploadUrl"
|
||||
:headers="uploadHeaders"
|
||||
:before-upload="beforeUpload"
|
||||
:on-success="handleUploadSuccess"
|
||||
:on-error="handleUploadError"
|
||||
:show-file-list="false"
|
||||
accept="image/*"
|
||||
>
|
||||
<el-button size="small" type="primary">上传凭证</el-button>
|
||||
</el-upload>
|
||||
<div v-if="transferForm.voucher" class="upload-preview">
|
||||
<img :src="formatImageUrl(transferForm.voucher)" alt="转账凭证" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="showCreateTransfer = false">取消</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="submitTransfer"
|
||||
:loading="submitLoading"
|
||||
>
|
||||
提交转账
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 转账凭证查看对话框 -->
|
||||
<el-dialog
|
||||
v-model="showVoucherDialog"
|
||||
title="转账凭证"
|
||||
width="90%"
|
||||
:style="{ maxWidth: '600px' }"
|
||||
>
|
||||
<div class="voucher-dialog-content">
|
||||
<div class="transfer-info">
|
||||
<h4>转账信息</h4>
|
||||
<div class="info-row">
|
||||
<span class="label">转账金额:</span>
|
||||
<span class="value amount">¥{{ currentTransfer.amount }}</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="label">转账说明:</span>
|
||||
<span class="value">{{ currentTransfer.description }}</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="label">转账时间:</span>
|
||||
<span class="value">{{ formatTime(currentTransfer.created_at) }}</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="label">转账类型:</span>
|
||||
<span class="value">{{ getTransferTypeText(currentTransfer.transfer_type) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="voucher-section" v-if="currentTransfer.voucher_url">
|
||||
<h4>转账凭证</h4>
|
||||
<div class="voucher-image-container">
|
||||
<el-image
|
||||
:src="formatImageUrl(currentTransfer.voucher_url)"
|
||||
:preview-src-list="[formatImageUrl(currentTransfer.voucher_url)]"
|
||||
class="voucher-preview"
|
||||
fit="contain"
|
||||
>
|
||||
<template #error>
|
||||
<div class="image-slot">
|
||||
<el-icon><Picture /></el-icon>
|
||||
<p>凭证加载失败</p>
|
||||
</div>
|
||||
</template>
|
||||
</el-image>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else class="no-voucher">
|
||||
<el-icon><Picture /></el-icon>
|
||||
<p>暂无转账凭证</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="showVoucherDialog = false">取消</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
@click="doConfirmReceived"
|
||||
:loading="confirmLoading"
|
||||
>
|
||||
确认收款
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 回款确认对话框 -->
|
||||
<el-dialog
|
||||
v-model="showReturnDialog"
|
||||
title="确认回款"
|
||||
width="500px"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form :model="returnForm" label-width="100px">
|
||||
<el-form-item label="回款金额">
|
||||
<el-input
|
||||
v-model="returnForm.returnAmount"
|
||||
type="number"
|
||||
placeholder="请输入回款金额"
|
||||
:disabled="true"
|
||||
>
|
||||
<template #append>元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注说明">
|
||||
<el-input
|
||||
v-model="returnForm.description"
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
placeholder="请输入备注说明"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="showReturnDialog = false">取消</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
@click="confirmReturn"
|
||||
:loading="confirmLoading"
|
||||
>
|
||||
确认回款
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 其余对话框保持不变 -->
|
||||
<!-- ... -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -465,7 +280,6 @@ const returnForm = reactive({
|
||||
description: ''
|
||||
})
|
||||
|
||||
const accountInfo = ref({})
|
||||
const pendingTransfers = ref([])
|
||||
const pendingAllocations = ref([])
|
||||
const transferHistory = ref([])
|
||||
@@ -477,17 +291,6 @@ const pagination = reactive({
|
||||
total: 0
|
||||
})
|
||||
|
||||
const transferForm = reactive({
|
||||
to_user_id: '',
|
||||
amount: '',
|
||||
transfer_type: 'user_to_user',
|
||||
description: '',
|
||||
voucher: ''
|
||||
})
|
||||
|
||||
const transferFormRef = ref()
|
||||
const uploadRef = ref()
|
||||
|
||||
// 移动端检测和分页布局
|
||||
const windowWidth = ref(window.innerWidth)
|
||||
|
||||
@@ -514,23 +317,8 @@ const handleResize = () => {
|
||||
const uploadUrl = ref(uploadURL)
|
||||
const uploadHeaders = computed(() => getUploadConfig().headers)
|
||||
|
||||
// 表单验证规则
|
||||
const transferRules = {
|
||||
to_user_id: [
|
||||
{ required: true, message: '请选择收款用户', trigger: 'change' }
|
||||
],
|
||||
amount: [
|
||||
{ required: true, message: '请输入转账金额', trigger: 'blur' },
|
||||
{ pattern: /^\d+(\.\d{1,2})?$/, message: '请输入有效的金额', trigger: 'blur' }
|
||||
],
|
||||
transfer_type: [
|
||||
{ required: true, message: '请选择转账类型', trigger: 'change' }
|
||||
]
|
||||
}
|
||||
|
||||
// 生命周期
|
||||
onMounted(() => {
|
||||
loadAccountInfo()
|
||||
loadPendingTransfers()
|
||||
loadPendingAllocations()
|
||||
loadTransferHistory()
|
||||
@@ -552,17 +340,6 @@ watch(statusFilter, () => {
|
||||
})
|
||||
|
||||
// 方法
|
||||
const loadAccountInfo = async () => {
|
||||
try {
|
||||
const response = await api.get(`/transfers/account/${userStore.user.id}`)
|
||||
if (response.data.success) {
|
||||
accountInfo.value = response.data.data
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('加载账户信息失败:', error)
|
||||
}
|
||||
}
|
||||
|
||||
const loadPendingTransfers = async () => {
|
||||
try {
|
||||
const response = await api.get('/transfers/pending')
|
||||
@@ -1009,12 +786,25 @@ const confirmNotReceived = async (transferId) => {
|
||||
confirmLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 计算各个状态的数量
|
||||
const totalCount = computed(() => pagination.total)
|
||||
const pendingCount = computed(() => {
|
||||
return transferHistory.value.filter(t => t.status === 'pending').length
|
||||
})
|
||||
const confirmedCount = computed(() => {
|
||||
return transferHistory.value.filter(t => t.status === 'confirmed').length
|
||||
})
|
||||
const rejectedCount = computed(() => {
|
||||
return transferHistory.value.filter(t => t.status === 'rejected').length
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.transfers-page {
|
||||
min-height: 100vh;
|
||||
background: #f5f7fa;
|
||||
background: linear-gradient(to bottom, #72c9ffae, #f3f3f3);
|
||||
}
|
||||
|
||||
.navbar {
|
||||
@@ -1024,10 +814,11 @@ const confirmNotReceived = async (transferId) => {
|
||||
padding: 0 20px;
|
||||
height: 60px;
|
||||
background: white;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
z-index: 1000; /* 增加z-index确保在最上层 */
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
|
||||
border-bottom: 1px solid #ebeef5; /* 添加底部边框 */
|
||||
}
|
||||
|
||||
.nav-title {
|
||||
@@ -1036,39 +827,6 @@ const confirmNotReceived = async (transferId) => {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.back-btn {
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.account-info {
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
.account-balance {
|
||||
display: flex;
|
||||
gap: 30px;
|
||||
}
|
||||
|
||||
.balance-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.balance-item .label {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.balance-item .amount {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.balance-item .type {
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.pending-transfers,
|
||||
.transfer-history {
|
||||
margin: 20px;
|
||||
@@ -1084,6 +842,47 @@ const confirmNotReceived = async (transferId) => {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.status-filter-nav {
|
||||
display: flex;
|
||||
margin-top: 15px;
|
||||
|
||||
.filter-item {
|
||||
flex: 1; // 均分空间
|
||||
text-align: center;
|
||||
padding: 8px 0;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
border-bottom: 2px solid transparent;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
&:hover {
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
&.active {
|
||||
color: #409eff;
|
||||
border-bottom-color: #409eff;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.filter-text {
|
||||
font-size: 14px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.filter-count {
|
||||
font-size: 12px;
|
||||
background-color: #f0f2f5;
|
||||
border-radius: 12px;
|
||||
padding: 2px 6px;
|
||||
min-width: 20px;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.transfer-list {
|
||||
max-height: 400px;
|
||||
overflow-y: auto;
|
||||
@@ -1095,7 +894,7 @@ const confirmNotReceived = async (transferId) => {
|
||||
align-items: center;
|
||||
padding: 15px;
|
||||
border: 1px solid #ebeef5;
|
||||
border-radius: 8px;
|
||||
border-radius: 12px;
|
||||
margin-bottom: 10px;
|
||||
background: white;
|
||||
overflow: hidden;
|
||||
@@ -1160,7 +959,7 @@ const confirmNotReceived = async (transferId) => {
|
||||
.voucher-image {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border-radius: 4px;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.image-slot {
|
||||
@@ -1288,236 +1087,26 @@ const confirmNotReceived = async (transferId) => {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.upload-preview {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.upload-preview img {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
object-fit: cover;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #dcdfe6;
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* 转账凭证对话框样式 */
|
||||
.voucher-dialog-content {
|
||||
.transfer-info {
|
||||
margin-bottom: 20px;
|
||||
padding: 16px;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 8px;
|
||||
|
||||
h4 {
|
||||
margin: 0 0 12px 0;
|
||||
color: #303133;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
margin-bottom: 8px;
|
||||
|
||||
.label {
|
||||
min-width: 80px;
|
||||
color: #606266;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.value {
|
||||
color: #303133;
|
||||
flex: 1;
|
||||
|
||||
&.amount {
|
||||
color: #e6a23c;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.voucher-section {
|
||||
h4 {
|
||||
margin: 0 0 12px 0;
|
||||
color: #303133;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.voucher-image-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 8px;
|
||||
border: 2px dashed #dcdfe6;
|
||||
|
||||
.voucher-preview {
|
||||
max-width: 100%;
|
||||
max-height: 400px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.no-voucher {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 40px 20px;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 8px;
|
||||
border: 2px dashed #dcdfe6;
|
||||
color: #909399;
|
||||
|
||||
.el-icon {
|
||||
font-size: 48px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.image-slot {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
color: #909399;
|
||||
|
||||
.el-icon {
|
||||
font-size: 48px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 移动端适配增强 */
|
||||
/* 移动端适配 */
|
||||
@media (max-width: 768px) {
|
||||
.deadline-info {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.timeout-warning {
|
||||
padding: 6px 10px;
|
||||
}
|
||||
|
||||
.warning-text {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.transfer-header .el-tag {
|
||||
margin-left: 0;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.account-info,
|
||||
.pending-transfers,
|
||||
.transfer-history {
|
||||
margin: 15px;
|
||||
}
|
||||
|
||||
.account-balance {
|
||||
flex-direction: column;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.balance-item .amount {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.transfer-item {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 12px;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.transfer-info {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.transfer-header {
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.amount {
|
||||
font-size: 16px;
|
||||
margin-left: 0;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.transfer-actions {
|
||||
width: 100%;
|
||||
justify-content: flex-end;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.transfer-details p {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.voucher-image {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
/* 分页组件移动端适配 */
|
||||
.pagination {
|
||||
margin: 15px 0;
|
||||
.status-filter-nav {
|
||||
overflow-x: auto;
|
||||
padding: 0 5px;
|
||||
}
|
||||
white-space: nowrap;
|
||||
padding-bottom: 5px;
|
||||
|
||||
.pagination :deep(.el-pagination) {
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
.filter-item {
|
||||
min-width: 80px; // 在移动端保持最小宽度
|
||||
flex: none;
|
||||
padding: 6px 0;
|
||||
|
||||
.pagination :deep(.el-pagination__total),
|
||||
.pagination :deep(.el-pagination__sizes),
|
||||
.pagination :deep(.el-pagination__jump) {
|
||||
margin: 4px 0;
|
||||
}
|
||||
.filter-text {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.pagination :deep(.el-pager) {
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.pagination :deep(.el-pager .number),
|
||||
.pagination :deep(.btn-prev),
|
||||
.pagination :deep(.btn-next) {
|
||||
min-width: 32px;
|
||||
height: 32px;
|
||||
font-size: 14px;
|
||||
margin: 2px;
|
||||
.filter-count {
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1538,19 +1127,10 @@ const confirmNotReceived = async (transferId) => {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.return-time-status.can-return {
|
||||
color: #67c23a;
|
||||
}
|
||||
|
||||
.return-time-status.waiting {
|
||||
color: #e6a23c;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.account-info,
|
||||
.pending-transfers,
|
||||
.transfer-history {
|
||||
margin: 10px;
|
||||
@@ -1560,10 +1140,6 @@ const confirmNotReceived = async (transferId) => {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.balance-item .amount {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.transfer-actions {
|
||||
gap: 8px;
|
||||
}
|
||||
@@ -1634,4 +1210,14 @@ const confirmNotReceived = async (transferId) => {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.el-card {
|
||||
border-radius: 12px !important;
|
||||
overflow: hidden;
|
||||
|
||||
:deep(.el-card__header) {
|
||||
border-radius: 12px 12px 0 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -14,11 +14,11 @@ export default defineConfig({
|
||||
port: 5173,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://114.55.111.44:3001',
|
||||
target: 'http://114.55.111.44:3000',
|
||||
changeOrigin: true
|
||||
},
|
||||
'/uploads': {
|
||||
target: 'http://114.55.111.44:3001',
|
||||
target: 'http://114.55.111.44:3000',
|
||||
changeOrigin: true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user