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
10a6ce93
Commit
10a6ce93
authored
Apr 19, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-srm' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev-srm
parents
2ba6b291
f17bb622
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
395 additions
and
38 deletions
+395
-38
contracRoute.ts
config/routes/contracRoute.ts
+1
-1
index.tsx
src/pages/contract/coordination/details/index.tsx
+2
-1
index.tsx
...ges/contract/coordination/pageToBeSubmitExamine/index.tsx
+1
-1
add.tsx
src/pages/contract/funds/addbill/add.tsx
+37
-10
info.tsx
src/pages/contract/funds/addbill/components/info.tsx
+0
-0
table.tsx
src/pages/contract/funds/addbill/components/table.tsx
+90
-4
FormList.tsx
src/pages/contract/manage/add/components/FormList.tsx
+25
-3
contracAdd.tsx
src/pages/contract/manage/add/contracAdd.tsx
+6
-4
index.css
src/pages/contract/manage/add/index.css
+7
-0
index.less
src/pages/contract/manage/add/index.less
+9
-0
index.tsx
src/pages/contract/manage/details/index.tsx
+18
-4
index.tsx
src/pages/contract/manage/examine/index.tsx
+2
-2
index.tsx
src/pages/contract/manage/levelexamine/index.tsx
+67
-4
index.tsx
src/pages/contract/manage/secondaryexamine/index.tsx
+64
-2
index.tsx
src/pages/contract/manage/signacontract/index.tsx
+66
-2
No files found.
config/routes/contracRoute.ts
View file @
10a6ce93
...
...
@@ -198,7 +198,7 @@ const contracRoute = {
path
:
'/memberCenter/contract/funds/addbill/Details'
,
name
:
'待新增请款单'
,
hideInMenu
:
true
,
component
:
'@/pages/contract/funds/
addbill/D
etails'
,
component
:
'@/pages/contract/funds/
d
etails'
,
},
],
},
...
...
src/pages/contract/coordination/details/index.tsx
View file @
10a6ce93
...
...
@@ -344,8 +344,8 @@ const Details = (props: any) => {
}
/** 确定关联商品 */
const
handleConfirm
=
(
params
:
any
)
=>
{
console
.
log
(
params
,
10086
,
index
,
ListData
[
index
])
const
data
=
[...
ListData
];
data
[
index
].
associatedCategory
=
params
.
product
.
customerCategoryName
;
data
[
index
].
associatedBrand
=
params
.
product
.
brandName
;
data
[
index
].
associatedGoods
=
params
.
product
.
name
;
...
...
@@ -366,6 +366,7 @@ const Details = (props: any) => {
associatedCategory
,
associatedBrand
}
console
.
log
(
params
,
10086
,
res_data
)
const
msg
=
message
.
loading
({
content
:
'正在操作'
,
duration
:
0
,
...
...
src/pages/contract/coordination/pageToBeSubmitExamine/index.tsx
View file @
10a6ce93
...
...
@@ -221,7 +221,7 @@ const pageToBeSubmitExamine = () => {
<
Radio
value=
{
0
}
>
不通过
</
Radio
>
</
Radio
.
Group
>
</
Form
.
Item
>
<
Form
.
Item
label=
{
isPass
?
'审核通过原因'
:
'审不核通过原因'
}
rules=
{
[{
required
:
true
,
message
:
'请
选择作废日期
'
}]
}
>
<
Form
.
Item
label=
{
isPass
?
'审核通过原因'
:
'审不核通过原因'
}
rules=
{
[{
required
:
true
,
message
:
'请
输入原因
'
}]
}
>
</
Form
.
Item
>
<
Form
.
Item
label=
''
name=
"opinion"
rules=
{
[{
required
:
true
,
message
:
'审核通过意见'
}]
}
>
...
...
src/pages/contract/funds/addbill/add.tsx
View file @
10a6ce93
import
React
,
{
useState
,
useRef
,
ReactNode
}
from
'react'
import
{
history
,
Link
}
from
'umi'
;
import
React
,
{
useState
,
useRef
}
from
'react'
import
{
history
}
from
'umi'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Card
,
Tabs
}
from
'antd'
;
import
statuStyle
from
'../../common/colorTag'
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
StandardTable
}
from
'god'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
Card
,
Tabs
,
Button
}
from
'antd'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
{
SaveOutlined
,
}
from
'@ant-design/icons'
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
AddInfo
from
'./components/info'
import
InfoTable
from
'./components/table'
import
{
PublicApi
}
from
'@/services/api'
;
const
formActions
=
createFormActions
();
const
{
TabPane
}
=
Tabs
;
const
Add
:
React
.
FC
<
{}
>
=
()
=>
{
const
currentBasic
=
useRef
<
any
>
({});
const
[
basic
,
setbasic
]
=
useState
<
any
>
({});
const
[
flag
,
setflag
]
=
useState
<
any
>
(
false
)
/* 判断是不是手工单 */
const
getflag
=
(
flag
)
=>
{
setflag
(
flag
)
}
const
TabList
=
[
{
name
:
'基本信息'
,
components
:
<
AddInfo
/>
},
{
name
:
'采购物料'
,
components
:
<
InfoTable
/>
},
{
name
:
'基本信息'
,
components
:
<
AddInfo
currentRef=
{
currentBasic
}
getcontractId=
{
getflag
}
/>
},
{
name
:
'采购物料'
,
components
:
<
InfoTable
flag=
{
flag
}
/>
},
]
const
submit
=
async
()
=>
{
const
basicsVO
=
await
currentBasic
.
current
.
get
();
console
.
log
(
basicsVO
)
let
data
=
{
basics
:
basicsVO
.
data
,
detailList
:
[]
}
PublicApi
.
postContractApplyAmountSave
(
data
).
then
(
res
=>
{
console
.
log
(
res
);
})
}
return
(
<
PageHeaderWrapper
title=
"新建请款单"
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
extra=
{
[
<
Button
key=
"1"
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
onClick=
{
()
=>
submit
()
}
>
保存
</
Button
>
]
}
>
<
Card
>
<
Tabs
defaultActiveKey=
"0"
type=
"card"
size=
"small"
>
...
...
src/pages/contract/funds/addbill/components/info.tsx
View file @
10a6ce93
This diff is collapsed.
Click to expand it.
src/pages/contract/funds/addbill/components/table.tsx
View file @
10a6ce93
import
React
,
{
useState
}
from
'react'
;
import
{
Button
,
Table
,
Input
,
Space
,
Typography
}
from
'antd'
import
React
,
{
useState
,
useRef
}
from
'react'
;
import
{
Button
,
Table
,
Input
,
Space
,
Drawer
,
Typography
}
from
'antd'
import
styles
from
'./index.less'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
StandardTable
}
from
'god'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
Submit
from
'@/components/NiceForm/components/Submit'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
import
{
Schema
}
from
"./schema"
import
{
PlusOutlined
}
from
'@ant-design/icons'
import
{
PublicApi
}
from
'@/services/api'
;
const
{
Text
}
=
Typography
;
const
table
:
React
.
FC
<
{}
>
=
()
=>
{
const
table
=
(
props
:
any
)
=>
{
const
{
flag
}
=
props
;
const
refs
=
useRef
({});
const
[
visible
,
setvisible
]
=
useState
<
boolean
>
(
false
);
const
[
rowSelection
,
RowCtl
]
=
useRowSelectionTable
({
customKey
:
'id'
,
type
:
'radio'
});
const
tabcolumns
:
any
=
[
{
title
:
'单据号/摘要'
,
dataIndex
:
'payNum'
,
align
:
'center'
,
...
...
@@ -83,12 +97,34 @@ const table: React.FC<{}> = () => {
payParam
:
''
,
},
]);
const
columnsList
:
any
=
[
]
/***
* @function fetchData 请求表格数据
**/
const
fetchData
=
(
params
:
any
)
=>
{
params
.
applyId
=
0
;
return
new
Promise
(
resolve
=>
{
PublicApi
.
getContractApplyAmountPageDetailList
({
...
params
}).
then
(
res
=>
{
console
.
log
(
res
)
// resolve(res.data)
})
})
}
const
Confirm
=
()
=>
{
}
return
(
<
div
className=
"table"
>
<
div
style=
{
{
padding
:
15
,
}
}
>
{
flag
&&
<
div
style=
{
{
padding
:
15
,
}
}
onClick=
{
()
=>
setvisible
(
!
visible
)
}
>
<
Button
block
type=
'dashed'
><
PlusOutlined
/>
选择待请款单据
</
Button
>
</
div
>
}
<
Table
columns=
{
tabcolumns
}
dataSource=
{
PlanList
}
...
...
@@ -99,6 +135,56 @@ const table: React.FC<{}> = () => {
pagination=
{
false
}
/>
{
/* 选择弹出内容 */
}
<
Drawer
visible=
{
visible
}
onClose=
{
()
=>
setvisible
(
!
visible
)
}
title=
"选择采购合同"
width=
{
900
}
footer=
{
<
div
style=
{
{
textAlign
:
'right'
,
}
}
>
<
Button
onClick=
{
()
=>
setvisible
(
!
visible
)
}
style=
{
{
marginRight
:
8
}
}
>
取消
</
Button
>
<
Button
type=
"primary"
onClick=
{
()
=>
Confirm
()
}
>
确定
</
Button
>
</
div
>
}
destroyOnClose
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
,
}
}
columns=
{
columnsList
}
currentRef=
{
refs
}
rowSelection=
{
rowSelection
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
formilyProps=
{
{
ctx
:
{
inline
:
false
,
schema
:
Schema
,
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'contractNo'
,
FORM_FILTER_PATH
,
);
},
components
:
{
DateRangePickerUnix
,
Submit
}
}
}
}
/>
</
Drawer
>
</
div
>
)
}
...
...
src/pages/contract/manage/add/components/FormList.tsx
View file @
10a6ce93
...
...
@@ -46,7 +46,7 @@ const FormList = (props: any) => {
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
render
:
(
text
,
item
)
=>
<
p
>
{
item
.
brand
?
item
.
brand
.
name
:
''
}
</
p
>
<
span
>
{
item
.
brand
?
item
.
brand
.
name
:
''
}
</
span
>
},
{
title
:
'单位'
,
dataIndex
:
'unitName'
,
align
:
'center'
,
},
{
...
...
@@ -218,7 +218,24 @@ const FormList = (props: any) => {
}
PublicApi
.
getPurchaseQuotedPriceProductlistListContract
(
parmas
).
then
(
res
=>
{
console
.
log
(
res
);
// setData(res.data.data)
let
data
=
res
.
data
.
data
.
map
(
item
=>
{
return
{
code
:
item
.
number
,
// 物料编号
name
:
item
.
name
,
type
:
item
.
model
,
customerCategory
:
{
name
:
item
.
category
,
id
:
item
.
goodsId
},
brand
:
{
name
:
item
.
brand
},
unitName
:
item
.
unit
,
purchaseCount
:
item
.
purchaseCount
,
isHasTax
:
item
.
isTax
,
taxRate
:
item
.
taxProbability
,
price
:
item
.
taxUnitPrice
,
bidCount
:
item
.
awardCount
,
bidAmount
:
item
.
awardPrice
,
}
})
setData
(
data
)
// console.log(data)
})
}
...
...
@@ -248,6 +265,11 @@ const FormList = (props: any) => {
price
:
Number
(
item
.
price
),
bidCount
:
item
.
bidCount
,
bidAmount
:
item
.
bidCount
&&
item
.
price
?
Number
(
item
.
bidCount
)
*
Number
(
item
.
price
)
:
''
,
associatedMaterielNo
:
item
.
id
?
item
.
id
:
''
,
associatedMaterielName
:
item
.
name
?
item
.
name
:
''
,
associatedType
:
item
.
type
?
item
.
type
:
''
,
associatedCategory
:
item
.
customerCategory
!=
null
?
item
.
customerCategory
.
name
:
''
,
associatedBrand
:
item
.
brand
!=
null
?
item
.
brand
.
name
:
''
,
})
})
resolve
({
...
...
@@ -295,7 +317,7 @@ const FormList = (props: any) => {
rowKey=
"id"
columns=
{
columnsTab
}
expandable=
{
{
expandedRowRender
:
record
=>
listItem
(
record
),
expandedRowRender
:
record
=>
Object
.
keys
(
Row
).
length
===
0
?
null
:
listItem
(
record
),
}
}
dataSource=
{
data
}
style=
{
{
...
...
src/pages/contract/manage/add/contracAdd.tsx
View file @
10a6ce93
...
...
@@ -6,6 +6,7 @@ import FormList from './components/FormList'
import
Fromtable
from
'./components/fromtable'
import
ContractText
from
'./components/contractText'
import
{
PublicApi
}
from
'@/services/api'
;
import
{
history
}
from
'umi'
import
{
SaveOutlined
,
}
from
'@ant-design/icons'
...
...
@@ -99,12 +100,13 @@ const Add: React.FC<{}> = (props: any) => {
}
console
.
log
(
param
)
PublicApi
.
postContractManageSave
(
param
).
then
((
res
=>
{
console
.
log
(
'===================================='
);
console
.
log
(
res
);
console
.
log
(
'===================================='
);
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
history
.
push
(
'/memberCenter/contract/manage/add/addList'
)
},
1000
)
}
}))
}
useEffect
(()
=>
{
if
(
sourceType
)
{
setRow
(
JSON
.
parse
(
sessionStorage
.
getItem
(
'record'
)))
...
...
src/pages/contract/manage/add/index.css
View file @
10a6ce93
...
...
@@ -73,11 +73,18 @@
.select
.setBox
:global
.ant-input-number
{
border
:
none
!important
;
background
:
transparent
;
box-shadow
:
none
!important
;
}
.select
.setBox
:global
.select
.ant-input-number
:focus
{
border
:
none
!important
;
background
:
transparent
!important
;
box-shadow
:
none
!important
;
}
.select
.setBox
:global
.ant-input
:focus
,
.select
.setBox
:global
.ant-input-focused
{
border
:
none
!important
;
background
:
transparent
!important
;
box-shadow
:
none
!important
;
}
.select
.setBox
:global
span
{
margin-left
:
10px
;
...
...
src/pages/contract/manage/add/index.less
View file @
10a6ce93
...
...
@@ -83,10 +83,19 @@
.ant-input-number{
border: none !important;
background: transparent;
box-shadow:none !important;
}
.select{
.ant-input-number:focus{
border: none !important;
background: transparent !important;
box-shadow:none !important;
}
}
.ant-input:focus, .ant-input-focused{
border: none !important;
background: transparent !important;
box-shadow:none !important;
}
span{
margin-left: 10px;
...
...
src/pages/contract/manage/details/index.tsx
View file @
10a6ce93
...
...
@@ -54,6 +54,9 @@ const Details = (props: any) => {
const
[
associatedCategory
,
setassociatedCategory
]
=
useState
<
string
>
(
''
)
const
[
targetOffset
,
setTargetOffset
]
=
useState
<
number
|
undefined
>
(
undefined
);
const
[
contractAbstract
,
setcontractAbstract
]
=
useState
(
''
);
/* 总金额 */
const
[
tobidCount
,
settobidCount
]
=
useState
<
number
>
(
0
);
const
[
bidAmount
,
setbidAmount
]
=
useState
<
number
>
(
0
);
const
[
tabPane
]
=
useState
([
{
id
:
'progress'
,
title
:
'流转进度'
},
{
id
:
'process'
,
title
:
'基本流程'
},
...
...
@@ -141,19 +144,21 @@ const Details = (props: any) => {
{
title
:
'单价(含税)'
,
dataIndex
:
'price'
,
align
:
'center'
,
},
{
dataIndex
:
'bidCount'
,
align
:
'center'
,
title
:
(
title
:
(
item
)
=>
{
return
(
<
Space
direction=
'vertical'
>
<
Text
>
授标数量
</
Text
>
<
Text
>
合计: ¥156.000.00
</
Text
>
<
Text
>
合计: ¥
{
tobidCount
}
</
Text
>
</
Space
>
),
)
}
},
{
dataIndex
:
'bidAmount'
,
align
:
'center'
,
title
:
(
<
Space
direction=
'vertical'
>
<
Text
>
金额(不含税)
</
Text
>
<
Text
>
合计: ¥
156.000.00
</
Text
>
<
Text
>
合计: ¥
{
bidAmount
}
</
Text
>
</
Space
>
),
},
...
...
@@ -163,6 +168,15 @@ const Details = (props: any) => {
...
params
,
contractId
}).
then
(
res
=>
{
// bidCount
let
tobidCount
=
0
;
let
bidAmount
=
0
;
res
.
data
.
data
.
map
(
item
=>
{
tobidCount
+=
item
.
bidCount
;
bidAmount
+=
item
.
bidAmount
;
})
settobidCount
(
tobidCount
)
setbidAmount
(
bidAmount
)
setListData
(
res
.
data
.
data
)
setassociatedCategory
(
res
.
data
.
data
[
0
].
setassociatedCategory
)
})
...
...
src/pages/contract/manage/examine/index.tsx
View file @
10a6ce93
...
...
@@ -31,7 +31,7 @@ const Examine = () => {
render
:
(
text
,
record
)
=>
<
div
>
<
EyePreview
url=
{
`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=${record.id}`
}
type=
"button"
>
{
text
}
</
EyePreview
>
...
...
@@ -136,7 +136,7 @@ const Examine = () => {
<
div
>
{
/* /memberCenter/contract/manage/examine/details */
}
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
,
marginRight
:
10
}
}
onClick=
{
()
=>
submitExamine
(
record
.
id
)
}
>
提交审核
</
span
>
<
span
style=
{
{
color
:
'#00B37A'
}
}
>
查看
</
span
>
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
}
}
>
查看
</
span
>
</
div
>
)
}
...
...
src/pages/contract/manage/levelexamine/index.tsx
View file @
10a6ce93
import
React
,
{
useRef
,
useState
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Card
,
Space
,
Button
}
from
'antd'
;
import
{
Card
,
Space
,
Button
,
Modal
,
Radio
,
Input
,
Form
,
message
}
from
'antd'
;
import
statuStyle
from
'../../common/colorTag'
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
StandardTable
}
from
'god'
;
...
...
@@ -14,10 +14,17 @@ import Submit from '@/components/NiceForm/components/Submit'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
import
{
PublicApi
}
from
'@/services/api'
;
const
{
TextArea
}
=
Input
;
const
Levelexamine
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([])
const
[
Visible
,
setIsModalVisible
]
=
useState
<
boolean
>
(
false
)
const
[
id
,
setid
]
=
useState
(
""
)
const
[
selectRow
,
setSelectRow
]
=
useState
<
any
[]
>
([])
// 模态框选择的行数据
const
[
isPass
,
setIsAllMember
]
=
useState
()
const
[
form
]
=
Form
.
useForm
();
//表头
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'合同编号/摘要'
,
...
...
@@ -26,7 +33,7 @@ const Levelexamine = () => {
render
:
(
text
,
record
)
=>
<
div
>
<
EyePreview
url=
{
`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=${record.id}`
}
type=
"button"
>
{
text
}
</
EyePreview
>
...
...
@@ -81,7 +88,7 @@ const Levelexamine = () => {
return
(
<
div
>
<
EyePreview
url=
{
`/memberCenter/contract/manage/QueryList/QueryListdetails`
}
type=
"button"
>
{
text
}
</
EyePreview
>
...
...
@@ -129,12 +136,40 @@ const Levelexamine = () => {
render
:
(
text
,
record
)
=>
{
return
(
<
div
>
<
span
style=
{
{
color
:
'#00B37A'
}
}
>
提交审核
</
span
>
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
,
marginRight
:
10
}
}
onClick=
{
()
=>
submitExamine
(
record
.
id
)
}
>
提交审核
</
span
>
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
,
}
}
>
查看
</
span
>
</
div
>
)
}
}]
/* 提交表单 */
const
submitExamine
=
(
id
)
=>
{
setid
(
id
)
setIsModalVisible
(
!
Visible
)
}
const
onFinish
=
(
values
:
any
)
=>
{
values
.
contractId
=
id
;
const
msg
=
message
.
loading
({
content
:
'正在操作'
,
duration
:
0
,
});
PublicApi
.
postContractManageExamineStepOne
(
values
).
then
(
res
=>
{
console
.
log
(
res
);
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
setIsModalVisible
(
!
Visible
)
}
}).
finally
(()
=>
{
msg
();
});
};
const
handleIsAllMemberChange
=
(
v
:
any
)
=>
{
setIsAllMember
(
v
.
target
.
value
)
}
const
onFinishFailed
=
(
errorInfo
:
any
)
=>
{
console
.
log
(
'Failed:'
,
errorInfo
);
};
// 列表数据
const
fetchData
=
(
params
?:
any
)
=>
{
...
...
@@ -157,6 +192,7 @@ const Levelexamine = () => {
};
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
fetchTableData=
{
params
=>
fetchData
(
params
)
}
...
...
@@ -199,6 +235,33 @@ const Levelexamine = () => {
}
}
/>
</
Card
>
<
Modal
footer=
{
null
}
title=
"提交审核"
visible=
{
Visible
}
onOk=
{
()
=>
setIsModalVisible
(
!
Visible
)
}
onCancel=
{
()
=>
setIsModalVisible
(
!
Visible
)
}
>
<
Form
name=
"basic"
form=
{
form
}
initialValues=
{
{
remember
:
true
}
}
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
<
Form
.
Item
name=
"isPass"
label=
""
rules=
{
[{
required
:
true
,
message
:
'请选择作废日期'
}]
}
initialValue=
{
isPass
}
>
<
Radio
.
Group
onChange=
{
handleIsAllMemberChange
}
>
<
Radio
value=
{
1
}
>
通过
</
Radio
>
<
Radio
value=
{
0
}
>
不通过
</
Radio
>
</
Radio
.
Group
>
</
Form
.
Item
>
<
Form
.
Item
label=
{
isPass
?
'审核通过原因'
:
'审不核通过原因'
}
rules=
{
[{
required
:
true
,
message
:
'请选择作废日期'
}]
}
>
</
Form
.
Item
>
<
Form
.
Item
label=
''
name=
"opinion"
rules=
{
[{
required
:
true
,
message
:
'审核通过意见'
}]
}
>
<
TextArea
placeholder=
"在此输入你的原因,最多60个汉字"
maxLength=
{
120
}
/>
</
Form
.
Item
>
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'flex-end'
}
}
>
<
Button
onClick=
{
()
=>
setIsModalVisible
(
!
Visible
)
}
style=
{
{
marginRight
:
10
}
}
>
取消
</
Button
>
<
Button
type=
"primary"
htmlType=
"submit"
>
保存
</
Button
>
</
div
>
</
Form
>
</
Modal
>
</
PageHeaderWrapper
>
)
}
...
...
src/pages/contract/manage/secondaryexamine/index.tsx
View file @
10a6ce93
import
React
,
{
useRef
,
useState
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Card
,
Space
,
Button
}
from
'antd'
;
import
{
Card
,
Space
,
Button
,
Modal
,
Radio
,
Input
,
Form
,
message
}
from
'antd'
;
import
statuStyle
from
'../../common/colorTag'
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
StandardTable
}
from
'god'
;
...
...
@@ -13,11 +13,16 @@ 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'
;
const
{
TextArea
}
=
Input
;
const
Secondaryexamine
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([])
const
[
Visible
,
setIsModalVisible
]
=
useState
<
boolean
>
(
false
)
const
[
id
,
setid
]
=
useState
(
""
)
const
[
selectRow
,
setSelectRow
]
=
useState
<
any
[]
>
([])
// 模态框选择的行数据
const
[
isPass
,
setIsAllMember
]
=
useState
()
const
[
form
]
=
Form
.
useForm
();
//表头
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'合同编号/摘要'
,
...
...
@@ -129,12 +134,41 @@ const Secondaryexamine = () => {
render
:
(
text
,
record
)
=>
{
return
(
<
div
>
<
span
style=
{
{
color
:
'#00B37A'
}
}
>
提交审核
</
span
>
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
,
marginRight
:
10
}
}
onClick=
{
()
=>
submitExamine
(
record
.
id
)
}
>
提交审核
</
span
>
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
,
}
}
>
查看
</
span
>
</
div
>
)
}
}]
/* 提交表单 */
const
submitExamine
=
(
id
)
=>
{
setid
(
id
)
setIsModalVisible
(
!
Visible
)
}
const
onFinish
=
(
values
:
any
)
=>
{
values
.
contractId
=
id
;
const
msg
=
message
.
loading
({
content
:
'正在操作'
,
duration
:
0
,
});
PublicApi
.
postContractManageExamineStepTwo
(
values
).
then
(
res
=>
{
console
.
log
(
res
);
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
setIsModalVisible
(
!
Visible
)
}
}).
finally
(()
=>
{
msg
();
});
};
const
handleIsAllMemberChange
=
(
v
:
any
)
=>
{
setIsAllMember
(
v
.
target
.
value
)
}
const
onFinishFailed
=
(
errorInfo
:
any
)
=>
{
console
.
log
(
'Failed:'
,
errorInfo
);
};
// 列表数据
const
fetchData
=
(
params
?:
any
)
=>
{
...
...
@@ -157,6 +191,7 @@ const Secondaryexamine = () => {
};
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
fetchTableData=
{
params
=>
fetchData
(
params
)
}
...
...
@@ -199,6 +234,33 @@ const Secondaryexamine = () => {
}
}
/>
</
Card
>
<
Modal
footer=
{
null
}
title=
"提交审核"
visible=
{
Visible
}
onOk=
{
()
=>
setIsModalVisible
(
!
Visible
)
}
onCancel=
{
()
=>
setIsModalVisible
(
!
Visible
)
}
>
<
Form
name=
"basic"
form=
{
form
}
initialValues=
{
{
remember
:
true
}
}
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
<
Form
.
Item
name=
"isPass"
label=
""
rules=
{
[{
required
:
true
,
message
:
'请选择作废日期'
}]
}
initialValue=
{
isPass
}
>
<
Radio
.
Group
onChange=
{
handleIsAllMemberChange
}
>
<
Radio
value=
{
1
}
>
通过
</
Radio
>
<
Radio
value=
{
0
}
>
不通过
</
Radio
>
</
Radio
.
Group
>
</
Form
.
Item
>
<
Form
.
Item
label=
{
isPass
?
'审核通过原因'
:
'审不核通过原因'
}
rules=
{
[{
required
:
true
,
message
:
'请选择作废日期'
}]
}
>
</
Form
.
Item
>
<
Form
.
Item
label=
''
name=
"opinion"
rules=
{
[{
required
:
true
,
message
:
'审核通过意见'
}]
}
>
<
TextArea
placeholder=
"在此输入你的原因,最多60个汉字"
maxLength=
{
120
}
/>
</
Form
.
Item
>
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'flex-end'
}
}
>
<
Button
onClick=
{
()
=>
setIsModalVisible
(
!
Visible
)
}
style=
{
{
marginRight
:
10
}
}
>
取消
</
Button
>
<
Button
type=
"primary"
htmlType=
"submit"
>
保存
</
Button
>
</
div
>
</
Form
>
</
Modal
>
</
PageHeaderWrapper
>
)
}
...
...
src/pages/contract/manage/signacontract/index.tsx
View file @
10a6ce93
import
React
,
{
useRef
,
useState
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Card
,
Space
,
Button
}
from
'antd'
;
import
{
Card
,
Space
,
Button
,
Modal
,
Radio
,
Input
,
Form
,
message
}
from
'antd'
;
import
statuStyle
from
'../../common/colorTag'
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
StandardTable
}
from
'god'
;
...
...
@@ -14,10 +14,16 @@ import Submit from '@/components/NiceForm/components/Submit'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
import
{
PublicApi
}
from
'@/services/api'
;
const
{
TextArea
}
=
Input
;
const
Signacontract
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([])
const
[
selectRow
,
setSelectRow
]
=
useState
<
any
[]
>
([])
// 模态框选择的行数据
const
[
Visible
,
setIsModalVisible
]
=
useState
<
boolean
>
(
false
)
const
[
id
,
setid
]
=
useState
(
""
)
const
[
isPass
,
setIsAllMember
]
=
useState
()
const
[
form
]
=
Form
.
useForm
();
//表头
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'合同编号/摘要'
,
...
...
@@ -129,7 +135,8 @@ const Signacontract = () => {
render
:
(
text
,
record
)
=>
{
return
(
<
div
>
<
span
style=
{
{
color
:
'#00B37A'
}
}
>
提交审核
</
span
>
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
,
marginRight
:
10
}
}
onClick=
{
()
=>
submitExamine
(
record
.
id
)
}
>
签订合同
</
span
>
{
/* <span style={{ color: '#00B37A', cursor: 'pointer', }}></span> */
}
</
div
>
)
}
...
...
@@ -156,7 +163,37 @@ const Signacontract = () => {
}
};
/* 提交表单 */
const
submitExamine
=
(
id
)
=>
{
setid
(
id
)
setIsModalVisible
(
!
Visible
)
}
const
onFinish
=
(
values
:
any
)
=>
{
values
.
contractId
=
id
;
const
msg
=
message
.
loading
({
content
:
'正在操作'
,
duration
:
0
,
});
PublicApi
.
postContractManageSign
(
values
).
then
(
res
=>
{
console
.
log
(
res
);
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
setIsModalVisible
(
!
Visible
)
}
}).
finally
(()
=>
{
msg
();
});
};
const
handleIsAllMemberChange
=
(
v
:
any
)
=>
{
setIsAllMember
(
v
.
target
.
value
)
}
const
onFinishFailed
=
(
errorInfo
:
any
)
=>
{
console
.
log
(
'Failed:'
,
errorInfo
);
};
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
fetchTableData=
{
params
=>
fetchData
(
params
)
}
...
...
@@ -199,6 +236,33 @@ const Signacontract = () => {
}
}
/>
</
Card
>
<
Modal
footer=
{
null
}
title=
"提交审核"
visible=
{
Visible
}
onOk=
{
()
=>
setIsModalVisible
(
!
Visible
)
}
onCancel=
{
()
=>
setIsModalVisible
(
!
Visible
)
}
>
<
Form
name=
"basic"
form=
{
form
}
initialValues=
{
{
remember
:
true
}
}
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
<
Form
.
Item
name=
"isPass"
label=
""
rules=
{
[{
required
:
true
,
message
:
'请选择作废日期'
}]
}
initialValue=
{
isPass
}
>
<
Radio
.
Group
onChange=
{
handleIsAllMemberChange
}
>
<
Radio
value=
{
1
}
>
同意签订
</
Radio
>
<
Radio
value=
{
0
}
>
不同意签订
</
Radio
>
</
Radio
.
Group
>
</
Form
.
Item
>
<
Form
.
Item
label=
{
isPass
?
'不同意签订原因'
:
'同意签订原因'
}
rules=
{
[{
required
:
true
,
message
:
'请选择作废日期'
}]
}
>
</
Form
.
Item
>
<
Form
.
Item
label=
''
name=
"opinion"
rules=
{
[{
required
:
true
,
message
:
'审核通过意见'
}]
}
>
<
TextArea
placeholder=
"在此输入你的原因,最多60个汉字"
maxLength=
{
120
}
/>
</
Form
.
Item
>
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'flex-end'
}
}
>
<
Button
onClick=
{
()
=>
setIsModalVisible
(
!
Visible
)
}
style=
{
{
marginRight
:
10
}
}
>
取消
</
Button
>
<
Button
type=
"primary"
htmlType=
"submit"
>
保存
</
Button
>
</
div
>
</
Form
>
</
Modal
>
</
PageHeaderWrapper
>
)
}
...
...
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