lisenzhou 2 lat temu
rodzic
commit
3ddc15d4fb

+ 18
- 12
src/pages/purchase/plan/edit/index.jsx Wyświetl plik

@@ -10,6 +10,7 @@ import {
10 10
   ProFormSelect,
11 11
   ProFormText,
12 12
   ProFormDigit,
13
+  ProFormDatePicker ,
13 14
 } from "@ant-design/pro-components";
14 15
 import { useNavigate, useSearchParams } from "react-router-dom";
15 16
 import { Card, Col, message, Row, Space, Form, Button } from "antd";
@@ -85,7 +86,6 @@ export default (props) => {
85 86
           submitter={{
86 87
             searchConfig: {
87 88
               resetText: "返回",
88
-              
89 89
             },
90 90
             submitButtonProps: {
91 91
               disabled: isCompleted,
@@ -112,7 +112,8 @@ export default (props) => {
112 112
             rules={[{ required: true, message: "请输入采购计划" }]}
113 113
             width={480}
114 114
           />
115
-          <ProFormText
115
+
116
+          <ProFormDatePicker 
116 117
             name="planDate"
117 118
             allowClear={false}
118 119
             label="计划时间"
@@ -120,6 +121,7 @@ export default (props) => {
120 121
             rules={[{ required: true, message: "请输入计划时间" }]}
121 122
             width={480}
122 123
           />
124
+
123 125
           <Form.Item
124 126
             label="采购清单"
125 127
             labelCol={{ span: 2 }}
@@ -166,18 +168,22 @@ export default (props) => {
166 168
                         fieldProps={{ precision: 2, prefix: "¥" }}
167 169
                         // width={150}
168 170
                       />
169
-                    {  !isCompleted&&<MinusCircleOutlined onClick={() => remove(name)} />}
171
+                      {!isCompleted && (
172
+                        <MinusCircleOutlined onClick={() => remove(name)} />
173
+                      )}
170 174
                     </Space>
171 175
                   ))}
172
-                  {!isCompleted&&<Form.Item>
173
-                    <Button
174
-                      type="dashed"
175
-                      onClick={() => add()}
176
-                      icon={<PlusOutlined />}
177
-                    >
178
-                      添加
179
-                    </Button>
180
-                  </Form.Item>}
176
+                  {!isCompleted && (
177
+                    <Form.Item>
178
+                      <Button
179
+                        type="dashed"
180
+                        onClick={() => add()}
181
+                        icon={<PlusOutlined />}
182
+                      >
183
+                        添加
184
+                      </Button>
185
+                    </Form.Item>
186
+                  )}
181 187
                 </>
182 188
               )}
183 189
             </Form.List>

+ 1
- 0
src/pages/purchase/plan/list/index.jsx Wyświetl plik

@@ -41,6 +41,7 @@ const StockList = (props) => {
41 41
     {
42 42
       title: "计划时间",
43 43
       dataIndex: "planDate",
44
+      valueType:'date'
44 45
     },
45 46
     {
46 47
       title: "采购项目",