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
70238242
Commit
70238242
authored
Mar 17, 2022
by
张子雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 商品审核完成
parent
deb89830
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
55 additions
and
17 deletions
+55
-17
batchSetting.jsx
src/pages/GoodsManage/createModal/batchSetting.jsx
+2
-1
index.jsx
src/pages/GoodsManage/createModal/index.jsx
+17
-5
mixin.jsx
src/pages/GoodsManage/createModal/mixin.jsx
+17
-2
index.jsx
src/pages/GoodsManage/index.jsx
+2
-1
staticdata.js
src/pages/GoodsManage/staticdata.js
+1
-1
style.less
src/pages/GoodsManage/style.less
+1
-0
index.jsx
src/pages/components/sortablUpload/index.jsx
+15
-7
No files found.
src/pages/GoodsManage/createModal/batchSetting.jsx
View file @
70238242
...
...
@@ -81,6 +81,7 @@ class goodsManage extends Component {
secondSpesName
=
''
,
productType
,
isEdit
,
isService
,
}
=
this
.
props
;
const
{
getFieldDecorator
}
=
this
.
props
.
form
;
return
(
...
...
@@ -171,7 +172,7 @@ class goodsManage extends Component {
</
FormItem
>
)
}
<
FormItem
>
<
Button
type=
"primary"
htmlType=
"submit"
onClick=
{
this
.
batchSetting
}
>
<
Button
type=
"primary"
htmlType=
"submit"
onClick=
{
this
.
batchSetting
}
disabled=
{
isService
}
>
批量设置
</
Button
>
</
FormItem
>
...
...
src/pages/GoodsManage/createModal/index.jsx
View file @
70238242
...
...
@@ -450,6 +450,8 @@ class goodsManage extends Component {
render
()
{
const
{
visible
,
form
,
initData
=
{},
treeData
,
virtualTreeData
}
=
this
.
props
;
const
isEdit
=
Object
.
keys
(
initData
).
length
!==
0
;
// 是否仅编辑卖点和服务
const
isService
=
initData
.
state
===
5
;
const
{
getFieldDecorator
,
getFieldsValue
}
=
form
;
getFieldDecorator
(
'
firstKeys
'
,
{
initialValue
:
[]
});
getFieldDecorator
(
'
secondKeys
'
,
{
initialValue
:
[]
});
...
...
@@ -538,7 +540,7 @@ class goodsManage extends Component {
fieldNames=
{
{
label
:
'
name
'
,
value
:
'
id
'
,
children
:
'
children
'
}
}
options=
{
treeDataArray
}
onChange=
{
(
val
,
label
,
ext
)
=>
this
.
treeChange
(
val
,
label
,
ext
)
}
// disabled=
{
isEdit
}
disabled=
{
isService
}
/>,
)
}
</
FormItem
>
...
...
@@ -567,6 +569,7 @@ class goodsManage extends Component {
style=
{
{
width
:
280
}
}
filterOption=
{
filterOption
}
placeholder=
"请选择商品品牌,支持模糊搜索"
disabled=
{
isService
}
>
{
brandListArray
?.
length
&&
brandListArray
.
map
(
item
=>
(
...
...
@@ -604,6 +607,7 @@ class goodsManage extends Component {
maxLength=
"100"
placeholder=
"请输入商品名称"
allowClear
disabled=
{
isService
}
/>,
)
}
</
FormItem
>
...
...
@@ -788,6 +792,7 @@ class goodsManage extends Component {
type=
"primary"
className=
{
styles
.
logBtn
}
onClick=
{
()
=>
this
.
createShopInfo
(
isEdit
)
}
disabled=
{
isService
}
>
生成商品信息
</
Button
>
...
...
@@ -805,6 +810,7 @@ class goodsManage extends Component {
productType=
{
productType
}
isEdit=
{
isEdit
}
isJDGoods=
{
isJDGoods
}
isService=
{
isService
}
/>
<
Row
>
<
Table
...
...
@@ -825,6 +831,7 @@ class goodsManage extends Component {
this
.
state
.
initForm
.
secondSpecName
,
isJDGoods
,
isEdit
,
isService
,
)
}
/>
</
Row
>
...
...
@@ -835,6 +842,7 @@ class goodsManage extends Component {
onClick=
{
this
.
deleteImg
}
style=
{
{
marginTop
:
'
10px
'
}
}
icon=
"rest"
disabled=
{
isService
}
>
图片批量删除
</
Button
>
...
...
@@ -853,7 +861,7 @@ class goodsManage extends Component {
initialValue
:
this
.
state
.
initForm
.
commonImageList
,
valuePropName
:
'
fileList
'
,
getValueFromEvent
:
normFile
,
})(<
Upload
/>)
}
})(<
Upload
isDisabled=
{
isService
}
/>)
}
</
FormItem
>
</
Col
>
</
Row
>
...
...
@@ -861,7 +869,6 @@ class goodsManage extends Component {
colorKeys
.
map
(
color
=>
{
if
(
JSON
.
stringify
(
color
)
===
'
{}
'
)
return
[];
if
((
color
!==
null
&&
!
color
)
||
(
color
&&
!
color
.
trim
()))
return
[];
// if (initData.)
{}
return
[
<
Row
>
<
Col
span=
{
1
}
>
...
...
@@ -882,7 +889,12 @@ class goodsManage extends Component {
this
.
state
.
initForm
.
imageList
&&
this
.
state
.
initForm
.
imageList
[
color
],
valuePropName
:
'
fileList
'
,
getValueFromEvent
:
normFile
,
})(<
Upload
onChange=
{
val
=>
this
.
imgChange
(
val
,
color
)
}
/>)
}
})(
<
Upload
isDisabled=
{
isService
}
onChange=
{
val
=>
this
.
imgChange
(
val
,
color
)
}
/>,
)
}
<
Button
disabled=
{
colorImg
[
color
]?.
length
}
size=
"small"
...
...
@@ -919,7 +931,7 @@ class goodsManage extends Component {
message
:
'
请上传详情图
'
,
},
],
})(<
Upload
/>)
}
})(<
Upload
isDisabled=
{
isService
}
/>)
}
</
FormItem
>
</
Col
>
</
Row
>
...
...
src/pages/GoodsManage/createModal/mixin.jsx
View file @
70238242
...
...
@@ -213,7 +213,15 @@ export function verify(initData, categoryId) {
return
false
;
}
export
function
editColumns
(
methods
,
firstData
,
firstSpec
,
secondSpec
,
isJDGoods
,
isEdit
)
{
export
function
editColumns
(
methods
,
firstData
,
firstSpec
,
secondSpec
,
isJDGoods
,
isEdit
,
isService
,
)
{
const
{
getJdPicList
,
inputChange
,
openModal
,
productType
}
=
methods
;
if
(
!
firstData
)
return
[];
...
...
@@ -231,7 +239,7 @@ export function editColumns(methods, firstData, firstSpec, secondSpec, isJDGoods
precision=
{
2
}
min=
{
0
}
onChange=
{
value
=>
inputChange
(
value
,
'
supplyPrice
'
,
index
)
}
disabled=
{
isJDGoods
}
disabled=
{
isJDGoods
||
isService
}
/>
),
},
...
...
@@ -248,6 +256,7 @@ export function editColumns(methods, firstData, firstSpec, secondSpec, isJDGoods
precision=
{
2
}
min=
{
0
}
onChange=
{
value
=>
inputChange
(
value
,
'
marketPrice
'
,
index
)
}
disabled=
{
isService
}
/>
),
},
...
...
@@ -263,6 +272,7 @@ export function editColumns(methods, firstData, firstSpec, secondSpec, isJDGoods
precision=
{
0
}
min=
{
0
}
onChange=
{
value
=>
inputChange
(
value
,
'
productStock
'
,
index
)
}
disabled=
{
isService
}
/>
),
},
...
...
@@ -278,6 +288,7 @@ export function editColumns(methods, firstData, firstSpec, secondSpec, isJDGoods
className=
{
`thirdSkuNo ${index}`
}
defaultValue=
{
val
}
onChange=
{
evt
=>
inputChange
(
evt
.
target
.
value
,
'
thirdSkuNo
'
,
index
)
}
disabled=
{
isService
}
/>
),
},
...
...
@@ -295,6 +306,7 @@ export function editColumns(methods, firstData, firstSpec, secondSpec, isJDGoods
className=
{
`skuLink ${index}`
}
defaultValue=
{
val
}
onChange=
{
evt
=>
inputChange
(
evt
.
target
.
value
,
'
skuLink
'
,
index
)
}
disabled=
{
isService
}
/>
}
</
Popover
>
...
...
@@ -319,6 +331,7 @@ export function editColumns(methods, firstData, firstSpec, secondSpec, isJDGoods
size=
"small"
style=
{
{
marginTop
:
'
5px
'
}
}
onClick=
{
()
=>
openModal
(
row
,
index
)
}
disabled=
{
isService
}
>
修改sku名称
</
Button
>
...
...
@@ -343,6 +356,7 @@ export function editColumns(methods, firstData, firstSpec, secondSpec, isJDGoods
max=
{
999999.999
}
precision=
{
3
}
onChange=
{
value
=>
inputChange
(
value
,
'
weight
'
,
index
)
}
disabled=
{
isService
}
/>
),
});
...
...
@@ -360,6 +374,7 @@ export function editColumns(methods, firstData, firstSpec, secondSpec, isJDGoods
min=
{
0
}
precision=
{
0
}
onChange=
{
value
=>
inputChange
(
value
,
'
productStockWarning
'
,
index
)
}
disabled=
{
isService
}
/>
),
});
...
...
src/pages/GoodsManage/index.jsx
View file @
70238242
...
...
@@ -98,12 +98,13 @@ class goodsManage extends Component {
this
.
handleSearch
();
};
onUpdateInfo
=
async
({
spuId
,
productType
})
=>
{
onUpdateInfo
=
async
({
s
tate
,
s
puId
,
productType
})
=>
{
this
.
setState
({
createloading
:
true
,
});
const
{
data
,
msg
}
=
await
spuDetail
({
id
:
spuId
});
if
(
data
)
{
data
.
state
=
5
;
data
.
pageProductType
=
productType
;
data
.
categoryId
=
data
.
thirdCategoryId
;
data
.
firstSpecId
=
data
.
skuList
[
0
].
firstSpecId
;
...
...
src/pages/GoodsManage/staticdata.js
View file @
70238242
...
...
@@ -143,7 +143,7 @@ export function column() {
align
:
'
center
'
,
render
:
(
_
,
row
)
=>
(
<
div
className
=
{
styles
.
actionBtn
}
>
{
row
.
state
===
4
&&
(
{
(
row
.
state
===
4
||
row
.
state
===
5
)
&&
(
<
Button
key
=
"
edit
"
type
=
"
primary
"
...
...
src/pages/GoodsManage/style.less
View file @
70238242
...
...
@@ -85,6 +85,7 @@
}
.warning {
margin-top: -20px;
margin-bottom: 20px;
color: red;
}
...
...
src/pages/components/sortablUpload/index.jsx
View file @
70238242
...
...
@@ -156,7 +156,7 @@ class PicturesWall extends React.Component {
<
div
className=
"ant-upload-text"
>
上传图片
</
div
>
</
div
>
);
const
{
max
}
=
this
.
props
;
const
{
max
,
isDisabled
}
=
this
.
props
;
const
that
=
this
;
const
uploadProps
=
{
beforeUpload
:
lodash
.
debounce
(
async
(
file
,
files
)
=>
{
...
...
@@ -218,11 +218,13 @@ class PicturesWall extends React.Component {
className=
{
styles
.
maskIcon
}
onClick=
{
()
=>
this
.
handlePreview
(
item
)
}
/>
<
Icon
type=
"delete"
className=
{
styles
.
maskIcon
}
onClick=
{
()
=>
this
.
onRemoveImg
(
item
)
}
/>
{
!
isDisabled
&&
(
<
Icon
type=
"delete"
className=
{
styles
.
maskIcon
}
onClick=
{
()
=>
this
.
onRemoveImg
(
item
)
}
/>
)
}
</
div
>
)
}
</
div
>
...
...
@@ -230,7 +232,13 @@ class PicturesWall extends React.Component {
</
ReactSortable
>
)
}
</
div
>
<
Upload
multiple
{
...
uploadProps
}
fileList=
{
fileList
}
showUploadList=
{
false
}
>
<
Upload
multiple
{
...
uploadProps
}
fileList=
{
fileList
}
showUploadList=
{
false
}
disabled=
{
isDisabled
}
>
{
max
&&
fileList
.
length
>=
max
?
null
:
uploadButton
}
</
Upload
>
<
Modal
visible=
{
previewVisible
}
footer=
{
null
}
onCancel=
{
this
.
handleCancel
}
>
...
...
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