详情
@@ -179,6 +187,7 @@ const statusList = ref([
{ label: '已下单', value: '1,7', count: 0 },
{ label: '进行中', value: '2', count: 0 },
{ label: '待结算', value: '8', count: 0 },
+ { label: '待自动结算', value: 'auto_settle', count: 0 },
{ label: '已完成', value: '3', count: 0 },
{ label: '退款审核', value: '4', count: 0 },
{ label: '已退款', value: '5', count: 0 },
@@ -225,7 +234,6 @@ const fetchOrders = async () => {
username: phone,
page: pageNum.value,
pageSize: pageSize.value,
- zhuangtai: currentStatus.value === 'all' ? undefined : currentStatus.value,
dingdan_id: search.ordId || undefined,
shangjia_id: search.shangjiaId || undefined,
dashou_id: search.dashouId || undefined,
@@ -235,6 +243,12 @@ const fetchOrders = async () => {
clkf: search.clkf || undefined,
shangjia_nicheng: search.shangjiaNicheng || undefined
}
+ if (currentStatus.value === 'auto_settle') {
+ params.zhuangtai = '8'
+ params.auto_settle_pending = 1
+ } else if (currentStatus.value !== 'all') {
+ params.zhuangtai = currentStatus.value
+ }
if (currentType.value !== '' && currentType.value !== null && currentType.value !== undefined) {
params.leixing = currentType.value
}
@@ -344,6 +358,24 @@ const handlePageChange = (val) => { pageNum.value = val; fetchOrders(); updateQu
const goToDetail = (dingdanId) => router.push(`/order/detail/${dingdanId}`)
const formatPrice = (price) => parseFloat(price || 0).toFixed(2)
+const formatRemainText = (sec) => {
+ const s = Math.max(0, Number(sec) || 0)
+ const h = Math.floor(s / 3600)
+ const m = Math.floor((s % 3600) / 60)
+ if (h >= 24) return `${Math.floor(h / 24)}天${h % 24}小时`
+ if (h > 0) return `${h}小时${m}分`
+ if (m > 0) return `${m}分钟`
+ return s > 0 ? `${s}秒` : '即将结算'
+}
+const formatAutoSettle = (row) => {
+ if (!row || !row.auto_settle_eligible) return ''
+ const remain = row.auto_settle_remain_seconds
+ if (remain == null || remain === '') {
+ return row.auto_expire_at ? `预计 ${row.auto_expire_at}` : ''
+ }
+ const text = formatRemainText(remain)
+ return Number(remain) <= 0 ? '即将自动结算' : `预计自动结算 ${text}`
+}
const getStatusText = (code) => {
const map = { '1':'下单中','7':'指定中','2':'进行中','8':'待结算','3':'已完成','4':'退款审核','5':'已退款','6':'退款失败' }
return map[code] || '未知'
@@ -398,6 +430,8 @@ onMounted(async () => {
.stat-label { font-size: 13px; color: #6b7a88; margin-bottom: 8px; }
.stat-value { font-size: 24px; font-weight: 600; color: #1a2634; }
.order-table { width: 100%; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.02); margin-bottom: 20px; }
+.auto-settle-cell { color: #c62828; font-size: 13px; }
+.muted { color: #9aa5b1; }
.pagination { display: flex; justify-content: flex-end; }
.no-permission { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 60vh; }
.no-permission-icon { font-size: 80px; margin-bottom: 20px; opacity: 0.6; }
diff --git a/src/views/order/OrderDealConfig.vue b/src/views/order/OrderDealConfig.vue
index 1f9c984..8ef6e18 100644
--- a/src/views/order/OrderDealConfig.vue
+++ b/src/views/order/OrderDealConfig.vue
@@ -2,7 +2,7 @@
- 成交 / 罚款指标统计
+ 结算率 / 罚款指标统计
@@ -52,7 +52,7 @@
-
+
{{ pct(row.deal_rate) }}
@@ -61,7 +61,7 @@
{{ pct(row.refund_rate) }}
-
+
@@ -70,7 +70,7 @@
-
+
{{ pct(row.deal_rate) }}
diff --git a/src/views/order/PlatformOrder.vue b/src/views/order/PlatformOrder.vue
index 41dc334..374e591 100644
--- a/src/views/order/PlatformOrder.vue
+++ b/src/views/order/PlatformOrder.vue
@@ -118,6 +118,14 @@
+
+
+
+ {{ formatAutoSettle(row) }}
+
+ --
+
+
详情
@@ -183,6 +191,7 @@ const statusList = ref([
{ label: '已下单', value: '1,7', count: 0 },
{ label: '进行中', value: '2', count: 0 },
{ label: '待结算', value: '8', count: 0 },
+ { label: '待自动结算', value: 'auto_settle', count: 0 },
{ label: '已完成', value: '3', count: 0 },
{ label: '退款审核', value: '4', count: 0 },
{ label: '已退款', value: '5', count: 0 },
@@ -228,7 +237,6 @@ const fetchOrders = async () => {
phone: localStorage.getItem('username'),
page: pageNum.value,
pageSize: pageSize.value,
- zhuangtai: currentStatus.value === 'all' ? undefined : currentStatus.value,
dingdan_id: search.ordId || undefined,
laoban_id: search.laobanId || undefined,
dashou_id: search.dashouId || undefined,
@@ -237,6 +245,12 @@ const fetchOrders = async () => {
jieshao: search.jieshao || undefined,
clkf: search.clkf || undefined
}
+ if (currentStatus.value === 'auto_settle') {
+ params.zhuangtai = '8'
+ params.auto_settle_pending = 1
+ } else if (currentStatus.value !== 'all') {
+ params.zhuangtai = currentStatus.value
+ }
if (currentType.value !== '' && currentType.value !== null && currentType.value !== undefined) {
params.leixing = currentType.value
}
@@ -344,6 +358,24 @@ const handlePageChange = (val) => { pageNum.value = val; fetchOrders(); updateQu
const goToDetail = (dingdanId) => router.push(`/order/detail/${dingdanId}`)
const formatPrice = (price) => parseFloat(price || 0).toFixed(2)
+const formatRemainText = (sec) => {
+ const s = Math.max(0, Number(sec) || 0)
+ const h = Math.floor(s / 3600)
+ const m = Math.floor((s % 3600) / 60)
+ if (h >= 24) return `${Math.floor(h / 24)}天${h % 24}小时`
+ if (h > 0) return `${h}小时${m}分`
+ if (m > 0) return `${m}分钟`
+ return s > 0 ? `${s}秒` : '即将结算'
+}
+const formatAutoSettle = (row) => {
+ if (!row || !row.auto_settle_eligible) return ''
+ const remain = row.auto_settle_remain_seconds
+ if (remain == null || remain === '') {
+ return row.auto_expire_at ? `预计 ${row.auto_expire_at}` : ''
+ }
+ const text = formatRemainText(remain)
+ return Number(remain) <= 0 ? '即将自动结算' : `预计自动结算 ${text}`
+}
const getStatusText = (code) => {
const map = { '1':'下单中','7':'指定中','2':'进行中','8':'待结算','3':'已完成','4':'退款审核','5':'已退款','6':'退款失败' }
return map[code] || '未知'
@@ -394,6 +426,8 @@ onMounted(() => {
.stat-label { font-size: 13px; color: #6b7a88; margin-bottom: 8px; }
.stat-value { font-size: 24px; font-weight: 600; color: #1a2634; }
.order-table { width: 100%; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.02); margin-bottom: 20px; }
+.auto-settle-cell { color: #c62828; font-size: 13px; }
+.muted { color: #9aa5b1; }
.pagination { display: flex; justify-content: flex-end; }
.no-permission { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 60vh; }
.no-permission-icon { font-size: 80px; margin-bottom: 20px; opacity: 0.6; }