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
13102e77
Commit
13102e77
authored
May 06, 2021
by
alwayOnlie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
c246086e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
269 additions
and
13 deletions
+269
-13
index.tsx
src/pages/contract/coordination/details/index.tsx
+1
-0
info.tsx
src/pages/contract/funds/addbill/components/info.tsx
+30
-10
index.tsx
src/pages/contract/manage/QueryList/index.tsx
+1
-1
addList.tsx
src/pages/contract/manage/add/addList.tsx
+1
-1
information.tsx
src/pages/contract/manage/editing/components/information.tsx
+155
-0
index.tsx
src/pages/contract/manage/editing/index.tsx
+80
-0
index.ts
src/pages/contract/manage/schema/index.ts
+1
-1
No files found.
src/pages/contract/coordination/details/index.tsx
View file @
13102e77
...
...
@@ -436,6 +436,7 @@ const Details = (props: any) => {
fontSize
:
'14px'
,
color
:
'#909399'
,
}
}
onClick=
{
()
=>
history
.
goBack
()
}
/>
<
span
style=
{
{
...
...
src/pages/contract/funds/addbill/components/info.tsx
View file @
13102e77
...
...
@@ -53,11 +53,6 @@ const AddInfo = (props: any) => {
/* 付款阶段 */
const
[
payPlanList
,
setpayPlanList
]
=
useState
<
any
>
([]);
/* 选中设置值 */
// const tag = [
// { name: '账期(默认)', Index: 1 },
// { name: '现结', Index: 2 },
// { name: '月结', Index: 3 },
// ]
const
[
Index
,
setIndex
]
=
useState
<
number
>
(
1
)
const
columnsList
:
any
=
[
{
...
...
@@ -119,7 +114,6 @@ const AddInfo = (props: any) => {
const
basic
=
basics
;
basics
[
key
]
=
e
;
setBasics
(
basic
);
console
.
log
(
e
,
key
);
}
/* 确认回显数据 */
const
Confirm
=
()
=>
{
...
...
@@ -145,6 +139,7 @@ const AddInfo = (props: any) => {
basicsData
.
contractId
=
selectRow
.
id
;
basicsData
.
payParam
=
res
.
data
.
payPlanList
[
0
].
payParam
info
.
startTime
=
selectRow
.
startTime
;
basicsData
.
applyAmount
=
res
.
data
.
payPlanList
[
0
].
payAmount
;
setapplyAmount
(
res
.
data
.
payPlanList
[
0
].
payAmount
)
info
.
status
=
"同意签订合同"
;
setpayPlanList
(
res
.
data
.
payPlanList
)
...
...
@@ -157,7 +152,8 @@ const AddInfo = (props: any) => {
tagList
.
push
({
name
:
item
.
payWay
==
1
?
'账期'
:
item
.
payWay
==
2
?
'月结'
:
'现结'
,
payParam
:
item
.
payParam
,
Index
:
index
+
1
Index
:
index
+
1
,
id
:
item
.
id
,
})
})
setTag
(
tagList
)
...
...
@@ -210,8 +206,32 @@ const AddInfo = (props: any) => {
})
})
}
return
(
/* 切换请款金额 */
const
onSelect
=
(
e
)
=>
{
setBasicsKey
(
e
)
}
/* 切换 给对应的赋值 */
const
setBasicsKey
=
(
id
:
string
)
=>
{
let
key
:
any
=
{};
payPlanList
.
some
((
item
:
any
,
index
:
number
)
=>
{
item
.
Index
=
index
+
1
;
if
(
item
.
id
==
id
)
{
key
=
item
}
})
console
.
log
(
key
);
const
basicsData
=
basics
;
basicsData
.
applyAmount
=
key
.
payAmount
;
basicsData
.
payWay
=
key
.
payWay
;
basicsData
.
payPlanId
=
key
.
id
;
basicsData
.
expectPayTime
=
moment
(
key
.
expectPayTime
),
basicsData
.
payRatio
=
key
.
payRatio
;
setBasics
(
basicsData
)
setIndex
(
key
.
Index
);
attrValueForm
.
setFieldsValue
(
basicsData
);
}
return
(
<
div
>
<
Form
form=
{
attrValueForm
}
...
...
@@ -281,7 +301,7 @@ const AddInfo = (props: any) => {
initialValue=
{
basics
.
payPlanId
}
labelCol=
{
{
span
:
4
}
}
wrapperCol=
{
{
span
:
18
}
}
>
<
Select
// onChange={(e) => onSelectChange
(e)}
onChange=
{
(
e
)
=>
onSelect
(
e
)
}
>
{
payPlanList
.
map
(
item
=>
(
...
...
@@ -335,7 +355,7 @@ const AddInfo = (props: any) => {
{
tag
.
map
((
item
:
any
)
=>
{
return
(
<
span
className=
{
item
.
Index
==
Index
?
styles
.
tative
:
styles
.
tag
}
onClick=
{
()
=>
set
Index
(
item
.
Index
)
}
>
{
item
.
name
}
</
span
>
<
span
className=
{
item
.
Index
==
Index
?
styles
.
tative
:
styles
.
tag
}
onClick=
{
()
=>
set
BasicsKey
(
item
.
id
)
}
>
{
item
.
name
}
</
span
>
)
})
}
...
...
src/pages/contract/manage/QueryList/index.tsx
View file @
13102e77
...
...
@@ -221,7 +221,7 @@ const QueryList = () => {
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'
order
No'
,
'
contract
No'
,
FORM_FILTER_PATH
,
);
},
...
...
src/pages/contract/manage/add/addList.tsx
View file @
13102e77
...
...
@@ -162,7 +162,7 @@ const addList = () => {
/* 修改 */
const
edit
=
(
record
)
=>
{
history
.
push
(
`/memberCenter/contract/manage/add/addList/
contracAdd?sourceType=
${
record
.
sourceType
}
&i
d=
${
record
.
id
}
`
)
history
.
push
(
`/memberCenter/contract/manage/add/addList/
editing?contractI
d=
${
record
.
id
}
`
)
}
/* 提交审核 */
...
...
src/pages/contract/manage/editing/components/information.tsx
0 → 100644
View file @
13102e77
import
React
,
{
useState
,
useEffect
,
forwardRef
}
from
'react'
;
import
{
Button
,
Input
,
Select
,
DatePicker
,
Form
,
Drawer
}
from
'antd'
import
{
PublicApi
}
from
'@/services/api'
;
import
moment
from
'moment'
;
const
{
Option
}
=
Select
;
const
{
RangePicker
}
=
DatePicker
;
const
Information
=
(
props
:
any
)
=>
{
const
{
currentRef
,
basic
}
=
props
;
const
[
attrValueForm
]
=
Form
.
useForm
();
/**
* @param {{basicsVO}} 表单数据集合
* */
useEffect
(()
=>
{
console
.
log
(
basic
)
attrValueForm
.
setFieldsValue
(
basic
)
},
[
basic
])
useEffect
(()
=>
{
currentRef
.
current
=
{
get
:
()
=>
new
Promise
((
resolve
:
any
)
=>
{
attrValueForm
.
validateFields
().
then
(
res
=>
{
resolve
({
state
:
true
,
name
:
'basic'
,
data
:
res
})
}).
catch
(
error
=>
{
if
(
error
&&
error
.
errorFields
)
{
}
})
})
}
})
const
rangeConfig
=
{
rules
:
[{
type
:
'array'
as
const
,
required
:
true
,
message
:
' 请选择开始或者结束时间'
}],
};
return
(
<
div
>
<
Form
form=
{
attrValueForm
}
name=
"edit_infomation"
layout=
"horizontal"
labelAlign=
"left"
colon=
{
false
}
autoComplete=
"off"
>
<
Form
.
Item
label=
"合同编号"
labelAlign=
"left"
name=
"contractNo"
labelCol=
{
{
span
:
2
}
}
wrapperCol=
{
{
span
:
8
}
}
initialValue=
{
basic
.
contractNo
}
rules=
{
[
{
required
:
true
,
message
:
'请输入合同编号'
,
},
]
}
>
{
/* disabled */
}
<
Input
placeholder=
'请输入合同编号'
disabled
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"合同摘要"
labelAlign=
"left"
name=
"contractAbstract"
labelCol=
{
{
span
:
2
}
}
wrapperCol=
{
{
span
:
8
}
}
rules=
{
[
{
required
:
true
,
message
:
'请输入合同摘要'
,
},
]
}
>
<
Input
placeholder=
'请输入合同摘要'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"寻源类型"
labelAlign=
"left"
name=
"sourceType"
labelCol=
{
{
span
:
2
}
}
wrapperCol=
{
{
span
:
8
}
}
initialValue=
{
basic
.
sourceType
}
rules=
{
[
{
required
:
true
,
message
:
'请选择寻源类型'
,
},
]
}
>
<
Select
disabled
>
<
Option
value=
"1"
>
采购询价
</
Option
>
<
Option
value=
"2"
>
采购招标
</
Option
>
<
Option
value=
"3"
>
采购竞价
</
Option
>
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
label=
"合同有效期"
labelAlign=
"left"
labelCol=
{
{
span
:
2
}
}
wrapperCol=
{
{
span
:
8
}
}
name=
"range-picker"
{
...
rangeConfig
}
>
<
RangePicker
style=
{
{
width
:
'100%'
}
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"对应单据"
labelAlign=
"left"
labelCol=
{
{
span
:
2
}
}
name=
"sourceNo"
initialValue=
{
basic
.
sourceNo
?
basic
.
sourceNo
:
''
}
wrapperCol=
{
{
span
:
8
}
}
>
<
Input
placeholder=
'最长60个字符,30个汉字'
disabled
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"授标会员"
labelAlign=
"left"
labelCol=
{
{
span
:
2
}
}
name=
"partyBName"
initialValue=
{
basic
.
partyBName
?
basic
.
partyBName
:
''
}
wrapperCol=
{
{
span
:
8
}
}
rules=
{
[
{
required
:
true
,
message
:
'请选择授标会员'
,
},
]
}
>
<
Input
placeholder=
'最长60个字符,30个汉字'
disabled
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"授标金额"
labelAlign=
"left"
labelCol=
{
{
span
:
2
}
}
wrapperCol=
{
{
span
:
8
}
}
>
<
p
>
{
basic
.
totalAmount
?
`¥${basic.totalAmount}`
:
''
}
</
p
>
</
Form
.
Item
>
</
Form
>
</
div
>
)
}
export
default
forwardRef
(
Information
)
src/pages/contract/manage/editing/index.tsx
0 → 100644
View file @
13102e77
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'react'
import
{
Button
,
Card
,
Tabs
,
Form
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PublicApi
}
from
'@/services/api'
;
import
{
history
}
from
'umi'
import
Information
from
'./components/information'
import
{
SaveOutlined
,
}
from
'@ant-design/icons'
const
{
TabPane
}
=
Tabs
;
const
Editing
:
React
.
FC
<
{}
>
=
(
props
:
any
)
=>
{
const
{
location
:
{
query
:
{
contractId
,
// 寻源类型
}
}
}
=
props
;
const
currentBasic
=
useRef
<
any
>
({});
const
purchaseMate
=
useRef
<
any
>
([])
const
payPlan
=
useRef
<
any
>
([])
const
contractText
=
useRef
<
any
>
({})
/**
* @param name tag标签名
* @param components 显示内容
*/
const
[
basic
,
setbasic
]
=
useState
<
any
>
({});
const
[
purchaseMaterielList
,
setpurchaseMaterielList
]
=
useState
<
any
>
({})
const
[
payPlanList
,
setpayPlanList
]
=
useState
<
any
>
([]);
const
TabList
=
[
{
name
:
'基本信息'
,
components
:
<
Information
currentRef=
{
currentBasic
}
basic=
{
basic
}
/>
},
{
name
:
'采购物料'
,
components
:
2
},
{
name
:
'付款计划'
,
components
:
3
},
{
name
:
'合同文本'
,
components
:
5
},
]
useEffect
(()
=>
{
PublicApi
.
getContractManageGetDetail
({
contractId
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
console
.
log
(
res
);
const
{
basics
}
=
res
.
data
;
basic
.
sourceType
=
String
(
basic
.
sourceType
);
console
.
log
(
basics
.
sourceType
)
setbasic
(
basics
)
}
})
console
.
log
(
contractId
);
},
[])
return
(
<
PageHeaderWrapper
title=
"新建合同"
extra=
{
[
<
Button
key=
"1"
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
>
保存
</
Button
>
]
}
>
<
Card
>
<
Tabs
defaultActiveKey=
"0"
type=
"card"
size=
"small"
>
{
TabList
.
map
((
item
,
index
)
=>
(
<
TabPane
tab=
{
item
.
name
}
key=
{
index
}
>
{
item
.
components
}
</
TabPane
>
))
}
</
Tabs
>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
Editing
;
src/pages/contract/manage/schema/index.ts
View file @
13102e77
...
...
@@ -283,7 +283,7 @@ export const userchema: any = {
export
const
QueryListSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
order
No
:
{
contract
No
:
{
type
:
'string'
,
"x-component"
:
'SearchFilter'
,
'x-component-props'
:
{
...
...
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