Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
shuniu-admin-react
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
superman
shuniu-admin-react
Commits
92d0fce3
Commit
92d0fce3
authored
Jul 28, 2016
by
superman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
3055db68
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
191 additions
and
151 deletions
+191
-151
.gitignore
.gitignore
+1
-0
workspace.xml
.idea/workspace.xml
+60
-50
DateTimeStatusForm.jsx
src/components/ProductForm/DateTimeStatusForm.jsx
+60
-55
ElementForm.jsx
src/components/ProductForm/ElementForm.jsx
+70
-46
No files found.
.gitignore
View file @
92d0fce3
node_modules
.DS_Store
.idea
.idea/workspace.xml
View file @
92d0fce3
...
...
@@ -2,14 +2,10 @@
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"ec208c71-5ff8-4642-a786-fad4f24be9b8"
name=
"Default"
comment=
""
>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/.gitignore"
afterPath=
"$PROJECT_DIR$/.gitignore"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/src/components/ProductForm/BaseInfoForm.jsx"
afterPath=
"$PROJECT_DIR$/src/components/ProductForm/BaseInfoForm.jsx"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/src/components/ProductForm/HuikuanInfoForm.jsx"
afterPath=
"$PROJECT_DIR$/src/components/ProductForm/HuikuanInfoForm.jsx"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/src/components/ProductForm/ShouyiYongjingForm.jsx"
afterPath=
"$PROJECT_DIR$/src/components/ProductForm/ShouyiYongjingForm.jsx"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/src/containers/Product/AddItem.jsx"
afterPath=
"$PROJECT_DIR$/src/containers/Product/AddItem.jsx"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/src/containers/Product/EditItem.jsx"
afterPath=
"$PROJECT_DIR$/src/containers/Product/EditItem.jsx"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/src/containers/Remittance/PassItem.jsx"
afterPath=
"$PROJECT_DIR$/src/containers/Remittance/PassItem.jsx"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/src/utils.js"
afterPath=
"$PROJECT_DIR$/src/utils.js"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/src/components/ProductForm/DateTimeStatusForm.jsx"
afterPath=
"$PROJECT_DIR$/src/components/ProductForm/DateTimeStatusForm.jsx"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/src/components/ProductForm/ElementForm.jsx"
afterPath=
"$PROJECT_DIR$/src/components/ProductForm/ElementForm.jsx"
/>
</list>
<ignored
path=
"shuniu-admin.iws"
/>
<ignored
path=
".idea/workspace.xml"
/>
...
...
@@ -90,7 +86,7 @@
</provider>
</entry>
</file>
<file
leaf-file-name=
"BaseInfoForm.jsx"
pinned=
"false"
current-in-tab=
"
tru
e"
>
<file
leaf-file-name=
"BaseInfoForm.jsx"
pinned=
"false"
current-in-tab=
"
fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/src/components/ProductForm/BaseInfoForm.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"447"
>
...
...
@@ -103,11 +99,11 @@
</provider>
</entry>
</file>
<file
leaf-file-name=
"
AddIte
m.jsx"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/co
ntainers/Product/AddIte
m.jsx"
>
<file
leaf-file-name=
"
ElementFor
m.jsx"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/co
mponents/ProductForm/ElementFor
m.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
282
"
>
<caret
line=
"1
50"
column=
"82"
selection-start-line=
"150"
selection-start-column=
"82"
selection-end-line=
"150"
selection-end-column=
"8
2"
/>
<state
relative-caret-position=
"
357
"
>
<caret
line=
"1
46"
column=
"52"
selection-start-line=
"146"
selection-start-column=
"52"
selection-end-line=
"146"
selection-end-column=
"5
2"
/>
<folding>
<element
signature=
"e#0#50#0"
expanded=
"true"
/>
</folding>
...
...
@@ -115,11 +111,11 @@
</provider>
</entry>
</file>
<file
leaf-file-name=
"
EditIte
m.jsx"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/co
ntainers/Product/EditIte
m.jsx"
>
<file
leaf-file-name=
"
DateTimeStatusFor
m.jsx"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/co
mponents/ProductForm/DateTimeStatusFor
m.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
43
2"
>
<caret
line=
"1
20"
column=
"128"
selection-start-line=
"120"
selection-start-column=
"128"
selection-end-line=
"120"
selection-end-column=
"128
"
/>
<state
relative-caret-position=
"
115
2"
>
<caret
line=
"1
52"
column=
"40"
selection-start-line=
"152"
selection-start-column=
"40"
selection-end-line=
"152"
selection-end-column=
"40
"
/>
<folding>
<element
signature=
"e#0#50#0"
expanded=
"true"
/>
</folding>
...
...
@@ -127,13 +123,23 @@
</provider>
</entry>
</file>
<file
leaf-file-name=
"
product.js"
pinned=
"false"
current-in-tab=
"fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/
src/reducers/product.js
"
>
<file
leaf-file-name=
"
.gitignore"
pinned=
"false"
current-in-tab=
"tru
e"
>
<entry
file=
"file://$PROJECT_DIR$/
.gitignore
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"522"
>
<caret
line=
"50"
column=
"16"
selection-start-line=
"50"
selection-start-column=
"16"
selection-end-line=
"50"
selection-end-column=
"16"
/>
<state
relative-caret-position=
"30"
>
<caret
line=
"2"
column=
"5"
selection-start-line=
"2"
selection-start-column=
"5"
selection-end-line=
"2"
selection-end-column=
"5"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"AddItem.jsx"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/containers/Product/AddItem.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"282"
>
<caret
line=
"150"
column=
"82"
selection-start-line=
"150"
selection-start-column=
"82"
selection-end-line=
"150"
selection-end-column=
"82"
/>
<folding>
<element
signature=
"e#0#
44
#0"
expanded=
"true"
/>
<element
signature=
"e#0#
50
#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
...
...
@@ -152,8 +158,6 @@
<component
name=
"IdeDocumentHistory"
>
<option
name=
"CHANGED_PATHS"
>
<list>
<option
value=
"$PROJECT_DIR$/src/reducers/costomMessage.js"
/>
<option
value=
"$PROJECT_DIR$/src/services/customMessage.js"
/>
<option
value=
"$PROJECT_DIR$/src/sagas/customMessage.js"
/>
<option
value=
"$PROJECT_DIR$/src/containers/CustomMessage/Item.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/containers/Trade/Item.jsx"
/>
...
...
@@ -161,7 +165,6 @@
<option
value=
"$PROJECT_DIR$/src/components/CopyToClipboard/CopyToClipboard.less"
/>
<option
value=
"$PROJECT_DIR$/src/components/CopyToClipboard/CopyToClipboard.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/containers/BaseFunction/BaseUpload.less"
/>
<option
value=
"$PROJECT_DIR$/.gitignore"
/>
<option
value=
"$PROJECT_DIR$/src/containers/BaseFunction/BaseUpload.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/reducers/product.js"
/>
<option
value=
"$PROJECT_DIR$/src/components/MainHeader.jsx"
/>
...
...
@@ -203,6 +206,9 @@
<option
value=
"$PROJECT_DIR$/src/components/FormItem/FormItem.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/components/ProductForm/HuikuanInfoForm.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/components/ProductForm/BaseInfoForm.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/components/ProductForm/ElementForm.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/components/ProductForm/DateTimeStatusForm.jsx"
/>
<option
value=
"$PROJECT_DIR$/.gitignore"
/>
</list>
</option>
</component>
...
...
@@ -1088,12 +1094,12 @@
<workItem
from=
"1468394206076"
duration=
"1879000"
/>
<workItem
from=
"1468396235889"
duration=
"33823000"
/>
<workItem
from=
"1468540294765"
duration=
"94258000"
/>
<workItem
from=
"1468995021353"
duration=
"19
5783
000"
/>
<workItem
from=
"1468995021353"
duration=
"19
6626
000"
/>
</task>
<servers
/>
</component>
<component
name=
"TimeTrackingManager"
>
<option
name=
"totallyTimeSpent"
value=
"32
5743
000"
/>
<option
name=
"totallyTimeSpent"
value=
"32
6586
000"
/>
</component>
<component
name=
"TodoView"
>
<todo-panel
id=
"selected-file"
>
...
...
@@ -1178,30 +1184,6 @@
<watches-manager
/>
</component>
<component
name=
"editorHistoryManager"
>
<entry
file=
"file://$PROJECT_DIR$/node_modules/antd/lib/table/style/index.less"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"0"
>
<caret
line=
"0"
column=
"0"
selection-start-line=
"0"
selection-start-column=
"0"
selection-end-line=
"0"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/node_modules/antd/lib/style/components.less"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"0"
>
<caret
line=
"0"
column=
"0"
selection-start-line=
"0"
selection-start-column=
"0"
selection-end-line=
"0"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/node_modules/antd/lib/style/themes/default.less"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"15"
>
<caret
line=
"1"
column=
"0"
selection-start-line=
"1"
selection-start-column=
"0"
selection-end-line=
"5"
selection-end-column=
"31"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/variable.less"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"90"
>
...
...
@@ -1639,6 +1621,34 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/components/ProductForm/ElementForm.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"357"
>
<caret
line=
"146"
column=
"52"
selection-start-line=
"146"
selection-start-column=
"52"
selection-end-line=
"146"
selection-end-column=
"52"
/>
<folding>
<element
signature=
"e#0#50#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/components/ProductForm/DateTimeStatusForm.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1152"
>
<caret
line=
"152"
column=
"40"
selection-start-line=
"152"
selection-start-column=
"40"
selection-end-line=
"152"
selection-end-column=
"40"
/>
<folding>
<element
signature=
"e#0#50#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/.gitignore"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"30"
>
<caret
line=
"2"
column=
"5"
selection-start-line=
"2"
selection-start-column=
"5"
selection-end-line=
"2"
selection-end-column=
"5"
/>
<folding
/>
</state>
</provider>
</entry>
</component>
<component
name=
"masterDetails"
>
<states>
...
...
src/components/ProductForm/DateTimeStatusForm.jsx
View file @
92d0fce3
...
...
@@ -25,6 +25,7 @@ import {
formatDateTime
,
arrayRemoveIndex
,
UUID
,
NULL
,
formItemLayout
,
smallFormItemLayout
,
footerFormSubmitLayout
...
...
@@ -91,63 +92,67 @@ export default class DateTimeSatausForm extends Component {
return
(
<
Spin
spinning=
{
loading
}
>
<
Form
horizontal
onSubmit=
{
this
.
handleSubmit
.
bind
(
this
)
}
>
{
!
isCreate
&&
<
Form
.
Item
label=
"产品状态"
{
...
formItemLayout
}
wrapperCol=
{
{
span
:
20
}
}
>
<
Radio
.
Group
{
...
getFieldProps
('
status
',
{
initialValue
:
product
.
status
+
''})}
>
<
Row
style=
{
{
padding
:
'0 20px'
}
}
>
<
Col
span=
"24"
>
{
!
isCreate
&&
<
Form
.
Item
label=
"产品状态"
{
...
formItemLayout
}
wrapperCol=
{
{
span
:
20
}
}
>
<
Radio
.
Group
{
...
getFieldProps
('
status
',
{
initialValue
:
product
.
status
+
''})}
>
{
ProductStatus
.
map
((
status
,
index
)
=>
<
Radio
.
Button
key=
{
status
}
data
-
value=
{
status
}
value=
{
status
}
>
{
PRODUCT_STATUS
[
status
]
}
</
Radio
.
Button
>
)
}
</
Radio
.
Group
>
</
Form
.
Item
>
}
<
Form
.
Item
label=
"预约开始时间"
{
...
formItemLayout
}
>
<
DatePicker
showTime
format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"请选择预约开始时间"
{
...
getFieldProps
('
fundReservationStartTime
',
{
initialValue
:
fundReservationStartTime
?
formatDateTime
(
fundReservationStartTime
)
:
''
})}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"募集开始与结束时间"
{
...
formItemLayout
}
>
<
DatePicker
.
RangePicker
showTime
format=
"yyyy-MM-dd HH:mm:ss"
{
...
getFieldProps
('
fundRaisedStartTime
',
{
initialValue
:
[
fundReservationStartTime
?
formatDateTime
(
fundReservationStartTime
)
:
'',
fundRaisedEndTime
?
formatDateTime
(
fundRaisedEndTime
)
:
''
]
})}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"汇款结束时间"
{
...
formItemLayout
}
>
<
DatePicker
showTime
format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"请选择汇款结束时间"
{
...
getFieldProps
('
remittanceEndTime
',
{
initialValue
:
remittanceEndTime
?
formatDateTime
(
remittanceEndTime
)
:
''
})}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"基金成立与到期时间"
{
...
formItemLayout
}
>
<
DatePicker
.
RangePicker
showTime
format=
"yyyy-MM-dd HH:mm:ss"
{
...
getFieldProps
('
fundEstablishedTime
',
{
initialValue
:
[
fundEstablishedTime
?
formatDateTime
(
fundEstablishedTime
)
:
'',
fundExpireTime
?
formatDateTime
(
fundExpireTime
)
:
''
]
})}
/>
</
Form
.
Item
>
<
Form
.
Item
{
...
footerFormSubmitLayout
}
style=
{
{
marginTop
:
30
}
}
>
<
Button
type=
"primary"
htmlType=
"submit"
loading=
{
loading
}
><
Icon
type=
"save"
/>
保存
</
Button
>
{
ProductStatus
.
map
((
status
,
index
)
=>
<
Radio
.
Button
key=
{
status
}
data
-
value=
{
status
}
value=
{
status
}
>
{
PRODUCT_STATUS
[
status
]
}
</
Radio
.
Button
>
)
!
this
.
props
.
isCreate
&&
<
Button
onClick=
{
e
=>
{
e
.
preventDefault
();
this
.
props
.
history
.
goBack
();}
}
style=
{
{
marginLeft
:
'1em'
}
}
>
<
Icon
type=
"rollback"
/>
返回
</
Button
>
}
</
Radio
.
Group
>
</
Form
.
Item
>
}
<
Form
.
Item
label=
"预约开始时间"
{
...
formItemLayout
}
>
<
DatePicker
showTime
format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"请选择预约开始时间"
{
...
getFieldProps
('
fundReservationStartTime
',
{
initialValue
:
fundReservationStartTime
?
formatDateTime
(
fundReservationStartTime
)
:
''
})}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"募集开始与结束时间"
{
...
formItemLayout
}
>
<
DatePicker
.
RangePicker
showTime
format=
"yyyy-MM-dd HH:mm:ss"
{
...
getFieldProps
('
fundRaisedStartTime
',
{
initialValue
:
[
fundReservationStartTime
?
formatDateTime
(
fundReservationStartTime
)
:
'',
fundRaisedEndTime
?
formatDateTime
(
fundRaisedEndTime
)
:
''
]
})}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"汇款结束时间"
{
...
formItemLayout
}
>
<
DatePicker
showTime
format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"请选择汇款结束时间"
{
...
getFieldProps
('
remittanceEndTime
',
{
initialValue
:
remittanceEndTime
?
formatDateTime
(
remittanceEndTime
)
:
''
})}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"基金成立与到期时间"
{
...
formItemLayout
}
>
<
DatePicker
.
RangePicker
showTime
format=
"yyyy-MM-dd HH:mm:ss"
{
...
getFieldProps
('
fundEstablishedTime
',
{
initialValue
:
[
fundEstablishedTime
?
formatDateTime
(
fundEstablishedTime
)
:
'',
fundExpireTime
?
formatDateTime
(
fundExpireTime
)
:
''
]
})}
/>
</
Form
.
Item
>
<
Form
.
Item
{
...
footerFormSubmitLayout
}
style=
{
{
marginTop
:
30
}
}
>
<
Button
type=
"primary"
htmlType=
"submit"
loading=
{
loading
}
><
Icon
type=
"save"
/>
保存
</
Button
>
{
!
this
.
props
.
isCreate
&&
<
Button
onClick=
{
e
=>
{
e
.
preventDefault
();
this
.
props
.
history
.
goBack
();}
}
style=
{
{
marginLeft
:
'1em'
}
}
>
<
Icon
type=
"rollback"
/>
返回
</
Button
>
}
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
</
Row
>
</
Form
>
</
Spin
>
);
...
...
src/components/ProductForm/ElementForm.jsx
View file @
92d0fce3
...
...
@@ -19,7 +19,7 @@ import {
Table
,
Spin
}
from
'antd'
;
import
{
arrayRemoveIndex
,
UUID
,
formItemLayout
,
smallFormItemLayout
,
footerFormSubmitLayout
}
from
'../../utils'
;
import
{
arrayRemoveIndex
,
NULL
,
UUID
,
formItemLayout
,
smallFormItemLayout
,
footerFormSubmitLayout
}
from
'../../utils'
;
export
function
CreateBaseElement
()
{
...
...
@@ -97,54 +97,78 @@ export default class ElementForm extends Component {
}
render
()
{
const
{
form
:{
getFieldProps
},
loading
}
=
this
.
props
;
const
{
form
:{
getFieldProps
},
loading
,
isEdit
}
=
this
.
props
;
return
(
<
Spin
spinning=
{
loading
}
>
<
Form
horizontal
onSubmit=
{
this
.
handleSubmit
.
bind
(
this
)
}
>
<
Form
.
Item
>
<
h3
>
可以设置以下要素,或者自定义其他要素
</
h3
>
<
p
>
总规模、投资亮点、托管方、结算方式、资金用途、融资方、担保主体、风控措施、还款来源、发行方、认购起点、大小额配比
</
p
>
</
Form
.
Item
>
<
Form
.
Item
>
{
this
.
state
.
elements
.
map
((
item
,
index
)
=>
<
div
key=
{
item
.
key
}
style=
{
{
marginBottom
:
8
}
}
>
<
Input
.
Group
>
<
Col
span=
"6"
>
<
Input
placeholder=
"标题"
{
...
getFieldProps
(
index
+
'
.
title
',
{
initialValue
:
item
.
title
})}
/>
</
Col
>
<
Col
span=
"10"
>
<
Input
type=
"textarea"
placeholder=
"内容"
autosize
{
...
getFieldProps
(
index
+
'
.
content
',
{
initialValue
:
item
.
content
})}
/>
</
Col
>
<
Col
span=
"4"
>
<
Icon
type=
"cross"
title=
"删除"
onClick=
{
this
.
handleRemoveElement
.
bind
(
this
,
index
)
}
/>
</
Col
>
</
Input
.
Group
>
</
div
>
)
}
</
Form
.
Item
>
<
Form
.
Item
{
...
footerFormSubmitLayout
}
style=
{
{
marginTop
:
30
}
}
>
<
Button
onClick=
{
this
.
handleAddElement
.
bind
(
this
)
}
style=
{
{
marginRight
:
'1em'
}
}
><
Icon
type=
"plus"
/>
添加
</
Button
>
<
Button
type=
"primary"
htmlType=
"submit"
loading=
{
loading
}
><
Icon
type=
"save"
/>
保存
</
Button
>
{
!
this
.
props
.
isCreate
&&
<
Button
onClick=
{
e
=>
{
e
.
preventDefault
();
this
.
props
.
history
.
goBack
();}
}
style=
{
{
marginLeft
:
'1em'
}
}
>
<
Icon
type=
"rollback"
/>
返回
</
Button
>
}
</
Form
.
Item
>
<
Row
style=
{
{
padding
:
'0 20px'
}
}
>
<
Col
span=
"24"
>
{
isEdit
?
<
div
>
<
Form
.
Item
>
<
h3
>
可以设置以下要素,或者自定义其他要素
</
h3
>
<
p
>
总规模、投资亮点、托管方、结算方式、资金用途、融资方、担保主体、风控措施、还款来源、发行方、认购起点、大小额配比
</
p
>
</
Form
.
Item
>
<
Form
.
Item
>
{
this
.
state
.
elements
.
map
((
item
,
index
)
=>
<
div
key=
{
item
.
key
}
style=
{
{
marginBottom
:
8
}
}
>
<
Input
.
Group
>
<
Col
span=
"6"
>
<
Input
placeholder=
"标题"
{
...
getFieldProps
(
index
+
'
.
title
',
{
initialValue
:
item
.
title
})}
/>
</
Col
>
<
Col
span=
"10"
>
<
Input
type=
"textarea"
placeholder=
"内容"
autosize
{
...
getFieldProps
(
index
+
'
.
content
',
{
initialValue
:
item
.
content
})}
/>
</
Col
>
<
Col
span=
"4"
>
<
Icon
type=
"cross"
title=
"删除"
onClick=
{
this
.
handleRemoveElement
.
bind
(
this
,
index
)
}
/>
</
Col
>
</
Input
.
Group
>
</
div
>
)
}
</
Form
.
Item
>
</
div
>
:
<
table
>
<
tbody
>
{
this
.
state
.
elements
.
map
(
item
=>
<
tr
>
<
th
>
{
item
.
title
}
</
th
>
<
td
>
{
item
.
content
||
NULL
}
</
td
>
</
tr
>
)
}
</
tbody
>
</
table
>
}
<
Form
.
Item
{
...
footerFormSubmitLayout
}
style=
{
{
marginTop
:
30
}
}
>
<
Button
onClick=
{
this
.
handleAddElement
.
bind
(
this
)
}
style=
{
{
marginRight
:
'1em'
}
}
><
Icon
type=
"plus"
/>
添加
</
Button
>
<
Button
type=
"primary"
htmlType=
"submit"
loading=
{
loading
}
><
Icon
type=
"save"
/>
保存
</
Button
>
{
!
this
.
props
.
isCreate
&&
<
Button
onClick=
{
e
=>
{
e
.
preventDefault
();
this
.
props
.
history
.
goBack
();}
}
style=
{
{
marginLeft
:
'1em'
}
}
>
<
Icon
type=
"rollback"
/>
返回
</
Button
>
}
</
Form
.
Item
>
</
Col
>
</
Row
>
</
Form
>
</
Spin
>
);
...
...
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