Commit 029101a8413c487cdfef68caa2b855b573aead05
1 parent
96724bb1
feat: update
Showing
2 changed files
with
18 additions
and
21 deletions
src/pages/Order/components/HistoryModal.tsx
... | ... | @@ -2,11 +2,7 @@ import { postServiceOrderQueryHistoryOrderRecord } from '@/services'; |
2 | 2 | import { enumValueToLabel, formatDateTime } from '@/utils'; |
3 | 3 | import { Button, Col, Empty, Flex, Modal, Row, Spin } from 'antd'; |
4 | 4 | import { useEffect, useState } from 'react'; |
5 | -import { | |
6 | - FINANCIAL_STATUS_OPTIONS, | |
7 | - HISTORY_OPT_TYPE, | |
8 | - ORDER_STATUS_OPTIONS, | |
9 | -} from '../constant'; | |
5 | +import { HISTORY_OPT_TYPE, ORDER_STATUS_OPTIONS } from '../constant'; | |
10 | 6 | |
11 | 7 | export default ({ subOrders, isCancelledOrder, onClose }) => { |
12 | 8 | let subOrderIds = subOrders?.map((subOrder: any) => { |
... | ... | @@ -81,26 +77,19 @@ export default ({ subOrders, isCancelledOrder, onClose }) => { |
81 | 77 | {HISTORY_OPT_TYPE.get(history.record)} |
82 | 78 | </span> |
83 | 79 | , |
84 | - {enumValueToLabel( | |
85 | - history.status, | |
86 | - ORDER_STATUS_OPTIONS, | |
87 | - ) === undefined | |
88 | - ? '子订单开票状态为' | |
89 | - : '子订单状态为'} | |
80 | + {history.record === 'INVOICING' ? '开票状态为' : ''} | |
81 | + {history.record !== 'INVOICING' ? '订单状态为' : ''} | |
90 | 82 | : |
91 | 83 | <span className="text-[#3b83e5]"> |
92 | - {enumValueToLabel( | |
93 | - history.status, | |
94 | - ORDER_STATUS_OPTIONS, | |
95 | - ) === undefined | |
84 | + {history.status === 'INVOICING' ? '已开票' : ''} | |
85 | + {history.status === null ? '已作废' : ''} | |
86 | + {history.status !== null && | |
87 | + history.status !== 'INVOICING' | |
96 | 88 | ? enumValueToLabel( |
97 | 89 | history.status, |
98 | - FINANCIAL_STATUS_OPTIONS, | |
99 | - ) | |
100 | - : enumValueToLabel( | |
101 | - history.status, | |
102 | 90 | ORDER_STATUS_OPTIONS, |
103 | - )} | |
91 | + ) | |
92 | + : ''} | |
104 | 93 | </span> |
105 | 94 | </div> |
106 | 95 | ); | ... | ... |
src/pages/Order/index.tsx
... | ... | @@ -1273,8 +1273,16 @@ const OrderPage = () => { |
1273 | 1273 | setSelectedRows(selectedSubOrders); |
1274 | 1274 | for (let i = 0; i < selectedSubOrders.length; i++) { |
1275 | 1275 | if ( |
1276 | + selectedSubOrders[i].orderStatus !== 'AUDITED' && | |
1276 | 1277 | selectedSubOrders[i].orderStatus !== |
1277 | - 'CONFIRM_RECEIPT' | |
1278 | + 'PROCURE_PROCESS' && | |
1279 | + selectedSubOrders[i].orderStatus !== | |
1280 | + 'PROCURE_PROCESS_FOR_MINE' && | |
1281 | + selectedSubOrders[i].orderStatus !== | |
1282 | + 'PROCURE_WAIT_SHIP' && | |
1283 | + selectedSubOrders[i].orderStatus !== | |
1284 | + 'SUPPLIER_WAIT_SHIP' && | |
1285 | + selectedSubOrders[i].orderStatus !== 'WAIT_SHIP' | |
1278 | 1286 | ) { |
1279 | 1287 | message.error( |
1280 | 1288 | '请选择未发货的子订单进行无需发货操作', | ... | ... |