1
This commit is contained in:
@@ -211,8 +211,16 @@
|
||||
<!-- 移动端卡片列表 -->
|
||||
<div v-if="isMobile" class="mobile-order-list" v-loading="loading">
|
||||
<div class="profit-summary-bar mobile-profit-summary">
|
||||
<div>统计:<b>{{ profitSummaryLabel }}</b></div>
|
||||
<div>后返合计 <b>{{ toYuan(profitSummaryRebateTotal) }}</b> · 利润合计 <b>{{ profitSummaryProfitTotal === '' ? '—' : toYuan(profitSummaryProfitTotal) }}</b><span class="profit-summary-hint">(不含已退款)</span></div>
|
||||
<div class="profit-summary-bar__main">
|
||||
<div>统计:<b>{{ profitSummaryLabel }}</b></div>
|
||||
<div>后返合计 <b>{{ toYuan(profitSummaryRebateTotal) }}</b> · 利润合计 <b>{{ profitSummaryProfitTotal === '' ? '—' : toYuan(profitSummaryProfitTotal) }}</b><span class="profit-summary-hint">(不含已退款)</span></div>
|
||||
</div>
|
||||
<div class="profit-summary-bar__status">
|
||||
<span class="order-status-stat">总 <b>{{ orderStatusStatTotal }}</b></span>
|
||||
<span class="order-status-stat order-status-stat--refund">退款 <b>{{ orderStatusStatRefunded }}</b></span>
|
||||
<span class="order-status-stat order-status-stat--shipped">已发货 <b>{{ orderStatusStatShipped }}</b></span>
|
||||
<span class="order-status-stat order-status-stat--pending">待发货 <b>{{ orderStatusStatPending }}</b></span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-for="row in list"
|
||||
@@ -581,9 +589,17 @@
|
||||
<!-- 桌面端:统计条 + 表格(height 固定表头,滚动条在表体) -->
|
||||
<div v-else class="jd-order-table-wrap">
|
||||
<div ref="profitSummaryBar" class="profit-summary-bar sticky-summary">
|
||||
<span class="profit-summary-item">统计范围:<b>{{ profitSummaryLabel }}</b></span>
|
||||
<span class="profit-summary-item">后返合计:<b>{{ toYuan(profitSummaryRebateTotal) }}</b><span class="profit-summary-hint">(不含已退款)</span></span>
|
||||
<span class="profit-summary-item">利润合计:<b>{{ profitSummaryProfitTotal === '' ? '—' : toYuan(profitSummaryProfitTotal) }}</b><span class="profit-summary-hint">(不含已退款)</span></span>
|
||||
<div class="profit-summary-bar__left">
|
||||
<span class="profit-summary-item">统计范围:<b>{{ profitSummaryLabel }}</b></span>
|
||||
<span class="profit-summary-item">后返合计:<b>{{ toYuan(profitSummaryRebateTotal) }}</b><span class="profit-summary-hint">(不含已退款)</span></span>
|
||||
<span class="profit-summary-item">利润合计:<b>{{ profitSummaryProfitTotal === '' ? '—' : toYuan(profitSummaryProfitTotal) }}</b><span class="profit-summary-hint">(不含已退款)</span></span>
|
||||
</div>
|
||||
<div class="profit-summary-bar__status">
|
||||
<span class="order-status-stat">总 <b>{{ orderStatusStatTotal }}</b></span>
|
||||
<span class="order-status-stat order-status-stat--refund">退款 <b>{{ orderStatusStatRefunded }}</b></span>
|
||||
<span class="order-status-stat order-status-stat--shipped">已发货 <b>{{ orderStatusStatShipped }}</b></span>
|
||||
<span class="order-status-stat order-status-stat--pending">待发货 <b>{{ orderStatusStatPending }}</b></span>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="list"
|
||||
@@ -1445,9 +1461,24 @@ export default {
|
||||
}
|
||||
return false
|
||||
},
|
||||
/** 统计条范围:勾选优先,否则当前列表页 */
|
||||
orderStatusStatRows() {
|
||||
return (this.selectedRows && this.selectedRows.length > 0 ? this.selectedRows : this.list) || []
|
||||
},
|
||||
orderStatusStatTotal() {
|
||||
return this.orderStatusStatRows.length
|
||||
},
|
||||
orderStatusStatRefunded() {
|
||||
return this.orderStatusStatRows.filter(r => r.isRefunded === 1).length
|
||||
},
|
||||
orderStatusStatShipped() {
|
||||
return this.orderStatusStatRows.filter(r => r.isRefunded !== 1 && this.isOrderShipped(r)).length
|
||||
},
|
||||
orderStatusStatPending() {
|
||||
return this.orderStatusStatRows.filter(r => r.isRefunded !== 1 && this.isOrderPendingShip(r)).length
|
||||
},
|
||||
profitSummaryRows() {
|
||||
const base = this.selectedRows && this.selectedRows.length > 0 ? this.selectedRows : this.list
|
||||
return (base || []).filter(r => r.isRefunded !== 1)
|
||||
return this.orderStatusStatRows.filter(r => r.isRefunded !== 1)
|
||||
},
|
||||
profitSummaryLabel() {
|
||||
if (this.selectedRows && this.selectedRows.length > 0) {
|
||||
@@ -1583,6 +1614,20 @@ export default {
|
||||
this.showDesktopExpandedFilters = true
|
||||
}
|
||||
},
|
||||
/** 已发货:联盟 express_status≠10;无联盟数据时有物流链接视为已发货 */
|
||||
isOrderShipped(row) {
|
||||
if (!row || row.isRefunded === 1) return false
|
||||
if (row.expressStatus != null) return row.expressStatus !== 10
|
||||
const link = row.logisticsLink == null ? '' : String(row.logisticsLink).trim()
|
||||
return link.length > 0
|
||||
},
|
||||
/** 待发货:联盟 express_status=10;无联盟数据且无物流链接 */
|
||||
isOrderPendingShip(row) {
|
||||
if (!row || row.isRefunded === 1) return false
|
||||
if (row.expressStatus != null) return row.expressStatus === 10
|
||||
const link = row.logisticsLink == null ? '' : String(row.logisticsLink).trim()
|
||||
return link.length === 0
|
||||
},
|
||||
/** 凡系分销标识:历史 F 与 F-中文(如 F-王杰)等同 */
|
||||
isFanDistributionMark(mark) {
|
||||
if (mark == null || mark === '') return false
|
||||
@@ -4642,6 +4687,61 @@ export default {
|
||||
font-size: 13px;
|
||||
color: var(--jd-muted, #6b7280);
|
||||
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 10px 16px;
|
||||
}
|
||||
.profit-summary-bar__left {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 4px 0;
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
}
|
||||
.profit-summary-bar__main {
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
}
|
||||
.profit-summary-bar__status {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 8px 14px;
|
||||
flex-shrink: 0;
|
||||
margin-left: auto;
|
||||
}
|
||||
.order-status-stat {
|
||||
font-size: 13px;
|
||||
color: var(--jd-muted, #6b7280);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.order-status-stat b {
|
||||
color: var(--jd-text, #111827);
|
||||
font-weight: 600;
|
||||
margin-left: 2px;
|
||||
}
|
||||
.order-status-stat--refund b {
|
||||
color: #e6a23c;
|
||||
}
|
||||
.order-status-stat--shipped b {
|
||||
color: #67c23a;
|
||||
}
|
||||
.order-status-stat--pending b {
|
||||
color: #909399;
|
||||
}
|
||||
.mobile-profit-summary.profit-summary-bar {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
.mobile-profit-summary .profit-summary-bar__status {
|
||||
justify-content: flex-start;
|
||||
margin-left: 0;
|
||||
padding-top: 8px;
|
||||
border-top: 1px dashed var(--jd-border, #e5e7eb);
|
||||
}
|
||||
.profit-summary-bar b {
|
||||
color: var(--jd-text, #111827);
|
||||
|
||||
Reference in New Issue
Block a user