李志伟 3 年 前
コミット
18a75ace11

+ 20
- 20
config/routes.js ファイルの表示

@@ -79,16 +79,16 @@ export default [
79 79
     component: '../layouts/BasicLayout',
80 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 94
         path: '/Machinery/MachineryType',
@@ -108,6 +108,18 @@ export default [
108 108
         component: './Machinery/Machinery/edit.jsx',
109 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 124
         path: '/Machinery/GIS',
113 125
         name: '农机GIS',
@@ -240,24 +252,12 @@ export default [
240 252
         access: 'region',
241 253
         component: './SystemManagement/Region',
242 254
       },
243
-      {
244
-        path: '/SystemManagement/Cooperative',
245
-        name: '机构列表',
246
-        access: 'org',
247
-        component: './SystemManagement/Cooperative',
248
-      },
249 255
       {
250 256
         path: '/SystemManagement/UserRights',
251 257
         name: '角色管理',
252 258
         access: 'role',
253 259
         component: './SystemManagement/UserRights',
254 260
       },
255
-      {
256
-        path: '/SystemManagement/Administrator',
257
-        name: '人员管理',
258
-        access: 'user',
259
-        component: './SystemManagement/Administrator',
260
-      },
261 261
       {
262 262
         path: '/SystemManagement/BasicParameters',
263 263
         name: '基本参数',

+ 6
- 5
src/pages/JobStatistics/Order/index.jsx ファイルの表示

@@ -38,7 +38,7 @@ export default (props) => {
38 38
   }, []);
39 39
   const columns = [
40 40
     {
41
-      title: '机构',
41
+      title: '合作社',
42 42
       dataIndex: 'orgId',
43 43
       key: 'orgId',
44 44
       hideInTable: true,
@@ -83,7 +83,7 @@ export default (props) => {
83 83
       }
84 84
     },
85 85
     {
86
-      title: '机构名',
86
+      title: '合作社名',
87 87
       dataIndex: 'orgName',
88 88
       key: 'orgName',
89 89
       search: false
@@ -102,8 +102,8 @@ export default (props) => {
102 102
     },
103 103
     {
104 104
       title: '下单人',
105
-      dataIndex: 'name',
106
-      key: 'name',
105
+      dataIndex: 'personName',
106
+      key: 'personName',
107 107
     },
108 108
     {
109 109
       title: '手机号',
@@ -144,7 +144,8 @@ export default (props) => {
144 144
       valueType: 'select',
145 145
       valueEnum: {
146 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 ファイルの表示

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

+ 28
- 0
src/pages/Machinery/Machinery/index.jsx ファイルの表示

@@ -6,12 +6,14 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout';
6 6
 import PageTable from '@/components/PageTable';
7 7
 import { getMachineryList, deleteMachinery, updateMachinery } from '@/services/machinery';
8 8
 import { getMachineryTypeList } from '@/services/machineryType';
9
+import { getCooperativeList } from '@/services/cooperative';
9 10
 
10 11
 const { Option } = Select;
11 12
 
12 13
 export default (props) => {
13 14
   const actionRef = useRef();
14 15
   const [machineryTypeList, setMachineryTypeList] = useState([]);
16
+  const [cooperativeList, setCooperativeList] = useState([]);
15 17
 
16 18
   const gotoEdit = (id) => {
17 19
     const queryStr = id ? `?id=${id}` : '';
@@ -45,6 +47,9 @@ export default (props) => {
45 47
     });
46 48
   };
47 49
   useEffect(() => {
50
+    getCooperativeList().then((res) => {
51
+      setCooperativeList(res.records);
52
+    });
48 53
     getMachineryTypeList().then((res) => {
49 54
       setMachineryTypeList(res.records);
50 55
     });
@@ -55,11 +60,34 @@ export default (props) => {
55 60
     </Button>,
56 61
   ];
57 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 81
       title: '名称',
60 82
       dataIndex: 'name',
61 83
       key: 'name',
62 84
     },
85
+    {
86
+      title: '合作社',
87
+      dataIndex: 'orgName',
88
+      key: 'orgName',
89
+      search: false
90
+    },
63 91
     {
64 92
       title: '农机类型',
65 93
       dataIndex: 'typeId',

src/pages/SystemManagement/Cooperative/index.jsx → src/pages/Machinery/Org/index.jsx ファイルの表示

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

src/pages/SystemManagement/Administrator/index.less → src/pages/Machinery/Org/index.less ファイルの表示


src/pages/SystemManagement/Administrator/index.jsx → src/pages/Machinery/Person/index.jsx ファイルの表示

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

src/pages/SystemManagement/Cooperative/index.less → src/pages/Machinery/Person/index.less ファイルの表示


+ 7
- 5
src/pages/OrderManage/OrderList/index.jsx ファイルの表示

@@ -25,7 +25,9 @@ const orderStates = (item) => {
25 25
     return '待评价'
26 26
   } if (item.workStatus === 3 && item.isEvaluated === 1) {
27 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 31
     return '已退单'
30 32
   } else {
31 33
     return '异常'
@@ -44,7 +46,7 @@ export default (props) => {
44 46
   }, []);
45 47
   const columns = [
46 48
     {
47
-      title: '机构',
49
+      title: '合作社',
48 50
       dataIndex: 'orgId',
49 51
       key: 'orgId',
50 52
       hideInTable: true,
@@ -89,7 +91,7 @@ export default (props) => {
89 91
       }
90 92
     },
91 93
     {
92
-      title: '机构名',
94
+      title: '合作社名',
93 95
       dataIndex: 'orgName',
94 96
       key: 'orgName',
95 97
       search: false
@@ -108,8 +110,8 @@ export default (props) => {
108 110
     },
109 111
     {
110 112
       title: '下单人',
111
-      dataIndex: 'name',
112
-      key: 'name',
113
+      dataIndex: 'personName',
114
+      key: 'personName',
113 115
     },
114 116
     {
115 117
       title: '手机号',

+ 1
- 1
src/pages/OrderManage/dispatch.jsx ファイルの表示

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

+ 2
- 3
src/pages/OrderManage/index.jsx ファイルの表示

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

+ 5
- 5
src/services/cooperative.js ファイルの表示

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