Yansen 2 년 전
부모
커밋
0961be8f1a

+ 13
- 0
config/routes.js 파일 보기

@@ -75,6 +75,19 @@
75 75
     icon: 'VideoCameraOutlined',
76 76
     component: './package/index',
77 77
   },
78
+  {
79
+    path: '/guaranteeTask/list',
80
+    name: '任务管理',
81
+    icon: 'VideoCameraOutlined',
82
+    component: './guaranteeTask/index',
83
+  },
84
+  {
85
+    path: '/guaranteeTask/edit',
86
+    name: '任务详情',
87
+    icon: 'VideoCameraOutlined',
88
+    // hideInMenu: true,
89
+    component: './guaranteeTask/Edit/index',
90
+  },
78 91
   {
79 92
     component: './404',
80 93
   },

BIN
public/logo.png 파일 보기


+ 0
- 0
src/components/EditableTag/index.jsx 파일 보기


+ 168
- 0
src/pages/guaranteeTask/Edit/BasicForm.jsx 파일 보기

@@ -0,0 +1,168 @@
1
+import React, { useState } from 'react';
2
+import { Button, Row, Col, Form, Input, InputNumber, DatePicker, notification } from 'antd';
3
+
4
+const { TextArea } = Input;
5
+const { RangePicker } = DatePicker;
6
+
7
+export default (props) => {
8
+  const [form] = Form.useForm()
9
+  const [rangeDate, setRangeDate] = useState([]);
10
+
11
+  const onChange = (dts) => {
12
+    const [start, end] = dts;
13
+    setRangeDate(dts);
14
+    
15
+    form.setFieldValue('startDate', start ? start.format('YYYY-MM-DD') : undefined);
16
+    form.setFieldValue('endDate', end ? end.format('YYYY-MM-DD') : undefined);
17
+  }
18
+
19
+  const onFinish = values => {
20
+    const notNull = Object.keys(values).map(k => values[k]).filter(Boolean);
21
+    if (!notNull || notNull.length < 1) {
22
+      notification.warn({ message: '未检索到填写内容' });
23
+      return ;
24
+    }
25
+  }
26
+
27
+  return (
28
+    <Form layout="vertical" onFinish={onFinish}>
29
+      <h3 style={{ marginBottom: '1.5em', fontWeight: 700 }}>人员安排</h3>
30
+      <Row gutter={48}>
31
+        <Col span={6}>
32
+          <Form.Item label="受领人" name="receiver">
33
+            <Input allowClear />
34
+          </Form.Item>
35
+        </Col>
36
+        <Col span={6}>
37
+          <Form.Item label="受领人电话" name="receiverPhone">
38
+            <Input allowClear />
39
+          </Form.Item>
40
+        </Col>
41
+        <Col span={6}>
42
+          <Form.Item label="部队联系人" name="concat_person">
43
+            <Input allowClear />
44
+          </Form.Item>
45
+        </Col>
46
+        <Col span={6}>
47
+          <Form.Item label="部队联系人电话" name="concat_phone">
48
+            <Input allowClear />
49
+          </Form.Item>
50
+        </Col>
51
+      </Row>
52
+      <Row gutter={48}>
53
+        <Col span={6}>
54
+          <Form.Item label="制餐人" name="chef">
55
+            <Input allowClear />
56
+          </Form.Item>
57
+        </Col>
58
+        <Col span={6}>
59
+          <Form.Item label="制餐人电话" name="chef_phone">
60
+            <Input allowClear />
61
+          </Form.Item>
62
+        </Col>
63
+        <Col span={6}>
64
+          <Form.Item label="送餐人" name="delivery_man">
65
+            <Input allowClear />
66
+          </Form.Item>
67
+        </Col>
68
+        <Col span={6}>
69
+          <Form.Item label="送餐人电话" name="delivery_phone">
70
+            <Input allowClear />
71
+          </Form.Item>
72
+        </Col>
73
+      </Row>
74
+      
75
+      <h3 style={{ margin: '1.5em 0', fontWeight: 700 }}>基本情况</h3>
76
+      <Row gutter={48}>
77
+        <Col span={6}>
78
+          <Form.Item label="军代表" name="deputy_man">
79
+            <Input allowClear />
80
+          </Form.Item>
81
+        </Col>
82
+        <Col span={6}>
83
+          <Form.Item label="电话" name="deputy_phone">
84
+            <Input allowClear />
85
+          </Form.Item>
86
+        </Col>
87
+        <Col span={6}>
88
+          <Form.Item label="通报时间" name="got_date">
89
+            <Input allowClear />
90
+          </Form.Item>
91
+        </Col>
92
+      </Row>
93
+      <Row gutter={48}>
94
+        <Col span={6}>
95
+          <Form.Item label="保障序号" name="guarantee_no">
96
+            <Input allowClear />
97
+          </Form.Item>
98
+        </Col>
99
+        <Col span={6}>
100
+          <Form.Item label="军运号" name="transport_no">
101
+            <Input allowClear />
102
+          </Form.Item>
103
+        </Col>
104
+        <Col span={6}>
105
+          <Form.Item label="车次" name="trips_no">
106
+            <Input allowClear />
107
+          </Form.Item>
108
+        </Col>
109
+      </Row>
110
+      <Row gutter={48}>
111
+        <Col span={12}>
112
+          <Form.Item label="保障日期">
113
+            <RangePicker style={{ width: '100%' }} allowClear value={rangeDate} onChange={onChange} />
114
+          </Form.Item>
115
+        </Col>
116
+        <Col span={6}>
117
+          <Form.Item label="保障时间" name="time_range">
118
+            <Input allowClear />
119
+          </Form.Item>
120
+        </Col>
121
+      </Row>
122
+      <Row gutter={48}>
123
+        <Col span={6}>
124
+          <Form.Item label="保障人数" name="total_person_num">
125
+            <InputNumber min={1} style={{ width: '100%' }}/>
126
+          </Form.Item>
127
+        </Col>
128
+        <Col span={6}>
129
+          <Form.Item label="其中回民" name="hui_person_num">
130
+            <InputNumber min={0} style={{ width: '100%' }}/>
131
+          </Form.Item>
132
+        </Col>
133
+        <Col span={6}>
134
+          <Form.Item label="其中病号" name="patient_num">
135
+            <InputNumber min={0} style={{ width: '100%' }}/>
136
+          </Form.Item>
137
+        </Col>
138
+      </Row>
139
+      <Row gutter={48}>
140
+        <Col span={12}>
141
+          <Form.Item label="保障地点" name="address">
142
+            <Input allowClear />
143
+          </Form.Item>
144
+        </Col>
145
+        <Col span={6}>
146
+          <Form.Item label="伙食标准" name="standard">
147
+            <Input allowClear />
148
+          </Form.Item>
149
+        </Col>
150
+      </Row>
151
+      <Row gutter={48}>
152
+        <Col span={12}>
153
+          <Form.Item label="备注" name="remark">
154
+            <TextArea rows={4} />
155
+          </Form.Item>
156
+        </Col>
157
+      </Row>
158
+
159
+      <Row gutter={48}>
160
+        <Col offset={6} span={6}>
161
+          <Button type="primary" htmlType="submit">提交</Button>
162
+          <Button style={{ marginLeft: '100px' }}>返回</Button>
163
+        </Col>
164
+      </Row>
165
+
166
+    </Form>
167
+  )
168
+}

+ 7
- 0
src/pages/guaranteeTask/Edit/DishList.jsx 파일 보기

@@ -0,0 +1,7 @@
1
+import React from 'react'
2
+
3
+export default (props) => {
4
+  return (
5
+    <div></div>
6
+  )
7
+}

+ 34
- 0
src/pages/guaranteeTask/Edit/index.jsx 파일 보기

@@ -0,0 +1,34 @@
1
+import React, { useState } from 'react';
2
+import { Tabs, Card } from 'antd';
3
+import { PageContainer } from '@ant-design/pro-components';
4
+import BasicForm from './BasicForm';
5
+import DishList from './DishList';
6
+
7
+export default (props) => {
8
+  const [activeTabKey, setActiveTabKey] = useState('item-1');
9
+
10
+  const tabList = [
11
+    { tab: '基本情况', key: 'item-1', }, // 务必填写 key
12
+    { tab: '菜单详情', key: 'item-2', },
13
+  ];
14
+
15
+  return (
16
+    <PageContainer>
17
+      <Card
18
+        style={{ width: '100%' }}
19
+        tabList={tabList}
20
+        activeTabKey={activeTabKey}
21
+        onTabChange={setActiveTabKey}>
22
+
23
+        {
24
+          activeTabKey === 'item-1' && <BasicForm />
25
+        }
26
+
27
+        {
28
+          activeTabKey === 'item-2' && <DishList />
29
+        }
30
+
31
+      </Card>
32
+    </PageContainer>
33
+  )
34
+}

+ 7
- 0
src/pages/guaranteeTask/index.jsx 파일 보기

@@ -0,0 +1,7 @@
1
+import React from 'react'
2
+
3
+export default (props) => {
4
+  return (
5
+    <div></div>
6
+  )
7
+}