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
1239037a
Commit
1239037a
authored
Nov 22, 2022
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加草稿列表
parent
2514d84c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
125 additions
and
11 deletions
+125
-11
index.jsx
src/pages/GoodsManage/DraftModal/index.jsx
+41
-0
staticdata.js
src/pages/GoodsManage/DraftModal/staticdata.js
+51
-0
index.jsx
src/pages/GoodsManage/index.jsx
+33
-11
No files found.
src/pages/GoodsManage/DraftModal/index.jsx
0 → 100644
View file @
1239037a
import
React
,
{
useState
}
from
'
react
'
;
import
{
Modal
,
Table
}
from
'
antd
'
;
import
{
columns
}
from
'
./staticdata
'
;
const
DraftModal
=
props
=>
{
const
[
pageInfo
,
setPageInfo
]
=
useState
({
current
:
1
,
pageSize
:
4
,
total
:
100
,
});
const
[
dataSource
,
setdataSource
]
=
useState
([]);
const
onChange
=
(
current
,
pageSize
)
=>
{
setPageInfo
({
current
,
pageSize
,
});
};
const
onClose
=
()
=>
props
.
onCancel
();
const
pagination
=
{
...
pageInfo
,
onChange
,
onShowSizeChange
:
onChange
,
};
return
(
<
Modal
visible=
{
props
.
visible
}
title=
"草稿箱"
onCancel=
{
onClose
}
maskClosable=
{
false
}
width=
"1000px"
>
<
Table
columns=
{
columns
}
pagination=
{
pagination
}
dataSource=
{
dataSource
}
/>
</
Modal
>
);
};
export
default
DraftModal
;
src/pages/GoodsManage/DraftModal/staticdata.js
0 → 100644
View file @
1239037a
import
React
from
'
react
'
;
import
{
Button
}
from
'
antd
'
;
export
const
columns
=
[
{
title
:
'
草稿ID
'
,
dataIndex
:
'
skuId
'
,
width
:
85
,
align
:
'
center
'
,
},
{
title
:
'
商品名称
'
,
dataIndex
:
'
skuName
'
,
width
:
125
,
align
:
'
center
'
,
},
{
title
:
'
所属类目
'
,
dataIndex
:
'
skuId
'
,
width
:
125
,
align
:
'
center
'
,
},
{
title
:
'
商品类型
'
,
dataIndex
:
'
skuId
'
,
width
:
125
,
align
:
'
center
'
,
},
{
title
:
'
创建时间
'
,
dataIndex
:
'
skuId
'
,
width
:
125
,
align
:
'
center
'
,
},
{
title
:
'
操作
'
,
dataIndex
:
'
action
'
,
width
:
120
,
align
:
'
center
'
,
render
:
()
=>
(
<>
<
Button
key
=
"
edit
"
type
=
"
link
"
size
=
"
small
"
>
修改
<
/Button
>
<
Button
key
=
"
viewP
"
type
=
"
link
"
size
=
"
small
"
onClick
=
{()
=>
{}}
>
删除
<
/Button
>
<
/
>
),
},
];
src/pages/GoodsManage/index.jsx
View file @
1239037a
...
@@ -25,6 +25,7 @@ import SearchForm from './SearchForm';
...
@@ -25,6 +25,7 @@ import SearchForm from './SearchForm';
import
TempleatModal
from
'
./TempleatModal
'
;
import
TempleatModal
from
'
./TempleatModal
'
;
import
ServiceGoods
from
'
../ServiceGoods
'
;
import
ServiceGoods
from
'
../ServiceGoods
'
;
import
InfoAudit
from
'
./infoAudit
'
;
import
InfoAudit
from
'
./infoAudit
'
;
import
DraftModal
from
'
./DraftModal
'
;
import
{
GOOD_MANAGE
}
from
'
@/../config/permission.config
'
;
import
{
GOOD_MANAGE
}
from
'
@/../config/permission.config
'
;
...
@@ -56,6 +57,7 @@ class goodsManage extends Component {
...
@@ -56,6 +57,7 @@ class goodsManage extends Component {
serviceData
:
{},
serviceData
:
{},
visibleAuditModal
:
false
,
visibleAuditModal
:
false
,
auditRow
:
{},
// 查看审核信息使用
auditRow
:
{},
// 查看审核信息使用
isVisibleDraft
:
false
,
// 显示隐藏草稿箱
};
};
currentLog
=
null
;
currentLog
=
null
;
...
@@ -327,6 +329,14 @@ class goodsManage extends Component {
...
@@ -327,6 +329,14 @@ class goodsManage extends Component {
}
}
};
};
// 打开草稿箱
openDraftModal
=
e
=>
{
console
.
log
(
'
e :>>
'
,
e
);
this
.
setState
({
isVisibleDraft
:
!!
e
,
});
};
onEdit
=
()
=>
{
onEdit
=
()
=>
{
this
.
setState
({
visibleAuditModal
:
false
,
auditRow
:
{}
});
this
.
setState
({
visibleAuditModal
:
false
,
auditRow
:
{}
});
this
.
serviceVisbleChange
(
this
.
state
.
auditRow
);
this
.
serviceVisbleChange
(
this
.
state
.
auditRow
);
...
@@ -348,17 +358,26 @@ class goodsManage extends Component {
...
@@ -348,17 +358,26 @@ class goodsManage extends Component {
this
.
canEditable
=
permissions
[
GOOD_MANAGE
.
EDITABLE
];
this
.
canEditable
=
permissions
[
GOOD_MANAGE
.
EDITABLE
];
return
(
return
(
<
PageHeaderWrapper
>
<
PageHeaderWrapper
>
{
canAddNormal
||
canAddService
?
(
{
canAddNormal
||
canAddService
<
Button
?
[
type=
"primary"
<
Button
className=
{
styles
.
button
}
type=
"primary"
onClick=
{
()
=>
this
.
serviceVisbleClose
(
true
)
}
key=
"btnNew"
>
className=
{
styles
.
button
}
新增商品
onClick=
{
()
=>
this
.
serviceVisbleClose
(
true
)
}
</
Button
>
>
)
:
(
新增商品
''
</
Button
>,
)
}
<
Button
type=
"link"
key=
"btnDraft"
className=
{
styles
.
button
}
onClick=
{
this
.
openDraftModal
}
>
草稿箱
</
Button
>,
]
:
''
}
<
Spin
spinning=
{
this
.
state
.
createloading
}
>
<
Spin
spinning=
{
this
.
state
.
createloading
}
>
<
Card
>
<
Card
>
<
SearchForm
<
SearchForm
...
@@ -470,6 +489,9 @@ class goodsManage extends Component {
...
@@ -470,6 +489,9 @@ class goodsManage extends Component {
onEdit=
{
this
.
onEdit
}
onEdit=
{
this
.
onEdit
}
/>
/>
)
}
)
}
{
this
.
state
.
isVisibleDraft
&&
(
<
DraftModal
visible=
{
this
.
state
.
isVisibleDraft
}
onCancel=
{
this
.
openDraftModal
}
/>
)
}
</
PageHeaderWrapper
>
</
PageHeaderWrapper
>
);
);
}
}
...
...
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