Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TOSTUMI
Project
Project
Details
Activity
Releases
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
Maple
TOSTUMI
Commits
0cf1c156
Commit
0cf1c156
authored
Oct 27, 2020
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成新增小区,小区列表搜索优化,新增小区详情页面
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
62fee18b
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1126 additions
and
573 deletions
+1126
-573
config.ts
config/config.ts
+1
-1
TitleSearch copy.tsx
src/components/TitleSearch/TitleSearch copy.tsx
+197
-0
TitleSearch.tsx
src/components/TitleSearch/TitleSearch.tsx
+109
-87
CellList.ts
src/models/CommunityManagement/CellList.ts
+16
-11
Adds.tsx
src/pages/CommunityManagement/CellList/Adds.tsx
+219
-96
CellList.tsx
src/pages/CommunityManagement/CellList/CellList.tsx
+95
-156
Details.tsx
src/pages/CommunityManagement/CellList/Details.tsx
+233
-0
celllist.less
src/pages/CommunityManagement/CellList/celllist.less
+96
-62
ContractContent.tsx
src/pages/ContractManagement/ContractContent.tsx
+158
-159
params.ts
src/utils/params.ts
+2
-1
No files found.
config/config.ts
View file @
0cf1c156
...
@@ -218,7 +218,7 @@ export default defineConfig({
...
@@ -218,7 +218,7 @@ export default defineConfig({
routes
:[
routes
:[
{
path
:
'./'
,
component
:
'./CommunityManagement/CellList/CellList'
},
{
path
:
'./'
,
component
:
'./CommunityManagement/CellList/CellList'
},
{
path
:
'./Add'
,
component
:
'./CommunityManagement/CellList/Adds'
},
{
path
:
'./Add'
,
component
:
'./CommunityManagement/CellList/Adds'
},
{
path
:
'./Detail'
,
component
:
'./CommunityManagement/CellList/Detail'
},
{
path
:
'./Detail'
,
component
:
'./CommunityManagement/CellList/Detail
s
'
},
]
]
},
},
{
{
...
...
src/components/TitleSearch/TitleSearch copy.tsx
0 → 100644
View file @
0cf1c156
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
history
}
from
'umi'
;
import
styles
from
'./index.less'
;
import
BackButton
from
'../BackButton/BackButton'
;
import
TitleGet
from
'../TitleGet/TitleGet'
;
import
{
Input
,
Row
,
Col
,
Form
,
Select
,
Button
,
DatePicker
}
from
'antd'
;
const
{
Option
}
=
Select
;
import
SelectOptions
from
'../../components/SelectOptions/index'
;
import
{
gray
}
from
'chalk'
;
import
SearchOptionsCommnity
from
'../SearchOptions/SearchOptionsCommnity'
;
const
TitleSearch
=
(
props
:
any
)
=>
{
// console.log("===================================", props)
const
{
dispatch
,
CommunityList
}
=
props
;
const
key
=
props
.
listkey
const
name
=
props
.
list
;
// const single = props.single
// const checklist = props.checklist;
// const status = props.status;
// const communitySelect = props.communitySelect
// const defaultValue = props.defaultValue;
const
{
single
,
checklist
,
status
,
communitySelect
,
defaultValue
}
=
props
;
const
time
=
props
.
time
;
const
community
=
props
.
community
;
const
[
selectOptions
,
setSelectOptions
]
=
useState
(
true
)
const
[
communitys
,
setCommunitys
]
=
useState
(
CommunityList
)
const
[
communitySingle
,
setCommunitySingle
]
=
useState
(
null
)
const
[
datePicker
,
setDate
]
=
useState
(
null
)
const
[
form
]
=
Form
.
useForm
()
const
tosCommunityget
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'Init/tosCommunityget'
,
playload
:
values
})
};
useEffect
(()
=>
{
// console.log("标题搜寻组件初始化") OK
if
(
CommunityList
==
null
)
{
// console.log("小区数量初始化") OK
tosCommunityget
(
null
)
}
if
(
defaultValue
!=
null
)
{
form
.
setFieldsValue
(
defaultValue
)
}
},
[]);
useEffect
(()
=>
{
if
(
defaultValue
!=
null
)
{
form
.
setFieldsValue
(
defaultValue
)
}
},
[
defaultValue
])
useEffect
(()
=>
{
// console.log(CommunityList)
if
(
CommunityList
!=
null
)
{
// console.log("小区数量初始化完毕") OK
var
tmp
=
{}
tmp
[
community
]
=
CommunityList
// props.onSubmit(tmp) 禁用 改用组件初始化
setCommunitys
(
CommunityList
)
}
},
[
CommunityList
])
const
onFinish
=
(
values
:
any
)
=>
{
if
(
datePicker
)
{
values
[
time
[
0
]]
=
datePicker
;
}
if
(
community
)
{
values
[
community
]
=
communitys
}
console
.
log
(
'Success:'
,
values
);
props
.
onSubmit
(
values
)
};
const
onFinishFailed
=
(
errorInfo
:
any
)
=>
{
console
.
log
(
'Failed:'
,
errorInfo
);
};
const
onChange
=
(
date
:
any
,
dateString
:
string
)
=>
{
setDate
(
dateString
)
}
const
printContent
=
(
comment
:
any
)
=>
{
setCommunitys
(
comment
)
}
// 选择小区名字并赋值
const
opname
=
(
value
:
any
)
=>
{
form
.
setFieldsValue
({
'communityName'
:
value
})
}
return
(
<>
<
Form
form=
{
form
}
name=
"basic"
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
<
Row
gutter=
{
32
}
>
{
communitySelect
!=
null
?
<
Col
key=
{
"communitySelect_"
}
><
Form
.
Item
name=
{
"communityName"
}
><
SearchOptionsCommnity
titleSearch=
{
true
}
opname=
{
opname
}
/></
Form
.
Item
></
Col
>
:
null
}
{
key
!=
null
?
key
.
map
((
item
,
index
)
=>
{
return
(
<
Col
key=
{
"KeyCol_"
+
index
}
><
Form
.
Item
name=
{
item
}
><
Input
placeholder=
{
name
[
index
]
}
allowClear
/></
Form
.
Item
></
Col
>
)
})
:
null
}
{
status
!=
null
?
status
.
map
((
item
,
index
)
=>
{
return
(
<
Col
key=
{
"StatusCol_"
+
index
}
>
<
Form
.
Item
name=
{
item
.
name
[
0
]
}
>
<
Select
style=
{
{
width
:
160
}
}
placeholder=
{
item
.
name
[
1
]
}
allowClear=
{
true
}
>
{
item
.
data
.
map
(
word
=>
{
return
(
<
Option
key=
{
word
}
value=
{
word
[
0
]
}
>
{
word
[
1
]
}
</
Option
>
)
})
}
</
Select
>
</
Form
.
Item
>
</
Col
>
)
})
:
null
}
{
time
!=
null
?
<
Col
key=
{
"datePicker_"
}
>
<
DatePicker
placeholder=
{
time
[
1
]
}
onChange=
{
onChange
}
/></
Col
>
:
null
}
{
community
==
null
?
<
Col
><
Form
.
Item
><
Button
type=
"primary"
htmlType=
"submit"
>
Search
</
Button
></
Form
.
Item
></
Col
>
:
null
}
</
Row
>
{
community
!=
null
?
<>
{
CommunityList
!=
null
?
<
SelectOptions
checklist=
{
checklist
}
single=
{
single
}
list=
{
CommunityList
.
sort
()
}
show=
{
selectOptions
}
onSubmit=
{
printContent
}
/>
:
null
}
<
Form
.
Item
><
Button
type=
"primary"
htmlType=
"submit"
style=
{
{
backgroundColor
:
"#e7f4ff"
,
color
:
"rgba(24,144,255,1)"
}
}
>
Search
</
Button
></
Form
.
Item
>
</>
:
null
}
</
Form
>
</>
);
};
function
mapStateToProps
(
state
:
any
)
{
// console.log("state参数",state)
const
{
CommunityList
}
=
state
.
Init
;
return
{
CommunityList
,
};
}
export
default
connect
(
mapStateToProps
)(
TitleSearch
);
// time={["key","预订时间筛选"]}
// status = [{name:"status",data:["处理", "未处理"]}]
// listkey={['A', 'C']} list={['订单状态', '预订时间筛选']}
// <TitleSearch
// status={[{
// name: ["status", "订单状态"],
// data: [[0, "全部"], [1, "已申请"], [2, "已预订"], [3, "已使用"], [4, "已取消"]]
// }]}
// time={["key", "预订时间筛选"]}
// community={"communityName"}
// // single={true}
// onSubmit={CallBackTitleSearch} />
\ No newline at end of file
src/components/TitleSearch/TitleSearch.tsx
View file @
0cf1c156
...
@@ -18,68 +18,69 @@ const TitleSearch = (props: any) => {
...
@@ -18,68 +18,69 @@ const TitleSearch = (props: any) => {
const
{
dispatch
,
CommunityList
}
=
props
;
const
{
dispatch
,
CommunityList
}
=
props
;
const
key
=
props
.
listkey
const
key
=
props
.
listkey
;
console
.
log
(
props
);
const
name
=
props
.
list
;
const
name
=
props
.
list
;
// const single = props.single
// const single = props.single
// const checklist = props.checklist;
// const checklist = props.checklist;
// const status = props.status;
// const status = props.status;
// const communitySelect = props.communitySelect
// const communitySelect = props.communitySelect
// const defaultValue = props.defaultValue;
// const defaultValue = props.defaultValue;
// const time = props.time;
const
{
single
,
checklist
,
status
,
communitySelect
,
defaultValue
}
=
props
;
// username 为 小区列表管理者名字筛选
const
{
single
,
checklist
,
status
,
communitySelect
,
defaultValue
,
time
,
username
}
=
props
;
const
time
=
props
.
time
;
const
community
=
props
.
community
;
const
community
=
props
.
community
;
const
[
selectOptions
,
setSelectOptions
]
=
useState
(
true
)
const
[
selectOptions
,
setSelectOptions
]
=
useState
(
true
)
;
const
[
communitys
,
setCommunitys
]
=
useState
(
CommunityList
)
const
[
communitys
,
setCommunitys
]
=
useState
(
CommunityList
)
;
const
[
communitySingle
,
setCommunitySingle
]
=
useState
(
null
)
const
[
communitySingle
,
setCommunitySingle
]
=
useState
(
null
)
;
const
[
datePicker
,
setDate
]
=
useState
(
null
)
const
[
datePicker
,
setDate
]
=
useState
(
null
)
;
const
[
form
]
=
Form
.
useForm
()
const
[
form
]
=
Form
.
useForm
()
;
const
tosCommunityget
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'Init/tosCommunityget'
,
playload
:
values
})
};
const
tosCommunityget
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'Init/tosCommunityget'
,
playload
:
values
});
};
useEffect
(()
=>
{
useEffect
(()
=>
{
// console.log("标题搜寻组件初始化") OK
// console.log("标题搜寻组件初始化") OK
if
(
CommunityList
==
null
)
{
if
(
CommunityList
==
null
)
{
// console.log("小区数量初始化") OK
// console.log("小区数量初始化") OK
tosCommunityget
(
null
)
tosCommunityget
(
null
)
;
}
}
if
(
defaultValue
!=
null
)
{
if
(
defaultValue
!=
null
)
{
form
.
setFieldsValue
(
defaultValue
)
form
.
setFieldsValue
(
defaultValue
)
;
}
}
},
[]);
},
[]);
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
defaultValue
!=
null
)
{
if
(
defaultValue
!=
null
)
{
form
.
setFieldsValue
(
defaultValue
)
form
.
setFieldsValue
(
defaultValue
)
;
}
}
},
[
defaultValue
])
},
[
defaultValue
])
;
useEffect
(()
=>
{
useEffect
(()
=>
{
// console.log(CommunityList)
// console.log(CommunityList)
if
(
CommunityList
!=
null
)
{
if
(
CommunityList
!=
null
)
{
// console.log("小区数量初始化完毕") OK
// console.log("小区数量初始化完毕") OK
var
tmp
=
{}
var
tmp
=
{}
;
tmp
[
community
]
=
CommunityList
tmp
[
community
]
=
CommunityList
;
// props.onSubmit(tmp) 禁用 改用组件初始化
// props.onSubmit(tmp) 禁用 改用组件初始化
setCommunitys
(
CommunityList
)
setCommunitys
(
CommunityList
)
;
}
}
},
[
CommunityList
])
},
[
CommunityList
]);
const
onFinish
=
(
values
:
any
)
=>
{
const
onFinish
=
(
values
:
any
)
=>
{
if
(
datePicker
)
{
if
(
datePicker
)
{
values
[
time
[
0
]]
=
datePicker
;
values
[
time
[
0
]]
=
datePicker
;
}
}
if
(
community
)
{
if
(
community
)
{
values
[
community
]
=
communitys
values
[
community
]
=
communitys
;
}
}
console
.
log
(
'Success:'
,
values
);
console
.
log
(
'Success:'
,
values
);
props
.
onSubmit
(
values
)
props
.
onSubmit
(
values
)
;
};
};
const
onFinishFailed
=
(
errorInfo
:
any
)
=>
{
const
onFinishFailed
=
(
errorInfo
:
any
)
=>
{
...
@@ -87,90 +88,111 @@ const TitleSearch = (props: any) => {
...
@@ -87,90 +88,111 @@ const TitleSearch = (props: any) => {
};
};
const
onChange
=
(
date
:
any
,
dateString
:
string
)
=>
{
const
onChange
=
(
date
:
any
,
dateString
:
string
)
=>
{
setDate
(
dateString
)
setDate
(
dateString
)
;
}
}
;
const
printContent
=
(
comment
:
any
)
=>
{
const
printContent
=
(
comment
:
any
)
=>
{
setCommunitys
(
comment
)
setCommunitys
(
comment
)
;
}
}
;
// 选择小区名字并赋值
// 选择小区名字并赋值
const
opname
=
(
value
:
any
)
=>
{
const
opname
=
(
value
:
any
)
=>
{
form
.
setFieldsValue
({
form
.
setFieldsValue
({
'communityName'
:
value
communityName
:
value
,
})
})
;
}
}
;
return
(
return
(
<>
<>
<
Form
form=
{
form
}
name=
"basic"
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
<
Form
form=
{
form
}
name=
"basic"
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
<
Row
gutter=
{
32
}
>
<
Row
gutter=
{
32
}
>
{
{
communitySelect
!=
null
?
(
communitySelect
!=
null
?
<
Col
key=
{
'communitySelect_'
}
>
<
Col
key=
{
"communitySelect_"
}
><
Form
.
Item
name=
{
"communityName"
}
><
SearchOptionsCommnity
titleSearch=
{
true
}
opname=
{
opname
}
/></
Form
.
Item
></
Col
>
<
Form
.
Item
name=
{
'communityName'
}
>
:
null
<
SearchOptionsCommnity
titleSearch=
{
true
}
opname=
{
opname
}
/>
}
</
Form
.
Item
>
{
</
Col
>
key
!=
null
?
)
:
null
}
key
.
map
((
item
,
index
)
=>
{
{
key
!=
null
?
key
.
map
((
item
,
index
)
=>
{
return
(
return
(
<
Col
key=
{
"KeyCol_"
+
index
}
><
Form
.
Item
name=
{
item
}
><
Input
placeholder=
{
name
[
index
]
}
allowClear
/></
Form
.
Item
></
Col
>
<
Col
key=
{
'KeyCol_'
+
index
}
>
)
<
Form
.
Item
name=
{
item
}
>
<
Input
placeholder=
{
name
[
index
]
}
allowClear
/>
</
Form
.
Item
>
</
Col
>
);
})
})
:
null
:
null
}
}
{
{
/* 小区列表的管理员姓名搜索 */
}
status
!=
null
?
{
username
!=
null
?
(
status
.
map
((
item
,
index
)
=>
{
<
Col
key=
{
'username_'
+
username
[
0
]
}
>
<
Form
.
Item
name=
{
username
[
0
]
}
label=
"Username"
>
<
Input
placeholder=
{
username
[
1
]
}
allowClear
/>
</
Form
.
Item
>
</
Col
>
)
:
null
}
{
status
!=
null
?
status
.
map
((
item
,
index
)
=>
{
return
(
return
(
<
Col
key=
{
"StatusCol_"
+
index
}
>
<
Col
key=
{
'StatusCol_'
+
index
}
>
<
Form
.
Item
name=
{
item
.
name
[
0
]
}
>
<
Form
.
Item
name=
{
item
.
name
[
0
]
}
>
<
Select
style=
{
{
width
:
160
}
}
placeholder=
{
item
.
name
[
1
]
}
allowClear=
{
true
}
>
<
Select
style=
{
{
width
:
160
}
}
placeholder=
{
item
.
name
[
1
]
}
allowClear=
{
true
}
>
{
{
item
.
data
.
map
((
word
)
=>
{
item
.
data
.
map
(
word
=>
{
return
(
return
(
<
Option
key=
{
word
}
value=
{
word
[
0
]
}
>
{
word
[
1
]
}
</
Option
>
<
Option
key=
{
word
}
value=
{
word
[
0
]
}
>
)
{
word
[
1
]
}
})
</
Option
>
}
);
})
}
</
Select
>
</
Select
>
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
</
Col
>
)
)
;
})
})
:
null
:
null
}
}
{
time
!=
null
?
(
{
<
Col
key=
{
'datePicker_'
}
>
time
!=
null
?
{
' '
}
<
Col
key=
{
"datePicker_"
}
>
<
DatePicker
placeholder=
{
time
[
1
]
}
onChange=
{
onChange
}
/></
Col
>
<
DatePicker
placeholder=
{
time
[
1
]
}
onChange=
{
onChange
}
/>
:
null
</
Col
>
}
)
:
null
}
{
{
community
==
null
?
(
community
==
null
?
<
Col
>
<
Col
><
Form
.
Item
><
Button
type=
"primary"
htmlType=
"submit"
>
Search
</
Button
></
Form
.
Item
></
Col
>
<
Form
.
Item
>
:
null
<
Button
type=
"primary"
htmlType=
"submit"
>
}
Search
</
Button
>
</
Form
.
Item
>
</
Col
>
)
:
null
}
</
Row
>
</
Row
>
{
{
community
!=
null
?
(
community
!=
null
?
<>
<>
{
{
CommunityList
!=
null
?
(
CommunityList
!=
null
?
<
SelectOptions
<
SelectOptions
checklist=
{
checklist
}
single=
{
single
}
list=
{
CommunityList
.
sort
()
}
show=
{
selectOptions
}
onSubmit=
{
printContent
}
/>
:
checklist=
{
checklist
}
null
single=
{
single
}
}
list=
{
CommunityList
.
sort
()
}
show=
{
selectOptions
}
<
Form
.
Item
><
Button
type=
"primary"
htmlType=
"submit"
style=
{
{
backgroundColor
:
"#e7f4ff"
,
color
:
"rgba(24,144,255,1)"
}
}
>
Search
</
Button
></
Form
.
Item
>
onSubmit=
{
printContent
}
</>
:
null
/>
}
)
:
null
}
<
Form
.
Item
>
<
Button
type=
"primary"
htmlType=
"submit"
style=
{
{
backgroundColor
:
'#e7f4ff'
,
color
:
'rgba(24,144,255,1)'
}
}
>
Search
</
Button
>
</
Form
.
Item
>
</>
)
:
null
}
</
Form
>
</
Form
>
</>
</>
);
);
};
};
...
...
src/models/CommunityManagement/CellList.ts
View file @
0cf1c156
...
@@ -41,10 +41,11 @@ export default {
...
@@ -41,10 +41,11 @@ export default {
console
.
log
(
resp
)
console
.
log
(
resp
)
// if (resp.code == 500||resp.error_code!="0000") {
// if (resp.code == 500||resp.error_code!="0000") {
// }
// }
if
(
resp
.
error_code
!=
"0000"
)
{
if
(
resp
.
code
==
500
&&
resp
.
error_code
!=
"0000"
)
{
getObjectInfo
(
playload
.
body
)
getObjectInfo
(
playload
.
body
)
printf
(
playload
,
resp
)
printf
(
playload
,
resp
)
}
message
.
error
(
`
${
resp
.
code
}
:
${
resp
.
msg
}
`
)
}
else
{
switch
(
playload
.
index
)
{
switch
(
playload
.
index
)
{
case
24
:
{
case
24
:
{
let
Data
=
resp
.
data
;
let
Data
=
resp
.
data
;
...
@@ -53,8 +54,12 @@ export default {
...
@@ -53,8 +54,12 @@ export default {
case
29
:
{
case
29
:
{
let
Result
=
resp
;
let
Result
=
resp
;
yield
put
({
type
:
'returnResult'
,
Result
});
yield
put
({
type
:
'returnResult'
,
Result
});
message
.
success
(
`新增成功!`
)
}
break
;
}
break
;
}
}
history
.
push
(
'/CommunityManagement/CellList'
);
}
},
},
...
...
src/pages/CommunityManagement/CellList/Adds.tsx
View file @
0cf1c156
import
React
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
LeftOutlined
,
EditOutlined
,
PlusCircleOutlined
,
UploadOutlined
}
from
'@ant-design/icons'
;
import
{
connect
}
from
'dva'
;
import
{
LeftOutlined
,
EditOutlined
,
UploadOutlined
}
from
'@ant-design/icons'
;
import
{
Form
,
Input
,
Button
,
TimePicker
,
Checkbox
,
Upload
,
message
}
from
'antd'
;
import
{
Form
,
Input
,
Button
,
TimePicker
,
Checkbox
,
Upload
,
message
}
from
'antd'
;
// 样式
// 样式
import
'./celllist.less'
;
import
'./celllist.less'
;
import
{
RA
}
from
'@/utils/method'
;
const
{
RangePicker
}
=
TimePicker
;
import
moment
from
'moment'
;
const
Adds
=
()
=>
{
// 接口申明
interface
objc
{}
const
Adds
=
(
props
:
any
)
=>
{
const
{
Data
,
dispatch
}
=
props
;
useEffect
(()
=>
{
// 如果是添加传来没有值的时候 就清空 否则 赋值给表单
if
(
Data
)
{
// 返回列表
console
.
log
(
'编辑'
);
console
.
log
(
Data
);
}
else
{
console
.
log
(
'新建'
);
}
},
[
1
]);
//物业费选择
const
plainOptions
=
[
const
plainOptions
=
[
{
label
:
'线上缴费'
,
value
:
'0'
},
{
label
:
'线上缴费'
,
value
:
'0'
,
disabled
:
true
},
{
label
:
'线下缴费'
,
value
:
'1'
},
{
label
:
'线下缴费'
,
value
:
'1'
},
];
];
const
props
=
{
const
{
RangePicker
}
=
TimePicker
;
// 表单物业费提交值
const
[
PropertyFee
,
setPropertyFee
]
=
useState
([
'1'
]);
// 楼巴上传列表
const
[
loubaUpload
,
setLouba
]
=
useState
([]
as
any
);
// 物业办事指南列表
const
[
guideUpload
,
setGuide
]
=
useState
([]
as
any
);
// 保质期服务列表
const
[
periodUpload
,
setPeriod
]
=
useState
([]
as
any
);
// 上传设置
const
uploads
=
{
name
:
'file'
,
name
:
'file'
,
action
:
'https://www.mocky.io/v2/5cc8019d300000980a055e76'
,
accept
:
'.doc,.docx,.jpg,.png,.pdf'
,
headers
:
{
action
:
'/tos/image/upload'
,
authorization
:
'authorization-text'
,
data
:
{
imageType
:
'tosContract'
},
};
// 楼巴上传
const
upload1
=
{
onChange
(
info
:
any
)
{
let
po
=
new
Array
();
po
.
push
(
info
.
fileList
[
info
.
fileList
.
length
-
1
]);
// 给楼巴上传列表值
setLouba
(
po
);
// 结果
uploadMsg
(
info
);
},
},
onChange
(
info
)
{
};
if
(
info
.
file
.
status
!==
'uploading'
)
{
// 指南上传
console
.
log
(
info
.
file
,
info
.
fileList
);
const
upload2
=
{
}
onChange
(
info
:
any
)
{
let
po
=
new
Array
();
po
.
push
(
info
.
fileList
[
info
.
fileList
.
length
-
1
]);
// 给楼巴上传列表值
setGuide
(
po
);
// 结果
uploadMsg
(
info
);
},
};
// 保质期上传
const
upload3
=
{
onChange
(
info
:
any
)
{
let
po
=
new
Array
();
po
.
push
(
info
.
fileList
[
info
.
fileList
.
length
-
1
]);
// 给楼巴上传列表值
setPeriod
(
po
);
// 结果
uploadMsg
(
info
);
},
};
// 上传提示
function
uploadMsg
(
info
:
any
)
{
if
(
info
.
file
.
status
===
'done'
)
{
if
(
info
.
file
.
status
===
'done'
)
{
message
.
success
(
`
${
info
.
file
.
name
}
file uploaded successfully`
);
message
.
success
(
`
${
info
.
file
.
name
}
file uploaded successfully`
);
}
else
if
(
info
.
file
.
status
===
'error'
)
{
}
else
if
(
info
.
file
.
status
===
'error'
)
{
message
.
error
(
`
${
info
.
file
.
name
}
file upload failed.`
);
message
.
error
(
`
${
info
.
file
.
name
}
file upload failed.`
);
}
}
},
}
};
function
onChange
(
checkedValues
)
{
// 多选选择改变值
console
.
log
(
'checked = '
,
checkedValues
);
function
onChange
(
checkedValues
:
any
)
{
// 修改选择值
setPropertyFee
(
checkedValues
);
}
}
// undefind 验证
function
undeFi
(
e
:
any
)
{
if
(
typeof
e
==
'undefined'
)
{
return
''
;
}
else
{
return
e
;
}
}
// 表单提交
const
onFinish
=
(
values
:
any
)
=>
{
const
onFinish
=
(
values
:
any
)
=>
{
// console.log('Success:', values);
let
obj
:
any
=
new
Object
();
message
.
error
(
`页面重构,后端接口处理中...`
);
obj
.
propertyFee
=
PropertyFee
;
// 小区信息;
let
{
residentialEmail
,
residentialAddress
,
residentialName
}
=
values
.
des
;
obj
.
residentialZipCode
=
residentialEmail
;
obj
.
residentialAddress
=
residentialAddress
;
obj
.
residentialName
=
residentialName
;
// 小区时间与管理员
obj
.
residentialManagerUserName
=
undeFi
(
values
.
residentialManagerUserName
);
obj
.
residentialStartWorking
=
values
.
workingHours
[
0
].
format
(
'HH:mm'
);
obj
.
residentialEndWorking
=
values
.
workingHours
[
1
].
format
(
'HH:mm'
);
obj
.
residentialPhone
=
values
.
info
.
tel
;
obj
.
residentialEmail
=
values
.
info
.
email
;
// 上传内容
obj
.
balouscheduleUrl
=
undeFi
(
loubaUpload
.
map
((
item
:
any
)
=>
item
.
name
)[
0
]);
obj
.
serviceGuideUrl
=
undeFi
(
guideUpload
.
map
((
item
:
any
)
=>
item
.
name
)[
0
]);
obj
.
lifeServiceUrl
=
undeFi
(
periodUpload
.
map
((
item
:
any
)
=>
item
.
name
)[
0
]);
// 小区热线
// 表单结构存在数据不存在情况, 所以要多判断一次
if
(
values
.
help
)
{
obj
.
residentialHotlineName
=
undeFi
(
values
.
help
.
residentialHotlineName
);
obj
.
residentialHotline
=
undeFi
(
values
.
help
.
residentialHotline
);
obj
.
residentialHotlineServieStartTime
=
undeFi
(
values
.
help
.
time
[
0
]).
format
(
'HH:mm'
);
obj
.
residentialHotlineServieEndTime
=
undeFi
(
values
.
help
.
time
[
1
]).
format
(
'HH:mm'
);
}
else
{
obj
.
residentialHotlineName
=
''
;
obj
.
residentialHotline
=
''
;
obj
.
residentialHotlineServieStartTime
=
''
;
obj
.
residentialHotlineServieEndTime
=
''
;
}
console
.
log
(
'Success:'
,
obj
);
// 上传
RA
(
29
,
obj
,
'CellList'
,
dispatch
);
};
};
// 返回
const
goToReturn
=
()
=>
{
const
goToReturn
=
()
=>
{
// console.log(fileList)
// console.log(fileList)
history
.
back
()
history
.
back
();
}
}
;
// 上传
// 上传
return
(
return
(
<
div
className=
"form"
>
<
div
className=
"form"
>
<
h3
>
<
h3
>
<
EditOutlined
/>
<
EditOutlined
/>
添加小区
添加小区
<
div
className=
"back"
>
<
div
className=
"back"
>
<
Button
onClick=
{
goToReturn
}
>
<
Button
onClick=
{
goToReturn
}
>
<
LeftOutlined
/>
<
LeftOutlined
/>
...
@@ -66,122 +174,132 @@ const Adds = () => {
...
@@ -66,122 +174,132 @@ const Adds = () => {
<
Form
<
Form
name=
"basic"
name=
"basic"
onFinish=
{
onFinish
}
onFinish=
{
onFinish
}
labelCol=
{
{
span
:
3
}
}
wrapperCol=
{
{
span
:
18
}
}
wrapperCol=
{
{
span
:
18
}
}
layout=
"horizontal"
layout=
"horizontal"
labelAlign=
"left"
labelAlign=
"left"
>
>
<
Form
.
Item
label=
"Community Name"
name=
"communityName"
>
<
Form
.
Item
label=
"Community Name"
name=
"des"
>
<
Input
style=
{
{
width
:
120
}
}
placeholder=
"6 Postcode"
maxLength=
{
6
}
/>
{
' '
}
<
Input
.
Group
compact
>
<
span
className=
"span"
>
<
Form
.
Item
小区地址小区地址小区地址小区地址小区地址小区地址小区地址小区地址小区地址小区地址小区地址
name=
{
[
'des'
,
'residentialEmail'
]
}
</
span
>
{
' '
}
noStyle
<
div
>
// rules={[{ required: true, message: 'Province is required' }]}
<
li
className=
"li"
>
小区名字
</
li
>
>
<
Input
style=
{
{
marginRight
:
'10px'
,
width
:
120
}
}
placeholder=
"6 Postcode"
maxLength=
{
6
}
/>
</
Form
.
Item
>
<
Form
.
Item
name=
{
[
'des'
,
'residentialAddress'
]
}
noStyle
// rules={[{ required: true, message: 'Street is required' }]}
>
<
Input
style=
{
{
width
:
'360px'
}
}
placeholder=
"Please enter community adds"
/>
</
Form
.
Item
>
<
div
className=
"li"
>
<
Form
.
Item
name=
{
[
'des'
,
'residentialName'
]
}
noStyle
// rules={[{ required: true, message: 'Street is required' }]}
>
<
Input
style=
{
{
marginRight
:
'10px'
,
width
:
'260px'
}
}
placeholder=
"Please enter community name"
/>
</
Form
.
Item
>
</
div
>
</
div
>
</
Input
.
Group
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
"Working Hours"
name=
"workingHours"
>
<
Form
.
Item
label=
"Working Hours"
name=
"workingHours"
>
<
RangePicker
/>
<
RangePicker
format=
"HH:mm"
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
"Community Telephone"
name=
"
communityTelephone
"
>
<
Form
.
Item
label=
"Community Telephone"
name=
"
info
"
>
<
Input
.
Group
compact
>
<
Input
.
Group
compact
>
<
Form
.
Item
<
Form
.
Item
name=
{
[
'
communityTelephone
'
,
'tel'
]
}
name=
{
[
'
info
'
,
'tel'
]
}
noStyle
noStyle
// rules={[{ required: true, message: 'Province is required' }]}
// rules={[{ required: true, message: 'Province is required' }]}
>
>
<
Input
style=
{
{
marginRight
:
'10px'
,
width
:
'160px'
}
}
placeholder=
"Please enter Phone"
/>
<
Input
style=
{
{
marginRight
:
'10px'
,
width
:
'160px'
}
}
placeholder=
"Please enter phone"
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Button
type=
"text"
>
—
</
Button
>
<
Button
type=
"text"
>
—
</
Button
>
<
Form
.
Item
<
Form
.
Item
name=
{
[
'
communityTelephone
'
,
'email'
]
}
name=
{
[
'
info
'
,
'email'
]
}
noStyle
noStyle
// rules={[{ required: true, message: 'Street is required' }]}
// rules={[{ required: true, message: 'Street is required' }]}
>
>
<
Input
style=
{
{
marginLeft
:
'10px'
,
width
:
'180px'
}
}
placeholder=
"Please enter Email"
/>
<
Input
style=
{
{
marginLeft
:
'10px'
,
width
:
'180px'
}
}
placeholder=
"Please enter Email"
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
Input
.
Group
>
</
Input
.
Group
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
"Administrators"
name=
"adminiStrators"
>
<
Form
.
Item
label=
"Administrators"
name=
"residentialManagerUserName"
>
<
Input
style=
{
{
width
:
'160px'
}
}
placeholder=
'Contacts'
/>
<
Button
type=
"text"
><
PlusCircleOutlined
style=
{
{
fontSize
:
'18px'
,
color
:
'#08c'
}
}
/></
Button
>
<
Input
style=
{
{
width
:
'160px'
}
}
placeholder=
"Contacts"
/>
{
/* <Button type="text">
<PlusCircleOutlined style={{ fontSize: '18px', color: '#08c' }} />
</Button> */
}
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
"Property Fee"
name=
"propertyFee"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Form
.
Item
label=
"Property Fee"
name=
"propertyFee"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Checkbox
.
Group
options=
{
plainOptions
}
defaultValue=
{
[
'1'
]
}
onChange=
{
onChange
}
/>
<
Checkbox
.
Group
options=
{
plainOptions
}
defaultValue=
{
[
'1'
]
}
onChange=
{
onChange
}
/>
<
div
className=
'tip'
>
<
div
className=
"tip"
>
<
span
>
*
</
span
>
线上缴费会有服务费
<
span
>
*
</
span
>
线上缴费会有服务费
</
div
>
</
div
>
</
Form
.
Item
>
</
Form
.
Item
>
<
hr
/>
<
hr
/>
{
/* 小区信息部分 */
}
<
Form
.
Item
label=
"Louba Timetable"
name=
"
loubaTimetab
le"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Form
.
Item
label=
"Louba Timetable"
name=
"
balouscheduleFi
le"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Upload
{
...
props
}
>
<
Upload
{
...
uploads
}
{
...
upload1
}
fileList=
{
loubaUpload
}
>
<
Button
icon=
{
<
UploadOutlined
/>
}
>
Click to Upload
</
Button
>
<
Button
icon=
{
<
UploadOutlined
/>
}
>
Click to Upload
</
Button
>
</
Upload
>
</
Upload
>
<
div
className=
'tip'
>
<
div
className=
"tip"
>
支持文件:.pdf,.jpg, .png
</
div
>
支持文件:.pdf,.jpg, .png
</
div
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
"Property Guide"
name=
"
propertyGuid
e"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Form
.
Item
label=
"Property Guide"
name=
"
serviceGuideFil
e"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Upload
{
...
props
}
>
<
Upload
{
...
uploads
}
{
...
upload2
}
fileList=
{
guideUpload
}
>
<
Button
icon=
{
<
UploadOutlined
/>
}
>
Click to Upload
</
Button
>
<
Button
icon=
{
<
UploadOutlined
/>
}
>
Click to Upload
</
Button
>
</
Upload
>
</
Upload
>
<
div
className=
'tip'
>
<
div
className=
"tip"
>
支持文件:.pdf,.jpg, .png
</
div
>
支持文件:.pdf,.jpg, .png
</
div
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
"Period of Service"
name=
"
period
"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Form
.
Item
label=
"Period of Service"
name=
"
lifeServiceFile
"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Upload
{
...
props
}
>
<
Upload
{
...
uploads
}
{
...
upload3
}
fileList=
{
periodUpload
}
>
<
Button
icon=
{
<
UploadOutlined
/>
}
>
Click to Upload
</
Button
>
<
Button
icon=
{
<
UploadOutlined
/>
}
>
Click to Upload
</
Button
>
</
Upload
>
</
Upload
>
<
div
className=
'tip'
>
<
div
className=
"tip"
>
支持文件:.pdf,.jpg, .png
</
div
>
支持文件:.pdf,.jpg, .png
</
div
>
</
Form
.
Item
>
</
Form
.
Item
>
<
hr
/>
<
hr
/>
{
/* 上传部分 */
}
<
Form
.
Item
label=
"Help
Phone"
name=
"helpPhone
"
>
<
Form
.
Item
label=
"Help
"
name=
"help
"
>
<
Input
.
Group
compact
>
<
Input
.
Group
compact
>
<
Form
.
Item
<
Form
.
Item
name=
{
[
'help'
,
'residentialHotlineName'
]
}
noStyle
>
name=
{
[
'helpPhone'
,
'tel'
]
}
noStyle
>
<
Input
style=
{
{
marginRight
:
'10px'
,
width
:
'160px'
}
}
placeholder=
"热线电话名称"
/>
<
Input
style=
{
{
marginRight
:
'10px'
,
width
:
'160px'
}
}
placeholder=
"热线电话名称"
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
<
Form
.
Item
name=
{
[
'help'
,
'residentialHotline'
]
}
noStyle
>
name=
{
[
'helpPhone'
,
'email'
]
}
noStyle
>
<
Input
style=
{
{
marginRight
:
'10px'
,
width
:
'180px'
}
}
placeholder=
"热线电话"
/>
<
Input
style=
{
{
marginRight
:
'10px'
,
width
:
'180px'
}
}
placeholder=
"热线电话"
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
<
Form
.
Item
name=
{
[
'help'
,
'time'
]
}
noStyle
>
name=
{
[
'helpPhone'
,
'email2'
]
}
<
RangePicker
format=
"HH:mm"
/>
noStyle
>
<
Input
style=
{
{
marginRight
:
'10px'
,
width
:
'180px'
}
}
placeholder=
"服务起始时间"
/>
</
Form
.
Item
>
<
Form
.
Item
name=
{
[
'helpPhone'
,
'email3'
]
}
noStyle
>
<
Input
style=
{
{
marginRight
:
'10px'
,
width
:
'180px'
}
}
placeholder=
"服务结束时间"
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
Input
.
Group
>
</
Input
.
Group
>
</
Form
.
Item
>
</
Form
.
Item
>
...
@@ -192,8 +310,13 @@ const Adds = () => {
...
@@ -192,8 +310,13 @@ const Adds = () => {
</
Form
.
Item
>
</
Form
.
Item
>
</
Form
>
</
Form
>
</
div
>
</
div
>
);
);
};
};
export
default
Adds
;
// export default Adds;
function
map
(
state
:
any
)
{
const
Data
=
state
.
CellList
.
DataSave
;
const
loading
=
state
.
loading
.
models
.
CellList
;
return
{
Data
,
loading
};
}
export
default
connect
(
map
)(
Adds
);
src/pages/CommunityManagement/CellList/CellList.tsx
View file @
0cf1c156
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Input
,
Tabs
,
Table
,
Space
,
Button
,
Form
,
message
}
from
'antd'
;
import
{
Space
,
Button
,
Form
,
message
}
from
'antd'
;
const
{
TabPane
}
=
Tabs
;
import
{
connect
,
history
}
from
'umi'
;
import
{
connect
,
history
}
from
'umi'
;
// 图标
// 图标
import
{
SearchOutlined
,
ClearOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
ProTable
from
'@ant-design/pro-table'
;
import
ProTable
from
'@ant-design/pro-table'
;
import
TitleSearch
from
'@/components/TitleSearch/TitleSearch'
;
import
TitleSearch
from
'@/components/TitleSearch/TitleSearch'
import
SearchOptionsCommnity
from
'@/components/SearchOptions/SearchOptionsCommnity'
import
{
RA
,
SA
}
from
'@/utils/method'
;
import
{
RA
,
SA
}
from
'@/utils/method'
;
import
{
objectColumns
}
from
'@/utils/string'
;
import
{
objectColumns
}
from
'@/utils/string'
;
import
{
timestampToTime
}
from
'@/utils/time'
;
const
module
=
'CellList'
;
import
CommunitySearch
from
"@/components/CommunitySearch/CommunitySearch"
;
const
module
=
"CellList"
import
'./celllist.less'
import
'./celllist.less'
;
const
CellList
=
(
props
:
any
)
=>
{
const
CellList
=
(
props
:
any
)
=>
{
const
columns
=
objectColumns
([
const
columns
=
objectColumns
([
[
"Community"
,
"residentialName"
],
[
'Community'
,
'residentialName'
],
[
"Administrator"
,
"residentialManagerUserName"
],
[
'Administrator'
,
'residentialManagerUserName'
],
[
"Operation Hours"
,
null
,
(
text
:
any
,
record
:
any
)
=>
(<
div
></
div
>)],
[
[
"Office Tel"
,
"residentialPhone"
],
'Operation Hours'
,
[
"Address"
,
"residentialAddress"
],
null
,
[
"Actions"
,
null
,
(
text
:
any
,
record
:
any
)
=>
(<
Space
size=
"middle"
>
(
text
:
any
,
record
:
any
)
=>
(
<
div
>
<
span
>
{
record
.
residentialStartWorking
}
</
span
>
<
span
>
-
</
span
>
<
span
>
{
record
.
residentialEndWorking
}
</
span
>
</
div
>
),
],
[
'Office Tel'
,
'residentialPhone'
],
[
'Address'
,
'residentialAddress'
],
[
'Actions'
,
null
,
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
<
a
onClick=
{
goToDetail
.
bind
(
this
,
record
)
}
>
Edit
</
a
>
<
a
onClick=
{
goToDetail
.
bind
(
this
,
record
)
}
>
Edit
</
a
>
<
a
onClick=
{
goToDetail
.
bind
(
this
,
record
)
}
>
Detail
</
a
>
<
a
onClick=
{
goToDetail
.
bind
(
this
,
record
)
}
>
Detail
</
a
>
</
Space
>)],
</
Space
>
])
),
],
]);
const
{
dispatch
,
Data
,
loading
,
curString
}
=
props
;
const
{
dispatch
,
Data
,
loading
,
curString
}
=
props
;
console
.
log
(
curString
);
const
onChange
=
e
=>
{
e
.
persist
();
console
.
log
(
"表单输入的值"
,
e
.
target
.
value
);
};
useEffect
(()
=>
{
useEffect
(()
=>
{
RA
(
24
,
{
communityName
:
""
},
module
,
dispatch
);
RA
(
24
,
{
communityName
:
''
},
module
,
dispatch
);
},
[])
},
[])
;
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
Data
!=
null
)
{
if
(
Data
!=
null
)
{
//console.log(columnsVal)
//console.log(columnsVal)
}
}
},
[
Data
])
},
[
Data
])
;
const
CallbackSearch
=
(
values
:
any
)
=>
{
const
CallbackSearch
=
(
values
:
any
)
=>
{
RA
(
24
,
{
communityName
:
values
},
module
,
dispatch
);
RA
(
24
,
{
communityName
:
values
},
module
,
dispatch
);
}
}
;
const
goToAdd
=
()
=>
{
const
goToAdd
=
()
=>
{
history
.
push
(
"./CellList/Add"
);
SA
(
''
,
module
,
dispatch
);
// 清空之前传递的数据
}
history
.
push
(
'./CellList/Add'
);
};
const
goToDetail
=
(
values
:
any
,
e
:
any
)
=>
{
const
goToDetail
=
(
values
:
any
,
e
:
any
)
=>
{
SA
(
values
,
module
,
dispatch
)
// console.log(values);
history
.
push
(
"./CellList/Detail"
);
SA
(
values
,
module
,
dispatch
);
}
history
.
push
(
'./CellList/Detail'
);
// 表单标识
const
[
form
]
=
Form
.
useForm
()
// 表单提交
const
onFinishContract
=
(
value
:
any
)
=>
{
// console.log(value)
if
(
!
value
.
communityName
&&!
value
.
contractNumber
&&!
value
.
contractTitle
){
message
.
error
(
'Please enter one of them!'
)
}
else
{
console
.
log
(
value
)
let
payload
=
{
index
:
19
,
page
:{
pageNum
:
1
,
contractNumber
:
value
.
contractNumber
,
contractTitle
:
value
.
contractTitle
,
communityName
:
value
.
communityName
}
}
// requst(payload);
}
}
// 选择小区名字并赋值
const
opname
=
(
value
:
any
)
=>
{
form
.
setFieldsValue
({
'communityName'
:
value
})
}
// 重置
const
onReset
=
()
=>
{
form
.
resetFields
();
let
payload
=
{
index
:
19
,
page
:{
pageNum
:
1
}
}
};
};
// 点击搜索
// 点击搜索
const
CallBackTitleSearch
=
(
comment
:
any
)
=>
{
const
CallBackTitleSearch
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
)
if
(
comment
.
communityName
.
length
>
0
||
typeof
comment
.
label
!==
'undefined'
)
{
let
tmp
:
any
=
new
Object
();
// if (comment.communityName != null || comment.key != null || comment.status != null) {
tmp
.
adminName
=
comment
.
label
;
// var tmp = curString
tmp
.
communityName
=
comment
.
communityName
;
// tmp.subscribeDate = comment.key
tmp
.
curPage
=
1
;
// if (comment.status == null||comment.status==undefined) {
// QA(tmp);
// tmp.status = 0;
console
.
log
(
tmp
);
// } else {
// CallbackSearch()
// tmp.status = comment.status
//中断
// }
// RA(9, {
// tmp.communityNameList = comment.communityName
// userToken: token,
// tmp.curPage=1
// pageNum: '1',
// QA(tmp)
// subscribeDate: tmp.subscribeDate,
// console.log(tmp)
// status: tmp.status,
// //中断
// communityNameList: comment.communityName,
// RA(9, { userToken: token, pageNum: "1", subscribeDate: tmp.subscribeDate, status: tmp.status,communityNameList:comment.communityName })
// }, module, dispatch);
// }
}
else
{
message
.
error
(
'请输入管理员姓名或选择小区进行搜索!'
);
}
}
};
return
(
return
(
<
div
>
<
div
>
{
{
Data
!=
null
?
(
Data
!=
null
?
<>
<>
{
/* <TitleSearch listkey={['communityName']} list={['Community Name']} onSubmit={CallBackTitleSearch}/> */
}
{
/* <TitleSearch listkey={['communityName']} list={['Community Name']} onSubmit={CallBackTitleSearch}/> */
}
<
div
className=
'contop'
>
<
div
className=
"contop"
>
<
TitleSearch
<
TitleSearch
status=
{
[{
username=
{
[
'label'
,
'请输入管理员姓名'
]
}
name
:
[
"status"
,
"Order status"
],
community=
{
'communityName'
}
data
:
[[
0
,
"All"
],
[
1
,
"Applied"
],
[
2
,
"Reserved"
],
[
3
,
"Used"
],
[
4
,
"Cancelled"
]]
checklist=
{
curString
.
communityNameList
!=
null
?
curString
.
communityNameList
:
null
}
}]
}
onSubmit=
{
CallBackTitleSearch
}
time=
{
[
"key"
,
"Booking time "
]
}
/>
community=
{
"communityName"
}
checklist=
{
curString
.
communityNameList
!=
null
?
curString
.
communityNameList
:
null
}
onSubmit=
{
CallBackTitleSearch
}
/>
{
/* <Form
autoComplete= "off"
layout="inline"
form={form}
name="contract"
onFinish={onFinishContract}
>
<Form.Item name="communityName">
<SearchOptionsCommnity
// ubmit={extendName}
opname={opname} />
</Form.Item>
<Form.Item name="contractNumber">
<Input allowClear placeholder='Contract No' />
</Form.Item>
<Form.Item name="contractTitle">
<Input allowClear placeholder='Contract Title' />
</Form.Item>
<Form.Item>
<Button type="primary" htmlType="submit" icon={<SearchOutlined />} loading={loading}>Search </Button>
<Button htmlType="button" onClick={onReset} style={{marginLeft:'15px'}} icon={<ClearOutlined />} loading={loading}> Reset</Button>
</Form.Item>
</Form> */
}
</
div
>
</
div
>
<
ProTable
<
ProTable
// request=
{
requestHeadl
}
// request=
{
requestHeadl
}
pagination=
{
false
}
// 隐藏默认分页
pagination=
{
false
}
// 隐藏默认分页
rowKey=
{
"id"
}
rowKey=
{
'id'
}
dataSource=
{
Data
.
rows
}
dataSource=
{
Data
.
rows
}
columns=
{
columns
}
columns=
{
columns
}
search=
{
false
}
search=
{
false
}
loading=
{
loading
}
loading=
{
loading
}
toolBarRender=
{
()
=>
[
toolBarRender=
{
()
=>
[
<
Button
key=
"3"
type=
"primary"
onClick=
{
goToAdd
}
>
<
Button
key=
"3"
type=
"primary"
onClick=
{
goToAdd
}
>
<
PlusOutlined
/>
Create new Community
<
PlusOutlined
/>
Create new Community
</
Button
>,
</
Button
>,
]
}
]
}
options=
{
{
options=
{
{
...
@@ -189,18 +130,16 @@ const CellList = (props:any) => {
...
@@ -189,18 +130,16 @@ const CellList = (props:any) => {
dataSource={Data.rows}
dataSource={Data.rows}
columns={columns}
columns={columns}
pagination={{ defaultCurrent: 1, total: Data.total}} /> */
}
pagination={{ defaultCurrent: 1, total: Data.total}} /> */
}
</>
</>
:
null
)
:
null
}
}
</
div
>
</
div
>
);
);
};
};
function
map
(
state
:
any
)
{
function
map
(
state
:
any
)
{
console
.
log
(
state
)
// console.log(state);
const
loading
=
state
.
loading
.
models
.
CellList
const
loading
=
state
.
loading
.
models
.
CellList
;
const
{
Data
,
curString
}
=
state
[
module
]
const
{
Data
,
curString
}
=
state
[
module
];
return
{
Data
,
loading
,
curString
}
return
{
Data
,
loading
,
curString
};
}
}
export
default
connect
(
map
)(
CellList
);
export
default
connect
(
map
)(
CellList
);
src/pages/CommunityManagement/CellList/Details.tsx
0 → 100644
View file @
0cf1c156
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
connect
}
from
'dva'
;
import
{
LeftOutlined
,
EyeOutlined
,
PoweroffOutlined
,
FileJpgOutlined
,
FilePdfOutlined
,
}
from
'@ant-design/icons'
;
import
{
Modal
,
Input
,
Button
,
TimePicker
,
Checkbox
,
Image
,
message
,
Divider
,
Avatar
}
from
'antd'
;
// 样式
import
'./celllist.less'
;
import
{
RA
}
from
'@/utils/method'
;
import
moment
from
'moment'
;
// 接口申明
const
Adds
=
(
props
:
any
)
=>
{
const
{
Data
,
dispatch
}
=
props
;
useEffect
(()
=>
{
// 如果是添加传来没有值的时候 就清空 否则 赋值给表单
if
(
Data
)
{
// 返回列表
console
.
log
(
'编辑'
);
console
.
log
(
Data
);
}
else
{
console
.
log
(
'新建'
);
}
},
[
1
]);
//物业费选择
const
plainOptions
=
[
{
label
:
'线上缴费'
,
value
:
'0'
,
disabled
:
true
},
{
label
:
'线下缴费'
,
value
:
'1'
,
disabled
:
true
},
];
// 关闭提示框
const
[
ModelFee
,
setModelFee
]
=
useState
(
false
);
// 返回
const
goToReturn
=
()
=>
{
// console.log(fileList)
history
.
back
();
};
// 复制
const
copy
=
()
=>
{};
// 打开弹窗
const
openModel
=
()
=>
{
setModelFee
(
true
);
};
// 关闭弹窗
const
handleCancel
=
()
=>
{
setModelFee
(
false
);
};
// 关闭小区
const
handleOk
=
()
=>
{
setModelFee
(
false
);
message
.
success
(
'您已关闭小区!'
);
history
.
back
();
};
return
(
<
div
className=
"form"
>
<
h3
>
<
EyeOutlined
/>
小区详情
<
div
className=
"back"
>
<
Button
type=
"primary"
danger
style=
{
{
marginRight
:
'15px'
}
}
icon=
{
<
PoweroffOutlined
/>
}
loading=
{
false
}
onClick=
{
openModel
}
>
关闭小区
</
Button
>
<
Button
onClick=
{
goToReturn
}
>
<
LeftOutlined
/>
Back
</
Button
>
</
div
>
</
h3
>
<
Divider
/>
<
div
className=
"box"
>
{
/* 激活码 */
}
<
div
className=
"code"
>
<
li
>
激活码
</
li
>
<
Avatar
shape=
"square"
style=
{
{
color
:
'#f56a00'
,
backgroundColor
:
'#fde3cf'
}
}
size=
{
120
}
icon=
{
<
FileJpgOutlined
/>
}
/>
</
div
>
{
/* 详情 */
}
<
div
className=
"list-item"
>
<
div
className=
"item"
>
<
label
>
小区名字:
</
label
>
<
span
>
XXXXX
</
span
>
</
div
>
{
/* ---------- */
}
<
div
className=
"item"
>
<
label
>
详细地址:
</
label
>
<
span
>
XXXXX
</
span
>
</
div
>
{
/* ---------- */
}
<
div
className=
"item"
>
<
label
>
工作时间:
</
label
>
<
span
>
XXXXX
</
span
>
</
div
>
{
/* ---------- */
}
<
div
className=
"inst"
>
<
div
className=
"item"
>
<
label
>
小区联系电话:
</
label
>
<
span
>
XXXXX
</
span
>
</
div
>
<
div
className=
"item"
>
<
label
>
小区邮箱:
</
label
>
<
span
>
XXXXX
</
span
>
</
div
>
</
div
>
{
/* ---------- */
}
<
div
className=
"item"
>
<
label
>
小区管理员:
</
label
>
<
span
>
XXXXX
</
span
>
</
div
>
{
/* ---------- */
}
<
div
className=
"item"
style=
{
{
marginBottom
:
'0'
}
}
>
<
label
>
物业费:
</
label
>
<
Checkbox
.
Group
options=
{
plainOptions
}
defaultValue=
{
[
'1'
]
}
/>
</
div
>
</
div
>
</
div
>
<
Divider
/>
<
div
className=
"box"
>
<
div
className=
"list-item"
>
<
div
className=
"item"
>
<
label
>
楼巴时刻表:
</
label
>
<
Avatar
shape=
"square"
style=
{
{
color
:
'#f56a00'
,
backgroundColor
:
'#fde3cf'
}
}
size=
{
64
}
icon=
{
<
FileJpgOutlined
/>
}
/>
<
Button
type=
"link"
>
预览
</
Button
>
</
div
>
{
/* ---------- */
}
<
div
className=
"item"
>
<
label
>
物业办事指南:
</
label
>
<
Avatar
shape=
"square"
style=
{
{
color
:
'#f56a00'
,
backgroundColor
:
'#fde3cf'
}
}
size=
{
64
}
icon=
{
<
FilePdfOutlined
/>
}
/>
<
Button
type=
"link"
>
预览
</
Button
>
</
div
>
{
/* ---------- */
}
<
div
className=
"item"
>
<
label
>
保质期服务:
</
label
>
<
Avatar
shape=
"square"
style=
{
{
color
:
'#f56a00'
,
backgroundColor
:
'#fde3cf'
}
}
size=
{
64
}
/>
<
Button
type=
"link"
>
预览
</
Button
>
</
div
>
</
div
>
</
div
>
<
Divider
/>
<
div
className=
"box"
>
<
div
className=
"list-item"
>
<
div
className=
"item"
>
<
label
>
帮助中心:
</
label
>
<
span
>
1
</
span
>
<
span
>
2
</
span
>
<
span
>
3
</
span
>
<
span
>
4
</
span
>
</
div
>
</
div
>
</
div
>
<
Divider
/>
<
div
className=
"box"
>
<
div
className=
"list-item"
>
<
div
className=
"item"
>
<
label
>
临时到访码下载:
</
label
>
<
Avatar
shape=
"square"
style=
{
{
color
:
'#f56a00'
,
backgroundColor
:
'#fde3cf'
}
}
size=
{
64
}
/>
<
Button
type=
"link"
>
下载
</
Button
>
<
Input
placeholder=
"Basic usage"
disabled
value=
"12333333333"
/>
<
Button
type=
"link"
onClick=
{
copy
}
>
复制
</
Button
>
</
div
>
</
div
>
</
div
>
{
/* 确认关闭框 */
}
<
Modal
title=
"确认关闭小区吗?"
visible=
{
ModelFee
}
onCancel=
{
handleCancel
}
onOk=
{
handleOk
}
>
<
p
>
关闭小区将会
<
span
style=
{
{
color
:
'red'
}
}
>
删除
</
span
>
小区内
<
span
style=
{
{
color
:
'red'
}
}
>
所有
</
span
>
业主,请谨慎操作!
</
p
>
</
Modal
>
</
div
>
);
};
// export default Adds;
function
map
(
state
:
any
)
{
const
Data
=
state
.
CellList
.
DataSave
;
const
loading
=
state
.
loading
.
models
.
CellList
;
return
{
Data
,
loading
};
}
export
default
connect
(
map
)(
Adds
);
src/pages/CommunityManagement/CellList/celllist.less
View file @
0cf1c156
.contop{
li {
list-style: none;
}
.contop {
padding: 20px;
padding: 20px;
background: #fff;
background: #fff;
margin-bottom: 20px;
margin-bottom: 20px;
}
}
.listbox{
.listbox
{
width: 100%;
width: 100%;
background-color: #ffffff;
background-color: #ffffff;
padding: 10px;
padding: 10px;
}
}
// 添加
// 添加
.form{
.form
{
padding: 20px;
padding: 20px;
border: 1px solid #efefef;
border: 1px solid #efefef;
border-radius: 3px;
border-radius: 3px;
background: #fff;
background: #fff;
box-shadow: 0 1px 1px #ccc;
box-shadow: 0 1px 1px #ccc;
h3
{
h3
{
margin-bottom: 30px;
margin-bottom: 30px;
position: relative;
position: relative;
.back
{
.back
{
position: absolute;
position: absolute;
right: 0;
right: 0;
top: 0;
top: 0;
...
@@ -27,47 +30,78 @@
...
@@ -27,47 +30,78 @@
background: #fff;
background: #fff;
}
}
}
}
.span,.li{
display: inline-block;
.li {
min-width: 240px;
line-height: 30px;
background: #efefef;
font-size: 15px;
margin-top: -3px;
vertical-align: middle;
margin-left: 12px;
padding: 0 6px;
border-radius: 2px;
border: 1px solid #d9d9d9;
color: #999;
}
.li{
min-width: 140px;
min-width: 140px;
margin-top: 15px;
margin-top: 15px;
margin-left: 0;
margin-left: 0;
display: block;
}
}
input,.ant-upload-list{
input,
.ant-upload-list {
width: 240px;
width: 240px;
}
}
.ant-picker-range
{
.ant-picker-range
{
width: 240px;
width: 240px;
input
{
input
{
width: 100%;
width: 100%;
}
}
}
}
.list
{
.list
{
display: inline-block;
display: inline-block;
}
}
.ant-checkbox-group
{
.ant-checkbox-group
{
line-height: 34px;
line-height: 34px;
}
}
hr
{
hr
{
border: 0;
border: 0;
height: 1px;
height: 1px;
background: #eee;
background: #eee;
margin-bottom: 20px;
margin-bottom: 20px;
}
}
.tip{
.tip {
padding:15px 0;
padding: 15px 0;
}
.ant-form-item-label > label {
width: 160px;
}
// 详情页
.box {
position: relative;
.item {
font-size: 15px;
line-height: 35px;
margin-bottom: 10px;
label {
display: inline-block;
min-width: 110px;
}
}
.inst {
display: flex;
.item {
flex: 1;
&:nth-child(2) {
flex: 2;
}
}
}
}
.code {
position: absolute;
right: 5%;
top: 50%;
transform: translateY(-65%);
li {
text-align: center;
line-height: 35px;
}
}
}
}
.ant-picker-time-panel-column {
width: 100px;
}
}
src/pages/ContractManagement/ContractContent.tsx
View file @
0cf1c156
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
styles
from
'./ContractContent.less'
;
import
styles
from
'./ContractContent.less'
;
import
{
Input
,
Form
,
message
,
Upload
,
Button
,
DatePicker
,
Space
,
}
from
'antd'
;
import
{
Input
,
Form
,
message
,
Upload
,
Button
,
DatePicker
,
Space
}
from
'antd'
;
import
{
UploadOutlined
,
LeftOutlined
}
from
'@ant-design/icons'
;
import
{
UploadOutlined
,
LeftOutlined
}
from
'@ant-design/icons'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
Loading
}
from
'umi'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
Loading
}
from
'umi'
;
import
{
RA
}
from
'@/services/tos'
;
import
{
RA
}
from
'@/services/tos'
;
...
@@ -15,115 +15,108 @@ import './ContractContent.less';
...
@@ -15,115 +15,108 @@ import './ContractContent.less';
import
'moment/locale/en-au'
;
import
'moment/locale/en-au'
;
import
locale
from
'antd/es/date-picker/locale/en_US'
;
import
locale
from
'antd/es/date-picker/locale/en_US'
;
import
SearchOptionsCommnity
from
'@/components/SearchOptions/SearchOptionsCommnity'
;
import
SearchOptionsCommnity
from
'@/components/SearchOptions/SearchOptionsCommnity'
;
import
{
tipList
}
from
'@/utils/tip'
import
{
tipList
}
from
'@/utils/tip'
;
const
ContractContent
=
(
props
:
any
)
=>
{
const
ContractContent
=
(
props
:
any
)
=>
{
const
{
ContractModel
,
dispatch
}
=
props
;
const
{
ContractModel
,
dispatch
}
=
props
;
const
{
RangePicker
}
=
DatePicker
;
// 日期组件
const
{
RangePicker
}
=
DatePicker
;
// 日期组件
const
[
form
]
=
Form
.
useForm
();
// 表单
const
[
form
]
=
Form
.
useForm
();
// 表单
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
dispatch
({
type
:
'Contract/RA'
,
playload
:
{
index
:
index
,
body
:
values
}
})
};
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
dispatch
({
type
:
'Contract/RA'
,
playload
:
{
index
:
index
,
body
:
values
}
});
};
// 设置之前时间不能选择
// 设置之前时间不能选择
function
disabledDate
(
current
:
any
)
{
function
disabledDate
(
current
:
any
)
{
return
current
&&
current
<=
moment
().
subtract
(
1
,
"days"
).
endOf
(
'day'
);
return
current
&&
current
<=
moment
().
subtract
(
1
,
'days'
).
endOf
(
'day'
);
}
}
const
startTime
=
moment
().
format
(
'YYYY-MM-DD'
);
// 开始默认事件
const
startTime
=
moment
().
format
(
'YYYY-MM-DD'
);
// 开始默认事件
const
overTime
=
moment
().
add
(
1
,
'month'
).
format
(
'YYYY-MM-DD'
);
// 结束默认事件
const
overTime
=
moment
().
add
(
1
,
'month'
).
format
(
'YYYY-MM-DD'
);
// 结束默认事件
const
[
fileList
,
setFileList
]
=
useState
([]
as
any
);
const
[
fileList
,
setFileList
]
=
useState
([]
as
any
);
console
.
log
(
tipList
);
console
.
log
(
tipList
)
useEffect
(()
=>
{
useEffect
(()
=>
{
// 如果是添加传来没有值的时候 就清空 否则 赋值给表单
// 如果是添加传来没有值的时候 就清空 否则 赋值给表单
if
(
ContractModel
.
record
===
-
1
){
if
(
ContractModel
.
record
===
-
1
)
{
// 返回列表
// 返回列表
}
else
if
(
ContractModel
.
record
===
0
)
{
form
.
resetFields
();
}
else
if
(
ContractModel
.
record
===
0
){
}
else
{
form
.
resetFields
()
}
else
{
let
arr
=
ContractModel
.
record
.
contractFileName
.
split
(
','
);
let
arr
=
ContractModel
.
record
.
contractFileName
.
split
(
','
);
let
obj
=
new
Array
;
let
obj
=
new
Array
()
;
for
(
var
i
in
arr
)
{
for
(
var
i
in
arr
)
{
let
a
=
{
let
a
=
{
uid
:
arr
[
i
],
uid
:
arr
[
i
],
name
:
arr
[
i
],
name
:
arr
[
i
],
url
:
'http://'
url
:
'http://'
,
}
}
;
obj
.
push
(
a
)
obj
.
push
(
a
)
;
}
}
setFileList
([...
obj
])
setFileList
([...
obj
])
;
// setFileList([{ uid: 1,name:DataSaveDetail.contractFileName }])
// setFileList([{ uid: 1,name:DataSaveDetail.contractFileName }])
form
.
setFieldsValue
({
form
.
setFieldsValue
({
...
ContractModel
.
record
,
...
ContractModel
.
record
,
time
:
[
moment
(
ContractModel
.
record
.
contractValidStartDate
),
moment
(
ContractModel
.
record
.
contractValidEndDate
)],
time
:
[
moment
(
ContractModel
.
record
.
contractValidStartDate
),
})
moment
(
ContractModel
.
record
.
contractValidEndDate
),
],
});
}
}
},
[
1
]);
}
,[
1
])
const
goToReturn
=
()
=>
{
const
goToReturn
=
()
=>
{
// console.log(fileList)
// console.log(fileList)
history
.
back
()
history
.
back
();
}
}
;
// // 提交
// // 提交
const
onFinish
=
(
values
:
any
)
=>
{
const
onFinish
=
(
values
:
any
)
=>
{
values
.
contractValidStartDate
=
values
.
time
[
0
].
format
(
'YYYY-MM-DD'
)
values
.
contractValidStartDate
=
values
.
time
[
0
].
format
(
'YYYY-MM-DD'
)
;
values
.
contractValidEndDate
=
values
.
time
[
1
].
format
(
'YYYY-MM-DD'
)
values
.
contractValidEndDate
=
values
.
time
[
1
].
format
(
'YYYY-MM-DD'
)
;
let
file
=
fileList
;
let
file
=
fileList
;
let
data
=
new
Array
();
let
data
=
new
Array
();
for
(
let
i
=
0
;
i
<
file
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
file
.
length
;
i
++
)
{
data
.
push
(
fileList
[
i
].
name
)
data
.
push
(
fileList
[
i
].
name
)
;
}
}
values
.
contractFileNameList
=
data
;
values
.
contractFileNameList
=
data
;
if
(
ContractModel
.
record
.
id
===
undefined
)
{
if
(
ContractModel
.
record
.
id
===
undefined
)
{
// 添加
// 添加
RA
(
27
,
values
)
RA
(
27
,
values
)
;
}
else
{
}
else
{
// 修改
// 修改
message
.
error
(
'数据接口对接中'
);
}
}
// RA(27, values)
// RA(27, values)
}
};
// 上传文件设置
// 上传文件设置
const
uploadProps
=
{
const
uploadProps
=
{
accept
:
".doc,.docx,.jpg,.png,.pdf"
,
accept
:
'.doc,.docx,.jpg,.png,.pdf'
,
action
:
"/tos/image/upload"
,
action
:
'/tos/image/upload'
,
data
:
{
imageType
:
"tosContract"
},
data
:
{
imageType
:
'tosContract'
},
fileList
:
fileList
,
fileList
:
fileList
,
onChange
({
file
,
fileList
}:{
file
:
any
,
fileList
:
any
}
)
{
onChange
({
file
,
fileList
}:
{
file
:
any
;
fileList
:
any
})
{
setFileList
(
fileList
);
setFileList
(
fileList
)
if
(
file
.
status
==
'done'
)
{
if
(
file
.
status
==
'done'
)
{
message
.
success
(
file
.
name
,
3
)
message
.
success
(
file
.
name
,
3
);
}
}
}
},
};
};
// 时间提示
// 时间提示
// let tipTime = moment(defForm.time[1]).subtract(25, 'days').format('YYYY-MM-DD');
// let tipTime = moment(defForm.time[1]).subtract(25, 'days').format('YYYY-MM-DD');
// let dec = moment(tipTime).diff(startTime,'days') > 1 ? tipTime : 'Due soon';
// let dec = moment(tipTime).diff(startTime,'days') > 1 ? tipTime : 'Due soon';
// const [stateTime,setmodalTime] = useState(dec); // 监听时间变化 -- 结束时间
// const [stateTime,setmodalTime] = useState(dec); // 监听时间变化 -- 结束时间
// // 设置提示倒计时 25 天
// // 设置提示倒计时 25 天
const
changeTime
=
(
data
:
any
,
dateStrings
:
any
)
=>
{
const
changeTime
=
(
data
:
any
,
dateStrings
:
any
)
=>
{
// if(overTime != dateStrings[1]){
// if(overTime != dateStrings[1]){
// moment(dateStrings[1]).diff(startTime,'days') > 25 ?
// moment(dateStrings[1]).diff(startTime,'days') > 25 ?
// setmodalTime(moment(dateStrings[1]).subtract(25, 'days').format('YYYY-MM-DD')) :
// setmodalTime(moment(dateStrings[1]).subtract(25, 'days').format('YYYY-MM-DD')) :
...
@@ -132,69 +125,74 @@ const ContractContent = (props: any) => {
...
@@ -132,69 +125,74 @@ const ContractContent = (props: any) => {
// form.setFieldsValue({
// form.setFieldsValue({
// 'time' : [moment(dateStrings[0]),moment(dateStrings[1])]
// 'time' : [moment(dateStrings[0]),moment(dateStrings[1])]
// })
// })
}
}
;
// 选择小区名字并赋值
// 选择小区名字并赋值
const
opname
=
(
value
:
any
)
=>
{
const
opname
=
(
value
:
any
)
=>
{
form
.
setFieldsValue
({
form
.
setFieldsValue
({
'communityName'
:
value
communityName
:
value
,
})
});
}
};
return
(
return
(
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件 */
}
{
/* 头部组件 */
}
<
div
className=
{
styles
.
box
}
>
<
div
className=
{
styles
.
box
}
>
<
div
className=
{
styles
.
item1
}
>
{
ContractModel
.
type
}
Service Provider
</
div
>
<
div
className=
{
styles
.
item1
}
>
{
ContractModel
.
type
}
Service Provider
</
div
>
<
button
className=
{
styles
.
item3
}
onClick=
{
goToReturn
}
><
LeftOutlined
/>
Back
</
button
>
<
button
className=
{
styles
.
item3
}
onClick=
{
goToReturn
}
>
<
LeftOutlined
/>
Back
</
button
>
</
div
>
</
div
>
{
/* 表单 initialValues={defForm} */
}
{
/* 表单 initialValues={defForm} */
}
<
Form
<
Form
// ref={formRef}
// ref={formRef}
autoComplete=
"off"
autoComplete=
"off"
form=
{
form
}
form=
{
form
}
name=
"basic"
name=
"basic"
initialValues=
{
ContractModel
.
record
}
initialValues=
{
ContractModel
.
record
}
onFinish=
{
onFinish
}
onFinish=
{
onFinish
}
// initialValues={defForm}
// initialValues={defForm}
>
>
<
div
className=
'contract_box'
>
<
div
className=
"contract_box"
>
{
/* 合同编号、甲方、乙方 */
}
{
/* 合同编号、甲方、乙方 */
}
<
div
className=
'list_1'
>
<
div
className=
"list_1"
>
<
div
className=
'item_1'
>
<
div
className=
"item_1"
>
<
Form
.
Item
<
Form
.
Item
name=
"contractNumber"
name=
"contractNumber"
label=
"Contract Number"
label=
"Contract Number"
rules=
{
[{
required
:
true
,
message
:
`${tipList[0]}`
}]
}
>
rules=
{
[{
required
:
true
,
message
:
`${tipList[0]}`
}]
}
<
Input
style=
{
{
width
:
200
}
}
placeholder=
"Contract Number"
/>
>
<
Input
style=
{
{
width
:
200
}
}
placeholder=
"Contract Number"
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
div
>
</
div
>
<
div
className=
'item_1'
>
<
div
className=
"item_1"
>
<
Form
.
Item
<
Form
.
Item
name=
"contractPartyA"
name=
"contractPartyA"
label=
"Contract Party A"
label=
"Contract Party A"
rules=
{
[{
required
:
true
,
message
:
`${tipList[1]}`
}]
}
>
rules=
{
[{
required
:
true
,
message
:
`${tipList[1]}`
}]
}
<
Input
style=
{
{
width
:
200
}
}
placeholder=
"Contract Party A"
/>
>
<
Input
style=
{
{
width
:
200
}
}
placeholder=
"Contract Party A"
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
div
>
</
div
>
<
div
className=
'item_1'
>
<
div
className=
"item_1"
>
<
Form
.
Item
<
Form
.
Item
name=
"contractPartyB"
name=
"contractPartyB"
label=
"Contract Party B"
label=
"Contract Party B"
rules=
{
[{
required
:
true
,
message
:
`${tipList[2]}`
}]
}
>
rules=
{
[{
required
:
true
,
message
:
`${tipList[2]}`
}]
}
<
Input
style=
{
{
width
:
200
}
}
placeholder=
"Contract Party B"
/>
>
<
Input
style=
{
{
width
:
200
}
}
placeholder=
"Contract Party B"
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
div
>
</
div
>
</
div
>
</
div
>
{
/* 小区 */
}
{
/* 小区 */
}
<
div
className=
'list2'
>
<
div
className=
"list2"
>
<
div
className=
'main'
>
<
div
className=
"main"
>
<
Form
.
Item
<
Form
.
Item
labelAlign=
'right'
labelAlign=
"right"
name=
"communityName"
name=
"communityName"
label=
"Community Name"
label=
"Community Name"
rules=
{
[{
required
:
true
,
message
:
`${tipList[3]}`
}]
}
>
rules=
{
[{
required
:
true
,
message
:
`${tipList[3]}`
}]
}
>
<
SearchOptionsCommnity
<
SearchOptionsCommnity
defaultName=
{
ContractModel
.
record
.
communityName
}
defaultName=
{
ContractModel
.
record
.
communityName
}
// ubmit={extendName}
// ubmit={extendName}
...
@@ -204,23 +202,25 @@ const ContractContent = (props: any) => {
...
@@ -204,23 +202,25 @@ const ContractContent = (props: any) => {
</
div
>
</
div
>
</
div
>
</
div
>
{
/* 合同标题 */
}
{
/* 合同标题 */
}
<
div
className=
'list2'
>
<
div
className=
"list2"
>
<
Form
.
Item
<
Form
.
Item
labelAlign=
'right'
labelAlign=
"right"
name=
"contractTitle"
name=
"contractTitle"
label=
"Contract Title"
label=
"Contract Title"
rules=
{
[{
required
:
true
,
message
:
`${tipList[4]}`
}]
}
>
rules=
{
[{
required
:
true
,
message
:
`${tipList[4]}`
}]
}
<
Input
style=
{
{
width
:
200
}
}
placeholder=
"Contract Title"
/>
>
<
Input
style=
{
{
width
:
200
}
}
placeholder=
"Contract Title"
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
div
>
</
div
>
{
/* 起止时间 */
}
{
/* 起止时间 */
}
<
div
className=
'list2'
>
<
div
className=
"list2"
>
<
Form
.
Item
<
Form
.
Item
name=
"time"
name=
"time"
labelAlign=
'right'
labelAlign=
"right"
label=
"Contract Time"
label=
"Contract Time"
rules=
{
[{
required
:
true
,
message
:
`${tipList[5]}`
}]
}
>
rules=
{
[{
required
:
true
,
message
:
`${tipList[5]}`
}]
}
>
<
RangePicker
<
RangePicker
locale=
{
locale
}
locale=
{
locale
}
defaultValue=
{
ContractModel
.
time
}
defaultValue=
{
ContractModel
.
time
}
...
@@ -230,15 +230,14 @@ const ContractContent = (props: any) => {
...
@@ -230,15 +230,14 @@ const ContractContent = (props: any) => {
</
Form
.
Item
>
</
Form
.
Item
>
</
div
>
</
div
>
{
/* 附件上传 */
}
{
/* 附件上传 */
}
<
div
className=
'list2'
>
<
div
className=
"list2"
>
<
Form
.
Item
<
Form
.
Item
labelAlign=
'right'
labelAlign=
"right"
label=
"Contract Annex"
label=
"Contract Annex"
rules=
{
[{
required
:
true
,
message
:
`${tipList[6]}`
}]
}
>
rules=
{
[{
required
:
true
,
message
:
`${tipList[6]}`
}]
}
<
Upload
>
{
...
uploadProps
}
>
<
Upload
{
...
uploadProps
}
>
<
Button
>
<
Button
>
<
UploadOutlined
/>
Upload
<
UploadOutlined
/>
Upload
</
Button
>
</
Button
>
...
@@ -247,14 +246,18 @@ const ContractContent = (props: any) => {
...
@@ -247,14 +246,18 @@ const ContractContent = (props: any) => {
</
div
>
</
div
>
{
/* 合同内容 */
}
{
/* 合同内容 */
}
<
div
className=
'list2'
>
<
div
className=
"list2"
>
<
div
className=
{
styles
.
box8item2x1
}
>
<
div
className=
{
styles
.
box8item2x1
}
>
<
Form
.
Item
<
Form
.
Item
rules=
{
[{
required
:
true
,
message
:
`${tipList[5]}`
}]
}
rules=
{
[{
required
:
true
,
message
:
`${tipList[5]}`
}]
}
label=
"Contract Remarks"
label=
"Contract Remarks"
name=
"contractRemindContent"
>
name=
"contractRemindContent"
<
TextArea
autoSize=
{
false
}
style=
{
{
padding
:
8
,
width
:
600
,
height
:
194
}
}
placeholder=
'remarks'
>
>
</
TextArea
>
<
TextArea
autoSize=
{
false
}
style=
{
{
padding
:
8
,
width
:
600
,
height
:
194
}
}
placeholder=
"remarks"
></
TextArea
>
</
Form
.
Item
>
</
Form
.
Item
>
</
div
>
</
div
>
<
div
className=
{
styles
.
box8item2x2
}
>
<
div
className=
{
styles
.
box8item2x2
}
>
...
@@ -264,24 +267,20 @@ const ContractContent = (props: any) => {
...
@@ -264,24 +267,20 @@ const ContractContent = (props: any) => {
</
div
>
</
div
>
<
div
>
<
div
>
<
LINE
/>
<
LINE
/>
<
Button
type=
"primary"
htmlType=
"submit"
>
Conserve
</
Button
>
<
Button
type=
"primary"
htmlType=
"submit"
>
Conserve
</
Button
>
</
div
>
</
div
>
</
div
>
</
div
>
</
Form
>
</
Form
>
</
div
>
</
div
>
)
);
}
};
function
mapStateToProps
({
ContractModel
}:
{
ContractModel
:
any
})
{
function
mapStateToProps
({
ContractModel
}:
{
ContractModel
:
any
})
{
return
{
return
{
ContractModel
ContractModel
,
};
};
}
}
export
default
connect
(
mapStateToProps
)(
ContractContent
);
export
default
connect
(
mapStateToProps
)(
ContractContent
);
src/utils/params.ts
View file @
0cf1c156
...
@@ -58,7 +58,8 @@ export const requestList = [
...
@@ -58,7 +58,8 @@ export const requestList = [
file
:
[
'A.jpg'
],
file
:
[
'A.jpg'
],
},
},
],
],
[
'/tos/tosManageCommunity/save'
,
'29 新建一个小区'
,
{}],
// ['/tos/tosManageCommunity/save', '29 新建一个小区', {}],
[
'/tos/tosCommunity/save'
,
'29 新建一个小区'
,
{}],
[
'/tos/tosOrder/get'
,
'30 获取订单详情'
,
{}],
[
'/tos/tosOrder/get'
,
'30 获取订单详情'
,
{}],
[
'/tos/property/community/houseCard/query'
,
'31 获取住户卡列表'
,
{}],
[
'/tos/property/community/houseCard/query'
,
'31 获取住户卡列表'
,
{}],
[
'/tos/tosCommunity/get/detail'
,
'32 获取小区详情'
,
{}],
[
'/tos/tosCommunity/get/detail'
,
'32 获取小区详情'
,
{}],
...
...
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