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
黄庭坚
jinfa-platform
Commits
7a463d8f
Commit
7a463d8f
authored
Jul 27, 2021
by
alwayOnlie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码
parent
157e4c6d
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
103 additions
and
147 deletions
+103
-147
add.tsx
src/pages/contract/funds/addbill/add.tsx
+5
-7
info.tsx
src/pages/contract/funds/addbill/components/info.tsx
+1
-1
table.tsx
src/pages/contract/funds/addbill/components/table.tsx
+1
-1
index.tsx
src/pages/contract/funds/bill/index.tsx
+13
-52
index.tsx
src/pages/contract/funds/details/index.tsx
+20
-7
index.tsx
src/pages/contract/manage/QueryList/index.tsx
+21
-4
index.tsx
src/pages/contract/manage/examine/index.tsx
+5
-25
index.tsx
src/pages/contract/manage/levelexamine/index.tsx
+6
-23
index.tsx
src/pages/contract/manage/purchase/index.tsx
+3
-1
index.tsx
src/pages/contract/manage/secondaryexamine/index.tsx
+25
-24
index.tsx
src/pages/contract/manage/signacontract/index.tsx
+3
-2
No files found.
src/pages/contract/funds/addbill/add.tsx
View file @
7a463d8f
...
...
@@ -51,10 +51,6 @@ const Add: React.FC<{}> = (props: any) => {
]
const
submit
=
async
()
=>
{
let
msg
=
message
.
loading
({
content
:
'正在操作'
,
duration
:
0
,
});
setLoading
(
true
);
if
(
!
Loading
)
{
const
basicsVO
=
await
currentBasic
.
current
.
get
();
...
...
@@ -66,14 +62,16 @@ const Add: React.FC<{}> = (props: any) => {
}
PublicApi
.
postContractApplyAmountSave
(
data
).
then
(
res
=>
{
console
.
log
(
res
);
setLoading
(
false
);
if
(
res
.
code
===
1000
)
{
history
.
push
(
'/memberCenter/contract/funds/addbill'
)
}
}).
finally
(()
=>
{
msg
();
}).
catch
((
err
)
=>
{
// resolve([]);
});
setTimeout
(()
=>
{
setLoading
(
false
);
},
2000
)
}
}
...
...
src/pages/contract/funds/addbill/components/info.tsx
View file @
7a463d8f
...
...
@@ -461,7 +461,7 @@ const AddInfo = (props: any) => {
<
Drawer
visible=
{
visible
}
onClose=
{
()
=>
setvisible
(
!
visible
)
}
title=
"选择
待请款单据
"
title=
"选择
采购合同
"
width=
{
1000
}
footer=
{
<
div
...
...
src/pages/contract/funds/addbill/components/table.tsx
View file @
7a463d8f
...
...
@@ -340,7 +340,7 @@ const table = (props: any) => {
<
Drawer
visible=
{
visible
}
onClose=
{
()
=>
setvisible
(
!
visible
)
}
title=
"选择
采购合同
"
title=
"选择
待请款单据
"
width=
{
1000
}
footer=
{
<
div
...
...
src/pages/contract/funds/bill/index.tsx
View file @
7a463d8f
...
...
@@ -14,18 +14,14 @@ import SearchSelect from '@/components/NiceForm/components/SearchSelect'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
import
moment
from
'moment'
;
import
"../../constants/index.less"
import
{
history
,
Redirect
}
from
'umi'
;
const
{
TextArea
}
=
Input
;
const
Bill
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([])
const
[
selectRow
,
setSelectRow
]
=
useState
<
any
[]
>
([])
// 模态框选择的行数据
const
[
id
,
setId
]
=
useState
(
''
);
const
[
isModalVisible
,
setIsModalVisible
]
=
useState
(
false
);
const
today
=
moment
();
// 当天日期
const
[
isAllMember
,
setIsAllMember
]
=
useState
(
true
)
const
[
reason
,
setDatareason
]
=
useState
(
''
)
;
//表头
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'请款单号/摘要'
,
...
...
@@ -101,24 +97,26 @@ const Bill: React.FC<{}> = () => {
render
:
(
text
:
any
,
record
:
any
)
=>
{
// 作废:待付款、已付款、待提交审核状态的不能作废
let
node
=
null
;
let
edit
=
<
span
style=
{
{
color
:
'#00B37A'
,
marginRight
:
20
,
cursor
:
'pointer'
,
}
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/contract/funds/bill/details?applyId=${record.id}&type=pageDetailList`
)
}
>
作废
</
span
>
const
showEdit
=
[
7
,
1
,
8
,
9
]
if
(
showEdit
.
indexOf
(
record
.
status
)
===
-
1
)
{
node
=
edit
;
}
else
{
node
=
null
;
}
console
.
log
(
record
.
status
)
return
(
<>
{
// 0.全部,1.待提交审核,2.待审核(一级),3.审核不通过(一级),4.待审核(二级),5.审核不通过(二级),6.待提交财务付款,7.待付款,8.已付款,9.已作废
record
.
status
!=
7
||
record
.
status
!=
8
||
record
.
status
!=
1
||
record
.
status
!=
9
&&
<
span
style=
{
{
color
:
'#00B37A'
,
marginRight
:
20
,
cursor
:
'pointer'
,
}
}
onClick=
{
()
=>
invalid
(
record
.
id
)
}
>
作废
</
span
>
node
}
</>
)
}
}]
const
handleIsAllMemberChange
=
(
v
:
any
)
=>
{
setIsAllMember
(
v
.
target
.
value
)
}
const
invalid
=
(
id
)
=>
{
setId
(
id
)
setIsModalVisible
(
!
isModalVisible
)
}
// 模拟请求
const
fetchData
=
(
params
?:
any
)
=>
{
console
.
log
(
params
)
//可以直接打印参数
...
...
@@ -151,36 +149,6 @@ const Bill: React.FC<{}> = () => {
}
};
/* 作废 */
const
oninvalid
=
()
=>
{
let
res_data
:
any
=
{
applyId
:
id
,
reason
,
}
if
(
isAllMember
)
{
const
msg
=
message
.
loading
({
content
:
'正在操作'
,
duration
:
0
,
});
PublicApi
.
postContractApplyAmountInvalid
(
res_data
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
handleCancel
()
ref
.
current
.
reload
();
}
}).
finally
(()
=>
{
msg
();
})
}
else
{
handleCancel
()
}
}
const
setreason
=
(
e
)
=>
{
setDatareason
(
e
.
target
.
value
);
}
const
handleCancel
=
()
=>
{
setIsModalVisible
(
!
isModalVisible
);
};
return
(
<
PageHeaderWrapper
>
<
Card
>
...
...
@@ -217,14 +185,7 @@ const Bill: React.FC<{}> = () => {
}
}
/>
</
Card
>
<
Modal
title=
"单据作废"
visible=
{
isModalVisible
}
onCancel=
{
handleCancel
}
onOk=
{
oninvalid
}
>
<
Radio
.
Group
onChange=
{
handleIsAllMemberChange
}
defaultValue=
{
isAllMember
}
value=
{
isAllMember
}
>
<
Radio
value=
{
true
}
>
作废
</
Radio
>
<
Radio
value=
{
false
}
>
不作废
</
Radio
>
</
Radio
.
Group
>
<
p
style=
{
{
padding
:
10
,
margin
:
0
}
}
>
单据作废原因
<
span
style=
{
{
color
:
'red'
}
}
>
*
</
span
></
p
>
<
TextArea
placeholder=
"在此输入你的原因,最多60个汉字"
maxLength=
{
120
}
onChange=
{
(
e
)
=>
setreason
(
e
)
}
/>
</
Modal
>
</
PageHeaderWrapper
>
)
...
...
src/pages/contract/funds/details/index.tsx
View file @
7a463d8f
...
...
@@ -106,11 +106,15 @@ const BillDetails = (props: any) => {
}
/* 显示审核弹出 */
const
submitExaminefunds
=
()
=>
{
const
msg
=
message
.
loading
(
{
content
:
'正在操作'
,
duration
:
0
,
}
);
if
(
type
==
'pageDetailList'
)
{
setIsModalVisible
(
!
isModalVisible
);
return
}
if
(
type
==
'submitExamine'
)
{
const
msg
=
message
.
loading
({
content
:
'正在操作'
,
duration
:
0
,
});
PublicApi
.
postContractApplyAmountSubmitExamine
({
applyId
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
...
...
@@ -120,7 +124,12 @@ const BillDetails = (props: any) => {
}).
finally
(()
=>
{
msg
();
});
}
else
if
(
type
==
'PageToBeSubmit'
)
{
}
if
(
type
==
'pageToBeSubmit'
)
{
console
.
log
(
'type'
)
const
msg
=
message
.
loading
({
content
:
'正在操作'
,
duration
:
0
,
});
PublicApi
.
postContractApplyAmountSubmit
({
applyId
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
...
...
@@ -130,12 +139,13 @@ const BillDetails = (props: any) => {
}).
finally
(()
=>
{
msg
();
});
return
;
}
else
{
setExamineFlag
(
true
)
}
}
/* 作废 */
const
oninval
id
=
()
=>
{
const
Vo
id
=
()
=>
{
let
res_data
:
any
=
{
applyId
,
reason
,
...
...
@@ -148,6 +158,9 @@ const BillDetails = (props: any) => {
PublicApi
.
postContractApplyAmountInvalid
(
res_data
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
handleCancel
()
setTimeout
(()
=>
{
history
.
goBack
();
},
2000
);
}
}).
finally
(()
=>
{
msg
();
...
...
@@ -266,7 +279,7 @@ const BillDetails = (props: any) => {
<
ColumnsList
applyId=
{
applyId
}
/>
</
div
>
{
/* 单据作废 */
}
<
Modal
title=
"单据作废"
visible=
{
isModalVisible
}
onCancel=
{
handleCancel
}
onOk=
{
oninval
id
}
>
<
Modal
title=
"单据作废"
visible=
{
isModalVisible
}
onCancel=
{
handleCancel
}
onOk=
{
Vo
id
}
>
<
Radio
.
Group
onChange=
{
handleIsAllMemberChange
}
defaultValue=
{
isAllMember
}
value=
{
isAllMember
}
>
<
Radio
value=
{
true
}
>
作废
</
Radio
>
<
Radio
value=
{
false
}
>
不作废
</
Radio
>
...
...
src/pages/contract/manage/QueryList/index.tsx
View file @
7a463d8f
...
...
@@ -75,14 +75,32 @@ const QueryList = () => {
dataIndex
:
'sourceNo'
,
align
:
'left'
,
render
:
(
text
,
record
)
=>
{
let
url
=
''
;
if
(
record
.
sourceId
)
{
switch
(
record
.
sourceType
)
{
case
1
:
{
if
(
record
.
turn
&&
record
.
sourceId
)
{
url
=
`/memberCenter/procurementAbility/confirmOffer/offerInquire/preview?id=
${
record
.
sourceId
}
&turn=
${
record
.
turn
}
`
}
break
;
};
case
2
:
{
url
=
`/memberCenter/procurementAbility/callForBids/callForBidsSearch/detail?id=
${
record
.
sourceId
}
`
break
;
};
case
3
:
{
url
=
`/memberCenter/procurementAbility/purchaseBid/search/detail?id=
${
record
.
sourceId
}
&number=
${
record
.
sourceNo
}
`
break
;
};
}
}
return
(
<
div
>
{
text
&&
record
.
sourceId
&&
<
EyePreview
type=
{
record
.
source
Type
==
1
?
record
.
sourceId
?
'link'
:
"button"
:
'link'
}
url=
{
record
.
sourceType
==
1
?
`/memberCenter/procurementAbility/confirmOffer/offerInquire/demand/preview?id=${record.sourceId}&number${record.sourceNo}`
:
`/memberCenter/procurementAbility/callForBids/callForBidsSearch/detail?id=${record.sourceId}`
}
type=
{
record
.
source
Id
?
'link'
:
"button"
}
url=
{
url
}
>
{
text
}
</
EyePreview
>
...
...
@@ -91,7 +109,6 @@ const QueryList = () => {
</
div
>
)
}
},
{
title
:
'外部状态'
,
...
...
src/pages/contract/manage/examine/index.tsx
View file @
7a463d8f
...
...
@@ -16,13 +16,10 @@ import Submit from '@/components/NiceForm/components/Submit'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
import
{
PublicApi
}
from
'@/services/api'
;
import
{
PlayCircleOutlined
,
PoweroffOutlined
}
from
'@ant-design/icons'
import
ExamineFrom
from
'../../components/examine'
import
moment
from
'moment'
;
const
Examine
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([])
const
[
Visible
,
setIsModalVisible
]
=
useState
<
boolean
>
(
false
)
const
[
id
,
setid
]
=
useState
(
""
)
const
getdate
=
(
time
)
=>
{
return
new
Date
(
Date
.
parse
(
time
.
replace
(
/-/g
,
"/"
))).
getTime
()
/
1000
;
}
...
...
@@ -127,13 +124,6 @@ const Examine = () => {
)
}
}]
/* 提交表单 */
const
submitExamine
=
(
id
)
=>
{
setid
(
id
)
setIsModalVisible
(
!
Visible
)
}
// 列表数据
const
fetchData
=
(
params
?:
any
)
=>
{
console
.
log
(
params
)
//可以直接打印参数
...
...
@@ -144,7 +134,9 @@ const Examine = () => {
...
params
,
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
}).
catch
((
err
)
=>
{
resolve
([]);
});
})
}
...
...
@@ -155,14 +147,7 @@ const Examine = () => {
}
};
/* 提交审核的回调 */
const
getfetchData
=
(
data
)
=>
{
console
.
log
(
data
)
setIsModalVisible
(
data
.
ExamineFlag
)
if
(
data
.
code
===
1000
)
{
ref
.
current
.
reload
()
}
}
return
(
<
PageHeaderWrapper
>
<
Card
>
...
...
@@ -197,12 +182,7 @@ const Examine = () => {
}
}
}
/>
<
ExamineFrom
ExamineFlag=
{
Visible
}
getfetchData=
{
getfetchData
}
applyId=
{
id
}
type=
"ManageSubmitExamine"
/>
</
Card
>
</
PageHeaderWrapper
>
)
...
...
src/pages/contract/manage/levelexamine/index.tsx
View file @
7a463d8f
...
...
@@ -15,7 +15,7 @@ import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePicke
import
{
PublicApi
}
from
'@/services/api'
;
import
{
history
,
Redirect
}
from
'umi'
;
import
{
PlayCircleOutlined
,
PoweroffOutlined
}
from
'@ant-design/icons'
import
ExamineFrom
from
'../../components/examine'
import
moment
from
'moment'
;
...
...
@@ -25,8 +25,6 @@ const Levelexamine = () => {
return
new
Date
(
Date
.
parse
(
time
.
replace
(
/-/g
,
"/"
))).
getTime
()
/
1000
;
}
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([])
const
[
Visible
,
setIsModalVisible
]
=
useState
<
boolean
>
(
false
)
const
[
id
,
setid
]
=
useState
(
""
)
//表头
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'合同编号/摘要'
,
...
...
@@ -129,11 +127,7 @@ const Levelexamine = () => {
)
}
}]
/* 提交表单 */
const
submitExamine
=
(
id
)
=>
{
setid
(
id
)
setIsModalVisible
(
!
Visible
)
}
// 列表数据
const
fetchData
=
(
params
?:
any
)
=>
{
console
.
log
(
params
)
//可以直接打印参数
...
...
@@ -144,7 +138,9 @@ const Levelexamine = () => {
...
params
,
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
}).
catch
((
err
)
=>
{
resolve
([]);
});
})
}
...
...
@@ -154,14 +150,7 @@ const Levelexamine = () => {
setSelectedRowKeys
(
selectedRowKeys
)
}
};
/* 提交审核的回调 */
const
getfetchData
=
(
data
)
=>
{
console
.
log
(
data
)
setIsModalVisible
(
data
.
ExamineFlag
)
if
(
data
.
code
===
1000
)
{
ref
.
current
.
reload
()
}
}
return
(
<
PageHeaderWrapper
>
<
Card
>
...
...
@@ -197,12 +186,6 @@ const Levelexamine = () => {
}
}
/>
</
Card
>
<
ExamineFrom
ExamineFlag=
{
Visible
}
getfetchData=
{
getfetchData
}
applyId=
{
id
}
type=
"ManageExamineStepOne"
/>
</
PageHeaderWrapper
>
)
}
...
...
src/pages/contract/manage/purchase/index.tsx
View file @
7a463d8f
...
...
@@ -136,7 +136,9 @@ const PurchaseList = () => {
...
params
,
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
}).
catch
((
err
)
=>
{
resolve
([]);
});
})
}
...
...
src/pages/contract/manage/secondaryexamine/index.tsx
View file @
7a463d8f
...
...
@@ -14,7 +14,6 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import
Submit
from
'@/components/NiceForm/components/Submit'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
import
{
PublicApi
}
from
'@/services/api'
;
import
ExamineFrom
from
'../../components/examine'
import
moment
from
'moment'
;
import
{
history
}
from
'umi'
;
...
...
@@ -73,14 +72,32 @@ const Secondaryexamine = () => {
dataIndex
:
'sourceNo'
,
align
:
'left'
,
render
:
(
text
,
record
)
=>
{
let
url
=
''
;
if
(
record
.
sourceId
)
{
switch
(
record
.
sourceType
)
{
case
1
:
{
if
(
record
.
turn
&&
record
.
sourceId
)
{
url
=
`/memberCenter/procurementAbility/confirmOffer/offerInquire/preview?id=
${
record
.
sourceId
}
&turn=
${
record
.
turn
}
`
}
break
;
};
case
2
:
{
url
=
`/memberCenter/procurementAbility/callForBids/callForBidsSearch/detail?id=
${
record
.
sourceId
}
`
break
;
};
case
3
:
{
url
=
`/memberCenter/procurementAbility/purchaseBid/search/detail?id=
${
record
.
sourceId
}
&number=
${
record
.
sourceNo
}
`
break
;
};
}
}
return
(
<
div
>
{
text
&&
record
.
sourceId
&&
<
EyePreview
type=
{
record
.
source
Type
==
1
?
record
.
sourceId
?
'link'
:
"button"
:
'link'
}
url=
{
record
.
sourceType
==
1
?
`/memberCenter/procurementAbility/confirmOffer/offerInquire/demand/preview?id=${record.sourceId}&number${record.sourceNo}`
:
`/memberCenter/procurementAbility/callForBids/callForBidsSearch/detail?id=${record.sourceId}`
}
type=
{
record
.
source
Id
?
'link'
:
"button"
}
url=
{
url
}
>
{
text
}
</
EyePreview
>
...
...
@@ -126,11 +143,6 @@ const Secondaryexamine = () => {
}
}]
/* 提交表单 */
const
submitExamine
=
(
id
)
=>
{
setid
(
id
)
setIsModalVisible
(
!
Visible
)
}
// 列表数据
const
fetchData
=
(
params
?:
any
)
=>
{
console
.
log
(
params
)
//可以直接打印参数
...
...
@@ -141,7 +153,9 @@ const Secondaryexamine = () => {
...
params
,
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
}).
catch
((
err
)
=>
{
resolve
([]);
});
})
}
...
...
@@ -151,14 +165,7 @@ const Secondaryexamine = () => {
setSelectedRowKeys
(
selectedRowKeys
)
}
};
/* 提交审核的回调 */
const
getfetchData
=
(
data
)
=>
{
console
.
log
(
data
)
setIsModalVisible
(
data
.
ExamineFlag
)
if
(
data
.
code
===
1000
)
{
ref
.
current
.
reload
()
}
}
return
(
<
PageHeaderWrapper
>
<
Card
>
...
...
@@ -194,12 +201,6 @@ const Secondaryexamine = () => {
}
}
/>
</
Card
>
<
ExamineFrom
ExamineFlag=
{
Visible
}
getfetchData=
{
getfetchData
}
applyId=
{
id
}
type=
"PageToBeExamineStepTwo"
/>
</
PageHeaderWrapper
>
)
}
...
...
src/pages/contract/manage/signacontract/index.tsx
View file @
7a463d8f
...
...
@@ -143,7 +143,6 @@ const Signacontract = () => {
// 列表数据
const
fetchData
=
(
params
?:
any
)
=>
{
console
.
log
(
params
)
//可以直接打印参数
params
.
startTime
=
params
.
startTime
?
moment
(
Number
(
params
.
startTime
)).
format
(
'YYYY-MM-DD'
)
:
''
;
params
.
endTime
=
params
.
endTime
?
moment
(
Number
(
params
.
endTime
)).
format
(
'YYYY-MM-DD'
)
:
''
;
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -151,7 +150,9 @@ const Signacontract = () => {
...
params
,
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
}).
catch
(()
=>
{
reject
();
});
})
}
// 多选操作
...
...
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