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
0dee35f8
Commit
0dee35f8
authored
Mar 27, 2023
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改分组
parent
31551664
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
233 additions
and
75 deletions
+233
-75
env.config.js
config/env.config.js
+1
-1
index.jsx
src/pages/GoodsManage/SearchForm/index.jsx
+1
-0
DragTag.jsx
src/pages/GoodsManage/Takeaway/components/DragTag.jsx
+8
-10
GoodsGroup.jsx
src/pages/GoodsManage/Takeaway/components/GoodsGroup.jsx
+108
-47
GroupInfo.jsx
src/pages/GoodsManage/Takeaway/components/GroupInfo.jsx
+28
-3
InsertTag.jsx
src/pages/GoodsManage/Takeaway/components/InsertTag.jsx
+1
-1
index.jsx
src/pages/GoodsManage/Takeaway/index.jsx
+10
-3
index.jsx
src/pages/GoodsManage/index.jsx
+2
-1
service.js
src/pages/GoodsManage/service.js
+65
-0
staticdata.js
src/pages/GoodsManage/staticdata.js
+9
-9
No files found.
config/env.config.js
View file @
0dee35f8
const
isProduction
=
process
.
env
.
NODE_ENV
===
'
production
'
;
const
isProduction
=
process
.
env
.
NODE_ENV
===
'
production
'
;
const
isPre
=
process
.
env
.
PRE_ENV
===
'
pre
'
;
const
isPre
=
process
.
env
.
PRE_ENV
===
'
pre
'
;
const
environment
=
'
xyqb
'
;
const
environment
=
'
sc1
'
;
const
envAPi
=
{
const
envAPi
=
{
api
:
`https://security-
${
environment
}
.liangkebang.net`
,
//'https://security-xyqb.liangkebang.net',
api
:
`https://security-
${
environment
}
.liangkebang.net`
,
//'https://security-xyqb.liangkebang.net',
kdspOpApi
:
`https://sc-merchant-api-
${
environment
}
.liangkebang.net`
,
kdspOpApi
:
`https://sc-merchant-api-
${
environment
}
.liangkebang.net`
,
...
...
src/pages/GoodsManage/SearchForm/index.jsx
View file @
0dee35f8
...
@@ -143,6 +143,7 @@ class goodsManage extends Component {
...
@@ -143,6 +143,7 @@ class goodsManage extends Component {
<
Form
<
Form
ref=
{
this
.
formRef
}
ref=
{
this
.
formRef
}
name=
"horizontal_login"
name=
"horizontal_login"
initialValues=
{
{
productType
:
1
}
}
layout=
"inline"
layout=
"inline"
className=
{
styles
.
searchForm
}
className=
{
styles
.
searchForm
}
>
>
...
...
src/pages/GoodsManage/Takeaway/components/DragTag.jsx
View file @
0dee35f8
...
@@ -7,20 +7,13 @@ import styles from '../../style.less';
...
@@ -7,20 +7,13 @@ import styles from '../../style.less';
const
ItemTypes
=
{
const
ItemTypes
=
{
CARD
:
'
card
'
,
CARD
:
'
card
'
,
};
};
const
DragTag
=
({
text
,
id
,
index
,
changePosition
})
=>
{
const
DragTag
=
({
text
,
id
,
index
,
changePosition
,
endChangePosition
,
edit
})
=>
{
const
[
isEdit
,
setIsEdit
]
=
useState
(
false
);
const
[
isEdit
,
setIsEdit
]
=
useState
(
false
);
const
[
inputValue
,
setInputValue
]
=
useState
(
''
);
const
[
inputValue
,
setInputValue
]
=
useState
(
''
);
const
refInput
=
useRef
();
const
refInput
=
useRef
();
const
handleEdit
=
()
=>
{
const
handleEdit
=
()
=>
{
setIsEdit
(
true
);
edit
(
id
);
setInputValue
(
text
||
''
);
const
timer
=
setTimeout
(()
=>
{
if
(
refInput
.
current
)
{
refInput
.
current
.
focus
();
}
clearTimeout
(
timer
);
},
1
);
};
};
const
handleInputChange
=
e
=>
{
const
handleInputChange
=
e
=>
{
setInputValue
(
e
.
target
.
value
);
setInputValue
(
e
.
target
.
value
);
...
@@ -46,7 +39,12 @@ const DragTag = ({ text, id, index, changePosition }) => {
...
@@ -46,7 +39,12 @@ const DragTag = ({ text, id, index, changePosition }) => {
changePosition
(
dragIndex
,
hoverIndex
);
// 调用传入的方法完成交换
changePosition
(
dragIndex
,
hoverIndex
);
// 调用传入的方法完成交换
item
.
index
=
hoverIndex
;
// 将当前当前移动到Box的index赋值给当前拖动的box,不然会出现两个盒子疯狂抖动!
item
.
index
=
hoverIndex
;
// 将当前当前移动到Box的index赋值给当前拖动的box,不然会出现两个盒子疯狂抖动!
},
},
drop
:
(
item
,
monitor
)
=>
{},
drop
:
(
item
,
monitor
)
=>
{
const
dragIndex
=
item
.
index
;
const
hoverIndex
=
index
;
if
(
dragIndex
===
hoverIndex
)
return
;
// 如果回到自己的坑,那就什么都不做
endChangePosition
(
dragIndex
,
hoverIndex
);
// 调用传入的方法完成交换
},
});
});
const
[{
isDragging
},
drag
]
=
useDrag
({
const
[{
isDragging
},
drag
]
=
useDrag
({
...
...
src/pages/GoodsManage/Takeaway/components/GoodsGroup.jsx
View file @
0dee35f8
import
React
,
{
useState
}
from
'
react
'
;
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
{
Button
,
Select
,
Tag
}
from
'
antd
'
;
import
{
Button
,
Select
,
Tag
}
from
'
antd
'
;
import
{
DndProvider
}
from
'
react-dnd
'
;
import
{
DndProvider
}
from
'
react-dnd
'
;
import
HTML5Backend
from
'
react-dnd-html5-backend
'
;
import
HTML5Backend
from
'
react-dnd-html5-backend
'
;
...
@@ -6,42 +6,60 @@ import styles from '../../style.less';
...
@@ -6,42 +6,60 @@ import styles from '../../style.less';
import
DragTag
from
'
./DragTag
'
;
import
DragTag
from
'
./DragTag
'
;
import
InsertTag
from
'
./InsertTag
'
;
import
InsertTag
from
'
./InsertTag
'
;
import
GroupInfo
from
'
./GroupInfo
'
;
import
GroupInfo
from
'
./GroupInfo
'
;
import
{
apiDelStorage
,
apiSortStorage
,
apiStorageList
,
apiSupplierShopList
,
apiStorageInfo
,
}
from
'
../../service
'
;
const
GoodsGroup
=
options
=>
{
const
GoodsGroup
=
options
=>
{
const
[
groupEdit
,
setGroupEdit
]
=
useState
(
false
);
const
[
groupEdit
,
setGroupEdit
]
=
useState
(
false
);
const
[
selected
,
setSelected
]
=
useState
(
0
);
const
[
selected
,
setSelected
]
=
useState
(
0
);
const
[
storageId
,
setStorageId
]
=
useState
(
0
);
const
[
isModalOpen
,
setIsModalOpen
]
=
useState
(
false
);
const
[
isModalOpen
,
setIsModalOpen
]
=
useState
(
false
);
const
[
shops
,
setShops
]
=
useState
([]);
const
[
shops
,
setShops
]
=
useState
([]);
const
[
tags
,
setTags
]
=
useState
([]);
const
[
tags
,
setTags
]
=
useState
([
const
getShopList
=
async
()
=>
{
{
const
user
=
localStorage
.
getItem
(
'
user
'
);
id
:
0
,
const
json
=
JSON
.
parse
(
user
);
text
:
'
000
'
,
const
res
=
await
apiSupplierShopList
(
json
.
id
);
},
if
(
res
&&
res
.
data
&&
res
.
data
.
length
>
0
)
{
{
setShops
(
id
:
1
,
res
.
data
.
map
(
item
=>
({
text
:
'
111
'
,
label
:
item
.
name
,
},
value
:
+
item
.
id
,
{
})),
id
:
2
,
);
text
:
'
000
'
,
options
.
changeShop
(
+
res
.
data
[
0
].
id
);
},
}
{
};
id
:
3
,
text
:
'
111
'
,
const
getGroupList
=
async
()
=>
{
},
const
res
=
await
apiStorageList
({
{
shopId
:
options
.
shopId
,
id
:
4
,
});
text
:
'
000
'
,
if
(
res
&&
res
.
data
&&
res
.
data
.
length
>
0
)
{
},
const
arr
=
res
.
data
{
.
sort
((
x
,
y
)
=>
x
.
priority
-
y
.
priority
)
id
:
5
,
.
map
(
item
=>
({
text
:
'
111
'
,
text
:
item
.
name
,
},
id
:
item
.
rackId
,
]);
}));
setTags
(
arr
);
setSelected
(
res
.
data
[
0
].
rackId
);
}
};
const
handelEdit
=
async
id
=>
{
setStorageId
(
id
||
0
);
setIsModalOpen
(
true
);
};
// 更换位置
// 更换位置
const
changePosition
=
(
dragIndex
,
hoverIndex
)
=>
{
const
changePosition
=
async
(
dragIndex
,
hoverIndex
)
=>
{
const
data
=
tags
.
slice
();
const
data
=
tags
.
slice
();
const
temp
=
data
[
dragIndex
];
const
temp
=
data
[
dragIndex
];
// 交换位置
// 交换位置
...
@@ -49,21 +67,58 @@ const GoodsGroup = options => {
...
@@ -49,21 +67,58 @@ const GoodsGroup = options => {
data
[
hoverIndex
]
=
temp
;
data
[
hoverIndex
]
=
temp
;
setTags
(
data
);
setTags
(
data
);
};
};
const
endChangePosition
=
async
(
dragIndex
,
hoverIndex
)
=>
{
const
data
=
tags
.
slice
();
const
temp
=
data
[
dragIndex
];
// 交换位置
data
[
dragIndex
]
=
data
[
hoverIndex
];
data
[
hoverIndex
]
=
temp
;
const
storageRankList
=
data
.
map
((
item
,
i
)
=>
({
id
:
item
.
id
,
priority
:
i
+
1
,
}));
const
params
=
{
shopId
:
options
.
shopId
,
storageRankList
,
};
await
apiSortStorage
(
params
);
getGroupList
();
};
const
onSelect
=
i
=>
{
setSelected
(
i
);
};
useEffect
(()
=>
{
if
(
options
.
shopId
)
{
getGroupList
();
}
},
[
options
.
shopId
]);
useEffect
(()
=>
{
getShopList
();
},
[]);
useEffect
(()
=>
{
options
.
changeGroup
(
selected
);
},
[
selected
]);
return
(
return
(
<
div
className=
{
styles
.
groupBox
}
>
<
div
className=
{
styles
.
groupBox
}
>
<
div
className=
{
styles
[
'
groupBox-title
'
]
}
>
{
(
shops
&&
shops
.
length
&&
(
<
div
className=
{
styles
[
'
groupBox-title--name
'
]
}
>
所属门店
</
div
>
<
div
className=
{
styles
[
'
groupBox-title
'
]
}
>
<
Select
<
div
className=
{
styles
[
'
groupBox-title--name
'
]
}
>
所属门店
</
div
>
showSearch
<
Select
placeholder=
"请选择所属门店"
showSearch
onChange=
{
options
.
changeShop
}
value=
{
options
.
shopId
}
filterOption=
{
(
input
,
option
)
=>
placeholder=
"请选择所属门店"
(
option
?.
label
??
''
).
toLowerCase
().
includes
(
input
.
toLowerCase
())
onChange=
{
options
.
changeShop
}
}
filterOption=
{
(
input
,
option
)
=>
options=
{
shops
}
(
option
?.
label
??
''
).
toLowerCase
().
includes
(
input
.
toLowerCase
())
/>
}
</
div
>
options=
{
shops
}
/>
</
div
>
))
||
''
}
<
div
className=
{
styles
[
'
groupBox-title
'
]
}
>
<
div
className=
{
styles
[
'
groupBox-title
'
]
}
>
<
div
className=
{
styles
[
'
groupBox-title--name
'
]
}
>
商品分组
</
div
>
<
div
className=
{
styles
[
'
groupBox-title--name
'
]
}
>
商品分组
</
div
>
<
Button
onClick=
{
()
=>
setGroupEdit
(
!
groupEdit
)
}
>
{
groupEdit
?
'
完成
'
:
'
编辑分组
'
}
</
Button
>
<
Button
onClick=
{
()
=>
setGroupEdit
(
!
groupEdit
)
}
>
{
groupEdit
?
'
完成
'
:
'
编辑分组
'
}
</
Button
>
...
@@ -75,35 +130,41 @@ const GoodsGroup = options => {
...
@@ -75,35 +130,41 @@ const GoodsGroup = options => {
{
tags
.
map
((
item
,
index
)
=>
(
{
tags
.
map
((
item
,
index
)
=>
(
<
DragTag
<
DragTag
changePosition=
{
changePosition
}
changePosition=
{
changePosition
}
endChangePosition=
{
endChangePosition
}
index=
{
index
}
index=
{
index
}
{
...
item
}
{
...
item
}
selected=
{
selected
}
selected=
{
selected
}
changeGroup=
{
e
=>
setSelected
(
e
)
}
edit=
{
handelEdit
}
key=
{
item
.
id
}
key=
{
item
.
id
}
/>
/>
))
}
))
}
<
InsertTag
handleOpen=
{
setIsModalOpen
}
/>
<
InsertTag
handleOpen=
{
handelEdit
}
/>
</
div
>
</
div
>
</
DndProvider
>
</
DndProvider
>
)
:
(
)
:
(
<
div
className=
{
styles
[
'
groupBox-body--dragbox
'
]
}
>
<
div
className=
{
styles
[
'
groupBox-body--dragbox
'
]
}
>
{
tags
.
map
(
(
item
,
index
)
=>
(
{
tags
.
map
(
item
=>
(
<
Tag
<
Tag
key=
{
item
.
id
}
key=
{
item
.
id
}
onClick=
{
()
=>
setSelected
(
index
)
}
onClick=
{
()
=>
onSelect
(
item
.
id
)
}
className=
{
[
className=
{
[
styles
[
'
groupBox-body--tag-normal
'
],
styles
[
'
groupBox-body--tag-normal
'
],
selected
===
i
ndex
?
styles
[
'
groupBox-body--tag__cur
'
]
:
''
,
selected
===
i
tem
.
id
?
styles
[
'
groupBox-body--tag__cur
'
]
:
''
,
]
}
]
}
>
>
<
span
className=
{
styles
[
'
groupBox-body--tag__text
'
]
}
>
{
item
.
text
}
</
span
>
<
span
className=
{
styles
[
'
groupBox-body--tag__text
'
]
}
>
{
item
.
text
}
</
span
>
</
Tag
>
</
Tag
>
))
}
))
}
<
InsertTag
handleOpen=
{
setIsModalOpen
}
/>
<
InsertTag
key=
"insert"
handleOpen=
{
setIsModalOpen
}
/>
</
div
>
</
div
>
)
}
)
}
</
div
>
</
div
>
<
GroupInfo
isModalOpen=
{
isModalOpen
}
handleClose=
{
setIsModalOpen
}
/>
<
GroupInfo
isModalOpen=
{
isModalOpen
}
id=
{
storageId
}
shopId=
{
options
.
shopId
}
handleClose=
{
setIsModalOpen
}
/>
</
div
>
</
div
>
);
);
};
};
...
...
src/pages/GoodsManage/Takeaway/components/GroupInfo.jsx
View file @
0dee35f8
import
React
from
'
react
'
;
import
React
,
{
useEffect
}
from
'
react
'
;
import
{
Form
,
Modal
,
Input
,
Checkbox
,
Alert
}
from
'
antd
'
;
import
{
Form
,
Modal
,
Input
,
Checkbox
,
Alert
,
message
}
from
'
antd
'
;
import
{
apiCreateStorage
,
apiEditStorage
,
apiStorageInfo
}
from
'
../../service
'
;
const
GroupInfo
=
options
=>
{
const
GroupInfo
=
options
=>
{
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
...
@@ -12,10 +13,34 @@ const GroupInfo = options => {
...
@@ -12,10 +13,34 @@ const GroupInfo = options => {
// 提交分组
// 提交分组
const
handleConfirm
=
async
()
=>
{
const
handleConfirm
=
async
()
=>
{
const
values
=
await
form
.
validateFields
();
const
values
=
await
form
.
validateFields
();
console
.
log
(
'
values :>>
'
,
values
);
const
api
=
options
.
id
?
apiEditStorage
:
apiCreateStorage
;
const
res
=
await
api
({
...
values
,
shopId
:
options
.
shopId
,
id
:
options
.
id
,
});
handleCancel
();
handleCancel
();
options
.
search
();
};
};
const
getInfo
=
async
id
=>
{
const
res
=
await
apiStorageInfo
({
shopId
:
options
.
shopId
,
id
,
});
if
(
res
&&
res
.
data
&&
res
.
data
.
id
)
{
form
.
setFieldsValue
({
name
:
res
.
data
.
name
,
});
}
};
useEffect
(()
=>
{
if
(
options
.
id
&&
options
.
isModalOpen
)
{
getInfo
(
options
.
id
);
}
},
[
options
.
id
,
options
.
isModalOpen
]);
const
extra
=
(
const
extra
=
(
<
Alert
<
Alert
message=
"选中后,顾客下单需至少选择1个“下单必选分组”商品每店仅可设置1个必点分组"
message=
"选中后,顾客下单需至少选择1个“下单必选分组”商品每店仅可设置1个必点分组"
...
...
src/pages/GoodsManage/Takeaway/components/InsertTag.jsx
View file @
0dee35f8
...
@@ -5,7 +5,7 @@ import styles from '../../style.less';
...
@@ -5,7 +5,7 @@ import styles from '../../style.less';
const
InsertTag
=
options
=>
{
const
InsertTag
=
options
=>
{
const
showInput
=
()
=>
{
const
showInput
=
()
=>
{
options
.
handleOpen
(
true
);
options
.
handleOpen
();
};
};
return
(
return
(
...
...
src/pages/GoodsManage/Takeaway/index.jsx
View file @
0dee35f8
...
@@ -4,7 +4,7 @@ import { MenuOutlined, HolderOutlined, FormOutlined, CloseCircleOutlined } from
...
@@ -4,7 +4,7 @@ import { MenuOutlined, HolderOutlined, FormOutlined, CloseCircleOutlined } from
import
{
SortableContainer
,
SortableElement
,
SortableHandle
}
from
'
react-sortable-hoc
'
;
import
{
SortableContainer
,
SortableElement
,
SortableHandle
}
from
'
react-sortable-hoc
'
;
import
{
arrayMoveImmutable
}
from
'
array-move
'
;
import
{
arrayMoveImmutable
}
from
'
array-move
'
;
import
GoodsGroup
from
'
./components/GoodsGroup
'
;
import
GoodsGroup
from
'
./components/GoodsGroup
'
;
import
{
searchList
,
apiGoodsActionBatch
}
from
'
../service
'
;
import
{
apiTakeawayGoods
,
apiGoodsActionBatch
}
from
'
../service
'
;
import
styles
from
'
../style.less
'
;
import
styles
from
'
../style.less
'
;
import
{
takeawayColumn
}
from
'
../staticdata
'
;
import
{
takeawayColumn
}
from
'
../staticdata
'
;
// import VirtualTable from './components/VirtualTable';
// import VirtualTable from './components/VirtualTable';
...
@@ -19,6 +19,7 @@ const Takeaway = options => {
...
@@ -19,6 +19,7 @@ const Takeaway = options => {
const
[
tableData
,
setTableData
]
=
useState
([]);
const
[
tableData
,
setTableData
]
=
useState
([]);
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
([]);
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
([]);
const
[
shopId
,
setShopId
]
=
useState
(
0
);
const
[
shopId
,
setShopId
]
=
useState
(
0
);
const
[
groupId
,
setGroupId
]
=
useState
(
0
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
actionLoading
,
setActionLoading
]
=
useState
(
false
);
const
[
actionLoading
,
setActionLoading
]
=
useState
(
false
);
const
[
visibleWeekTime
,
setVisibleWeekTime
]
=
useState
(
false
);
const
[
visibleWeekTime
,
setVisibleWeekTime
]
=
useState
(
false
);
...
@@ -60,7 +61,13 @@ const Takeaway = options => {
...
@@ -60,7 +61,13 @@ const Takeaway = options => {
const
getDataList
=
async
()
=>
{
const
getDataList
=
async
()
=>
{
setLoading
(
true
);
setLoading
(
true
);
const
res
=
await
searchList
({
productType
:
1
});
const
params
=
{
pageNo
:
1
,
productType
:
5
,
pageSize
:
100000
,
storageRackId
:
groupId
,
};
const
res
=
await
apiTakeawayGoods
(
params
);
setLoading
(
false
);
setLoading
(
false
);
if
(
res
&&
res
.
data
)
{
if
(
res
&&
res
.
data
)
{
setTableData
(
res
.
data
.
records
);
setTableData
(
res
.
data
.
records
);
...
@@ -117,7 +124,7 @@ const Takeaway = options => {
...
@@ -117,7 +124,7 @@ const Takeaway = options => {
return
(
return
(
<
div
className=
{
styles
.
takeawayBox
}
>
<
div
className=
{
styles
.
takeawayBox
}
>
<
Spin
spinning=
{
loading
}
>
<
Spin
spinning=
{
loading
}
>
<
GoodsGroup
changeShop=
{
setSho
pId
}
/>
<
GoodsGroup
shopId=
{
shopId
}
changeShop=
{
setShopId
}
changeGroup=
{
setGrou
pId
}
/>
<
ActionBar
<
ActionBar
selectedRowKeys=
{
selectedRowKeys
}
selectedRowKeys=
{
selectedRowKeys
}
handleSearch=
{
getDataList
}
handleSearch=
{
getDataList
}
...
...
src/pages/GoodsManage/index.jsx
View file @
0dee35f8
...
@@ -61,7 +61,7 @@ class goodsManage extends Component {
...
@@ -61,7 +61,7 @@ class goodsManage extends Component {
auditRow
:
{},
// 查看审核信息使用
auditRow
:
{},
// 查看审核信息使用
isVisibleDraft
:
false
,
// 显示隐藏草稿箱
isVisibleDraft
:
false
,
// 显示隐藏草稿箱
isEditDraft
:
false
,
// 是否编辑草稿
isEditDraft
:
false
,
// 是否编辑草稿
productType
:
5
,
// 商品类型
productType
:
1
,
// 商品类型
};
};
currentLog
=
null
;
currentLog
=
null
;
...
@@ -77,6 +77,7 @@ class goodsManage extends Component {
...
@@ -77,6 +77,7 @@ class goodsManage extends Component {
this
.
categoryList
();
this
.
categoryList
();
this
.
getVirtualCategory
();
this
.
getVirtualCategory
();
this
.
specList
();
this
.
specList
();
this
.
setState
({
productType
:
5
});
}
}
handleSearch
=
page
=>
{
handleSearch
=
page
=>
{
...
...
src/pages/GoodsManage/service.js
View file @
0dee35f8
...
@@ -297,3 +297,68 @@ export async function apiGoodsActionBatch(data) {
...
@@ -297,3 +297,68 @@ export async function apiGoodsActionBatch(data) {
data
,
data
,
});
});
}
}
// 外卖商品列表
export
async
function
apiTakeawayGoods
(
params
)
{
return
request
.
post
(
'
/product/api/merchant/page
'
,
{
prefix
:
goodsApi
,
data
:
stringify
(
params
),
headers
,
});
}
// 外卖商品排序
export
async
function
apiSortTakeawayGoods
(
data
)
{
return
request
.
post
(
'
/v1/channels/products/sku/batchSort
'
,
{
prefix
:
goodsApi
,
data
,
});
}
// 获取供应商门店列表
export
async
function
apiSupplierShopList
()
{
return
request
.
get
(
'
/api/merchants/shops/getBySupplierId?state=1
'
,
{
prefix
:
goodsApi
,
});
}
// 分组创建(货架—创建货架)
export
async
function
apiCreateStorage
(
data
)
{
return
request
.
post
(
'
/api/merchants/products/storageRack/create
'
,
{
prefix
:
goodsApi
,
data
,
});
}
// 编辑分组(货架—编辑货架)
export
async
function
apiEditStorage
(
data
)
{
return
request
.
post
(
'
/api/merchants/products/storageRack/edit
'
,
{
prefix
:
goodsApi
,
data
,
});
}
// 分组详情(货架—货架详情)
export
async
function
apiStorageInfo
(
params
)
{
return
request
.
post
(
'
/api/merchants/products/storageRack/queryByShopIdAndStorageRackId
'
,
{
prefix
:
goodsApi
,
data
:
stringify
(
params
),
headers
,
});
}
// 删除分组(货架—删除货架)
export
async
function
apiDelStorage
(
data
)
{
return
request
.
post
(
'
/api/merchants/products/storageRack/removeByShopIdAndId
'
,
{
prefix
:
goodsApi
,
data
,
});
}
// 分组排序(货架—排序货架)
export
async
function
apiSortStorage
(
data
)
{
return
request
.
post
(
'
/api/merchants/products/storageRack/batchSort
'
,
{
prefix
:
goodsApi
,
data
,
});
}
// 分组列表(货架—货架列表)
export
async
function
apiStorageList
(
params
)
{
return
request
.
post
(
'
/api/merchants/products/storageRack/listByShopIdAndStorageRackIds
'
,
{
prefix
:
goodsApi
,
data
:
stringify
(
params
),
headers
,
});
}
src/pages/GoodsManage/staticdata.js
View file @
0dee35f8
...
@@ -399,15 +399,15 @@ export const batchAction = event => [
...
@@ -399,15 +399,15 @@ export const batchAction = event => [
<
/a
>
<
/a
>
),
),
},
},
{
//
{
key
:
'
group
'
,
//
key: 'group',
type
:
'
3
'
,
//
type: '3',
label
:
(
//
label: (
<
a
type
=
"
text
"
onClick
=
{()
=>
event
.
onChangeState
(
'
group
'
)}
>
//
<a type="text" onClick={() => event.onChangeState('group')}>
修改分组
//
修改分组
<
/a
>
//
</a>
),
//
),
},
//
},
{
{
key
:
'
send
'
,
key
:
'
send
'
,
type
:
'
6
'
,
type
:
'
6
'
,
...
...
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