Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project
jinfa-admin
Commits
4918f3cd
Commit
4918f3cd
authored
Sep 08, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:品类属性一些问题
parent
39ed5de9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
6 deletions
+30
-6
addAttribute.tsx
src/pages/classAndProperty/attribute/addAttribute.tsx
+27
-1
index.tsx
src/pages/classAndProperty/categoryAttributes/index.tsx
+1
-0
index.tsx
src/pages/classAndProperty/class/index.tsx
+1
-4
checkProducts.tsx
src/pages/commodity/products/checkProducts.tsx
+1
-1
No files found.
src/pages/classAndProperty/attribute/addAttribute.tsx
View file @
4918f3cd
...
...
@@ -127,6 +127,14 @@ const AddAtttribute: React.FC<{}> = () => {
}
};
// 特殊属性切换
const
onChangeSpecial
=
(
e
,
type
)
=>
{
if
(
type
===
'isDate'
)
menuForm
.
setFieldsValue
({
isArea
:
false
})
if
(
type
===
'isArea'
)
menuForm
.
setFieldsValue
({
isDate
:
false
})
}
return
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
...
...
@@ -224,7 +232,8 @@ const AddAtttribute: React.FC<{}> = () => {
</Tooltip>
</Col> */
}
<
Col
span=
{
24
}
>
<
Form
.
Item
name=
"isPrice"
valuePropName=
"checked"
initialValue=
{
false
}
noStyle
><
Checkbox
disabled=
{
pageStatus
===
2
}
>
价格属性
</
Checkbox
></
Form
.
Item
>
{
/* 规格属性 -> 原价格属性 */
}
<
Form
.
Item
name=
"isPrice"
valuePropName=
"checked"
initialValue=
{
false
}
noStyle
><
Checkbox
disabled=
{
pageStatus
===
2
}
>
规格属性
</
Checkbox
></
Form
.
Item
>
<
Tooltip
title=
"勾选后对于此属性的每个属性值会在商品发布时按属性设置不同的价格!"
>
<
InfoCircleOutlined
/>
</
Tooltip
>
...
...
@@ -235,6 +244,23 @@ const AddAtttribute: React.FC<{}> = () => {
<
InfoCircleOutlined
/>
</
Tooltip
>
</
Col
>
{
/* 日期 地区属性 */
}
<
Col
span=
{
24
}
>
<
Form
.
Item
name=
"isDate"
valuePropName=
"checked"
initialValue=
{
false
}
noStyle
>
<
Checkbox
onChange=
{
(
e
)
=>
onChangeSpecial
(
e
,
'isDate'
)
}
>
日期属性
</
Checkbox
>
</
Form
.
Item
>
<
Tooltip
title=
"勾选后此属性作为日期属性,日期属性的属性值无需在属性值管理中设置,系统自动取自然日作为属性值"
>
<
InfoCircleOutlined
/>
</
Tooltip
>
</
Col
>
<
Col
span=
{
24
}
>
<
Form
.
Item
name=
"isArea"
valuePropName=
"checked"
initialValue=
{
false
}
noStyle
>
<
Checkbox
onChange=
{
(
e
)
=>
onChangeSpecial
(
e
,
'isArea'
)
}
>
地区属性
</
Checkbox
>
</
Form
.
Item
>
<
Tooltip
title=
"勾选后此属性作为地区属性,地区属性的属性值无需手工在属性值管理中设置,系统自动取地区数据作为属性值"
>
<
InfoCircleOutlined
/>
</
Tooltip
>
</
Col
>
</
Row
>
</
Form
.
Item
>
</
Col
>
...
...
src/pages/classAndProperty/categoryAttributes/index.tsx
View file @
4918f3cd
...
...
@@ -312,6 +312,7 @@ const CategoryAttributes: React.FC<{}> = () => {
okText=
"确认"
cancelText=
"取消"
width=
{
704
}
destroyOnClose=
{
true
}
>
<
StandardTable
columns=
{
columnsLink
}
...
...
src/pages/classAndProperty/class/index.tsx
View file @
4918f3cd
...
...
@@ -13,7 +13,6 @@ import { classSchema } from './schema'
import
{
PublicApi
}
from
'@/services/api'
;
import
{
useTreeTabs
}
from
'@/hooks/useTreeTabs'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
isObject
}
from
'@antv/util'
;
const
{
ON_FORM_INPUT_CHANGE
}
=
LifeCycleTypes
...
...
@@ -57,9 +56,6 @@ const ClassProperty: React.FC<{}> = () => {
})
const
formInitValue
=
(
nodeRecord
&&
treeStatus
===
FormState
.
EDIT
)
?
getTreeMaps
(
nodeRecord
.
key
)
:
{}
useEffect
(()
=>
{
console
.
log
(
nodeRecord
,
'getTreeMaps'
)
},
[
getTreeMaps
])
const
onFinish
=
(
values
)
=>
{
const
editOrAdd
=
nodeRecord
&&
treeStatus
===
FormState
.
EDIT
...
...
@@ -96,6 +92,7 @@ const ClassProperty: React.FC<{}> = () => {
fetchData
=
{
params
=
>
fetchClassTreeData(params)}
treeData=
{
treeData
}
toolsRender=
{
toolsRender
}
actions=
{
treeActions
}
handleSelect=
{
(
key
,
node
)
=>
clickSelect
(
key
,
node
)
}
customKey="id"
/
>
...
...
src/pages/commodity/products/checkProducts.tsx
View file @
4918f3cd
...
...
@@ -393,7 +393,7 @@ const viewProducts: React.FC<{}> = () => {
<
p
>
商品卖点:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
>
{
productDetail
?.
sellingPoint
.
map
(
_item
=>
<
Tag
key=
{
_item
}
>
{
_item
}
</
Tag
>)
}
</
p
>
<
p
>
{
productDetail
?.
sellingPoint
&&
productDetail
.
sellingPoint
.
map
(
_item
=>
<
Tag
key=
{
_item
}
>
{
_item
}
</
Tag
>)
}
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
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