@@ -122,6 +122,12 @@
|
||||
<el-tag v-else-if="row.isProduct" type="success" size="small" style="margin-left: 8px;">商品</el-tag>
|
||||
|
||||
<span class="group-name">{{ row.name }}</span>
|
||||
<el-tag
|
||||
v-if="(row.isGroup && row.recommendWords) || (row.isProduct && row.data?.recommendWords)"
|
||||
type="danger"
|
||||
size="small"
|
||||
style="margin-left: 6px;"
|
||||
>{{ row.isGroup ? row.recommendWords : row.data?.recommendWords }}</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -207,6 +213,7 @@
|
||||
<div class="group-name-cell">
|
||||
<el-avatar v-if="row.cover" :size="32" :src="row.cover" />
|
||||
<span class="group-name">{{ row.name }}</span>
|
||||
<el-tag v-if="row.recommendWords" type="danger" size="small" style="margin-left: 6px;">{{ row.recommendWords }}</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -393,6 +400,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 推荐词 -->
|
||||
<el-form-item prop="recommend_words" label="推荐词">
|
||||
<el-input v-model="groupForm.recommend_words" placeholder="推荐词(可选,如:热销、新品)" clearable />
|
||||
</el-form-item>
|
||||
|
||||
<!-- 备注 -->
|
||||
<el-form-item prop="note" label="备注" class="note-form-item">
|
||||
<el-input
|
||||
@@ -761,6 +773,9 @@
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="推荐词" prop="recommend_words">
|
||||
<el-input v-model="productForm.recommend_words" placeholder="推荐词(可选,如:热销、新品)" clearable style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="购买通知" prop="send_notice">
|
||||
<el-switch
|
||||
v-model="productForm.send_notice"
|
||||
@@ -893,7 +908,8 @@ const groupForm = reactive({
|
||||
cover_id: undefined,
|
||||
cover_url: '',
|
||||
tag_id: undefined,
|
||||
index: 0
|
||||
index: 0,
|
||||
recommend_words: ''
|
||||
})
|
||||
|
||||
const groupRules = {
|
||||
@@ -949,7 +965,8 @@ const productForm = reactive({
|
||||
max_first_purchase_duration: 0,
|
||||
send_notice: false,
|
||||
renew_price: 0,
|
||||
renew_recommend_rebate: 0
|
||||
renew_recommend_rebate: 0,
|
||||
recommend_words: ''
|
||||
})
|
||||
|
||||
const productRules = {
|
||||
@@ -1496,7 +1513,8 @@ const handleAdd = (parentRow) => {
|
||||
cover_id: undefined,
|
||||
cover_url: '',
|
||||
tag_id: parentTagId || undefined,
|
||||
index: 0
|
||||
index: 0,
|
||||
recommend_words: ''
|
||||
})
|
||||
console.log('添加子级,父级信息:', parentRow.name, 'ID:', parentRow.id, 'Level:', parentRow.level, '标签:', parentRow.tag)
|
||||
} else {
|
||||
@@ -1511,7 +1529,8 @@ const handleAdd = (parentRow) => {
|
||||
cover_id: undefined,
|
||||
cover_url: '',
|
||||
tag_id: undefined,
|
||||
index: 0
|
||||
index: 0,
|
||||
recommend_words: ''
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1532,7 +1551,8 @@ const handleEdit = (row) => {
|
||||
cover_id: row.coverId || undefined,
|
||||
cover_url: row.cover || '',
|
||||
tag_id: row.tag?.id || row.tagId || undefined,
|
||||
index: row.index || 0
|
||||
index: row.index || 0,
|
||||
recommend_words: row.recommendWords || ''
|
||||
})
|
||||
|
||||
dialogVisible.value = true
|
||||
@@ -1602,7 +1622,8 @@ const handleAddProduct = () => {
|
||||
arg_type: 'all',
|
||||
require_real_name: false,
|
||||
max_per_user: 0,
|
||||
max_first_purchase_duration: 0
|
||||
max_first_purchase_duration: 0,
|
||||
recommend_words: ''
|
||||
})
|
||||
|
||||
selectedProductGroup.value = null
|
||||
@@ -1642,7 +1663,8 @@ const handleEditProduct = (product, parentGroupId) => {
|
||||
max_first_purchase_duration: product.maxFirstPurchaseDuration ?? product.max_first_purchase_duration ?? 0,
|
||||
send_notice: !!product.sendNotice,
|
||||
renew_price: (product.renewPrice ?? product.renew_price ?? 0) / 100,
|
||||
renew_recommend_rebate: product.renewRecommendRebate ?? product.renew_recommend_rebate ?? 0
|
||||
renew_recommend_rebate: product.renewRecommendRebate ?? product.renew_recommend_rebate ?? 0,
|
||||
recommend_words: product.recommendWords ?? product.recommend_words ?? ''
|
||||
})
|
||||
|
||||
productDialogVisible.value = true
|
||||
@@ -1674,7 +1696,8 @@ const submitProductForm = () => {
|
||||
max_first_purchase_duration: Number(productForm.max_first_purchase_duration) || 0,
|
||||
send_notice: productForm.send_notice === true,
|
||||
renew_price: Number(productForm.renew_price) || 0,
|
||||
renew_recommend_rebate: Number(productForm.renew_recommend_rebate) || 0
|
||||
renew_recommend_rebate: Number(productForm.renew_recommend_rebate) || 0,
|
||||
recommend_words: productForm.recommend_words || ''
|
||||
}
|
||||
|
||||
let res
|
||||
@@ -1813,7 +1836,8 @@ const submitForm = () => {
|
||||
name: groupForm.name.trim(),
|
||||
note: groupForm.note || '',
|
||||
disable: groupForm.disable,
|
||||
index: Number(groupForm.index) || 0
|
||||
index: Number(groupForm.index) || 0,
|
||||
recommend_words: groupForm.recommend_words || ''
|
||||
}
|
||||
|
||||
if (groupForm.parent_id) {
|
||||
|
||||
Reference in New Issue
Block a user