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
1596dbf3
Commit
1596dbf3
authored
May 21, 2021
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Signed-off-by: cellee <893264950@qq.com>
parent
eb1dda02
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
594 additions
and
198 deletions
+594
-198
config.ts
config/config.ts
+2
-1
ZipCode.tsx
src/components/Form/ZipCode.tsx
+1
-1
SearchOptionsTow.tsx
src/components/SearchOptions/SearchOptionsTow.tsx
+1
-1
ServicePro.ts
src/models/CommunityManagement/ServicePro.ts
+20
-7
service.less
src/pages/AccountManagement/Service/service.less
+22
-2
service.tsx
src/pages/AccountManagement/Service/service.tsx
+12
-4
serviceAdds.tsx
src/pages/AccountManagement/Service/serviceAdds.tsx
+253
-0
serviceDetail.tsx
src/pages/AccountManagement/Service/serviceDetail.tsx
+233
-144
Renovation.tsx
src/pages/CommercialService/Renovation.tsx
+11
-3
Adds.tsx
src/pages/CommunityManagement/CellList/Adds.tsx
+12
-2
celllist.less
src/pages/CommunityManagement/CellList/celllist.less
+22
-22
Contract.tsx
src/pages/ContractManagement/Contract.tsx
+2
-2
params.ts
src/utils/params.ts
+3
-9
No files found.
config/config.ts
View file @
1596dbf3
/*
* @Author: your name
* @Date: 2020-12-01 18:40:06
* @LastEditTime: 2021-0
4-26 17:35:57
* @LastEditTime: 2021-0
5-20 09:50:09
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\config\config.ts
...
...
@@ -395,6 +395,7 @@ export default defineConfig({
name
:
'service'
,
routes
:
[
{
path
:
'./'
,
component
:
'./AccountManagement/Service/service'
},
{
path
:
'./add'
,
component
:
'./AccountManagement/Service/serviceAdds'
},
{
path
:
'./edit/:id'
,
component
:
'./AccountManagement/Service/serviceEdit'
},
{
path
:
'./detail/:id'
,
...
...
src/components/Form/ZipCode.tsx
View file @
1596dbf3
/*
* @Author: your name
* @Date: 2021-01-30 16:16:41
* @LastEditTime: 2021-0
4-23 18:50:35
* @LastEditTime: 2021-0
5-06 09:39:51
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\components\Form\ZipCode.tsx
...
...
src/components/SearchOptions/SearchOptionsTow.tsx
View file @
1596dbf3
/*
* @Author: your name
* @Date: 2020-12-02 09:42:49
* @LastEditTime: 2021-0
2-06 13:24:38
* @LastEditTime: 2021-0
5-20 14:22:39
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\components\SearchOptions\SearchOptionsTow.tsx
...
...
src/models/CommunityManagement/ServicePro.ts
View file @
1596dbf3
/*
* @Author: your name
* @Date: 2021-01-14 09:23:51
* @LastEditTime: 2021-0
3-11 14:36:23
* @LastEditTime: 2021-0
5-21 15:32:36
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\models\CommunityManagement\Bug.ts
...
...
@@ -55,6 +55,7 @@ export default {
switch
(
playload
.
index
)
{
case
68
:
// 获取列表
{
// console.log(resp.data);
let
Data
=
resp
.
data
;
yield
put
({
type
:
'returnPage'
,
Data
});
}
...
...
@@ -65,26 +66,33 @@ export default {
yield
put
({
type
:
'returnDataSave'
,
DataSave
});
}
break
;
case
72
:
//
小区
改变
case
72
:
// 改变
{
let
Community
=
resp
.
data
;
Community
.
communityName
=
playload
.
body
.
communityName
;
yield
put
({
type
:
'returnDataSaveCommunity'
,
Community
});
}
break
;
case
70
:
// 小区编辑保存
case
71
:
// 小区回复保存
case
71
:
// 回复保存
{
let
Data
=
null
;
yield
put
({
type
:
'returnPage'
,
Data
});
history
.
push
(
'/AccountManagement/service'
);
}
break
;
case
70
:
// 编辑保存
{
let
Result
=
{
state
:
2
,
};
yield
put
({
type
:
'returnResult'
,
Result
});
}
break
;
case
73
:
// 删除报告
{
let
Result
=
{
msg
:
'Successfully deleted'
,
state
:
'0000'
,
state
:
1
,
};
yield
put
({
type
:
'returnResult'
,
Result
});
// let Community = resp.data;
...
...
@@ -92,6 +100,11 @@ export default {
// yield put({ type: 'returnDataSaveCommunity', Community });
}
break
;
case
77
:
// 获取列表
{
history
.
push
(
'/AccountManagement/service'
);
}
break
;
}
}
},
...
...
@@ -103,7 +116,7 @@ export default {
let
DataSave
=
null
;
yield
put
({
type
:
'returnDataSave'
,
DataSave
});
},
*
Result
({
playload
},
{
call
,
put
})
{
*
Result
s
({
playload
},
{
call
,
put
})
{
let
Result
=
null
;
yield
put
({
type
:
'returnResult'
,
Result
});
},
...
...
src/pages/AccountManagement/Service/service.less
View file @
1596dbf3
.contop {
position: relative;
padding: 20px;
.listBut {
position: absolute;
right: 20px;
bottom: 25px;
}
}
.pages {
padding: 20px;
...
...
@@ -17,12 +23,26 @@
margin-bottom: 18px;
}
hr {
border: 0;
height: 1px;
background: #eee;
margin-bottom: 24px;
background: #eee;
border: 0;
}
.diys {
display: inline-block;
margin-left: 10%;
}
.psoBox {
position: relative;
.psoBtn {
// float: right;
margin-left: 30px;
}
}
.flex {
display: flex;
align-items: center;
justify-content: end;
}
src/pages/AccountManagement/Service/service.tsx
View file @
1596dbf3
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Space
,
message
,
Pagination
,
Spi
n
}
from
'antd'
;
import
{
Space
,
message
,
Pagination
,
Butto
n
}
from
'antd'
;
import
{
connect
,
history
}
from
'umi'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
ProTable
from
'@ant-design/pro-table'
;
...
...
@@ -69,7 +70,7 @@ const service = (props: any) => {
const
{
Data
,
dispatch
,
loading
,
Init
,
location
}
=
props
;
const
[
locationkey
,
setlocationkey
]
=
useState
(
null
as
any
);
// 是否从其他列表刷新来的
const
[
term
,
setTerm
]
=
useState
(
null
as
any
);
// 拉取数据的条件存储
const
[
term
,
setTerm
]
=
useState
(
{}
as
any
);
// 拉取数据的条件存储
// 监听是否有数据
useEffect
(()
=>
{
...
...
@@ -83,7 +84,7 @@ const service = (props: any) => {
setTerm
({
...
obj
});
RA
(
68
,
obj
,
module
,
dispatch
);
}
},
[
location
,
Init
]);
},
[
location
,
Init
,
Data
]);
// 清除操作之前的数据
const
emptys
=
(
data
:
any
,
url
:
any
)
=>
{
...
...
@@ -122,6 +123,10 @@ const service = (props: any) => {
// console.log(page)
};
const
adds
=
()
=>
{
history
.
push
(
'/AccountManagement/service/Add'
);
};
return
(
<
div
>
<>
...
...
@@ -133,11 +138,14 @@ const service = (props: any) => {
checklist=
{
Init
?
Init
.
CommunityList
:
[]
}
onSubmit=
{
CallBackTitleSearch
}
/>
<
Button
className=
"listBut"
type=
"primary"
onClick=
{
()
=>
adds
()
}
icon=
{
<
PlusOutlined
/>
}
>
Create Report
</
Button
>
</
div
>
<
ProTable
pagination=
{
false
}
// 隐藏默认分页
rowKey=
{
'id'
}
dataSource=
{
Data
?
Data
.
list
:
null
}
rowKey=
{
'id'
}
columns=
{
columns
}
search=
{
false
}
loading=
{
loading
}
...
...
src/pages/AccountManagement/Service/serviceAdds.tsx
0 → 100644
View file @
1596dbf3
/*
* @Author: your name
* @Date: 2021-03-02 14:39:40
* @LastEditTime: 2021-05-20 16:32:22
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\pages\AccountManagement\Service\serviceEdit.tsx
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Button
,
Spin
,
Form
,
Input
,
message
}
from
'antd'
;
import
{
connect
}
from
'umi'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
const
{
TextArea
}
=
Input
;
import
{
RA
}
from
'@/utils/method'
;
const
module
=
'ServicePro'
;
import
'./service.less'
;
import
TitleBack
from
'@/components/TitleBack/TitleBack'
;
import
SearchOptionsCommnity
from
'@/components/SearchOptions/SearchOptionsCommnity'
;
import
PictureOptionsRow
from
'@/components/PictureOptions/PictureOptionsRow'
;
const
service
=
(
props
:
any
)
=>
{
const
{
DataSave
,
dispatch
,
loading
,
match
,
user
}
=
props
;
const
[
term
,
setTerm
]
=
useState
(
null
as
any
);
// 默认小区
const
[
ImageSrc
,
setImageSrc
]
=
useState
([]
as
any
);
// 图片地址
const
[
report
,
setreport
]
=
useState
([]
as
any
);
// 循环新增的报告
const
[
form
]
=
Form
.
useForm
();
// 监听是否有数据
useEffect
(()
=>
{
if
(
match
.
params
.
id
)
{
// RA(69, { id: match.params.id }, module, dispatch);
}
},
[
match
]);
useEffect
(()
=>
{
if
(
DataSave
!=
null
)
{
}
},
[
DataSave
]);
//onFinish 提交
const
onFinish
=
(
values
:
any
)
=>
{
// 存储个数
let
num
=
[];
// 先抽取所有的key
let
obj
=
Object
.
keys
(
values
);
// 再看有多少个 值
for
(
let
i
in
obj
)
{
if
(
obj
[
i
].
indexOf
(
'reportContent'
)
!=
-
1
)
{
num
.
push
(
obj
[
i
]);
}
}
// 删除第一个
num
.
splice
(
num
.
indexOf
(
'reportContent'
),
1
);
// 开始拼接
let
tosReportRecordModels
=
[];
// 第一个是都有的
let
requte
=
{
reporterId
:
user
.
currentUser
.
userModel
.
id
,
communityName
:
values
.
communityName
,
imagesList
:
values
.
imagesList
,
reportContent
:
values
.
reportContent
,
};
// 添加进去
tosReportRecordModels
.
push
(
requte
);
// 如果存在其他的
if
(
num
.
length
>
0
)
{
num
.
forEach
((
i
,
idx
)
=>
{
let
img
=
'imagesList'
+
idx
;
let
cont
=
'reportContent'
+
idx
;
let
objs
=
{
reporterId
:
user
.
currentUser
.
userModel
.
id
,
communityName
:
values
.
communityName
,
imagesList
:
values
[
img
],
reportContent
:
values
[
cont
],
};
tosReportRecordModels
.
push
(
objs
);
});
}
// 最后结果
let
oves
=
{
tosReportRecordModels
,
};
// 再发起请求
RA
(
77
,
oves
,
module
,
dispatch
);
};
// 选择小区名字并赋值
const
opname
=
(
value
:
any
)
=>
{
// if (value) {
// RA(72, { communityName: value }, module, dispatch);
// }
// setTerm(value);
form
.
setFieldsValue
({
communityName
:
value
,
});
};
// 增加
const
addItem
=
()
=>
{
// 先检查表单内容填完了没
let
objs
=
form
.
getFieldsValue
();
// 存在没填写的就禁止增加
for
(
let
i
in
objs
)
{
if
(
typeof
objs
[
i
]
===
'undefined'
)
{
message
.
warning
(
'Please enter all information!'
);
return
false
;
}
}
// 再新增
let
a
=
report
;
a
.
push
(
report
.
length
);
setreport
([...
a
]);
};
return
(
<
Spin
spinning=
{
loading
}
>
<
div
className=
"edit"
>
{
/* 标题 */
}
<
TitleBack
title=
{
'Add report'
}
/>
{
/* 信息 */
}
<
div
className=
"form_s"
>
<
Form
name=
"basic"
form=
{
form
}
initialValues=
{
{
remember
:
true
}
}
labelCol=
{
{
xs
:
12
,
sm
:
6
,
md
:
6
,
lg
:
4
,
xl
:
4
,
xxl
:
2
}
}
wrapperCol=
{
{
xs
:
12
,
sm
:
18
,
md
:
18
,
lg
:
20
,
xl
:
20
,
xxl
:
22
}
}
onFinish=
{
onFinish
}
>
{
/* 小区名 */
}
<
Form
.
Item
label=
"Estate"
name=
"communityName"
rules=
{
[{
required
:
true
}]
}
>
<
SearchOptionsCommnity
// ubmit={extendName}
opname=
{
opname
}
defaultName=
{
term
?
term
.
communityName
:
null
}
// type={1} // 单选还是多选 单选就直接去掉
/>
</
Form
.
Item
>
{
/* 报告描述 */
}
<
Form
.
Item
label=
"Description"
name=
"reportContent"
rules=
{
[{
required
:
true
}]
}
>
<
div
className=
"psoBox flex"
>
<
TextArea
rows=
{
4
}
style=
{
{
maxWidth
:
600
,
width
:
'100%'
}
}
/>
{
report
.
length
==
0
?
(
<
div
className=
"psoBtn"
>
<
Button
shape=
"circle"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
{
addItem
();
}
}
/>
</
div
>
)
:
(
''
)
}
</
div
>
</
Form
.
Item
>
{
/* 报告图片 */
}
<
Form
.
Item
label=
"Picture"
name=
"imagesList"
rules=
{
[{
required
:
true
}]
}
>
<
PictureOptionsRow
action=
"/tos/image/upload"
data=
{
{
imageType
:
'tosReportImage'
,
identification
:
''
,
}
}
limitNums=
{
10
}
imgs=
{
ImageSrc
}
over=
{
loading
}
/>
</
Form
.
Item
>
<
hr
></
hr
>
{
/* --------------------------------------------------------------------------------------------- */
}
{
report
.
map
((
i
:
any
,
idx
:
any
)
=>
{
return
(
<
div
key=
{
idx
}
>
<
Form
.
Item
label=
"Description"
name=
{
'reportContent'
+
idx
}
rules=
{
[{
required
:
true
}]
}
>
<
div
className=
"psoBox flex"
>
<
TextArea
rows=
{
4
}
style=
{
{
maxWidth
:
600
,
width
:
'100%'
}
}
/>
{
idx
==
report
.
length
-
1
?
(
<
div
className=
"psoBtn"
>
<
Button
shape=
"circle"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
{
addItem
();
}
}
/>
</
div
>
)
:
(
''
)
}
</
div
>
</
Form
.
Item
>
<
Form
.
Item
label=
"Picture"
name=
{
'imagesList'
+
idx
}
rules=
{
[{
required
:
true
}]
}
>
<
PictureOptionsRow
action=
"/tos/image/upload"
data=
{
{
imageType
:
'tosReportImage'
,
identification
:
''
,
}
}
limitNums=
{
10
}
imgs=
{
ImageSrc
}
over=
{
loading
}
/>
</
Form
.
Item
>
<
hr
></
hr
>
</
div
>
);
})
}
{
/* --------------------------------------------------------------------------------------------- */
}
{
/* 提交 */
}
<
Form
.
Item
label=
" "
colon=
{
false
}
>
<
Button
type=
"primary"
loading=
{
loading
}
htmlType=
"submit"
>
Submit
</
Button
>
</
Form
.
Item
>
</
Form
>
</
div
>
</
div
>
</
Spin
>
);
};
function
map
(
state
:
any
)
{
const
loading
=
state
.
loading
.
global
;
const
{
Init
,
user
}
=
state
;
const
{
DataSave
,
curString
,
village
}
=
state
[
module
];
return
{
DataSave
,
loading
,
curString
,
village
,
Init
,
user
};
}
export
default
connect
(
map
)(
service
);
src/pages/AccountManagement/Service/serviceDetail.tsx
View file @
1596dbf3
/*
* @Author: your name
* @Date: 2021-03-02 14:39:40
* @LastEditTime: 2021-0
3-18 10:40:34
* @LastEditTime: 2021-0
5-21 17:24:18
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\pages\AccountManagement\Service\serviceEdit.tsx
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Button
,
Spin
,
Form
,
Input
}
from
'antd'
;
import
{
connect
,
history
}
from
'umi'
;
import
{
Button
,
Spin
,
Form
,
Input
,
Modal
,
message
,
Pagination
}
from
'antd'
;
import
{
connect
}
from
'umi'
;
const
{
TextArea
}
=
Input
;
import
{
FormOutlined
,
DeleteOutlined
,
DeliveredProcedureOutlined
,
RollbackOutlined
,
}
from
'@ant-design/icons'
;
import
{
RA
,
SA
}
from
'@/utils/method'
;
import
{
RA
}
from
'@/utils/method'
;
const
module
=
'ServicePro'
;
import
'./service.less'
;
import
TitleBack
from
'@/components/TitleBack/TitleBack'
;
import
SearchOptionsCommnity
from
'@/components/SearchOptions/SearchOptionsCommnity'
;
import
PictureOptionsRow
from
'@/components/PictureOptions/PictureOptionsRow'
;
import
moment
from
'moment'
;
...
...
@@ -24,10 +29,11 @@ import moment from 'moment';
const
service
=
(
props
:
any
)
=>
{
const
{
DataSave
,
dispatch
,
loading
,
match
,
Result
}
=
props
;
const
[
term
,
setTerm
]
=
useState
(
null
as
any
);
// 默认小区
const
[
ImageSrc
,
setImageSrc
]
=
useState
([]
as
any
);
// 图片地址
const
[
term
,
setTerm
]
=
useState
(
null
as
any
);
// 所有信息
const
[
reportList
,
setReportList
]
=
useState
([]
as
any
);
// 列表存储
const
[
isModalVisible
,
setIsModalVisible
]
=
useState
(
false
);
// 删除 model
const
[
imgs
,
setImgs
]
=
useState
([]
as
any
);
// 回复地址
const
[
listIdx
,
setListIdx
]
=
useState
(
0
);
// 正在操作的第几条记录
const
[
form
]
=
Form
.
useForm
();
// 监听是否有数据
...
...
@@ -39,110 +45,138 @@ const service = (props: any) => {
useEffect
(()
=>
{
if
(
DataSave
!=
null
)
{
setTerm
({
...
DataSave
});
form
.
setFieldsValue
({
communityName
:
DataSave
.
communityName
,
reportContent
:
DataSave
.
reportContent
,
reportImages
:
DataSave
.
reportImages
?
DataSave
.
reportImages
.
split
(
','
)
:
null
,
});
if
(
DataSave
.
reportPictures
.
length
>
0
)
{
// 图片名any
let
a
=
DataSave
.
reportPictures
.
map
((
item
:
any
,
i
:
any
)
=>
{
let
img
=
DataSave
.
reportImages
.
split
(
','
);
let
key
=
img
[
i
];
return
{
uid
:
i
,
name
:
key
,
status
:
'done'
,
url
:
item
,
};
});
// 图片列表
setImageSrc
(
a
);
}
if
(
DataSave
.
replyData
.
length
>
0
)
{
// 图片名any
// 单钱循环处理
for
(
let
i
in
DataSave
.
list
)
{
let
b
=
[]
as
any
;
DataSave
.
replyData
[
0
].
replyPictures
.
map
((
item
:
any
,
i
:
any
)
=>
{
DataSave
.
list
[
i
].
imageNames
.
map
((
item
:
any
,
idx
:
any
)
=>
{
let
obj
=
{
uid
:
i
,
name
:
i
,
uid
:
i
dx
,
name
:
i
tem
,
status
:
'done'
,
url
:
item
,
};
b
.
push
(
obj
);
});
DataSave
.
list
[
i
].
img
=
b
;
DataSave
.
list
[
i
].
edit
=
false
;
DataSave
.
list
[
i
].
delete
=
false
;
}
//
回复列表
setImgs
(
b
);
setReportList
([...
DataSave
.
list
.
slice
(
0
,
10
)]);
// 所有
回复列表
setTerm
({
...
DataSave
}
);
form
.
setFieldsValue
({
replyContent
:
DataSave
.
replyData
[
0
].
replyContent
,
communityName
:
DataSave
.
communityName
,
});
}
}
},
[
DataSave
]);
//onFinish 提交
const
onFinish
=
(
values
:
any
)
=>
{
values
.
id
=
match
.
params
.
id
;
values
.
reportImages
=
values
.
reportImages
?
values
.
reportImages
.
join
(
','
)
:
null
;
values
.
replyList
=
[
{
replyContent
:
values
.
replyContent
,
replyImages
:
values
.
replyImages
?
values
.
replyImages
.
join
(
','
)
:
null
,
},
];
RA
(
70
,
values
,
module
,
dispatch
);
values
.
reportId
=
reportList
[
listIdx
].
reportId
;
console
.
log
(
values
);
let
obj
=
{
imageContentDtos
:
[
values
],
};
// 选择小区名字并赋值
const
opname
=
(
value
:
any
)
=>
{
// console.log(value);
if
(
value
)
{
RA
(
72
,
{
communityName
:
value
},
module
,
dispatch
);
}
form
.
setFieldsValue
({
communityName
:
value
,
});
RA
(
70
,
obj
,
module
,
dispatch
);
};
// 弹出删除model
const
showModal
=
(
idx
:
any
)
=>
{
setListIdx
(
idx
);
setIsModalVisible
(
true
);
};
// 确认删除
const
handleOk
=
()
=>
{
console
.
log
(
'触发'
);
RA
(
73
,
{
ids
:
match
.
params
.
id
},
module
,
dispatch
);
RA
(
73
,
{
ids
:
reportList
[
listIdx
].
reportId
},
module
,
dispatch
);
setIsModalVisible
(
false
);
};
// 隐藏
const
handleCancel
=
()
=>
{
setIsModalVisible
(
false
);
};
// 删除结果
// 删除
\编辑
结果
useEffect
(()
=>
{
if
(
Result
)
{
setTimeout
(()
=>
{
dispatch
({
type
:
module
+
'/SA'
});
// 清空详情缓存
history
.
push
(
'/AccountManagement/service'
);
},
300
);
if
(
Result
.
state
==
1
)
{
dispatch
({
type
:
module
+
'/Results'
});
let
arr
=
term
.
list
;
arr
.
splice
(
listIdx
,
1
);
setReportList
([...
arr
]);
}
else
if
(
Result
.
state
==
2
)
{
dispatch
({
type
:
module
+
'/Results'
});
RA
(
69
,
{
id
:
match
.
params
.
id
},
module
,
dispatch
);
}
}
},
[
Result
]);
// 点击编辑
const
showEdit
=
(
idx
:
any
)
=>
{
// 先看之前是否存在编辑情况
for
(
let
i
in
reportList
)
{
if
(
reportList
[
i
].
edit
)
{
message
.
warning
(
'Please edit the content before processing!'
);
return
false
;
}
}
// 先打开状态
setListIdx
(
idx
);
let
des
=
reportList
;
des
[
idx
].
edit
=
true
;
setReportList
([...
des
]);
// 再赋值
form
.
setFieldsValue
({
content
:
des
[
idx
].
content
,
imageNames
:
des
[
idx
].
imageNames
,
reportRemark
:
des
[
idx
].
reportRemark
,
});
};
// 取消编辑
const
noneEdit
=
(
idx
:
any
)
=>
{
let
des
=
reportList
;
des
[
idx
].
edit
=
false
;
setReportList
([...
des
]);
form
.
setFieldsValue
({
reportRemark
:
''
,
});
};
// 分页点击
const
onChange
=
(
page
:
any
)
=>
{
// 先看之前是否存在编辑情况
for
(
let
i
in
reportList
)
{
if
(
reportList
[
i
].
edit
)
{
message
.
warning
(
'Please edit the content before processing!'
);
return
false
;
}
}
// 再开始分页
let
a
=
JSON
.
parse
(
JSON
.
stringify
(
term
.
list
));
let
b
=
a
.
splice
((
page
-
1
)
*
10
,
10
);
setReportList
([...
b
]);
};
return
(
<
Spin
spinning=
{
loading
}
>
<
div
className=
"edit"
>
{
/* 标题 */
}
<
TitleBack
title=
{
'Report details'
}
del=
{
'Report delete'
}
handleOk=
{
handleOk
}
loading=
{
loading
}
Result=
{
Result
}
/>
<
TitleBack
title=
{
'Report details'
}
loading=
{
loading
}
Result=
{
Result
}
/>
{
/* 信息 */
}
<
div
className=
"form_s"
>
<
Form
name=
"basic"
colon=
{
false
}
form=
{
form
}
initialValues=
{
{
remember
:
true
}
}
labelCol=
{
{
xs
:
12
,
sm
:
6
,
md
:
6
,
lg
:
4
,
xl
:
4
,
xxl
:
2
}
}
...
...
@@ -150,91 +184,146 @@ const service = (props: any) => {
onFinish=
{
onFinish
}
>
{
/* 小区名 */
}
<
Form
.
Item
label=
"Estate"
name=
"communityName"
rules=
{
[{
required
:
true
}]
}
>
<
SearchOptionsCommnity
// ubmit={extendName}
opname=
{
opname
}
defaultName=
{
term
?
term
.
communityName
:
null
}
// type={1} // 单选还是多选 单选就直接去掉
disabled
/>
<
Form
.
Item
label=
"Estate:"
name=
"communityName"
>
<
span
>
{
term
?
term
.
communityName
:
''
}
</
span
>
</
Form
.
Item
>
{
/* 小区地址 */
}
<
Form
.
Item
label=
"Address"
>
<
Form
.
Item
label=
"Address
:
"
>
<
span
>
{
term
?
`${term.communityAddress} , ${term.postCode}`
:
null
}
</
span
>
</
Form
.
Item
>
{
/* 报告人 */
}
<
Form
.
Item
label=
"Reported By"
>
<
Form
.
Item
label=
"Reported By
:
"
>
<
span
>
{
term
?
term
.
reporterName
:
null
}
</
span
>
</
Form
.
Item
>
{
/* 报告人联系方式 */
}
<
Form
.
Item
label=
"Contact Details"
>
<
Form
.
Item
label=
"Contact Details
:
"
>
{
/* <span style={{ display: 'inline-block', marginRight: 20 }}>
{term ? term.reporterEmail : null}
</span> */
}
<
span
>
{
term
?
term
.
reporterPhone
:
null
}
</
span
>
</
Form
.
Item
>
{
/* 报告描述 */
}
<
Form
.
Item
label=
"Description"
name=
"reportContent"
rules=
{
[{
required
:
true
}]
}
>
<
TextArea
rows=
{
4
}
style=
{
{
maxWidth
:
600
,
width
:
'100%'
}
}
disabled
/>
<
hr
></
hr
>
{
/* 本小区报告列表 */
}
{
reportList
.
map
((
i
:
any
,
idx
:
any
)
=>
{
// console.log(reportList);
return
(
<
div
key=
{
idx
}
>
{
i
.
edit
?
(
<
div
key=
{
idx
}
>
<
Form
.
Item
label=
"Description:"
name=
"content"
rules=
{
[{
required
:
true
}]
}
>
<
TextArea
rows=
{
4
}
style=
{
{
maxWidth
:
600
,
width
:
'100%'
}
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"Remarks:"
name=
"reportRemark"
rules=
{
[{
required
:
true
}]
}
>
<
TextArea
rows=
{
4
}
style=
{
{
maxWidth
:
600
,
width
:
'100%'
}
}
/>
</
Form
.
Item
>
{
/* 报告图片 */
}
<
Form
.
Item
label=
"Picture"
name=
"reportImag
es"
rules=
{
[{
required
:
true
}]
}
>
<
Form
.
Item
label=
" "
name=
"imageNam
es"
rules=
{
[{
required
:
true
}]
}
>
<
PictureOptionsRow
action=
"/tos/image/upload"
data=
{
{
imageType
:
'tosReportImage'
,
identification
:
''
,
}
}
limitNums=
{
10
}
imgs=
{
ImageSrc
}
overs=
{
true
}
limitNums=
{
5
}
imgs=
{
i
.
img
}
/>
</
Form
.
Item
>
<
hr
></
hr
>
{
/* --------------------------------------------------------------------------------------------- */
}
{
/* 回复人信息 */
}
{
DataSave
&&
DataSave
.
replyData
.
length
>
0
?
(
<
Form
.
Item
label=
"Amended By"
>
{
DataSave
.
replyData
[
0
].
replyName
}
<
span
style=
{
{
display
:
'inline-block'
,
margin
:
'0 10px 0 50px'
}
}
>
Contact Details :
{
' '
}
</
span
>
{
' '
}
{
DataSave
.
replyData
[
0
].
replyPhone
}
{
/* 保存 */
}
<
Form
.
Item
label=
" "
>
<
Button
type=
"link"
htmlType=
"submit"
>
<
DeliveredProcedureOutlined
/>
Save
</
Button
>
<
Button
type=
"text"
onClick=
{
()
=>
{
noneEdit
(
idx
);
}
}
>
<
RollbackOutlined
/>
Cancel
</
Button
>
</
Form
.
Item
>
</
div
>
)
:
(
''
)
}
{
/* 回复内容 */
}
{
DataSave
&&
DataSave
.
replyData
.
length
>
0
&&
DataSave
.
replyData
[
0
].
replyContent
?
(
<
Form
.
Item
label=
"Overview"
name=
"replyContent
"
>
<
TextArea
rows=
{
4
}
style=
{
{
maxWidth
:
600
,
width
:
'100%'
}
}
disabled
/
>
<
Spin
spinning=
{
i
.
delete
}
key=
{
idx
}
>
<
Form
.
Item
label=
"Description:"
>
<
span
>
{
i
.
content
}
</
span
>
</
Form
.
Item
>
{
i
.
reportRemark
?
(
<
Form
.
Item
label=
"Remarks:
"
>
<
span
>
{
i
.
reportRemark
}
</
span
>
</
Form
.
Item
>
)
:
(
''
)
}
{
/* 回复图片 */
}
{
imgs
.
length
>
0
?
(
<
Form
.
Item
label=
"Picture"
name=
"replyImages"
>
<
Form
.
Item
label=
" "
>
<
PictureOptionsRow
action=
"/tos/image/upload"
data=
{
{
//
imageType: 'tosReportImage',
imageType
:
'tosReplyImage
'
,
imageType
:
'tosReportImage'
,
identification
:
'
'
,
}
}
limitNums=
{
10
}
imgs=
{
imgs
}
limitNums=
{
5
}
imgs=
{
i
.
img
}
overs=
{
true
}
/>
</
Form
.
Item
>
)
:
(
''
{
/* 编辑\删除 */
}
<
Form
.
Item
label=
" "
>
<
Button
type=
"text"
onClick=
{
()
=>
{
showEdit
(
idx
);
}
}
>
<
FormOutlined
/>
Edit
</
Button
>
<
Button
type=
"text"
danger
onClick=
{
()
=>
{
showModal
(
idx
);
}
}
>
<
DeleteOutlined
/>
Delete
</
Button
>
</
Form
.
Item
>
</
Spin
>
)
}
<
hr
></
hr
>
</
div
>
);
})
}
</
Form
>
</
div
>
{
/* 分页 */
}
<
div
style=
{
{
textAlign
:
'right'
}
}
>
<
Pagination
defaultCurrent=
{
1
}
defaultPageSize=
{
10
}
total=
{
term
&&
term
.
list
?
term
.
list
.
length
:
10
}
onChange=
{
onChange
}
/>
</
div
>
</
div
>
{
/* 删除 */
}
<
Modal
title=
"Delete Message"
visible=
{
isModalVisible
}
onOk=
{
handleOk
}
centered=
{
true
}
okText=
"Confirm"
onCancel=
{
handleCancel
}
>
<
p
>
Are you sure you want to delete this message?
</
p
>
</
Modal
>
</
Spin
>
);
};
...
...
src/pages/CommercialService/Renovation.tsx
View file @
1596dbf3
...
...
@@ -97,8 +97,8 @@ const Renovation = (props: any) => {
},
{
title
:
'Requestor'
,
dataIndex
:
'
n
ame'
,
key
:
'
n
ame'
,
dataIndex
:
'
applyN
ame'
,
key
:
'
applyN
ame'
,
render
:
(
text
:
string
,
record
:
{
exist
:
string
})
=>
{
return
(
<
div
>
...
...
@@ -170,7 +170,8 @@ const Renovation = (props: any) => {
serviceType
=
index
;
}
});
// console.log(WebUrl[serviceType]);
//
// applyName
// 搜索条件
let
objs
=
{
...
...
@@ -178,8 +179,15 @@ const Renovation = (props: any) => {
handleStatus
:
location
.
query
.
handleStatus
!==
undefined
?
parseInt
(
location
.
query
.
handleStatus
)
:
null
,
pageNum
,
applyName
:
tmp
.
applyforName
,
};
if
(
serviceType
==
0
)
{
delete
objs
.
applyName
;
}
else
{
delete
objs
.
applyforName
;
}
// 请求
RA
(
serviceType
==
0
?
23
:
74
,
objs
,
module
,
dispatch
);
},
[
location
]);
...
...
src/pages/CommunityManagement/CellList/Adds.tsx
View file @
1596dbf3
...
...
@@ -364,11 +364,16 @@ const Adds = (props: any) => {
placeholder=
"Please enter phone"
maxLength=
{
11
}
onKeyUp=
{
keyup_communityManagerFee
}
autocomplete=
"off"
/>
</
Form
.
Item
>
{
/* 小区邮箱 */
}
<
Form
.
Item
name=
"residentialEmail"
label=
"Email"
rules=
{
village
[
5
]
as
any
}
>
<
Input
style=
{
{
width
:
'240px'
}
}
placeholder=
"Please enter email"
/>
<
Input
style=
{
{
width
:
'240px'
}
}
placeholder=
"Please enter email"
autocomplete=
"off"
/>
</
Form
.
Item
>
{
/* 小区管理员 */
}
<
Form
.
Item
...
...
@@ -376,7 +381,12 @@ const Adds = (props: any) => {
name=
"residentialManagerUserName"
rules=
{
village
[
6
]
as
any
}
>
<
Input
style=
{
{
width
:
'240px'
}
}
placeholder=
"Please enter name"
maxLength=
{
30
}
/>
<
Input
style=
{
{
width
:
'240px'
}
}
placeholder=
"Please enter name"
maxLength=
{
30
}
autocomplete=
"off"
/>
</
Form
.
Item
>
{
/* 小区缴费方式 */
}
<
Form
.
Item
label=
"Property Fee"
name=
"propertyFee"
style=
{
{
marginBottom
:
'0'
}
}
>
...
...
src/pages/CommunityManagement/CellList/celllist.less
View file @
1596dbf3
...
...
@@ -2,41 +2,41 @@ li {
list-style: none;
}
.contop {
padding: 15px 15px 10px;
background: #fff;
margin-bottom: 15px;
padding: 20px;
background: #fff;
}
.listbox {
width: 100%;
background-color: #ffffff;
padding: 10px;
background-color: #ffffff;
}
// 添加
.form {
padding: 20px;
overflow: auto;
background: #fff;
border: 1px solid #efefef;
border-radius: 3px;
background: #fff;
box-shadow: 0 1px 1px #ccc;
overflow: auto;
h3 {
margin-bottom: 30px;
position: relative;
margin-bottom: 30px;
.back {
position: absolute;
right: 0;
top: 0;
right: 0;
margin-bottom: 20px;
background: #fff;
}
}
.li {
display: block;
min-width: 140px;
margin-top: 15px;
margin-left: 0;
display: block;
}
input {
width: 240px;
...
...
@@ -54,19 +54,19 @@ li {
line-height: 34px;
}
hr {
border: 0;
height: 1px;
background: #eee;
margin-bottom: 20px;
background: #eee;
border: 0;
}
.tip {
padding: 10px 0 15px;
p {
display: none;
color: #67c23a;
&.show {
display: block;
}
color: #67c23a;
span {
margin-right: 5px;
}
...
...
@@ -84,9 +84,9 @@ li {
.celBox {
position: relative;
.item {
margin-bottom: 15px;
font-size: 14px;
line-height: 35px;
margin-bottom: 15px;
label {
display: inline-block;
min-width: 160px;
...
...
@@ -110,24 +110,24 @@ li {
}
.code {
position: absolute;
right: 5%;
top: 50%;
transform: translateY(-55%)
;
right: 5%
;
width: 200px;
text-align: center;
transform: translateY(-55%);
li {
text-align: center;
line-height: 35px;
margin-bottom: 6px;
line-height: 35px;
text-align: center;
}
img {
border-radius: 3px;
margin-bottom: 5px;
border-radius: 3px;
}
.lis {
color: #67c23a;
font-size: 18px;
font-weight: 500;
font-size: 18px;
}
}
}
...
...
@@ -136,8 +136,8 @@ li {
width: 100px;
}
.redFs {
font-size: 12px;
color: red;
font-size: 12px;
}
img {
...
...
@@ -148,9 +148,9 @@ img {
text-transform: capitalize;
}
.pages {
background: #fff;
text-align: right;
padding: 10px;
text-align: right;
background: #fff;
}
// 必填
...
...
@@ -175,7 +175,7 @@ img {
.acitves {
}
.pdfform {
background: #f4f4f4;
padding: 15px;
background: #f4f4f4;
}
}
src/pages/ContractManagement/Contract.tsx
View file @
1596dbf3
...
...
@@ -154,9 +154,9 @@ const Contract = (props: any) => {
opname=
{
opname
}
/>
</
Form
.
Item
>
<
Form
.
Item
name=
"contractNumber"
>
{
/*
<Form.Item name="contractNumber">
<Input allowClear placeholder="Contract Number" />
</
Form
.
Item
>
</Form.Item>
*/
}
<
Form
.
Item
name=
"contractTitle"
>
<
Input
allowClear
placeholder=
"Contract Title"
/>
</
Form
.
Item
>
...
...
src/utils/params.ts
View file @
1596dbf3
/*
* @Author: your name
* @Date: 2020-11-19 20:34:18
* @LastEditTime: 2021-0
4-21 15:18:56
* @LastEditTime: 2021-0
5-20 11:00:23
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\utils\params.ts
...
...
@@ -64,14 +64,7 @@ export const requestList = [
[
'/tos/property/community/houseCard/query/detail'
,
'36 获取住户卡详情'
,
{}],
[
'/tos/property/decorate/record/get/detail'
,
'37 获取装修记录详情'
,
{}],
[
'/tos/users/save'
,
'38 新建后台信息'
,
{}],
[
'/tos/life/community/account/member/del'
,
'39 删除业主成员信息'
,
{
id
:
'c06286cfe7b843cb96fdfcb987231123'
,
ownerId
:
'6b359755a36b49c28241a4620fa6539b'
,
},
],
[
'/tos/life/community/account/member/del'
,
'39 删除业主成员信息'
,
{}],
[
'/tos/community/service/get'
,
'40 获取小区服务回复列表'
,
{}],
[
'/tos/users/save'
,
'41 添加后台账号'
,
{}],
[
'/tos/account/permission/savePermission'
,
'42 添加后台权限'
,
{}],
...
...
@@ -109,4 +102,5 @@ export const requestList = [
[
'/tos/community/moveOut/record/get'
,
'74 迁出申请列表'
,
{}],
[
'/tos/community/moveOut/record/get/detail'
,
'75 迁出申请详情'
,
{}],
[
'/tos/community/moveOut/record/reply'
,
'76 迁出申请回复'
,
{}],
[
'/tos/report/create'
,
'77 报告新增'
,
{}],
];
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