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
919e9ffa
Commit
919e9ffa
authored
Aug 03, 2021
by
alwayOnlie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
9ef47d94
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
27 deletions
+13
-27
SituationList.tsx
...ontract/coordination/details/components/SituationList.tsx
+4
-0
table.tsx
src/pages/contract/funds/addbill/components/table.tsx
+1
-0
FormList.tsx
src/pages/contract/manage/add/components/FormList.tsx
+7
-26
contracAdd.tsx
src/pages/contract/manage/add/contracAdd.tsx
+1
-1
No files found.
src/pages/contract/coordination/details/components/SituationList.tsx
View file @
919e9ffa
...
...
@@ -35,6 +35,7 @@ const situationList: React.FC<Iprops> = ({ contractId }) => {
/* 执行请款的选中 */
const
[
selectRow
,
setSelectRow
]
=
useState
<
any
[]
>
([])
// 模态框选择的行数据
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([])
const
[
value
,
setvalue
]
=
useState
(
''
);
/* 搜素 */
const
onSearch
=
(
values
)
=>
{
const
data
=
{
...
...
@@ -216,6 +217,7 @@ const situationList: React.FC<Iprops> = ({ contractId }) => {
current
:
page
,
pageSize
:
size
,
}
setvalue
(
''
)
getContracInfoList
(
data
)
}
useEffect
(()
=>
{
...
...
@@ -241,6 +243,8 @@ const situationList: React.FC<Iprops> = ({ contractId }) => {
placeholder=
"搜素"
allowClear
onSearch=
{
onSearch
}
value=
{
value
}
onChange=
{
(
e
)
=>
setvalue
(
e
.
target
.
value
)
}
/>
<
Button
style=
{
{
paddingLeft
:
10
,
paddingRight
:
10
,
marginLeft
:
10
,
marginRight
:
10
}
}
onClick=
{
Reset
}
>
重置
</
Button
>
</
div
>
...
...
src/pages/contract/funds/addbill/components/table.tsx
View file @
919e9ffa
...
...
@@ -313,6 +313,7 @@ const table = (props: any) => {
PlanList
.
map
((
item
)
=>
{
item
.
applyNo
=
item
.
orderNO
;
item
.
outerStatusName
=
item
.
orderStatusName
;
item
.
orderTime
=
item
.
orderTime
?
moment
().
format
(
'YYYY-MM-DD'
)
:
''
;
// item.isHasTax = item.isHasTax == '是' ? 1 : 0;
})
setPlanList
(
PlanList
)
...
...
src/pages/contract/manage/add/components/FormList.tsx
View file @
919e9ffa
...
...
@@ -10,39 +10,22 @@ import { goodcolumns } from '../Table'
import
{
PublicApi
}
from
'@/services/api'
;
const
{
Option
}
=
Select
;
const
{
Text
}
=
Typography
;
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
const
FormList
=
(
props
:
any
)
=>
{
const
{
currentRef
,
Row
,
sourceType
}
=
props
;
const
refs
=
useRef
({});
/* 显示模态框 */
const
[
isModalVisible
,
setIsModalVisible
]
=
useState
(
false
);
// 显示模态框
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([])
// 选中的
const
[
selectRow
,
setSelectRow
]
=
useState
<
any
[]
>
([])
// 模态框选择的行数据
const
[
rowSelection
,
RowCtl
]
=
useRowSelectionTable
({
customKey
:
'id'
});
const
[
dataList
,
setData
]
=
useState
<
Array
<
any
>>
([])
// 列表数据
/* 选中 */
const
rowSelectionGood
:
any
=
{
selectedRowKeys
:
selectedRowKeys
,
onChange
:
(
selectedRowKeys
:
any
,
selectedRows
:
any
)
=>
{
setSelectedRowKeys
(
selectedRowKeys
)
setSelectRow
(
selectedRows
)
console
.
log
(
setSelectedRowKeys
)
}
};
const
[
columnsTab
,
setcolumnsTab
]
=
useState
<
any
>
([]);
/* 确定 */
const
handleOk
=
()
=>
{
console
.
log
(
dataList
)
let
dataArr
=
dataList
.
length
!=
0
?
dataList
.
concat
(
selectRow
)
:
selectRow
;
const
hash
=
{}
let
templateList
=
dataArr
.
reduceRight
((
item
,
next
)
=>
{
if
(
!
hash
[
next
.
id
])
hash
[
next
.
id
]
=
true
&&
item
.
push
(
next
)
return
item
},
[])
templateList
.
map
((
item
:
any
,
index
:
number
)
=>
{
let
list
=
RowCtl
.
selectRow
;
list
.
map
((
item
:
any
,
index
:
number
)
=>
{
item
.
rowId
=
index
+
1
dataArr
.
push
(
item
);
})
setData
(
templateL
ist
)
setData
(
l
ist
)
setIsModalVisible
(
false
);
};
/* 获取商品 */
...
...
@@ -59,11 +42,9 @@ const FormList = (props: any) => {
/* 删除 */
const
handleDelete
=
(
id
)
=>
{
const
dataSource
=
[...
dataList
];
const
RowKeys
=
[...
selectedRowKeys
]
let
List
=
dataSource
.
filter
((
item
)
=>
item
.
id
!==
id
);
const
RowKeysList
=
RowKeys
.
filter
(
item
=>
item
!==
id
);
setData
(
List
)
setSelectedRowKeys
(
RowKeysList
)
//
setSelectedRowKeys(RowKeysList)
};
/* 获取物料信息 */
const
getList
=
()
=>
{
...
...
@@ -439,7 +420,7 @@ const FormList = (props: any) => {
}
}
columns=
{
goodcolumns
}
currentRef=
{
refs
}
rowSelection=
{
rowSelection
Good
}
rowSelection=
{
rowSelection
}
fetchTableData=
{
(
params
:
any
)
=>
getGoodsList
(
params
)
}
/>
</
Modal
>
...
...
src/pages/contract/manage/add/contracAdd.tsx
View file @
919e9ffa
...
...
@@ -3,7 +3,7 @@ import { Button, Card, Tabs, message } from 'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
Information
from
'./components/Information'
import
FormList
from
'./components/FormList'
import
Fromtable
from
'./components/
f
romtable'
import
Fromtable
from
'./components/
F
romtable'
import
ContractText
from
'./components/ContractText'
import
{
PublicApi
}
from
'@/services/api'
;
import
{
history
}
from
'umi'
...
...
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