李志伟 3 anni fa
parent
commit
76ae52065c

+ 1
- 87
src/pages/Finance/AccountLog/index.jsx Vedi File

@@ -1,89 +1,3 @@
1
-import React from 'react';
2
-// import { getPersonList, exportPersonList } from '@/services/person';
3
-import { PageHeaderWrapper } from '@ant-design/pro-layout';
4
-import moment from 'moment';
5
-import PageTable from '@/components/PageTable';
6
-
7
-const formatterTime = (val) => {
8
-  return val ? moment(val).format('YYYY-MM-DD HH:mm:ss') : '';
9
-};
10
-
11 1
 export default (props) => {
12
-  const columns = [
13
-    {
14
-      title: '流水号',
15
-      dataIndex: 'log_id',
16
-      key: 'log_id',
17
-    },
18
-    {
19
-      title: '订单号',
20
-      dataIndex: 'orderId',
21
-      key: 'orderId',
22
-    },
23
-    {
24
-      title: '用户Id',
25
-      dataIndex: 'userId',
26
-      key: 'userId',
27
-    },
28
-    {
29
-      title: '收款人',
30
-      dataIndex: 'name',
31
-      key: 'name',
32
-    },
33
-    {
34
-      title: '手机号码',
35
-      dataIndex: 'phone',
36
-      key: 'phone',
37
-    },
38
-    {
39
-      title: '用户类型',
40
-      dataIndex: 'type',
41
-      key: 'type',
42
-      valueType: 'select',
43
-      valueEnum: {
44
-        '': { text: '不限', status: 'Default' },
45
-        1: { text: '押金' },
46
-        2: { text: '人工费' },
47
-      },
48
-    },
49
-    {
50
-      title: '支付方式',
51
-      dataIndex: 'payType',
52
-      key: 'payType',
53
-      valueType: 'select',
54
-      search: false,
55
-      valueEnum: {
56
-        '': { text: '不限', status: 'Default' },
57
-        1: { text: '微信' },
58
-        2: { text: '支付宝' },
59
-      },
60
-    },
61
-    {
62
-      title: '流水金额',
63
-      dataIndex: 'money',
64
-      key: 'money',
65
-      search: false,
66
-    },
67
-    {
68
-      title: '发生时间',
69
-      dataIndex: 'createDate',
70
-      key: 'createDate',
71
-      search: false,
72
-      render: (t) => formatterTime(t),
73
-      width: 200,
74
-    },
75
-  ];
76
-
77
-  return (
78
-    <PageHeaderWrapper>
79
-      <PageTable
80
-        // request={getPersonList}
81
-        // expfunc={exportPersonList}
82
-        columns={columns}
83
-        rowKey="logId"
84
-        options={false}
85
-        scroll={{ x: 1000 }}
86
-      />
87
-    </PageHeaderWrapper>
88
-  );
2
+  return <div>平台流水</div>;
89 3
 };

+ 1
- 87
src/pages/Finance/Withdrawal/index.jsx Vedi File

@@ -1,89 +1,3 @@
1
-import React from 'react';
2
-// import { getPersonList, exportPersonList } from '@/services/person';
3
-import { PageHeaderWrapper } from '@ant-design/pro-layout';
4
-import moment from 'moment';
5
-import PageTable from '@/components/PageTable';
6
-
7
-const formatterTime = (val) => {
8
-  return val ? moment(val).format('YYYY-MM-DD HH:mm:ss') : '';
9
-};
10
-
11 1
 export default (props) => {
12
-  const columns = [
13
-    {
14
-      title: '序号',
15
-      dataIndex: 'sortId',
16
-      key: 'sortId',
17
-      search: false,
18
-    },
19
-    {
20
-      title: '用户账号',
21
-      dataIndex: 'account_id',
22
-      key: 'account_id',
23
-    },
24
-    {
25
-      title: '收款人',
26
-      dataIndex: 'name',
27
-      key: 'name',
28
-    },
29
-    {
30
-      title: '手机号码',
31
-      dataIndex: 'phone',
32
-      key: 'phone',
33
-    },
34
-    {
35
-      title: '提现金额',
36
-      dataIndex: 'money',
37
-      key: 'money',
38
-      search: false,
39
-    },
40
-    {
41
-      title: '账号类型',
42
-      dataIndex: 'payType',
43
-      key: 'payType',
44
-      valueType: 'select',
45
-      valueEnum: {
46
-        '': { text: '不限', status: 'Default' },
47
-        1: { text: '微信' },
48
-        2: { text: '支付宝' },
49
-      },
50
-      search: false,
51
-    },
52
-    {
53
-      title: '提现账号',
54
-      dataIndex: 'withfrawalNum',
55
-      key: 'withfrawalNum',
56
-      search: false,
57
-    },
58
-
59
-    {
60
-      title: '申请时间',
61
-      dataIndex: 'createDate',
62
-      key: 'createDate',
63
-      search: false,
64
-      render: (t) => formatterTime(t),
65
-      search: false,
66
-    },
67
-    {
68
-      title: '更新时间',
69
-      dataIndex: 'updateDate',
70
-      key: 'updateDate',
71
-      valueType: 'date',
72
-      render: (t) => formatterTime(t),
73
-      width: 200,
74
-    },
75
-  ];
76
-
77
-  return (
78
-    <PageHeaderWrapper>
79
-      <PageTable
80
-        // request={getPersonList}
81
-        // expfunc={exportPersonList}
82
-        columns={columns}
83
-        rowKey="withdrawalId"
84
-        options={false}
85
-        scroll={{ x: 1000 }}
86
-      />
87
-    </PageHeaderWrapper>
88
-  );
2
+  return <div>提现管理</div>;
89 3
 };

+ 5
- 5
src/pages/Machinery/Machinery/index.jsx Vedi File

@@ -26,8 +26,8 @@ export default (props) => {
26 26
   //列表切换农机状态方法
27 27
   const handleOK = (record, data) => {
28 28
     const title = record.status
29
-      ? '您确定要将该农机状态变更为取消发布吗? 取消后该农机将不在移动端显示'
30
-      : '您确定要将该农机状态变更为发布吗? 发布后该农机可以在移动端显示';
29
+      ? '您确定要将该农机状态变更为维修中吗? 变更后后该农机将不能调度'
30
+      : '您确定要将该农机状态变更为正常吗? 变更后该农机可以调度';
31 31
     Modal.confirm({
32 32
       title: title,
33 33
       okText: '确认',
@@ -114,12 +114,12 @@ export default (props) => {
114 114
       },
115 115
     },
116 116
     {
117
-      title: '发布状态',
117
+      title: '状态',
118 118
       dataIndex: 'status',
119 119
       key: 'status',
120 120
       search: false,
121 121
       render: (_, record) => {
122
-        return record.status === 1 ? '发布' : '未发布';
122
+        return record.status === 1 ? '正常' : '维修中';
123 123
       },
124 124
     },
125 125
     {
@@ -127,7 +127,7 @@ export default (props) => {
127 127
       valueType: 'option',
128 128
       render: (_, record) => [
129 129
         <Button style={{ padding: 0 }} type="link" key={1} onClick={() => handleOK(record)}>
130
-          {record.status === 0 ? '发布' : '取消发布'}
130
+          {record.status === 0 ? '完成维修' : '维修'}
131 131
         </Button>,
132 132
         <Button
133 133
           style={{ padding: 0 }}

+ 1
- 92
src/pages/OrderManage/JobWarning/index.jsx Vedi File

@@ -1,94 +1,3 @@
1
-import React from 'react';
2
-// import { getPersonList, exportPersonList } from '@/services/person';
3
-import { PageHeaderWrapper } from '@ant-design/pro-layout';
4
-import moment from 'moment';
5
-import PageTable from '@/components/PageTable';
6
-
7
-const formatterTime = (val) => {
8
-  return val ? moment(val).format('YYYY-MM-DD HH:mm:ss') : '';
9
-};
10
-
11 1
 export default (props) => {
12
-  const columns = [
13
-    {
14
-      title: '订单编号',
15
-      dataIndex: 'orderNum',
16
-      key: 'orderNum',
17
-    },
18
-    {
19
-      title: '农机名',
20
-      dataIndex: 'machineryName',
21
-      key: 'machineryName',
22
-    },
23
-    {
24
-      title: '农机型号',
25
-      dataIndex: 'type',
26
-      key: 'type',
27
-    },
28
-    {
29
-      title: '农机数量',
30
-      dataIndex: 'machineryNum',
31
-      key: 'machineryNum',
32
-    },
33
-    {
34
-      title: '需求时间',
35
-      dataIndex: 'appointment_date',
36
-      key: 'appointment_date',
37
-    },
38
-    {
39
-      title: '农机价格',
40
-      dataIndex: 'price',
41
-      key: 'price',
42
-      search: false,
43
-    },
44
-    {
45
-      title: '押金',
46
-      dataIndex: 'deposit',
47
-      key: 'deposit',
48
-    },
49
-    {
50
-      title: '费用',
51
-      dataIndex: 'laborCost',
52
-      key: 'laborCost',
53
-    },
54
-    {
55
-      title: '状态',
56
-      dataIndex: 'state',
57
-      key: 'state',
58
-      valueType: 'select',
59
-      valueEnum: {
60
-        '': { text: '不限', status: 'Default' },
61
-        1: { text: '未付款' },
62
-        2: { text: '已付款' },
63
-        3: { text: '待确认' },
64
-        4: { text: '进行中' },
65
-        5: { text: '待评价' },
66
-        6: { text: '已评价' },
67
-        7: { text: '申请退款' },
68
-        8: { text: '已退款' },
69
-      },
70
-    },
71
-    {
72
-      title: '下单时间',
73
-      dataIndex: 'createDate',
74
-      key: 'createDate',
75
-      search: false,
76
-      render: (t) => formatterTime(t),
77
-      width: 200,
78
-    },
79
-    // 显示待确认和需求时间差距2小时的订单  可以查看订单给农机手打电话和农户打电话
80
-  ];
81
-
82
-  return (
83
-    <PageHeaderWrapper>
84
-      <PageTable
85
-        // request={getPersonList}
86
-        // expfunc={exportPersonList}
87
-        columns={columns}
88
-        rowKey="orderId"
89
-        options={false}
90
-        scroll={{ x: 1000 }}
91
-      />
92
-    </PageHeaderWrapper>
93
-  );
2
+  return <div>预警监管</div>;
94 3
 };

+ 10
- 3
src/pages/OrderManage/dispatch.jsx Vedi File

@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
2 2
 import { Card, Form, Input, Button, Select, message } from 'antd';
3 3
 import ProCard from '@ant-design/pro-card';
4 4
 import { getOrderDetail } from '@/services/order'
5
-import { getMachineryList } from '@/services/machinery';
5
+import { getMachineryList, getduty } from '@/services/machinery';
6 6
 import { history } from 'umi';
7 7
 import { getUserList } from '@/services/user';
8 8
 import { addDispatch, getdispatchId, cancelDispatch } from '@/services/dispatch';
@@ -44,7 +44,14 @@ export default (props) => {
44 44
     });
45 45
   };
46 46
   const changeMachinery = (e) => {
47
-    setDispatch({ ...dispatch, machineryId: e })
47
+    getduty(e, { date: dispatch.appointmentDate.substr(0, 10) }).then((res => {
48
+      if (res.length != 0) {
49
+        message.info('该农机已调度请选择其他农机');
50
+        setDispatch({ ...dispatch, machineryId: null })
51
+      } else {
52
+        setDispatch({ ...dispatch, machineryId: e })
53
+      }
54
+    }))
48 55
   }
49 56
   const changeUser = (e) => {
50 57
     setDispatch({ ...dispatch, workerId: e })
@@ -66,7 +73,7 @@ export default (props) => {
66 73
       res.machineryId = null
67 74
       res.typeId = res.machineryType
68 75
       setDispatch(res)
69
-      getMachineryList({ orgId: res.orgId, typeId: res.typeId, pageSize: 999 }).then((res2) => {
76
+      getMachineryList({ orgId: res.orgId, status: 1, typeId: res.typeId, pageSize: 999 }).then((res2) => {
70 77
         setMachineryList(res2.records)
71 78
       })
72 79
       getUserList({ org_id: res.orgId, pageSize: 999 }).then(res3 => {

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

@@ -1,7 +1,6 @@
1
-import React from 'react';
2 1
 import { history } from 'umi';
3 2
 import { Button } from 'antd';
4
-import { getOrderList } from '@/services/order';
3
+import { getDispatchList } from '@/services/dispatch';
5 4
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
6 5
 import moment from 'moment';
7 6
 import PageTable from '@/components/PageTable';
@@ -88,7 +87,7 @@ export default (props) => {
88 87
   return (
89 88
     <PageHeaderWrapper>
90 89
       <PageTable
91
-        request={getOrderList}
90
+        request={getDispatchList}
92 91
         // expfunc={exportPersonList}
93 92
         columns={columns}
94 93
         rowKey="orderId"

+ 7
- 0
src/services/dispatch.js Vedi File

@@ -1,4 +1,11 @@
1 1
 import request from '@/utils/request';
2
+/**
3
+ * 调度列表
4
+ * @param {*} params
5
+ * @returns
6
+ */
7
+export const getDispatchList = (params) => request('/dispatch', { params });
8
+
2 9
 /**
3 10
  * 调度
4 11
  * @param {*} data

+ 7
- 0
src/services/machinery.js Vedi File

@@ -34,3 +34,10 @@ export const deleteMachinery = (id) => request(`/machinery/${id}`, { method: 'de
34 34
  * @returns
35 35
  */
36 36
 export const getMachineryDetail = (id) => request(`/machinery/${id}`);
37
+
38
+/**
39
+ * 查询预约状态
40
+ * @param {*} params
41
+ * @returns
42
+ */
43
+export const getduty = (id, params) => request(`/machinery/${id}/duty`, { params });