Browse Source

调整后台

罗永浩 3 tháng trước cách đây
mục cha
commit
ed5de4a54a

+ 2 - 2
addons/admin/src/config/setting.js

@@ -5,8 +5,8 @@ export default {
     version: '1.0',
     name: '后台管理系统',  // 项目名称
     loginName: '后台登录',  // 项目名称
-    baseURL: 'http://127.0.5.26/',  // 本地接口地址
-    // baseURL: 'http://129.204.44.254:8001/',  // 本地接口地址
+    // baseURL: 'http://127.0.5.26/',  // 本地接口地址
+    baseURL: 'http://129.204.44.254:8001/',  // 本地接口地址
     signKey: 'dshApp&688', // 签名密钥
     whiteList: ['/login', '/forget'],  // 路由白名单(不需要登录的)
     keepAliveList: [],  // 需要缓存的组件名称

+ 344 - 27
addons/admin/src/views/agents/agents.vue

@@ -113,33 +113,138 @@
 		</el-card>
 
 		<!-- 查看详情弹窗 -->
-		<el-dialog :title="'代理详情'" :visible.sync="detailVisible" width="800px" :lock-scroll="false"
-			:destroy-on-close="true">
-			<el-descriptions :column="2" border v-loading="detailLoading">
-				<el-descriptions-item label="ID">{{ agentInfo.id }}</el-descriptions-item>
-				<el-descriptions-item label="代理姓名">{{ agentInfo.real_name }}</el-descriptions-item>
-				<el-descriptions-item label="联系电话">{{ agentInfo.phone }}</el-descriptions-item>
-				<el-descriptions-item label="身份证号">{{ agentInfo.idcard }}</el-descriptions-item>
-				<el-descriptions-item label="团队人数">{{ agentInfo.team_count || 0 }}</el-descriptions-item>
-				<el-descriptions-item label="代理订单">{{ agentInfo.order_count }}</el-descriptions-item>
-				<el-descriptions-item label="总佣金">
-					<span style="color: #f56c6c;">¥{{ agentInfo.income }}</span>
-				</el-descriptions-item>
-				<el-descriptions-item label="可提现余额">
-					<span style="color: #67c23a;">¥{{ agentInfo.balance }}</span>
-				</el-descriptions-item>
-				<el-descriptions-item label="累计提现">¥{{ agentInfo.withdraw_total }}</el-descriptions-item>
-				<el-descriptions-item label="申请时间">{{ agentInfo.create_time }}</el-descriptions-item>
-				<el-descriptions-item label="状态">
-					<el-tag v-if="agentInfo.status === 1" type="success" size="small">已审核</el-tag>
-					<el-tag v-else-if="agentInfo.status === 2" type="warning" size="small">待审核</el-tag>
-					<el-tag v-else-if="agentInfo.status === 3" type="danger" size="small">已驳回</el-tag>
-					<el-tag v-else-if="agentInfo.status === 4" type="info" size="small">已冻结</el-tag>
-				</el-descriptions-item>
-				<el-descriptions-item label="审核备注" :span="2">
-					{{ agentInfo.confirm_remark || '无' }}
-				</el-descriptions-item>
-			</el-descriptions>
+		<el-dialog title="代理详情" :visible.sync="detailVisible" width="850px" :lock-scroll="false"
+			:destroy-on-close="true" :close-on-click-modal="false">
+			<div v-loading="detailLoading" class="agent-detail-container">
+				<!-- 状态卡片 -->
+				<el-card shadow="hover" class="status-card">
+					<div class="status-header">
+						<div class="status-info">
+							<div class="agent-name">
+								<i class="el-icon-user-solid"></i> {{ agentInfo.real_name }}
+								<span class="agent-id">ID: {{ agentInfo.id }}</span>
+							</div>
+							<div class="status-tags">
+								<el-tag v-if="agentInfo.status === 1" type="success" size="medium">已审核</el-tag>
+								<el-tag v-else-if="agentInfo.status === 2" type="warning" size="medium">待审核</el-tag>
+								<el-tag v-else-if="agentInfo.status === 3" type="danger" size="medium">已驳回</el-tag>
+								<el-tag v-else-if="agentInfo.status === 4" type="info" size="medium">已冻结</el-tag>
+							</div>
+						</div>
+						<div class="stats-display">
+							<div class="stat-item">
+								<span class="label">总佣金</span>
+								<span class="value primary">¥{{ agentInfo.income || 0 }}</span>
+							</div>
+							<div class="stat-item">
+								<span class="label">可提现</span>
+								<span class="value success">¥{{ agentInfo.balance || 0 }}</span>
+							</div>
+							<div class="stat-item">
+								<span class="label">已提现</span>
+								<span class="value info">¥{{ agentInfo.withdraw_total || 0 }}</span>
+							</div>
+						</div>
+					</div>
+				</el-card>
+
+				<!-- 基本信息 -->
+				<el-card shadow="hover" class="info-card">
+					<div slot="header" class="card-title">
+						<i class="el-icon-postcard"></i> 基本信息
+					</div>
+					<el-row :gutter="20">
+						<el-col :span="12">
+							<div class="info-item">
+								<span class="label">代理姓名:</span>
+								<span class="value">{{ agentInfo.real_name }}</span>
+							</div>
+						</el-col>
+						<el-col :span="12">
+							<div class="info-item">
+								<span class="label">联系电话:</span>
+								<span class="value">{{ agentInfo.phone }}</span>
+							</div>
+						</el-col>
+						<el-col :span="24">
+							<div class="info-item">
+								<span class="label">身份证号:</span>
+								<span class="value idcard">{{ agentInfo.idcard }}</span>
+							</div>
+						</el-col>
+						<el-col :span="12">
+							<div class="info-item">
+								<span class="label">申请时间:</span>
+								<span class="value">{{ agentInfo.create_time }}</span>
+							</div>
+						</el-col>
+					</el-row>
+				</el-card>
+
+				<!-- 业绩数据 -->
+				<el-card shadow="hover" class="info-card">
+					<div slot="header" class="card-title">
+						<i class="el-icon-data-line"></i> 业绩数据
+					</div>
+					<el-row :gutter="20">
+						<el-col :span="8">
+							<div class="data-box">
+								<div class="data-label">团队人数</div>
+								<div class="data-value">{{ agentInfo.team_count || 0 }}</div>
+							</div>
+						</el-col>
+						<el-col :span="8">
+							<div class="data-box">
+								<div class="data-label">代理订单</div>
+								<div class="data-value">{{ agentInfo.order_count || 0 }}</div>
+							</div>
+						</el-col>
+						<el-col :span="8">
+							<div class="data-box">
+								<div class="data-label">总佣金</div>
+								<div class="data-value highlight">¥{{ agentInfo.income || 0 }}</div>
+							</div>
+						</el-col>
+					</el-row>
+				</el-card>
+
+				<!-- 财务信息 -->
+				<el-card shadow="hover" class="info-card">
+					<div slot="header" class="card-title">
+						<i class="el-icon-wallet"></i> 财务信息
+					</div>
+					<el-row :gutter="20">
+						<el-col :span="8">
+							<div class="info-item">
+								<span class="label">可提现余额:</span>
+								<span class="value money success">¥{{ agentInfo.balance || 0 }}</span>
+							</div>
+						</el-col>
+						<el-col :span="8">
+							<div class="info-item">
+								<span class="label">累计提现:</span>
+								<span class="value money">¥{{ agentInfo.withdraw_total || 0 }}</span>
+							</div>
+						</el-col>
+						<el-col :span="8">
+							<div class="info-item">
+								<span class="label">总佣金:</span>
+								<span class="value money primary">¥{{ agentInfo.income || 0 }}</span>
+							</div>
+						</el-col>
+					</el-row>
+				</el-card>
+
+				<!-- 审核信息 -->
+				<el-card shadow="hover" class="info-card" v-if="agentInfo.confirm_remark">
+					<div slot="header" class="card-title">
+						<i class="el-icon-chat-line-square"></i> 审核备注
+					</div>
+					<div class="remark-content">
+						{{ agentInfo.confirm_remark }}
+					</div>
+				</el-card>
+			</div>
 
 			<!-- 审核操作按钮 -->
 			<div slot="footer" class="dialog-footer" v-if="agentInfo.status === 2">
@@ -403,4 +508,216 @@ export default {
 .el-divider--vertical {
 	margin: 0 6px;
 }
+
+/* 代理详情弹窗容器 */
+.agent-detail-container {
+	max-height: 70vh;
+	overflow-y: auto;
+	padding: 5px;
+}
+
+/* 状态卡片 */
+.status-card {
+	margin-bottom: 15px;
+	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+	color: #fff;
+}
+
+.status-card >>> .el-card__body {
+	padding: 20px;
+}
+
+.status-header {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	flex-wrap: wrap;
+	gap: 15px;
+}
+
+.status-info {
+	flex: 1;
+}
+
+.agent-name {
+	font-size: 18px;
+	font-weight: bold;
+	margin-bottom: 10px;
+	color: #fff;
+	display: flex;
+	align-items: center;
+	gap: 10px;
+}
+
+.agent-name i {
+	font-size: 20px;
+}
+
+.agent-id {
+	font-size: 14px;
+	color: rgba(255, 255, 255, 0.8);
+	font-weight: normal;
+}
+
+.status-tags {
+	display: flex;
+	gap: 10px;
+	flex-wrap: wrap;
+}
+
+.stats-display {
+	display: flex;
+	gap: 25px;
+	flex-wrap: wrap;
+}
+
+.stat-item {
+	display: flex;
+	flex-direction: column;
+	align-items: flex-end;
+}
+
+.stat-item .label {
+	font-size: 12px;
+	color: rgba(255, 255, 255, 0.8);
+	margin-bottom: 5px;
+}
+
+.stat-item .value {
+	font-size: 22px;
+	font-weight: bold;
+}
+
+.stat-item .value.primary {
+	color: #ffd700;
+}
+
+.stat-item .value.success {
+	color: #67c23a;
+}
+
+.stat-item .value.info {
+	color: #e6f7ff;
+}
+
+/* 信息卡片 */
+.info-card {
+	margin-bottom: 15px;
+}
+
+.info-card >>> .el-card__header {
+	background: #f5f7fa;
+	padding: 12px 20px;
+}
+
+.card-title {
+	font-size: 15px;
+	font-weight: bold;
+	color: #303133;
+}
+
+.card-title i {
+	margin-right: 8px;
+	color: #409eff;
+	font-size: 16px;
+}
+
+.info-item {
+	padding: 10px 0;
+	display: flex;
+	align-items: center;
+	line-height: 1.6;
+}
+
+.info-item .label {
+	font-size: 14px;
+	color: #606266;
+	min-width: 100px;
+	font-weight: 500;
+}
+
+.info-item .value {
+	font-size: 14px;
+	color: #303133;
+	flex: 1;
+}
+
+.info-item .value.idcard {
+	font-family: 'Courier New', monospace;
+	letter-spacing: 1px;
+	font-weight: 500;
+}
+
+.info-item .value.money {
+	font-weight: bold;
+	font-size: 16px;
+}
+
+.info-item .value.money.success {
+	color: #67c23a;
+}
+
+.info-item .value.money.primary {
+	color: #f56c6c;
+}
+
+/* 业绩数据盒子 */
+.data-box {
+	text-align: center;
+	padding: 20px 10px;
+	background: #f9fafc;
+	border-radius: 8px;
+	border: 1px solid #e4e7ed;
+	transition: all 0.3s;
+}
+
+.data-box:hover {
+	background: #ecf5ff;
+	border-color: #b3d8ff;
+	transform: translateY(-2px);
+}
+
+.data-label {
+	font-size: 13px;
+	color: #909399;
+	margin-bottom: 10px;
+}
+
+.data-value {
+	font-size: 26px;
+	font-weight: bold;
+	color: #303133;
+}
+
+.data-value.highlight {
+	color: #f56c6c;
+}
+
+/* 审核备注 */
+.remark-content {
+	padding: 15px;
+	background: #f9fafc;
+	border-radius: 4px;
+	line-height: 1.8;
+	color: #606266;
+	font-size: 14px;
+}
+
+/* 滚动条样式 */
+.agent-detail-container::-webkit-scrollbar {
+	width: 6px;
+}
+
+.agent-detail-container::-webkit-scrollbar-thumb {
+	background: #dcdfe6;
+	border-radius: 3px;
+}
+
+.agent-detail-container::-webkit-scrollbar-thumb:hover {
+	background: #c0c4cc;
+}
+
+.agent-detail-container::-webkit-scrollbar-track {
+	background: #f5f7fa;
+}
 </style>

+ 124 - 4
addons/admin/src/views/financial/accountLogApply.vue

@@ -140,12 +140,17 @@
 
 		<!-- 查看详情弹窗 -->
 		<el-dialog
-			title="申请详情"
 			:visible.sync="detailVisible"
-			width="600px"
+			width="700px"
 			:destroy-on-close="true"
-			:close-on-click-modal="false">
-			<el-descriptions :column="2" border size="medium">
+			:close-on-click-modal="false"
+			class="detail-dialog"
+			top="8vh">
+			<div slot="title" class="detail-dialog-header">
+				<i class="el-icon-document"></i>
+				<span>申请详情</span>
+			</div>
+			<el-descriptions :column="2" border size="medium" class="detail-descriptions">
 				<el-descriptions-item label="订单号" :span="2">{{ detailData.order_no }}</el-descriptions-item>
 				<el-descriptions-item label="申请类型">
 					<el-tag :type="detailData.type === 1 ? 'success' : 'primary'" size="small">
@@ -172,6 +177,20 @@
 				<el-descriptions-item label="收款账号" :span="2">{{ detailData.account }}</el-descriptions-item>
 				<el-descriptions-item label="账号备注" :span="2" v-if="detailData.account_remark">{{ detailData.account_remark }}</el-descriptions-item>
 				<el-descriptions-item label="申请时间" :span="2">{{ detailData.create_time_text }}</el-descriptions-item>
+				<el-descriptions-item label="打款凭证" :span="2" v-if="detailData.pay_img">
+					<div class="pay-img-preview">
+						<el-image
+							:src="detailData.pay_img"
+							:preview-src-list="[detailData.pay_img]"
+							fit="cover"
+							class="preview-image">
+							<div slot="error" class="image-slot">
+								<i class="el-icon-picture-outline"></i>
+								<span>加载失败</span>
+							</div>
+						</el-image>
+					</div>
+				</el-descriptions-item>
 				<el-descriptions-item label="审核备注" :span="2" v-if="detailData.confirm_remark">{{ detailData.confirm_remark }}</el-descriptions-item>
 			</el-descriptions>
 			<div slot="footer">
@@ -607,4 +626,105 @@ export default {
 		}
 	}
 }
+
+/* 申请详情弹窗 */
+.detail-dialog {
+	::v-deep .el-dialog {
+		border-radius: 12px;
+		overflow: hidden;
+		box-shadow: 0 12px 32px 4px rgba(0, 0, 0, 0.04), 0 8px 20px rgba(0, 0, 0, 0.08);
+	}
+
+	::v-deep .el-dialog__header {
+		padding: 0;
+		border-bottom: 1px solid #f0f0f0;
+	}
+
+	::v-deep .el-dialog__body {
+		padding: 30px;
+		max-height: 75vh;
+		overflow-y: auto;
+	}
+
+	::v-deep .el-dialog__footer {
+		padding: 16px 30px;
+		border-top: 1px solid #f0f0f0;
+		background-color: #fafafa;
+	}
+
+	.detail-dialog-header {
+		display: flex;
+		align-items: center;
+		padding: 20px 30px;
+		background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+		color: white;
+
+		i {
+			font-size: 20px;
+			margin-right: 12px;
+		}
+
+		span {
+			font-size: 18px;
+			font-weight: 600;
+		}
+	}
+
+	.detail-descriptions {
+		::v-deep .el-descriptions-item__label {
+			font-weight: 500;
+			background-color: #f8f9fa;
+			color: #303133;
+			width: 120px;
+		}
+
+		::v-deep .el-descriptions-item__content {
+			padding: 14px 18px;
+			line-height: 1.8;
+		}
+
+		::v-deep .el-descriptions__body {
+			background-color: #fff;
+		}
+	}
+}
+
+/* 打款凭证图片预览 */
+.pay-img-preview {
+	padding: 10px 0;
+
+	.preview-image {
+		width: 200px;
+		height: 200px;
+		border-radius: 8px;
+		box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
+		cursor: pointer;
+		transition: all 0.3s ease;
+
+		&:hover {
+			transform: scale(1.05);
+			box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
+		}
+	}
+
+	.image-slot {
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		width: 100%;
+		height: 100%;
+		background-color: #f5f7fa;
+		color: #909399;
+
+		i {
+			font-size: 40px;
+			margin-bottom: 10px;
+		}
+
+		span {
+			font-size: 14px;
+		}
+	}
+}
 </style>

+ 2 - 12
addons/admin/src/views/order/order.vue

@@ -462,6 +462,7 @@
 				</el-button>
 			</div>
 		</el-dialog>
+
 	</div>
 </template>
 
@@ -506,7 +507,7 @@ export default {
 		this.loadStatistics();
 	},
 	computed: {
-		...mapGetters(["permission"]),
+		...mapGetters(["permission"])
 	},
 	methods: {
 		handleTabClick(tab) {
@@ -779,17 +780,6 @@ export default {
 				});
 			}).catch(() => { });
 		},
-		// 快捷申请退款
-		quickApplyRefund(row) {
-			this.refundForm = {
-				id: row.id,
-				after_type: 2,
-				after_realname: '',
-				after_phone: '',
-				after_remark: ''
-			};
-			this.refundVisible = true;
-		},
 	}
 }
 </script>

+ 24 - 7
addons/admin/src/views/orders/refundOrder.vue

@@ -227,12 +227,14 @@ export default {
 			this.$confirm('同意退款后,退款状态将变为"已审核",需要再次确认退款才会完成退款流程。确定要同意吗?', '同意退款', {
 				confirmButtonText: '确定',
 				cancelButtonText: '取消',
-				type: 'warning'
+				type: 'warning',
+				closeOnClickModal: false
 			}).then(() => {
 				this.$prompt('请输入审核备注', '同意退款', {
 					confirmButtonText: '确定',
 					cancelButtonText: '取消',
-					inputPlaceholder: '请输入审核备注(选填)'
+					inputPlaceholder: '请输入审核备注(选填)',
+					closeOnClickModal: false
 				}).then(({ value }) => {
 					const loading = this.$loading({ lock: true });
 					this.$http.post('/order/agreeRefund', {
@@ -254,14 +256,28 @@ export default {
 			}).catch(() => { });
 		},
 		handleConfirmRefund(row) {
-			this.$confirm(`确定要确认退款 ¥${row.pay_total} 吗?此操作表示已完成退款流程。`, '确认退款', {
+			this.$prompt(`请输入退款金额(订单金额:¥${row.pay_total})`, '确认退款', {
 				confirmButtonText: '确定',
 				cancelButtonText: '取消',
-				type: 'warning'
-			}).then(() => {
+				inputPattern: /^(0|[1-9]\d*)(\.\d{1,2})?$/,
+				inputErrorMessage: '请输入正确的金额格式(最多两位小数)',
+				inputPlaceholder: '请输入退款金额',
+				inputValue: row.pay_total,
+				closeOnClickModal: false
+			}).then(({ value }) => {
+				const refundAmount = parseFloat(value);
+				if (refundAmount <= 0) {
+					this.$message.error('退款金额必须大于0');
+					return;
+				}
+				if (refundAmount > parseFloat(row.pay_total)) {
+					this.$message.error('退款金额不能超过订单金额');
+					return;
+				}
 				const loading = this.$loading({ lock: true });
 				this.$http.post('/order/confirmRefund', {
-					id: row.id
+					id: row.id,
+					refund_amount: refundAmount
 				}).then(res => {
 					loading.close();
 					if (res.data.code === 0) {
@@ -281,7 +297,8 @@ export default {
 				confirmButtonText: '确定',
 				cancelButtonText: '取消',
 				inputPattern: /.+/,
-				inputErrorMessage: '请输入驳回原因'
+				inputErrorMessage: '请输入驳回原因',
+				closeOnClickModal: false
 			}).then(({ value }) => {
 				const loading = this.$loading({ lock: true });
 				this.$http.post('/order/rejectRefund', {

+ 360 - 35
addons/admin/src/views/pay/components/OrdersManage.vue

@@ -17,7 +17,7 @@
 								<el-option label="充值中" :value="3"/>
 								<el-option label="充值成功" :value="4"/>
 								<el-option label="充值失败" :value="5"/>
-								<el-option label="已退款" :value="6"/>
+								<el-option label="部分成功" :value="6"/>
 							</el-select>
 						</el-form-item>
 					</el-col>
@@ -56,7 +56,7 @@
 					<el-table-column prop="account" label="充值号码" width="130" align="center"/>
 					<el-table-column prop="total" label="充值金额" width="100" align="center">
 						<template slot-scope="{row}">
-							<span style="color: #F56C6C; font-weight: bold;">¥{{ row.total }}</span>
+							<span style="color: #F56C6C; font-weight: bold;">{{ row.total }}</span>
 						</template>
 					</el-table-column>
 					<el-table-column prop="discount" label="折扣(%)" width="90" align="center">
@@ -67,7 +67,13 @@
 					</el-table-column>
 					<el-table-column prop="pay_total" label="实付金额" width="100" align="center">
 						<template slot-scope="{row}">
-							<span style="color: #67C23A; font-weight: bold;">¥{{ row.pay_total }}</span>
+							<span style="color: #67C23A; font-weight: bold;">¥{{ row.pay_total }}</span>
+						</template>
+					</el-table-column>
+					<el-table-column prop="charge_amount" label="充值成功金额" width="130" align="center">
+						<template slot-scope="{row}">
+							<span v-if="row.charge_amount > 0" style="color: #409EFF; font-weight: bold;">¥{{ row.charge_amount }}</span>
+							<span v-else>-</span>
 						</template>
 					</el-table-column>
 					<el-table-column label="用户昵称" width="120" align="center">
@@ -75,14 +81,19 @@
 							{{ row.user_nickname || '-' }}
 						</template>
 					</el-table-column>
-					<el-table-column label="状态" width="100" align="center">
+					<el-table-column label="状态" width="120" align="center">
 						<template slot-scope="{row}">
-							<el-tag v-if="row.status === 1" type="info" size="mini">待付款</el-tag>
-							<el-tag v-else-if="row.status === 2" type="primary" size="mini">已付款</el-tag>
-							<el-tag v-else-if="row.status === 3" type="warning" size="mini">充值中</el-tag>
-							<el-tag v-else-if="row.status === 4" type="success" size="mini">充值成功</el-tag>
-							<el-tag v-else-if="row.status === 5" type="danger" size="mini">充值失败</el-tag>
-							<el-tag v-else-if="row.status === 6" type="info" size="mini">已退款</el-tag>
+							<div style="display: flex; flex-direction: column; gap: 3px; align-items: center;">
+								<el-tag v-if="row.status === 1" type="info" size="mini">待付款</el-tag>
+								<el-tag v-else-if="row.status === 2" type="primary" size="mini">已付款</el-tag>
+								<el-tag v-else-if="row.status === 3" type="warning" size="mini">充值中</el-tag>
+								<el-tag v-else-if="row.status === 4" type="success" size="mini">充值成功</el-tag>
+								<el-tag v-else-if="row.status === 5" type="danger" size="mini">充值失败</el-tag>
+								<el-tag v-else-if="row.status === 6" type="" size="mini">部分成功</el-tag>
+								<el-tag v-if="row.refund_status == 1" type="success" size="mini">退款成功</el-tag>
+								<el-tag v-else-if="row.refund_status == 2" type="warning" size="mini">待退款</el-tag>
+								<el-tag v-else-if="row.refund_status == 3" type="danger" size="mini">退款失败</el-tag>
+							</div>
 						</template>
 					</el-table-column>
 					<el-table-column prop="create_time_text" label="创建时间" min-width="160" align="center" show-overflow-tooltip/>
@@ -102,31 +113,172 @@
 		</el-card>
 
 		<!-- 详情弹窗 -->
-		<el-dialog title="充值记录详情" :visible.sync="detailVisible" width="600px" :destroy-on-close="true">
-			<el-descriptions :column="2" border v-if="detailData">
-				<el-descriptions-item label="订单号" :span="2">{{ detailData.order_no }}</el-descriptions-item>
-				<el-descriptions-item label="充值号码" :span="2">{{ detailData.account }}</el-descriptions-item>
-				<el-descriptions-item label="充值金额">¥{{ detailData.total }}</el-descriptions-item>
-				<el-descriptions-item label="折扣">{{ detailData.discount > 0 ? detailData.discount + '%' : '无' }}</el-descriptions-item>
-				<el-descriptions-item label="实付金额">¥{{ detailData.pay_total }}</el-descriptions-item>
-				<el-descriptions-item label="状态">
-					<el-tag v-if="detailData.status === 1" type="info" size="mini">待付款</el-tag>
-					<el-tag v-else-if="detailData.status === 2" type="primary" size="mini">已付款</el-tag>
-					<el-tag v-else-if="detailData.status === 3" type="warning" size="mini">充值中</el-tag>
-					<el-tag v-else-if="detailData.status === 4" type="success" size="mini">充值成功</el-tag>
-					<el-tag v-else-if="detailData.status === 5" type="danger" size="mini">充值失败</el-tag>
-					<el-tag v-else-if="detailData.status === 6" type="info" size="mini">已退款</el-tag>
-				</el-descriptions-item>
-				<el-descriptions-item label="用户昵称">{{ detailData.user_nickname || '-' }}</el-descriptions-item>
-				<el-descriptions-item label="用户手机">{{ detailData.user_mobile || '-' }}</el-descriptions-item>
-				<el-descriptions-item label="交易单号" :span="2">{{ detailData.transaction_id || '-' }}</el-descriptions-item>
-				<el-descriptions-item label="平台订单号" :span="2">{{ detailData.out_trade_num || '-' }}</el-descriptions-item>
-				<el-descriptions-item label="产品ID">{{ detailData.product_id || '-' }}</el-descriptions-item>
-				<el-descriptions-item label="套餐ID">{{ detailData.meal_id || '-' }}</el-descriptions-item>
-				<el-descriptions-item label="备注" :span="2">{{ detailData.remark || '-' }}</el-descriptions-item>
-				<el-descriptions-item label="创建时间" :span="2">{{ detailData.create_time_text }}</el-descriptions-item>
-				<el-descriptions-item label="更新时间" :span="2">{{ detailData.update_time_text }}</el-descriptions-item>
-			</el-descriptions>
+		<el-dialog title="充值记录详情" :visible.sync="detailVisible" width="800px" :destroy-on-close="true" :close-on-click-modal="false">
+			<div v-if="detailData" class="order-detail-container">
+				<!-- 状态卡片 -->
+				<el-card shadow="hover" class="status-card">
+					<div class="status-header">
+						<div class="status-info">
+							<div class="order-number">订单号:{{ detailData.order_no }}</div>
+							<div class="status-tags">
+								<el-tag v-if="detailData.status === 1" type="info" size="medium">待付款</el-tag>
+								<el-tag v-else-if="detailData.status === 2" type="primary" size="medium">已付款</el-tag>
+								<el-tag v-else-if="detailData.status === 3" type="warning" size="medium">充值中</el-tag>
+								<el-tag v-else-if="detailData.status === 4" type="success" size="medium">充值成功</el-tag>
+								<el-tag v-else-if="detailData.status === 5" type="danger" size="medium">充值失败</el-tag>
+								<el-tag v-else-if="detailData.status === 6" type="" size="medium">部分成功</el-tag>
+								
+								<el-tag v-if="detailData.refund_status == 1" type="success" size="medium">退款成功</el-tag>
+								<el-tag v-else-if="detailData.refund_status == 2" type="warning" size="medium">待退款</el-tag>
+								<el-tag v-else-if="detailData.refund_status == 3" type="danger" size="medium">退款失败</el-tag>
+							</div>
+						</div>
+						<div class="amount-display">
+							<div class="amount-item">
+								<span class="label">充值金额</span>
+								<span class="value primary">¥{{ detailData.total }}</span>
+							</div>
+							<div class="amount-item" v-if="detailData.charge_amount > 0">
+								<span class="label">成功金额</span>
+								<span class="value success">¥{{ detailData.charge_amount }}</span>
+							</div>
+							<div class="amount-item" v-if="detailData.refund_money > 0">
+								<span class="label">退款金额</span>
+								<span class="value danger">¥{{ detailData.refund_money }}</span>
+							</div>
+						</div>
+					</div>
+				</el-card>
+
+				<!-- 充值信息 -->
+				<el-card shadow="hover" class="info-card">
+					<div slot="header" class="card-title">
+						<i class="el-icon-mobile-phone"></i> 充值信息
+					</div>
+					<el-row :gutter="20">
+						<el-col :span="12">
+							<div class="info-item">
+								<span class="label">充值号码:</span>
+								<span class="value">{{ detailData.account }}</span>
+							</div>
+						</el-col>
+						<el-col :span="12">
+							<div class="info-item">
+								<span class="label">实付金额:</span>
+								<span class="value highlight">¥{{ detailData.pay_total }}</span>
+							</div>
+						</el-col>
+						<el-col :span="12">
+							<div class="info-item">
+								<span class="label">折扣:</span>
+								<span class="value">{{ detailData.discount > 0 ? detailData.discount + '%' : '无' }}</span>
+							</div>
+						</el-col>
+						<el-col :span="12">
+							<div class="info-item">
+								<span class="label">套餐ID:</span>
+								<span class="value">{{ detailData.meal_id || '-' }}</span>
+							</div>
+						</el-col>
+					</el-row>
+				</el-card>
+
+				<!-- 用户信息 -->
+				<el-card shadow="hover" class="info-card">
+					<div slot="header" class="card-title">
+						<i class="el-icon-user"></i> 用户信息
+					</div>
+					<el-row :gutter="20">
+						<el-col :span="12">
+							<div class="info-item">
+								<span class="label">用户昵称:</span>
+								<span class="value">{{ detailData.user_nickname || '-' }}</span>
+							</div>
+						</el-col>
+						<el-col :span="12">
+							<div class="info-item">
+								<span class="label">用户手机:</span>
+								<span class="value">{{ detailData.user_mobile || '-' }}</span>
+							</div>
+						</el-col>
+					</el-row>
+				</el-card>
+
+				<!-- 交易信息 -->
+				<el-card shadow="hover" class="info-card">
+					<div slot="header" class="card-title">
+						<i class="el-icon-document"></i> 交易信息
+					</div>
+					<el-row :gutter="20">
+						<el-col :span="24">
+							<div class="info-item">
+								<span class="label">交易单号:</span>
+								<span class="value">{{ detailData.transaction_id || '-' }}</span>
+							</div>
+						</el-col>
+						<el-col :span="24">
+							<div class="info-item">
+								<span class="label">平台订单号:</span>
+								<span class="value">{{ detailData.out_trade_no || '-' }}</span>
+							</div>
+						</el-col>
+						<el-col :span="12">
+							<div class="info-item">
+								<span class="label">产品ID:</span>
+								<span class="value">{{ detailData.product_id || '-' }}</span>
+							</div>
+						</el-col>
+						<el-col :span="12" v-if="detailData.charge_kami">
+							<div class="info-item">
+								<span class="label">充值卡密:</span>
+								<span class="value kami">{{ detailData.charge_kami }}</span>
+							</div>
+						</el-col>
+					</el-row>
+				</el-card>
+
+				<!-- 时间信息 -->
+				<el-card shadow="hover" class="info-card">
+					<div slot="header" class="card-title">
+						<i class="el-icon-time"></i> 时间信息
+					</div>
+					<el-row :gutter="20">
+						<el-col :span="8">
+							<div class="info-item">
+								<span class="label">创建时间:</span>
+								<span class="value">{{ detailData.create_time_text }}</span>
+							</div>
+						</el-col>
+						<el-col :span="8">
+							<div class="info-item">
+								<span class="label">支付时间:</span>
+								<span class="value">{{ detailData.pay_at_text }}</span>
+							</div>
+						</el-col>
+						<el-col :span="8">
+							<div class="info-item">
+								<span class="label">更新时间:</span>
+								<span class="value">{{ detailData.update_time_text }}</span>
+							</div>
+						</el-col>
+					</el-row>
+				</el-card>
+
+				<!-- 备注信息 -->
+				<el-card shadow="hover" class="info-card" v-if="detailData.remark || detailData.failed_remark">
+					<div slot="header" class="card-title">
+						<i class="el-icon-chat-line-square"></i> 备注信息
+					</div>
+					<div v-if="detailData.remark" class="remark-item">
+						<span class="label">备注:</span>
+						<span class="value">{{ detailData.remark }}</span>
+					</div>
+					<div v-if="detailData.failed_remark" class="remark-item failed">
+						<span class="label">失败原因:</span>
+						<span class="value">{{ detailData.failed_remark }}</span>
+					</div>
+				</el-card>
+			</div>
 			<div slot="footer">
 				<el-button @click="detailVisible = false">关闭</el-button>
 			</div>
@@ -223,4 +375,177 @@ export default {
 </script>
 
 <style scoped>
+/* 详情弹窗容器 */
+.order-detail-container {
+	max-height: 70vh;
+	overflow-y: auto;
+	padding: 5px;
+}
+
+/* 状态卡片 */
+.status-card {
+	margin-bottom: 15px;
+	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+	color: #fff;
+}
+
+.status-card >>> .el-card__body {
+	padding: 20px;
+}
+
+.status-header {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	flex-wrap: wrap;
+	gap: 15px;
+}
+
+.status-info {
+	flex: 1;
+}
+
+.order-number {
+	font-size: 16px;
+	font-weight: bold;
+	margin-bottom: 10px;
+	color: #fff;
+}
+
+.status-tags {
+	display: flex;
+	gap: 10px;
+	flex-wrap: wrap;
+}
+
+.amount-display {
+	display: flex;
+	gap: 20px;
+	flex-wrap: wrap;
+}
+
+.amount-item {
+	display: flex;
+	flex-direction: column;
+	align-items: flex-end;
+}
+
+.amount-item .label {
+	font-size: 12px;
+	color: rgba(255, 255, 255, 0.8);
+	margin-bottom: 5px;
+}
+
+.amount-item .value {
+	font-size: 22px;
+	font-weight: bold;
+}
+
+.amount-item .value.primary {
+	color: #ffd700;
+}
+
+.amount-item .value.success {
+	color: #67c23a;
+}
+
+.amount-item .value.danger {
+	color: #ff6b6b;
+}
+
+/* 信息卡片 */
+.info-card {
+	margin-bottom: 15px;
+}
+
+.info-card >>> .el-card__header {
+	background: #f5f7fa;
+	padding: 12px 20px;
+}
+
+.card-title {
+	font-size: 15px;
+	font-weight: bold;
+	color: #303133;
+}
+
+.card-title i {
+	margin-right: 8px;
+	color: #409eff;
+	font-size: 16px;
+}
+
+.info-item {
+	padding: 10px 0;
+	display: flex;
+	align-items: center;
+	line-height: 1.6;
+}
+
+.info-item .label {
+	font-size: 14px;
+	color: #606266;
+	min-width: 90px;
+	font-weight: 500;
+}
+
+.info-item .value {
+	font-size: 14px;
+	color: #303133;
+	flex: 1;
+}
+
+.info-item .value.highlight {
+	color: #67c23a;
+	font-weight: bold;
+	font-size: 16px;
+}
+
+.info-item .value.kami {
+	color: #e6a23c;
+	font-weight: bold;
+	font-family: 'Courier New', monospace;
+}
+
+/* 备注信息 */
+.remark-item {
+	padding: 10px 0;
+	line-height: 1.8;
+}
+
+.remark-item .label {
+	font-size: 14px;
+	color: #606266;
+	font-weight: 500;
+	display: inline-block;
+	min-width: 80px;
+}
+
+.remark-item .value {
+	font-size: 14px;
+	color: #303133;
+}
+
+.remark-item.failed .value {
+	color: #f56c6c;
+	font-weight: 500;
+}
+
+/* 滚动条样式 */
+.order-detail-container::-webkit-scrollbar {
+	width: 6px;
+}
+
+.order-detail-container::-webkit-scrollbar-thumb {
+	background: #dcdfe6;
+	border-radius: 3px;
+}
+
+.order-detail-container::-webkit-scrollbar-thumb:hover {
+	background: #c0c4cc;
+}
+
+.order-detail-container::-webkit-scrollbar-track {
+	background: #f5f7fa;
+}
 </style>

+ 47 - 28
addons/admin/src/views/store/store.vue

@@ -775,8 +775,26 @@ export default {
 
 	::v-deep .el-dialog__body {
 		padding: 0;
-		max-height: 70vh;
+		max-height: 75vh;
 		overflow-y: auto;
+		
+		&::-webkit-scrollbar {
+			width: 8px;
+		}
+		
+		&::-webkit-scrollbar-track {
+			background: #f1f1f1;
+			border-radius: 4px;
+		}
+		
+		&::-webkit-scrollbar-thumb {
+			background: #c1c1c1;
+			border-radius: 4px;
+			
+			&:hover {
+				background: #a8a8a8;
+			}
+		}
 	}
 
 	::v-deep .el-dialog__footer {
@@ -809,17 +827,17 @@ export default {
 
 /* 弹窗内容 */
 .dialog-content {
-	padding: 32px 24px;
+	padding: 40px 32px;
 	background-color: #fff;
 
 	// 为整个表单区域添加间距
 	.el-row {
-		margin-left: -10px !important;
-		margin-right: -10px !important;
+		margin-left: -12px !important;
+		margin-right: -12px !important;
 		
 		.el-col {
-			padding-left: 10px !important;
-			padding-right: 10px !important;
+			padding-left: 12px !important;
+			padding-right: 12px !important;
 		}
 	}
 }
@@ -828,8 +846,8 @@ export default {
 .store-form {
 	// 确保表单项之间有足够的间距
 	::v-deep .el-form-item {
-		margin-bottom: 24px !important;
-		padding-bottom: 8px;
+		margin-bottom: 28px !important;
+		padding-bottom: 12px;
 
 		&:last-child {
 			margin-bottom: 0 !important;
@@ -839,14 +857,14 @@ export default {
 			font-weight: 500;
 			color: #303133;
 			font-size: 14px;
-			line-height: 1.5;
-			margin-bottom: 8px;
+			line-height: 1.8;
+			margin-bottom: 10px;
 			height: auto !important;
 		}
 
 		.el-form-item__content {
 			line-height: normal;
-			min-height: 40px;
+			min-height: 42px;
 			display: flex;
 			align-items: center;
 		}
@@ -909,14 +927,14 @@ export default {
 .detail-text {
 	color: #606266;
 	font-size: 14px;
-	line-height: 1.6;
-	padding: 10px 12px;
-	min-height: 40px;
+	line-height: 1.8;
+	padding: 12px 16px;
+	min-height: 42px;
 	display: flex;
 	align-items: center;
 	background-color: #f8f9fa;
 	border: 1px solid #e9ecef;
-	border-radius: 6px;
+	border-radius: 8px;
 	margin: 0;
 
 	&.time-text {
@@ -1068,20 +1086,21 @@ export default {
 
 /* 图片预览 */
 .image-preview {
-	padding: 10px 0;
-	min-height: 40px;
+	padding: 12px 0;
+	min-height: 42px;
 	display: flex;
 	align-items: flex-start;
 
 	.preview-image {
-		width: 200px;
+		width: 220px;
 		height: auto;
-		border-radius: 8px;
-		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
-		transition: transform 0.3s ease;
+		border-radius: 10px;
+		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
+		transition: all 0.3s ease;
 
 		&:hover {
-			transform: scale(1.02);
+			transform: scale(1.03);
+			box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
 			cursor: pointer;
 		}
 	}
@@ -1089,8 +1108,8 @@ export default {
 
 /* 状态包装 */
 .status-wrapper {
-	padding: 10px 12px;
-	min-height: 40px;
+	padding: 12px 16px;
+	min-height: 42px;
 	display: flex;
 	align-items: center;
 	background-color: #f8f9fa;
@@ -1102,13 +1121,13 @@ export default {
 .remark-text {
 	color: #606266;
 	font-size: 14px;
-	line-height: 1.6;
-	padding: 12px 16px;
+	line-height: 1.8;
+	padding: 14px 18px;
 	background-color: #f8f9fa;
 	border-left: 4px solid #409eff;
-	border-radius: 4px;
+	border-radius: 6px;
 	margin: 0;
-	min-height: 40px;
+	min-height: 42px;
 	display: flex;
 	align-items: flex-start;
 }

+ 1 - 2
app/Models/OrderGoodsModel.php

@@ -22,8 +22,7 @@ class OrderGoodsModel extends BaseModel
      */
     public function category()
     {
-        return $this->hasOne(GoodsCategoryModel::class, 'id', 'category_id')
+        return $this->belongsTo(GoodsCategoryModel::class, 'category_id', 'id')
             ->select(['id', 'name', 'icon', 'status']);
     }
 }
-

+ 23 - 2
app/Models/PayOrdersModel.php

@@ -11,18 +11,25 @@ class PayOrdersModel extends BaseModel
 
     protected $fillable = [
         'order_no',
+        'user_id',
         'total',
         'type',
         'discount',
         'pay_total',
+        'charge_amount',
+        'pay_at',
         'account',
         'transaction_id',
         'meal_id',
         'product_id',
-        'out_trade_num',
+        'out_trade_no',
+        'charge_kami',
         'remark',
+        'failed_remark',
         'create_time',
         'update_time',
+        'refund_status',
+        'refund_money',
         'status',
         'mark'
     ];
@@ -67,8 +74,22 @@ class PayOrdersModel extends BaseModel
             3 => '充值中',
             4 => '充值成功',
             5 => '充值失败',
-            6 => '已退款'
+            6 => '部分成功'
         ];
         return $statusMap[$this->status] ?? '未知';
     }
+
+    /**
+     * 获取退款状态文本
+     */
+    public function getRefundStatusTextAttribute()
+    {
+        $refundStatusMap = [
+            0 => '无',
+            1 => '已成功',
+            2 => '待退款',
+            3 => '退款失败'
+        ];
+        return $refundStatusMap[$this->refund_status] ?? '未知';
+    }
 }

+ 53 - 8
app/Services/Common/BalanceLogsService.php

@@ -4,6 +4,8 @@ namespace App\Services\Common;
 
 use App\Models\BalanceLogModel;
 use App\Models\MemberModel;
+use App\Models\AgentModel;
+use App\Models\StoreModel;
 use App\Services\BaseService;
 use Illuminate\Support\Facades\DB;
 
@@ -267,6 +269,11 @@ class BalanceLogsService extends BaseService
                 if (!empty($payImg)) {
                     $record->pay_img = $payImg;
                 }
+
+                // 如果是代理提现审核通过,更新代理表的累计提现金额
+                if ($record->account_type == 2 && $record->type == 2) {
+                    $this->updateAgentWithdrawTotal($record);
+                }
             }
 
             $record->save();
@@ -286,17 +293,55 @@ class BalanceLogsService extends BaseService
     }
 
     /**
-     * 退回余
+     * 更新代理表的累计提现金
      */
-    private function refundBalance($record)
+    private function updateAgentWithdrawTotal($record)
     {
-        // 所有用户(会员、代理、商户)都在 member 表中
-        $user = MemberModel::find($record->user_id);
+        // 查找代理记录
+        $agent = AgentModel::where('user_id', $record->user_id)
+            ->where('mark', 1)
+            ->first();
+
+        if ($agent) {
+            // 累加提现金额到 withdraw_total
+            $agent->withdraw_total = bcadd($agent->withdraw_total ?? 0, $record->actual_money, 2);
+            $agent->save();
+        }
+    }
 
-        if ($user) {
-            // 退回余额
-            $user->balance = bcadd($user->balance, $record->money, 2);
-            $user->save();
+    /**
+     * 退回余额(根据账户类型退回到对应的表)
+     */
+    private function refundBalance($record)
+    {
+        switch ($record->account_type) {
+            case 1: // 会员账户
+                $user = MemberModel::find($record->user_id);
+                if ($user) {
+                    $user->balance = bcadd($user->balance, $record->money, 2);
+                    $user->save();
+                }
+                break;
+                
+            case 2: // 代理账户
+                $agent = AgentModel::where('user_id', $record->user_id)
+                    ->where('mark', 1)
+                    ->first();
+                if ($agent) {
+                    $agent->balance = bcadd($agent->balance, $record->money, 2);
+                    $agent->save();
+                }
+                break;
+                
+            case 3: // 商户账户
+                $store = StoreModel::where('user_id', $record->user_id)
+                    ->where('mark', 1)
+                    ->first();
+                if ($store) {
+                    $store->balance = bcadd($store->balance, $record->money, 2);
+                    $store->save();
+                }
+                break;
         }
     }
 

+ 53 - 15
app/Services/Common/OrderService.php

@@ -729,7 +729,7 @@ class OrderService extends BaseService
         // 调用用户端的订单完成方法,触发收益结算等业务逻辑
         $apiOrderService = \App\Services\Api\OrderService::make();
         $result = $apiOrderService->complete($order->user_id, $id);
-        
+
         if ($result) {
             ActionLogModel::setTitle("订单完成");
             ActionLogModel::record();
@@ -888,35 +888,73 @@ class OrderService extends BaseService
     public function confirmRefund()
     {
         $id = request()->post('id');
+        $refundAmount = request()->post('refund_amount', 0);
 
         if (!$id) {
             return ['code' => 1, 'msg' => '参数错误'];
         }
 
+        if ($refundAmount <= 0) {
+            return ['code' => 1, 'msg' => '请输入退款金额'];
+        }
+
         $order = $this->model->find($id);
         if (!$order) {
             return ['code' => 1, 'msg' => '订单不存在'];
         }
 
-        if ($order->refund_status != 2) {
-            return ['code' => 1, 'msg' => '该订单未审核通过,无法确认退款'];
+        // 允许待审核(3)和已审核(2)状态的订单进行退款
+        if (!in_array($order->refund_status, [2, 3])) {
+            return ['code' => 1, 'msg' => '该订单状态不允许退款'];
         }
 
-        $updateData = [
-            'refund_status' => 1, // 已退款
-            'update_time' => time()
-        ];
+        if ($refundAmount > $order->pay_total) {
+            return ['code' => 1, 'msg' => '退款金额不能大于订单金额'];
+        }
 
-        $result = $this->model->where('id', $id)->update($updateData);
+        // 使用事务
+        DB::beginTransaction();
+        try {
+            // 调用支付服务退款
+            $paymentService = \App\Services\PaymentService::make();
+            $refundData = [
+                'money' => $refundAmount,
+                'pay_type' => $order->pay_type,
+                'order_no' => $order->order_no,
+                'out_trade_no' => $order->out_trade_no,
+                'transaction_id' => $order->transaction_id,
+                'remark' => '订单退款'
+            ];
 
-        if ($result) {
-            ActionLogModel::setTitle("确认退款");
-            ActionLogModel::record();
-            RedisService::keyDel("caches:orders:*");
-            return ['code' => 0, 'msg' => '退款已确认'];
-        }
+            $refundResult = $paymentService->refund($refundData, 'store');
+            if (!$refundResult) {
+                DB::rollBack();
+                return ['code' => 1, 'msg' => '退款失败:' . $paymentService->getError() ?: '退款失败'];
+            }
 
-        return ['code' => 1, 'msg' => '操作失败'];
+            // 更新订单状态
+            $updateData = [
+                'refund_status' => 1, // 已退款
+                'refund_amount' => $refundAmount,
+                'update_time' => time()
+            ];
+
+            $result = $this->model->where('id', $id)->update($updateData);
+
+            if ($result) {
+                DB::commit();
+                ActionLogModel::setTitle("确认退款");
+                ActionLogModel::record();
+                RedisService::keyDel("caches:orders:*");
+                return ['code' => 0, 'msg' => '退款成功'];
+            }
+
+            DB::rollBack();
+            return ['code' => 1, 'msg' => '更新订单状态失败'];
+        } catch (\Exception $e) {
+            DB::rollBack();
+            return ['code' => 1, 'msg' => '退款失败:' . $e->getMessage()];
+        }
     }
 
     /**

+ 12 - 0
app/Services/Common/PayOrdersService.php

@@ -72,8 +72,11 @@ class PayOrdersService extends BaseService
             $item['total'] = number_format($item['total'], 2, '.', '');
             $item['discount'] = number_format($item['discount'], 2, '.', '');
             $item['pay_total'] = number_format($item['pay_total'], 2, '.', '');
+            $item['charge_amount'] = number_format($item['charge_amount'] ?? 0, 2, '.', '');
+            $item['refund_money'] = number_format($item['refund_money'] ?? 0, 2, '.', '');
             $item['create_time_text'] = date('Y-m-d H:i:s', (int)$item['create_time']);
             $item['update_time_text'] = date('Y-m-d H:i:s', (int)$item['update_time']);
+            $item['pay_at_text'] = $item['pay_at'] ? date('Y-m-d H:i:s', strtotime($item['pay_at'])) : '-';
             
             // 用户信息
             if (isset($item['user'])) {
@@ -112,8 +115,17 @@ class PayOrdersService extends BaseService
         $info['total'] = number_format($info['total'], 2, '.', '');
         $info['discount'] = number_format($info['discount'], 2, '.', '');
         $info['pay_total'] = number_format($info['pay_total'], 2, '.', '');
+        $info['charge_amount'] = number_format($info['charge_amount'] ?? 0, 2, '.', '');
+        $info['refund_money'] = number_format($info['refund_money'] ?? 0, 2, '.', '');
         $info['create_time_text'] = date('Y-m-d H:i:s', (int)$info['create_time']);
         $info['update_time_text'] = date('Y-m-d H:i:s', (int)$info['update_time']);
+        $info['pay_at_text'] = $info['pay_at'] ? date('Y-m-d H:i:s', strtotime($info['pay_at'])) : '-';
+        
+        // 用户信息
+        if (isset($info['user'])) {
+            $info['user_nickname'] = $info['user']['nickname'] ?? '';
+            $info['user_mobile'] = $info['user']['mobile'] ?? '';
+        }
 
         return [
             'code' => 0,

+ 1 - 7
app/Services/Common/StoreService.php

@@ -399,18 +399,12 @@ class StoreService extends BaseService
                 return ['code' => 1, 'msg' => '商家已被禁用'];
             }
 
-            // 获取会员信息
-            $member = MemberModel::find($store->user_id);
-            if (!$member) {
-                return ['code' => 1, 'msg' => '商家关联的会员信息不存在'];
-            }
-
             $data = [
                 'user_id' => $store->user_id,
                 'name' => $store->name,
                 'real_name' => $store->real_name,
                 'phone' => $store->phone,
-                'balance' => $member->balance,
+                'balance' => $store->balance,
                 'status' => $store->status
             ];