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
67c49371
Commit
67c49371
authored
Apr 04, 2023
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改样式
parent
05e6425b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
25 deletions
+28
-25
env.config.js
config/env.config.js
+1
-1
MinimumPurchase.jsx
...pages/GoodsManage/Takeaway/components/MinimumPurchase.jsx
+4
-6
index.jsx
src/pages/GoodsManage/Takeaway/index.jsx
+20
-18
style.less
src/pages/GoodsManage/style.less
+3
-0
No files found.
config/env.config.js
View file @
67c49371
const
isProduction
=
process
.
env
.
NODE_ENV
===
'
production
'
;
const
isPre
=
process
.
env
.
PRE_ENV
===
'
pre
'
;
const
environment
=
'
sc1
'
;
const
environment
=
'
yxm2
'
;
const
envAPi
=
{
api
:
`https://security-
${
environment
}
.liangkebang.net`
,
//'https://security-xyqb.liangkebang.net',
kdspOpApi
:
`https://sc-merchant-api-
${
environment
}
.liangkebang.net`
,
...
...
src/pages/GoodsManage/Takeaway/components/MinimumPurchase.jsx
View file @
67c49371
import
React
from
'
react
'
;
import
{
Modal
,
Form
,
Input
}
from
'
antd
'
;
import
{
Modal
,
Form
,
InputNumber
}
from
'
antd
'
;
import
styles
from
'
../../style.less
'
;
const
MinimumPurchase
=
options
=>
{
const
[
form
]
=
Form
.
useForm
();
...
...
@@ -36,12 +37,9 @@ const MinimumPurchase = options => {
<
Form
.
Item
label=
"最少购买/份"
name=
"minPurchaseNum"
rules=
{
[
{
required
:
true
,
message
:
'
请输入最少购买数量!
'
},
{
min
:
1
,
message
:
'
最小输入1
'
},
]
}
rules=
{
[{
required
:
true
,
message
:
'
请输入最少购买数量!
'
}]
}
>
<
Input
maxLength=
{
6
}
type=
"number"
/>
<
Input
Number
min=
{
1
}
max=
{
999999
}
className=
{
styles
.
inputWdith
}
/>
</
Form
.
Item
>
</
Form
>
</
Modal
>
...
...
src/pages/GoodsManage/Takeaway/index.jsx
View file @
67c49371
...
...
@@ -22,7 +22,8 @@ const Takeaway = options => {
const
[
shopId
,
setShopId
]
=
useState
(
0
);
const
[
groupId
,
setGroupId
]
=
useState
(
0
);
const
[
pageNo
,
setPageNo
]
=
useState
(
1
);
const
[
pageSize
,
setPageSize
]
=
useState
(
50
);
const
[
pageSize
,
setPageSize
]
=
useState
(
30
);
const
[
total
,
setTotal
]
=
useState
(
0
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
actionLoading
,
setActionLoading
]
=
useState
(
false
);
const
[
visibleWeekTime
,
setVisibleWeekTime
]
=
useState
(
false
);
...
...
@@ -36,12 +37,12 @@ const Takeaway = options => {
onChange
:
setSelectedRowKeys
,
};
const
getDataList
=
async
()
=>
{
const
getDataList
=
async
(
page
,
size
)
=>
{
setLoading
(
true
);
const
params
=
Object
.
assign
({},
options
.
searchValue
,
{
pageNo
,
pageNo
:
page
||
pageNo
,
productType
:
5
,
pageSize
,
pageSize
:
size
||
pageSize
,
storageRackId
:
groupId
,
});
const
productCategoryId
=
options
.
searchValue
?.
productCategoryId
||
[];
...
...
@@ -51,6 +52,7 @@ const Takeaway = options => {
setLoading
(
false
);
if
(
res
&&
res
.
data
)
{
setTableData
(
res
.
data
.
records
);
setTotal
(
res
.
data
.
total
);
}
};
const
onPageChange
=
(
page
,
size
)
=>
{
...
...
@@ -58,7 +60,7 @@ const Takeaway = options => {
setPageNo
(
page
);
setPageSize
(
size
);
});
getDataList
();
getDataList
(
page
,
size
);
};
const
onSortEnd
=
async
({
oldIndex
,
newIndex
})
=>
{
...
...
@@ -66,7 +68,7 @@ const Takeaway = options => {
const
newData
=
arrayMoveImmutable
(
tableData
.
slice
(),
oldIndex
,
newIndex
).
filter
(
el
=>
!!
el
);
const
skuSorts
=
newData
.
map
((
item
,
index
)
=>
({
skuId
:
item
.
skuId
,
sort
:
index
+
1
,
sort
:
pageSize
*
pageNo
+
index
+
1
,
}));
const
params
=
{
storageRackId
:
groupId
,
...
...
@@ -107,17 +109,17 @@ const Takeaway = options => {
};
setActionLoading
(
true
);
const
res
=
await
apiGoodsActionBatch
(
Object
.
assign
({},
json
,
params
));
unstable_batchedUpdates
(()
=>
{
setActionLoading
(
false
);
setVisibleWeekTime
(
false
);
setVisibleStock
(
false
);
setVisibleSwitchGroup
(
false
);
setVisibleBuy
(
false
);
setVisibleSend
(
false
);
});
getDataList
();
if
(
res
.
businessCode
===
'
0000
'
&&
res
.
code
===
'
0000
'
)
{
message
.
success
(
'
处理成功!
'
);
unstable_batchedUpdates
(()
=>
{
setActionLoading
(
false
);
setVisibleWeekTime
(
false
);
setVisibleStock
(
false
);
setVisibleSwitchGroup
(
false
);
setVisibleBuy
(
false
);
setVisibleSend
(
false
);
});
getDataList
();
}
};
...
...
@@ -188,7 +190,7 @@ const Takeaway = options => {
columns=
{
takeawayColumn
(
actions
)
}
rowKey=
{
record
=>
record
.
skuId
}
pagination=
{
false
}
scroll=
{
{
x
:
'
100%
'
,
y
:
10
00
}
}
scroll=
{
{
x
:
'
100%
'
,
y
:
5
00
}
}
rowSelection=
{
rowSelection
}
components=
{
{
body
:
{
...
...
@@ -202,8 +204,8 @@ const Takeaway = options => {
<
Pagination
className=
{
styles
[
'
takeawayBox--page
'
]
}
onChange=
{
onPageChange
}
total=
{
t
ableData
.
t
otal
}
showTotal=
{
total
=>
`共${total
}条`
}
total=
{
total
}
showTotal=
{
o
=>
`共${o
}条`
}
current=
{
pageNo
}
pageSize=
{
pageSize
}
showSizeChanger
...
...
src/pages/GoodsManage/style.less
View file @
67c49371
...
...
@@ -288,3 +288,6 @@
width: 100%;
}
}
.inputWdith {
width: 100%;
}
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