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
21fdc4c7
Commit
21fdc4c7
authored
May 10, 2022
by
前端-李俊鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复选择所有物料的重置问题以及品类名称显示问题
parent
b453026e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
index.tsx
...ruleEng/ruleEngConfig/components/CategoryDrawer/index.tsx
+1
-1
index.tsx
...g/ruleEng/ruleEngConfig/components/ProcessRules/index.tsx
+3
-1
No files found.
src/pages/systemSetting/ruleEng/ruleEngConfig/components/CategoryDrawer/index.tsx
View file @
21fdc4c7
...
...
@@ -20,7 +20,7 @@ const CategoryDrawer = (props: PropsType, ref) => {
const
handleOk
=
useCallback
(()
=>
{
isValuesChangeRef
.
current
=
false
onOk
?.(
checkedKeys
.
map
(
item
=>
({
id
:
item
.
id
,
value
:
item
[
fieldCode
]
})))
onOk
?.(
checkedKeys
.
map
(
item
=>
({
id
:
item
.
id
,
value
:
item
.
value
||
item
[
fieldCode
]
})))
},
[
checkedKeys
])
const
getCategoryTree
=
async
()
=>
{
...
...
src/pages/systemSetting/ruleEng/ruleEngConfig/components/ProcessRules/index.tsx
View file @
21fdc4c7
...
...
@@ -136,13 +136,15 @@ const ProcessRules: React.FC<PropsType> = ({ form, filedTypeOptions, onFormField
onFormFieldsChange
?.(
_
,
_all
)
let
ruleEngineConfigFieldRelations
=
form
.
getFieldValue
(
'ruleEngineConfigFieldRelations'
)
// 当字段类型改变的时候,需要重置一下对应的code/value/condition
// 当字段类型改变的时候,需要重置一下对应的code/value/condition
/isQueryAll
if
(
_
[
0
]?.
name
?.[
4
]
===
'code'
)
{
const
filedTypeItem
=
getFiledTypeItem
(
_
[
0
].
value
)
ruleEngineConfigFieldRelations
[
_
[
0
].
name
[
1
]].
ruleEngineConfigFields
[
_
[
0
].
name
[
3
]].
type
=
filedTypeItem
?.
type
// 日期格式给予'今天'的默认值
ruleEngineConfigFieldRelations
[
_
[
0
].
name
[
1
]].
ruleEngineConfigFields
[
_
[
0
].
name
[
3
]].
value
=
filedTypeItem
?.
type
===
Filed_Type
.
DATE
?
moment
().
format
(
'YYYY-MM-DD'
)
:
undefined
ruleEngineConfigFieldRelations
[
_
[
0
].
name
[
1
]].
ruleEngineConfigFields
[
_
[
0
].
name
[
3
]].
condition
=
conditionOptions
[
filedTypeItem
?.
type
][
0
].
value
// 是否勾选所有物料也需要重置
ruleEngineConfigFieldRelations
[
_
[
0
].
name
[
1
]].
ruleEngineConfigFields
[
_
[
0
].
name
[
3
]].
isQueryAll
=
0
form
.
setFieldsValue
({
ruleEngineConfigFieldRelations
})
}
...
...
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