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
10f7fb21
Commit
10f7fb21
authored
Jun 29, 2023
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改获取列表接口
parent
ad8efe20
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
12 deletions
+32
-12
.eslintrc.js
.eslintrc.js
+1
-1
index.jsx
src/pages/GoodsManage/index.jsx
+11
-0
SaleSectionModal.jsx
src/pages/businessGoods/components/SaleSectionModal.jsx
+8
-3
virtualGoods.jsx
src/pages/businessGoods/virtualGoods.jsx
+12
-8
No files found.
.eslintrc.js
View file @
10f7fb21
...
...
@@ -14,7 +14,7 @@ module.exports = {
'
@typescript-eslint/no-unused-vars
'
:
[
'
off
'
],
'
import/no-unresolved
'
:
0
,
'
import/extensions
'
:
0
,
'
no-unused-expressions
'
:
[
'
error
'
,
{
allowShortCircuit
:
true
}
],
'
no-unused-expressions
'
:
[
'
off
'
],
'
template-curly-spacing
'
:
'
off
'
,
},
};
src/pages/GoodsManage/index.jsx
View file @
10f7fb21
...
...
@@ -28,6 +28,8 @@ import DraftModal from './DraftModal';
import
Takeaway
from
'
./Takeaway
'
;
import
{
GOOD_MANAGE
}
from
'
@/../config/permission.config
'
;
import
LocalStroage
from
'
@/utils/localStorage
'
;
import
configApi
from
'
@/../config/env.config
'
;
@
connect
(({
goodsManage
,
menu
})
=>
({
goodsManage
,
...
...
@@ -123,6 +125,15 @@ class goodsManage extends Component {
this
.
handleSearch
(
page
);
};
audit
=
skuId
=>
{
this
.
setState
({
previewVisible
:
true
,
src
:
`
${
configApi
.
prologueDomain
}
/goods/
${
skuId
}
?h=0&token=
${
LocalStroage
.
get
(
'
token
'
,
)}
&hideReport=1&time=
${
Date
.
now
()}
`
,
});
};
onPageSizeChange
=
(
current
,
size
)
=>
{
this
.
setState
(
{
...
...
src/pages/businessGoods/components/SaleSectionModal.jsx
View file @
10f7fb21
...
...
@@ -55,14 +55,19 @@ const SaleDateModal = props => {
};
// 获取店铺餐段通过企业ID
const
getEnterpriseMealColumn
=
async
()
=>
{
const
getEnterpriseMealColumn
=
async
valueList
=>
{
setLoading
(
true
);
const
res
=
await
apiEnterpriseInfo
(
props
.
enterpriseID
);
setLoading
(
false
);
if
(
res
&&
res
.
data
&&
res
.
data
.
mealTimePeriod
&&
res
.
data
.
mealTimePeriod
.
length
)
{
const
arr
=
res
.
data
.
mealTimePeriod
.
map
(
item
=>
`
${
item
.
mealPeriodType
}
`
);
setTabCateList
(
arr
);
setValue
(
arr
);
// 餐段的值需在企业配置的可选餐段之内
const
v
=
[];
valueList
.
forEach
(
t
=>
{
arr
.
includes
(
t
)
&&
v
.
push
(
t
);
});
setValue
(
v
);
}
};
...
...
@@ -86,7 +91,7 @@ const SaleDateModal = props => {
}
setValue
(
v
);
if
(
props
.
enterpriseID
)
{
getEnterpriseMealColumn
();
getEnterpriseMealColumn
(
v
);
}
}
},
[
props
.
visible
]);
...
...
src/pages/businessGoods/virtualGoods.jsx
View file @
10f7fb21
...
...
@@ -18,12 +18,11 @@ const VirtualGoods = () => {
const
[
enterpriseId
,
setEnterpriseId
]
=
useState
();
// 刷新列表
// const onRefresh = () => {
// if (pageLoaded) {
// refTable.current.reloadAndRest();
// // refTable.current.reload();
// }
// };
const
onRefresh
=
()
=>
{
if
(
pageLoaded
)
{
refTable
?.
current
?.
reloadAndRest
();
}
};
// 搜索商品列表
const
searchList
=
async
params
=>
{
...
...
@@ -80,6 +79,7 @@ const VirtualGoods = () => {
// 改变企业
const
onChangeEnterprise
=
v
=>
{
setEnterpriseId
(
v
);
onRefresh
();
};
// 获取企业列表
...
...
@@ -105,6 +105,11 @@ const VirtualGoods = () => {
onChangeEnterprise
,
};
let
request
=
()
=>
[];
if
(
enterpriseId
)
{
request
=
params
=>
searchList
({
...
params
});
}
return
(
<
div
className=
{
utilStyle
.
formPageBox
}
>
{
pageLoaded
&&
(
...
...
@@ -118,11 +123,10 @@ const VirtualGoods = () => {
actionRef=
{
refTable
}
tableClassName=
{
utilStyle
.
formTable
}
columns=
{
virtualGoodsColumn
(
options
)
}
request=
{
params
=>
searchList
({
...
params
})
}
request=
{
request
}
rowKey=
{
r
=>
r
.
id
}
bordered
options=
{
false
}
form=
{
{
initialValues
:
{
enterpriseId
}
}
}
scroll=
{
{
x
:
1300
}
}
toolbar=
{
{
actions
:
[
...
...
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