Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
shenshaokai
jinfa-platform
Commits
bff8fce3
Commit
bff8fce3
authored
Jun 07, 2022
by
卢均锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 还原物料查询库存按钮
parent
9075fdac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
12 deletions
+20
-12
index.tsx
src/pages/commodity/material/materialQuery/index.tsx
+20
-12
No files found.
src/pages/commodity/material/materialQuery/index.tsx
View file @
bff8fce3
...
...
@@ -183,9 +183,11 @@ const MaterialQuery = () => {
}
})
}
else
{
formActions
.
setFieldValue
(
'customerCategoryId'
,
undefined
)
setQuerySchema
(
getSchema
({
showStatus
:
true
}))
const
_paths
=
customerCategoryValues
?.
map
((
item
)
=>
`customerCategoryId
${
item
.
id
}
`
)?.
join
(
','
);
_paths
&&
formActions
.
setFieldValue
(
`*(
${
_paths
}
)`
,
undefined
)
_paths
&&
formActions
.
setFieldValue
(
`*(
${
_paths
}
)`
,
undefined
);
setCustomerCategoryValues
(
undefined
)
}
},
[
customerCategoryId
])
...
...
@@ -251,15 +253,15 @@ const MaterialQuery = () => {
</
Menu
.
Item
>
</
AuthButton
>
),
//
(
// // <AuthButton key="priceLibrary" btnCode='material.toPriceLibrary
'>
//
<Menu.Item key="stockSellStorage">
//
<Link to={`/memberCenter/commodityAbility/stockSellStorage/inventory?code=${record.code}`}>
// 库存
//
</Link>
//
</Menu.Item>
// //
</AuthButton>
//
),
(
<
AuthButton
key=
"priceLibrary"
btnCode=
'material.toStockSellStorage
'
>
<
Menu
.
Item
key=
"stockSellStorage"
>
<
Link
to=
{
`/memberCenter/commodityAbility/stockSellStorage/inventory?code=${record.code}`
}
>
{
intl
.
formatMessage
({
id
:
'commodity.kucun'
,
defaultMessage
:
'库存'
})
}
</
Link
>
</
Menu
.
Item
>
</
AuthButton
>
),
].
filter
(
Boolean
);
const
menu
=
(
<
Menu
>
...
...
@@ -473,7 +475,7 @@ const MaterialQuery = () => {
controlRender=
{
<
NiceForm
components=
{
{
controllerBtns
,
Cascader
}
}
schema=
{
querySchema
()
}
schema=
{
querySchema
}
actions=
{
formActions
}
onSubmit=
{
handleSearch
}
effects=
{
(
$
,
actions
)
=>
{
...
...
@@ -483,7 +485,13 @@ const MaterialQuery = () => {
useAsyncSelect
(
'brandId'
,
fetchBrand
,
[
"name"
,
"id"
])
useAsyncSelect
(
'status'
,
fetchStatus
,
[
"name"
,
"status"
])
$
(
'onFieldChange'
,
'customerCategoryId'
).
subscribe
(
state
=>
{
setCustomerCategoryId
(((
state
?.
value
?.
length
!==
undefined
||
state
?.
value
?.
length
!==
null
)
&&
state
?.
value
?.
length
>
0
)
?
state
?.
value
[
state
?.
value
?.
length
-
1
]
:
undefined
)
const
_value
=
((
state
?.
value
?.
length
!==
undefined
||
state
?.
value
?.
length
!==
null
)
&&
state
?.
value
?.
length
>
0
)
?
state
?.
value
[
state
?.
value
?.
length
-
1
]
:
undefined
;
if
(
!
_value
)
{
state
.
value
=
undefined
;
state
.
values
=
[
undefined
];
state
.
visibleCacheValue
=
undefined
;
}
setCustomerCategoryId
(
_value
)
})
}
}
/>
...
...
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