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
5f31f16c
Commit
5f31f16c
authored
Jan 19, 2022
by
beisir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 商品库列表库存不可修改&批量上传不可修改
parent
e90c9293
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
34 deletions
+35
-34
index.jsx
src/pages/GoodsManage/SearchForm/index.jsx
+28
-28
staticdata.js
src/pages/GoodsManage/staticdata.js
+7
-6
No files found.
src/pages/GoodsManage/SearchForm/index.jsx
View file @
5f31f16c
...
...
@@ -3,7 +3,7 @@ import React, { Component } from 'react';
import
{
connect
}
from
'
dva
'
;
import
styles
from
'
../style.less
'
;
import
{
stateList
}
from
'
../staticdata
'
;
import
{
uploadFile
}
from
'
../service
'
;
//
import { uploadFile } from '../service';
const
FormItem
=
Form
.
Item
;
const
{
Option
}
=
Select
;
...
...
@@ -43,31 +43,31 @@ class goodsManage extends Component {
const
iptNumWidth
=
{
width
:
118
};
const
that
=
this
;
const
uploadProps
=
{
name
:
'
file
'
,
async
customRequest
(
info
)
{
const
result
=
await
uploadFile
(
info
.
file
);
if
(
result
&&
result
.
businessCode
===
'
0000
'
)
{
that
.
handleSearch
();
notification
.
success
({
message
:
'
操作成功
'
,
});
}
else
{
notification
.
warning
({
message
:
result
.
msg
,
description
:
(
<
div
>
{
result
.
data
?.
length
&&
result
.
data
.
map
(
item
=>
<
p
>
{
item
.
skuNo
+
item
.
errSkuMessage
}
</
p
>)
}
</
div
>
),
duration
:
6
,
});
}
},
accept
:
'
.xlsx
'
,
showUploadList
:
false
,
};
//
const uploadProps = {
//
name: 'file',
//
async customRequest(info) {
//
const result = await uploadFile(info.file);
//
if (result && result.businessCode === '0000') {
//
that.handleSearch();
//
notification.success({
//
message: '操作成功',
//
});
//
} else {
//
notification.warning({
//
message: result.msg,
//
description: (
//
<div>
//
{result.data?.length &&
//
result.data.map(item => <p>{item.skuNo + item.errSkuMessage}</p>)}
//
</div>
//
),
//
duration: 6,
//
});
//
}
//
},
//
accept: '.xlsx',
//
showUploadList: false,
//
};
const
filterOption
=
(
input
,
op
)
=>
op
.
props
.
children
.
includes
(
input
);
return
(
...
...
@@ -144,7 +144,7 @@ class goodsManage extends Component {
<
Button
type=
"primary"
className=
{
styles
.
button
}
onClick=
{
this
.
addSpu
}
>
新增商品
</
Button
>
<
Button
{
/*
<Button
className={styles.button}
type="primary"
icon="download"
...
...
@@ -159,7 +159,7 @@ class goodsManage extends Component {
<Button type="primary" className={styles.button}>
批量库存修改
</Button>
</
Upload
>
</Upload>
*/
}
</
FormItem
>
</
Form
>
);
...
...
src/pages/GoodsManage/staticdata.js
View file @
5f31f16c
...
...
@@ -106,12 +106,13 @@ export function column() {
align
:
'
center
'
,
sorter
:
(
a
,
b
)
=>
a
.
stock
-
b
.
stock
,
render
:
(
_
,
row
)
=>
{
const
stockView
=
row
.
state
!==
4
?
(
<
a
onClick
=
{()
=>
this
.
openModal
(
row
,
'
productStock
'
)}
>
{
row
.
productStock
}
<
/a
>
)
:
(
<
span
>
{
row
.
productStock
}
<
/span
>
);
// const stockView =
// row.state !== 4 ? (
// <a onClick={() => this.openModal(row, 'productStock')}>{row.productStock}</a>
// ) : (
// <span>{row.productStock}</span>
// );
const
stockView
=
row
.
productStock
;
return
(
<>
<
p
>
当前库存:
{
stockView
}
<
/p
>
...
...
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