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
bf0c1fc1
Commit
bf0c1fc1
authored
Apr 06, 2023
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加发布刷新外卖列表
parent
c3672f3a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
4 deletions
+31
-4
package-lock.json
package-lock.json
+12
-0
package.json
package.json
+1
-0
StockModal.jsx
src/pages/GoodsManage/Takeaway/components/StockModal.jsx
+2
-1
index.jsx
src/pages/GoodsManage/Takeaway/index.jsx
+16
-3
No files found.
package-lock.json
View file @
bf0c1fc1
...
...
@@ -27,6 +27,7 @@
"moment": "^2.24.0",
"omit.js": "^1.0.2",
"path-to-regexp": "^3.1.0",
"pubsub-js": "^1.9.4",
"qs": "^6.9.0",
"react": "^16.8.6",
"react-amap": "^1.2.8",
...
...
@@ -28657,6 +28658,12 @@
"integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==",
"license": "MIT"
},
"node_modules/pubsub-js": {
"version": "1.9.4",
"resolved": "http://npmprivate.quantgroups.com/pubsub-js/-/pubsub-js-1.9.4.tgz",
"integrity": "sha512-hJYpaDvPH4w8ZX/0Fdf9ma1AwRgU353GfbaVfPjfJQf1KxZ2iHaHl3fAUw1qlJIR5dr4F3RzjGaWohYUEyoh7A==",
"license": "MIT"
},
"node_modules/pump": {
"version": "3.0.0",
"resolved": "http://npmprivate.quantgroups.com/pump/-/pump-3.0.0.tgz",
...
...
@@ -59293,6 +59300,11 @@
}
}
},
"pubsub-js": {
"version": "1.9.4",
"resolved": "http://npmprivate.quantgroups.com/pubsub-js/-/pubsub-js-1.9.4.tgz",
"integrity": "sha512-hJYpaDvPH4w8ZX/0Fdf9ma1AwRgU353GfbaVfPjfJQf1KxZ2iHaHl3fAUw1qlJIR5dr4F3RzjGaWohYUEyoh7A=="
},
"pump": {
"version": "3.0.0",
"resolved": "http://npmprivate.quantgroups.com/pump/-/pump-3.0.0.tgz",
package.json
View file @
bf0c1fc1
...
...
@@ -67,6 +67,7 @@
"
moment
"
:
"
^2.24.0
"
,
"
omit.js
"
:
"
^1.0.2
"
,
"
path-to-regexp
"
:
"
^3.1.0
"
,
"
pubsub-js
"
:
"
^1.9.4
"
,
"
qs
"
:
"
^6.9.0
"
,
"
react
"
:
"
^16.8.6
"
,
"
react-amap
"
:
"
^1.2.8
"
,
...
...
src/pages/GoodsManage/Takeaway/components/StockModal.jsx
View file @
bf0c1fc1
...
...
@@ -49,6 +49,7 @@ const StockModal = options => {
productStock
:
info
.
stock
,
autoStock
:
info
.
autoStock
===
1
,
});
setMaxStock
(
info
.
autoStockStep
);
setIsChecked
(
info
.
autoStock
===
1
);
}
};
...
...
@@ -83,7 +84,7 @@ const StockModal = options => {
},
[
options
.
visible
]);
const
maxStockRule
=
[{
validator
:
isIntegerNotZero
,
message
:
'
请输入大于0的整数
'
}];
if
(
isChecked
)
{
if
(
isChecked
||
stockType
===
2
)
{
maxStockRule
.
push
({
required
:
true
,
message
:
'
请输入最大库存!
'
});
}
...
...
src/pages/GoodsManage/Takeaway/index.jsx
View file @
bf0c1fc1
import
React
,
{
useState
,
useEffect
,
useCallback
,
useMemo
}
from
'
react
'
;
import
{
Spin
,
Table
,
Pagination
,
message
,
notification
}
from
'
antd
'
;
import
{
unstable_batchedUpdates
}
from
'
react-dom
'
;
import
{
MenuOutlined
,
HolderOutlined
,
FormOutlined
,
CloseCircleOutlined
}
from
'
@ant-design/icons
'
;
import
{
SortableContainer
,
SortableElement
,
SortableHandle
}
from
'
react-sortable-hoc
'
;
import
{
arrayMoveImmutable
}
from
'
array-move
'
;
import
{
GOOD_MANAGE
}
from
'
@/../config/permission.config
'
;
import
PubSub
from
'
pubsub-js
'
;
import
GoodsGroup
from
'
./components/GoodsGroup
'
;
import
{
apiTakeawayGoods
,
...
...
@@ -37,19 +37,20 @@ const Takeaway = options => {
const
[
visibleBuy
,
setVisibleBuy
]
=
useState
(
false
);
const
[
visibleSend
,
setVisibleSend
]
=
useState
(
false
);
const
[
visibleSwitchGroup
,
setVisibleSwitchGroup
]
=
useState
(
false
);
const
[
scribeToken
,
setScribeToken
]
=
useState
(
''
);
const
rowSelection
=
{
selectedRowKeys
,
onChange
:
setSelectedRowKeys
,
};
const
getDataList
=
async
(
page
=
pageNo
,
size
=
pageSize
)
=>
{
const
getDataList
=
async
(
page
=
pageNo
,
size
=
pageSize
,
storageRackId
=
groupId
)
=>
{
setLoading
(
true
);
const
params
=
Object
.
assign
({},
options
.
searchValue
,
{
pageNo
:
page
||
pageNo
,
productType
:
5
,
pageSize
:
size
||
pageSize
,
storageRackId
:
groupId
,
storageRackId
,
});
const
productCategoryId
=
options
.
searchValue
?.
productCategoryId
||
[];
params
.
productCategoryId
=
...
...
@@ -181,6 +182,18 @@ const Takeaway = options => {
}
},
[
groupId
,
options
.
refresh
]);
useEffect
(()
=>
{
const
stoken
=
PubSub
.
subscribe
(
'
refreshTakeAway
'
,
(
_
,
data
)
=>
{
setShopId
(
data
.
shopId
);
setGroupId
(
data
.
groupId
);
getDataList
(
0
,
pageSize
,
data
.
groupId
);
});
setScribeToken
(
stoken
);
return
()
=>
{
PubSub
.
unsubscribe
(
scribeToken
);
};
},
[]);
const
actions
=
{
onShowStockModal
,
toTop
,
...
...
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