This commit is contained in:
van
2026-04-08 16:36:23 +08:00
parent fc21a504eb
commit eefbc2ba87
2 changed files with 57 additions and 14 deletions

View File

@@ -321,7 +321,7 @@
<span class="field-label">后返金额</span>
<span class="field-value amount">{{ toYuan(row.rebateAmount) }}</span>
</div>
<div class="field-row field-row--pricing" v-if="row.distributionMark === 'F'">
<div class="field-row field-row--pricing" v-if="isFanDistributionMark(row.distributionMark)">
<span class="field-label">售价渠道</span>
<span class="field-value field-value--pricing-control">
<el-select v-model="row.sellingPriceType" placeholder="渠道" size="small" clearable class="mobile-pricing-select" @change="onOrderSellingPriceTypeChange(row)">
@@ -330,7 +330,7 @@
</el-select>
</span>
</div>
<div class="field-row field-row--pricing" v-if="row.distributionMark === 'F'">
<div class="field-row field-row--pricing" v-if="isFanDistributionMark(row.distributionMark)">
<span class="field-label">售价</span>
<span class="field-value field-value--pricing-control">
<div class="mobile-pricing-num-wrap">
@@ -339,7 +339,7 @@
</div>
</span>
</div>
<div class="field-row field-row--pricing" v-if="row.distributionMark === 'F' || row.distributionMark === 'H-TF'">
<div class="field-row field-row--pricing" v-if="isFanDistributionMark(row.distributionMark) || row.distributionMark === 'H-TF'">
<span class="field-label">利润</span>
<span class="field-value field-value--pricing-control">
<div class="mobile-pricing-num-wrap">
@@ -352,10 +352,10 @@
<span class="field-label">利润</span>
<span class="field-value amount">{{ toYuan(row.profit) }}</span>
</div>
<div class="field-row" v-if="row.distributionMark === 'F' || row.distributionMark === 'H-TF'">
<div class="field-row" v-if="isFanDistributionMark(row.distributionMark) || row.distributionMark === 'H-TF'">
<span class="field-label">快捷</span>
<span class="field-value">
<el-button v-if="row.distributionMark === 'F'" type="text" size="mini" @click="fillSellingPriceFromConfig(row)">按型号填价</el-button>
<el-button v-if="isFanDistributionMark(row.distributionMark)" type="text" size="mini" @click="fillSellingPriceFromConfig(row)">按型号填价</el-button>
<el-button type="text" size="mini" @click="recalcOrderProfitOnly(row)">重算利润</el-button>
</span>
</div>
@@ -491,7 +491,7 @@
</el-table-column>
<el-table-column label="售价渠道" prop="sellingPriceType" min-width="120" align="center" class-name="jd-col-channel">
<template slot-scope="scope">
<template v-if="scope.row.distributionMark === 'F'">
<template v-if="isFanDistributionMark(scope.row.distributionMark)">
<div class="jd-cell-stretch">
<el-select v-model="scope.row.sellingPriceType" placeholder="—" size="mini" clearable class="jd-cell-select-full" @change="onOrderSellingPriceTypeChange(scope.row)">
<el-option label="直款" value="direct" />
@@ -504,7 +504,7 @@
</el-table-column>
<el-table-column label="售价" prop="sellingPrice" min-width="150" align="right" class-name="jd-col-money jd-col-money--selling">
<template slot-scope="scope">
<template v-if="scope.row.distributionMark === 'F'">
<template v-if="isFanDistributionMark(scope.row.distributionMark)">
<div class="jd-cell-stretch jd-cell-stretch--num">
<el-input-number v-model="scope.row.sellingPrice" :min="0" :step="1" :precision="2" size="mini" controls-position="right" class="jd-order-input-money jd-order-input-money--selling" @change="onOrderSellingPriceChange(scope.row)" />
</div>
@@ -514,7 +514,7 @@
</el-table-column>
<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 v-if="scope.row.distributionMark === 'F' || scope.row.distributionMark === 'H-TF'">
<template v-if="isFanDistributionMark(scope.row.distributionMark) || scope.row.distributionMark === 'H-TF'">
<div class="jd-cell-stretch jd-cell-stretch--num">
<el-input-number v-model="scope.row.profit" :step="0.01" :precision="2" size="mini" controls-position="right" class="jd-order-input-money jd-order-input-money--profit" @change="onOrderProfitChange(scope.row)" />
</div>
@@ -524,7 +524,7 @@
</el-table-column>
<el-table-column label="快捷操作" width="90" align="center">
<template slot-scope="scope">
<template v-if="scope.row.distributionMark === 'F'">
<template v-if="isFanDistributionMark(scope.row.distributionMark)">
<el-button type="text" size="mini" @click="fillSellingPriceFromConfig(scope.row)">填价</el-button>
<el-button type="text" size="mini" @click="recalcOrderProfitOnly(scope.row)">重算</el-button>
</template>
@@ -1255,6 +1255,12 @@ export default {
}
},
methods: {
/** 凡系分销标识:历史 F 与 F-中文(如 F-王杰)等同 */
isFanDistributionMark(mark) {
if (mark == null || mark === '') return false
const m = String(mark).trim()
return m === 'F' || m.startsWith('F-')
},
handleMainPagination() {
this.getList()
this.$nextTick(() => {