1
This commit is contained in:
@@ -2,8 +2,16 @@
|
||||
<div class="app-container fadan-quick-record" :class="{ 'fadan-quick-record--mobile': isMobile }">
|
||||
<el-card class="box-card">
|
||||
<el-form :model="form" label-position="top" class="fadan-form">
|
||||
<el-form-item label="分销标记(默认 F)">
|
||||
<el-input v-model="form.mark" placeholder="一般为 F" clearable />
|
||||
<el-form-item label="分销标记">
|
||||
<div class="mark-row">
|
||||
<span class="mark-prefix" aria-hidden="true">F-</span>
|
||||
<el-input
|
||||
v-model="form.markSuffix"
|
||||
class="mark-suffix-input"
|
||||
placeholder="后缀,如 李旭、闲鱼;留空则仅为 F"
|
||||
clearable
|
||||
/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="型号" required>
|
||||
<el-input v-model="form.model" placeholder="必填" clearable />
|
||||
@@ -83,7 +91,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
mark: 'F',
|
||||
markSuffix: '',
|
||||
model: '',
|
||||
address: '',
|
||||
link: '',
|
||||
@@ -116,8 +124,18 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
buildDistributionMark() {
|
||||
let s = (this.form.markSuffix || '').trim()
|
||||
if (s.startsWith('-')) {
|
||||
s = s.slice(1).trim()
|
||||
}
|
||||
if (!s) {
|
||||
return 'F'
|
||||
}
|
||||
return 'F-' + s
|
||||
},
|
||||
buildCommand() {
|
||||
const mark = (this.form.mark || 'F').trim()
|
||||
const mark = this.buildDistributionMark()
|
||||
const model = (this.form.model || '').trim()
|
||||
const address = (this.form.address || '').trim()
|
||||
if (!model) {
|
||||
@@ -322,7 +340,7 @@ export default {
|
||||
},
|
||||
resetForm() {
|
||||
this.form = {
|
||||
mark: 'F',
|
||||
markSuffix: '',
|
||||
model: '',
|
||||
address: '',
|
||||
link: '',
|
||||
@@ -381,6 +399,25 @@ export default {
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.mark-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mark-prefix {
|
||||
flex-shrink: 0;
|
||||
color: #606266;
|
||||
font-weight: 500;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.mark-suffix-input {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.btn-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user