From b1ce2672e418cc9a970992787d5ba405c92d5070 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 2 Jul 2023 21:46:04 +0800 Subject: [PATCH] =?UTF-8?q?review=20=E7=A7=92=E6=9D=80=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mall/product/spu/components/index.ts | 5 ++++- src/views/mall/product/spu/index.vue | 2 ++ src/views/mall/promotion/components/SpuSelect.vue | 1 - src/views/mall/promotion/components/index.ts | 1 + src/views/mall/promotion/seckill/activity/index.vue | 3 +++ .../mall/promotion/seckill/activity/seckillActivity.data.ts | 2 +- 6 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/views/mall/product/spu/components/index.ts b/src/views/mall/product/spu/components/index.ts index 59c031e8..ca61ff6b 100644 --- a/src/views/mall/product/spu/components/index.ts +++ b/src/views/mall/product/spu/components/index.ts @@ -7,6 +7,7 @@ import SkuList from './SkuList.vue' import { Spu } from '@/api/mall/product/spu' +// TODO @puhui999:Properties 改成 Property 更合适? interface Properties { id: number name: string @@ -30,8 +31,10 @@ interface RuleConfig { } /** - * 商品通用函数 + * 获得商品的规格列表 + * * @param spu + * @return Property 规格列表 */ const getPropertyList = (spu: Spu): Properties[] => { // 直接拿返回的 skus 属性逆向生成出 propertyList diff --git a/src/views/mall/product/spu/index.vue b/src/views/mall/product/spu/index.vue index 7dfd484b..75bd02e0 100644 --- a/src/views/mall/product/spu/index.vue +++ b/src/views/mall/product/spu/index.vue @@ -437,6 +437,7 @@ const categoryList = ref() // 分类树 const categoryString = (categoryId) => { return treeToString(categoryList.value, categoryId) } + /** * 校验所选是否为二级及以下节点 */ @@ -446,6 +447,7 @@ const nodeClick = () => { message.warning('必须选择二级及以下节点!!') } } + /** 初始化 **/ onMounted(async () => { await getTabsCount() diff --git a/src/views/mall/promotion/components/SpuSelect.vue b/src/views/mall/promotion/components/SpuSelect.vue index 0d535dfd..94c60c9c 100644 --- a/src/views/mall/promotion/components/SpuSelect.vue +++ b/src/views/mall/promotion/components/SpuSelect.vue @@ -256,7 +256,6 @@ const imagePreview = (imgUrl: string) => { const categoryList = ref() // 分类树 -// TODO @puhui999:商品搜索的时候,可以通过一级搜二级;所以这个校验可以去掉哈;也就是说,只允许挂在二级,但是一级可搜索到 /** 初始化 **/ onMounted(async () => { await getList() diff --git a/src/views/mall/promotion/components/index.ts b/src/views/mall/promotion/components/index.ts index f3f09950..a4b4e75b 100644 --- a/src/views/mall/promotion/components/index.ts +++ b/src/views/mall/promotion/components/index.ts @@ -7,6 +7,7 @@ type SpuProperty = { spuDetail: T propertyList: Properties[] } + /** * 提供商品活动商品选择通用组件 */ diff --git a/src/views/mall/promotion/seckill/activity/index.vue b/src/views/mall/promotion/seckill/activity/index.vue index d7d69dfb..f06b855f 100644 --- a/src/views/mall/promotion/seckill/activity/index.vue +++ b/src/views/mall/promotion/seckill/activity/index.vue @@ -89,6 +89,8 @@ const openForm = (type: string, id?: number) => { const handleDelete = (id: number) => { tableMethods.delList(id, false) } + +// TODO @puhui:是不是直接叫 configList 就好啦 const seckillConfigAllSimple = ref([]) // 时段配置精简列表 const convertSeckillConfigNames = computed( () => (row) => @@ -96,6 +98,7 @@ const convertSeckillConfigNames = computed( ?.filter((item) => row.configIds.includes(item.id)) ?.map((config) => config.name) ) + const expandChange = (row, expandedRows) => { // TODO puhui:等 CRUD 完事后弄 console.log(row, expandedRows) diff --git a/src/views/mall/promotion/seckill/activity/seckillActivity.data.ts b/src/views/mall/promotion/seckill/activity/seckillActivity.data.ts index fcf48985..c858374c 100644 --- a/src/views/mall/promotion/seckill/activity/seckillActivity.data.ts +++ b/src/views/mall/promotion/seckill/activity/seckillActivity.data.ts @@ -219,7 +219,7 @@ const crudSchemas = reactive([ }, { label: '状态', - field: 'status', // TODO @puhui999:状态在 table 格式化不对;建表插入的数据状态值不对,改为 0 或 1 就好了 + field: 'status', dictType: DICT_TYPE.COMMON_STATUS, dictClass: 'number', isForm: false,