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
06a12267
Commit
06a12267
authored
Mar 27, 2023
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加分组接口
parent
0dee35f8
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
119 additions
and
63 deletions
+119
-63
index.jsx
src/pages/GoodsManage/SearchForm/index.jsx
+1
-1
ActionBar.jsx
src/pages/GoodsManage/Takeaway/components/ActionBar.jsx
+1
-1
DragTag.jsx
src/pages/GoodsManage/Takeaway/components/DragTag.jsx
+6
-4
GoodsGroup.jsx
src/pages/GoodsManage/Takeaway/components/GoodsGroup.jsx
+14
-11
GroupInfo.jsx
src/pages/GoodsManage/Takeaway/components/GroupInfo.jsx
+20
-8
WeekTime.jsx
src/pages/GoodsManage/Takeaway/components/WeekTime.jsx
+1
-1
index.jsx
src/pages/GoodsManage/Takeaway/index.jsx
+57
-30
index.jsx
src/pages/GoodsManage/index.jsx
+12
-1
service.js
src/pages/GoodsManage/service.js
+5
-4
staticdata.js
src/pages/GoodsManage/staticdata.js
+2
-2
No files found.
src/pages/GoodsManage/SearchForm/index.jsx
View file @
06a12267
...
@@ -148,7 +148,7 @@ class goodsManage extends Component {
...
@@ -148,7 +148,7 @@ class goodsManage extends Component {
className=
{
styles
.
searchForm
}
className=
{
styles
.
searchForm
}
>
>
<
FormItem
label=
"SKU编码"
name=
"skuId"
>
<
FormItem
label=
"SKU编码"
name=
"skuId"
>
<
InputNumber
placeholder=
"请输入SKU编码"
allowClear
style=
{
selectW
}
/>
<
InputNumber
placeholder=
"请输入SKU编码"
style=
{
selectW
}
/>
</
FormItem
>
</
FormItem
>
<
FormItem
label=
"商品名称"
name=
"skuName"
>
<
FormItem
label=
"商品名称"
name=
"skuName"
>
<
Input
placeholder=
"请输入商品名称"
allowClear
style=
{
selectW
}
/>
<
Input
placeholder=
"请输入商品名称"
allowClear
style=
{
selectW
}
/>
...
...
src/pages/GoodsManage/Takeaway/components/ActionBar.jsx
View file @
06a12267
...
@@ -61,7 +61,7 @@ const ActionBar = options => {
...
@@ -61,7 +61,7 @@ const ActionBar = options => {
return
(
return
(
<
div
className=
{
styles
[
'
action-bar-box
'
]
}
>
<
div
className=
{
styles
[
'
action-bar-box
'
]
}
>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
options
.
newGoods
}
>
该分组下新增商品
该分组下新增商品
</
Button
>
</
Button
>
<
Dropdown
overlay=
{
menus
}
className=
{
styles
[
'
action-bar-box--down
'
]
}
placement=
"bottomLeft"
>
<
Dropdown
overlay=
{
menus
}
className=
{
styles
[
'
action-bar-box--down
'
]
}
placement=
"bottomLeft"
>
...
...
src/pages/GoodsManage/Takeaway/components/DragTag.jsx
View file @
06a12267
import
React
,
{
useRef
,
useState
}
from
'
react
'
;
import
React
,
{
useRef
,
useState
}
from
'
react
'
;
import
{
useDrag
,
useDrop
}
from
'
react-dnd
'
;
import
{
useDrag
,
useDrop
}
from
'
react-dnd
'
;
import
{
Tag
,
Input
}
from
'
antd
'
;
import
{
Tag
,
Input
,
Popconfirm
}
from
'
antd
'
;
import
{
HolderOutlined
,
FormOutlined
,
CloseCircleOutlined
}
from
'
@ant-design/icons
'
;
import
{
HolderOutlined
,
FormOutlined
,
CloseCircleOutlined
}
from
'
@ant-design/icons
'
;
import
styles
from
'
../../style.less
'
;
import
styles
from
'
../../style.less
'
;
const
ItemTypes
=
{
const
ItemTypes
=
{
CARD
:
'
card
'
,
CARD
:
'
card
'
,
};
};
const
DragTag
=
({
text
,
id
,
index
,
changePosition
,
endChangePosition
,
edit
})
=>
{
const
DragTag
=
({
text
,
id
,
index
,
changePosition
,
endChangePosition
,
edit
,
del
})
=>
{
const
[
isEdit
,
setIsEdit
]
=
useState
(
false
);
const
[
isEdit
,
setIsEdit
]
=
useState
(
false
);
const
[
inputValue
,
setInputValue
]
=
useState
(
''
);
const
[
inputValue
,
setInputValue
]
=
useState
(
''
);
const
refInput
=
useRef
();
const
refInput
=
useRef
();
...
@@ -24,7 +24,7 @@ const DragTag = ({ text, id, index, changePosition, endChangePosition, edit }) =
...
@@ -24,7 +24,7 @@ const DragTag = ({ text, id, index, changePosition, endChangePosition, edit }) =
};
};
const
handleClose
=
()
=>
{
const
handleClose
=
()
=>
{
console
.
log
(
'
111 :>>
'
,
111
);
del
(
id
);
};
};
const
ref
=
useRef
(
null
);
const
ref
=
useRef
(
null
);
...
@@ -84,7 +84,9 @@ const DragTag = ({ text, id, index, changePosition, endChangePosition, edit }) =
...
@@ -84,7 +84,9 @@ const DragTag = ({ text, id, index, changePosition, endChangePosition, edit }) =
<
span
>
<
span
>
<
FormOutlined
className=
{
styles
[
'
groupBox-body--tag__edit
'
]
}
onClick=
{
handleEdit
}
/>
<
FormOutlined
className=
{
styles
[
'
groupBox-body--tag__edit
'
]
}
onClick=
{
handleEdit
}
/>
</
span
>
</
span
>
<
CloseCircleOutlined
className=
{
styles
[
'
groupBox-body--tag__close
'
]
}
onClick=
{
handleClose
}
/>
<
Popconfirm
title=
"确定删除该分组吗?"
onConfirm=
{
handleClose
}
okText=
"确定"
cancelText=
"取消"
>
<
CloseCircleOutlined
className=
{
styles
[
'
groupBox-body--tag__close
'
]
}
/>
</
Popconfirm
>
</
Tag
>
</
Tag
>
);
);
...
...
src/pages/GoodsManage/Takeaway/components/GoodsGroup.jsx
View file @
06a12267
...
@@ -6,13 +6,7 @@ import styles from '../../style.less';
...
@@ -6,13 +6,7 @@ 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
{
import
{
apiDelStorage
,
apiSortStorage
,
apiStorageList
,
apiSupplierShopList
}
from
'
../../service
'
;
apiDelStorage
,
apiSortStorage
,
apiStorageList
,
apiSupplierShopList
,
apiStorageInfo
,
}
from
'
../../service
'
;
const
GoodsGroup
=
options
=>
{
const
GoodsGroup
=
options
=>
{
const
[
groupEdit
,
setGroupEdit
]
=
useState
(
false
);
const
[
groupEdit
,
setGroupEdit
]
=
useState
(
false
);
...
@@ -53,10 +47,17 @@ const GoodsGroup = options => {
...
@@ -53,10 +47,17 @@ const GoodsGroup = options => {
}
}
};
};
const
hand
el
Edit
=
async
id
=>
{
const
hand
le
Edit
=
async
id
=>
{
setStorageId
(
id
||
0
);
setStorageId
(
id
||
0
);
setIsModalOpen
(
true
);
setIsModalOpen
(
true
);
};
};
const
handleDelete
=
async
id
=>
{
await
apiDelStorage
({
shopId
:
options
.
shopId
,
id
,
});
getGroupList
();
};
// 更换位置
// 更换位置
const
changePosition
=
async
(
dragIndex
,
hoverIndex
)
=>
{
const
changePosition
=
async
(
dragIndex
,
hoverIndex
)
=>
{
...
@@ -134,11 +135,12 @@ const GoodsGroup = options => {
...
@@ -134,11 +135,12 @@ const GoodsGroup = options => {
index=
{
index
}
index=
{
index
}
{
...
item
}
{
...
item
}
selected=
{
selected
}
selected=
{
selected
}
edit=
{
handelEdit
}
edit=
{
handleEdit
}
del=
{
handleDelete
}
key=
{
item
.
id
}
key=
{
item
.
id
}
/>
/>
))
}
))
}
<
InsertTag
handleOpen=
{
hand
el
Edit
}
/>
<
InsertTag
handleOpen=
{
hand
le
Edit
}
/>
</
div
>
</
div
>
</
DndProvider
>
</
DndProvider
>
)
:
(
)
:
(
...
@@ -155,7 +157,7 @@ const GoodsGroup = options => {
...
@@ -155,7 +157,7 @@ const GoodsGroup = options => {
<
span
className=
{
styles
[
'
groupBox-body--tag__text
'
]
}
>
{
item
.
text
}
</
span
>
<
span
className=
{
styles
[
'
groupBox-body--tag__text
'
]
}
>
{
item
.
text
}
</
span
>
</
Tag
>
</
Tag
>
))
}
))
}
<
InsertTag
key=
"insert"
handleOpen=
{
setIsModalOpen
}
/>
<
InsertTag
key=
"insert"
handleOpen=
{
handleEdit
}
/>
</
div
>
</
div
>
)
}
)
}
</
div
>
</
div
>
...
@@ -163,6 +165,7 @@ const GoodsGroup = options => {
...
@@ -163,6 +165,7 @@ const GoodsGroup = options => {
isModalOpen=
{
isModalOpen
}
isModalOpen=
{
isModalOpen
}
id=
{
storageId
}
id=
{
storageId
}
shopId=
{
options
.
shopId
}
shopId=
{
options
.
shopId
}
search=
{
getGroupList
}
handleClose=
{
setIsModalOpen
}
handleClose=
{
setIsModalOpen
}
/>
/>
</
div
>
</
div
>
...
...
src/pages/GoodsManage/Takeaway/components/GroupInfo.jsx
View file @
06a12267
import
React
,
{
useEffect
}
from
'
react
'
;
import
React
,
{
useEffect
,
useState
}
from
'
react
'
;
import
{
Form
,
Modal
,
Input
,
Checkbox
,
Alert
,
message
}
from
'
antd
'
;
import
{
Form
,
Modal
,
Input
,
Switch
,
Alert
,
message
}
from
'
antd
'
;
import
{
apiCreateStorage
,
apiEditStorage
,
apiStorageInfo
}
from
'
../../service
'
;
import
{
apiCreateStorage
,
apiEditStorage
,
apiStorageInfo
}
from
'
../../service
'
;
const
GroupInfo
=
options
=>
{
const
GroupInfo
=
options
=>
{
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
const
[
isChecked
,
setIsChecked
]
=
useState
(
false
);
// 关闭分组信息弹窗
// 关闭分组信息弹窗
const
handleCancel
=
()
=>
{
const
handleCancel
=
()
=>
{
options
.
handleClose
(
false
);
options
.
handleClose
(
false
);
};
};
//
提交
分组
//
添加/保存
分组
const
handleConfirm
=
async
()
=>
{
const
handleConfirm
=
async
()
=>
{
const
values
=
await
form
.
validateFields
();
const
{
name
,
necessary
}
=
await
form
.
validateFields
();
const
api
=
options
.
id
?
apiEditStorage
:
apiCreateStorage
;
const
api
=
options
.
id
?
apiEditStorage
:
apiCreateStorage
;
const
res
=
await
api
({
await
api
({
...
values
,
name
,
necessary
:
necessary
?
1
:
0
,
shopId
:
options
.
shopId
,
shopId
:
options
.
shopId
,
id
:
options
.
id
,
id
:
options
.
id
,
});
});
...
@@ -29,8 +31,11 @@ const GroupInfo = options => {
...
@@ -29,8 +31,11 @@ const GroupInfo = options => {
id
,
id
,
});
});
if
(
res
&&
res
.
data
&&
res
.
data
.
id
)
{
if
(
res
&&
res
.
data
&&
res
.
data
.
id
)
{
const
{
name
,
necessary
}
=
res
.
data
;
setIsChecked
(
+
necessary
===
1
);
form
.
setFieldsValue
({
form
.
setFieldsValue
({
name
:
res
.
data
.
name
,
name
,
necessary
:
+
necessary
===
1
,
});
});
}
}
};
};
...
@@ -52,6 +57,8 @@ const GroupInfo = options => {
...
@@ -52,6 +57,8 @@ const GroupInfo = options => {
<
Modal
<
Modal
title=
"分组信息"
title=
"分组信息"
visible=
{
options
.
isModalOpen
}
visible=
{
options
.
isModalOpen
}
destroyOnClose
maskClosable=
{
false
}
onOk=
{
handleConfirm
}
onOk=
{
handleConfirm
}
onCancel=
{
handleCancel
}
onCancel=
{
handleCancel
}
>
>
...
@@ -65,7 +72,12 @@ const GroupInfo = options => {
...
@@ -65,7 +72,12 @@ const GroupInfo = options => {
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
"下单必选分组"
name=
"necessary"
extra=
{
extra
}
>
<
Form
.
Item
label=
"下单必选分组"
name=
"necessary"
extra=
{
extra
}
>
<
Checkbox
/>
<
Switch
checkedChildren=
"开启"
checked=
{
isChecked
}
unCheckedChildren=
"关闭"
onChange=
{
setIsChecked
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
Form
>
</
Form
>
</
Modal
>
</
Modal
>
...
...
src/pages/GoodsManage/Takeaway/components/WeekTime.jsx
View file @
06a12267
...
@@ -31,7 +31,7 @@ const WeekTime = options => {
...
@@ -31,7 +31,7 @@ const WeekTime = options => {
setType
(
value
);
setType
(
value
);
};
};
const
radioOptions
=
[{
label
:
'
全时段
'
,
value
:
1
},
{
label
:
'
自定义售卖时间
'
,
value
:
2
}];
const
radioOptions
=
[{
label
:
'
全时段
'
,
value
:
0
},
{
label
:
'
自定义售卖时间
'
,
value
:
1
}];
const
handleCancel
=
()
=>
{
const
handleCancel
=
()
=>
{
options
.
cancel
(
false
);
options
.
cancel
(
false
);
...
...
src/pages/GoodsManage/Takeaway/index.jsx
View file @
06a12267
...
@@ -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
{
apiTakeawayGoods
,
apiGoodsActionBatch
}
from
'
../service
'
;
import
{
apiTakeawayGoods
,
apiGoodsActionBatch
,
apiSortTakeawayGoods
}
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';
...
@@ -33,10 +33,37 @@ const Takeaway = options => {
...
@@ -33,10 +33,37 @@ const Takeaway = options => {
onChange
:
setSelectedRowKeys
,
onChange
:
setSelectedRowKeys
,
};
};
const
onSortEnd
=
({
oldIndex
,
newIndex
})
=>
{
const
getDataList
=
async
()
=>
{
setLoading
(
true
);
const
params
=
{
pageNo
:
1
,
productType
:
5
,
pageSize
:
100000
,
storageRackId
:
groupId
,
};
const
res
=
await
apiTakeawayGoods
(
params
);
setLoading
(
false
);
if
(
res
&&
res
.
data
)
{
setTableData
(
res
.
data
.
records
);
}
};
const
onSortEnd
=
async
({
oldIndex
,
newIndex
})
=>
{
if
(
oldIndex
!==
newIndex
)
{
if
(
oldIndex
!==
newIndex
)
{
const
newData
=
arrayMoveImmutable
(
tableData
.
slice
(),
oldIndex
,
newIndex
).
filter
(
el
=>
!!
el
);
const
newData
=
arrayMoveImmutable
(
tableData
.
slice
(),
oldIndex
,
newIndex
).
filter
(
el
=>
!!
el
);
setTableData
(
newData
);
const
skuSorts
=
newData
.
map
((
item
,
index
)
=>
({
skuId
:
item
.
skuId
,
sort
:
index
+
1
,
}));
const
params
=
{
storageRackId
:
groupId
,
type
:
1
,
shopId
,
skuSorts
,
};
await
apiSortTakeawayGoods
(
params
);
getDataList
();
// setTableData(newData);
}
}
};
};
...
@@ -59,36 +86,21 @@ const Takeaway = options => {
...
@@ -59,36 +86,21 @@ const Takeaway = options => {
return
<
SortableItem
index=
{
index
}
{
...
restProps
}
/>;
return
<
SortableItem
index=
{
index
}
{
...
restProps
}
/>;
};
};
const
getDataList
=
async
()
=>
{
setLoading
(
true
);
const
params
=
{
pageNo
:
1
,
productType
:
5
,
pageSize
:
100000
,
storageRackId
:
groupId
,
};
const
res
=
await
apiTakeawayGoods
(
params
);
setLoading
(
false
);
if
(
res
&&
res
.
data
)
{
setTableData
(
res
.
data
.
records
);
}
};
// 批量操作 type 1-是否列出 2-修改上下架 3-改货架 4-售卖时间更新 5-调整商品起购数量 6-调整商品是否单点不送 7-修改库存
// 批量操作 type 1-是否列出 2-修改上下架 3-改货架 4-售卖时间更新 5-调整商品起购数量 6-调整商品是否单点不送 7-修改库存
const
handleBatchAction
=
async
params
=>
{
const
handleBatchAction
=
async
params
=>
{
const
json
=
{
const
json
=
{
skuIds
:
selectedRowKeys
,
skuIds
:
selectedRowKeys
,
shopId
,
shopId
,
};
};
//
setActionLoading(true);
setActionLoading
(
true
);
//
const params2 = {
const
params2
=
{
//
...json,
...
json
,
//
...params,
...
params
,
//
};
};
//
console.log('params2 :>> ', params2);
console
.
log
(
'
params2 :>>
'
,
params2
);
//
const res = await apiGoodsActionBatch(Object.assign({}, json, params));
const
res
=
await
apiGoodsActionBatch
(
Object
.
assign
({},
json
,
params
));
//
setActionLoading(false);
setActionLoading
(
false
);
//
getDataList();
getDataList
();
message
.
success
(
'
处理成功!
'
);
message
.
success
(
'
处理成功!
'
);
};
};
...
@@ -107,13 +119,27 @@ const Takeaway = options => {
...
@@ -107,13 +119,27 @@ const Takeaway = options => {
openModal
(
'
stock
'
);
openModal
(
'
stock
'
);
};
};
// 编辑
// 编辑
const
onEdit
=
row
=>
{};
const
onEdit
=
({
spuId
})
=>
{
options
.
handleEdit
({
shopId
,
spuId
,
});
};
// 新建商品
const
onNew
=
()
=>
{
options
.
handleEdit
({
shopId
,
groupId
,
});
};
// 置顶
// 置顶
const
toTop
=
row
=>
{};
const
toTop
=
row
=>
{};
useEffect
(()
=>
{
useEffect
(()
=>
{
getDataList
();
if
(
groupId
)
{
},
[]);
getDataList
();
}
},
[
groupId
]);
const
actions
=
{
const
actions
=
{
onShowStockModal
,
onShowStockModal
,
...
@@ -129,6 +155,7 @@ const Takeaway = options => {
...
@@ -129,6 +155,7 @@ const Takeaway = options => {
selectedRowKeys=
{
selectedRowKeys
}
selectedRowKeys=
{
selectedRowKeys
}
handleSearch=
{
getDataList
}
handleSearch=
{
getDataList
}
openModal=
{
openModal
}
openModal=
{
openModal
}
newGoods=
{
onNew
}
/>
/>
<
Table
<
Table
dataSource=
{
tableData
}
dataSource=
{
tableData
}
...
...
src/pages/GoodsManage/index.jsx
View file @
06a12267
...
@@ -62,6 +62,7 @@ class goodsManage extends Component {
...
@@ -62,6 +62,7 @@ class goodsManage extends Component {
isVisibleDraft
:
false
,
// 显示隐藏草稿箱
isVisibleDraft
:
false
,
// 显示隐藏草稿箱
isEditDraft
:
false
,
// 是否编辑草稿
isEditDraft
:
false
,
// 是否编辑草稿
productType
:
1
,
// 商品类型
productType
:
1
,
// 商品类型
takeAway
:
{},
// 弹窗外卖商品参数
};
};
currentLog
=
null
;
currentLog
=
null
;
...
@@ -367,6 +368,14 @@ class goodsManage extends Component {
...
@@ -367,6 +368,14 @@ class goodsManage extends Component {
this
.
serviceVisbleChange
(
this
.
state
.
auditRow
);
this
.
serviceVisbleChange
(
this
.
state
.
auditRow
);
};
};
// 显示外卖商品弹窗
handleTakeawayEdit
=
params
=>
{
this
.
setState
({
takeAway
:
params
,
serviceVisble
:
true
,
});
};
render
()
{
render
()
{
const
{
const
{
goodsManage
:
{
tableData
=
{}
},
goodsManage
:
{
tableData
=
{}
},
...
@@ -421,7 +430,7 @@ class goodsManage extends Component {
...
@@ -421,7 +430,7 @@ class goodsManage extends Component {
/>
/>
</
Card
>
</
Card
>
{
this
.
state
.
productType
===
5
?
(
{
this
.
state
.
productType
===
5
?
(
<
Takeaway
/>
<
Takeaway
handleEdit=
{
this
.
handleTakeawayEdit
}
/>
)
:
(
)
:
(
<>
<>
<
Spin
spinning=
{
this
.
state
.
loading
}
>
<
Spin
spinning=
{
this
.
state
.
loading
}
>
...
@@ -509,6 +518,8 @@ class goodsManage extends Component {
...
@@ -509,6 +518,8 @@ class goodsManage extends Component {
specListData=
{
this
.
state
.
specListData
}
specListData=
{
this
.
state
.
specListData
}
permissions=
{
permissions
}
permissions=
{
permissions
}
isDraft=
{
this
.
state
.
isEditDraft
}
isDraft=
{
this
.
state
.
isEditDraft
}
productType=
{
this
.
state
.
productType
}
takeAway=
{
this
.
state
.
takeAway
}
/>
/>
)
}
)
}
{
this
.
state
.
visibleAuditModal
&&
(
{
this
.
state
.
visibleAuditModal
&&
(
...
...
src/pages/GoodsManage/service.js
View file @
06a12267
...
@@ -307,7 +307,7 @@ export async function apiTakeawayGoods(params) {
...
@@ -307,7 +307,7 @@ export async function apiTakeawayGoods(params) {
}
}
// 外卖商品排序
// 外卖商品排序
export
async
function
apiSortTakeawayGoods
(
data
)
{
export
async
function
apiSortTakeawayGoods
(
data
)
{
return
request
.
post
(
'
/
v1/channel
s/products/sku/batchSort
'
,
{
return
request
.
post
(
'
/
api/merchant
s/products/sku/batchSort
'
,
{
prefix
:
goodsApi
,
prefix
:
goodsApi
,
data
,
data
,
});
});
...
@@ -334,17 +334,18 @@ export async function apiEditStorage(data) {
...
@@ -334,17 +334,18 @@ export async function apiEditStorage(data) {
}
}
// 分组详情(货架—货架详情)
// 分组详情(货架—货架详情)
export
async
function
apiStorageInfo
(
params
)
{
export
async
function
apiStorageInfo
(
params
)
{
return
request
.
post
(
'
/api/merchants/products/storageRack/
q
ueryByShopIdAndStorageRackId
'
,
{
return
request
.
post
(
'
/api/merchants/products/storageRack/
Q
ueryByShopIdAndStorageRackId
'
,
{
prefix
:
goodsApi
,
prefix
:
goodsApi
,
data
:
stringify
(
params
),
data
:
stringify
(
params
),
headers
,
headers
,
});
});
}
}
// 删除分组(货架—删除货架)
// 删除分组(货架—删除货架)
export
async
function
apiDelStorage
(
data
)
{
export
async
function
apiDelStorage
(
params
)
{
return
request
.
post
(
'
/api/merchants/products/storageRack/removeByShopIdAndId
'
,
{
return
request
.
post
(
'
/api/merchants/products/storageRack/removeByShopIdAndId
'
,
{
prefix
:
goodsApi
,
prefix
:
goodsApi
,
data
,
data
:
stringify
(
params
),
headers
,
});
});
}
}
// 分组排序(货架—排序货架)
// 分组排序(货架—排序货架)
...
...
src/pages/GoodsManage/staticdata.js
View file @
06a12267
...
@@ -253,8 +253,8 @@ export function takeawayColumn(actions) {
...
@@ -253,8 +253,8 @@ export function takeawayColumn(actions) {
content
:
`确认
${
+
state
===
6
?
'
下架
'
:
'
上架
'
}
商品?`
,
content
:
`确认
${
+
state
===
6
?
'
下架
'
:
'
上架
'
}
商品?`
,
onOk
:
async
()
=>
{
onOk
:
async
()
=>
{
const
res
=
await
apiChangeStateGoods
({
const
res
=
await
apiChangeStateGoods
({
i
ds
:
skuId
,
skuI
ds
:
skuId
,
productStat
e
:
+
state
===
6
?
7
:
6
,
// 6:上架,7:下架
productStat
us
:
+
state
===
6
?
7
:
6
,
// 6:上架,7:下架
});
});
if
(
res
.
businessCode
===
'
0000
'
&&
res
.
code
===
'
0000
'
)
{
if
(
res
.
businessCode
===
'
0000
'
&&
res
.
code
===
'
0000
'
)
{
this
.
handleSearch
();
this
.
handleSearch
();
...
...
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