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
601f76d0
Commit
601f76d0
authored
Feb 04, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 注释下单选商品的品类树筛选
parent
dfafcd69
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
2 deletions
+31
-2
index.ts
src/components/ModalTable/schema/index.ts
+12
-0
index.tsx
...Order/orderCollect/components/productModalTable/index.tsx
+7
-2
index.ts
...s/transaction/purchaseOrder/orderCollect/effects/index.ts
+12
-0
No files found.
src/components/ModalTable/schema/index.ts
View file @
601f76d0
...
...
@@ -189,6 +189,18 @@ export const addOrderModalSchema: ISchema = {
queryParams
:
{},
}
},
// customerCategoryId: {
// type: 'string',
// 'x-component': 'CustomCategorySearch',
// 'x-component-props': {
// placeholder: '商品品类',
// showSearch: true,
// notFoundContent: null,
// style: { width: '174px' },
// dataoption: [],
// fieldNames: { label: 'title', value: 'id', children: 'children' },
// },
// },
brandId
:
{
type
:
'string'
,
"x-component"
:
'SearchSelect'
,
...
...
src/pages/transaction/purchaseOrder/orderCollect/components/productModalTable/index.tsx
View file @
601f76d0
...
...
@@ -3,7 +3,7 @@ import ModalTable, { ModalTableProps } from '@/components/ModalTable'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
fetchOrderApi
}
from
'../../apis'
import
{
useModalTable
}
from
'../../model/useModalTable'
import
{
ISchemaFormActions
,
ISchemaFormAsyncActions
}
from
'@formily/antd'
import
{
FormEffectHooks
,
ISchemaFormActions
,
ISchemaFormAsyncActions
}
from
'@formily/antd'
import
{
DELIVERY_TYPE
,
OrderModalType
}
from
'@/constants'
import
{
PublicApi
}
from
'@/services/api'
import
{
EnvironmentOutlined
}
from
'@ant-design/icons'
...
...
@@ -16,6 +16,8 @@ import SearchSelect from '@/components/NiceForm/components/SearchSelect';
import
Submit
from
'@/components/NiceForm/components/Submit'
;
import
DateSelect
from
'@/components/NiceForm/components/DateSelect'
;
import
{
action
}
from
'mobx'
import
{
searchCustomerCategoryOptionEffect
}
from
'../../effects'
import
CustomCategorySearch
from
'@/components/NiceForm/components/CustomCategorySearch'
export
interface
ProductModalTableProps
extends
ModalTableProps
{
type
?:
'radio'
|
'checkbox'
,
...
...
@@ -216,7 +218,7 @@ const ProductModalTable:React.FC<ProductModalTableProps> = (props) => {
formilyProps=
{
{
ctx
:
{
schema
:
addOrderModalSchema
,
components
:
{
ModalSearch
:
Search
,
SearchSelect
,
Submit
,
DateSelect
},
components
:
{
ModalSearch
:
Search
,
SearchSelect
,
Submit
,
DateSelect
,
CustomCategorySearch
},
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
...
...
@@ -230,6 +232,9 @@ const ProductModalTable:React.FC<ProductModalTableProps> = (props) => {
memberRoleId
:
schemaAction
.
getFieldValue
(
'supplyMembersRoleId'
)
}
})
// FormEffectHooks.onFieldChange$('customerCategoryId').subscribe(state =>
{
// searchCustomerCategoryOptionEffect(actions, 'customerCategoryId')
//
})
actions
.
setFieldState
(
'brandId'
,
state
=>
{
state
.
props
[
'x-component-props'
].
queryParams
=
{
memberId
:
schemaAction
.
getFieldValue
(
'supplyMembersId'
),
...
...
src/pages/transaction/purchaseOrder/orderCollect/effects/index.ts
View file @
601f76d0
...
...
@@ -354,3 +354,15 @@ export const useOrderUpdateChangeOther = (ctx: ISchemaFormActions | ISchemaFormA
})
}
// 高级筛选schema中用于输入搜索商品品类的Effect
export
const
searchCustomerCategoryOptionEffect
=
(
context
:
any
,
fieldName
:
string
)
=>
{
context
.
getFieldState
(
fieldName
,
state
=>
{
PublicApi
.
getProductCustomerGetCustomerCategoryTree
().
then
(
res
=>
{
context
.
setFieldState
(
fieldName
,
state
=>
{
state
.
props
[
'x-component-props'
].
dataoption
=
res
.
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