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;
|
||||
|
||||
Reference in New Issue
Block a user