Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
merchant-manage-ui
Commits
30297ba1
Commit
30297ba1
authored
Apr 26, 2022
by
lxd
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/upgrade' of git.quantgroup.cn:ui/merchant-manage-ui into feature/upgrade
parents
e82e995b
a2d6b627
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
74 deletions
+79
-74
index.jsx
src/pages/GoodsManage/createModal/index.jsx
+72
-67
mixin.jsx
src/pages/GoodsManage/createModal/mixin.jsx
+4
-4
staticdata.js
src/pages/GoodsManage/staticdata.js
+1
-1
style.less
src/pages/GoodsManage/style.less
+2
-2
No files found.
src/pages/GoodsManage/createModal/index.jsx
View file @
30297ba1
...
@@ -85,6 +85,9 @@ class goodsManage extends Component {
...
@@ -85,6 +85,9 @@ class goodsManage extends Component {
inputChange
=
(
value
,
key
,
index
)
=>
{
inputChange
=
(
value
,
key
,
index
)
=>
{
this
.
setState
(
prev
=>
{
this
.
setState
(
prev
=>
{
if
(
key
===
'
third
'
)
{
prev
.
editData
[
index
].
thirdSkuNo
=
value
;
}
prev
.
editData
[
index
][
key
]
=
value
;
prev
.
editData
[
index
][
key
]
=
value
;
return
{
editData
:
prev
.
editData
};
return
{
editData
:
prev
.
editData
};
});
});
...
@@ -119,6 +122,7 @@ class goodsManage extends Component {
...
@@ -119,6 +122,7 @@ class goodsManage extends Component {
i
.
imageList
=
colorImg
[
i
.
firstSpecValue
];
i
.
imageList
=
colorImg
[
i
.
firstSpecValue
];
return
i
;
return
i
;
});
});
console
.
log
(
editData
);
this
.
setState
(
this
.
setState
(
()
=>
({
colorImg
,
editData
}),
()
=>
({
colorImg
,
editData
}),
()
=>
{
()
=>
{
...
@@ -159,6 +163,9 @@ class goodsManage extends Component {
...
@@ -159,6 +163,9 @@ class goodsManage extends Component {
form
:
{
setFieldsValue
},
form
:
{
setFieldsValue
},
initData
,
initData
,
}
=
this
.
props
;
}
=
this
.
props
;
initData
.
editData
.
forEach
(
item
=>
{
item
.
third
=
item
.
thirdSkuNo
;
});
if
(
Object
.
keys
(
initData
).
length
)
{
if
(
Object
.
keys
(
initData
).
length
)
{
this
.
setState
({
this
.
setState
({
initForm
:
initData
,
initForm
:
initData
,
...
@@ -572,7 +579,7 @@ class goodsManage extends Component {
...
@@ -572,7 +579,7 @@ class goodsManage extends Component {
style=
{
{
background
:
'
#fff
'
,
borderRadius
:
'
6px
'
,
padding
:
'
20px 0 5px 0
'
}
}
style=
{
{
background
:
'
#fff
'
,
borderRadius
:
'
6px
'
,
padding
:
'
20px 0 5px 0
'
}
}
>
>
<
Col
span=
{
10
}
>
<
Col
span=
{
10
}
>
<
FormItem
label=
"商品品牌"
{
...
formItemLayout
}
>
<
FormItem
label=
"商品品牌
:
"
{
...
formItemLayout
}
>
{
getFieldDecorator
(
'
brandId
'
,
{
{
getFieldDecorator
(
'
brandId
'
,
{
initialValue
:
this
.
state
.
initForm
.
brandId
,
initialValue
:
this
.
state
.
initForm
.
brandId
,
rules
:
[
rules
:
[
...
@@ -607,7 +614,7 @@ class goodsManage extends Component {
...
@@ -607,7 +614,7 @@ class goodsManage extends Component {
<
Row
type=
"flex"
>
<
Row
type=
"flex"
>
<
Col
span=
{
24
}
>
<
Col
span=
{
24
}
>
<
Popover
content=
{
name
}
trigger=
"hover"
>
<
Popover
content=
{
name
}
trigger=
"hover"
>
<
FormItem
label=
"商品名称"
labelCol=
{
{
span
:
2
}
}
>
<
FormItem
label=
"商品名称
:
"
labelCol=
{
{
span
:
2
}
}
>
{
getFieldDecorator
(
'
name
'
,
{
{
getFieldDecorator
(
'
name
'
,
{
initialValue
:
initData
.
name
,
initialValue
:
initData
.
name
,
validateTrigger
:
[
'
onBlur
'
],
validateTrigger
:
[
'
onBlur
'
],
...
@@ -638,7 +645,7 @@ class goodsManage extends Component {
...
@@ -638,7 +645,7 @@ class goodsManage extends Component {
)
}
)
}
</
Col
>
</
Col
>
<
Col
span=
{
24
}
>
<
Col
span=
{
24
}
>
<
FormItem
label=
"商品卖点"
labelCol=
{
{
span
:
2
}
}
>
<
FormItem
label=
"商品卖点
:
"
labelCol=
{
{
span
:
2
}
}
>
{
getFieldDecorator
(
'
character
'
,
{
{
getFieldDecorator
(
'
character
'
,
{
initialValue
:
initData
.
character
,
initialValue
:
initData
.
character
,
})(
})(
...
@@ -857,6 +864,7 @@ class goodsManage extends Component {
...
@@ -857,6 +864,7 @@ class goodsManage extends Component {
/>
/>
</
Row
>
</
Row
>
<
Row
>
<
Row
>
<
Col
span=
{
24
}
>
<
Button
<
Button
type=
"danger"
type=
"danger"
size=
"small"
size=
"small"
...
@@ -866,7 +874,7 @@ class goodsManage extends Component {
...
@@ -866,7 +874,7 @@ class goodsManage extends Component {
>
>
图片批量删除
图片批量删除
</
Button
>
</
Button
>
<
Row
>
<
/
Col
>
<
Col
span=
{
1
}
>
<
Col
span=
{
1
}
>
<
Checkbox
<
Checkbox
value=
"commonImageList"
value=
"commonImageList"
...
@@ -884,13 +892,11 @@ class goodsManage extends Component {
...
@@ -884,13 +892,11 @@ class goodsManage extends Component {
})(<
Upload
isDisabled=
{
isService
}
/>)
}
})(<
Upload
isDisabled=
{
isService
}
/>)
}
</
FormItem
>
</
FormItem
>
</
Col
>
</
Col
>
</
Row
>
{
colorKeys
.
length
>
0
&&
{
colorKeys
.
length
>
0
&&
colorKeys
.
map
(
color
=>
{
colorKeys
.
map
(
color
=>
{
if
(
JSON
.
stringify
(
color
)
===
'
{}
'
)
return
[];
if
(
JSON
.
stringify
(
color
)
===
'
{}
'
)
return
[];
if
((
color
!==
null
&&
!
color
)
||
(
color
&&
!
color
.
trim
()))
return
[];
if
((
color
!==
null
&&
!
color
)
||
(
color
&&
!
color
.
trim
()))
return
[];
return
[
return
[
<
Row
>
<
Col
span=
{
1
}
>
<
Col
span=
{
1
}
>
<
Checkbox
<
Checkbox
value=
{
color
}
value=
{
color
}
...
@@ -898,7 +904,7 @@ class goodsManage extends Component {
...
@@ -898,7 +904,7 @@ class goodsManage extends Component {
style=
{
{
marginTop
:
'
12px
'
}
}
style=
{
{
marginTop
:
'
12px
'
}
}
onChange=
{
()
=>
this
.
chooseRollImg
(
color
)
}
onChange=
{
()
=>
this
.
chooseRollImg
(
color
)
}
></
Checkbox
>
></
Checkbox
>
</
Col
>
</
Col
>,
<
Col
span=
{
23
}
className=
{
styles
.
imgBorder
}
>
<
Col
span=
{
23
}
className=
{
styles
.
imgBorder
}
>
<
FormItem
<
FormItem
key=
{
color
}
key=
{
color
}
...
@@ -925,8 +931,7 @@ class goodsManage extends Component {
...
@@ -925,8 +931,7 @@ class goodsManage extends Component {
拉取公共图像
拉取公共图像
</
Button
>
</
Button
>
</
FormItem
>
</
FormItem
>
</
Col
>
</
Col
>,
</
Row
>,
];
];
})
}
})
}
</
Row
>
</
Row
>
...
...
src/pages/GoodsManage/createModal/mixin.jsx
View file @
30297ba1
...
@@ -279,15 +279,15 @@ export function editColumns(
...
@@ -279,15 +279,15 @@ export function editColumns(
{
{
title
:
'
商品自编码
'
,
title
:
'
商品自编码
'
,
align
:
'
center
'
,
align
:
'
center
'
,
key
:
'
thirdSkuNo
'
,
dataIndex
:
'
third
'
,
dataIndex
:
'
thirdSkuNo
'
,
key
:
'
third
'
,
width
:
100
,
width
:
100
,
render
:
(
val
,
row
,
index
)
=>
(
render
:
(
val
,
row
,
index
)
=>
(
<
Input
<
Input
value=
{
val
}
value=
{
val
}
className=
{
`third
SkuNo
${index}`
}
className=
{
`third ${index}`
}
defaultValue=
{
val
}
defaultValue=
{
val
}
onChange=
{
evt
=>
inputChange
(
evt
.
target
.
value
,
'
third
SkuNo
'
,
index
)
}
onChange=
{
evt
=>
inputChange
(
evt
.
target
.
value
,
'
third
'
,
index
)
}
disabled=
{
isService
}
disabled=
{
isService
}
/>
/>
),
),
...
...
src/pages/GoodsManage/staticdata.js
View file @
30297ba1
...
@@ -151,7 +151,7 @@ export function column() {
...
@@ -151,7 +151,7 @@ export function column() {
align
:
'
center
'
,
align
:
'
center
'
,
render
:
(
_
,
row
)
=>
(
render
:
(
_
,
row
)
=>
(
<
div
className
=
{
styles
.
actionBtn
}
>
<
div
className
=
{
styles
.
actionBtn
}
>
{(
row
.
state
===
4
||
(
row
.
state
==
=
5
&&
row
.
updateState
!==
1
))
&&
(
{(
row
.
state
===
4
||
(
row
.
state
>
=
5
&&
row
.
updateState
!==
1
))
&&
(
<
Button
<
Button
key
=
"
edit
"
key
=
"
edit
"
type
=
"
primary
"
type
=
"
primary
"
...
...
src/pages/GoodsManage/style.less
View file @
30297ba1
...
@@ -39,8 +39,8 @@
...
@@ -39,8 +39,8 @@
}
}
.pullBtn {
.pullBtn {
position: absolute;
position: absolute;
top:
-
30px;
top: 30px;
left:
700px;
right: -
700px;
}
}
.price {
.price {
...
...
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