|
@@ -3,11 +3,14 @@ import { Button, Modal, Form } from 'antd';
|
3
|
3
|
import { PageHeaderWrapper } from '@ant-design/pro-layout';
|
4
|
4
|
import moment from 'moment';
|
5
|
5
|
import PageTable from '@/components/PageTable';
|
6
|
|
-import { getOrderList } from '@/services/order';
|
|
6
|
+import { getOrderList } from '@/services/order'
|
|
7
|
+import OrgSelect from '@/components/OrgSelect';
|
|
8
|
+import MachinetySelect from '@/components/MachinetySelect';
|
|
9
|
+import TypeSelect from '@/components/TypeSelect';;
|
7
|
10
|
import { getevaluation } from '@/services/eval'
|
8
|
11
|
|
9
|
12
|
const formatterTime = (val) => {
|
10
|
|
- return val ? moment(val).format('YYYY-MM-DD HH:mm:ss') : '';
|
|
13
|
+ return val ? moment(val).format('YYYY-MM-DD') : '';
|
11
|
14
|
};
|
12
|
15
|
const FormItem = Form.Item;
|
13
|
16
|
const formItemLayout = { labelCol: { span: 6 }, wrapperCol: { span: 14 } };
|
|
@@ -22,25 +25,71 @@ export default (props) => {
|
22
|
25
|
})
|
23
|
26
|
}
|
24
|
27
|
const columns = [
|
|
28
|
+ {
|
|
29
|
+ title: '机构',
|
|
30
|
+ dataIndex: 'orgId',
|
|
31
|
+ key: 'orgId',
|
|
32
|
+ hideInTable: true,
|
|
33
|
+ renderFormItem: (item, field, form) => {
|
|
34
|
+ return <OrgSelect />
|
|
35
|
+ }
|
|
36
|
+ },
|
|
37
|
+ {
|
|
38
|
+ title: '农机',
|
|
39
|
+ dataIndex: 'machineryId',
|
|
40
|
+ key: 'machineryId',
|
|
41
|
+ hideInTable: true,
|
|
42
|
+ renderFormItem: (item, field, form) => {
|
|
43
|
+ return (
|
|
44
|
+ <MachinetySelect />
|
|
45
|
+ )
|
|
46
|
+ }
|
|
47
|
+ },
|
|
48
|
+ {
|
|
49
|
+ title: '农机型号',
|
|
50
|
+ dataIndex: 'typeId',
|
|
51
|
+ key: 'typeId',
|
|
52
|
+ hideInTable: true,
|
|
53
|
+ renderFormItem: (item, field, form) => {
|
|
54
|
+ return (
|
|
55
|
+ <TypeSelect />
|
|
56
|
+ )
|
|
57
|
+ }
|
|
58
|
+ },
|
25
|
59
|
{
|
26
|
60
|
title: '机构名',
|
27
|
61
|
dataIndex: 'orgName',
|
28
|
62
|
key: 'orgName',
|
|
63
|
+ search: false
|
29
|
64
|
},
|
30
|
65
|
{
|
31
|
66
|
title: '农机名',
|
32
|
67
|
dataIndex: 'machineryName',
|
33
|
68
|
key: 'machineryName',
|
|
69
|
+ search: false
|
34
|
70
|
},
|
35
|
71
|
{
|
36
|
72
|
title: '农机型号',
|
37
|
73
|
dataIndex: 'typeName',
|
38
|
74
|
key: 'typeName',
|
|
75
|
+ search: false
|
|
76
|
+ },
|
|
77
|
+ {
|
|
78
|
+ title: '下单人',
|
|
79
|
+ dataIndex: 'name',
|
|
80
|
+ key: 'name',
|
|
81
|
+ },
|
|
82
|
+ {
|
|
83
|
+ title: '手机号',
|
|
84
|
+ dataIndex: 'phone',
|
|
85
|
+ key: 'phone',
|
39
|
86
|
},
|
40
|
87
|
{
|
41
|
88
|
title: '需求时间',
|
42
|
89
|
dataIndex: 'appointmentDate',
|
43
|
90
|
key: 'appointmentDate',
|
|
91
|
+ render: (t) => formatterTime(t),
|
|
92
|
+ search: false
|
44
|
93
|
},
|
45
|
94
|
{
|
46
|
95
|
title: '作业面积',
|
|
@@ -61,7 +110,37 @@ export default (props) => {
|
61
|
110
|
key: 'createDate',
|
62
|
111
|
search: false,
|
63
|
112
|
render: (t) => formatterTime(t),
|
64
|
|
- width: 200,
|
|
113
|
+ },
|
|
114
|
+ {
|
|
115
|
+ title: '付款状态',
|
|
116
|
+ dataIndex: 'payStatus',
|
|
117
|
+ key: 'payStatus',
|
|
118
|
+ valueType: 'select',
|
|
119
|
+ valueEnum: {
|
|
120
|
+ 0: { text: '待付款' },
|
|
121
|
+ 1: { text: '已付款' }
|
|
122
|
+ },
|
|
123
|
+ },
|
|
124
|
+ {
|
|
125
|
+ title: '调度状态',
|
|
126
|
+ dataIndex: 'dispatchStatus',
|
|
127
|
+ key: 'dispatchStatus',
|
|
128
|
+ valueType: 'select',
|
|
129
|
+ valueEnum: {
|
|
130
|
+ 0: { text: '待调度' },
|
|
131
|
+ 1: { text: '已调度' }
|
|
132
|
+ },
|
|
133
|
+ },
|
|
134
|
+ {
|
|
135
|
+ title: '作业状态',
|
|
136
|
+ dataIndex: 'workStatus',
|
|
137
|
+ key: 'workStatus',
|
|
138
|
+ valueType: 'select',
|
|
139
|
+ valueEnum: {
|
|
140
|
+ 0: { text: '待作业' },
|
|
141
|
+ 1: { text: '进行中' },
|
|
142
|
+ 3: { text: '已完成' }
|
|
143
|
+ },
|
65
|
144
|
},
|
66
|
145
|
{
|
67
|
146
|
title: '评价状态',
|
|
@@ -69,7 +148,6 @@ export default (props) => {
|
69
|
148
|
key: 'isEvaluated',
|
70
|
149
|
valueType: 'select',
|
71
|
150
|
valueEnum: {
|
72
|
|
- '': { text: '不限', status: 'Default' },
|
73
|
151
|
0: { text: '待评价' },
|
74
|
152
|
1: { text: '已评价' }
|
75
|
153
|
},
|
|
@@ -101,7 +179,7 @@ export default (props) => {
|
101
|
179
|
columns={columns}
|
102
|
180
|
rowKey="orderId"
|
103
|
181
|
options={false}
|
104
|
|
- scroll={{ x: 1000 }}
|
|
182
|
+ scroll={{ x: 1500 }}
|
105
|
183
|
/>
|
106
|
184
|
<Modal
|
107
|
185
|
forceRender
|