@@ -60,6 +67,7 @@
+
@@ -133,6 +141,7 @@
已删除
已到期
+ 待开通
正常
@@ -513,7 +522,7 @@
import { ref, reactive, computed, onMounted, watch } from 'vue'
import { useRouter } from 'vue-router'
import { ElMessage, ElMessageBox } from 'element-plus'
-import { Plus, Refresh, Search, ArrowDown, Box, CircleCheck, Clock, Delete } from '@element-plus/icons-vue'
+import { Plus, Refresh, Search, ArrowDown, Box, CircleCheck, Clock, Delete, Timer } from '@element-plus/icons-vue'
import { getUserGoodsList, getUserGoodsCount, createUserGoods, updateUserGoods, deleteUserGoods, getUserVmList, getExpireRemindList, sendExpireRemind } from '@/api/admin/userVm'
import { extractApiError } from '@/utils/kvmErrorUtil'
import { formatToApiTime } from '@/utils/tool'
@@ -536,8 +545,8 @@ const showFilterUserSelector = ref(false)
const showFilterProductSelector = ref(false)
// 用户商品数量统计
-const counts = reactive({ normal: 0, deleted: 0, expired: 0 })
-const countTotal = computed(() => (counts.normal || 0) + (counts.deleted || 0) + (counts.expired || 0))
+const counts = reactive({ normal: 0, deleted: 0, expired: 0, pending: 0 })
+const countTotal = computed(() => (counts.normal || 0) + (counts.deleted || 0) + (counts.expired || 0) + (counts.pending || 0))
const formatTime = (t) => t ? dayjs(t).format('YYYY-MM-DD HH:mm:ss') : '-'
@@ -616,6 +625,7 @@ const loadCount = async () => {
counts.normal = d.normal ?? 0
counts.deleted = d.deleted ?? 0
counts.expired = d.expired ?? 0
+ counts.pending = d.pending ?? 0
}
} catch { /* 统计失败不阻断列表 */ }
}
@@ -1054,6 +1064,7 @@ onMounted(() => { loadList(); loadCount() })
.stat-icon-normal { background: #f0faf0; color: #52c41a; }
.stat-icon-expired { background: #fff7e6; color: #fa8c16; }
.stat-icon-deleted { background: #fff1f0; color: #f5222d; }
+.stat-icon-pending { background: #e6f7ff; color: #1890ff; }
.stat-body { display: flex; flex-direction: column; }
.stat-label { font-size: 13px; color: #909399; margin-bottom: 2px; }
diff --git a/src/views/product/components/ProductPlanManager.vue b/src/views/product/components/ProductPlanManager.vue
index 6963eac..2228927 100644
--- a/src/views/product/components/ProductPlanManager.vue
+++ b/src/views/product/components/ProductPlanManager.vue
@@ -47,6 +47,9 @@
¥
{{ formatPlanPrice(row) }}
+
+ 续费 ¥{{ formatRenewPrice(row) }}
+
@@ -471,6 +474,14 @@ const formatPlanPrice = (row) => {
return (Number(raw) / 100).toFixed(2)
}
+const getRenewPrice = (row) => {
+ return Number(row.renewFixedPrice ?? row.renew_fixed_price ?? 0)
+}
+
+const formatRenewPrice = (row) => {
+ return (getRenewPrice(row) / 100).toFixed(2)
+}
+
const getInventoryNum = (row) => {
return Number(row.inventory ?? 0) || 0
}
@@ -1018,6 +1029,14 @@ watch(() => props.visible, (val) => {
color: #f56c6c;
font-weight: 700;
}
+.plan-renew-price {
+ font-size: 11px;
+ color: #e6a23c;
+ font-weight: 500;
+ margin-top: 2px;
+ line-height: 1;
+}
+
.plan-stat-price.is-dynamic {
background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
border-color: #c6e2ff;
diff --git a/src/views/user-vm/UserVmList.vue b/src/views/user-vm/UserVmList.vue
index 214c790..05fce08 100644
--- a/src/views/user-vm/UserVmList.vue
+++ b/src/views/user-vm/UserVmList.vue
@@ -33,6 +33,7 @@
+
@@ -86,6 +87,7 @@
已删除
+ 待开通
正常
diff --git a/src/views/user/UserDetail.vue b/src/views/user/UserDetail.vue
index 6c44583..f20c9df 100644
--- a/src/views/user/UserDetail.vue
+++ b/src/views/user/UserDetail.vue
@@ -294,6 +294,64 @@
+
+
+
+
+
+ {{ row.discount?.name || '-' }}
+
+
+
+ ¥{{ row.discount?.amount ? (row.discount.amount / 100).toFixed(2) : '0.00' }}
+
+
+
+
+ {{ row.useTimes || 0 }} / {{ row.maxUseTimes || '∞' }}
+
+
+
+
+
+ {{ getVoucherStatusText(row) }}
+
+
+
+
+ {{ formatVoucherDate(row.expireAt) }}
+
+
+ {{ formatDate(row.CreatedAt) }}
+
+
+
+ 编辑
+
+ 删除
+
+
+
+
+
+
@@ -496,6 +554,49 @@
+
+