1
This commit is contained in:
@@ -442,6 +442,21 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="field-row field-row--pricing">
|
||||||
|
<span class="field-label">额外成本</span>
|
||||||
|
<div class="field-value field-value--pricing-control">
|
||||||
|
<el-input-number
|
||||||
|
v-model="row.extraCost"
|
||||||
|
:min="0"
|
||||||
|
:step="1"
|
||||||
|
:precision="2"
|
||||||
|
size="small"
|
||||||
|
controls-position="right"
|
||||||
|
class="mobile-pricing-input"
|
||||||
|
@change="onOrderExtraCostChange(row)"
|
||||||
|
/>
|
||||||
|
</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>
|
||||||
<span class="field-value field-value--pricing-control">
|
<span class="field-value field-value--pricing-control">
|
||||||
@@ -700,6 +715,13 @@
|
|||||||
<span v-else>{{ scope.row.sellingPrice != null ? toYuan(scope.row.sellingPrice) : '—' }}</span>
|
<span v-else>{{ scope.row.sellingPrice != null ? toYuan(scope.row.sellingPrice) : '—' }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="额外成本" prop="extraCost" min-width="112" align="right" class-name="jd-col-money jd-col-money--extra-cost">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="jd-cell-stretch jd-cell-stretch--num">
|
||||||
|
<el-input-number v-model="scope.row.extraCost" :min="0" :step="1" :precision="2" size="mini" controls-position="right" class="jd-order-input-money jd-order-input-money--rebate" @change="onOrderExtraCostChange(scope.row)" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="利润" prop="profit" min-width="118" align="right" class-name="jd-col-money jd-col-money--profit">
|
<el-table-column label="利润" prop="profit" min-width="118" align="right" class-name="jd-col-money jd-col-money--profit">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<template v-if="isFanDistributionMark(scope.row.distributionMark) || scope.row.distributionMark === 'H-TF'">
|
<template v-if="isFanDistributionMark(scope.row.distributionMark) || scope.row.distributionMark === 'H-TF'">
|
||||||
@@ -1693,7 +1715,8 @@ export default {
|
|||||||
isInvoiceOpened: item.isInvoiceOpened != null ? item.isInvoiceOpened : 0,
|
isInvoiceOpened: item.isInvoiceOpened != null ? item.isInvoiceOpened : 0,
|
||||||
isReviewPosted: item.isReviewPosted != null ? item.isReviewPosted : 0,
|
isReviewPosted: item.isReviewPosted != null ? item.isReviewPosted : 0,
|
||||||
sellingPriceManual: item.sellingPriceManual != null ? item.sellingPriceManual : 0,
|
sellingPriceManual: item.sellingPriceManual != null ? item.sellingPriceManual : 0,
|
||||||
profitManual: item.profitManual != null ? item.profitManual : 0
|
profitManual: item.profitManual != null ? item.profitManual : 0,
|
||||||
|
extraCost: item.extraCost != null ? Number(item.extraCost) : 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
assignListFromResponse(res) {
|
assignListFromResponse(res) {
|
||||||
@@ -1997,7 +2020,7 @@ export default {
|
|||||||
if (Number.isNaN(num)) return n
|
if (Number.isNaN(num)) return n
|
||||||
return num.toFixed(2)
|
return num.toFixed(2)
|
||||||
},
|
},
|
||||||
/** 录单 Excel:成本 = 下单付款 - 后返(与后台利润口径一致) */
|
/** 录单 Excel:成本 = 下单付款 − 后返 + 额外成本(与后台自动利润口径一致) */
|
||||||
formatExcelCost(row) {
|
formatExcelCost(row) {
|
||||||
if (!row) return ''
|
if (!row) return ''
|
||||||
const hasPay = row.paymentAmount != null && row.paymentAmount !== ''
|
const hasPay = row.paymentAmount != null && row.paymentAmount !== ''
|
||||||
@@ -2005,7 +2028,8 @@ export default {
|
|||||||
if (!hasPay && !hasReb) return ''
|
if (!hasPay && !hasReb) return ''
|
||||||
const pay = hasPay ? Number(row.paymentAmount) : 0
|
const pay = hasPay ? Number(row.paymentAmount) : 0
|
||||||
const reb = hasReb ? Number(row.rebateAmount) : 0
|
const reb = hasReb ? Number(row.rebateAmount) : 0
|
||||||
return (pay - reb).toFixed(2)
|
const extra = row.extraCost != null && row.extraCost !== '' ? Number(row.extraCost) : 0
|
||||||
|
return (pay - reb + extra).toFixed(2)
|
||||||
},
|
},
|
||||||
/** 保存后拉取单条,展示服务端重算后的利润/售价 */
|
/** 保存后拉取单条,展示服务端重算后的利润/售价 */
|
||||||
patchOrderRowFromServer(id) {
|
patchOrderRowFromServer(id) {
|
||||||
@@ -2092,6 +2116,11 @@ export default {
|
|||||||
row.profitManual = 0
|
row.profitManual = 0
|
||||||
this.persistOrderRow(row)
|
this.persistOrderRow(row)
|
||||||
},
|
},
|
||||||
|
/** 额外成本变更:解除利润手填并按规则重算 */
|
||||||
|
onOrderExtraCostChange(row) {
|
||||||
|
row.profitManual = 0
|
||||||
|
this.persistOrderRow(row)
|
||||||
|
},
|
||||||
onOrderSellingPriceChange(row) {
|
onOrderSellingPriceChange(row) {
|
||||||
row.sellingPriceManual = 1
|
row.sellingPriceManual = 1
|
||||||
row.profitManual = 0
|
row.profitManual = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user