1
This commit is contained in:
@@ -212,7 +212,7 @@
|
|||||||
<div v-if="isMobile" class="mobile-order-list" v-loading="loading">
|
<div v-if="isMobile" class="mobile-order-list" v-loading="loading">
|
||||||
<div class="profit-summary-bar mobile-profit-summary">
|
<div class="profit-summary-bar mobile-profit-summary">
|
||||||
<div>统计:<b>{{ profitSummaryLabel }}</b></div>
|
<div>统计:<b>{{ profitSummaryLabel }}</b></div>
|
||||||
<div>后返合计 <b>{{ toYuan(profitSummaryRebateTotal) }}</b> · 利润合计 <b>{{ profitSummaryProfitTotal === '' ? '—' : toYuan(profitSummaryProfitTotal) }}</b></div>
|
<div>后返合计 <b>{{ toYuan(profitSummaryRebateTotal) }}</b> · 利润合计 <b>{{ profitSummaryProfitTotal === '' ? '—' : toYuan(profitSummaryProfitTotal) }}</b><span class="profit-summary-hint">(不含已退款)</span></div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-for="row in list"
|
v-for="row in list"
|
||||||
@@ -406,13 +406,35 @@
|
|||||||
<el-button v-if="row.logisticsLink" type="text" size="mini" @click="copyToClipboard(row.logisticsLink)">复制物流链接</el-button>
|
<el-button v-if="row.logisticsLink" type="text" size="mini" @click="copyToClipboard(row.logisticsLink)">复制物流链接</el-button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="field-row">
|
<div class="field-row field-row--pricing">
|
||||||
<span class="field-label">付款金额</span>
|
<span class="field-label">付款金额</span>
|
||||||
<span class="field-value amount">{{ toYuan(row.paymentAmount) }}</span>
|
<div class="field-value field-value--pricing-control">
|
||||||
|
<el-input-number
|
||||||
|
v-model="row.paymentAmount"
|
||||||
|
:min="0"
|
||||||
|
:step="1"
|
||||||
|
:precision="2"
|
||||||
|
size="small"
|
||||||
|
controls-position="right"
|
||||||
|
class="mobile-pricing-input"
|
||||||
|
@change="onOrderPaymentOrRebateChange(row)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="field-row">
|
</div>
|
||||||
|
<div class="field-row field-row--pricing">
|
||||||
<span class="field-label">后返金额</span>
|
<span class="field-label">后返金额</span>
|
||||||
<span class="field-value amount">{{ toYuan(row.rebateAmount) }}</span>
|
<div class="field-value field-value--pricing-control">
|
||||||
|
<el-input-number
|
||||||
|
v-model="row.rebateAmount"
|
||||||
|
:min="0"
|
||||||
|
:step="1"
|
||||||
|
:precision="2"
|
||||||
|
size="small"
|
||||||
|
controls-position="right"
|
||||||
|
class="mobile-pricing-input"
|
||||||
|
@change="onOrderPaymentOrRebateChange(row)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field-row field-row--pricing" v-if="isFanDistributionMark(row.distributionMark)">
|
<div class="field-row field-row--pricing" v-if="isFanDistributionMark(row.distributionMark)">
|
||||||
<span class="field-label">售价渠道</span>
|
<span class="field-label">售价渠道</span>
|
||||||
@@ -539,8 +561,8 @@
|
|||||||
<div v-else class="jd-order-table-wrap">
|
<div v-else class="jd-order-table-wrap">
|
||||||
<div ref="profitSummaryBar" class="profit-summary-bar sticky-summary">
|
<div ref="profitSummaryBar" class="profit-summary-bar sticky-summary">
|
||||||
<span class="profit-summary-item">统计范围:<b>{{ profitSummaryLabel }}</b></span>
|
<span class="profit-summary-item">统计范围:<b>{{ profitSummaryLabel }}</b></span>
|
||||||
<span class="profit-summary-item">后返合计:<b>{{ toYuan(profitSummaryRebateTotal) }}</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>
|
<span class="profit-summary-item">利润合计:<b>{{ profitSummaryProfitTotal === '' ? '—' : toYuan(profitSummaryProfitTotal) }}</b><span class="profit-summary-hint">(不含已退款)</span></span>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
:data="list"
|
:data="list"
|
||||||
@@ -613,11 +635,37 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<!-- 金额信息列 -->
|
<!-- 金额信息列 -->
|
||||||
<el-table-column label="付款金额" prop="paymentAmount" width="90" align="right">
|
<el-table-column label="付款金额" prop="paymentAmount" min-width="118" align="right" class-name="jd-col-money jd-col-money--payment">
|
||||||
<template slot-scope="scope">{{ toYuan(scope.row.paymentAmount) }}</template>
|
<template slot-scope="scope">
|
||||||
|
<div class="jd-cell-stretch jd-cell-stretch--num">
|
||||||
|
<el-input-number
|
||||||
|
v-model="scope.row.paymentAmount"
|
||||||
|
:min="0"
|
||||||
|
:step="1"
|
||||||
|
:precision="2"
|
||||||
|
size="mini"
|
||||||
|
controls-position="right"
|
||||||
|
class="jd-order-input-money jd-order-input-money--payment"
|
||||||
|
@change="onOrderPaymentOrRebateChange(scope.row)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="后返金额" prop="rebateAmount" width="90" align="right">
|
<el-table-column label="后返金额" prop="rebateAmount" min-width="118" align="right" class-name="jd-col-money jd-col-money--rebate">
|
||||||
<template slot-scope="scope">{{ toYuan(scope.row.rebateAmount) }}</template>
|
<template slot-scope="scope">
|
||||||
|
<div class="jd-cell-stretch jd-cell-stretch--num">
|
||||||
|
<el-input-number
|
||||||
|
v-model="scope.row.rebateAmount"
|
||||||
|
:min="0"
|
||||||
|
:step="1"
|
||||||
|
:precision="2"
|
||||||
|
size="mini"
|
||||||
|
controls-position="right"
|
||||||
|
class="jd-order-input-money jd-order-input-money--rebate"
|
||||||
|
@change="onOrderPaymentOrRebateChange(scope.row)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="售价渠道" prop="sellingPriceType" min-width="120" align="center" class-name="jd-col-channel">
|
<el-table-column label="售价渠道" prop="sellingPriceType" min-width="120" align="center" class-name="jd-col-channel">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -1365,7 +1413,8 @@ export default {
|
|||||||
return false
|
return false
|
||||||
},
|
},
|
||||||
profitSummaryRows() {
|
profitSummaryRows() {
|
||||||
return this.selectedRows && this.selectedRows.length > 0 ? this.selectedRows : this.list
|
const base = this.selectedRows && this.selectedRows.length > 0 ? this.selectedRows : this.list
|
||||||
|
return (base || []).filter(r => r.isRefunded !== 1)
|
||||||
},
|
},
|
||||||
profitSummaryLabel() {
|
profitSummaryLabel() {
|
||||||
return this.selectedRows && this.selectedRows.length > 0
|
return this.selectedRows && this.selectedRows.length > 0
|
||||||
@@ -1994,6 +2043,11 @@ export default {
|
|||||||
row.profitManual = 0
|
row.profitManual = 0
|
||||||
this.persistOrderRow(row)
|
this.persistOrderRow(row)
|
||||||
},
|
},
|
||||||
|
/** 付款/后返变更:按规则重算利润(解除利润手填;已退款订单后端会把利润置空) */
|
||||||
|
onOrderPaymentOrRebateChange(row) {
|
||||||
|
row.profitManual = 0
|
||||||
|
this.persistOrderRow(row)
|
||||||
|
},
|
||||||
onOrderSellingPriceChange(row) {
|
onOrderSellingPriceChange(row) {
|
||||||
row.sellingPriceManual = 1
|
row.sellingPriceManual = 1
|
||||||
row.profitManual = 0
|
row.profitManual = 0
|
||||||
@@ -2099,6 +2153,7 @@ export default {
|
|||||||
// 调用后端API更新数据库
|
// 调用后端API更新数据库
|
||||||
updateJDOrder(row).then(() => {
|
updateJDOrder(row).then(() => {
|
||||||
this.$message.success(`订单 ${row.remark} 的退款状态已更新`)
|
this.$message.success(`订单 ${row.remark} 的退款状态已更新`)
|
||||||
|
this.patchOrderRowFromServer(row.id)
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$message.error('更新失败,请稍后重试')
|
this.$message.error('更新失败,请稍后重试')
|
||||||
// 恢复原状态
|
// 恢复原状态
|
||||||
@@ -3781,7 +3836,9 @@ export default {
|
|||||||
}
|
}
|
||||||
/* 售价列略宽(约四位数价位)、利润列略窄(三位数+两位小数)已在列 min-width 区分 */
|
/* 售价列略宽(约四位数价位)、利润列略窄(三位数+两位小数)已在列 min-width 区分 */
|
||||||
.order-table ::v-deep .jd-col-money .jd-cell-stretch--num .jd-order-input-money--selling .el-input__inner,
|
.order-table ::v-deep .jd-col-money .jd-cell-stretch--num .jd-order-input-money--selling .el-input__inner,
|
||||||
.order-table ::v-deep .jd-col-money .jd-cell-stretch--num .jd-order-input-money--profit .el-input__inner {
|
.order-table ::v-deep .jd-col-money .jd-cell-stretch--num .jd-order-input-money--profit .el-input__inner,
|
||||||
|
.order-table ::v-deep .jd-col-money .jd-cell-stretch--num .jd-order-input-money--payment .el-input__inner,
|
||||||
|
.order-table ::v-deep .jd-col-money .jd-cell-stretch--num .jd-order-input-money--rebate .el-input__inner {
|
||||||
font-variant-numeric: tabular-nums;
|
font-variant-numeric: tabular-nums;
|
||||||
font-feature-settings: 'tnum' 1;
|
font-feature-settings: 'tnum' 1;
|
||||||
}
|
}
|
||||||
@@ -4356,6 +4413,12 @@ export default {
|
|||||||
.profit-summary-item {
|
.profit-summary-item {
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
|
.profit-summary-hint {
|
||||||
|
margin-left: 4px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: var(--jd-muted, #6b7280);
|
||||||
|
}
|
||||||
.mobile-profit-summary {
|
.mobile-profit-summary {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
|
|||||||
Reference in New Issue
Block a user