Commit 15b4d1c2a06bb96cc301c9fb8c6c475619df48aa
1 parent
d35a137b
feat: update
Showing
6 changed files
with
409 additions
and
90 deletions
src/pages/Order/components/AfterSalesDrawer.tsx
@@ -10,8 +10,6 @@ import { | @@ -10,8 +10,6 @@ import { | ||
10 | import { Form, message } from 'antd'; | 10 | import { Form, message } from 'antd'; |
11 | import { AFTE_SALES_PLAN_OPTIONS } from '../constant'; | 11 | import { AFTE_SALES_PLAN_OPTIONS } from '../constant'; |
12 | export default ({ setVisible, mainOrder, subOrders, onClose }) => { | 12 | export default ({ setVisible, mainOrder, subOrders, onClose }) => { |
13 | - console.log(subOrders); | ||
14 | - console.log(mainOrder); | ||
15 | let subOrderIds = subOrders?.map((item: { id: any }) => { | 13 | let subOrderIds = subOrders?.map((item: { id: any }) => { |
16 | return item.id; | 14 | return item.id; |
17 | }); | 15 | }); |
@@ -73,6 +71,7 @@ export default ({ setVisible, mainOrder, subOrders, onClose }) => { | @@ -73,6 +71,7 @@ export default ({ setVisible, mainOrder, subOrders, onClose }) => { | ||
73 | name="totalPayment" | 71 | name="totalPayment" |
74 | label="总金额调整" | 72 | label="总金额调整" |
75 | min={0} | 73 | min={0} |
74 | + initialValue={mainOrder.totalPayment} | ||
76 | rules={[{ required: true, message: '总金额必填' }]} | 75 | rules={[{ required: true, message: '总金额必填' }]} |
77 | /> | 76 | /> |
78 | <ProFormTextArea | 77 | <ProFormTextArea |
src/pages/Order/components/FinancialDrawer.tsx
@@ -140,6 +140,17 @@ export default ({ | @@ -140,6 +140,17 @@ export default ({ | ||
140 | ] | 140 | ] |
141 | : ''} | 141 | : ''} |
142 | 142 | ||
143 | + {/* <ProFormSelect | ||
144 | + placeholder="是否完全开票" | ||
145 | + name="invoicingType" | ||
146 | + width="lg" | ||
147 | + label="是否完全开票" | ||
148 | + options={[{label:'部分开票',value:'部分开票'},{label:'完全开票',value:'完全开票'}]} | ||
149 | + onChange={setInvoicingStatus} | ||
150 | + initialValue={'完全开票'} | ||
151 | + // disabled={mainInfoDisbled} | ||
152 | + rules={[{ required: true, message: '是否需要开票必填' }]} | ||
153 | + /> */} | ||
143 | <ProFormTextArea | 154 | <ProFormTextArea |
144 | width="lg" | 155 | width="lg" |
145 | name="invoicingNotes" | 156 | name="invoicingNotes" |
src/pages/Order/components/HistoryModal.tsx
@@ -8,10 +8,11 @@ import { | @@ -8,10 +8,11 @@ import { | ||
8 | ORDER_STATUS_OPTIONS, | 8 | ORDER_STATUS_OPTIONS, |
9 | } from '../constant'; | 9 | } from '../constant'; |
10 | 10 | ||
11 | -export default ({ subOrders, onClose }) => { | 11 | +export default ({ subOrders, isCancelledOrder, onClose }) => { |
12 | let subOrderIds = subOrders?.map((subOrder: any) => { | 12 | let subOrderIds = subOrders?.map((subOrder: any) => { |
13 | return subOrder.id; | 13 | return subOrder.id; |
14 | }); | 14 | }); |
15 | + | ||
15 | const [data, setData] = useState([]); | 16 | const [data, setData] = useState([]); |
16 | const [loading, setLoading] = useState(true); | 17 | const [loading, setLoading] = useState(true); |
17 | let i = 0; | 18 | let i = 0; |
@@ -22,7 +23,7 @@ export default ({ subOrders, onClose }) => { | @@ -22,7 +23,7 @@ export default ({ subOrders, onClose }) => { | ||
22 | 23 | ||
23 | const getHistory = async () => { | 24 | const getHistory = async () => { |
24 | let res = await postServiceOrderQueryHistoryOrderRecord({ | 25 | let res = await postServiceOrderQueryHistoryOrderRecord({ |
25 | - data: { ids: subOrderIds }, | 26 | + data: { ids: subOrderIds, isDeleteQueryOrder: isCancelledOrder }, |
26 | }); | 27 | }); |
27 | setData(res.data); | 28 | setData(res.data); |
28 | setLoading(false); | 29 | setLoading(false); |
src/pages/Order/constant.ts
@@ -102,15 +102,16 @@ export const ORDER_STATUS_OPTIONS = { | @@ -102,15 +102,16 @@ export const ORDER_STATUS_OPTIONS = { | ||
102 | AUDITED: '已审核', | 102 | AUDITED: '已审核', |
103 | PROCURE_UN_PROCESS: '采购未审核', | 103 | PROCURE_UN_PROCESS: '采购未审核', |
104 | PROCURE_PROCESS: '采购已审核', | 104 | PROCURE_PROCESS: '采购已审核', |
105 | - PROCURE_PROCESS_FOR_MINE: '采购待发货', | 105 | + PROCURE_PROCESS_FOR_MINE: '采购待打印', |
106 | + PROCURE_WAIT_SHIP: '采购待发货', | ||
106 | SUPPLIER_WAIT_SHIP: '供应商待发货', | 107 | SUPPLIER_WAIT_SHIP: '供应商待发货', |
107 | - SUPPLIER_SHIPPED: '供应商已发货', | ||
108 | WAIT_SHIP: '待发货', | 108 | WAIT_SHIP: '待发货', |
109 | SHIPPED: '已发货', | 109 | SHIPPED: '已发货', |
110 | CONFIRM_RECEIPT: '确认收货', | 110 | CONFIRM_RECEIPT: '确认收货', |
111 | AUDIT_FAILED: '审核失败', | 111 | AUDIT_FAILED: '审核失败', |
112 | IN_AFTER_SALES: '售后中', | 112 | IN_AFTER_SALES: '售后中', |
113 | AFTER_SALES_COMPLETION: '售后完成', | 113 | AFTER_SALES_COMPLETION: '售后完成', |
114 | + NO_NEED_SEND: '无需发货', | ||
114 | }; | 115 | }; |
115 | 116 | ||
116 | export const AFTE_SALES_PLAN_OPTIONS = { | 117 | export const AFTE_SALES_PLAN_OPTIONS = { |
@@ -145,6 +146,8 @@ export const TAGS_COLOR = new Map<string, string>([ | @@ -145,6 +146,8 @@ export const TAGS_COLOR = new Map<string, string>([ | ||
145 | ['IN_AFTER_SALES', 'red'], | 146 | ['IN_AFTER_SALES', 'red'], |
146 | ['AFTER_SALES_COMPLETION', 'red'], | 147 | ['AFTER_SALES_COMPLETION', 'red'], |
147 | ['PROCURE_PROCESS_FOR_MINE', 'processing'], | 148 | ['PROCURE_PROCESS_FOR_MINE', 'processing'], |
149 | + ['PROCURE_WAIT_SHIP', 'processing'], | ||
150 | + ['NO_NEED_SEND', 'success'], | ||
148 | ]); | 151 | ]); |
149 | 152 | ||
150 | export const SALES_CODE_OPTIONS = [ | 153 | export const SALES_CODE_OPTIONS = [ |
@@ -225,7 +228,7 @@ export const MAIN_ORDER_COLUMNS = [ | @@ -225,7 +228,7 @@ export const MAIN_ORDER_COLUMNS = [ | ||
225 | { | 228 | { |
226 | title: '订单编号', | 229 | title: '订单编号', |
227 | dataIndex: 'id', | 230 | dataIndex: 'id', |
228 | - valueType: 'digit', | 231 | + valueType: 'text', |
229 | hideInTable: true, | 232 | hideInTable: true, |
230 | }, | 233 | }, |
231 | { | 234 | { |
@@ -271,6 +274,18 @@ export const MAIN_ORDER_COLUMNS = [ | @@ -271,6 +274,18 @@ export const MAIN_ORDER_COLUMNS = [ | ||
271 | hideInTable: true, | 274 | hideInTable: true, |
272 | }, | 275 | }, |
273 | { | 276 | { |
277 | + title: '主订单备注', | ||
278 | + dataIndex: 'mainNotes', | ||
279 | + valueType: 'text', | ||
280 | + hideInTable: true, | ||
281 | + }, | ||
282 | + { | ||
283 | + title: '子订单备注', | ||
284 | + dataIndex: 'subNotes', | ||
285 | + valueType: 'text', | ||
286 | + hideInTable: true, | ||
287 | + }, | ||
288 | + { | ||
274 | title: '商品参数', | 289 | title: '商品参数', |
275 | dataIndex: 'parameters', | 290 | dataIndex: 'parameters', |
276 | valueType: 'text', | 291 | valueType: 'text', |
src/pages/Order/index.tsx
@@ -2,6 +2,7 @@ import ButtonConfirm from '@/components/ButtomConfirm'; | @@ -2,6 +2,7 @@ import ButtonConfirm from '@/components/ButtomConfirm'; | ||
2 | import { RESPONSE_CODE } from '@/constants/enum'; | 2 | import { RESPONSE_CODE } from '@/constants/enum'; |
3 | import { | 3 | import { |
4 | postServiceOrderAfterSalesCompletion, | 4 | postServiceOrderAfterSalesCompletion, |
5 | + postServiceOrderNoNeedSend, | ||
5 | postServiceOrderOrderCancel, | 6 | postServiceOrderOrderCancel, |
6 | postServiceOrderQueryServiceOrder, | 7 | postServiceOrderQueryServiceOrder, |
7 | } from '@/services'; | 8 | } from '@/services'; |
@@ -15,6 +16,7 @@ import { | @@ -15,6 +16,7 @@ import { | ||
15 | DownOutlined, | 16 | DownOutlined, |
16 | EditTwoTone, | 17 | EditTwoTone, |
17 | EllipsisOutlined, | 18 | EllipsisOutlined, |
19 | + QuestionCircleOutlined, | ||
18 | } from '@ant-design/icons'; | 20 | } from '@ant-design/icons'; |
19 | import { | 21 | import { |
20 | PageContainer, | 22 | PageContainer, |
@@ -52,6 +54,7 @@ import OrderNotesEditModal from './components/OrderNotesEditModal'; | @@ -52,6 +54,7 @@ import OrderNotesEditModal from './components/OrderNotesEditModal'; | ||
52 | import ProcureCheckModal from './components/ProcureCheckModal'; | 54 | import ProcureCheckModal from './components/ProcureCheckModal'; |
53 | import SubOrderComfirmReceiptImagesModal from './components/SubOrderComfirmReceiptImagesModal'; | 55 | import SubOrderComfirmReceiptImagesModal from './components/SubOrderComfirmReceiptImagesModal'; |
54 | import { | 56 | import { |
57 | + AFTE_SALES_PLAN_OPTIONS, | ||
55 | CHECK_TYPE, | 58 | CHECK_TYPE, |
56 | LOGISTICS_STATUS_OPTIONS, | 59 | LOGISTICS_STATUS_OPTIONS, |
57 | MAIN_ORDER_COLUMNS, | 60 | MAIN_ORDER_COLUMNS, |
@@ -108,7 +111,9 @@ const OrderPage = () => { | @@ -108,7 +111,9 @@ const OrderPage = () => { | ||
108 | const [pageSize, setPageSize] = useState(10); | 111 | const [pageSize, setPageSize] = useState(10); |
109 | const [currentPage, setCurrentPage] = useState(1); | 112 | const [currentPage, setCurrentPage] = useState(1); |
110 | const [orderCheckType, setOrderCheckType] = useState(''); | 113 | const [orderCheckType, setOrderCheckType] = useState(''); |
114 | + const [onlyShowCancelOrder, setOnlyShowCancelOrder] = useState(false); | ||
111 | const mainTableRef = useRef(); | 115 | const mainTableRef = useRef(); |
116 | + let [searchParams, setSearchParam] = useState(Object); //表格的查询条件存储 | ||
112 | const [messageApi, contextHolder] = message.useMessage(); | 117 | const [messageApi, contextHolder] = message.useMessage(); |
113 | 118 | ||
114 | // const openCheckNotes = (checkNotes: string) => { | 119 | // const openCheckNotes = (checkNotes: string) => { |
@@ -143,6 +148,11 @@ const OrderPage = () => { | @@ -143,6 +148,11 @@ const OrderPage = () => { | ||
143 | setSelectedRowKeys([]); | 148 | setSelectedRowKeys([]); |
144 | }; | 149 | }; |
145 | 150 | ||
151 | + function changeCancelOrderShow(e: any) { | ||
152 | + setOnlyShowCancelOrder(e.target.checked); | ||
153 | + refreshTable(); | ||
154 | + } | ||
155 | + | ||
146 | // const resize = () => { | 156 | // const resize = () => { |
147 | // // 计算元素底部到视口顶部的距离 | 157 | // // 计算元素底部到视口顶部的距离 |
148 | // let bottomDistance = document | 158 | // let bottomDistance = document |
@@ -168,6 +178,18 @@ const OrderPage = () => { | @@ -168,6 +178,18 @@ const OrderPage = () => { | ||
168 | // window.addEventListener('resize', resize); | 178 | // window.addEventListener('resize', resize); |
169 | // }); | 179 | // }); |
170 | 180 | ||
181 | + const MyToolTip = ({ title, content }) => { | ||
182 | + return ( | ||
183 | + <Tooltip | ||
184 | + color="#FFFFFF" | ||
185 | + placement="bottom" | ||
186 | + title={<div className="px-5 py-4 text-black">{title}</div>} | ||
187 | + > | ||
188 | + {content} | ||
189 | + </Tooltip> | ||
190 | + ); | ||
191 | + }; | ||
192 | + | ||
171 | const onCheckboxChange = (record: never) => { | 193 | const onCheckboxChange = (record: never) => { |
172 | let newSelectedItems = []; | 194 | let newSelectedItems = []; |
173 | if (selectedItems.includes(record.id)) { | 195 | if (selectedItems.includes(record.id)) { |
@@ -226,6 +248,73 @@ const OrderPage = () => { | @@ -226,6 +248,73 @@ const OrderPage = () => { | ||
226 | }; | 248 | }; |
227 | //子订单内容渲染 | 249 | //子订单内容渲染 |
228 | const SubOderRander = ({ record, optRecord }) => { | 250 | const SubOderRander = ({ record, optRecord }) => { |
251 | + /** | ||
252 | + * 获取订单状态标签 | ||
253 | + * @param optRecord | ||
254 | + */ | ||
255 | + function getOrderStatusTag(optRecord: any): import('react').ReactNode { | ||
256 | + const orderStatus = optRecord.orderStatus; | ||
257 | + if (orderStatus === 'AUDIT_FAILED') { | ||
258 | + return ( | ||
259 | + <MyToolTip | ||
260 | + title={optRecord.checkNotes} | ||
261 | + content={ | ||
262 | + <> | ||
263 | + <Tag | ||
264 | + color={TAGS_COLOR.get(optRecord.orderStatus)} | ||
265 | + style={{ marginRight: '4px' }} | ||
266 | + > | ||
267 | + {enumValueToLabel( | ||
268 | + optRecord.orderStatus, | ||
269 | + ORDER_STATUS_OPTIONS, | ||
270 | + )} | ||
271 | + </Tag> | ||
272 | + <QuestionCircleOutlined style={{ color: '#C1C1C1' }} /> | ||
273 | + </> | ||
274 | + } | ||
275 | + /> | ||
276 | + ); | ||
277 | + } | ||
278 | + | ||
279 | + if ( | ||
280 | + orderStatus === 'AFTER_SALES_COMPLETION' || | ||
281 | + orderStatus === 'IN_AFTER_SALES' | ||
282 | + ) { | ||
283 | + return ( | ||
284 | + <MyToolTip | ||
285 | + title={ | ||
286 | + enumValueToLabel( | ||
287 | + optRecord.afterSalesPlan, | ||
288 | + AFTE_SALES_PLAN_OPTIONS, | ||
289 | + ) + | ||
290 | + ' ' + | ||
291 | + optRecord.afterSalesNotes | ||
292 | + } | ||
293 | + content={ | ||
294 | + <> | ||
295 | + <Tag | ||
296 | + color={TAGS_COLOR.get(optRecord.orderStatus)} | ||
297 | + style={{ marginRight: '4px' }} | ||
298 | + > | ||
299 | + {enumValueToLabel( | ||
300 | + optRecord.orderStatus, | ||
301 | + ORDER_STATUS_OPTIONS, | ||
302 | + )} | ||
303 | + </Tag> | ||
304 | + <QuestionCircleOutlined style={{ color: '#C1C1C1' }} /> | ||
305 | + </> | ||
306 | + } | ||
307 | + /> | ||
308 | + ); | ||
309 | + } | ||
310 | + | ||
311 | + return ( | ||
312 | + <Tag color={TAGS_COLOR.get(optRecord.orderStatus)}> | ||
313 | + {enumValueToLabel(optRecord.orderStatus, ORDER_STATUS_OPTIONS)} | ||
314 | + </Tag> | ||
315 | + ); | ||
316 | + } | ||
317 | + | ||
229 | return ( | 318 | return ( |
230 | <Flex className="w-full border-b-indigo-500"> | 319 | <Flex className="w-full border-b-indigo-500"> |
231 | <Flex vertical className="w-[31%]" gap="small"> | 320 | <Flex vertical className="w-[31%]" gap="small"> |
@@ -260,6 +349,22 @@ const OrderPage = () => { | @@ -260,6 +349,22 @@ const OrderPage = () => { | ||
260 | }} | 349 | }} |
261 | /> | 350 | /> |
262 | </Flex> | 351 | </Flex> |
352 | + | ||
353 | + <Flex title={optRecord.notes}> | ||
354 | + <div className="max-w-[90%] whitespace-no-wrap overflow-hidden overflow-ellipsis"> | ||
355 | + <span className="text-[#8C8C8C]"> | ||
356 | + 开票备注:请将2312210003,2312210002,2312210001订单合并开票 | ||
357 | + </span> | ||
358 | + </div> | ||
359 | + {/* 编辑备注按钮 */} | ||
360 | + <EditTwoTone | ||
361 | + onClick={() => { | ||
362 | + setNotesEditVisible(true); | ||
363 | + setOrderRow(optRecord); | ||
364 | + setIsMainOrder(false); | ||
365 | + }} | ||
366 | + /> | ||
367 | + </Flex> | ||
263 | </Flex> | 368 | </Flex> |
264 | <Flex className="w-[16%]" vertical gap="small"> | 369 | <Flex className="w-[16%]" vertical gap="small"> |
265 | <div | 370 | <div |
@@ -329,6 +434,13 @@ const OrderPage = () => { | @@ -329,6 +434,13 @@ const OrderPage = () => { | ||
329 | {getInvoicingType(optRecord)} | 434 | {getInvoicingType(optRecord)} |
330 | </span> | 435 | </span> |
331 | </div> | 436 | </div> |
437 | + | ||
438 | + {/* 开票状态 */} | ||
439 | + {/* <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | ||
440 | + <span className="text-slate-700"> | ||
441 | + 部分开票 | ||
442 | + </span> | ||
443 | + </div> */} | ||
332 | </Flex> | 444 | </Flex> |
333 | 445 | ||
334 | <Flex className="w-[10%]" vertical gap="small"> | 446 | <Flex className="w-[10%]" vertical gap="small"> |
@@ -347,42 +459,39 @@ const OrderPage = () => { | @@ -347,42 +459,39 @@ const OrderPage = () => { | ||
347 | </div> | 459 | </div> |
348 | {/* 订单状态 */} | 460 | {/* 订单状态 */} |
349 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 461 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> |
350 | - <Tag color={TAGS_COLOR.get(optRecord.orderStatus)}> | ||
351 | - {enumValueToLabel(optRecord.orderStatus, ORDER_STATUS_OPTIONS)} | ||
352 | - </Tag> | 462 | + {getOrderStatusTag(optRecord)} |
353 | </div> | 463 | </div> |
354 | 464 | ||
355 | {/* 物流信息 */} | 465 | {/* 物流信息 */} |
356 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 466 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> |
357 | {optRecord.orderStatus === 'CONFIRM_RECEIPT' || | 467 | {optRecord.orderStatus === 'CONFIRM_RECEIPT' || |
468 | + optRecord.orderStatus === 'AFTER_SALES_COMPLETION' || | ||
469 | + optRecord.orderStatus === 'IN_AFTER_SALES' || | ||
358 | optRecord.orderStatus === 'SHIPPED' ? ( | 470 | optRecord.orderStatus === 'SHIPPED' ? ( |
359 | - <Tooltip | ||
360 | - color="#FFFFFF" | ||
361 | - placement="bottom" | 471 | + <MyToolTip |
362 | title={ | 472 | title={ |
363 | - <div className="px-5 py-4 text-black"> | ||
364 | - {optRecord.serialNumber === undefined | ||
365 | - ? '暂无物流信息' | ||
366 | - : enumValueToLabel( | ||
367 | - optRecord.logisticsMethod, | ||
368 | - LOGISTICS_STATUS_OPTIONS, | ||
369 | - ) + | ||
370 | - ' ' + | ||
371 | - optRecord.serialNumber} | ||
372 | - </div> | 473 | + optRecord.serialNumber === undefined |
474 | + ? '暂无物流信息' | ||
475 | + : enumValueToLabel( | ||
476 | + optRecord.logisticsMethod, | ||
477 | + LOGISTICS_STATUS_OPTIONS, | ||
478 | + ) + | ||
479 | + ' ' + | ||
480 | + optRecord.serialNumber | ||
373 | } | 481 | } |
374 | - > | ||
375 | - <Button type="link" size="small" style={{ padding: 0 }}> | ||
376 | - 物流信息 | ||
377 | - </Button> | ||
378 | - </Tooltip> | 482 | + content={ |
483 | + <Button type="link" size="small" style={{ padding: 0 }}> | ||
484 | + 物流信息 | ||
485 | + </Button> | ||
486 | + } | ||
487 | + /> | ||
379 | ) : ( | 488 | ) : ( |
380 | '' | 489 | '' |
381 | )} | 490 | )} |
382 | </div> | 491 | </div> |
383 | </Flex> | 492 | </Flex> |
384 | <Flex className="w-[18%]" wrap="wrap" gap="small"> | 493 | <Flex className="w-[18%]" wrap="wrap" gap="small"> |
385 | - {optRecord.subPath.includes('sendProduct') ? ( | 494 | + {optRecord.subPath?.includes('sendProduct') ? ( |
386 | <Button | 495 | <Button |
387 | className="p-0" | 496 | className="p-0" |
388 | type="link" | 497 | type="link" |
@@ -394,13 +503,13 @@ const OrderPage = () => { | @@ -394,13 +503,13 @@ const OrderPage = () => { | ||
394 | setOrderCheckType(CHECK_TYPE.NORMAL); | 503 | setOrderCheckType(CHECK_TYPE.NORMAL); |
395 | }} | 504 | }} |
396 | > | 505 | > |
397 | - 发货 | 506 | + 仓库发货 |
398 | </Button> | 507 | </Button> |
399 | ) : ( | 508 | ) : ( |
400 | '' | 509 | '' |
401 | )} | 510 | )} |
402 | 511 | ||
403 | - {optRecord.subPath.includes('supplierSendOrder') ? ( | 512 | + {optRecord.subPath?.includes('supplierSendOrder') ? ( |
404 | <Button | 513 | <Button |
405 | className="p-0" | 514 | className="p-0" |
406 | type="link" | 515 | type="link" |
@@ -418,7 +527,25 @@ const OrderPage = () => { | @@ -418,7 +527,25 @@ const OrderPage = () => { | ||
418 | '' | 527 | '' |
419 | )} | 528 | )} |
420 | 529 | ||
421 | - {optRecord.subPath.includes('queryAnnex') && | 530 | + {optRecord.subPath?.includes('procureSend') ? ( |
531 | + <Button | ||
532 | + className="p-0" | ||
533 | + type="link" | ||
534 | + onClick={() => { | ||
535 | + optRecord.mainOrderId = record.id; | ||
536 | + setSelectedRows([cloneDeep(optRecord)]); //克隆一份数据,避免后续修改污染 | ||
537 | + setDeliverVisible(true); | ||
538 | + setIsSendProduct(true); | ||
539 | + setOrderCheckType(CHECK_TYPE.PROCURE); | ||
540 | + }} | ||
541 | + > | ||
542 | + 采购发货 | ||
543 | + </Button> | ||
544 | + ) : ( | ||
545 | + '' | ||
546 | + )} | ||
547 | + | ||
548 | + {optRecord.subPath?.includes('queryAnnex') && | ||
422 | optRecord.listAnnex?.length > 0 ? ( | 549 | optRecord.listAnnex?.length > 0 ? ( |
423 | <Button | 550 | <Button |
424 | className="p-0" | 551 | className="p-0" |
@@ -435,7 +562,7 @@ const OrderPage = () => { | @@ -435,7 +562,7 @@ const OrderPage = () => { | ||
435 | '' | 562 | '' |
436 | )} | 563 | )} |
437 | 564 | ||
438 | - {optRecord.subPath.includes('modifySendInformation') ? ( | 565 | + {optRecord.subPath?.includes('modifySendInformation') ? ( |
439 | <Button | 566 | <Button |
440 | className="p-0" | 567 | className="p-0" |
441 | type="link" | 568 | type="link" |
@@ -452,7 +579,7 @@ const OrderPage = () => { | @@ -452,7 +579,7 @@ const OrderPage = () => { | ||
452 | '' | 579 | '' |
453 | )} | 580 | )} |
454 | 581 | ||
455 | - {optRecord.subPath.includes('printOrder') ? ( | 582 | + {optRecord.subPath?.includes('printOrder') ? ( |
456 | <Button | 583 | <Button |
457 | className="p-0" | 584 | className="p-0" |
458 | type="link" | 585 | type="link" |
@@ -469,7 +596,7 @@ const OrderPage = () => { | @@ -469,7 +596,7 @@ const OrderPage = () => { | ||
469 | '' | 596 | '' |
470 | )} | 597 | )} |
471 | 598 | ||
472 | - {optRecord.subPath.includes('supplierPrint') ? ( | 599 | + {optRecord.subPath?.includes('supplierPrint') ? ( |
473 | <Button | 600 | <Button |
474 | className="p-0" | 601 | className="p-0" |
475 | type="link" | 602 | type="link" |
@@ -486,7 +613,24 @@ const OrderPage = () => { | @@ -486,7 +613,24 @@ const OrderPage = () => { | ||
486 | '' | 613 | '' |
487 | )} | 614 | )} |
488 | 615 | ||
489 | - {optRecord.subPath.includes('editOrder') ? ( | 616 | + {optRecord.subPath?.includes('procurePrint') ? ( |
617 | + <Button | ||
618 | + className="p-0" | ||
619 | + type="link" | ||
620 | + onClick={async () => { | ||
621 | + setOrderPrintVisible(true); | ||
622 | + setSelectedRows([optRecord]); | ||
623 | + setOrderRow(record); | ||
624 | + setOrderCheckType(CHECK_TYPE.PROCURE); | ||
625 | + }} | ||
626 | + > | ||
627 | + 采购打印 | ||
628 | + </Button> | ||
629 | + ) : ( | ||
630 | + '' | ||
631 | + )} | ||
632 | + | ||
633 | + {optRecord.subPath?.includes('editOrder') ? ( | ||
490 | <Button | 634 | <Button |
491 | className="p-0" | 635 | className="p-0" |
492 | type="link" | 636 | type="link" |
@@ -502,7 +646,7 @@ const OrderPage = () => { | @@ -502,7 +646,7 @@ const OrderPage = () => { | ||
502 | ) : ( | 646 | ) : ( |
503 | '' | 647 | '' |
504 | )} | 648 | )} |
505 | - {optRecord.subPath.includes('invoicing') ? ( | 649 | + {optRecord.subPath?.includes('invoicing') ? ( |
506 | <Button | 650 | <Button |
507 | className="p-0" | 651 | className="p-0" |
508 | type="link" | 652 | type="link" |
@@ -519,7 +663,7 @@ const OrderPage = () => { | @@ -519,7 +663,7 @@ const OrderPage = () => { | ||
519 | ) : ( | 663 | ) : ( |
520 | '' | 664 | '' |
521 | )} | 665 | )} |
522 | - {optRecord.subPath.includes('checkOrder') ? ( | 666 | + {optRecord.subPath?.includes('checkOrder') ? ( |
523 | <Button | 667 | <Button |
524 | className="p-0" | 668 | className="p-0" |
525 | type="link" | 669 | type="link" |
@@ -536,7 +680,7 @@ const OrderPage = () => { | @@ -536,7 +680,7 @@ const OrderPage = () => { | ||
536 | '' | 680 | '' |
537 | )} | 681 | )} |
538 | 682 | ||
539 | - {optRecord.subPath.includes('financeCheckOrder') ? ( | 683 | + {optRecord.subPath?.includes('financeCheckOrder') ? ( |
540 | <Button | 684 | <Button |
541 | className="p-0" | 685 | className="p-0" |
542 | type="link" | 686 | type="link" |
@@ -553,7 +697,7 @@ const OrderPage = () => { | @@ -553,7 +697,7 @@ const OrderPage = () => { | ||
553 | '' | 697 | '' |
554 | )} | 698 | )} |
555 | 699 | ||
556 | - {optRecord.subPath.includes('procureCheckOrder') ? ( | 700 | + {optRecord.subPath?.includes('procureCheckOrder') ? ( |
557 | <Button | 701 | <Button |
558 | className="p-0" | 702 | className="p-0" |
559 | type="link" | 703 | type="link" |
@@ -570,7 +714,7 @@ const OrderPage = () => { | @@ -570,7 +714,7 @@ const OrderPage = () => { | ||
570 | '' | 714 | '' |
571 | )} | 715 | )} |
572 | 716 | ||
573 | - {optRecord.subPath.includes('rePrintOrder') ? ( | 717 | + {optRecord.subPath?.includes('rePrintOrder') ? ( |
574 | <Button | 718 | <Button |
575 | className="p-0" | 719 | className="p-0" |
576 | type="link" | 720 | type="link" |
@@ -587,7 +731,7 @@ const OrderPage = () => { | @@ -587,7 +731,7 @@ const OrderPage = () => { | ||
587 | '' | 731 | '' |
588 | )} | 732 | )} |
589 | 733 | ||
590 | - {optRecord.subPath.includes('confirmReceipt') ? ( | 734 | + {optRecord.subPath?.includes('confirmReceipt') ? ( |
591 | <Button | 735 | <Button |
592 | className="p-0" | 736 | className="p-0" |
593 | type="link" | 737 | type="link" |
@@ -602,7 +746,7 @@ const OrderPage = () => { | @@ -602,7 +746,7 @@ const OrderPage = () => { | ||
602 | '' | 746 | '' |
603 | )} | 747 | )} |
604 | 748 | ||
605 | - {optRecord.subPath.includes('applyAfterSales') ? ( | 749 | + {optRecord.subPath?.includes('applyAfterSales') ? ( |
606 | <Button | 750 | <Button |
607 | className="p-0" | 751 | className="p-0" |
608 | type="link" | 752 | type="link" |
@@ -618,7 +762,7 @@ const OrderPage = () => { | @@ -618,7 +762,7 @@ const OrderPage = () => { | ||
618 | '' | 762 | '' |
619 | )} | 763 | )} |
620 | 764 | ||
621 | - {optRecord.subPath.includes('afterSalesCompletion') ? ( | 765 | + {optRecord.subPath?.includes('afterSalesCompletion') ? ( |
622 | <ButtonConfirm | 766 | <ButtonConfirm |
623 | className="p-0" | 767 | className="p-0" |
624 | title="是否完成售后?" | 768 | title="是否完成售后?" |
@@ -638,7 +782,27 @@ const OrderPage = () => { | @@ -638,7 +782,27 @@ const OrderPage = () => { | ||
638 | '' | 782 | '' |
639 | )} | 783 | )} |
640 | 784 | ||
641 | - {optRecord.subPath.includes('viewImages') ? ( | 785 | + {optRecord.subPath?.includes('noNeedSend') ? ( |
786 | + <ButtonConfirm | ||
787 | + className="p-0" | ||
788 | + title="此订单是否无需发货?" | ||
789 | + text="无需发货" | ||
790 | + onConfirm={async () => { | ||
791 | + let res = await postServiceOrderNoNeedSend({ | ||
792 | + data: { ids: [optRecord.id] }, | ||
793 | + }); | ||
794 | + if (res.result === RESPONSE_CODE.SUCCESS) { | ||
795 | + message.success(res.message); | ||
796 | + refreshTable(); | ||
797 | + return true; | ||
798 | + } | ||
799 | + }} | ||
800 | + /> | ||
801 | + ) : ( | ||
802 | + '' | ||
803 | + )} | ||
804 | + | ||
805 | + {optRecord.subPath?.includes('viewImages') ? ( | ||
642 | <Button | 806 | <Button |
643 | className="p-0" | 807 | className="p-0" |
644 | type="link" | 808 | type="link" |
@@ -653,7 +817,7 @@ const OrderPage = () => { | @@ -653,7 +817,7 @@ const OrderPage = () => { | ||
653 | '' | 817 | '' |
654 | )} | 818 | )} |
655 | 819 | ||
656 | - {optRecord.subPath.includes('orderCancel') ? ( | 820 | + {optRecord.subPath?.includes('orderCancel') ? ( |
657 | <ButtonConfirm | 821 | <ButtonConfirm |
658 | className="p-0" | 822 | className="p-0" |
659 | title="确认作废?" | 823 | title="确认作废?" |
@@ -849,7 +1013,7 @@ const OrderPage = () => { | @@ -849,7 +1013,7 @@ const OrderPage = () => { | ||
849 | <Flex justify="flex-end"> | 1013 | <Flex justify="flex-end"> |
850 | <Space.Compact direction="vertical" align="end"> | 1014 | <Space.Compact direction="vertical" align="end"> |
851 | <Space> | 1015 | <Space> |
852 | - {record.mainPath.includes('sendProduct') ? ( | 1016 | + {record.mainPath?.includes('sendProduct') ? ( |
853 | <Button | 1017 | <Button |
854 | className="p-0" | 1018 | className="p-0" |
855 | type="link" | 1019 | type="link" |
@@ -863,14 +1027,14 @@ const OrderPage = () => { | @@ -863,14 +1027,14 @@ const OrderPage = () => { | ||
863 | setOrderCheckType(CHECK_TYPE.NORMAL); | 1027 | setOrderCheckType(CHECK_TYPE.NORMAL); |
864 | }} | 1028 | }} |
865 | > | 1029 | > |
866 | - 发货 | 1030 | + 仓库发货 |
867 | </Button> | 1031 | </Button> |
868 | ) : ( | 1032 | ) : ( |
869 | '' | 1033 | '' |
870 | )} | 1034 | )} |
871 | 1035 | ||
872 | {/* 供应商发货 */} | 1036 | {/* 供应商发货 */} |
873 | - {record.mainPath.includes('supplierSendOrder') ? ( | 1037 | + {record.mainPath?.includes('supplierSendOrder') ? ( |
874 | <Button | 1038 | <Button |
875 | className="p-0" | 1039 | className="p-0" |
876 | type="link" | 1040 | type="link" |
@@ -890,7 +1054,7 @@ const OrderPage = () => { | @@ -890,7 +1054,7 @@ const OrderPage = () => { | ||
890 | '' | 1054 | '' |
891 | )} | 1055 | )} |
892 | 1056 | ||
893 | - {record.mainPath.includes('procureSend') ? ( | 1057 | + {record.mainPath?.includes('procureSend') ? ( |
894 | <Button | 1058 | <Button |
895 | className="p-0" | 1059 | className="p-0" |
896 | type="link" | 1060 | type="link" |
@@ -910,7 +1074,7 @@ const OrderPage = () => { | @@ -910,7 +1074,7 @@ const OrderPage = () => { | ||
910 | '' | 1074 | '' |
911 | )} | 1075 | )} |
912 | 1076 | ||
913 | - {record.mainPath.includes('printOrder') ? ( | 1077 | + {record.mainPath?.includes('printOrder') ? ( |
914 | <Button | 1078 | <Button |
915 | className="p-0" | 1079 | className="p-0" |
916 | type="link" | 1080 | type="link" |
@@ -930,7 +1094,7 @@ const OrderPage = () => { | @@ -930,7 +1094,7 @@ const OrderPage = () => { | ||
930 | '' | 1094 | '' |
931 | )} | 1095 | )} |
932 | 1096 | ||
933 | - {record.mainPath.includes('supplierPrint') ? ( | 1097 | + {record.mainPath?.includes('supplierPrint') ? ( |
934 | <Button | 1098 | <Button |
935 | className="p-0" | 1099 | className="p-0" |
936 | type="link" | 1100 | type="link" |
@@ -950,7 +1114,7 @@ const OrderPage = () => { | @@ -950,7 +1114,7 @@ const OrderPage = () => { | ||
950 | '' | 1114 | '' |
951 | )} | 1115 | )} |
952 | 1116 | ||
953 | - {record.mainPath.includes('rePrintOrder') ? ( | 1117 | + {record.mainPath?.includes('rePrintOrder') ? ( |
954 | <Button | 1118 | <Button |
955 | className="p-0" | 1119 | className="p-0" |
956 | type="link" | 1120 | type="link" |
@@ -969,7 +1133,7 @@ const OrderPage = () => { | @@ -969,7 +1133,7 @@ const OrderPage = () => { | ||
969 | ) : ( | 1133 | ) : ( |
970 | '' | 1134 | '' |
971 | )} | 1135 | )} |
972 | - {record.mainPath.includes('modifySendInformation') ? ( | 1136 | + {record.mainPath?.includes('modifySendInformation') ? ( |
973 | <Button | 1137 | <Button |
974 | className="p-0" | 1138 | className="p-0" |
975 | type="link" | 1139 | type="link" |
@@ -999,7 +1163,7 @@ const OrderPage = () => { | @@ -999,7 +1163,7 @@ const OrderPage = () => { | ||
999 | ) : ( | 1163 | ) : ( |
1000 | '' | 1164 | '' |
1001 | )} | 1165 | )} |
1002 | - {record.mainPath.includes('invoicing') ? ( | 1166 | + {record.mainPath?.includes('invoicing') ? ( |
1003 | <Button | 1167 | <Button |
1004 | type="link" | 1168 | type="link" |
1005 | className="p-0" | 1169 | className="p-0" |
@@ -1022,7 +1186,7 @@ const OrderPage = () => { | @@ -1022,7 +1186,7 @@ const OrderPage = () => { | ||
1022 | ) : ( | 1186 | ) : ( |
1023 | '' | 1187 | '' |
1024 | )} | 1188 | )} |
1025 | - {record.mainPath.includes('updateOrder') ? ( | 1189 | + {record.mainPath?.includes('updateOrder') ? ( |
1026 | <Button | 1190 | <Button |
1027 | className="p-0" | 1191 | className="p-0" |
1028 | type="link" | 1192 | type="link" |
@@ -1065,7 +1229,7 @@ const OrderPage = () => { | @@ -1065,7 +1229,7 @@ const OrderPage = () => { | ||
1065 | '' | 1229 | '' |
1066 | )} | 1230 | )} |
1067 | 1231 | ||
1068 | - {record.mainPath.includes('checkOrder') ? ( | 1232 | + {record.mainPath?.includes('checkOrder') ? ( |
1069 | <Button | 1233 | <Button |
1070 | className="p-0" | 1234 | className="p-0" |
1071 | type="link" | 1235 | type="link" |
@@ -1096,8 +1260,48 @@ const OrderPage = () => { | @@ -1096,8 +1260,48 @@ const OrderPage = () => { | ||
1096 | '' | 1260 | '' |
1097 | )} | 1261 | )} |
1098 | 1262 | ||
1263 | + {record.mainPath?.includes('noNeedSend') ? ( | ||
1264 | + <ButtonConfirm | ||
1265 | + className="p-0" | ||
1266 | + title="此订单是否无需发货?" | ||
1267 | + text="无需发货" | ||
1268 | + onConfirm={async () => { | ||
1269 | + let selectedSubOrders = selectedRowObj[record.id]; | ||
1270 | + if (selectedSubOrders === undefined) { | ||
1271 | + selectedSubOrders = record.subOrderInformationLists; | ||
1272 | + } | ||
1273 | + setSelectedRows(selectedSubOrders); | ||
1274 | + for (let i = 0; i < selectedSubOrders.length; i++) { | ||
1275 | + if ( | ||
1276 | + selectedSubOrders[i].orderStatus !== | ||
1277 | + 'CONFIRM_RECEIPT' | ||
1278 | + ) { | ||
1279 | + message.error( | ||
1280 | + '请选择未发货的子订单进行无需发货操作', | ||
1281 | + ); | ||
1282 | + return; | ||
1283 | + } | ||
1284 | + } | ||
1285 | + | ||
1286 | + const data = await postServiceOrderNoNeedSend({ | ||
1287 | + data: { | ||
1288 | + ids: selectedSubOrders.map((item) => { | ||
1289 | + return item.id; | ||
1290 | + }), | ||
1291 | + }, | ||
1292 | + }); | ||
1293 | + if (data.result === RESPONSE_CODE.SUCCESS) { | ||
1294 | + message.success(data.message); | ||
1295 | + refreshTable(); | ||
1296 | + } | ||
1297 | + }} | ||
1298 | + /> | ||
1299 | + ) : ( | ||
1300 | + '' | ||
1301 | + )} | ||
1302 | + | ||
1099 | {/* 财务审核:主订单暂无 */} | 1303 | {/* 财务审核:主订单暂无 */} |
1100 | - {record.mainPath.includes('financeCheckOrder') ? ( | 1304 | + {record.mainPath?.includes('financeCheckOrder') ? ( |
1101 | <Button | 1305 | <Button |
1102 | className="p-0" | 1306 | className="p-0" |
1103 | type="link" | 1307 | type="link" |
@@ -1132,7 +1336,7 @@ const OrderPage = () => { | @@ -1132,7 +1336,7 @@ const OrderPage = () => { | ||
1132 | )} | 1336 | )} |
1133 | 1337 | ||
1134 | {/* 采购审核 */} | 1338 | {/* 采购审核 */} |
1135 | - {record.mainPath.includes('procureCheckOrder') ? ( | 1339 | + {record.mainPath?.includes('procureCheckOrder') ? ( |
1136 | <Button | 1340 | <Button |
1137 | className="p-0" | 1341 | className="p-0" |
1138 | type="link" | 1342 | type="link" |
@@ -1165,7 +1369,7 @@ const OrderPage = () => { | @@ -1165,7 +1369,7 @@ const OrderPage = () => { | ||
1165 | '' | 1369 | '' |
1166 | )} | 1370 | )} |
1167 | 1371 | ||
1168 | - {record.mainPath.includes('applyAfterSales') ? ( | 1372 | + {record.mainPath?.includes('applyAfterSales') ? ( |
1169 | <Button | 1373 | <Button |
1170 | className="p-0" | 1374 | className="p-0" |
1171 | type="link" | 1375 | type="link" |
@@ -1194,7 +1398,7 @@ const OrderPage = () => { | @@ -1194,7 +1398,7 @@ const OrderPage = () => { | ||
1194 | '' | 1398 | '' |
1195 | )} | 1399 | )} |
1196 | 1400 | ||
1197 | - {record.mainPath.includes('afterSalesCompletion') ? ( | 1401 | + {record.mainPath?.includes('afterSalesCompletion') ? ( |
1198 | <ButtonConfirm | 1402 | <ButtonConfirm |
1199 | className="p-0" | 1403 | className="p-0" |
1200 | title="售后是否已完成?" | 1404 | title="售后是否已完成?" |
@@ -1238,7 +1442,7 @@ const OrderPage = () => { | @@ -1238,7 +1442,7 @@ const OrderPage = () => { | ||
1238 | '' | 1442 | '' |
1239 | )} | 1443 | )} |
1240 | 1444 | ||
1241 | - {record.mainPath.includes('orderCancel') ? ( | 1445 | + {record.mainPath?.includes('orderCancel') ? ( |
1242 | <ButtonConfirm | 1446 | <ButtonConfirm |
1243 | className="p-0" | 1447 | className="p-0" |
1244 | title="确认作废?" | 1448 | title="确认作废?" |
@@ -1261,7 +1465,7 @@ const OrderPage = () => { | @@ -1261,7 +1465,7 @@ const OrderPage = () => { | ||
1261 | '' | 1465 | '' |
1262 | )} | 1466 | )} |
1263 | 1467 | ||
1264 | - {record.mainPath.includes('procurePrint') ? ( | 1468 | + {record.mainPath?.includes('procurePrint') ? ( |
1265 | <Button | 1469 | <Button |
1266 | className="p-0" | 1470 | className="p-0" |
1267 | type="link" | 1471 | type="link" |
@@ -1312,9 +1516,22 @@ const OrderPage = () => { | @@ -1312,9 +1516,22 @@ const OrderPage = () => { | ||
1312 | function toolBarRender() { | 1516 | function toolBarRender() { |
1313 | let toolBtns = []; | 1517 | let toolBtns = []; |
1314 | 1518 | ||
1519 | + toolBtns.push( | ||
1520 | + <Checkbox onChange={changeCancelOrderShow}>只看作废</Checkbox>, | ||
1521 | + ); | ||
1522 | + | ||
1315 | //导出按钮配置 | 1523 | //导出按钮配置 |
1316 | const items: MenuProps['items'] = [ | 1524 | const items: MenuProps['items'] = [ |
1317 | { | 1525 | { |
1526 | + label: '导出查询结果订单', | ||
1527 | + key: '2', | ||
1528 | + onClick: async () => { | ||
1529 | + let body = { flag: 50, ...searchParams }; | ||
1530 | + exportLoading(); | ||
1531 | + orderExport('/api/service/order/export', body, exportLoadingDestory); | ||
1532 | + }, | ||
1533 | + }, | ||
1534 | + { | ||
1318 | label: '导出已选中订单', | 1535 | label: '导出已选中订单', |
1319 | key: '1', | 1536 | key: '1', |
1320 | onClick: async () => { | 1537 | onClick: async () => { |
@@ -1327,15 +1544,24 @@ const OrderPage = () => { | @@ -1327,15 +1544,24 @@ const OrderPage = () => { | ||
1327 | orderExport('/api/service/order/export', body, exportLoadingDestory); | 1544 | orderExport('/api/service/order/export', body, exportLoadingDestory); |
1328 | }, | 1545 | }, |
1329 | }, | 1546 | }, |
1547 | + // { | ||
1548 | + // label: '导出当前页订单', | ||
1549 | + // key: '2', | ||
1550 | + // onClick: async () => { | ||
1551 | + // if (mainOrderAllItemKeys.length === 0) { | ||
1552 | + // message.error('当前没有订单'); | ||
1553 | + // return; | ||
1554 | + // } | ||
1555 | + // let body = { flag: 20, ids: mainOrderAllItemKeys }; | ||
1556 | + // exportLoading(); | ||
1557 | + // orderExport('/api/service/order/export', body, exportLoadingDestory); | ||
1558 | + // }, | ||
1559 | + // }, | ||
1330 | { | 1560 | { |
1331 | - label: '导出当前页订单', | ||
1332 | - key: '2', | 1561 | + label: '导出当天订单', |
1562 | + key: '4', | ||
1333 | onClick: async () => { | 1563 | onClick: async () => { |
1334 | - if (mainOrderAllItemKeys.length === 0) { | ||
1335 | - message.error('当前没有订单'); | ||
1336 | - return; | ||
1337 | - } | ||
1338 | - let body = { flag: 20, ids: mainOrderAllItemKeys }; | 1564 | + let body = { flag: 40, ids: [] }; |
1339 | exportLoading(); | 1565 | exportLoading(); |
1340 | orderExport('/api/service/order/export', body, exportLoadingDestory); | 1566 | orderExport('/api/service/order/export', body, exportLoadingDestory); |
1341 | }, | 1567 | }, |
@@ -1349,15 +1575,6 @@ const OrderPage = () => { | @@ -1349,15 +1575,6 @@ const OrderPage = () => { | ||
1349 | orderExport('/api/service/order/export', body, exportLoadingDestory); | 1575 | orderExport('/api/service/order/export', body, exportLoadingDestory); |
1350 | }, | 1576 | }, |
1351 | }, | 1577 | }, |
1352 | - { | ||
1353 | - label: '导出当天订单', | ||
1354 | - key: '4', | ||
1355 | - onClick: async () => { | ||
1356 | - let body = { flag: 40, ids: [] }; | ||
1357 | - exportLoading(); | ||
1358 | - orderExport('/api/service/order/export', body, exportLoadingDestory); | ||
1359 | - }, | ||
1360 | - }, | ||
1361 | ]; | 1578 | ]; |
1362 | 1579 | ||
1363 | const menuProps = { | 1580 | const menuProps = { |
@@ -1393,16 +1610,18 @@ const OrderPage = () => { | @@ -1393,16 +1610,18 @@ const OrderPage = () => { | ||
1393 | ); | 1610 | ); |
1394 | } | 1611 | } |
1395 | 1612 | ||
1396 | - toolBtns.push( | ||
1397 | - <Dropdown menu={menuProps}> | ||
1398 | - <Button> | ||
1399 | - <Space> | ||
1400 | - 导出 | ||
1401 | - <DownOutlined /> | ||
1402 | - </Space> | ||
1403 | - </Button> | ||
1404 | - </Dropdown>, | ||
1405 | - ); | 1613 | + if (rolePath?.includes('export')) { |
1614 | + toolBtns.push( | ||
1615 | + <Dropdown menu={menuProps}> | ||
1616 | + <Button> | ||
1617 | + <Space> | ||
1618 | + 导出 | ||
1619 | + <DownOutlined /> | ||
1620 | + </Space> | ||
1621 | + </Button> | ||
1622 | + </Dropdown>, | ||
1623 | + ); | ||
1624 | + } | ||
1406 | 1625 | ||
1407 | // toolBtns.push( | 1626 | // toolBtns.push( |
1408 | // <Button | 1627 | // <Button |
@@ -1493,13 +1712,15 @@ const OrderPage = () => { | @@ -1493,13 +1712,15 @@ const OrderPage = () => { | ||
1493 | sorter, | 1712 | sorter, |
1494 | filter, | 1713 | filter, |
1495 | ) => { | 1714 | ) => { |
1715 | + //保存这个搜索条件 | ||
1716 | + setSearchParam(params); | ||
1496 | const { data } = await postServiceOrderQueryServiceOrder({ | 1717 | const { data } = await postServiceOrderQueryServiceOrder({ |
1497 | // ...params, | 1718 | // ...params, |
1498 | // FIXME: remove @ts-ignore | 1719 | // FIXME: remove @ts-ignore |
1499 | // @ts-ignore | 1720 | // @ts-ignore |
1500 | sorter, | 1721 | sorter, |
1501 | filter, | 1722 | filter, |
1502 | - data: params, | 1723 | + data: { ...params, isDeleteQueryOrder: onlyShowCancelOrder }, |
1503 | }); | 1724 | }); |
1504 | 1725 | ||
1505 | let mainOrderIds = data?.data?.map((d) => d.id); | 1726 | let mainOrderIds = data?.data?.map((d) => d.id); |
@@ -1663,6 +1884,7 @@ const OrderPage = () => { | @@ -1663,6 +1884,7 @@ const OrderPage = () => { | ||
1663 | {historyModalVisible && ( | 1884 | {historyModalVisible && ( |
1664 | <HistoryModal | 1885 | <HistoryModal |
1665 | subOrders={selectedRows} | 1886 | subOrders={selectedRows} |
1887 | + isCancelledOrder={onlyShowCancelOrder} | ||
1666 | onClose={() => { | 1888 | onClose={() => { |
1667 | setHistoryModalVisible(false); | 1889 | setHistoryModalVisible(false); |
1668 | setSelectedRows({}); | 1890 | setSelectedRows({}); |
src/services/request.ts
@@ -5707,6 +5707,77 @@ export const postServiceOrderInvoicing = /* #__PURE__ */ (() => { | @@ -5707,6 +5707,77 @@ export const postServiceOrderInvoicing = /* #__PURE__ */ (() => { | ||
5707 | return request; | 5707 | return request; |
5708 | })(); | 5708 | })(); |
5709 | 5709 | ||
5710 | +/** @description request parameter type for postServiceOrderNoNeedSend */ | ||
5711 | +export interface PostServiceOrderNoNeedSendOption { | ||
5712 | + /** | ||
5713 | + * @description | ||
5714 | + * dto | ||
5715 | + */ | ||
5716 | + body: { | ||
5717 | + /** | ||
5718 | + @description | ||
5719 | + dto */ | ||
5720 | + dto: Dto; | ||
5721 | + }; | ||
5722 | +} | ||
5723 | + | ||
5724 | +/** @description response type for postServiceOrderNoNeedSend */ | ||
5725 | +export interface PostServiceOrderNoNeedSendResponse { | ||
5726 | + /** | ||
5727 | + * @description | ||
5728 | + * OK | ||
5729 | + */ | ||
5730 | + 200: ServerResult; | ||
5731 | + /** | ||
5732 | + * @description | ||
5733 | + * Created | ||
5734 | + */ | ||
5735 | + 201: any; | ||
5736 | + /** | ||
5737 | + * @description | ||
5738 | + * Unauthorized | ||
5739 | + */ | ||
5740 | + 401: any; | ||
5741 | + /** | ||
5742 | + * @description | ||
5743 | + * Forbidden | ||
5744 | + */ | ||
5745 | + 403: any; | ||
5746 | + /** | ||
5747 | + * @description | ||
5748 | + * Not Found | ||
5749 | + */ | ||
5750 | + 404: any; | ||
5751 | +} | ||
5752 | + | ||
5753 | +export type PostServiceOrderNoNeedSendResponseSuccess = | ||
5754 | + PostServiceOrderNoNeedSendResponse[200]; | ||
5755 | +/** | ||
5756 | + * @description | ||
5757 | + * 无需发货 | ||
5758 | + * @tags 内部订单 | ||
5759 | + * @produces * | ||
5760 | + * @consumes application/json | ||
5761 | + */ | ||
5762 | +export const postServiceOrderNoNeedSend = /* #__PURE__ */ (() => { | ||
5763 | + const method = 'post'; | ||
5764 | + const url = '/service/order/noNeedSend'; | ||
5765 | + function request( | ||
5766 | + option: PostServiceOrderNoNeedSendOption, | ||
5767 | + ): Promise<PostServiceOrderNoNeedSendResponseSuccess> { | ||
5768 | + return requester(request.url, { | ||
5769 | + method: request.method, | ||
5770 | + ...option, | ||
5771 | + }) as unknown as Promise<PostServiceOrderNoNeedSendResponseSuccess>; | ||
5772 | + } | ||
5773 | + | ||
5774 | + /** http method */ | ||
5775 | + request.method = method; | ||
5776 | + /** request url */ | ||
5777 | + request.url = url; | ||
5778 | + return request; | ||
5779 | +})(); | ||
5780 | + | ||
5710 | /** @description request parameter type for postServiceOrderOrderCancel */ | 5781 | /** @description request parameter type for postServiceOrderOrderCancel */ |
5711 | export interface PostServiceOrderOrderCancelOption { | 5782 | export interface PostServiceOrderOrderCancelOption { |
5712 | /** | 5783 | /** |