|
@@ -6,19 +6,19 @@ import { GetComplaintInfo } from "../../services/complaint"
|
|
|
const columns = [
|
|
|
{
|
|
|
title: 'ID',
|
|
|
- dataIndex: ''
|
|
|
+ dataIndex: 'id'
|
|
|
},
|
|
|
{
|
|
|
title: '处理人',
|
|
|
- dataIndex: ''
|
|
|
+ dataIndex: 'user'
|
|
|
},
|
|
|
{
|
|
|
title: '状态',
|
|
|
- dataIndex: ''
|
|
|
+ dataIndex: 'status'
|
|
|
},
|
|
|
{
|
|
|
title: '处理时间',
|
|
|
- dataIndex: ''
|
|
|
+ dataIndex: 'handle_time'
|
|
|
},
|
|
|
{
|
|
|
title: '意见',
|
|
@@ -26,22 +26,30 @@ const columns = [
|
|
|
},
|
|
|
]
|
|
|
const infoKeys = [
|
|
|
- { label: '分类名称', key: '' },
|
|
|
- { label: '联系地址', key: '' },
|
|
|
- { label: '报修人', key: '' },
|
|
|
- { label: '联系方式', key: '' },
|
|
|
- { label: '预约时间', key: '' },
|
|
|
- { label: '报修时间', key: '' },
|
|
|
- { label: '报修内容', key: '' },
|
|
|
- { label: '报修图片', key: '', col: 24, type: 'picture' },
|
|
|
+ { label: '投诉类型', key: 'suggestion_type' },
|
|
|
+ { label: '联系人', key: 'apply_people' },
|
|
|
+ { label: '联系方式', key: 'apply_people_phone' },
|
|
|
+ { label: '投诉内容', key: 'apply_content' },
|
|
|
+ { label: '投诉图片', key: '', col: 24, type: 'picture' },
|
|
|
]
|
|
|
|
|
|
const OrderDetail: React.FC = () => {
|
|
|
|
|
|
- const history = useHistory()
|
|
|
+ const history: any = useHistory()
|
|
|
+ const [orderInfo, setOrderInfo]: any = React.useState({
|
|
|
+ base_info: {
|
|
|
+ apply_pic: []
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ const statusItems = { 1: '投诉', 2: '建议' }
|
|
|
+ const visitLevel = { 1: '满意', 2: '不满意' }
|
|
|
|
|
|
React.useEffect(() => {
|
|
|
- GetComplaintInfo()
|
|
|
+ GetComplaintInfo(history.location.search).then((res: any) => {
|
|
|
+ res.base_info.suggestion_type = statusItems[res.base_info.suggestion_type]
|
|
|
+ setOrderInfo(res)
|
|
|
+ })
|
|
|
}, [])
|
|
|
|
|
|
return (
|
|
@@ -61,8 +69,10 @@ const OrderDetail: React.FC = () => {
|
|
|
<Col span={item.col || 8}>
|
|
|
<Form.Item label={item.label}>
|
|
|
{ item.type === 'picture' ? (
|
|
|
- <Image className="mr-1.5" width={120} src="https://hbimg.huabanimg.com/683615e8e5dd8c4660efbdf1fbc3c26f1da40cae2a7a7-fcKebd_fw658/format/webp" />
|
|
|
- ) : item.label }
|
|
|
+ orderInfo.base_info.apply_pic.map(url =>
|
|
|
+ <Image width={100} src={url} />
|
|
|
+ )
|
|
|
+ ) : orderInfo?.base_info[item.key] }
|
|
|
</Form.Item>
|
|
|
</Col>
|
|
|
))
|
|
@@ -72,13 +82,13 @@ const OrderDetail: React.FC = () => {
|
|
|
</Card>
|
|
|
<Divider />
|
|
|
<Card title="工单流转">
|
|
|
- <Table columns={columns} bordered />
|
|
|
+ <Table dataSource={orderInfo.list} columns={columns} bordered />
|
|
|
</Card>
|
|
|
<Divider />
|
|
|
<Card title="回访/业主评价">
|
|
|
<Form>
|
|
|
- <Form.Item label="满意度">xxxxxx</Form.Item>
|
|
|
- <Form.Item label="业主评价">xxxxxxxxxxxxxxxxxx</Form.Item>
|
|
|
+ <Form.Item label="满意度">{ visitLevel[orderInfo.base_info?.return_visit_level] || '暂无' }</Form.Item>
|
|
|
+ <Form.Item label="业主评价">{ orderInfo.base_info?.return_visit_content || '暂无评价' }</Form.Item>
|
|
|
</Form>
|
|
|
</Card>
|
|
|
</React.Fragment>
|