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
e8b38b09
Commit
e8b38b09
authored
May 15, 2024
by
guang.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改提示语
parent
98e6d4fb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
2 deletions
+19
-2
UpdatePriceStock.jsx
...sManage/SupplyPriceUpdate/components/UpdatePriceStock.jsx
+12
-0
style.less
src/pages/GoodsManage/SupplyPriceUpdate/style.less
+4
-0
service.js
src/pages/GoodsManage/service.js
+2
-1
request.js
src/utils/request.js
+1
-1
No files found.
src/pages/GoodsManage/SupplyPriceUpdate/components/UpdatePriceStock.jsx
View file @
e8b38b09
...
...
@@ -12,6 +12,7 @@ const UpdatePriceStock = options => {
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
specArr
,
setSpecArr
]
=
useState
([]);
// 规格列
const
[
form
]
=
Form
.
useForm
();
const
[
errorMsg
,
setErrorMsg
]
=
useState
([]);
// 错误信息
const
onSubmit
=
async
()
=>
{
const
value
=
await
form
.
validateFields
();
...
...
@@ -21,11 +22,15 @@ const UpdatePriceStock = options => {
skus
:
value
.
data
,
};
setLoading
(
true
);
setErrorMsg
([]);
const
res
=
await
apiProductBiddingUpdate
(
params
);
setLoading
(
false
);
if
(
res
?.
success
)
{
options
.
refresh
();
options
.
onCancel
();
}
else
{
const
msg
=
res
?.
msg
||
'
修改失败
'
;
setErrorMsg
(
msg
.
split
(
'
;
'
));
}
};
...
...
@@ -87,6 +92,13 @@ const UpdatePriceStock = options => {
/>
</
EditableContext
.
Provider
>
</
Form
>
{
errorMsg
&&
(
<
div
className=
{
styles
.
errorMsg
}
>
{
errorMsg
.
map
(
item
=>
(
<
div
key=
{
item
}
>
{
item
}
</
div
>
))
}
</
div
>
)
}
</
Modal
>
);
};
...
...
src/pages/GoodsManage/SupplyPriceUpdate/style.less
View file @
e8b38b09
...
...
@@ -22,3 +22,7 @@
.button {
margin: 0 5px;
}
.errorMsg {
padding: 10px 25px;
color: red;
}
src/pages/GoodsManage/service.js
View file @
e8b38b09
...
...
@@ -409,7 +409,8 @@ export async function apiProductBiddingUpdate(params) {
return
request
.
post
(
'
/api/merchants/products/bidding/edit
'
,
{
prefix
:
goodsApi
,
data
:
params
,
duration
:
8
,
duration
:
null
,
notTip
:
true
,
});
}
...
...
src/utils/request.js
View file @
e8b38b09
...
...
@@ -139,7 +139,7 @@ request.interceptors.response.use(async (response, options) => {
if
(
data
.
businessCode
&&
data
.
businessCode
!==
'
0000
'
&&
!
options
.
notTip
)
{
notification
.
warning
({
message
:
data
.
detail
||
data
.
msg
||
'
操作失败
'
,
duration
:
options
.
duration
||
4.5
,
duration
:
typeof
options
.
duration
===
'
undefined
'
?
4.5
:
options
.
duration
,
});
}
return
response
;
...
...
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