Commit e07211fe17c903b6fce447a524d5d28ac720dbe6

Authored by PurelzMgnead
1 parent 4a58703c

feat: 添加批处理

src/access.ts
... ... @@ -13,7 +13,7 @@ export default (initialState: API.UserInfo) => {
13 13 roleSmallVO?.code === 'salesRepresentative';
14 14 return {
15 15 canReadAdmin: canReadAdmin,
16   - canReadProcure: canReadProcure,
  16 + canReadProcure: canReadProcure || canReadAdmin,
17 17 canReadLinda: username === 'Linda',
18 18 canReadAdminAndFinance: canReadFinance || canReadAdmin,
19 19 canReadSales: canReadSales,
... ...
src/pages/Instalment/components/checkModal/TableCheckModal.tsx 0 → 100644
  1 +import { postOrderErpOrderStagesCheckOrderStages } from '@/services';
  2 +import { ModalForm, ProFormTextArea } from '@ant-design/pro-components';
  3 +import { Button, Form, Space, message } from 'antd';
  4 +
  5 +const waitTime = (time: number = 100) => {
  6 + return new Promise((resolve) => {
  7 + setTimeout(() => {
  8 + resolve(true);
  9 + }, time);
  10 + });
  11 +};
  12 +
  13 +export default ({ id, toReload, isShow }) => {
  14 + const [form] = Form.useForm<{ mark: string }>();
  15 +
  16 + return (
  17 + <Space>
  18 + <ModalForm<{
  19 + mark: string;
  20 + }>
  21 + title="账单审核"
  22 + width={460}
  23 + form={form}
  24 + trigger={
  25 + <Button type="primary" disabled={isShow}>
  26 + 批量审核
  27 + </Button>
  28 + }
  29 + modalProps={{
  30 + okText: '通过',
  31 + cancelText: '驳回',
  32 + destroyOnClose: true,
  33 + }}
  34 + submitter={{
  35 + render: (props, defaultDoms) => {
  36 + let myDoms = [];
  37 + myDoms.push(
  38 + <Button
  39 + key="驳回"
  40 + onClick={async () => {
  41 + if (id?.length === 0) {
  42 + message.error('没有可审核的订单');
  43 + toReload();
  44 + } else {
  45 + const res = await postOrderErpOrderStagesCheckOrderStages({
  46 + data: {
  47 + ids: id,
  48 + isPass: false,
  49 + mark: form.getFieldValue('mark'),
  50 + },
  51 + });
  52 + await waitTime(2000);
  53 + if (res.message === '成功') {
  54 + message.success('操作成功');
  55 + }
  56 + toReload();
  57 + }
  58 + return;
  59 + }}
  60 + >
  61 + 驳回
  62 + </Button>,
  63 + );
  64 + myDoms.push(defaultDoms[1]);
  65 + return myDoms;
  66 + },
  67 + }}
  68 + onFinish={async (values) => {
  69 + if (id?.length === 0) {
  70 + message.error('没有可审核的订单');
  71 + return true;
  72 + } else {
  73 + const res = await postOrderErpOrderStagesCheckOrderStages({
  74 + data: {
  75 + ids: id,
  76 + isPass: true,
  77 + mark: values.mark,
  78 + },
  79 + });
  80 + await waitTime(2000);
  81 + if (res.message === '成功') {
  82 + message.success('操作成功');
  83 + }
  84 + toReload();
  85 + return true;
  86 + }
  87 + }}
  88 + >
  89 + <ProFormTextArea
  90 + width="lg"
  91 + name="mark"
  92 + label="备注"
  93 + tooltip="请特别注意订单总金额与订单金额。"
  94 + placeholder="请输入名称"
  95 + />
  96 + </ModalForm>
  97 + </Space>
  98 + );
  99 +};
... ...
src/pages/Instalment/components/checkModal/checkModal.tsx
... ... @@ -36,7 +36,7 @@ export default ({ id, toReload }) =&gt; {
36 36 onClick={async () => {
37 37 const res = await postOrderErpOrderStagesCheckOrderStages({
38 38 data: {
39   - id: id,
  39 + ids: id,
40 40 isPass: false,
41 41 mark: form.getFieldValue('mark'),
42 42 },
... ... @@ -59,7 +59,7 @@ export default ({ id, toReload }) =&gt; {
59 59 onFinish={async (values) => {
60 60 const res = await postOrderErpOrderStagesCheckOrderStages({
61 61 data: {
62   - id: id,
  62 + ids: id,
63 63 isPass: true,
64 64 mark: values.mark,
65 65 },
... ...
src/pages/Instalment/components/detail/detail.tsx
... ... @@ -186,7 +186,6 @@ export default ({ toReload }) =&gt; {
186 186 }}
187 187 submitTimeout={2000}
188 188 onFinish={async (values) => {
189   - console.log(values);
190 189 if (editProductBody.length === 0) {
191 190 message.error('请填写产品数据');
192 191 return false;
... ... @@ -268,11 +267,9 @@ export default ({ toReload }) =&gt; {
268 267 let returnOssID = await postOrderErpOrderStagesSearch({
269 268 data: { contract: values.contract || contextBody.contract },
270 269 });
271   - console.log(returnOssID.data);
272   -
273 270 if (returnOssID) {
274 271 makeEnd = remakeValue.map((item) => {
275   - return { ...item, ossId: returnOssID.data[0].id };
  272 + return { ...item, ossId: returnOssID.data.data[0].id };
276 273 });
277 274 }
278 275 };
... ...
src/pages/Instalment/components/edit/edit.tsx
... ... @@ -74,7 +74,7 @@ export default ({ currentContract, toReload, showTarget }) =&gt; {
74 74 const res = await postOrderErpOrderStagesSearch({
75 75 data: { contract: currentContract },
76 76 });
77   - const context = res.data[0];
  77 + const context = res.data.data[0];
78 78  
79 79 if (context?.contract !== null) {
80 80 setContextBody(context);
... ... @@ -84,7 +84,6 @@ export default ({ currentContract, toReload, showTarget }) =&gt; {
84 84 }
85 85  
86 86 function setSave(value) {
87   - console.log(value);
88 87 setOtherBody(value);
89 88 }
90 89  
... ... @@ -143,8 +142,7 @@ export default ({ currentContract, toReload, showTarget }) =&gt; {
143 142 const res = await postOrderErpOrderStagesSearch({
144 143 data: { contract: value },
145 144 });
146   - const context = res.data[0];
147   - console.log(context);
  145 + const context = res.data.data[0];
148 146 if (context?.contract !== null) {
149 147 setContextBody(context);
150 148 setTotal(context?.totalPrice);
... ... @@ -155,7 +153,7 @@ export default ({ currentContract, toReload, showTarget }) =&gt; {
155 153 const res = await postOrderErpOrderStagesSearch({
156 154 data: { contract: currentContract },
157 155 });
158   - const context = res.data[0];
  156 + const context = res.data.data[0];
159 157 if (context?.contract !== null) {
160 158 setContextBody(context);
161 159 setTotal(context?.totalPrice);
... ... @@ -194,7 +192,6 @@ export default ({ currentContract, toReload, showTarget }) =&gt; {
194 192 }
195 193 let remakeValue = [];
196 194 const promises = [];
197   - console.log(otherBody);
198 195 otherBody.forEach((item) => {
199 196 let remakeItem = {
200 197 ossId: contextBody.id,
... ... @@ -262,7 +259,6 @@ export default ({ currentContract, toReload, showTarget }) =&gt; {
262 259 data: { ...toSendEdit },
263 260 });
264 261 if (isSaveOrUpdate.message === '成功') {
265   - console.log('2');
266 262 getBody(toSendEdit.contract);
267 263 toReload();
268 264 }
... ...
src/pages/Instalment/components/payWayDetail/payWayDetail.tsx
... ... @@ -114,7 +114,6 @@ export default ({ payBody, thisId, currtSave }) =&gt; {
114 114 });
115 115 return currt;
116 116 });
117   - // console.log(remake);
118 117 setPayWayDetailBody(remake);
119 118 setIsRetrun(true);
120 119 }
... ... @@ -147,10 +146,8 @@ export default ({ payBody, thisId, currtSave }) =&gt; {
147 146 payPrice: value[obj.id - 1]?.payPrice,
148 147 };
149 148 });
150   - // console.log(remakeData);
151 149  
152 150 setPayWayDetailBody(remakeData);
153   - // console.log(thisId);
154 151  
155 152 if (thisId !== null) {
156 153 getOther(thisId, remakeData);
... ... @@ -162,7 +159,6 @@ export default ({ payBody, thisId, currtSave }) =&gt; {
162 159 }, [payBody]);
163 160  
164 161 // function setCurrtSave(value) {
165   - // // console.log(value);
166 162 // setIsCurrtSave(payWayDetailBody)
167 163 // }
168 164  
... ... @@ -201,7 +197,6 @@ export default ({ payBody, thisId, currtSave }) =&gt; {
201 197 render: (text, record) => {
202 198 const handleChange = (value) => {
203 199 const updatedDataSource = payWayDetailBody.map((item) => {
204   - console.log(value);
205 200 if (item.id === record.id) {
206 201 return {
207 202 ...item,
... ... @@ -210,7 +205,6 @@ export default ({ payBody, thisId, currtSave }) =&gt; {
210 205 }
211 206 return item;
212 207 });
213   - // console.log(updatedDataSource);
214 208  
215 209 setPayWayDetailBody(updatedDataSource);
216 210 currtSave(updatedDataSource);
... ... @@ -302,7 +296,6 @@ export default ({ payBody, thisId, currtSave }) =&gt; {
302 296 type: 'multiple',
303 297 editableKeys,
304 298 onSave: async () => {
305   - // console.log(rowKey, data, row);
306 299 await waitTime(2000);
307 300 },
308 301 onChange: setEditableRowKeys,
... ...
src/pages/Instalment/components/productDetail/productDetail.tsx
... ... @@ -35,9 +35,6 @@ export default ({ productBody, EditProductBody }) =&gt; {
35 35 }
36 36 }
37 37 function setEditProductBody(value) {
38   - // console.log(value);
39   - // console.log(dataSource);
40   -
41 38 const modifiedArray = value.map((obj) => {
42 39 if (obj.dId && Number(obj.dId) <= 1000) {
43 40 return {
... ... @@ -53,7 +50,6 @@ export default ({ productBody, EditProductBody }) =&gt; {
53 50 return { ...obj, price: Number(obj.unitPrice) * Number(obj.count) };
54 51 }
55 52 });
56   - // console.log(modifiedArray);
57 53  
58 54 EditProductBody(modifiedArray);
59 55 setDataSource(value);
... ...
src/pages/Instalment/components/read/read.tsx
... ... @@ -75,18 +75,16 @@ export default ({ currentContract }) =&gt; {
75 75 const res = await postOrderErpOrderStagesSearch({
76 76 data: { contract: currentContract },
77 77 });
78   - const context = res.data[0];
79   - // console.log(context);
  78 + const context = res?.data?.data[0];
80 79  
81   - if (context.contract !== null) {
  80 + if (context?.contract !== null) {
82 81 setContextBody(context);
83   - setTotal(context.totalPrice);
84   - form.setFieldValue('totalPrice', context.totalPrice);
  82 + setTotal(context?.totalPrice);
  83 + form.setFieldValue('totalPrice', context?.totalPrice);
85 84 }
86 85 }
87 86  
88 87 function setSave(value) {
89   - // console.log(value);
90 88 setOtherBody(value);
91 89 }
92 90  
... ... @@ -140,15 +138,14 @@ export default ({ currentContract }) =&gt; {
140 138 const res = await postOrderErpOrderStagesSearch({
141 139 data: { contract: currentContract },
142 140 });
143   - const context = res.data[0];
144   - // console.log(context);
  141 + const context = res.data.data[0];
145 142  
146   - if (context.contract !== null) {
  143 + if (context?.contract !== null) {
147 144 setContextBody(context);
148   - setTotal(context.totalPrice);
149   - form.setFieldValue('totalPrice', context.totalPrice);
  145 + setTotal(context?.totalPrice);
  146 + form.setFieldValue('totalPrice', context?.totalPrice);
150 147 }
151   - handleInputChange(context.payWay, 0, context.totalPrice);
  148 + handleInputChange(context?.payWay, 0, context?.totalPrice);
152 149 }
153 150  
154 151 useEffect(() => {
... ... @@ -156,8 +153,6 @@ export default ({ currentContract }) =&gt; {
156 153 }, []);
157 154  
158 155 function getEditProductBody(value) {
159   - // console.log(value);
160   -
161 156 setEditProductBody(value);
162 157 let price = 0;
163 158 value.map((obj) => (price += obj.count * obj.unitPrice));
... ... @@ -174,7 +169,6 @@ export default ({ currentContract }) =&gt; {
174 169 autoFocusFirstInput
175 170 modalProps={{
176 171 destroyOnClose: true,
177   - // onCancel: () => console.log('run'),
178 172 }}
179 173 submitter={{
180 174 resetButtonProps: {},
... ... @@ -186,8 +180,6 @@ export default ({ currentContract }) =&gt; {
186 180 }}
187 181 submitTimeout={2000}
188 182 onFinish={async (values) => {
189   - // console.log(values);
190   - // console.log(otherBody);
191 183 let remakeValue = [];
192 184 // 创建一个用于存储所有异步操作的Promise数组
193 185 const promises = [];
... ... @@ -254,8 +246,6 @@ export default ({ currentContract }) =&gt; {
254 246 },
255 247 });
256 248 if (res.data) {
257   - // console.log(values)
258   - // console.log(contextBody);
259 249 toSendEdit.annex = res.data;
260 250 }
261 251 }
... ... @@ -263,7 +253,6 @@ export default ({ currentContract }) =&gt; {
263 253 data: { ...toSendEdit },
264 254 });
265 255 if (isSaveOrUpdate) {
266   - // console.log(isSaveOrUpdate);
267 256 getBody();
268 257 }
269 258 await waitTime(2000);
... ... @@ -278,7 +267,7 @@ export default ({ currentContract }) =&gt; {
278 267 name="vendor"
279 268 label="供应商名称"
280 269 placeholder="请输入"
281   - initialValue={contextBody.vendor}
  270 + initialValue={contextBody?.vendor}
282 271 readonly
283 272 />
284 273  
... ... @@ -287,7 +276,7 @@ export default ({ currentContract }) =&gt; {
287 276 name="terminal"
288 277 label="终端名称"
289 278 placeholder="请输入"
290   - initialValue={contextBody.terminal}
  279 + initialValue={contextBody?.terminal}
291 280 readonly
292 281 />
293 282  
... ... @@ -299,7 +288,7 @@ export default ({ currentContract }) =&gt; {
299 288 fieldProps={{
300 289 format: (value) => value.format('YYYY-MM-DD'),
301 290 }}
302   - initialValue={contextBody.dateRange}
  291 + initialValue={contextBody?.dateRange}
303 292 readonly
304 293 />
305 294  
... ... @@ -308,7 +297,7 @@ export default ({ currentContract }) =&gt; {
308 297 name="payWay"
309 298 label="付款比例"
310 299 placeholder="请输入"
311   - initialValue={contextBody.payWay}
  300 + initialValue={contextBody?.payWay}
312 301 readonly
313 302 onBlur={(e) => {
314 303 handleInputChange(e.target.value, 1);
... ... @@ -320,7 +309,7 @@ export default ({ currentContract }) =&gt; {
320 309 name="contract"
321 310 label="合同编号"
322 311 placeholder="请输入"
323   - initialValue={contextBody.contract}
  312 + initialValue={contextBody?.contract}
324 313 readonly
325 314 />
326 315  
... ... @@ -342,7 +331,7 @@ export default ({ currentContract }) =&gt; {
342 331 readonly
343 332 // rules={[{ required: true, message: '此项为必填项' }]}
344 333 // value={contextBody.totalPrice}
345   - initialValue={contextBody.totalPrice}
  334 + initialValue={contextBody?.totalPrice}
346 335 />
347 336 </ProForm.Group>
348 337 </ProCard>
... ... @@ -353,7 +342,7 @@ export default ({ currentContract }) =&gt; {
353 342 bordered
354 343 >
355 344 <ProductDetail
356   - productBody={contextBody.orderStagesDeviceVoList}
  345 + productBody={contextBody?.orderStagesDeviceVoList}
357 346 EditProductBody={getEditProductBody}
358 347 ></ProductDetail>
359 348 </ProCard>
... ... @@ -366,7 +355,7 @@ export default ({ currentContract }) =&gt; {
366 355 >
367 356 <PayWayDetail
368 357 payBody={payWayBody}
369   - thisId={contextBody.id}
  358 + thisId={contextBody?.id}
370 359 currtSave={setSave}
371 360 ></PayWayDetail>
372 361 </ProCard>
... ... @@ -375,7 +364,7 @@ export default ({ currentContract }) =&gt; {
375 364 <ProFormTextArea
376 365 label="备注"
377 366 name="remark"
378   - initialValue={contextBody.remark}
  367 + initialValue={contextBody?.remark}
379 368 readonly
380 369 />
381 370 </ProCard>
... ...
src/pages/Instalment/components/title/title.tsx
... ... @@ -341,7 +341,6 @@ export default () =&gt; {
341 341 actionRef={ref}
342 342 scroll={{ x: 1400, y: 360 }}
343 343 request={async (params) => {
344   - // console.log(params);
345 344 if (
346 345 params.id !== null ||
347 346 params.contract !== null ||
... ... @@ -350,9 +349,6 @@ export default () =&gt; {
350 349 params.deviceName !== null ||
351 350 params.dateRange !== null
352 351 ) {
353   - // console.log(params.id);
354   - // console.log(params.contract);
355   - // console.log(params.vendor);
356 352 let PostOrderErpOrderStagesSearchOption = {
357 353 id: params.id,
358 354 contract: params.contract,
... ... @@ -580,7 +576,6 @@ export default () =&gt; {
580 576 option: { fixed: 'right', disable: true },
581 577 },
582 578 // onChange(value) {
583   - // console.log('value: ', value);
584 579 // },
585 580 }}
586 581 rowKey="dId"
... ... @@ -605,7 +600,6 @@ export default () =&gt; {
605 600 }}
606 601 pagination={{
607 602 pageSize: 10,
608   - // onChange: (page) => console.log(page),
609 603 }}
610 604 dateFormatter="string"
611 605 headerTitle={[]}
... ...
src/pages/Instalment/components/title/titletest.tsx
... ... @@ -7,8 +7,9 @@ import { orderExport } from &#39;@/services/order&#39;;
7 7 import { VerticalAlignTopOutlined } from '@ant-design/icons';
8 8 import type { ProColumns } from '@ant-design/pro-components';
9 9 import { EditableProTable } from '@ant-design/pro-components';
10   -import { Button, Tag, message } from 'antd';
11   -import { useRef } from 'react';
  10 +import { Button, Space, Table, Tag, message } from 'antd';
  11 +import { Key, useRef, useState } from 'react';
  12 +import TableCheckModal from '../checkModal/TableCheckModal';
12 13 import CheckModal from '../checkModal/checkModal';
13 14 import Comfire from '../comfire/comfire';
14 15 import AddModel from '../detail/detail';
... ... @@ -146,6 +147,7 @@ export default () =&gt; {
146 147 startEditable: (rowKey: Key) => boolean;
147 148 cancelEditable: (rowKey: Key) => boolean;
148 149 }
  150 + const [specialPath, setSpecialPath] = useState<string[]>([]);
149 151  
150 152 const ref = useRef<ActionType>({
151 153 reload: () => {
... ... @@ -172,8 +174,8 @@ export default () =&gt; {
172 174 async function toDelete(value) {
173 175 const res = await deleteOrderErpOrderStagesDelect({
174 176 data: {
175   - ids: null,
176   - deviceIds: value,
  177 + ids: value,
  178 + deviceIds: null,
177 179 },
178 180 });
179 181 if (res) {
... ... @@ -423,7 +425,7 @@ export default () =&gt; {
423 425 <>
424 426 {hasCheckPermission && (
425 427 <>
426   - <CheckModal id={record.id} toReload={reload}></CheckModal>
  428 + <CheckModal id={[record.id]} toReload={reload}></CheckModal>
427 429 &nbsp;
428 430 </>
429 431 )}
... ... @@ -456,10 +458,7 @@ export default () =&gt; {
456 458 )}
457 459 {hasDeletePermission && (
458 460 <>
459   - <Comfire
460   - currtDid={record.dId}
461   - sureDelete={toDelete}
462   - ></Comfire>
  461 + <Comfire currtDid={record.id} sureDelete={toDelete}></Comfire>
463 462 </>
464 463 )}
465 464 </>
... ... @@ -476,9 +475,15 @@ export default () =&gt; {
476 475 className="title-index"
477 476 columnEmptyText=""
478 477 columns={columns}
  478 + rowSelection={{
  479 + // 自定义选择项参考: https://ant.design/components/table-cn/#components-table-demo-row-selection-custom
  480 + // 注释该行则默认不显示下拉选项
  481 + selections: [Table.SELECTION_ALL, Table.SELECTION_INVERT],
  482 + defaultSelectedRowKeys: [],
  483 + }}
479 484 cardBordered
480 485 actionRef={ref}
481   - scroll={{ x: 1400, y: 360 }}
  486 + scroll={{ x: 1400 }}
482 487 recordCreatorProps={false}
483 488 request={async (params) => {
484 489 if (params.id === '') {
... ... @@ -509,7 +514,9 @@ export default () =&gt; {
509 514 params.terminal !== null ||
510 515 params.deviceName !== null ||
511 516 params.dateRange !== null ||
512   - params.status !== null
  517 + params.status !== null ||
  518 + params.current !== null ||
  519 + params.pageSize !== null
513 520 ) {
514 521 let PostOrderErpOrderStagesSearchOption = {
515 522 id: params.id,
... ... @@ -519,13 +526,17 @@ export default () =&gt; {
519 526 deviceName: params.deviceName,
520 527 dateRange: params.dateRange,
521 528 statusText: params.status,
  529 + current: params.current,
  530 + pageSize: params.pageSize,
522 531 };
523 532 let res = await postOrderErpOrderStagesSearch({
524 533 data: { ...PostOrderErpOrderStagesSearchOption },
525 534 });
526 535 await waitTime(2000);
527 536 if (res) {
528   - const orderStagesWithList: OrderStagesWithListItem[] = res?.data;
  537 + const orderStagesWithList: OrderStagesWithListItem[] =
  538 + res?.data.data;
  539 + setSpecialPath(res.data.specialPath);
529 540 let orderStagesList: OrderStagesItem[] = [];
530 541 for (let ind = 0; ind < orderStagesWithList.length; ind++) {
531 542 for (
... ... @@ -661,6 +672,7 @@ export default () =&gt; {
661 672 }
662 673 return {
663 674 data: orderStagesList || [],
  675 + total: res?.data?.total || 0,
664 676 };
665 677 }
666 678 } else {
... ... @@ -839,10 +851,48 @@ export default () =&gt; {
839 851 }}
840 852 pagination={{
841 853 pageSize: 10,
842   - // onChange: (page) => console.log(page),
843 854 }}
844 855 dateFormatter="string"
845 856 headerTitle={[]}
  857 + tableAlertOptionRender={({ selectedRows, onCleanSelected }) => {
  858 + return (
  859 + <Space size={16}>
  860 + <TableCheckModal
  861 + id={selectedRows
  862 + .filter(
  863 + (item) =>
  864 + item.status === 'SAVE_CHECK' ||
  865 + item.status === 'UPDATE_CHECK' ||
  866 + item.status === 'IMPORT_CHECK',
  867 + )
  868 + .map((item) => item.id)}
  869 + toReload={reload}
  870 + isShow={!specialPath?.includes('BatchModeration')}
  871 + />
  872 + <Button
  873 + title="确认删除所选中的分期账单吗?"
  874 + type="primary"
  875 + disabled={!specialPath?.includes('BatchDelete')}
  876 + onClick={() => {
  877 + let ids = selectedRows.map((item: any) => {
  878 + return item.id;
  879 + });
  880 + toDelete(ids);
  881 + onCleanSelected();
  882 + }}
  883 + >
  884 + 批量删除
  885 + </Button>
  886 + <Button
  887 + type="primary"
  888 + onClick={onCleanSelected}
  889 + disabled={!specialPath?.includes('UnSelect')}
  890 + >
  891 + 取消选中
  892 + </Button>
  893 + </Space>
  894 + );
  895 + }}
846 896 toolBarRender={() => [
847 897 <>
848 898 <AddModel toReload={reload}></AddModel>
... ...
src/pages/Instalment/components/upload/payWayUpload.tsx
... ... @@ -8,7 +8,6 @@ import React, { useEffect } from &#39;react&#39;;
8 8 const App: React.FC = ({ natureModel, setCurryFile }) => {
9 9 const [fileList, setFileList] = React.useState([{}]);
10 10 useEffect(() => {
11   - console.log(natureModel);
12 11 if (natureModel.fileUrl !== undefined && natureModel.fileUrl !== null) {
13 12 setFileList([{ name: natureModel.fileName, url: natureModel.fileUrl }]);
14 13 }
... ... @@ -27,7 +26,6 @@ const App: React.FC = ({ natureModel, setCurryFile }) =&gt; {
27 26 ) {
28 27 (async () => {
29 28 if (!(value.fileList[0].originFileObj instanceof File)) {
30   - console.log('is not file');
31 29 return false;
32 30 } else {
33 31 const formData = new FormData();
... ... @@ -40,12 +38,6 @@ const App: React.FC = ({ natureModel, setCurryFile }) =&gt; {
40 38 });
41 39 if (res) {
42 40 message.success('提交成功');
43   - console.log({
44   - uid: value.fileList[0].originFileObj.uid,
45   - name: value.fileList[0].originFileObj.name,
46   - url: res.data,
47   - });
48   - console.log(natureModel.id);
49 41  
50 42 setCurryFile({
51 43 id: natureModel.id,
... ...