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
linweijiong
jinfa-platform
Commits
25f5b613
Commit
25f5b613
authored
Dec 04, 2020
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
7f5c7d16
b58802fb
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
33 deletions
+7
-33
index.tsx
src/pages/handling/assign/add/index.tsx
+4
-31
schema.tsx
src/pages/handling/assign/add/schema.tsx
+1
-1
index.tsx
src/pages/handling/components/EnterPrise/index.tsx
+1
-1
index.tsx
src/pages/handling/components/ProcessOrder/index.tsx
+1
-0
No files found.
src/pages/handling/assign/add/index.tsx
View file @
25f5b613
import
React
,
{
useState
,
useCallback
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
}
from
'react'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
SaveOutlined
}
from
'@ant-design/icons'
;
import
{
Button
,
Card
,
Select
,
DatePicker
,
Radio
,
Table
,
Space
,
message
}
from
'antd'
;
...
...
@@ -222,36 +222,11 @@ const Add: React.FC<{}> = () => {
formActions
.
setFieldValue
(
'Tabs.tab-1.layout.processRoleId'
,
roleId
);
}
const
getChangeRows
=
(
rows
,
primaryKey
:
string
)
=>
{
const
{
selectedRowKeys
,
selectRow
}
=
rows
;
const
currentList
=
formActions
.
getFieldValue
(
'Tabs.tab-2.layout.someLists'
);
// 首先去除掉没有在selectedRowkeys 的那些数据
const
inKeys
=
[];
const
hasRemovedList
=
currentList
.
filter
(
(
item
)
=>
{
const
flag
=
selectedRowKeys
.
includes
(
item
[
primaryKey
])
if
(
flag
)
{
inKeys
.
push
(
item
[
primaryKey
]);
}
return
flag
}
);
// 找到没有在数组中的key,即新增加的key
const
newAddKeys
=
selectedRowKeys
.
filter
((
item
)
=>
{
return
!
inKeys
.
includes
(
item
)});
const
appendRow
=
selectRow
.
filter
((
item
)
=>
newAddKeys
.
includes
(
item
[
primaryKey
]));
const
newRows
=
hasRemovedList
.
concat
(
appendRow
);
// 最新的数组
return
newRows
}
/**
* 加工商品Modal框 行勾选回调
* @param rows
*/
const
processProductSelected
=
()
=>
{
console
.
log
(
productSelectRowCtl
);
// const newRows = getChangeRows(productSelectRowCtl, "id");
// console.log("newRows", newRows)
formActions
.
setFieldValue
(
'Tabs.tab-2.layout.someLists'
,
productSelectRowCtl
.
selectRow
)
}
...
...
@@ -260,10 +235,8 @@ const Add: React.FC<{}> = () => {
* @param row
*/
const
processOrderOnok
=
()
=>
{
console
.
log
(
selectRowCtl
);
const
newRows
=
getChangeRows
(
selectRowCtl
,
"fullId"
)
console
.
log
(
newRows
);
formActions
.
setFieldValue
(
'Tabs.tab-2.layout.someLists'
,
newRows
)
formActions
.
setFieldValue
(
'Tabs.tab-2.layout.someLists'
,
selectRowCtl
.
selectRow
)
}
/**
...
...
@@ -378,7 +351,7 @@ const Add: React.FC<{}> = () => {
const
primaryKey
=
activeSource
===
'加工订单'
?
'fullId'
:
'id'
const
newList
=
currentList
.
filter
((
item
)
=>
item
[
primaryKey
]
!==
id
);
formActions
.
setFieldValue
(
'Tabs.tab-2.layout.someLists'
,
newList
)
const
newSelectedKeys
=
newList
.
map
((
item
)
=>
item
.
id
);
const
newSelectedKeys
=
newList
.
map
((
item
)
=>
item
[
primaryKey
]
);
const
newSelectedRows
=
newList
;
if
(
activeSource
===
'加工订单'
)
{
selectRowCtl
.
setSelectedRowKeys
(
newSelectedKeys
);
...
...
src/pages/handling/assign/add/schema.tsx
View file @
25f5b613
...
...
@@ -223,7 +223,7 @@ const detailTab = {
},
'x-component'
:
'MultTable'
,
'x-component-props'
:
{
rowKey
:
'id'
,
rowKey
:
(
record
)
=>
record
.
id
+
"_"
+
record
.
fullId
,
prefix
:
"{{tableAddButton}}"
,
columns
:
"{{noticesDetailColumn}}"
// columns: "{{tableColumns}}",
...
...
src/pages/handling/components/EnterPrise/index.tsx
View file @
25f5b613
...
...
@@ -38,7 +38,7 @@ const EnterPrise = ({visible, cancel, ...restProps}) => {
return
(
<
Modal
title=
"选择加工
商品
"
title=
"选择加工
企业
"
width=
{
704
}
visible=
{
visible
}
onCancel=
{
cancel
}
...
...
src/pages/handling/components/ProcessOrder/index.tsx
View file @
25f5b613
...
...
@@ -83,6 +83,7 @@ const ProcessProducts = ({visible, cancel, rowSelection, ...restProps}) => {
},
// defaultExpandAllRows: true
}
// console.log("rowSelection",rowSelection);
const
handleSubmit
=
()
=>
{
// console.log(selectRowCtl, mainTableSelectRowCtl);
...
...
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