李志伟 3 years ago
parent
commit
18a75ace11

+ 20
- 20
config/routes.js View File

79
     component: '../layouts/BasicLayout',
79
     component: '../layouts/BasicLayout',
80
     routes: [
80
     routes: [
81
       {
81
       {
82
-        path: '/Machinery/GPS',
83
-        name: '设备管理',
84
-        access: 'device',
85
-        component: './Machinery/GPS',
82
+        path: '/Machinery/Org',
83
+        name: '合作社列表',
84
+        access: 'org',
85
+        component: './Machinery/Org',
86
       },
86
       },
87
       {
87
       {
88
-        path: '/Machinery/GPS/edit.jsx',
89
-        name: '设备编辑',
90
-        component: './Machinery/GPS/edit.jsx',
91
-        hideInMenu: true,
88
+        path: '/Machinery/Person',
89
+        name: '人员管理',
90
+        access: 'user',
91
+        component: './Machinery/Person',
92
       },
92
       },
93
       {
93
       {
94
         path: '/Machinery/MachineryType',
94
         path: '/Machinery/MachineryType',
108
         component: './Machinery/Machinery/edit.jsx',
108
         component: './Machinery/Machinery/edit.jsx',
109
         hideInMenu: true,
109
         hideInMenu: true,
110
       },
110
       },
111
+      {
112
+        path: '/Machinery/GPS',
113
+        name: '设备管理',
114
+        access: 'device',
115
+        component: './Machinery/GPS',
116
+      },
117
+      {
118
+        path: '/Machinery/GPS/edit.jsx',
119
+        name: '设备编辑',
120
+        component: './Machinery/GPS/edit.jsx',
121
+        hideInMenu: true,
122
+      },
111
       {
123
       {
112
         path: '/Machinery/GIS',
124
         path: '/Machinery/GIS',
113
         name: '农机GIS',
125
         name: '农机GIS',
240
         access: 'region',
252
         access: 'region',
241
         component: './SystemManagement/Region',
253
         component: './SystemManagement/Region',
242
       },
254
       },
243
-      {
244
-        path: '/SystemManagement/Cooperative',
245
-        name: '机构列表',
246
-        access: 'org',
247
-        component: './SystemManagement/Cooperative',
248
-      },
249
       {
255
       {
250
         path: '/SystemManagement/UserRights',
256
         path: '/SystemManagement/UserRights',
251
         name: '角色管理',
257
         name: '角色管理',
252
         access: 'role',
258
         access: 'role',
253
         component: './SystemManagement/UserRights',
259
         component: './SystemManagement/UserRights',
254
       },
260
       },
255
-      {
256
-        path: '/SystemManagement/Administrator',
257
-        name: '人员管理',
258
-        access: 'user',
259
-        component: './SystemManagement/Administrator',
260
-      },
261
       {
261
       {
262
         path: '/SystemManagement/BasicParameters',
262
         path: '/SystemManagement/BasicParameters',
263
         name: '基本参数',
263
         name: '基本参数',

+ 6
- 5
src/pages/JobStatistics/Order/index.jsx View File

38
   }, []);
38
   }, []);
39
   const columns = [
39
   const columns = [
40
     {
40
     {
41
-      title: '机构',
41
+      title: '合作社',
42
       dataIndex: 'orgId',
42
       dataIndex: 'orgId',
43
       key: 'orgId',
43
       key: 'orgId',
44
       hideInTable: true,
44
       hideInTable: true,
83
       }
83
       }
84
     },
84
     },
85
     {
85
     {
86
-      title: '机构名',
86
+      title: '合作社名',
87
       dataIndex: 'orgName',
87
       dataIndex: 'orgName',
88
       key: 'orgName',
88
       key: 'orgName',
89
       search: false
89
       search: false
102
     },
102
     },
103
     {
103
     {
104
       title: '下单人',
104
       title: '下单人',
105
-      dataIndex: 'name',
106
-      key: 'name',
105
+      dataIndex: 'personName',
106
+      key: 'personName',
107
     },
107
     },
108
     {
108
     {
109
       title: '手机号',
109
       title: '手机号',
144
       valueType: 'select',
144
       valueType: 'select',
145
       valueEnum: {
145
       valueEnum: {
146
         0: { text: '待付款' },
146
         0: { text: '待付款' },
147
-        1: { text: '已付款' }
147
+        1: { text: '已付款' },
148
+        '-1': { text: '已退单' }
148
       },
149
       },
149
     },
150
     },
150
     {
151
     {

+ 3
- 3
src/pages/Machinery/Machinery/edit.jsx View File

28
   const [machineryTypeList, setMachineryTypeList] = useState([]);
28
   const [machineryTypeList, setMachineryTypeList] = useState([]);
29
   //区域列表
29
   //区域列表
30
   const [regionList, setRegionList] = useState([]);
30
   const [regionList, setRegionList] = useState([]);
31
-  //机构列表
31
+  //合作社列表
32
   const [cooperativeList, setCooperativeList] = useState([]);
32
   const [cooperativeList, setCooperativeList] = useState([]);
33
 
33
 
34
   const Submit = (data) => {
34
   const Submit = (data) => {
145
               </Select>
145
               </Select>
146
             </FormItem>
146
             </FormItem>
147
             <FormItem
147
             <FormItem
148
-              label="归属机构"
148
+              label="归属合作社"
149
               name="orgId"
149
               name="orgId"
150
-              rules={[{ required: true, message: '请选择归属机构' }]}
150
+              rules={[{ required: true, message: '请选择归属合作社' }]}
151
             >
151
             >
152
               <Select style={{ width: '350px' }}>
152
               <Select style={{ width: '350px' }}>
153
                 {cooperativeList.map((item) => (
153
                 {cooperativeList.map((item) => (

+ 28
- 0
src/pages/Machinery/Machinery/index.jsx View File

6
 import PageTable from '@/components/PageTable';
6
 import PageTable from '@/components/PageTable';
7
 import { getMachineryList, deleteMachinery, updateMachinery } from '@/services/machinery';
7
 import { getMachineryList, deleteMachinery, updateMachinery } from '@/services/machinery';
8
 import { getMachineryTypeList } from '@/services/machineryType';
8
 import { getMachineryTypeList } from '@/services/machineryType';
9
+import { getCooperativeList } from '@/services/cooperative';
9
 
10
 
10
 const { Option } = Select;
11
 const { Option } = Select;
11
 
12
 
12
 export default (props) => {
13
 export default (props) => {
13
   const actionRef = useRef();
14
   const actionRef = useRef();
14
   const [machineryTypeList, setMachineryTypeList] = useState([]);
15
   const [machineryTypeList, setMachineryTypeList] = useState([]);
16
+  const [cooperativeList, setCooperativeList] = useState([]);
15
 
17
 
16
   const gotoEdit = (id) => {
18
   const gotoEdit = (id) => {
17
     const queryStr = id ? `?id=${id}` : '';
19
     const queryStr = id ? `?id=${id}` : '';
45
     });
47
     });
46
   };
48
   };
47
   useEffect(() => {
49
   useEffect(() => {
50
+    getCooperativeList().then((res) => {
51
+      setCooperativeList(res.records);
52
+    });
48
     getMachineryTypeList().then((res) => {
53
     getMachineryTypeList().then((res) => {
49
       setMachineryTypeList(res.records);
54
       setMachineryTypeList(res.records);
50
     });
55
     });
55
     </Button>,
60
     </Button>,
56
   ];
61
   ];
57
   const columns = [
62
   const columns = [
63
+    {
64
+      title: '合作社',
65
+      dataIndex: 'orgId',
66
+      key: 'orgId',
67
+      hideInTable: true,
68
+      renderFormItem: (item, field, form) => {
69
+        return (
70
+          <Select>
71
+            {cooperativeList.map((item) => (
72
+              <Option value={item.orgId} key={item.orgId}>
73
+                {item.name}
74
+              </Option>
75
+            ))}
76
+          </Select>
77
+        )
78
+      }
79
+    },
58
     {
80
     {
59
       title: '名称',
81
       title: '名称',
60
       dataIndex: 'name',
82
       dataIndex: 'name',
61
       key: 'name',
83
       key: 'name',
62
     },
84
     },
85
+    {
86
+      title: '合作社',
87
+      dataIndex: 'orgName',
88
+      key: 'orgName',
89
+      search: false
90
+    },
63
     {
91
     {
64
       title: '农机类型',
92
       title: '农机类型',
65
       dataIndex: 'typeId',
93
       dataIndex: 'typeId',

src/pages/SystemManagement/Cooperative/index.jsx → src/pages/Machinery/Org/index.jsx View File

23
   //列表数据
23
   //列表数据
24
   const [data, setData] = useState([]);
24
   const [data, setData] = useState([]);
25
 
25
 
26
-  //机构Id
26
+  //合作社Id
27
   const [orgId, setOrgId] = useState('');
27
   const [orgId, setOrgId] = useState('');
28
   const [form] = Form.useForm();
28
   const [form] = Form.useForm();
29
-  //机构表单数据
29
+  //合作社表单数据
30
   const [listForm, setListForm] = useState({});
30
   const [listForm, setListForm] = useState({});
31
   //确定按钮loading框防连点
31
   //确定按钮loading框防连点
32
   const [loading, setLoading] = useState(false);
32
   const [loading, setLoading] = useState(false);
33
   //记录定位信息
33
   //记录定位信息
34
   const [newLocName, setLocName] = useState('');
34
   const [newLocName, setLocName] = useState('');
35
   const [newAddress, setAddress] = useState('');
35
   const [newAddress, setAddress] = useState('');
36
-  //机构所属区域列表
36
+  //合作社所属区域列表
37
   const [regionList, setRegionList] = useState([]);
37
   const [regionList, setRegionList] = useState([]);
38
 
38
 
39
   //选中左侧列表右侧显示详情
39
   //选中左侧列表右侧显示详情
152
           <Card
152
           <Card
153
             title="列表"
153
             title="列表"
154
             extra={
154
             extra={
155
-              <a href="#" onClick={() => setOrgId()}>
155
+              <Button type='link' onClick={() => setOrgId()}>
156
                 添加
156
                 添加
157
-              </a>
157
+              </Button>
158
             }
158
             }
159
           >
159
           >
160
             <Tree className="treeClass" titleRender={(data) => handelNode(data)} treeData={data} />
160
             <Tree className="treeClass" titleRender={(data) => handelNode(data)} treeData={data} />
164
           <Card title="详情">
164
           <Card title="详情">
165
             <Form {...formItemLayout} onFinish={Submit} form={form}>
165
             <Form {...formItemLayout} onFinish={Submit} form={form}>
166
               <FormItem
166
               <FormItem
167
-                label="机构名"
167
+                label="合作社名"
168
                 name="name"
168
                 name="name"
169
-                rules={[{ required: true, message: '请输入机构名称16个字符以内' }]}
169
+                rules={[{ required: true, message: '请输入合作社名称16个字符以内' }]}
170
               >
170
               >
171
                 <Input
171
                 <Input
172
-                  placeholder="请输入机构名称16个字符以内"
172
+                  placeholder="请输入合作社名称16个字符以内"
173
                   maxLength="16"
173
                   maxLength="16"
174
                   style={{ width: '350px' }}
174
                   style={{ width: '350px' }}
175
                 />
175
                 />

src/pages/SystemManagement/Administrator/index.less → src/pages/Machinery/Org/index.less View File


src/pages/SystemManagement/Administrator/index.jsx → src/pages/Machinery/Person/index.jsx View File

120
     form.resetFields();
120
     form.resetFields();
121
     setEditModal(false);
121
     setEditModal(false);
122
   };
122
   };
123
-  // 弹窗表单中机构搜索框改变事件目前没用
124
-  const handelChange = () => {};
123
+  // 弹窗表单中合作社搜索框改变事件目前没用
124
+  const handelChange = () => { };
125
 
125
 
126
   // 列表点击编辑按钮
126
   // 列表点击编辑按钮
127
   const handleEdit = (val) => {
127
   const handleEdit = (val) => {
220
     getDefaultPassword().then((res) => {
220
     getDefaultPassword().then((res) => {
221
       setPassWord(res);
221
       setPassWord(res);
222
     });
222
     });
223
-    //获取机构列表数据
223
+    //获取合作社列表数据
224
     getCooperativeList().then((res) => {
224
     getCooperativeList().then((res) => {
225
       setCooperativeList(res.records);
225
       setCooperativeList(res.records);
226
       const list = res.records?.map((item) => {
226
       const list = res.records?.map((item) => {
331
     <PageHeaderWrapper>
331
     <PageHeaderWrapper>
332
       <Row gutter={16}>
332
       <Row gutter={16}>
333
         <Col span={6}>
333
         <Col span={6}>
334
-          <Card title="机构列表">
334
+          <Card title="合作社列表">
335
             <Tree
335
             <Tree
336
               onSelect={onSelect}
336
               onSelect={onSelect}
337
               className="treeClass"
337
               className="treeClass"
392
               <span style={{ opacity: '0.7' }}>默认密码{password}</span>
392
               <span style={{ opacity: '0.7' }}>默认密码{password}</span>
393
             </Input.Group>
393
             </Input.Group>
394
           </FormItem>
394
           </FormItem>
395
-          <FormItem label="所属机构" name="orgId" rules={[{ required: true, message: '请输入' }]}>
396
-            <Search placeholder="请选择机构" onChange={handelChange} />
395
+          <FormItem label="所属合作社" name="orgId" rules={[{ required: true, message: '请输入' }]}>
396
+            <Search placeholder="请选择合作社" onChange={handelChange} />
397
             {/* <Select
397
             {/* <Select
398
-              placeholder="请选择机构"
398
+              placeholder="请选择合作社"
399
               showSearch
399
               showSearch
400
               onSearch={handelFormSearch}
400
               onSearch={handelFormSearch}
401
               onChange={handelFormSearch}
401
               onChange={handelFormSearch}

src/pages/SystemManagement/Cooperative/index.less → src/pages/Machinery/Person/index.less View File


+ 7
- 5
src/pages/OrderManage/OrderList/index.jsx View File

25
     return '待评价'
25
     return '待评价'
26
   } if (item.workStatus === 3 && item.isEvaluated === 1) {
26
   } if (item.workStatus === 3 && item.isEvaluated === 1) {
27
     return '已完成'
27
     return '已完成'
28
-  } else if (item.payStatus === 1 && item.workStatus === 0 && item.isRefund === 1) {
28
+  } else if (item.payStatus === 3) {
29
+    return '退单申请中'
30
+  } else if (item.status === 9) {
29
     return '已退单'
31
     return '已退单'
30
   } else {
32
   } else {
31
     return '异常'
33
     return '异常'
44
   }, []);
46
   }, []);
45
   const columns = [
47
   const columns = [
46
     {
48
     {
47
-      title: '机构',
49
+      title: '合作社',
48
       dataIndex: 'orgId',
50
       dataIndex: 'orgId',
49
       key: 'orgId',
51
       key: 'orgId',
50
       hideInTable: true,
52
       hideInTable: true,
89
       }
91
       }
90
     },
92
     },
91
     {
93
     {
92
-      title: '机构名',
94
+      title: '合作社名',
93
       dataIndex: 'orgName',
95
       dataIndex: 'orgName',
94
       key: 'orgName',
96
       key: 'orgName',
95
       search: false
97
       search: false
108
     },
110
     },
109
     {
111
     {
110
       title: '下单人',
112
       title: '下单人',
111
-      dataIndex: 'name',
112
-      key: 'name',
113
+      dataIndex: 'personName',
114
+      key: 'personName',
113
     },
115
     },
114
     {
116
     {
115
       title: '手机号',
117
       title: '手机号',

+ 1
- 1
src/pages/OrderManage/dispatch.jsx View File

105
             <FormItem label="预约时间">
105
             <FormItem label="预约时间">
106
               {dispatch?.appointmentDate}
106
               {dispatch?.appointmentDate}
107
             </FormItem>
107
             </FormItem>
108
-            <FormItem label="机构名">
108
+            <FormItem label="合作社名">
109
               {dispatch?.orgName}
109
               {dispatch?.orgName}
110
             </FormItem>
110
             </FormItem>
111
             <FormItem label="农机类型">
111
             <FormItem label="农机类型">

+ 2
- 3
src/pages/OrderManage/index.jsx View File

45
   }, []);
45
   }, []);
46
   const columns = [
46
   const columns = [
47
     {
47
     {
48
-      title: '机构',
48
+      title: '合作社',
49
       dataIndex: 'orgId',
49
       dataIndex: 'orgId',
50
       key: 'orgId',
50
       key: 'orgId',
51
       hideInTable: true,
51
       hideInTable: true,
74
     },
74
     },
75
 
75
 
76
     {
76
     {
77
-      title: '机构名',
77
+      title: '合作社名',
78
       dataIndex: 'orgName',
78
       dataIndex: 'orgName',
79
       key: 'orgName',
79
       key: 'orgName',
80
       search: false
80
       search: false
149
       key: 'dispatchStatus',
149
       key: 'dispatchStatus',
150
       valueType: 'select',
150
       valueType: 'select',
151
       valueEnum: {
151
       valueEnum: {
152
-        '': { text: '不限', status: 'Default' },
153
         0: { text: '待调度' },
152
         0: { text: '待调度' },
154
         1: { text: '已调度' }
153
         1: { text: '已调度' }
155
       },
154
       },

+ 5
- 5
src/services/cooperative.js View File

1
 import request from '@/utils/request';
1
 import request from '@/utils/request';
2
 
2
 
3
 /**
3
 /**
4
- * 保存组织机构
4
+ * 保存组织合作社
5
  * @param {*} data
5
  * @param {*} data
6
  * @returns
6
  * @returns
7
  */
7
  */
8
 export const addCooperative = (data) => request('/org', { method: 'post', data });
8
 export const addCooperative = (data) => request('/org', { method: 'post', data });
9
 
9
 
10
 /**
10
 /**
11
- * 修改组织机构
11
+ * 修改组织合作社
12
  * @param {*} data
12
  * @param {*} data
13
  * @returns
13
  * @returns
14
  */
14
  */
15
 export const updateCooperative = (id, data) => request(`/org/${id}`, { method: 'put', data });
15
 export const updateCooperative = (id, data) => request(`/org/${id}`, { method: 'put', data });
16
 
16
 
17
 /**
17
 /**
18
- * 查询组织机构列表
18
+ * 查询组织合作社列表
19
  * @param {*} params
19
  * @param {*} params
20
  * @returns
20
  * @returns
21
  */
21
  */
22
 export const getCooperativeList = (params) => request('/org', { params });
22
 export const getCooperativeList = (params) => request('/org', { params });
23
 
23
 
24
 /**
24
 /**
25
- * 删除组织机构
25
+ * 删除组织合作社
26
  * @param {*} data
26
  * @param {*} data
27
  * @returns
27
  * @returns
28
  */
28
  */
29
 export const deleteCooperative = (id) => request(`/org/${id}`, { method: 'delete' });
29
 export const deleteCooperative = (id) => request(`/org/${id}`, { method: 'delete' });
30
 
30
 
31
 /**
31
 /**
32
- * 查询组织机构详情
32
+ * 查询组织合作社详情
33
  * @param {*} params
33
  * @param {*} params
34
  * @returns
34
  * @returns
35
  */
35
  */