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
6734be6f
Commit
6734be6f
authored
Apr 13, 2023
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改拍戏问题
parent
0ff0fd32
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
15 deletions
+28
-15
index.jsx
src/pages/GoodsManage/Takeaway/index.jsx
+17
-14
service.js
src/pages/GoodsManage/service.js
+11
-1
No files found.
src/pages/GoodsManage/Takeaway/index.jsx
View file @
6734be6f
...
@@ -74,20 +74,23 @@ const Takeaway = options => {
...
@@ -74,20 +74,23 @@ const Takeaway = options => {
const
onSortEnd
=
async
({
oldIndex
,
newIndex
})
=>
{
const
onSortEnd
=
async
({
oldIndex
,
newIndex
})
=>
{
if
(
oldIndex
!==
newIndex
)
{
if
(
oldIndex
!==
newIndex
)
{
const
newData
=
arrayMoveImmutable
(
tableData
.
slice
(),
oldIndex
,
newIndex
).
filter
(
el
=>
!!
el
);
const
sourceGoods
=
tableData
[
oldIndex
];
const
skuSorts
=
newData
.
map
((
item
,
index
)
=>
({
const
targetGoods
=
tableData
[
newIndex
];
skuId
:
item
.
skuId
,
// const newData = arrayMoveImmutable(tableData.slice(), oldIndex, newIndex).filter(el => !!el);
sort
:
pageSize
*
(
pageNo
-
1
)
+
index
+
1
,
// const skuSorts = newData.map((item, index) => ({
}));
// skuId: item.skuId,
const
params
=
{
// sort: pageSize * (pageNo - 1) + index + 1,
storageRackId
:
groupId
,
// }));
type
:
1
,
if
(
sourceGoods
&&
sourceGoods
.
skuId
&&
targetGoods
&&
targetGoods
.
skuId
)
{
shopId
,
const
params
=
{
skuSorts
,
storageRackId
:
groupId
,
};
shopId
,
await
apiSortTakeawayGoods
(
params
);
sourceSkuId
:
sourceGoods
.
skuId
,
getDataList
(
pageNo
,
pageSize
);
targetSkuId
:
targetGoods
.
skuId
,
// setTableData(newData);
};
await
apiSortTakeawayGoods
(
params
);
getDataList
(
pageNo
,
pageSize
);
}
}
}
};
};
...
...
src/pages/GoodsManage/service.js
View file @
6734be6f
...
@@ -306,8 +306,18 @@ export async function apiTakeawayGoods(params) {
...
@@ -306,8 +306,18 @@ export async function apiTakeawayGoods(params) {
});
});
}
}
// 外卖商品排序
// 外卖商品排序
// export async function apiSortTakeawayGoods(data) {
// return request.post('/api/merchants/products/sku/batchSort', {
// prefix: goodsApi,
// data,
// });
// }
/**
* 外卖商品排序
* yapi: http://yapi.quantgroups.com/project/389/interface/api/58174
*/
export
async
function
apiSortTakeawayGoods
(
data
)
{
export
async
function
apiSortTakeawayGoods
(
data
)
{
return
request
.
post
(
'
/api/merchants/products/sku/
batchS
ort
'
,
{
return
request
.
post
(
'
/api/merchants/products/sku/
range/s
ort
'
,
{
prefix
:
goodsApi
,
prefix
:
goodsApi
,
data
,
data
,
});
});
...
...
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