Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b89db1af
authored
Jun 06, 2023
by
puhui999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: review
parent
7fe8dee9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
8 deletions
+7
-8
src/utils/dict.ts
+1
-0
src/views/mall/product/spu/components/BasicInfoForm.vue
+2
-4
src/views/mall/product/spu/components/ProductPropertyAddForm.vue
+1
-1
src/views/mall/product/spu/components/SkuList.vue
+0
-1
src/views/mall/product/spu/components/index.ts
+2
-2
src/views/mall/product/spu/components/spu.data.ts
+1
-0
No files found.
src/utils/dict.ts
View file @
b89db1af
...
@@ -147,6 +147,7 @@ export enum DICT_TYPE {
...
@@ -147,6 +147,7 @@ export enum DICT_TYPE {
MP_MESSAGE_TYPE
=
'mp_message_type'
,
// 消息类型
MP_MESSAGE_TYPE
=
'mp_message_type'
,
// 消息类型
// ========== MALL - PROMOTION 模块 ==========
// ========== MALL - PROMOTION 模块 ==========
PRODUCT_UNIT
=
'product_unit'
,
// 商品单位
PROMOTION_DISCOUNT_TYPE
=
'promotion_discount_type'
,
// 优惠类型
PROMOTION_DISCOUNT_TYPE
=
'promotion_discount_type'
,
// 优惠类型
PROMOTION_PRODUCT_SCOPE
=
'promotion_product_scope'
,
// 营销的商品范围
PROMOTION_PRODUCT_SCOPE
=
'promotion_product_scope'
,
// 营销的商品范围
PROMOTION_COUPON_TEMPLATE_VALIDITY_TYPE
=
'promotion_coupon_template_validity_type'
,
// 优惠劵模板的有限期类型
PROMOTION_COUPON_TEMPLATE_VALIDITY_TYPE
=
'promotion_coupon_template_validity_type'
,
// 优惠劵模板的有限期类型
...
...
src/views/mall/product/spu/components/BasicInfoForm.vue
View file @
b89db1af
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<!-- TODO @puhui999:只能选根节点 fix: 已完善-->
<el-form-item
label=
"商品分类"
prop=
"categoryId"
>
<el-form-item
label=
"商品分类"
prop=
"categoryId"
>
<el-tree-select
<el-tree-select
v-model=
"formData.categoryId"
v-model=
"formData.categoryId"
...
@@ -166,8 +165,7 @@
...
@@ -166,8 +165,7 @@
</Descriptions>
</Descriptions>
<!-- 商品属性添加 Form 表单 -->
<!-- 商品属性添加 Form 表单 -->
<!-- TODO @puhui999: ProductPropertyAddForm 是不是更合适呀 -->
<ProductPropertyAddForm
ref=
"attributesAddFormRef"
:propertyList=
"propertyList"
/>
<ProductAttributesAddForm
ref=
"attributesAddFormRef"
:propertyList=
"propertyList"
/>
</template>
</template>
<
script
lang=
"ts"
name=
"ProductSpuBasicInfoForm"
setup
>
<
script
lang=
"ts"
name=
"ProductSpuBasicInfoForm"
setup
>
import
{
PropType
}
from
'vue'
import
{
PropType
}
from
'vue'
...
@@ -178,7 +176,7 @@ import { checkSelectedNode, defaultProps, handleTree, treeToString } from '@/uti
...
@@ -178,7 +176,7 @@ import { checkSelectedNode, defaultProps, handleTree, treeToString } from '@/uti
import
{
createImageViewer
}
from
'@/components/ImageViewer'
import
{
createImageViewer
}
from
'@/components/ImageViewer'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
UploadImg
,
UploadImgs
}
from
'@/components/UploadFile'
import
{
UploadImg
,
UploadImgs
}
from
'@/components/UploadFile'
import
{
ProductAttributes
,
Product
Attributes
AddForm
,
SkuList
}
from
'./index'
import
{
ProductAttributes
,
Product
Property
AddForm
,
SkuList
}
from
'./index'
import
{
basicInfoSchema
}
from
'./spu.data'
import
{
basicInfoSchema
}
from
'./spu.data'
import
type
{
Spu
}
from
'@/api/mall/product/spu'
import
type
{
Spu
}
from
'@/api/mall/product/spu'
import
*
as
ProductCategoryApi
from
'@/api/mall/product/category'
import
*
as
ProductCategoryApi
from
'@/api/mall/product/category'
...
...
src/views/mall/product/spu/components/Product
Attributes
AddForm.vue
→
src/views/mall/product/spu/components/Product
Property
AddForm.vue
View file @
b89db1af
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
</
template
>
</
template
>
</Dialog>
</Dialog>
</template>
</template>
<
script
lang=
"ts"
name=
"ProductPropertyForm"
setup
>
<
script
lang=
"ts"
name=
"ProductProperty
Add
Form"
setup
>
import
*
as
PropertyApi
from
'@/api/mall/product/property'
import
*
as
PropertyApi
from
'@/api/mall/product/property'
const
{
t
}
=
useI18n
()
// 国际化
const
{
t
}
=
useI18n
()
// 国际化
...
...
src/views/mall/product/spu/components/SkuList.vue
View file @
b89db1af
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
min-width=
"120"
min-width=
"120"
>
>
<template
#
default=
"
{ row }">
<template
#
default=
"
{ row }">
<!-- TODO puhui999:展示成蓝色,有点区分度哈 fix-->
<span
style=
"font-weight: bold; color: #40aaff"
>
<span
style=
"font-weight: bold; color: #40aaff"
>
{{
row
.
properties
[
index
]?.
valueName
}}
{{
row
.
properties
[
index
]?.
valueName
}}
</span>
</span>
...
...
src/views/mall/product/spu/components/index.ts
View file @
b89db1af
...
@@ -2,7 +2,7 @@ import BasicInfoForm from './BasicInfoForm.vue'
...
@@ -2,7 +2,7 @@ import BasicInfoForm from './BasicInfoForm.vue'
import
DescriptionForm
from
'./DescriptionForm.vue'
import
DescriptionForm
from
'./DescriptionForm.vue'
import
OtherSettingsForm
from
'./OtherSettingsForm.vue'
import
OtherSettingsForm
from
'./OtherSettingsForm.vue'
import
ProductAttributes
from
'./ProductAttributes.vue'
import
ProductAttributes
from
'./ProductAttributes.vue'
import
Product
AttributesAddForm
from
'./ProductAttributes
AddForm.vue'
import
Product
PropertyAddForm
from
'./ProductProperty
AddForm.vue'
import
SkuList
from
'./SkuList.vue'
import
SkuList
from
'./SkuList.vue'
export
{
export
{
...
@@ -10,6 +10,6 @@ export {
...
@@ -10,6 +10,6 @@ export {
DescriptionForm
,
DescriptionForm
,
OtherSettingsForm
,
OtherSettingsForm
,
ProductAttributes
,
ProductAttributes
,
Product
Attributes
AddForm
,
Product
Property
AddForm
,
SkuList
SkuList
}
}
src/views/mall/product/spu/components/spu.data.ts
View file @
b89db1af
import
{
CrudSchema
}
from
'@/hooks/web/useCrudSchemas'
import
{
CrudSchema
}
from
'@/hooks/web/useCrudSchemas'
// TODO @puhui999:如果只要 detail,可以不用 CrudSchema,只要描述的 Schema
// TODO @puhui999:如果只要 detail,可以不用 CrudSchema,只要描述的 Schema
// fix: useCrudSchemas 中没有单独处理的情况且只要 detail 的情况只要 spu 这里有使用 如果改动得添加/修改代码
export
const
basicInfoSchema
=
reactive
<
CrudSchema
[]
>
([
export
const
basicInfoSchema
=
reactive
<
CrudSchema
[]
>
([
{
{
label
:
'商品名称'
,
label
:
'商品名称'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment