后台-商品查询新增是否仅会员可见

This commit is contained in:
XinWei 2024-09-27 17:52:33 +08:00
parent 95ae012aab
commit 0b8897ecc4
3 changed files with 20 additions and 5 deletions

View File

@ -242,5 +242,8 @@ export enum DICT_TYPE {
AI_WRITE_LENGTH = 'ai_write_length', // AI 写作长度 AI_WRITE_LENGTH = 'ai_write_length', // AI 写作长度
AI_WRITE_FORMAT = 'ai_write_format', // AI 写作格式 AI_WRITE_FORMAT = 'ai_write_format', // AI 写作格式
AI_WRITE_TONE = 'ai_write_tone', // AI 写作语气 AI_WRITE_TONE = 'ai_write_tone', // AI 写作语气
AI_WRITE_LANGUAGE = 'ai_write_language' // AI 写作语言 AI_WRITE_LANGUAGE = 'ai_write_language', // AI 写作语言
// ========== 通用模块 ==========
ZERO_OR_ONE = 'zero_or_one'
} }

View File

@ -1,7 +1,7 @@
<!-- 商品发布 - 库存价格 --> <!-- 商品发布 - 库存价格 -->
<template> <template>
<el-form ref="formRef" :disabled="isDetail" :model="formData" :rules="rules" label-width="120px"> <el-form ref="formRef" :disabled="isDetail" :model="formData" :rules="rules" label-width="120px">
<el-form-item label="付费会员专属" > <el-form-item label="付费会员专属" >
<el-switch <el-switch
v-model="formData.onlyPaidMemberView" v-model="formData.onlyPaidMemberView"
:active-value="1" :active-value="1"

View File

@ -1,6 +1,6 @@
<!-- 商品中心 - 商品列表 --> <!-- 商品中心 - 商品列表 -->
<template> <template>
<doc-alert title="【商品】商品 SPU 与 SKU" url="https://doc.iocoder.cn/mall/product-spu-sku/" /> <!-- <doc-alert title="【商品】商品 SPU 与 SKU" url="https://doc.iocoder.cn/mall/product-spu-sku/" /> -->
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<ContentWrap> <ContentWrap>
@ -9,7 +9,7 @@
:inline="true" :inline="true"
:model="queryParams" :model="queryParams"
class="-mb-15px" class="-mb-15px"
label-width="68px" label-width="auto"
> >
<el-form-item label="商品名称" prop="name"> <el-form-item label="商品名称" prop="name">
<el-input <el-input
@ -31,6 +31,16 @@
placeholder="请选择商品分类" placeholder="请选择商品分类"
/> />
</el-form-item> </el-form-item>
<el-form-item label="仅付费会员可见" prop="isPaidMember">
<el-select v-model="queryParams.isPaidMember" style="width: 100px" placeholder="请选择" clearable>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.ZERO_OR_ONE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="创建时间" prop="createTime"> <el-form-item label="创建时间" prop="createTime">
<el-date-picker <el-date-picker
v-model="queryParams.createTime" v-model="queryParams.createTime"
@ -234,6 +244,7 @@
import { TabsPaneContext } from 'element-plus' import { TabsPaneContext } from 'element-plus'
import { createImageViewer } from '@/components/ImageViewer' import { createImageViewer } from '@/components/ImageViewer'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { defaultProps, handleTree, treeToString } from '@/utils/tree' import { defaultProps, handleTree, treeToString } from '@/utils/tree'
import { ProductSpuStatusEnum } from '@/utils/constants' import { ProductSpuStatusEnum } from '@/utils/constants'
import { fenToYuan } from '@/utils' import { fenToYuan } from '@/utils'
@ -286,7 +297,8 @@ const queryParams = ref({
tabType: 0, tabType: 0,
name: '', name: '',
categoryId: undefined, categoryId: undefined,
createTime: undefined createTime: undefined,
isPaidMember: undefined
}) // }) //
const queryFormRef = ref() // Ref const queryFormRef = ref() // Ref