Commit ef46f36b484dee2cf5f67d4340c633aeba68bb9c
1 parent
83293a3a
fix: 新增和优化多个功能点
- 在发票列表中添加编辑功能- 优化导出功能,支持多条件筛选 - 新增取消开票功能 - 修复部分页面的样式问题 - 优化部分功能的用户体验
Showing
14 changed files
with
1076 additions
and
1237 deletions
src/pages/Invoice/Invoice/index.tsx
@@ -9,6 +9,7 @@ import { INVOCING_STATUS, PAYEE_OPTIONS } from '@/pages/Order/constant'; | @@ -9,6 +9,7 @@ import { INVOCING_STATUS, PAYEE_OPTIONS } from '@/pages/Order/constant'; | ||
9 | import { | 9 | import { |
10 | postServiceInvoiceDeleteInvoice, | 10 | postServiceInvoiceDeleteInvoice, |
11 | postServiceInvoiceGetWriteOffRecord, | 11 | postServiceInvoiceGetWriteOffRecord, |
12 | + postServiceInvoiceModify, | ||
12 | postServiceInvoiceQueryInvoice, | 13 | postServiceInvoiceQueryInvoice, |
13 | } from '@/services'; | 14 | } from '@/services'; |
14 | import { orderExport } from '@/services/order'; | 15 | import { orderExport } from '@/services/order'; |
@@ -100,8 +101,22 @@ const InvoiceRecord = () => { | @@ -100,8 +101,22 @@ const InvoiceRecord = () => { | ||
100 | key: 'option', | 101 | key: 'option', |
101 | fixed: 'right', | 102 | fixed: 'right', |
102 | width: 160, | 103 | width: 160, |
103 | - render: (text, record) => { | 104 | + render: (text, record, _, action) => { |
104 | let btns = []; | 105 | let btns = []; |
106 | + | ||
107 | + if (record.paths?.includes('edit')) { | ||
108 | + btns.push( | ||
109 | + <a | ||
110 | + key="editable" | ||
111 | + onClick={() => { | ||
112 | + action?.startEditable?.(record.id); | ||
113 | + }} | ||
114 | + > | ||
115 | + 编辑 | ||
116 | + </a>, | ||
117 | + ); | ||
118 | + } | ||
119 | + | ||
105 | if (record.paths?.includes('writeOff') && !record.writeOffId) { | 120 | if (record.paths?.includes('writeOff') && !record.writeOffId) { |
106 | btns.push( | 121 | btns.push( |
107 | <InvoiceWriteOffModal | 122 | <InvoiceWriteOffModal |
@@ -157,7 +172,6 @@ const InvoiceRecord = () => { | @@ -157,7 +172,6 @@ const InvoiceRecord = () => { | ||
157 | </Button>, | 172 | </Button>, |
158 | ); | 173 | ); |
159 | } | 174 | } |
160 | - | ||
161 | if (record.paths?.includes('deleteInvoice')) { | 175 | if (record.paths?.includes('deleteInvoice')) { |
162 | btns.push( | 176 | btns.push( |
163 | <ButtonConfirm | 177 | <ButtonConfirm |
@@ -169,7 +183,7 @@ const InvoiceRecord = () => { | @@ -169,7 +183,7 @@ const InvoiceRecord = () => { | ||
169 | text="删除" | 183 | text="删除" |
170 | onConfirm={async () => { | 184 | onConfirm={async () => { |
171 | let res = await postServiceInvoiceDeleteInvoice({ | 185 | let res = await postServiceInvoiceDeleteInvoice({ |
172 | - data: { invoiceId: record.invoiceId }, | 186 | + data: { invoiceId: record.id }, |
173 | }); | 187 | }); |
174 | if (res) { | 188 | if (res) { |
175 | message.success(res.message); | 189 | message.success(res.message); |
@@ -217,6 +231,16 @@ const InvoiceRecord = () => { | @@ -217,6 +231,16 @@ const InvoiceRecord = () => { | ||
217 | console.log('value: ', value); | 231 | console.log('value: ', value); |
218 | }, | 232 | }, |
219 | }} | 233 | }} |
234 | + editable={{ | ||
235 | + type: 'multiple', | ||
236 | + onSave: async (key, row, originRow) => { | ||
237 | + console.log('row: ', row); | ||
238 | + console.log('originRow: ', originRow); | ||
239 | + postServiceInvoiceModify({ | ||
240 | + data: row, | ||
241 | + }); | ||
242 | + }, | ||
243 | + }} | ||
220 | rowKey="id" | 244 | rowKey="id" |
221 | search={{ | 245 | search={{ |
222 | labelWidth: 'auto', | 246 | labelWidth: 'auto', |
src/pages/Invoice/InvoiceRecord/components/InvoiceModal.tsx deleted
100644 → 0
1 | -import Invoice from '@/pages/Invoice/InvoiceRecord/components/Invoice'; | ||
2 | -import { postServiceInvoiceGetInvoiceRecord } from '@/services'; | ||
3 | -import { ModalForm } from '@ant-design/pro-components'; | ||
4 | -import { Form } from 'antd'; | ||
5 | -import { useEffect, useState } from 'react'; | ||
6 | - | ||
7 | -export default ({ recordId, getRecord, button }) => { | ||
8 | - const [data, setData] = useState<any>({}); | ||
9 | - const getData = async () => { | ||
10 | - let ret = await postServiceInvoiceGetInvoiceRecord({ | ||
11 | - query: { | ||
12 | - id: recordId, | ||
13 | - }, | ||
14 | - }); | ||
15 | - setData(ret.data); | ||
16 | - }; | ||
17 | - useEffect(() => { | ||
18 | - if (recordId) { | ||
19 | - getData(); | ||
20 | - } | ||
21 | - }, []); | ||
22 | - const [form] = Form.useForm(); | ||
23 | - return ( | ||
24 | - <ModalForm | ||
25 | - title="预览发票" | ||
26 | - trigger={button ? button : <a type="primary">预览</a>} | ||
27 | - onOpenChange={(open) => { | ||
28 | - if (open) { | ||
29 | - if (getRecord) { | ||
30 | - setData(getRecord()); | ||
31 | - } else { | ||
32 | - getData(); | ||
33 | - } | ||
34 | - } | ||
35 | - }} | ||
36 | - width={1200} | ||
37 | - form={form} | ||
38 | - autoFocusFirstInput | ||
39 | - submitter={false} | ||
40 | - modalProps={{ | ||
41 | - destroyOnClose: true, | ||
42 | - }} | ||
43 | - > | ||
44 | - <hr /> | ||
45 | - <Invoice data={data} /> | ||
46 | - </ModalForm> | ||
47 | - ); | ||
48 | -}; |
src/pages/Invoice/InvoiceRecord/index.tsx
@@ -15,7 +15,6 @@ import { ActionType, ModalForm, ProTable } from '@ant-design/pro-components'; | @@ -15,7 +15,6 @@ import { ActionType, ModalForm, ProTable } from '@ant-design/pro-components'; | ||
15 | import { Button, Divider, Space, Table, Tooltip, message } from 'antd'; | 15 | import { Button, Divider, Space, Table, Tooltip, message } from 'antd'; |
16 | import axios from 'axios'; | 16 | import axios from 'axios'; |
17 | import { useEffect, useRef, useState } from 'react'; | 17 | import { useEffect, useRef, useState } from 'react'; |
18 | - | ||
19 | const InvoiceRecord = () => { | 18 | const InvoiceRecord = () => { |
20 | const processedRecordRef = useRef<ActionType>(); | 19 | const processedRecordRef = useRef<ActionType>(); |
21 | const [invoiceTypeValueEnum, setInvoiceTypeValueEnum] = useState({}); | 20 | const [invoiceTypeValueEnum, setInvoiceTypeValueEnum] = useState({}); |
@@ -443,8 +442,6 @@ const InvoiceRecord = () => { | @@ -443,8 +442,6 @@ const InvoiceRecord = () => { | ||
443 | alwaysShowAlert: true, | 442 | alwaysShowAlert: true, |
444 | }} | 443 | }} |
445 | tableAlertOptionRender={({ selectedRowKeys, selectedRows }) => { | 444 | tableAlertOptionRender={({ selectedRowKeys, selectedRows }) => { |
446 | - console.log(selectedRows); | ||
447 | - console.log(selectedRowKeys); | ||
448 | return ( | 445 | return ( |
449 | <Space size={16}> | 446 | <Space size={16}> |
450 | <Button | 447 | <Button |
src/pages/Invoice/constant.tsx
@@ -35,6 +35,7 @@ export const INVOICE_COLUMNS = [ | @@ -35,6 +35,7 @@ export const INVOICE_COLUMNS = [ | ||
35 | valueType: 'text', | 35 | valueType: 'text', |
36 | hideInTable: true, | 36 | hideInTable: true, |
37 | hideInSearch: true, | 37 | hideInSearch: true, |
38 | + readonly: true, | ||
38 | width: 100, | 39 | width: 100, |
39 | }, | 40 | }, |
40 | { | 41 | { |
@@ -58,6 +59,7 @@ export const INVOICE_COLUMNS = [ | @@ -58,6 +59,7 @@ export const INVOICE_COLUMNS = [ | ||
58 | dataIndex: 'statusText', | 59 | dataIndex: 'statusText', |
59 | valueType: 'text', | 60 | valueType: 'text', |
60 | width: 180, | 61 | width: 180, |
62 | + readonly: true, | ||
61 | hideInSearch: true, | 63 | hideInSearch: true, |
62 | }, | 64 | }, |
63 | { | 65 | { |
@@ -80,12 +82,15 @@ export const INVOICE_COLUMNS = [ | @@ -80,12 +82,15 @@ export const INVOICE_COLUMNS = [ | ||
80 | { | 82 | { |
81 | title: '订单状态', | 83 | title: '订单状态', |
82 | dataIndex: 'orderTypeText', | 84 | dataIndex: 'orderTypeText', |
85 | + readonly: true, | ||
83 | valueType: 'text', | 86 | valueType: 'text', |
87 | + hideInSearch: true, | ||
84 | width: 180, | 88 | width: 180, |
85 | }, | 89 | }, |
86 | { | 90 | { |
87 | title: '绑定流水号', | 91 | title: '绑定流水号', |
88 | dataIndex: 'serialNumbersTextByOrder', | 92 | dataIndex: 'serialNumbersTextByOrder', |
93 | + readonly: true, | ||
89 | hideInSearch: true, | 94 | hideInSearch: true, |
90 | valueType: 'text', | 95 | valueType: 'text', |
91 | width: 180, | 96 | width: 180, |
@@ -158,11 +163,19 @@ export const INVOICE_COLUMNS = [ | @@ -158,11 +163,19 @@ export const INVOICE_COLUMNS = [ | ||
158 | dataIndex: 'invoicingTypeText', | 163 | dataIndex: 'invoicingTypeText', |
159 | valueType: 'invoicingTypeText', | 164 | valueType: 'invoicingTypeText', |
160 | hideInSearch: true, | 165 | hideInSearch: true, |
166 | + readonly: true, | ||
161 | width: 100, | 167 | width: 100, |
162 | }, | 168 | }, |
163 | { | 169 | { |
164 | title: '开票日期', | 170 | title: '开票日期', |
165 | dataIndex: 'invoicingTime', | 171 | dataIndex: 'invoicingTime', |
172 | + valueType: 'date', | ||
173 | + width: 150, | ||
174 | + hideInSearch: true, | ||
175 | + }, | ||
176 | + { | ||
177 | + title: '开票日期', | ||
178 | + dataIndex: 'invoicingTime', | ||
166 | valueType: 'dateRange', | 179 | valueType: 'dateRange', |
167 | width: 150, | 180 | width: 150, |
168 | search: { | 181 | search: { |
@@ -179,7 +192,7 @@ export const INVOICE_COLUMNS = [ | @@ -179,7 +192,7 @@ export const INVOICE_COLUMNS = [ | ||
179 | { | 192 | { |
180 | title: '收款时间', | 193 | title: '收款时间', |
181 | dataIndex: 'collectionTime', | 194 | dataIndex: 'collectionTime', |
182 | - valueType: 'dateRange', | 195 | + valueType: 'date', |
183 | width: 200, | 196 | width: 200, |
184 | search: { | 197 | search: { |
185 | transform: (value) => { | 198 | transform: (value) => { |
src/pages/Invoice/waitProcessRecord/components/Invoice.tsx
@@ -139,7 +139,9 @@ const ProjectContainer = styled.div` | @@ -139,7 +139,9 @@ const ProjectContainer = styled.div` | ||
139 | border-top: 2px solid #b16363; | 139 | border-top: 2px solid #b16363; |
140 | border-right: 2px solid #b16363; | 140 | border-right: 2px solid #b16363; |
141 | border-left: 2px solid #b16363; | 141 | border-left: 2px solid #b16363; |
142 | + max-height: 500px; /* 设置最大高度,根据需要调整 */ | ||
142 | overflow: auto; | 143 | overflow: auto; |
144 | + | ||
143 | .single-project { | 145 | .single-project { |
144 | width: 100%; | 146 | width: 100%; |
145 | height: 30px; | 147 | height: 30px; |
src/pages/Invoice/waitProcessRecord/index.tsx
1 | +import { RESPONSE_CODE } from '@/constants/enum'; | ||
1 | import InvoiceRecordDetailModal from '@/pages/Invoice/InvoiceRecord/components/InvoiceRecordDetailModal'; | 2 | import InvoiceRecordDetailModal from '@/pages/Invoice/InvoiceRecord/components/InvoiceRecordDetailModal'; |
2 | import InvoiceModal from '@/pages/Invoice/waitProcessRecord/components/InvoiceModal'; | 3 | import InvoiceModal from '@/pages/Invoice/waitProcessRecord/components/InvoiceModal'; |
3 | import InvoicingModal from '@/pages/Invoice/waitProcessRecord/components/InvoicingModal'; | 4 | import InvoicingModal from '@/pages/Invoice/waitProcessRecord/components/InvoicingModal'; |
@@ -7,12 +8,21 @@ import { | @@ -7,12 +8,21 @@ import { | ||
7 | postServiceConstBeforeInvoicingInvoiceRecordStatus, | 8 | postServiceConstBeforeInvoicingInvoiceRecordStatus, |
8 | postServiceConstInvoiceType, | 9 | postServiceConstInvoiceType, |
9 | postServiceConstInvoicingType, | 10 | postServiceConstInvoicingType, |
11 | + postServiceInvoiceCancelInvoiceRecord, | ||
10 | postServiceInvoiceQueryInvoiceRecordList, | 12 | postServiceInvoiceQueryInvoiceRecordList, |
11 | postServiceOrderQuerySalesCode, | 13 | postServiceOrderQuerySalesCode, |
12 | } from '@/services'; | 14 | } from '@/services'; |
13 | import { enumToProTableEnumValue, enumToSelect } from '@/utils'; | 15 | import { enumToProTableEnumValue, enumToSelect } from '@/utils'; |
14 | import { ActionType, ProTable } from '@ant-design/pro-components'; | 16 | import { ActionType, ProTable } from '@ant-design/pro-components'; |
15 | -import { Divider, Space, Table, Tooltip } from 'antd'; | 17 | +import { |
18 | + Button, | ||
19 | + Divider, | ||
20 | + Popconfirm, | ||
21 | + Space, | ||
22 | + Table, | ||
23 | + Tooltip, | ||
24 | + message, | ||
25 | +} from 'antd'; | ||
16 | import { useEffect, useRef, useState } from 'react'; | 26 | import { useEffect, useRef, useState } from 'react'; |
17 | 27 | ||
18 | const InvoiceRecord = () => { | 28 | const InvoiceRecord = () => { |
@@ -345,6 +355,31 @@ const InvoiceRecord = () => { | @@ -345,6 +355,31 @@ const InvoiceRecord = () => { | ||
345 | ></ManualInvoicingModal> | 355 | ></ManualInvoicingModal> |
346 | )} | 356 | )} |
347 | </>, | 357 | </>, |
358 | + <> | ||
359 | + {record.paths.includes('CANCEL') && ( | ||
360 | + <Popconfirm | ||
361 | + title="取消开票" | ||
362 | + description="确认取消开票?" | ||
363 | + onConfirm={async () => { | ||
364 | + let res = await postServiceInvoiceCancelInvoiceRecord({ | ||
365 | + data: { | ||
366 | + invoiceRecordIds: [record.id], | ||
367 | + }, | ||
368 | + }); | ||
369 | + if (res.result === RESPONSE_CODE.SUCCESS) { | ||
370 | + message.success('取消成功'); | ||
371 | + } | ||
372 | + waitDealrecordActionRef?.current?.reload(); | ||
373 | + }} | ||
374 | + okText="确定" | ||
375 | + cancelText="取消" | ||
376 | + > | ||
377 | + <Button type="link" danger> | ||
378 | + 取消 | ||
379 | + </Button> | ||
380 | + </Popconfirm> | ||
381 | + )} | ||
382 | + </>, | ||
348 | ]; | 383 | ]; |
349 | }, | 384 | }, |
350 | }, | 385 | }, |
src/pages/Order/Order/components/InvoicingDrawerForm.tsx
1 | // import { PlusOutlined } from '@ant-design/icons'; | 1 | // import { PlusOutlined } from '@ant-design/icons'; |
2 | -import InvoiceModal from '@/pages/Invoice/InvoiceVerification/components/InvoiceModal'; | 2 | +import InvoiceModal from '@/pages/Invoice/waitProcessRecord/components/InvoiceModal'; |
3 | import { | 3 | import { |
4 | postServiceConstGetPayeeEnum, | 4 | postServiceConstGetPayeeEnum, |
5 | postServiceConstInitInvoiceDetailNames, | 5 | postServiceConstInitInvoiceDetailNames, |
src/pages/Order/Order/index.tsx
@@ -926,6 +926,11 @@ const OrderPage = () => { | @@ -926,6 +926,11 @@ const OrderPage = () => { | ||
926 | ) : ( | 926 | ) : ( |
927 | '' | 927 | '' |
928 | )} | 928 | )} |
929 | + {optRecord.uid && ( | ||
930 | + <span className="text-[#f44e4e] cursor-pointer"> | ||
931 | + (商城订单) | ||
932 | + </span> | ||
933 | + )} | ||
929 | 934 | ||
930 | {optRecord.modified ? ( | 935 | {optRecord.modified ? ( |
931 | <Tooltip title="点击查看详情"> | 936 | <Tooltip title="点击查看详情"> |
@@ -2097,7 +2102,7 @@ const OrderPage = () => { | @@ -2097,7 +2102,7 @@ const OrderPage = () => { | ||
2097 | title="已和客户确认发票??" | 2102 | title="已和客户确认发票??" |
2098 | text="确认发票" | 2103 | text="确认发票" |
2099 | onConfirm={async () => { | 2104 | onConfirm={async () => { |
2100 | - let body = { ids: [optRecord.id] }; | 2105 | + let body = [optRecord.id]; |
2101 | const data = await postServiceOrderConfirmInvoice({ | 2106 | const data = await postServiceOrderConfirmInvoice({ |
2102 | data: body, | 2107 | data: body, |
2103 | }); | 2108 | }); |
@@ -3890,13 +3895,11 @@ const OrderPage = () => { | @@ -3890,13 +3895,11 @@ const OrderPage = () => { | ||
3890 | title="已和客户确认发票?" | 3895 | title="已和客户确认发票?" |
3891 | text="确认发票" | 3896 | text="确认发票" |
3892 | onConfirm={async () => { | 3897 | onConfirm={async () => { |
3893 | - let body = { | ||
3894 | - ids: [ | ||
3895 | - ...record.subOrderInformationLists.map( | ||
3896 | - (subOrder) => subOrder.id, | ||
3897 | - ), | ||
3898 | - ], | ||
3899 | - }; | 3898 | + let body = [ |
3899 | + ...record.subOrderInformationLists.map( | ||
3900 | + (subOrder) => subOrder.id, | ||
3901 | + ), | ||
3902 | + ]; | ||
3900 | const data = await postServiceOrderConfirmInvoice({ | 3903 | const data = await postServiceOrderConfirmInvoice({ |
3901 | data: body, | 3904 | data: body, |
3902 | }); | 3905 | }); |
@@ -4164,6 +4167,7 @@ const OrderPage = () => { | @@ -4164,6 +4167,7 @@ const OrderPage = () => { | ||
4164 | if ( | 4167 | if ( |
4165 | roleCode === 'admin' || | 4168 | roleCode === 'admin' || |
4166 | roleCode === 'salesManager' || | 4169 | roleCode === 'salesManager' || |
4170 | + roles.includes('PROCURE') || | ||
4167 | roleCode === 'salesRepresentative' | 4171 | roleCode === 'salesRepresentative' |
4168 | ) { | 4172 | ) { |
4169 | radios.push(<Radio value={70}>只看作废</Radio>); | 4173 | radios.push(<Radio value={70}>只看作废</Radio>); |
src/pages/Order/OrderWarning/components/InvoicingDrawerForm.tsx
1 | // import { PlusOutlined } from '@ant-design/icons'; | 1 | // import { PlusOutlined } from '@ant-design/icons'; |
2 | -import InvoiceModal from '@/pages/Invoice/InvoiceVerification/components/InvoiceModal'; | 2 | +import InvoiceModal from '@/pages/Invoice/waitProcessRecord/components/InvoiceModal'; |
3 | import { | 3 | import { |
4 | postServiceConstGetPayeeEnum, | 4 | postServiceConstGetPayeeEnum, |
5 | postServiceConstInitInvoiceDetailNames, | 5 | postServiceConstInitInvoiceDetailNames, |
src/pages/Order/OrderWarning/indexhide.tsx
1 | import ButtonConfirm from '@/components/ButtomConfirm'; | 1 | import ButtonConfirm from '@/components/ButtomConfirm'; |
2 | import { RESPONSE_CODE } from '@/constants/enum'; | 2 | import { RESPONSE_CODE } from '@/constants/enum'; |
3 | -import ImportExpressBillModal from '@/pages/Order/OrderWarning/components/ImportExpressBillModal'; | ||
4 | import InvoicingDrawerForm from '@/pages/Order/OrderWarning/components/InvoicingDrawerForm'; | 3 | import InvoicingDrawerForm from '@/pages/Order/OrderWarning/components/InvoicingDrawerForm'; |
5 | import ReissueModal from '@/pages/Order/OrderWarning/components/ReissueModal'; | 4 | import ReissueModal from '@/pages/Order/OrderWarning/components/ReissueModal'; |
6 | import ReissueModal_old from '@/pages/Order/OrderWarning/components/ReissueModal_old'; | 5 | import ReissueModal_old from '@/pages/Order/OrderWarning/components/ReissueModal_old'; |
@@ -21,7 +20,6 @@ import { | @@ -21,7 +20,6 @@ import { | ||
21 | postServiceOrderSalesConfirm, | 20 | postServiceOrderSalesConfirm, |
22 | postServiceOrderWarningOrderStatistics, | 21 | postServiceOrderWarningOrderStatistics, |
23 | } from '@/services'; | 22 | } from '@/services'; |
24 | -import { orderExport } from '@/services/order'; | ||
25 | import { | 23 | import { |
26 | FloatAdd, | 24 | FloatAdd, |
27 | copyToClipboard, | 25 | copyToClipboard, |
@@ -48,7 +46,6 @@ import { | @@ -48,7 +46,6 @@ import { | ||
48 | ContainerTwoTone, | 46 | ContainerTwoTone, |
49 | CopyOutlined, | 47 | CopyOutlined, |
50 | CopyTwoTone, | 48 | CopyTwoTone, |
51 | - DownOutlined, | ||
52 | EditTwoTone, | 49 | EditTwoTone, |
53 | QuestionCircleOutlined, | 50 | QuestionCircleOutlined, |
54 | } from '@ant-design/icons'; | 51 | } from '@ant-design/icons'; |
@@ -57,36 +54,52 @@ import { | @@ -57,36 +54,52 @@ import { | ||
57 | ProColumns, | 54 | ProColumns, |
58 | ProFormInstance, | 55 | ProFormInstance, |
59 | ProTable, | 56 | ProTable, |
60 | - ProForm, | ||
61 | - ProFormRadio, | ||
62 | } from '@ant-design/pro-components'; | 57 | } from '@ant-design/pro-components'; |
63 | import { | 58 | import { |
59 | + Badge, | ||
64 | Button, | 60 | Button, |
61 | + Card, | ||
65 | Checkbox, | 62 | Checkbox, |
63 | + Col, | ||
66 | Divider, | 64 | Divider, |
67 | - Dropdown, | ||
68 | Flex, | 65 | Flex, |
69 | FloatButton, | 66 | FloatButton, |
70 | Image, | 67 | Image, |
71 | - MenuProps, | ||
72 | Modal, | 68 | Modal, |
73 | Popconfirm, | 69 | Popconfirm, |
74 | Radio, | 70 | Radio, |
71 | + Row, | ||
75 | Space, | 72 | Space, |
76 | Spin, | 73 | Spin, |
74 | + Tabs, | ||
77 | Tag, | 75 | Tag, |
78 | Tooltip, | 76 | Tooltip, |
79 | message, | 77 | message, |
80 | - Tabs, | ||
81 | - Badge, | ||
82 | - Card, | ||
83 | - Col, | ||
84 | - Row, | ||
85 | } from 'antd'; | 78 | } from 'antd'; |
86 | import Base64 from 'base-64'; | 79 | import Base64 from 'base-64'; |
80 | +import { format } from 'date-fns'; | ||
87 | import { cloneDeep } from 'lodash'; | 81 | import { cloneDeep } from 'lodash'; |
88 | -import React, { Key, useEffect, useMemo, useRef, useState } from 'react'; | 82 | +import React, { Key, useEffect, useRef, useState } from 'react'; |
89 | import OrderPrintModal from '../../OrderPrint/OrderPrintModal'; | 83 | import OrderPrintModal from '../../OrderPrint/OrderPrintModal'; |
84 | +import { | ||
85 | + AFTER_INVOICING_STATUS, | ||
86 | + CHECK_TYPE, | ||
87 | + LOGISTICS_STATUS_OPTIONS, | ||
88 | + MAIN_ORDER_COLUMNS, | ||
89 | + MODIFIED_AUDIT_STATUS_OPTIONS, | ||
90 | + ORDER_STATUS_OPTIONS, | ||
91 | + PAYEE_OPTIONS, | ||
92 | + PAYMENT_CHANNEL_OPTIONS, | ||
93 | + PAYMENT_RECEIPTS_STATUS_OPTIONS, | ||
94 | + POST_AUDIT_OPTIONS, | ||
95 | + PROCURE_ORDER_STATUS, | ||
96 | + PROCURE_PRIMARY_ORDER_STATUS_OPTIONS, | ||
97 | + PRODUCT_BELONG_DEPARTMENT_OPTIONS, | ||
98 | + SHIPPING_WAREHOUSE_OPTIONS, | ||
99 | + TAGS_COLOR, | ||
100 | + getInvoicingType, | ||
101 | + getNeedInvoicing, | ||
102 | +} from '../constant'; | ||
90 | import AfterSalesDrawer from './components/AfterSalesDrawer'; | 103 | import AfterSalesDrawer from './components/AfterSalesDrawer'; |
91 | import ApplyForInvoicingModal from './components/ApplyForInvoicingModal'; | 104 | import ApplyForInvoicingModal from './components/ApplyForInvoicingModal'; |
92 | import AttachmentModal from './components/AttachmentModal'; | 105 | import AttachmentModal from './components/AttachmentModal'; |
@@ -109,29 +122,8 @@ import ProcureConvertModal from './components/ProcureConvertModal'; | @@ -109,29 +122,8 @@ import ProcureConvertModal from './components/ProcureConvertModal'; | ||
109 | import ProductionTimeModal from './components/ProductionTimeModal'; | 122 | import ProductionTimeModal from './components/ProductionTimeModal'; |
110 | import ShippingWarehouseChangeModal from './components/ShippingWarehouseChangeModal'; | 123 | import ShippingWarehouseChangeModal from './components/ShippingWarehouseChangeModal'; |
111 | import UploadPayBillModal from './components/UploadPayBillModal'; | 124 | import UploadPayBillModal from './components/UploadPayBillModal'; |
112 | -import { | ||
113 | - AFTER_INVOICING_STATUS, | ||
114 | - CHECK_TYPE, | ||
115 | - LOGISTICS_STATUS_OPTIONS, | ||
116 | - MAIN_ORDER_COLUMNS, | ||
117 | - MODIFIED_AUDIT_STATUS_OPTIONS, | ||
118 | - ORDER_STATUS_OPTIONS, | ||
119 | - PAYEE_OPTIONS, | ||
120 | - PAYMENT_CHANNEL_OPTIONS, | ||
121 | - PAYMENT_RECEIPTS_STATUS_OPTIONS, | ||
122 | - POST_AUDIT_OPTIONS, | ||
123 | - PROCURE_ORDER_STATUS, | ||
124 | - PROCURE_PRIMARY_ORDER_STATUS_OPTIONS, | ||
125 | - PRODUCT_BELONG_DEPARTMENT_OPTIONS, | ||
126 | - SHIPPING_WAREHOUSE_OPTIONS, | ||
127 | - TAGS_COLOR, | ||
128 | - getInvoicingType, | ||
129 | - getNeedInvoicing, | ||
130 | -} from '../constant'; | ||
131 | import './index.less'; | 125 | import './index.less'; |
132 | import { OrderListItemType, OrderType } from './type.d'; | 126 | import { OrderListItemType, OrderType } from './type.d'; |
133 | -import { format } from 'date-fns'; | ||
134 | -import { useParams } from '@umijs/max'; | ||
135 | 127 | ||
136 | const OrderPage = () => { | 128 | const OrderPage = () => { |
137 | const [orderDrawerVisible, setOrderDrawerVisible] = useState<boolean>(false); | 129 | const [orderDrawerVisible, setOrderDrawerVisible] = useState<boolean>(false); |
@@ -196,39 +188,25 @@ const OrderPage = () => { | @@ -196,39 +188,25 @@ const OrderPage = () => { | ||
196 | const [currentPage, setCurrentPage] = useState(1); | 188 | const [currentPage, setCurrentPage] = useState(1); |
197 | const [orderCheckType, setOrderCheckType] = useState(''); | 189 | const [orderCheckType, setOrderCheckType] = useState(''); |
198 | const [imagesViewerOptType, setImagesViewerOptType] = useState(''); | 190 | const [imagesViewerOptType, setImagesViewerOptType] = useState(''); |
199 | - const [filterCondifion, setFilterCondition] = useState(0); | 191 | + const [filterCondifion] = useState(0); |
200 | const [mainOrderSelectedMap] = useState(new Map()); //选中的主订单Map key:主订单id value:主订单数据 | 192 | const [mainOrderSelectedMap] = useState(new Map()); //选中的主订单Map key:主订单id value:主订单数据 |
201 | const [subOrderSelectedMap, setSubOrderSelectedMap] = useState(new Map()); //选中的子订单Map key:主订单id value:选中的子订单数据集合 | 193 | const [subOrderSelectedMap, setSubOrderSelectedMap] = useState(new Map()); //选中的子订单Map key:主订单id value:选中的子订单数据集合 |
202 | const [currentOptMainId, setCurrentMainId] = useState<any>(undefined); //当前操作对象的主订单id | 194 | const [currentOptMainId, setCurrentMainId] = useState<any>(undefined); //当前操作对象的主订单id |
203 | const [curretnOptSubId, setCurretnOptSubId] = useState<any>(undefined); //当前操作对象的子订单id | 195 | const [curretnOptSubId, setCurretnOptSubId] = useState<any>(undefined); //当前操作对象的子订单id |
204 | const [subOrderCount, setSubOrderCount] = useState(0); | 196 | const [subOrderCount, setSubOrderCount] = useState(0); |
205 | - const [sorted, setSorted] = useState(false); | 197 | + const [sorted] = useState(false); |
206 | const mainTableRef = useRef<ActionType>(); | 198 | const mainTableRef = useRef<ActionType>(); |
207 | const mainTableFormRef = useRef<ProFormInstance>(); | 199 | const mainTableFormRef = useRef<ProFormInstance>(); |
208 | - let [searchParams, setSearchParam] = useState(Object); //表格的查询条件存储 | ||
209 | - const [messageApi, contextHolder] = message.useMessage(); | 200 | + let [setSearchParam] = useState(Object); //表格的查询条件存储 |
201 | + const [contextHolder] = message.useMessage(); | ||
210 | const [ | 202 | const [ |
211 | shippingWarehouseChangeModalVisible, | 203 | shippingWarehouseChangeModalVisible, |
212 | setShippingWarehouseChangeModalVisible, | 204 | setShippingWarehouseChangeModalVisible, |
213 | ] = useState(false); | 205 | ] = useState(false); |
214 | - const [canApplyAfterInvoicingStatus, setCanApplyAfterInvoicingStatus] = | ||
215 | - useState([]); | 206 | + const [setCanApplyAfterInvoicingStatus] = useState([]); |
216 | const [ids, setIds] = useState([]); | 207 | const [ids, setIds] = useState([]); |
217 | const [recordOptNode, setRecordOptNode] = useState(null); | 208 | const [recordOptNode, setRecordOptNode] = useState(null); |
218 | const roleCode = userInfo?.roleSmallVO?.code; | 209 | const roleCode = userInfo?.roleSmallVO?.code; |
219 | - const canMergeInvoicing = useMemo(() => { | ||
220 | - if (subOrderSelectedMap.size === 0) { | ||
221 | - return false; | ||
222 | - } | ||
223 | - // 检查 value.items 中的每个元素 | ||
224 | - console.log( | ||
225 | - 'map' + JSON.stringify([...subOrderSelectedMap.values()].flat()), | ||
226 | - ); | ||
227 | - return [...subOrderSelectedMap.values()] | ||
228 | - .flat() | ||
229 | - .every((subItem) => subItem.paths.includes('applyInvoicing_old')); | ||
230 | - }, [selectedSubOrderKeys]); | ||
231 | - | ||
232 | const triggerRecordOptNode = async (id) => { | 210 | const triggerRecordOptNode = async (id) => { |
233 | const res = await postServiceOrderGetCurrentOptNode({ | 211 | const res = await postServiceOrderGetCurrentOptNode({ |
234 | query: { | 212 | query: { |
@@ -238,18 +216,6 @@ const OrderPage = () => { | @@ -238,18 +216,6 @@ const OrderPage = () => { | ||
238 | setRecordOptNode(res.data); | 216 | setRecordOptNode(res.data); |
239 | }; | 217 | }; |
240 | 218 | ||
241 | - const exportLoading = () => { | ||
242 | - messageApi.open({ | ||
243 | - type: 'loading', | ||
244 | - content: '正在导出文件...', | ||
245 | - duration: 0, | ||
246 | - }); | ||
247 | - }; | ||
248 | - | ||
249 | - const exportLoadingDestory = () => { | ||
250 | - messageApi.destroy(); | ||
251 | - }; | ||
252 | - | ||
253 | const refreshTable = () => { | 219 | const refreshTable = () => { |
254 | mainTableRef.current?.reload(); | 220 | mainTableRef.current?.reload(); |
255 | //刷新表格数据的时候,取消选中行 | 221 | //刷新表格数据的时候,取消选中行 |
@@ -257,14 +223,6 @@ const OrderPage = () => { | @@ -257,14 +223,6 @@ const OrderPage = () => { | ||
257 | setSelectedSubOrderKeys([]); | 223 | setSelectedSubOrderKeys([]); |
258 | }; | 224 | }; |
259 | 225 | ||
260 | - /*useEffect(() => { | ||
261 | - let initAfterInvoicingStatus = async () => { | ||
262 | - const afteInvoicingStatus = await getAfterInvoicingStatus(); | ||
263 | - setAfterInvoicingStatus(afteInvoicingStatus); | ||
264 | - }; | ||
265 | - initAfterInvoicingStatus(); | ||
266 | - }, []);*/ | ||
267 | - | ||
268 | useEffect(() => { | 226 | useEffect(() => { |
269 | // 使用URLSearchParams来解析查询参数 | 227 | // 使用URLSearchParams来解析查询参数 |
270 | const params = new URLSearchParams(location.search); | 228 | const params = new URLSearchParams(location.search); |
@@ -355,16 +313,6 @@ const OrderPage = () => { | @@ -355,16 +313,6 @@ const OrderPage = () => { | ||
355 | } | 313 | } |
356 | 314 | ||
357 | /** | 315 | /** |
358 | - * 财务是否选中排序 | ||
359 | - * @param e | ||
360 | - */ | ||
361 | - function financeSorted(e: any) { | ||
362 | - let checked = e?.target.checked; | ||
363 | - setSorted(checked); | ||
364 | - refreshTable(); | ||
365 | - } | ||
366 | - | ||
367 | - /** | ||
368 | * 重置当前的操作对象 | 316 | * 重置当前的操作对象 |
369 | */ | 317 | */ |
370 | function clearOptObject() { | 318 | function clearOptObject() { |
@@ -840,7 +788,7 @@ const OrderPage = () => { | @@ -840,7 +788,7 @@ const OrderPage = () => { | ||
840 | onConfirm={() => { | 788 | onConfirm={() => { |
841 | window.open( | 789 | window.open( |
842 | '/previewApi/onlinePreview?url=' + | 790 | '/previewApi/onlinePreview?url=' + |
843 | - encodeURIComponent(Base64.encode(item.url)), | 791 | + encodeURIComponent(Base64.encode(item.url)), |
844 | ); | 792 | ); |
845 | }} | 793 | }} |
846 | onCancel={() => { | 794 | onCancel={() => { |
@@ -912,7 +860,7 @@ const OrderPage = () => { | @@ -912,7 +860,7 @@ const OrderPage = () => { | ||
912 | </span> | 860 | </span> |
913 | {(roleCode === 'salesRepresentative' || | 861 | {(roleCode === 'salesRepresentative' || |
914 | roleCode === 'salesManager') && | 862 | roleCode === 'salesManager') && |
915 | - !optRecord.isCurrentUserOrder ? ( | 863 | + !optRecord.isCurrentUserOrder ? ( |
916 | <span className="text-[#f44e4e]">(非本账号订单)</span> | 864 | <span className="text-[#f44e4e]">(非本账号订单)</span> |
917 | ) : ( | 865 | ) : ( |
918 | '' | 866 | '' |
@@ -1096,13 +1044,13 @@ const OrderPage = () => { | @@ -1096,13 +1044,13 @@ const OrderPage = () => { | ||
1096 | <Tooltip | 1044 | <Tooltip |
1097 | title={ | 1045 | title={ |
1098 | optRecord.invoicingUrgentCause !== null && | 1046 | optRecord.invoicingUrgentCause !== null && |
1099 | - optRecord.afterInvoicingStatus === | 1047 | + optRecord.afterInvoicingStatus === |
1100 | 'URGENT_INVOICE_AUDITING' | 1048 | 'URGENT_INVOICE_AUDITING' |
1101 | ? optRecord.invoicingUrgentCause | 1049 | ? optRecord.invoicingUrgentCause |
1102 | : enumValueToLabel( | 1050 | : enumValueToLabel( |
1103 | - optRecord.afterInvoicingStatus, | ||
1104 | - AFTER_INVOICING_STATUS, | ||
1105 | - ) | 1051 | + optRecord.afterInvoicingStatus, |
1052 | + AFTER_INVOICING_STATUS, | ||
1053 | + ) | ||
1106 | } | 1054 | } |
1107 | > | 1055 | > |
1108 | <Tag | 1056 | <Tag |
@@ -1133,7 +1081,7 @@ const OrderPage = () => { | @@ -1133,7 +1081,7 @@ const OrderPage = () => { | ||
1133 | )} | 1081 | )} |
1134 | 1082 | ||
1135 | {(roleCode === 'warehouseKeeper' || roleCode === 'admin') && | 1083 | {(roleCode === 'warehouseKeeper' || roleCode === 'admin') && |
1136 | - optRecord.shippingWarehouse !== null ? ( | 1084 | + optRecord.shippingWarehouse !== null ? ( |
1137 | <div | 1085 | <div |
1138 | className="overflow-hidden whitespace-no-wrap overflow-ellipsis" | 1086 | className="overflow-hidden whitespace-no-wrap overflow-ellipsis" |
1139 | title={enumValueToLabel( | 1087 | title={enumValueToLabel( |
@@ -1155,7 +1103,7 @@ const OrderPage = () => { | @@ -1155,7 +1103,7 @@ const OrderPage = () => { | ||
1155 | {/* 生产时间 */} | 1103 | {/* 生产时间 */} |
1156 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1104 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> |
1157 | {optRecord.productionStartTime !== null || | 1105 | {optRecord.productionStartTime !== null || |
1158 | - optRecord.productionEndTime !== null ? ( | 1106 | + optRecord.productionEndTime !== null ? ( |
1159 | <MyToolTip | 1107 | <MyToolTip |
1160 | title={ | 1108 | title={ |
1161 | formatdate(optRecord.productionStartTime) + | 1109 | formatdate(optRecord.productionStartTime) + |
@@ -1185,7 +1133,7 @@ const OrderPage = () => { | @@ -1185,7 +1133,7 @@ const OrderPage = () => { | ||
1185 | <Tag | 1133 | <Tag |
1186 | color={ | 1134 | color={ |
1187 | optRecord.invoicingTime === null || | 1135 | optRecord.invoicingTime === null || |
1188 | - optRecord.invoicingTime === undefined | 1136 | + optRecord.invoicingTime === undefined |
1189 | ? TAGS_COLOR.get(optRecord.invoicingStatus) | 1137 | ? TAGS_COLOR.get(optRecord.invoicingStatus) |
1190 | : 'success' | 1138 | : 'success' |
1191 | } | 1139 | } |
@@ -1213,7 +1161,7 @@ const OrderPage = () => { | @@ -1213,7 +1161,7 @@ const OrderPage = () => { | ||
1213 | 1161 | ||
1214 | {/**采购是否已下单状态 */} | 1162 | {/**采购是否已下单状态 */} |
1215 | {optRecord.procureOrderStatus !== null && | 1163 | {optRecord.procureOrderStatus !== null && |
1216 | - optRecord.procureOrderStatus !== undefined ? ( | 1164 | + optRecord.procureOrderStatus !== undefined ? ( |
1217 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1165 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> |
1218 | <Tag color="success"> | 1166 | <Tag color="success"> |
1219 | {enumValueToLabel( | 1167 | {enumValueToLabel( |
@@ -1229,21 +1177,21 @@ const OrderPage = () => { | @@ -1229,21 +1177,21 @@ const OrderPage = () => { | ||
1229 | {/* 物流信息 */} | 1177 | {/* 物流信息 */} |
1230 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1178 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> |
1231 | {optRecord.orderStatus === 'CONFIRM_RECEIPT' || | 1179 | {optRecord.orderStatus === 'CONFIRM_RECEIPT' || |
1232 | - optRecord.orderStatus === 'AFTER_SALES_COMPLETION' || | ||
1233 | - optRecord.orderStatus === 'IN_AFTER_SALES' || | ||
1234 | - optRecord.orderStatus === 'SHIPPED' ? ( | 1180 | + optRecord.orderStatus === 'AFTER_SALES_COMPLETION' || |
1181 | + optRecord.orderStatus === 'IN_AFTER_SALES' || | ||
1182 | + optRecord.orderStatus === 'SHIPPED' ? ( | ||
1235 | <MyToolTip | 1183 | <MyToolTip |
1236 | title={ | 1184 | title={ |
1237 | optRecord.serialNumber === undefined | 1185 | optRecord.serialNumber === undefined |
1238 | ? '暂无物流信息' | 1186 | ? '暂无物流信息' |
1239 | : enumValueToLabel( | 1187 | : enumValueToLabel( |
1240 | - optRecord.logisticsMethod, | ||
1241 | - LOGISTICS_STATUS_OPTIONS, | ||
1242 | - ) + | ||
1243 | - ' ' + | ||
1244 | - optRecord.serialNumber + | ||
1245 | - ' ' + | ||
1246 | - optRecord.logisticsNotes | 1188 | + optRecord.logisticsMethod, |
1189 | + LOGISTICS_STATUS_OPTIONS, | ||
1190 | + ) + | ||
1191 | + ' ' + | ||
1192 | + optRecord.serialNumber + | ||
1193 | + ' ' + | ||
1194 | + optRecord.logisticsNotes | ||
1247 | } | 1195 | } |
1248 | content={ | 1196 | content={ |
1249 | <Button type="link" size="small" style={{ padding: 0 }}> | 1197 | <Button type="link" size="small" style={{ padding: 0 }}> |
@@ -1257,7 +1205,7 @@ const OrderPage = () => { | @@ -1257,7 +1205,7 @@ const OrderPage = () => { | ||
1257 | 1205 | ||
1258 | {/* 修改审核状态 */} | 1206 | {/* 修改审核状态 */} |
1259 | {optRecord.modifiedAuditStatus !== null && | 1207 | {optRecord.modifiedAuditStatus !== null && |
1260 | - optRecord.modifiedAuditStatus !== 'AUDIT_FAILURE' ? ( | 1208 | + optRecord.modifiedAuditStatus !== 'AUDIT_FAILURE' ? ( |
1261 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1209 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> |
1262 | <Tooltip | 1210 | <Tooltip |
1263 | title={recordOptNode ? recordOptNode : <Spin />} | 1211 | title={recordOptNode ? recordOptNode : <Spin />} |
@@ -1697,7 +1645,7 @@ const OrderPage = () => { | @@ -1697,7 +1645,7 @@ const OrderPage = () => { | ||
1697 | )} | 1645 | )} |
1698 | 1646 | ||
1699 | {optRecord.paths?.includes('queryAnnex') && | 1647 | {optRecord.paths?.includes('queryAnnex') && |
1700 | - optRecord.listAnnex?.length > 0 ? ( | 1648 | + optRecord.listAnnex?.length > 0 ? ( |
1701 | <Button | 1649 | <Button |
1702 | className="p-0" | 1650 | className="p-0" |
1703 | type="link" | 1651 | type="link" |
@@ -2131,7 +2079,7 @@ const OrderPage = () => { | @@ -2131,7 +2079,7 @@ const OrderPage = () => { | ||
2131 | </Flex> | 2079 | </Flex> |
2132 | 2080 | ||
2133 | {(isProcure() || isWarehousekeeper() || isSales() || isAdmin()) && | 2081 | {(isProcure() || isWarehousekeeper() || isSales() || isAdmin()) && |
2134 | - !isSupplier() ? ( | 2082 | + !isSupplier() ? ( |
2135 | <div className="pt-2"> | 2083 | <div className="pt-2"> |
2136 | <Flex title={optRecord.supplierName}> | 2084 | <Flex title={optRecord.supplierName}> |
2137 | <div> | 2085 | <div> |
@@ -2206,7 +2154,7 @@ const OrderPage = () => { | @@ -2206,7 +2154,7 @@ const OrderPage = () => { | ||
2206 | <span className="text-[#8C8C8C]"> | 2154 | <span className="text-[#8C8C8C]"> |
2207 | 申请开票备注: | 2155 | 申请开票备注: |
2208 | {optRecord.applyInvoicingNotes === undefined || | 2156 | {optRecord.applyInvoicingNotes === undefined || |
2209 | - optRecord.applyInvoicingNotes === null | 2157 | + optRecord.applyInvoicingNotes === null |
2210 | ? '暂无备注' | 2158 | ? '暂无备注' |
2211 | : optRecord.applyInvoicingNotes} | 2159 | : optRecord.applyInvoicingNotes} |
2212 | </span> | 2160 | </span> |
@@ -2234,7 +2182,7 @@ const OrderPage = () => { | @@ -2234,7 +2182,7 @@ const OrderPage = () => { | ||
2234 | <span className="text-[#8C8C8C] mr-3"> | 2182 | <span className="text-[#8C8C8C] mr-3"> |
2235 | 财务审核备注: | 2183 | 财务审核备注: |
2236 | {optRecord.checkNotes === undefined || | 2184 | {optRecord.checkNotes === undefined || |
2237 | - optRecord.checkNotes === null | 2185 | + optRecord.checkNotes === null |
2238 | ? '暂无备注' | 2186 | ? '暂无备注' |
2239 | : optRecord.checkNotes} | 2187 | : optRecord.checkNotes} |
2240 | </span> | 2188 | </span> |
@@ -2258,7 +2206,7 @@ const OrderPage = () => { | @@ -2258,7 +2206,7 @@ const OrderPage = () => { | ||
2258 | <span className="text-[#8C8C8C]"> | 2206 | <span className="text-[#8C8C8C]"> |
2259 | 重新开票备注: | 2207 | 重新开票备注: |
2260 | {optRecord.reissueNotes === undefined || | 2208 | {optRecord.reissueNotes === undefined || |
2261 | - optRecord.reissueNotes === null | 2209 | + optRecord.reissueNotes === null |
2262 | ? '暂无备注' | 2210 | ? '暂无备注' |
2263 | : optRecord.reissueNotes} | 2211 | : optRecord.reissueNotes} |
2264 | </span> | 2212 | </span> |
@@ -2562,9 +2510,9 @@ const OrderPage = () => { | @@ -2562,9 +2510,9 @@ const OrderPage = () => { | ||
2562 | <span className="text-slate-700"> | 2510 | <span className="text-slate-700"> |
2563 | {record.receivingCompany !== null | 2511 | {record.receivingCompany !== null |
2564 | ? enumValueToLabel( | 2512 | ? enumValueToLabel( |
2565 | - record.receivingCompany, | ||
2566 | - getReceivingCompanyOptions(PAYEE_OPTIONS), | ||
2567 | - ) | 2513 | + record.receivingCompany, |
2514 | + getReceivingCompanyOptions(PAYEE_OPTIONS), | ||
2515 | + ) | ||
2568 | : '暂无'} | 2516 | : '暂无'} |
2569 | </span> | 2517 | </span> |
2570 | </div> | 2518 | </div> |
@@ -3356,9 +3304,9 @@ const OrderPage = () => { | @@ -3356,9 +3304,9 @@ const OrderPage = () => { | ||
3356 | for (let i = 0; i < selectedSubOrders.length; i++) { | 3304 | for (let i = 0; i < selectedSubOrders.length; i++) { |
3357 | if ( | 3305 | if ( |
3358 | selectedSubOrders[i].invoicingStatus === | 3306 | selectedSubOrders[i].invoicingStatus === |
3359 | - 'UN_INVOICE' || | 3307 | + 'UN_INVOICE' || |
3360 | selectedSubOrders[i].afterInvoicingStatus === | 3308 | selectedSubOrders[i].afterInvoicingStatus === |
3361 | - 'APPLY_FOR_INVOICING' | 3309 | + 'APPLY_FOR_INVOICING' |
3362 | ) { | 3310 | ) { |
3363 | message.error( | 3311 | message.error( |
3364 | '请选择需要开票且未申请开票的子订单进行申请', | 3312 | '请选择需要开票且未申请开票的子订单进行申请', |
@@ -3393,9 +3341,9 @@ const OrderPage = () => { | @@ -3393,9 +3341,9 @@ const OrderPage = () => { | ||
3393 | for (let i = 0; i < selectedSubOrders.length; i++) { | 3341 | for (let i = 0; i < selectedSubOrders.length; i++) { |
3394 | if ( | 3342 | if ( |
3395 | selectedSubOrders[i].invoicingStatus === | 3343 | selectedSubOrders[i].invoicingStatus === |
3396 | - 'UN_INVOICE' || | 3344 | + 'UN_INVOICE' || |
3397 | selectedSubOrders[i].afterInvoicingStatus === | 3345 | selectedSubOrders[i].afterInvoicingStatus === |
3398 | - 'APPLY_FOR_INVOICING' | 3346 | + 'APPLY_FOR_INVOICING' |
3399 | ) { | 3347 | ) { |
3400 | message.error( | 3348 | message.error( |
3401 | '请选择需要开票且未申请开票的子订单进行申请', | 3349 | '请选择需要开票且未申请开票的子订单进行申请', |
@@ -3600,13 +3548,13 @@ const OrderPage = () => { | @@ -3600,13 +3548,13 @@ const OrderPage = () => { | ||
3600 | if ( | 3548 | if ( |
3601 | selectedSubOrders[i].orderStatus !== 'AUDITED' && | 3549 | selectedSubOrders[i].orderStatus !== 'AUDITED' && |
3602 | selectedSubOrders[i].orderStatus !== | 3550 | selectedSubOrders[i].orderStatus !== |
3603 | - 'PROCURE_PROCESS' && | 3551 | + 'PROCURE_PROCESS' && |
3604 | selectedSubOrders[i].orderStatus !== | 3552 | selectedSubOrders[i].orderStatus !== |
3605 | - 'PROCURE_PROCESS_FOR_MINE' && | 3553 | + 'PROCURE_PROCESS_FOR_MINE' && |
3606 | selectedSubOrders[i].orderStatus !== | 3554 | selectedSubOrders[i].orderStatus !== |
3607 | - 'PROCURE_WAIT_SHIP' && | 3555 | + 'PROCURE_WAIT_SHIP' && |
3608 | selectedSubOrders[i].orderStatus !== | 3556 | selectedSubOrders[i].orderStatus !== |
3609 | - 'SUPPLIER_WAIT_SHIP' && | 3557 | + 'SUPPLIER_WAIT_SHIP' && |
3610 | selectedSubOrders[i].orderStatus !== 'WAIT_SHIP' | 3558 | selectedSubOrders[i].orderStatus !== 'WAIT_SHIP' |
3611 | ) { | 3559 | ) { |
3612 | message.error( | 3560 | message.error( |
@@ -3692,9 +3640,9 @@ const OrderPage = () => { | @@ -3692,9 +3640,9 @@ const OrderPage = () => { | ||
3692 | if ( | 3640 | if ( |
3693 | selectedSubOrders[i].orderStatus !== 'UNAUDITED' && | 3641 | selectedSubOrders[i].orderStatus !== 'UNAUDITED' && |
3694 | selectedSubOrders[i].orderStatus !== | 3642 | selectedSubOrders[i].orderStatus !== |
3695 | - 'FINANCE_PROCESS' && | 3643 | + 'FINANCE_PROCESS' && |
3696 | selectedSubOrders[i].orderStatus !== | 3644 | selectedSubOrders[i].orderStatus !== |
3697 | - 'LEADER_AUDITED' | 3645 | + 'LEADER_AUDITED' |
3698 | ) { | 3646 | ) { |
3699 | message.error( | 3647 | message.error( |
3700 | '请选择[未审核]、[财务待审核]、[领导已审核]的子订单进行审核', | 3648 | '请选择[未审核]、[财务待审核]、[领导已审核]的子订单进行审核', |
@@ -3762,9 +3710,9 @@ const OrderPage = () => { | @@ -3762,9 +3710,9 @@ const OrderPage = () => { | ||
3762 | for (let i = 0; i < selectedSubOrders.length; i++) { | 3710 | for (let i = 0; i < selectedSubOrders.length; i++) { |
3763 | if ( | 3711 | if ( |
3764 | selectedSubOrders[i].orderStatus !== | 3712 | selectedSubOrders[i].orderStatus !== |
3765 | - 'CONFIRM_RECEIPT' && | 3713 | + 'CONFIRM_RECEIPT' && |
3766 | selectedSubOrders[i].orderStatus !== | 3714 | selectedSubOrders[i].orderStatus !== |
3767 | - 'AFTER_SALES_FAILURE' | 3715 | + 'AFTER_SALES_FAILURE' |
3768 | ) { | 3716 | ) { |
3769 | message.error('请选择确认收货状态的子订单进行售后'); | 3717 | message.error('请选择确认收货状态的子订单进行售后'); |
3770 | return; | 3718 | return; |
@@ -4096,392 +4044,6 @@ const OrderPage = () => { | @@ -4096,392 +4044,6 @@ const OrderPage = () => { | ||
4096 | }); | 4044 | }); |
4097 | } | 4045 | } |
4098 | 4046 | ||
4099 | - function toolBarRender() { | ||
4100 | - let toolBtns = []; | ||
4101 | - let radios: any[] = []; | ||
4102 | - | ||
4103 | - radios.push(<Radio value={0}>全部</Radio>); | ||
4104 | - | ||
4105 | - if ( | ||
4106 | - roleCode === 'admin' || | ||
4107 | - roleCode === 'salesManager' || | ||
4108 | - roleCode === 'salesRepresentative' | ||
4109 | - ) { | ||
4110 | - radios.push(<Radio value={70}>只看作废</Radio>); | ||
4111 | - } | ||
4112 | - | ||
4113 | - if (roleCode === 'warehouseKeeper') { | ||
4114 | - radios.push(<Radio value={40}>待处理</Radio>); | ||
4115 | - } | ||
4116 | - | ||
4117 | - //采购可以筛选出需要处理的订单 | ||
4118 | - if (roleCode === 'procure' && !isSupplier()) { | ||
4119 | - radios.push(<Radio value={60}>其他采购</Radio>); | ||
4120 | - radios.push(<Radio value={10}>待处理</Radio>); | ||
4121 | - } | ||
4122 | - | ||
4123 | - //财务可以将需要处理的订单排序到前面 | ||
4124 | - if (roleCode === 'finance') { | ||
4125 | - radios.push(<Radio value={50}>加急</Radio>); | ||
4126 | - | ||
4127 | - radios.push(<Radio value={40}>待处理</Radio>); | ||
4128 | - | ||
4129 | - radios.push(<Checkbox onChange={financeSorted}>排序</Checkbox>); | ||
4130 | - } | ||
4131 | - | ||
4132 | - if (roleCode === 'salesRepresentative' || roleCode === 'salesManager') { | ||
4133 | - radios.push(<Radio value={30}>只看我创建</Radio>); | ||
4134 | - | ||
4135 | - radios.push(<Radio value={40}>待审核</Radio>); | ||
4136 | - } | ||
4137 | - | ||
4138 | - if (roleCode === 'admin') { | ||
4139 | - radios.push(<Radio value={10}>待处理</Radio>); | ||
4140 | - radios.push(<Checkbox onChange={financeSorted}>排序</Checkbox>); | ||
4141 | - } | ||
4142 | - | ||
4143 | - //筛选按钮配置 | ||
4144 | - let radioGroup = ( | ||
4145 | - <Radio.Group | ||
4146 | - onChange={(e: any) => { | ||
4147 | - setFilterCondition(e.target.value); | ||
4148 | - refreshTable(); | ||
4149 | - }} | ||
4150 | - defaultValue={0} | ||
4151 | - > | ||
4152 | - {radios} | ||
4153 | - </Radio.Group> | ||
4154 | - ); | ||
4155 | - | ||
4156 | - toolBtns.push(radioGroup); | ||
4157 | - | ||
4158 | - toolBtns.push(<ImportExpressBillModal></ImportExpressBillModal>); | ||
4159 | - | ||
4160 | - //导出按钮配置 | ||
4161 | - const exportItems: MenuProps['items'] = [ | ||
4162 | - { | ||
4163 | - label: '导出查询结果订单', | ||
4164 | - key: '2', | ||
4165 | - onClick: async () => { | ||
4166 | - let body = { flag: 50, ...searchParams }; | ||
4167 | - exportLoading(); | ||
4168 | - orderExport( | ||
4169 | - '/api/service/order/export', | ||
4170 | - '订单导出结果.xls', | ||
4171 | - 'POST', | ||
4172 | - body, | ||
4173 | - exportLoadingDestory, | ||
4174 | - ); | ||
4175 | - }, | ||
4176 | - }, | ||
4177 | - { | ||
4178 | - label: '导出已选中订单', | ||
4179 | - key: '1', | ||
4180 | - onClick: async () => { | ||
4181 | - if (mainOrderSelectedMap.size === 0) { | ||
4182 | - message.error('请选择订单'); | ||
4183 | - return; | ||
4184 | - } | ||
4185 | - let body = { flag: 30, id: Array.from(mainOrderSelectedMap.keys()) }; | ||
4186 | - exportLoading(); | ||
4187 | - orderExport( | ||
4188 | - '/api/service/order/export', | ||
4189 | - '订单导出结果.xls', | ||
4190 | - 'POST', | ||
4191 | - body, | ||
4192 | - exportLoadingDestory, | ||
4193 | - ); | ||
4194 | - }, | ||
4195 | - }, | ||
4196 | - { | ||
4197 | - label: '导出当天订单', | ||
4198 | - key: '4', | ||
4199 | - onClick: async () => { | ||
4200 | - let body = { flag: 40, ids: [] }; | ||
4201 | - exportLoading(); | ||
4202 | - orderExport( | ||
4203 | - '/api/service/order/export', | ||
4204 | - '订单导出结果.xls', | ||
4205 | - 'POST', | ||
4206 | - body, | ||
4207 | - exportLoadingDestory, | ||
4208 | - ); | ||
4209 | - }, | ||
4210 | - }, | ||
4211 | - { | ||
4212 | - label: '导出所有订单', | ||
4213 | - key: '3', | ||
4214 | - onClick: async () => { | ||
4215 | - let body = { flag: 10, ids: [] }; | ||
4216 | - exportLoading(); | ||
4217 | - orderExport( | ||
4218 | - '/api/service/order/export', | ||
4219 | - '订单导出结果.xls', | ||
4220 | - 'POST', | ||
4221 | - body, | ||
4222 | - exportLoadingDestory, | ||
4223 | - ); | ||
4224 | - }, | ||
4225 | - }, | ||
4226 | - ]; | ||
4227 | - | ||
4228 | - const exportMenuProps = { | ||
4229 | - items: exportItems, | ||
4230 | - onClick: () => { }, | ||
4231 | - }; | ||
4232 | - | ||
4233 | - //导出按钮配置 | ||
4234 | - const auditItems: MenuProps['items'] = [ | ||
4235 | - { | ||
4236 | - label: '后置审核', | ||
4237 | - key: '1', | ||
4238 | - onClick: async () => { | ||
4239 | - setIsMainOrder(true); | ||
4240 | - setCheckVisible(true); | ||
4241 | - setOrderCheckType(CHECK_TYPE.WAITING_FOR_POST_AUDIT); | ||
4242 | - }, | ||
4243 | - }, | ||
4244 | - { | ||
4245 | - label: '加急开票审核(旧)', | ||
4246 | - key: '2', | ||
4247 | - disabled: true, | ||
4248 | - onClick: async () => { | ||
4249 | - setIsMainOrder(true); | ||
4250 | - setCheckVisible(true); | ||
4251 | - setOrderCheckType(CHECK_TYPE.URGENT_INVOICE_AUDITING_OLD); | ||
4252 | - }, | ||
4253 | - }, | ||
4254 | - { | ||
4255 | - label: '领导审核', | ||
4256 | - key: '3', | ||
4257 | - onClick: async () => { | ||
4258 | - setIsMainOrder(true); | ||
4259 | - setCheckVisible(true); | ||
4260 | - setOrderCheckType(CHECK_TYPE.LEADER_AUDIT); | ||
4261 | - }, | ||
4262 | - }, | ||
4263 | - { | ||
4264 | - label: '修改申请审核', | ||
4265 | - key: '4', | ||
4266 | - onClick: async () => { | ||
4267 | - setIsMainOrder(true); | ||
4268 | - setCheckVisible(true); | ||
4269 | - setOrderCheckType(CHECK_TYPE.MODIFY_APPLY_WAIT_FOR_AUDIT); | ||
4270 | - }, | ||
4271 | - }, | ||
4272 | - ]; | ||
4273 | - | ||
4274 | - const auditProps = { | ||
4275 | - items: auditItems, | ||
4276 | - onClick: () => { }, | ||
4277 | - }; | ||
4278 | - | ||
4279 | - if (rolePath?.includes('leaderMergeAudit')) { | ||
4280 | - toolBtns.push( | ||
4281 | - <Dropdown | ||
4282 | - disabled={selectedSubOrderKeys.length === 0} | ||
4283 | - menu={auditProps} | ||
4284 | - > | ||
4285 | - <Button> | ||
4286 | - <Space> | ||
4287 | - 一键审核 | ||
4288 | - <DownOutlined /> | ||
4289 | - </Space> | ||
4290 | - </Button> | ||
4291 | - </Dropdown>, | ||
4292 | - ); | ||
4293 | - } | ||
4294 | - | ||
4295 | - if (rolePath?.includes('mergeAudit')) { | ||
4296 | - toolBtns.push( | ||
4297 | - <Button | ||
4298 | - type="primary" | ||
4299 | - key="out" | ||
4300 | - onClick={() => { | ||
4301 | - setIsMainOrder(true); | ||
4302 | - if (roleCode === 'procure') { | ||
4303 | - setProcureCheckModalVisible(true); | ||
4304 | - } | ||
4305 | - | ||
4306 | - if (roleCode === 'warehouseKeeper') { | ||
4307 | - setCheckVisible(true); | ||
4308 | - setOrderCheckType(CHECK_TYPE.WEARHOUSE_KEEPER); | ||
4309 | - } | ||
4310 | - }} | ||
4311 | - disabled={selectedSubOrderKeys?.length === 0} | ||
4312 | - > | ||
4313 | - 一键审核 | ||
4314 | - </Button>, | ||
4315 | - ); | ||
4316 | - } | ||
4317 | - | ||
4318 | - if (rolePath?.includes('mergeProcureOrder')) { | ||
4319 | - toolBtns.push( | ||
4320 | - <Button | ||
4321 | - key="mergeProcureOrder" | ||
4322 | - type="primary" | ||
4323 | - disabled={selectedSubOrderKeys.length === 0} | ||
4324 | - onClick={() => { | ||
4325 | - Modal.confirm({ | ||
4326 | - title: '一键下单', | ||
4327 | - content: '选中的订单是否都已下单?', | ||
4328 | - onOk: async () => { | ||
4329 | - let res = await postServiceOrderProcureOrder({ | ||
4330 | - data: { subIds: [...selectedSubOrderKeys.values()].flat() }, | ||
4331 | - }); | ||
4332 | - if (res.result === RESPONSE_CODE.SUCCESS) { | ||
4333 | - message.success(res.message); | ||
4334 | - refreshTable(); | ||
4335 | - return true; | ||
4336 | - } | ||
4337 | - }, | ||
4338 | - }); | ||
4339 | - }} | ||
4340 | - > | ||
4341 | - 一键下单 | ||
4342 | - </Button>, | ||
4343 | - ); | ||
4344 | - } | ||
4345 | - | ||
4346 | - if (rolePath?.includes('mergeApplyInvoicing')) { | ||
4347 | - toolBtns.push( | ||
4348 | - <Button | ||
4349 | - type="primary" | ||
4350 | - key="out" | ||
4351 | - onClick={() => { | ||
4352 | - setIsEdit(false); | ||
4353 | - setIsMainOrder(true); | ||
4354 | - setApplyForInvoicingVisible(true); | ||
4355 | - }} | ||
4356 | - disabled={!canMergeInvoicing} /*{selectedSubOrderKeys?.length === 0}*/ | ||
4357 | - > | ||
4358 | - {roleCode === 'admin' ? '合并(销售)' : '合并开票'} | ||
4359 | - </Button>, | ||
4360 | - ); | ||
4361 | - } | ||
4362 | - | ||
4363 | - <Button | ||
4364 | - type="primary" | ||
4365 | - key="out" | ||
4366 | - onClick={() => { | ||
4367 | - setIsEdit(false); | ||
4368 | - setIsMainOrder(true); | ||
4369 | - setInvoicingDrawerFormVisible(true); | ||
4370 | - }} | ||
4371 | - disabled={selectedSubOrderKeys?.length === 0} | ||
4372 | - > | ||
4373 | - 申请开票(旧) | ||
4374 | - </Button>; | ||
4375 | - | ||
4376 | - if (rolePath?.includes('mergeInvoicing')) { | ||
4377 | - toolBtns.push( | ||
4378 | - <Button | ||
4379 | - type="primary" | ||
4380 | - key="out" | ||
4381 | - onClick={() => { | ||
4382 | - //检查订单状态是否正确 | ||
4383 | - // 遍历Map中的键值对 | ||
4384 | - let errorIds = new Set(); | ||
4385 | - [...subOrderSelectedMap.values()].flat().forEach((subOrder) => { | ||
4386 | - if ( | ||
4387 | - subOrder.afterInvoicingStatus !== 'APPLY_FOR_INVOICING' && | ||
4388 | - subOrder.afterInvoicingStatus !== 'PARTIAL_INVOICING' | ||
4389 | - ) { | ||
4390 | - errorIds.add(subOrder.mainOrderId); | ||
4391 | - return; | ||
4392 | - } | ||
4393 | - }); | ||
4394 | - if (errorIds.size > 0) { | ||
4395 | - message.error( | ||
4396 | - '订单号为:' + | ||
4397 | - [...errorIds.values()].join(',') + | ||
4398 | - '的订单存在不是[申请开票]或者[部分开票]状态的子订单,请检查!', | ||
4399 | - ); | ||
4400 | - return; | ||
4401 | - } | ||
4402 | - setIsMainOrder(true); | ||
4403 | - setFinancialVisible(true); | ||
4404 | - }} | ||
4405 | - disabled={selectedSubOrderKeys?.length === 0} | ||
4406 | - > | ||
4407 | - {roleCode === 'admin' ? '合并(财务)' : '合并开票'} | ||
4408 | - </Button>, | ||
4409 | - ); | ||
4410 | - } | ||
4411 | - | ||
4412 | - toolBtns.push( | ||
4413 | - <Button | ||
4414 | - type="primary" | ||
4415 | - key="inv" | ||
4416 | - onClick={() => { | ||
4417 | - setIsMainOrder(true); | ||
4418 | - let flat = [...subOrderSelectedMap.values()].flat(); | ||
4419 | - //遍历flat,判断afterInvoicingStatusList存在于canApplyAfterInvoicingStatus | ||
4420 | - flat.forEach((item) => { | ||
4421 | - if ( | ||
4422 | - item.invoicingStatus === 'UN_INVOICE' || | ||
4423 | - (item.afterInvoicingStatus !== null && | ||
4424 | - !canApplyAfterInvoicingStatus.includes( | ||
4425 | - item.afterInvoicingStatus, | ||
4426 | - )) | ||
4427 | - ) { | ||
4428 | - message.error('存在不能进行开票的订单'); | ||
4429 | - return; | ||
4430 | - } | ||
4431 | - }); | ||
4432 | - //遍历afterInvoicingStatusList | ||
4433 | - setInvoicingDrawerFormVisible(true); | ||
4434 | - }} | ||
4435 | - disabled={selectedSubOrderKeys?.length === 0} | ||
4436 | - > | ||
4437 | - 申请开票 | ||
4438 | - </Button>, | ||
4439 | - ); | ||
4440 | - | ||
4441 | - if (rolePath?.includes('addOrder')) { | ||
4442 | - toolBtns.push( | ||
4443 | - <Button | ||
4444 | - type="primary" | ||
4445 | - key="out" | ||
4446 | - onClick={() => { | ||
4447 | - setOrderDrawerVisible(true); | ||
4448 | - setOrderOptType('add'); | ||
4449 | - }} | ||
4450 | - > | ||
4451 | - 新增 | ||
4452 | - </Button>, | ||
4453 | - ); | ||
4454 | - } | ||
4455 | - | ||
4456 | - if (rolePath?.includes('importExcel')) { | ||
4457 | - toolBtns.push( | ||
4458 | - <Button | ||
4459 | - type="primary" | ||
4460 | - key="out" | ||
4461 | - onClick={() => { | ||
4462 | - setImportModalVisible(true); | ||
4463 | - }} | ||
4464 | - > | ||
4465 | - 批量发货 | ||
4466 | - </Button>, | ||
4467 | - ); | ||
4468 | - } | ||
4469 | - | ||
4470 | - if (rolePath?.includes('export')) { | ||
4471 | - toolBtns.push( | ||
4472 | - <Dropdown menu={exportMenuProps}> | ||
4473 | - <Button> | ||
4474 | - <Space> | ||
4475 | - 导出 | ||
4476 | - <DownOutlined /> | ||
4477 | - </Space> | ||
4478 | - </Button> | ||
4479 | - </Dropdown>, | ||
4480 | - ); | ||
4481 | - } | ||
4482 | - | ||
4483 | - return toolBtns; | ||
4484 | - } | ||
4485 | //选择天数1 | 4047 | //选择天数1 |
4486 | const options1 = [ | 4048 | const options1 = [ |
4487 | { | 4049 | { |
@@ -4526,7 +4088,7 @@ const OrderPage = () => { | @@ -4526,7 +4088,7 @@ const OrderPage = () => { | ||
4526 | }; | 4088 | }; |
4527 | const confirmInvoice = () => { | 4089 | const confirmInvoice = () => { |
4528 | console.log('5656confirm'); | 4090 | console.log('5656confirm'); |
4529 | - } | 4091 | + }; |
4530 | const [invoiceWarningNum, setInvoiceWarningNum] = useState(1); | 4092 | const [invoiceWarningNum, setInvoiceWarningNum] = useState(1); |
4531 | const [invoiceRefundWarningNum, setInvoiceRefundWarningNum] = useState(1); | 4093 | const [invoiceRefundWarningNum, setInvoiceRefundWarningNum] = useState(1); |
4532 | async function getInvoiceWarningNum() { | 4094 | async function getInvoiceWarningNum() { |
@@ -4551,9 +4113,13 @@ const OrderPage = () => { | @@ -4551,9 +4113,13 @@ const OrderPage = () => { | ||
4551 | children: ( | 4113 | children: ( |
4552 | <div> | 4114 | <div> |
4553 | <div style={{ position: 'relative' }}> | 4115 | <div style={{ position: 'relative' }}> |
4554 | - <Radio.Group options={options1} onChange={radioOnChange1} value={value1} /> | 4116 | + <Radio.Group |
4117 | + options={options1} | ||
4118 | + onChange={radioOnChange1} | ||
4119 | + value={value1} | ||
4120 | + /> | ||
4555 | <Button | 4121 | <Button |
4556 | - size='large' | 4122 | + size="large" |
4557 | type="primary" | 4123 | type="primary" |
4558 | onClick={confirmInvoice} | 4124 | onClick={confirmInvoice} |
4559 | style={{ position: 'absolute', right: '20px' }} | 4125 | style={{ position: 'absolute', right: '20px' }} |
@@ -4608,88 +4174,87 @@ const OrderPage = () => { | @@ -4608,88 +4174,87 @@ const OrderPage = () => { | ||
4608 | search={false} | 4174 | search={false} |
4609 | // labelWidth: 'auto', | 4175 | // labelWidth: 'auto', |
4610 | // onCollapse: resize, | 4176 | // onCollapse: resize, |
4611 | - request={ | ||
4612 | - async ( | ||
4613 | - // 第一个参数 params 查询表单和 params 参数的结合 | ||
4614 | - // 第一个参数中一定会有 pageSize 和 current ,这两个参数是 antd 的规范 | ||
4615 | - params, | 4177 | + request={async ( |
4178 | + // 第一个参数 params 查询表单和 params 参数的结合 | ||
4179 | + // 第一个参数中一定会有 pageSize 和 current ,这两个参数是 antd 的规范 | ||
4180 | + params, | ||
4181 | + sorter, | ||
4182 | + filter, | ||
4183 | + ) => { | ||
4184 | + //订单id处理 | ||
4185 | + /** | ||
4186 | + * 以params中的id为主,如果params没id,则取url中的id | ||
4187 | + * 第一次进来这个页面,url带有id的话,会自动填充到查询表单中,但是第一次查询params不会带这个id进来 | ||
4188 | + */ | ||
4189 | + let orderIds = mainTableFormRef.current?.getFieldValue('id'); | ||
4190 | + let subOrderId = | ||
4191 | + mainTableFormRef.current?.getFieldValue('subOrderId'); | ||
4192 | + params.id = params.id || orderIds; | ||
4193 | + params.subOrderId = params.subOrderId || subOrderId; | ||
4194 | + if (params.id !== '') { | ||
4195 | + params.id = params.id?.replace(/ /g, ''); | ||
4196 | + if (params.id?.indexOf(',')) { | ||
4197 | + params.id = params.id.split(','); | ||
4198 | + params.id = params.id.filter((id) => { | ||
4199 | + return id !== ''; | ||
4200 | + }); | ||
4201 | + } | ||
4202 | + } | ||
4203 | + | ||
4204 | + params.condition = filterCondifion; | ||
4205 | + | ||
4206 | + //排序 | ||
4207 | + params.sorted = sorted; | ||
4208 | + //是否只查看已作废 | ||
4209 | + params.isDeleteQueryOrder = filterCondifion === 70; | ||
4210 | + //保存这个搜索条件 | ||
4211 | + params.orderStatus = 'CONFIRM_RECEIPT'; | ||
4212 | + params.invoicingStatus = 'UN_INVOICE'; | ||
4213 | + params.statusDatetimeGe = calDate; | ||
4214 | + console.log(params, '5656finalparams'); | ||
4215 | + setSearchParam(params); | ||
4216 | + //订单标记1 | ||
4217 | + const { data } = await postServiceOrderQueryServiceOrder({ | ||
4218 | + // ...params, | ||
4219 | + // FIXME: remove @ts-ignore | ||
4220 | + // @ts-ignore | ||
4616 | sorter, | 4221 | sorter, |
4617 | filter, | 4222 | filter, |
4618 | - ) => { | ||
4619 | - //订单id处理 | ||
4620 | - /** | ||
4621 | - * 以params中的id为主,如果params没id,则取url中的id | ||
4622 | - * 第一次进来这个页面,url带有id的话,会自动填充到查询表单中,但是第一次查询params不会带这个id进来 | ||
4623 | - */ | ||
4624 | - let orderIds = mainTableFormRef.current?.getFieldValue('id'); | ||
4625 | - let subOrderId = | ||
4626 | - mainTableFormRef.current?.getFieldValue('subOrderId'); | ||
4627 | - params.id = params.id || orderIds; | ||
4628 | - params.subOrderId = params.subOrderId || subOrderId; | ||
4629 | - if (params.id !== '') { | ||
4630 | - params.id = params.id?.replace(/ /g, ''); | ||
4631 | - if (params.id?.indexOf(',')) { | ||
4632 | - params.id = params.id.split(','); | ||
4633 | - params.id = params.id.filter((id) => { | ||
4634 | - return id !== ''; | ||
4635 | - }); | ||
4636 | - } | ||
4637 | - } | 4223 | + data: { ...params }, |
4224 | + }); | ||
4638 | 4225 | ||
4639 | - params.condition = filterCondifion; | ||
4640 | - | ||
4641 | - //排序 | ||
4642 | - params.sorted = sorted; | ||
4643 | - //是否只查看已作废 | ||
4644 | - params.isDeleteQueryOrder = filterCondifion === 70; | ||
4645 | - //保存这个搜索条件 | ||
4646 | - params.orderStatus = 'CONFIRM_RECEIPT'; | ||
4647 | - params.invoicingStatus = 'UN_INVOICE'; | ||
4648 | - params.statusDatetimeGe = calDate; | ||
4649 | - console.log(params, '5656finalparams'); | ||
4650 | - setSearchParam(params); | ||
4651 | - //订单标记1 | ||
4652 | - const { data } = await postServiceOrderQueryServiceOrder({ | ||
4653 | - // ...params, | ||
4654 | - // FIXME: remove @ts-ignore | ||
4655 | - // @ts-ignore | ||
4656 | - sorter, | ||
4657 | - filter, | ||
4658 | - data: { ...params }, | ||
4659 | - }); | 4226 | + setRolePath(data.specialPath); |
4227 | + setSubOrderCount(data.count); | ||
4228 | + setAllMainChecked(false); | ||
4229 | + setSelectedMainOrderKeys([]); | ||
4230 | + subOrderSelectedMap.clear(); | ||
4231 | + mainOrderSelectedMap.clear(); | ||
4232 | + setData(data?.data); | ||
4660 | 4233 | ||
4661 | - setRolePath(data.specialPath); | ||
4662 | - setSubOrderCount(data.count); | ||
4663 | - setAllMainChecked(false); | ||
4664 | - setSelectedMainOrderKeys([]); | ||
4665 | - subOrderSelectedMap.clear(); | ||
4666 | - mainOrderSelectedMap.clear(); | ||
4667 | - setData(data?.data); | ||
4668 | - | ||
4669 | - //主订单id与子订单id的对照关系保存 | ||
4670 | - mainOrderIdSubOrderIdRelationsMap.clear(); | ||
4671 | - for (let row of data?.data) { | ||
4672 | - let mianOrderId = row.id; | ||
4673 | - let subOrderIds = row.subOrderInformationLists?.map((item) => { | ||
4674 | - //目前子订单存储的totalPayment不准确,这里重新处理取主订单的totalPayment | ||
4675 | - //totalPayment在财务开票计算金额时使用到 | ||
4676 | - item.totalPayment = row.totalPayment; | ||
4677 | - return item.id; | ||
4678 | - }); | ||
4679 | - mainOrderIdSubOrderIdRelationsMap.set(mianOrderId, subOrderIds); | ||
4680 | - } | 4234 | + //主订单id与子订单id的对照关系保存 |
4235 | + mainOrderIdSubOrderIdRelationsMap.clear(); | ||
4236 | + for (let row of data?.data) { | ||
4237 | + let mianOrderId = row.id; | ||
4238 | + let subOrderIds = row.subOrderInformationLists?.map((item) => { | ||
4239 | + //目前子订单存储的totalPayment不准确,这里重新处理取主订单的totalPayment | ||
4240 | + //totalPayment在财务开票计算金额时使用到 | ||
4241 | + item.totalPayment = row.totalPayment; | ||
4242 | + return item.id; | ||
4243 | + }); | ||
4244 | + mainOrderIdSubOrderIdRelationsMap.set(mianOrderId, subOrderIds); | ||
4245 | + } | ||
4681 | 4246 | ||
4682 | - return { | ||
4683 | - data: data?.data || [], | ||
4684 | - total: data?.total || 0, | ||
4685 | - }; | ||
4686 | - }} | 4247 | + return { |
4248 | + data: data?.data || [], | ||
4249 | + total: data?.total || 0, | ||
4250 | + }; | ||
4251 | + }} | ||
4687 | toolbar={{ | 4252 | toolbar={{ |
4688 | multipleLine: true, | 4253 | multipleLine: true, |
4689 | }} | 4254 | }} |
4690 | - // toolBarRender={() => { | ||
4691 | - // return toolBarRender(); | ||
4692 | - // }} | 4255 | + // toolBarRender={() => { |
4256 | + // return toolBarRender(); | ||
4257 | + // }} | ||
4693 | /> | 4258 | /> |
4694 | 4259 | ||
4695 | {orderDrawerVisible && ( | 4260 | {orderDrawerVisible && ( |
@@ -5173,7 +4738,7 @@ const OrderPage = () => { | @@ -5173,7 +4738,7 @@ const OrderPage = () => { | ||
5173 | {contextHolder} | 4738 | {contextHolder} |
5174 | <FloatButton.BackTop visibilityHeight={0} /> | 4739 | <FloatButton.BackTop visibilityHeight={0} /> |
5175 | </div> | 4740 | </div> |
5176 | - ) | 4741 | + ), |
5177 | }, | 4742 | }, |
5178 | { | 4743 | { |
5179 | key: 2, | 4744 | key: 2, |
@@ -5185,7 +4750,11 @@ const OrderPage = () => { | @@ -5185,7 +4750,11 @@ const OrderPage = () => { | ||
5185 | ), | 4750 | ), |
5186 | children: ( | 4751 | children: ( |
5187 | <div> | 4752 | <div> |
5188 | - <Radio.Group options={options2} onChange={radioOnChange2} value={value2} /> | 4753 | + <Radio.Group |
4754 | + options={options2} | ||
4755 | + onChange={radioOnChange2} | ||
4756 | + value={value2} | ||
4757 | + /> | ||
5189 | <div style={{ height: '25px' }}></div> | 4758 | <div style={{ height: '25px' }}></div> |
5190 | <ProTable | 4759 | <ProTable |
5191 | id="main-table" | 4760 | id="main-table" |
@@ -5241,7 +4810,7 @@ const OrderPage = () => { | @@ -5241,7 +4810,7 @@ const OrderPage = () => { | ||
5241 | filter, | 4810 | filter, |
5242 | ) => { | 4811 | ) => { |
5243 | params.orderStatus = 'CONFIRM_INVOICE'; | 4812 | params.orderStatus = 'CONFIRM_INVOICE'; |
5244 | - console.log(params, '5656params') | 4813 | + console.log(params, '5656params'); |
5245 | //订单id处理 | 4814 | //订单id处理 |
5246 | /** | 4815 | /** |
5247 | * 以params中的id为主,如果params没id,则取url中的id | 4816 | * 以params中的id为主,如果params没id,则取url中的id |
@@ -5271,9 +4840,6 @@ const OrderPage = () => { | @@ -5271,9 +4840,6 @@ const OrderPage = () => { | ||
5271 | //保存这个搜索条件 | 4840 | //保存这个搜索条件 |
5272 | setSearchParam(params); | 4841 | setSearchParam(params); |
5273 | 4842 | ||
5274 | - useEffect(() => { | ||
5275 | - //预警订单 | ||
5276 | - }, []); | ||
5277 | //订单标记2 | 4843 | //订单标记2 |
5278 | const { data } = await postServiceOrderQueryServiceOrder({ | 4844 | const { data } = await postServiceOrderQueryServiceOrder({ |
5279 | // ...params, | 4845 | // ...params, |
@@ -5313,9 +4879,9 @@ const OrderPage = () => { | @@ -5313,9 +4879,9 @@ const OrderPage = () => { | ||
5313 | toolbar={{ | 4879 | toolbar={{ |
5314 | multipleLine: true, | 4880 | multipleLine: true, |
5315 | }} | 4881 | }} |
5316 | - // toolBarRender={() => { | ||
5317 | - // return toolBarRender(); | ||
5318 | - // }} | 4882 | + // toolBarRender={() => { |
4883 | + // return toolBarRender(); | ||
4884 | + // }} | ||
5319 | /> | 4885 | /> |
5320 | 4886 | ||
5321 | {orderDrawerVisible && ( | 4887 | {orderDrawerVisible && ( |
@@ -5333,527 +4899,475 @@ const OrderPage = () => { | @@ -5333,527 +4899,475 @@ const OrderPage = () => { | ||
5333 | /> | 4899 | /> |
5334 | )} | 4900 | )} |
5335 | 4901 | ||
5336 | - { | ||
5337 | - checkVisible && ( | ||
5338 | - <CheckModal | ||
5339 | - setCheckVisible={(val: boolean) => { | ||
5340 | - setCheckVisible(val); | ||
5341 | - if (!val) { | ||
5342 | - clearOptObject(); | ||
5343 | - } | ||
5344 | - }} | ||
5345 | - data={isMainOrder ? getFirstMainOrder() : buildMainOrder()} | ||
5346 | - subOrders={ | ||
5347 | - isMainOrder | ||
5348 | - ? [...subOrderSelectedMap.values()].flat() | ||
5349 | - : buildSubOrders() | ||
5350 | - } | ||
5351 | - orderCheckType={orderCheckType} | ||
5352 | - openOrderDrawer={(type: any, id: any) => { | ||
5353 | - setCurrentMainId(id); | ||
5354 | - setOrderOptType(type); | ||
5355 | - setOrderDrawerVisible(true); | ||
5356 | - }} | ||
5357 | - onClose={() => { | 4902 | + {checkVisible && ( |
4903 | + <CheckModal | ||
4904 | + setCheckVisible={(val: boolean) => { | ||
4905 | + setCheckVisible(val); | ||
4906 | + if (!val) { | ||
5358 | clearOptObject(); | 4907 | clearOptObject(); |
5359 | - setCheckVisible(false); | ||
5360 | - refreshTable(); | ||
5361 | - }} | ||
5362 | - /> | ||
5363 | - ) | ||
5364 | - } | ||
5365 | - | ||
5366 | - { | ||
5367 | - applyForInvoicingVisible && ( | ||
5368 | - <ApplyForInvoicingModal | ||
5369 | - setCheckVisible={(val: boolean) => { | ||
5370 | - setApplyForInvoicingVisible(val); | ||
5371 | - if (!val) { | ||
5372 | - clearOptObject(); | ||
5373 | - } | ||
5374 | - }} | ||
5375 | - subOrders={ | ||
5376 | - isMainOrder | ||
5377 | - ? [...subOrderSelectedMap.values()].flat() | ||
5378 | - : buildSubOrders() | ||
5379 | } | 4908 | } |
5380 | - totalPayment={getApplyInvoicingTotalPayment()} | ||
5381 | - isMainOrder={isMainOrder} | ||
5382 | - isEdit={isEdit} | ||
5383 | - onClose={() => { | ||
5384 | - setApplyForInvoicingVisible(false); | ||
5385 | - setIsMainOrder(false); | ||
5386 | - clearOptObject(); | ||
5387 | - refreshTable(); | ||
5388 | - }} | ||
5389 | - /> | ||
5390 | - ) | ||
5391 | - } | ||
5392 | - | ||
5393 | - { | ||
5394 | - notesEditVisible && ( | ||
5395 | - <OrderNotesEditModal | ||
5396 | - setNotesEditVisible={(val: boolean) => { | ||
5397 | - setNotesEditVisible(val); | ||
5398 | - if (!val) { | ||
5399 | - clearOptObject(); | ||
5400 | - } | ||
5401 | - }} | ||
5402 | - ids={selectedRows} | ||
5403 | - notesType={notesType} | ||
5404 | - notes={notes} | ||
5405 | - onClose={() => { | ||
5406 | - setNotesEditVisible(false); | ||
5407 | - setSelectedRows([]); | ||
5408 | - setNotes(notes); | ||
5409 | - setNotesType(1); | ||
5410 | - refreshTable(); | ||
5411 | - }} | ||
5412 | - /> | ||
5413 | - ) | ||
5414 | - } | 4909 | + }} |
4910 | + data={isMainOrder ? getFirstMainOrder() : buildMainOrder()} | ||
4911 | + subOrders={ | ||
4912 | + isMainOrder | ||
4913 | + ? [...subOrderSelectedMap.values()].flat() | ||
4914 | + : buildSubOrders() | ||
4915 | + } | ||
4916 | + orderCheckType={orderCheckType} | ||
4917 | + openOrderDrawer={(type: any, id: any) => { | ||
4918 | + setCurrentMainId(id); | ||
4919 | + setOrderOptType(type); | ||
4920 | + setOrderDrawerVisible(true); | ||
4921 | + }} | ||
4922 | + onClose={() => { | ||
4923 | + clearOptObject(); | ||
4924 | + setCheckVisible(false); | ||
4925 | + refreshTable(); | ||
4926 | + }} | ||
4927 | + /> | ||
4928 | + )} | ||
5415 | 4929 | ||
5416 | - { | ||
5417 | - deliverVisible && ( | ||
5418 | - <DeliverModal | ||
5419 | - data={buildSubOrders()} | ||
5420 | - isSendProduct={isSendProduct} | ||
5421 | - setVisible={(val: boolean) => { | ||
5422 | - setDeliverVisible(val); | ||
5423 | - if (!val) { | ||
5424 | - clearOptObject(); | ||
5425 | - } | ||
5426 | - }} | ||
5427 | - sendType={orderCheckType} | ||
5428 | - onClose={() => { | 4930 | + {applyForInvoicingVisible && ( |
4931 | + <ApplyForInvoicingModal | ||
4932 | + setCheckVisible={(val: boolean) => { | ||
4933 | + setApplyForInvoicingVisible(val); | ||
4934 | + if (!val) { | ||
5429 | clearOptObject(); | 4935 | clearOptObject(); |
5430 | - setDeliverVisible(false); | ||
5431 | - setIsSendProduct(false); | ||
5432 | - refreshTable(); | ||
5433 | - }} | ||
5434 | - /> | ||
5435 | - ) | ||
5436 | - } | ||
5437 | - | ||
5438 | - { | ||
5439 | - financialVisible && ( | ||
5440 | - <FinancialDrawer | ||
5441 | - isEdit={isEdit} | ||
5442 | - mainOrder={isMainOrder ? getFirstMainOrder() : buildMainOrder()} | ||
5443 | - subOrders={ | ||
5444 | - isMainOrder | ||
5445 | - ? [...subOrderSelectedMap.values()].flat() | ||
5446 | - : buildSubOrders() | ||
5447 | } | 4936 | } |
5448 | - isMainOrder={isMainOrder} | ||
5449 | - cancel={() => { | ||
5450 | - setFinancialVisible(false); | ||
5451 | - clearOptObject(); | ||
5452 | - setIsMainOrder(false); | ||
5453 | - setIsEdit(false); | ||
5454 | - }} | ||
5455 | - onClose={() => { | ||
5456 | - setFinancialVisible(false); | ||
5457 | - clearOptObject(); | ||
5458 | - refreshTable(); | ||
5459 | - setIsMainOrder(false); | ||
5460 | - setIsEdit(false); | ||
5461 | - }} | ||
5462 | - /> | ||
5463 | - ) | ||
5464 | - } | 4937 | + }} |
4938 | + subOrders={ | ||
4939 | + isMainOrder | ||
4940 | + ? [...subOrderSelectedMap.values()].flat() | ||
4941 | + : buildSubOrders() | ||
4942 | + } | ||
4943 | + totalPayment={getApplyInvoicingTotalPayment()} | ||
4944 | + isMainOrder={isMainOrder} | ||
4945 | + isEdit={isEdit} | ||
4946 | + onClose={() => { | ||
4947 | + setApplyForInvoicingVisible(false); | ||
4948 | + setIsMainOrder(false); | ||
4949 | + clearOptObject(); | ||
4950 | + refreshTable(); | ||
4951 | + }} | ||
4952 | + /> | ||
4953 | + )} | ||
5465 | 4954 | ||
5466 | - { | ||
5467 | - financialEditVisible && ( | ||
5468 | - <FinancialEditDrawer | ||
5469 | - mainOrder={buildMainOrder()} | ||
5470 | - subOrders={buildSubOrders()} | ||
5471 | - isMainOrder={isMainOrder} | ||
5472 | - setVisible={() => { | ||
5473 | - setFinancialEditVisible(false); | 4955 | + {notesEditVisible && ( |
4956 | + <OrderNotesEditModal | ||
4957 | + setNotesEditVisible={(val: boolean) => { | ||
4958 | + setNotesEditVisible(val); | ||
4959 | + if (!val) { | ||
5474 | clearOptObject(); | 4960 | clearOptObject(); |
5475 | - }} | ||
5476 | - onClose={() => { | ||
5477 | - setFinancialEditVisible(false); | ||
5478 | - refreshTable(); | ||
5479 | - setIsMainOrder(false); | 4961 | + } |
4962 | + }} | ||
4963 | + ids={selectedRows} | ||
4964 | + notesType={notesType} | ||
4965 | + notes={notes} | ||
4966 | + onClose={() => { | ||
4967 | + setNotesEditVisible(false); | ||
4968 | + setSelectedRows([]); | ||
4969 | + setNotes(notes); | ||
4970 | + setNotesType(1); | ||
4971 | + refreshTable(); | ||
4972 | + }} | ||
4973 | + /> | ||
4974 | + )} | ||
4975 | + | ||
4976 | + {deliverVisible && ( | ||
4977 | + <DeliverModal | ||
4978 | + data={buildSubOrders()} | ||
4979 | + isSendProduct={isSendProduct} | ||
4980 | + setVisible={(val: boolean) => { | ||
4981 | + setDeliverVisible(val); | ||
4982 | + if (!val) { | ||
5480 | clearOptObject(); | 4983 | clearOptObject(); |
5481 | - }} | ||
5482 | - /> | ||
5483 | - ) | ||
5484 | - } | 4984 | + } |
4985 | + }} | ||
4986 | + sendType={orderCheckType} | ||
4987 | + onClose={() => { | ||
4988 | + clearOptObject(); | ||
4989 | + setDeliverVisible(false); | ||
4990 | + setIsSendProduct(false); | ||
4991 | + refreshTable(); | ||
4992 | + }} | ||
4993 | + /> | ||
4994 | + )} | ||
5485 | 4995 | ||
5486 | - { | ||
5487 | - orderPrintVisible && ( | ||
5488 | - <OrderPrintModal | ||
5489 | - mainOrder={buildMainOrder()} | ||
5490 | - subOrders={buildSubOrders()} | ||
5491 | - isRePrint={isRePrintOrder} | ||
5492 | - setVisible={(val: boolean) => { | ||
5493 | - setOrderPrintVisible(val); | ||
5494 | - if (!val) { | ||
5495 | - clearOptObject(); | ||
5496 | - } | ||
5497 | - }} | ||
5498 | - printOptType={orderCheckType} | ||
5499 | - onClose={() => { | ||
5500 | - setOrderPrintVisible(false); | 4996 | + {financialVisible && ( |
4997 | + <FinancialDrawer | ||
4998 | + isEdit={isEdit} | ||
4999 | + mainOrder={isMainOrder ? getFirstMainOrder() : buildMainOrder()} | ||
5000 | + subOrders={ | ||
5001 | + isMainOrder | ||
5002 | + ? [...subOrderSelectedMap.values()].flat() | ||
5003 | + : buildSubOrders() | ||
5004 | + } | ||
5005 | + isMainOrder={isMainOrder} | ||
5006 | + cancel={() => { | ||
5007 | + setFinancialVisible(false); | ||
5008 | + clearOptObject(); | ||
5009 | + setIsMainOrder(false); | ||
5010 | + setIsEdit(false); | ||
5011 | + }} | ||
5012 | + onClose={() => { | ||
5013 | + setFinancialVisible(false); | ||
5014 | + clearOptObject(); | ||
5015 | + refreshTable(); | ||
5016 | + setIsMainOrder(false); | ||
5017 | + setIsEdit(false); | ||
5018 | + }} | ||
5019 | + /> | ||
5020 | + )} | ||
5021 | + | ||
5022 | + {financialEditVisible && ( | ||
5023 | + <FinancialEditDrawer | ||
5024 | + mainOrder={buildMainOrder()} | ||
5025 | + subOrders={buildSubOrders()} | ||
5026 | + isMainOrder={isMainOrder} | ||
5027 | + setVisible={() => { | ||
5028 | + setFinancialEditVisible(false); | ||
5029 | + clearOptObject(); | ||
5030 | + }} | ||
5031 | + onClose={() => { | ||
5032 | + setFinancialEditVisible(false); | ||
5033 | + refreshTable(); | ||
5034 | + setIsMainOrder(false); | ||
5035 | + clearOptObject(); | ||
5036 | + }} | ||
5037 | + /> | ||
5038 | + )} | ||
5039 | + | ||
5040 | + {orderPrintVisible && ( | ||
5041 | + <OrderPrintModal | ||
5042 | + mainOrder={buildMainOrder()} | ||
5043 | + subOrders={buildSubOrders()} | ||
5044 | + isRePrint={isRePrintOrder} | ||
5045 | + setVisible={(val: boolean) => { | ||
5046 | + setOrderPrintVisible(val); | ||
5047 | + if (!val) { | ||
5501 | clearOptObject(); | 5048 | clearOptObject(); |
5502 | - setIsRePrintOrder(false); | ||
5503 | - refreshTable(); | ||
5504 | - }} | ||
5505 | - /> | ||
5506 | - ) | ||
5507 | - } | 5049 | + } |
5050 | + }} | ||
5051 | + printOptType={orderCheckType} | ||
5052 | + onClose={() => { | ||
5053 | + setOrderPrintVisible(false); | ||
5054 | + clearOptObject(); | ||
5055 | + setIsRePrintOrder(false); | ||
5056 | + refreshTable(); | ||
5057 | + }} | ||
5058 | + /> | ||
5059 | + )} | ||
5508 | 5060 | ||
5509 | - { | ||
5510 | - confirmReceiptVisible && ( | ||
5511 | - <ConfirmReceiptModal | ||
5512 | - data={buildSubOrders()} | ||
5513 | - onClose={() => { | ||
5514 | - setConfirmReceiptVisible(false); | 5061 | + {confirmReceiptVisible && ( |
5062 | + <ConfirmReceiptModal | ||
5063 | + data={buildSubOrders()} | ||
5064 | + onClose={() => { | ||
5065 | + setConfirmReceiptVisible(false); | ||
5066 | + clearOptObject(); | ||
5067 | + refreshTable(); | ||
5068 | + }} | ||
5069 | + /> | ||
5070 | + )} | ||
5071 | + | ||
5072 | + {imagesViewerModalVisible && ( | ||
5073 | + <ImagesViewerModal | ||
5074 | + optType={imagesViewerOptType} | ||
5075 | + setVisible={(val: boolean) => { | ||
5076 | + setImagesViewerModalVisible(val); | ||
5077 | + if (!val) { | ||
5515 | clearOptObject(); | 5078 | clearOptObject(); |
5516 | - refreshTable(); | ||
5517 | - }} | ||
5518 | - /> | ||
5519 | - ) | ||
5520 | - } | 5079 | + } |
5080 | + }} | ||
5081 | + onClose={() => { | ||
5082 | + setImagesViewerModalVisible(false); | ||
5083 | + }} | ||
5084 | + orderRow={buildSubOrders()[0]} | ||
5085 | + /> | ||
5086 | + )} | ||
5521 | 5087 | ||
5522 | - { | ||
5523 | - imagesViewerModalVisible && ( | ||
5524 | - <ImagesViewerModal | ||
5525 | - optType={imagesViewerOptType} | ||
5526 | - setVisible={(val: boolean) => { | ||
5527 | - setImagesViewerModalVisible(val); | ||
5528 | - if (!val) { | ||
5529 | - clearOptObject(); | ||
5530 | - } | ||
5531 | - }} | ||
5532 | - onClose={() => { | ||
5533 | - setImagesViewerModalVisible(false); | ||
5534 | - }} | ||
5535 | - orderRow={buildSubOrders()[0]} | ||
5536 | - /> | ||
5537 | - ) | ||
5538 | - } | 5088 | + {importModalVisible && ( |
5089 | + <ImportModal | ||
5090 | + onClose={() => { | ||
5091 | + setImportModalVisible(false); | ||
5092 | + refreshTable(); | ||
5093 | + }} | ||
5094 | + /> | ||
5095 | + )} | ||
5539 | 5096 | ||
5540 | - { | ||
5541 | - importModalVisible && ( | ||
5542 | - <ImportModal | ||
5543 | - onClose={() => { | ||
5544 | - setImportModalVisible(false); | ||
5545 | - refreshTable(); | ||
5546 | - }} | ||
5547 | - /> | ||
5548 | - ) | ||
5549 | - } | 5097 | + {attachmentModalVisible && ( |
5098 | + <AttachmentModal | ||
5099 | + data={buildSubOrders()[0]} | ||
5100 | + onClose={() => { | ||
5101 | + setAttachmentModalVisible(false); | ||
5102 | + clearOptObject(); | ||
5103 | + }} | ||
5104 | + /> | ||
5105 | + )} | ||
5550 | 5106 | ||
5551 | - { | ||
5552 | - attachmentModalVisible && ( | ||
5553 | - <AttachmentModal | ||
5554 | - data={buildSubOrders()[0]} | ||
5555 | - onClose={() => { | ||
5556 | - setAttachmentModalVisible(false); | ||
5557 | - clearOptObject(); | ||
5558 | - }} | ||
5559 | - /> | ||
5560 | - ) | ||
5561 | - } | 5107 | + {historyModalVisible && ( |
5108 | + <HistoryModal | ||
5109 | + subOrders={selectedRows} | ||
5110 | + isCancelledOrder={filterCondifion === 70} | ||
5111 | + onClose={() => { | ||
5112 | + setHistoryModalVisible(false); | ||
5113 | + setSelectedRows({}); | ||
5114 | + clearOptObject(); | ||
5115 | + }} | ||
5116 | + /> | ||
5117 | + )} | ||
5562 | 5118 | ||
5563 | - { | ||
5564 | - historyModalVisible && ( | ||
5565 | - <HistoryModal | ||
5566 | - subOrders={selectedRows} | ||
5567 | - isCancelledOrder={filterCondifion === 70} | ||
5568 | - onClose={() => { | ||
5569 | - setHistoryModalVisible(false); | ||
5570 | - setSelectedRows({}); | ||
5571 | - clearOptObject(); | ||
5572 | - }} | ||
5573 | - /> | ||
5574 | - ) | ||
5575 | - } | 5119 | + {deliverInfoDrawerVisible && ( |
5120 | + <DeliverInfoDrawer | ||
5121 | + data={buildMainOrder()} | ||
5122 | + onClose={() => { | ||
5123 | + setDeliverInfoDrawerVisible(false); | ||
5124 | + clearOptObject(); | ||
5125 | + }} | ||
5126 | + /> | ||
5127 | + )} | ||
5576 | 5128 | ||
5577 | - { | ||
5578 | - deliverInfoDrawerVisible && ( | ||
5579 | - <DeliverInfoDrawer | ||
5580 | - data={buildMainOrder()} | ||
5581 | - onClose={() => { | ||
5582 | - setDeliverInfoDrawerVisible(false); | ||
5583 | - clearOptObject(); | ||
5584 | - }} | ||
5585 | - /> | ||
5586 | - ) | ||
5587 | - } | 5129 | + {deliverInfoDrawerVisible && ( |
5130 | + <DeliverInfoDrawer | ||
5131 | + data={buildMainOrder()} | ||
5132 | + onClose={() => { | ||
5133 | + setDeliverInfoDrawerVisible(false); | ||
5134 | + clearOptObject(); | ||
5135 | + }} | ||
5136 | + /> | ||
5137 | + )} | ||
5588 | 5138 | ||
5589 | - { | ||
5590 | - deliverInfoDrawerVisible && ( | ||
5591 | - <DeliverInfoDrawer | ||
5592 | - data={buildMainOrder()} | ||
5593 | - onClose={() => { | ||
5594 | - setDeliverInfoDrawerVisible(false); | 5139 | + {procureCheckModalVisible && ( |
5140 | + <ProcureCheckModal | ||
5141 | + setCheckVisible={(val: boolean) => { | ||
5142 | + setProcureCheckModalVisible(val); | ||
5143 | + if (!val) { | ||
5595 | clearOptObject(); | 5144 | clearOptObject(); |
5596 | - }} | ||
5597 | - /> | ||
5598 | - ) | ||
5599 | - } | ||
5600 | - | ||
5601 | - { | ||
5602 | - procureCheckModalVisible && ( | ||
5603 | - <ProcureCheckModal | ||
5604 | - setCheckVisible={(val: boolean) => { | ||
5605 | - setProcureCheckModalVisible(val); | ||
5606 | - if (!val) { | ||
5607 | - clearOptObject(); | ||
5608 | - } | ||
5609 | - }} | ||
5610 | - isMainOrder={isMainOrder} | ||
5611 | - orders={ | ||
5612 | - isMainOrder | ||
5613 | - ? [...subOrderSelectedMap.values()].flat() | ||
5614 | - : buildSubOrders() | ||
5615 | } | 5145 | } |
5616 | - onClose={() => { | ||
5617 | - setProcureCheckModalVisible(false); | 5146 | + }} |
5147 | + isMainOrder={isMainOrder} | ||
5148 | + orders={ | ||
5149 | + isMainOrder | ||
5150 | + ? [...subOrderSelectedMap.values()].flat() | ||
5151 | + : buildSubOrders() | ||
5152 | + } | ||
5153 | + onClose={() => { | ||
5154 | + setProcureCheckModalVisible(false); | ||
5155 | + clearOptObject(); | ||
5156 | + setIsMainOrder(false); | ||
5157 | + refreshTable(); | ||
5158 | + }} | ||
5159 | + /> | ||
5160 | + )} | ||
5161 | + | ||
5162 | + {afterSalesDrawerVisible && ( | ||
5163 | + <AfterSalesDrawer | ||
5164 | + setVisible={(val: boolean) => { | ||
5165 | + setAfterSalesDrawerVisible(val); | ||
5166 | + if (!val) { | ||
5618 | clearOptObject(); | 5167 | clearOptObject(); |
5619 | - setIsMainOrder(false); | ||
5620 | - refreshTable(); | ||
5621 | - }} | ||
5622 | - /> | ||
5623 | - ) | ||
5624 | - } | 5168 | + } |
5169 | + }} | ||
5170 | + mainOrder={buildMainOrder()} | ||
5171 | + subOrders={buildSubOrders()} | ||
5172 | + onClose={() => { | ||
5173 | + setAfterSalesDrawerVisible(false); | ||
5174 | + clearOptObject(); | ||
5175 | + refreshTable(); | ||
5176 | + }} | ||
5177 | + /> | ||
5178 | + )} | ||
5625 | 5179 | ||
5626 | - { | ||
5627 | - afterSalesDrawerVisible && ( | ||
5628 | - <AfterSalesDrawer | ||
5629 | - setVisible={(val: boolean) => { | ||
5630 | - setAfterSalesDrawerVisible(val); | ||
5631 | - if (!val) { | ||
5632 | - clearOptObject(); | ||
5633 | - } | ||
5634 | - }} | ||
5635 | - mainOrder={buildMainOrder()} | ||
5636 | - subOrders={buildSubOrders()} | ||
5637 | - onClose={() => { | ||
5638 | - setAfterSalesDrawerVisible(false); | 5180 | + {procureConvertModalVisible && ( |
5181 | + <ProcureConvertModal | ||
5182 | + setVisible={(val: boolean) => { | ||
5183 | + setProcureConvertModalVisible(val); | ||
5184 | + if (!val) { | ||
5639 | clearOptObject(); | 5185 | clearOptObject(); |
5640 | - refreshTable(); | ||
5641 | - }} | ||
5642 | - /> | ||
5643 | - ) | ||
5644 | - } | 5186 | + } |
5187 | + }} | ||
5188 | + subOrders={buildSubOrders()} | ||
5189 | + onClose={() => { | ||
5190 | + setProcureConvertModalVisible(false); | ||
5191 | + clearOptObject(); | ||
5192 | + refreshTable(); | ||
5193 | + }} | ||
5194 | + /> | ||
5195 | + )} | ||
5645 | 5196 | ||
5646 | - { | ||
5647 | - procureConvertModalVisible && ( | ||
5648 | - <ProcureConvertModal | ||
5649 | - setVisible={(val: boolean) => { | ||
5650 | - setProcureConvertModalVisible(val); | ||
5651 | - if (!val) { | ||
5652 | - clearOptObject(); | ||
5653 | - } | ||
5654 | - }} | ||
5655 | - subOrders={buildSubOrders()} | ||
5656 | - onClose={() => { | ||
5657 | - setProcureConvertModalVisible(false); | 5197 | + {financialMergeDrawerVisible && ( |
5198 | + <FinancialMergeDrawer | ||
5199 | + setVisible={(val: boolean) => { | ||
5200 | + setFinancialMergeDrawerVisible(val); | ||
5201 | + if (!val) { | ||
5658 | clearOptObject(); | 5202 | clearOptObject(); |
5659 | - refreshTable(); | ||
5660 | - }} | ||
5661 | - /> | ||
5662 | - ) | ||
5663 | - } | ||
5664 | - | ||
5665 | - { | ||
5666 | - financialMergeDrawerVisible && ( | ||
5667 | - <FinancialMergeDrawer | ||
5668 | - setVisible={(val: boolean) => { | ||
5669 | - setFinancialMergeDrawerVisible(val); | ||
5670 | - if (!val) { | ||
5671 | - clearOptObject(); | ||
5672 | - } | ||
5673 | - }} | ||
5674 | - dataList={ | ||
5675 | - isMainOrder | ||
5676 | - ? [...subOrderSelectedMap.values()].flat() | ||
5677 | - : buildSubOrders() | ||
5678 | } | 5203 | } |
5679 | - onClose={() => { | ||
5680 | - setFinancialMergeDrawerVisible(false); | ||
5681 | - setIsMainOrder(false); | ||
5682 | - clearOptObject(); | ||
5683 | - refreshTable(); | ||
5684 | - }} | ||
5685 | - /> | ||
5686 | - ) | ||
5687 | - } | 5204 | + }} |
5205 | + dataList={ | ||
5206 | + isMainOrder | ||
5207 | + ? [...subOrderSelectedMap.values()].flat() | ||
5208 | + : buildSubOrders() | ||
5209 | + } | ||
5210 | + onClose={() => { | ||
5211 | + setFinancialMergeDrawerVisible(false); | ||
5212 | + setIsMainOrder(false); | ||
5213 | + clearOptObject(); | ||
5214 | + refreshTable(); | ||
5215 | + }} | ||
5216 | + /> | ||
5217 | + )} | ||
5688 | 5218 | ||
5689 | - { | ||
5690 | - financialReceiptsModalVisible && ( | ||
5691 | - <FinancialReceiptsModal | ||
5692 | - setVisible={(val: boolean) => { | ||
5693 | - setFinancialReceiptsModalVisible(val); | ||
5694 | - if (!val) { | ||
5695 | - clearOptObject(); | ||
5696 | - } | ||
5697 | - }} | ||
5698 | - datas={selectedRows} | ||
5699 | - onClose={() => { | ||
5700 | - setFinancialReceiptsModalVisible(false); | ||
5701 | - setSelectedRows({}); | ||
5702 | - refreshTable(); | ||
5703 | - }} | ||
5704 | - /> | ||
5705 | - ) | ||
5706 | - } | 5219 | + {financialReceiptsModalVisible && ( |
5220 | + <FinancialReceiptsModal | ||
5221 | + setVisible={(val: boolean) => { | ||
5222 | + setFinancialReceiptsModalVisible(val); | ||
5223 | + if (!val) { | ||
5224 | + clearOptObject(); | ||
5225 | + } | ||
5226 | + }} | ||
5227 | + datas={selectedRows} | ||
5228 | + onClose={() => { | ||
5229 | + setFinancialReceiptsModalVisible(false); | ||
5230 | + setSelectedRows({}); | ||
5231 | + refreshTable(); | ||
5232 | + }} | ||
5233 | + /> | ||
5234 | + )} | ||
5707 | 5235 | ||
5708 | - { | ||
5709 | - shippingWarehouseChangeModalVisible && ( | ||
5710 | - <ShippingWarehouseChangeModal | ||
5711 | - setVisible={(val: boolean) => { | ||
5712 | - setShippingWarehouseChangeModalVisible(val); | ||
5713 | - if (!val) { | ||
5714 | - clearOptObject(); | ||
5715 | - } | ||
5716 | - }} | ||
5717 | - subOrderIds={ids} | ||
5718 | - originShippingWarehouse={buildSubOrders()[0].shippingWarehouse} | ||
5719 | - onClose={() => { | ||
5720 | - setShippingWarehouseChangeModalVisible(false); | 5236 | + {shippingWarehouseChangeModalVisible && ( |
5237 | + <ShippingWarehouseChangeModal | ||
5238 | + setVisible={(val: boolean) => { | ||
5239 | + setShippingWarehouseChangeModalVisible(val); | ||
5240 | + if (!val) { | ||
5721 | clearOptObject(); | 5241 | clearOptObject(); |
5722 | - setIds([]); | ||
5723 | - refreshTable(); | ||
5724 | - }} | ||
5725 | - /> | ||
5726 | - ) | ||
5727 | - } | ||
5728 | - { | ||
5729 | - reissueVisible && ( | ||
5730 | - <ReissueModal | ||
5731 | - setVisible={(val: boolean) => { | ||
5732 | - setReissueVisible(val); | ||
5733 | - if (!val) { | ||
5734 | - clearOptObject(); | ||
5735 | - } | ||
5736 | - }} | ||
5737 | - subOrders={ | ||
5738 | - isMainOrder | ||
5739 | - ? [...subOrderSelectedMap.values()].flat() | ||
5740 | - : buildSubOrders() | ||
5741 | } | 5242 | } |
5742 | - onClose={() => { | ||
5743 | - setReissueVisible(false); | 5243 | + }} |
5244 | + subOrderIds={ids} | ||
5245 | + originShippingWarehouse={buildSubOrders()[0].shippingWarehouse} | ||
5246 | + onClose={() => { | ||
5247 | + setShippingWarehouseChangeModalVisible(false); | ||
5248 | + clearOptObject(); | ||
5249 | + setIds([]); | ||
5250 | + refreshTable(); | ||
5251 | + }} | ||
5252 | + /> | ||
5253 | + )} | ||
5254 | + {reissueVisible && ( | ||
5255 | + <ReissueModal | ||
5256 | + setVisible={(val: boolean) => { | ||
5257 | + setReissueVisible(val); | ||
5258 | + if (!val) { | ||
5744 | clearOptObject(); | 5259 | clearOptObject(); |
5745 | - refreshTable(); | ||
5746 | - }} | ||
5747 | - /> | ||
5748 | - ) | ||
5749 | - } | ||
5750 | - { | ||
5751 | - reissueVisibleOld && ( | ||
5752 | - <ReissueModal_old | ||
5753 | - setVisible={(val: boolean) => { | ||
5754 | - setReissueVisibleOld(val); | ||
5755 | - console.log(reissueVisible); | ||
5756 | - if (!val) { | ||
5757 | - clearOptObject(); | ||
5758 | - } | ||
5759 | - }} | ||
5760 | - mainOrder={buildMainOrder()} | ||
5761 | - subOrders={buildSubOrders()} | ||
5762 | - onClose={() => { | ||
5763 | - setReissueVisibleOld(false); | 5260 | + } |
5261 | + }} | ||
5262 | + subOrders={ | ||
5263 | + isMainOrder | ||
5264 | + ? [...subOrderSelectedMap.values()].flat() | ||
5265 | + : buildSubOrders() | ||
5266 | + } | ||
5267 | + onClose={() => { | ||
5268 | + setReissueVisible(false); | ||
5269 | + clearOptObject(); | ||
5270 | + refreshTable(); | ||
5271 | + }} | ||
5272 | + /> | ||
5273 | + )} | ||
5274 | + {reissueVisibleOld && ( | ||
5275 | + <ReissueModal_old | ||
5276 | + setVisible={(val: boolean) => { | ||
5277 | + setReissueVisibleOld(val); | ||
5278 | + console.log(reissueVisible); | ||
5279 | + if (!val) { | ||
5764 | clearOptObject(); | 5280 | clearOptObject(); |
5765 | - refreshTable(); | ||
5766 | - }} | ||
5767 | - /> | ||
5768 | - ) | ||
5769 | - } | ||
5770 | - { | ||
5771 | - productionTimeModalVisible && ( | ||
5772 | - <ProductionTimeModal | ||
5773 | - setVisible={(val: boolean) => { | ||
5774 | - setProductionTimeModalVisible(val); | ||
5775 | - if (!val) { | ||
5776 | - clearOptObject(); | ||
5777 | - } | ||
5778 | - }} | ||
5779 | - subOrders={buildSubOrders()} | ||
5780 | - onClose={() => { | ||
5781 | - setProductionTimeModalVisible(false); | 5281 | + } |
5282 | + }} | ||
5283 | + mainOrder={buildMainOrder()} | ||
5284 | + subOrders={buildSubOrders()} | ||
5285 | + onClose={() => { | ||
5286 | + setReissueVisibleOld(false); | ||
5287 | + clearOptObject(); | ||
5288 | + refreshTable(); | ||
5289 | + }} | ||
5290 | + /> | ||
5291 | + )} | ||
5292 | + {productionTimeModalVisible && ( | ||
5293 | + <ProductionTimeModal | ||
5294 | + setVisible={(val: boolean) => { | ||
5295 | + setProductionTimeModalVisible(val); | ||
5296 | + if (!val) { | ||
5782 | clearOptObject(); | 5297 | clearOptObject(); |
5783 | - refreshTable(); | ||
5784 | - }} | ||
5785 | - /> | ||
5786 | - ) | ||
5787 | - } | 5298 | + } |
5299 | + }} | ||
5300 | + subOrders={buildSubOrders()} | ||
5301 | + onClose={() => { | ||
5302 | + setProductionTimeModalVisible(false); | ||
5303 | + clearOptObject(); | ||
5304 | + refreshTable(); | ||
5305 | + }} | ||
5306 | + /> | ||
5307 | + )} | ||
5788 | 5308 | ||
5789 | - { | ||
5790 | - modifiedDiffModalVisible && ( | ||
5791 | - <ModifiedDiffModal | ||
5792 | - setVisible={(val: boolean) => { | ||
5793 | - setModifiedDiffModalVisible(val); | ||
5794 | - if (!val) { | ||
5795 | - clearOptObject(); | ||
5796 | - } | ||
5797 | - }} | ||
5798 | - subOrders={buildSubOrders()} | ||
5799 | - mainOrder={buildMainOrder()} | ||
5800 | - onClose={() => { | ||
5801 | - setModifiedDiffModalVisible(false); | 5309 | + {modifiedDiffModalVisible && ( |
5310 | + <ModifiedDiffModal | ||
5311 | + setVisible={(val: boolean) => { | ||
5312 | + setModifiedDiffModalVisible(val); | ||
5313 | + if (!val) { | ||
5802 | clearOptObject(); | 5314 | clearOptObject(); |
5803 | - }} | ||
5804 | - /> | ||
5805 | - ) | ||
5806 | - } | 5315 | + } |
5316 | + }} | ||
5317 | + subOrders={buildSubOrders()} | ||
5318 | + mainOrder={buildMainOrder()} | ||
5319 | + onClose={() => { | ||
5320 | + setModifiedDiffModalVisible(false); | ||
5321 | + clearOptObject(); | ||
5322 | + }} | ||
5323 | + /> | ||
5324 | + )} | ||
5807 | 5325 | ||
5808 | - { | ||
5809 | - uploadPayBillModalVisible && ( | ||
5810 | - <UploadPayBillModal | ||
5811 | - setVisible={(val: boolean) => { | ||
5812 | - setUploadPayBillModalVisible(val); | ||
5813 | - if (!val) { | ||
5814 | - clearOptObject(); | ||
5815 | - } | ||
5816 | - }} | ||
5817 | - subOrders={buildSubOrders()} | ||
5818 | - mainOrder={buildMainOrder()} | ||
5819 | - onClose={() => { | ||
5820 | - setUploadPayBillModalVisible(false); | 5326 | + {uploadPayBillModalVisible && ( |
5327 | + <UploadPayBillModal | ||
5328 | + setVisible={(val: boolean) => { | ||
5329 | + setUploadPayBillModalVisible(val); | ||
5330 | + if (!val) { | ||
5821 | clearOptObject(); | 5331 | clearOptObject(); |
5822 | - refreshTable(); | ||
5823 | - }} | ||
5824 | - /> | ||
5825 | - ) | ||
5826 | - } | ||
5827 | - { | ||
5828 | - invoicingDrawerFormVisible && ( | ||
5829 | - <InvoicingDrawerForm | ||
5830 | - dataList={ | ||
5831 | - isMainOrder | ||
5832 | - ? [...subOrderSelectedMap.values()].flat() | ||
5833 | - : buildSubOrders() | ||
5834 | } | 5332 | } |
5835 | - setVisible={(val: boolean) => { | ||
5836 | - setInvoicingDrawerFormVisible(val); | ||
5837 | - if (!val) { | ||
5838 | - clearOptObject(); | ||
5839 | - } | ||
5840 | - }} | ||
5841 | - mainOrder={isMainOrder ? getFirstMainOrder() : buildMainOrder()} | ||
5842 | - onClose={() => { | ||
5843 | - setInvoicingDrawerFormVisible(false); | ||
5844 | - setIsMainOrder(true); | 5333 | + }} |
5334 | + subOrders={buildSubOrders()} | ||
5335 | + mainOrder={buildMainOrder()} | ||
5336 | + onClose={() => { | ||
5337 | + setUploadPayBillModalVisible(false); | ||
5338 | + clearOptObject(); | ||
5339 | + refreshTable(); | ||
5340 | + }} | ||
5341 | + /> | ||
5342 | + )} | ||
5343 | + {invoicingDrawerFormVisible && ( | ||
5344 | + <InvoicingDrawerForm | ||
5345 | + dataList={ | ||
5346 | + isMainOrder | ||
5347 | + ? [...subOrderSelectedMap.values()].flat() | ||
5348 | + : buildSubOrders() | ||
5349 | + } | ||
5350 | + setVisible={(val: boolean) => { | ||
5351 | + setInvoicingDrawerFormVisible(val); | ||
5352 | + if (!val) { | ||
5845 | clearOptObject(); | 5353 | clearOptObject(); |
5846 | - refreshTable(); | ||
5847 | - }} | ||
5848 | - /> | ||
5849 | - ) | ||
5850 | - } | 5354 | + } |
5355 | + }} | ||
5356 | + mainOrder={isMainOrder ? getFirstMainOrder() : buildMainOrder()} | ||
5357 | + onClose={() => { | ||
5358 | + setInvoicingDrawerFormVisible(false); | ||
5359 | + setIsMainOrder(true); | ||
5360 | + clearOptObject(); | ||
5361 | + refreshTable(); | ||
5362 | + }} | ||
5363 | + /> | ||
5364 | + )} | ||
5851 | {contextHolder} | 5365 | {contextHolder} |
5852 | <FloatButton.BackTop visibilityHeight={0} /> | 5366 | <FloatButton.BackTop visibilityHeight={0} /> |
5853 | - </div > | ||
5854 | - ) | ||
5855 | - } | ||
5856 | - ] | 5367 | + </div> |
5368 | + ), | ||
5369 | + }, | ||
5370 | + ]; | ||
5857 | const [open, setOpen] = useState(true); | 5371 | const [open, setOpen] = useState(true); |
5858 | //隐藏弹窗 | 5372 | //隐藏弹窗 |
5859 | const hideModal = () => { | 5373 | const hideModal = () => { |
@@ -5868,9 +5382,9 @@ const OrderPage = () => { | @@ -5868,9 +5382,9 @@ const OrderPage = () => { | ||
5868 | width={800} | 5382 | width={800} |
5869 | closable={false} | 5383 | closable={false} |
5870 | footer={[ | 5384 | footer={[ |
5871 | - <Button key="confirm" size='large' type="primary" onClick={hideModal}> | 5385 | + <Button key="confirm" size="large" type="primary" onClick={hideModal}> |
5872 | 去处理 | 5386 | 去处理 |
5873 | - </Button> | 5387 | + </Button>, |
5874 | ]} | 5388 | ]} |
5875 | > | 5389 | > |
5876 | <Row | 5390 | <Row |
@@ -5879,76 +5393,102 @@ const OrderPage = () => { | @@ -5879,76 +5393,102 @@ const OrderPage = () => { | ||
5879 | align="middle" // Vertically center contents | 5393 | align="middle" // Vertically center contents |
5880 | > | 5394 | > |
5881 | <Col span={12}> | 5395 | <Col span={12}> |
5882 | - <div style={{ display: 'flex', justifyContent: 'center', marginTop: '20px' }}> | 5396 | + <div |
5397 | + style={{ | ||
5398 | + display: 'flex', | ||
5399 | + justifyContent: 'center', | ||
5400 | + marginTop: '20px', | ||
5401 | + }} | ||
5402 | + > | ||
5883 | <Card | 5403 | <Card |
5884 | bordered={true} | 5404 | bordered={true} |
5885 | style={{ | 5405 | style={{ |
5886 | backgroundColor: '#f0f0f0', // 背景颜色 | 5406 | backgroundColor: '#f0f0f0', // 背景颜色 |
5887 | - width: '200px', // 卡片宽度 | ||
5888 | - height: '200px', // 卡片高度 | 5407 | + width: '200px', // 卡片宽度 |
5408 | + height: '200px', // 卡片高度 | ||
5889 | display: 'flex', | 5409 | display: 'flex', |
5890 | alignItems: 'center', | 5410 | alignItems: 'center', |
5891 | - justifyContent: 'center' | 5411 | + justifyContent: 'center', |
5892 | }} | 5412 | }} |
5893 | > | 5413 | > |
5894 | - <div style={{ | ||
5895 | - fontWeight: 'bold', // 字体加粗 | ||
5896 | - color: 'black', // 字体颜色 | ||
5897 | - fontSize: '20px', // 字体大小 | ||
5898 | - }}> | ||
5899 | - <div style={{ | ||
5900 | - fontWeight: 'bold', // 字体加粗 | ||
5901 | - color: 'black', // 字体颜色 | ||
5902 | - fontSize: '40px', // 字体大小 | ||
5903 | - justifyContent: 'center', | ||
5904 | - display: 'flex', | ||
5905 | - alignItems: 'center', | ||
5906 | - marginBottom: '20px', | ||
5907 | - }}> | 5414 | + <div |
5415 | + style={{ | ||
5416 | + fontWeight: 'bold', // 字体加粗 | ||
5417 | + color: 'black', // 字体颜色 | ||
5418 | + fontSize: '20px', // 字体大小 | ||
5419 | + }} | ||
5420 | + > | ||
5421 | + <div | ||
5422 | + style={{ | ||
5423 | + fontWeight: 'bold', // 字体加粗 | ||
5424 | + color: 'black', // 字体颜色 | ||
5425 | + fontSize: '40px', // 字体大小 | ||
5426 | + justifyContent: 'center', | ||
5427 | + display: 'flex', | ||
5428 | + alignItems: 'center', | ||
5429 | + marginBottom: '20px', | ||
5430 | + }} | ||
5431 | + > | ||
5908 | {invoiceWarningNum} | 5432 | {invoiceWarningNum} |
5909 | </div> | 5433 | </div> |
5910 | 发票待确认订单 | 5434 | 发票待确认订单 |
5911 | </div> | 5435 | </div> |
5912 | </Card> | 5436 | </Card> |
5913 | - </div></Col> | 5437 | + </div> |
5438 | + </Col> | ||
5914 | <Col span={12}> | 5439 | <Col span={12}> |
5915 | - <div style={{ display: 'flex', justifyContent: 'center', marginTop: '20px' }}> | 5440 | + <div |
5441 | + style={{ | ||
5442 | + display: 'flex', | ||
5443 | + justifyContent: 'center', | ||
5444 | + marginTop: '20px', | ||
5445 | + }} | ||
5446 | + > | ||
5916 | <Card | 5447 | <Card |
5917 | bordered={true} | 5448 | bordered={true} |
5918 | style={{ | 5449 | style={{ |
5919 | backgroundColor: '#f0f0f0', // 背景颜色 | 5450 | backgroundColor: '#f0f0f0', // 背景颜色 |
5920 | - width: '200px', // 卡片宽度 | ||
5921 | - height: '200px', // 卡片高度 | 5451 | + width: '200px', // 卡片宽度 |
5452 | + height: '200px', // 卡片高度 | ||
5922 | display: 'flex', | 5453 | display: 'flex', |
5923 | alignItems: 'center', | 5454 | alignItems: 'center', |
5924 | - justifyContent: 'center' | 5455 | + justifyContent: 'center', |
5925 | }} | 5456 | }} |
5926 | > | 5457 | > |
5927 | - <div style={{ | ||
5928 | - fontWeight: 'bold', // 字体加粗 | ||
5929 | - color: 'black', // 字体颜色 | ||
5930 | - fontSize: '20px', // 字体大小 | ||
5931 | - }}> | ||
5932 | - <div style={{ | ||
5933 | - fontWeight: 'bold', // 字体加粗 | ||
5934 | - color: 'black', // 字体颜色 | ||
5935 | - fontSize: '40px', // 字体大小 | ||
5936 | - justifyContent: 'center', | ||
5937 | - display: 'flex', | ||
5938 | - alignItems: 'center', | ||
5939 | - marginBottom: '20px', | ||
5940 | - }}> | 5458 | + <div |
5459 | + style={{ | ||
5460 | + fontWeight: 'bold', // 字体加粗 | ||
5461 | + color: 'black', // 字体颜色 | ||
5462 | + fontSize: '20px', // 字体大小 | ||
5463 | + }} | ||
5464 | + > | ||
5465 | + <div | ||
5466 | + style={{ | ||
5467 | + fontWeight: 'bold', // 字体加粗 | ||
5468 | + color: 'black', // 字体颜色 | ||
5469 | + fontSize: '40px', // 字体大小 | ||
5470 | + justifyContent: 'center', | ||
5471 | + display: 'flex', | ||
5472 | + alignItems: 'center', | ||
5473 | + marginBottom: '20px', | ||
5474 | + }} | ||
5475 | + > | ||
5941 | {invoiceRefundWarningNum} | 5476 | {invoiceRefundWarningNum} |
5942 | </div> | 5477 | </div> |
5943 | 回款待确认订单 | 5478 | 回款待确认订单 |
5944 | </div> | 5479 | </div> |
5945 | </Card> | 5480 | </Card> |
5946 | - </div></Col> | 5481 | + </div> |
5482 | + </Col> | ||
5947 | </Row> | 5483 | </Row> |
5948 | <div style={{ color: 'red', padding: '40px' }}> | 5484 | <div style={{ color: 'red', padding: '40px' }}> |
5949 | <p>预警说明:</p> | 5485 | <p>预警说明:</p> |
5950 | - <p>1、从订单确认收货之日起,超过5天未和客户确认发票(不开票的订单除外)的订单将会进行第一次提醒;超过15天未和客户确认发票(不开票的订单除外)的订单将会每天进行一次提醒,并限制下单功能</p> | ||
5951 | - <p>2、从发票确认之日起,超过15天未确认回款的订单将会进行第一次提醒,超过25天未确认回款的订单将会每天进行一次提醒,并限制下单功能</p> | 5486 | + <p> |
5487 | + 1、从订单确认收货之日起,超过5天未和客户确认发票(不开票的订单除外)的订单将会进行第一次提醒;超过15天未和客户确认发票(不开票的订单除外)的订单将会每天进行一次提醒,并限制下单功能 | ||
5488 | + </p> | ||
5489 | + <p> | ||
5490 | + 2、从发票确认之日起,超过15天未确认回款的订单将会进行第一次提醒,超过25天未确认回款的订单将会每天进行一次提醒,并限制下单功能 | ||
5491 | + </p> | ||
5952 | </div> | 5492 | </div> |
5953 | </Modal> | 5493 | </Modal> |
5954 | <Tabs | 5494 | <Tabs |
src/pages/Order/constant.ts
@@ -124,6 +124,9 @@ export const getNeedInvoicing = (subOrder: any) => { | @@ -124,6 +124,9 @@ export const getNeedInvoicing = (subOrder: any) => { | ||
124 | if (subOrder.invoicingTime !== null && subOrder.invoicingTime !== undefined) { | 124 | if (subOrder.invoicingTime !== null && subOrder.invoicingTime !== undefined) { |
125 | return '已开票'; | 125 | return '已开票'; |
126 | } | 126 | } |
127 | + if (subOrder.afterInvoicingStatus === 'COMPLETE_INVOICING') { | ||
128 | + return '已开票'; | ||
129 | + } | ||
127 | if (subOrder.afterInvoicingStatus === 'REISSUE') { | 130 | if (subOrder.afterInvoicingStatus === 'REISSUE') { |
128 | return '重新开票'; | 131 | return '重新开票'; |
129 | } | 132 | } |
src/pages/ResearchGroup/index.tsx
@@ -461,7 +461,7 @@ const PrepaidPage = () => { | @@ -461,7 +461,7 @@ const PrepaidPage = () => { | ||
461 | if (record.permissions?.includes('audit')) { | 461 | if (record.permissions?.includes('audit')) { |
462 | btns.push( | 462 | btns.push( |
463 | <Button | 463 | <Button |
464 | - key="delete" | 464 | + key="audit" |
465 | className="p-0" | 465 | className="p-0" |
466 | type="link" | 466 | type="link" |
467 | onClick={async () => { | 467 | onClick={async () => { |
@@ -565,11 +565,17 @@ const PrepaidPage = () => { | @@ -565,11 +565,17 @@ const PrepaidPage = () => { | ||
565 | // 注释该行则默认不显示下拉选项 | 565 | // 注释该行则默认不显示下拉选项 |
566 | selections: [Table.SELECTION_ALL, Table.SELECTION_INVERT], | 566 | selections: [Table.SELECTION_ALL, Table.SELECTION_INVERT], |
567 | defaultSelectedRowKeys: [], | 567 | defaultSelectedRowKeys: [], |
568 | + alwaysShowAlert: true, | ||
568 | }} | 569 | }} |
569 | tableAlertOptionRender={({ selectedRows, onCleanSelected }) => { | 570 | tableAlertOptionRender={({ selectedRows, onCleanSelected }) => { |
570 | let ids = selectedRows.map((item: any) => { | 571 | let ids = selectedRows.map((item: any) => { |
571 | return item.id; | 572 | return item.id; |
572 | }); | 573 | }); |
574 | + let canAudit = | ||
575 | + selectedRows.length > 0 && | ||
576 | + selectedRows.every((item) => { | ||
577 | + return item.paths?.includes('ADD_AUDIT'); | ||
578 | + }); | ||
573 | return ( | 579 | return ( |
574 | <Space size={16}> | 580 | <Space size={16}> |
575 | <ButtonConfirm | 581 | <ButtonConfirm |
@@ -584,6 +590,21 @@ const PrepaidPage = () => { | @@ -584,6 +590,21 @@ const PrepaidPage = () => { | ||
584 | <Button type="link" onClick={onCleanSelected}> | 590 | <Button type="link" onClick={onCleanSelected}> |
585 | 取消选中 | 591 | 取消选中 |
586 | </Button> | 592 | </Button> |
593 | + | ||
594 | + { | ||
595 | + <Button | ||
596 | + key="audit" | ||
597 | + type="link" | ||
598 | + disabled={!canAudit} | ||
599 | + onClick={async () => { | ||
600 | + setAuditIds(ids); | ||
601 | + setAuditModalVisible(true); | ||
602 | + setAuditType('research_groups_add_audit'); | ||
603 | + }} | ||
604 | + > | ||
605 | + 审核 | ||
606 | + </Button> | ||
607 | + } | ||
587 | </Space> | 608 | </Space> |
588 | ); | 609 | ); |
589 | }} | 610 | }} |
@@ -655,11 +676,17 @@ const PrepaidPage = () => { | @@ -655,11 +676,17 @@ const PrepaidPage = () => { | ||
655 | // 注释该行则默认不显示下拉选项 | 676 | // 注释该行则默认不显示下拉选项 |
656 | selections: [Table.SELECTION_ALL, Table.SELECTION_INVERT], | 677 | selections: [Table.SELECTION_ALL, Table.SELECTION_INVERT], |
657 | defaultSelectedRowKeys: [], | 678 | defaultSelectedRowKeys: [], |
679 | + alwaysShowAlert: true, | ||
658 | }} | 680 | }} |
659 | tableAlertOptionRender={({ selectedRows, onCleanSelected }) => { | 681 | tableAlertOptionRender={({ selectedRows, onCleanSelected }) => { |
660 | let ids = selectedRows.map((item: any) => { | 682 | let ids = selectedRows.map((item: any) => { |
661 | return item.id; | 683 | return item.id; |
662 | }); | 684 | }); |
685 | + let canAudit = | ||
686 | + selectedRows.length > 0 && | ||
687 | + selectedRows.every((item) => { | ||
688 | + return item.permissions?.includes('audit'); | ||
689 | + }); | ||
663 | return ( | 690 | return ( |
664 | <Space size={16}> | 691 | <Space size={16}> |
665 | <ButtonConfirm | 692 | <ButtonConfirm |
@@ -674,8 +701,10 @@ const PrepaidPage = () => { | @@ -674,8 +701,10 @@ const PrepaidPage = () => { | ||
674 | key="delete" | 701 | key="delete" |
675 | className="p-0" | 702 | className="p-0" |
676 | type="link" | 703 | type="link" |
704 | + disabled={!canAudit} | ||
677 | onClick={async () => { | 705 | onClick={async () => { |
678 | setAuditIds(ids); | 706 | setAuditIds(ids); |
707 | + setAuditType('research_group_member_request_audit'); | ||
679 | setAuditModalVisible(true); | 708 | setAuditModalVisible(true); |
680 | }} | 709 | }} |
681 | > | 710 | > |
src/services/definition.ts
@@ -1044,6 +1044,10 @@ export interface CancelInvoiceAndBankStatementDto { | @@ -1044,6 +1044,10 @@ export interface CancelInvoiceAndBankStatementDto { | ||
1044 | invoiceId?: number; | 1044 | invoiceId?: number; |
1045 | } | 1045 | } |
1046 | 1046 | ||
1047 | +export interface CancelInvoiceRecordDto { | ||
1048 | + invoiceRecordIds?: Array<number>; | ||
1049 | +} | ||
1050 | + | ||
1047 | export interface CancelSendOrderDto { | 1051 | export interface CancelSendOrderDto { |
1048 | subIds?: Array<number>; | 1052 | subIds?: Array<number>; |
1049 | } | 1053 | } |
@@ -1382,32 +1386,6 @@ export interface Entry { | @@ -1382,32 +1386,6 @@ export interface Entry { | ||
1382 | unEmpInsuranceC?: string; | 1386 | unEmpInsuranceC?: string; |
1383 | } | 1387 | } |
1384 | 1388 | ||
1385 | -export interface File { | ||
1386 | - absolute?: boolean; | ||
1387 | - absoluteFile?: File; | ||
1388 | - absolutePath?: string; | ||
1389 | - canonicalFile?: File; | ||
1390 | - canonicalPath?: string; | ||
1391 | - directory?: boolean; | ||
1392 | - executable?: boolean; | ||
1393 | - file?: boolean; | ||
1394 | - /** @format int64 */ | ||
1395 | - freeSpace?: number; | ||
1396 | - hidden?: boolean; | ||
1397 | - /** @format int64 */ | ||
1398 | - lastModified?: number; | ||
1399 | - name?: string; | ||
1400 | - parent?: string; | ||
1401 | - parentFile?: File; | ||
1402 | - path?: string; | ||
1403 | - readable?: boolean; | ||
1404 | - /** @format int64 */ | ||
1405 | - totalSpace?: number; | ||
1406 | - /** @format int64 */ | ||
1407 | - usableSpace?: number; | ||
1408 | - writable?: boolean; | ||
1409 | -} | ||
1410 | - | ||
1411 | export interface FilePathDto { | 1389 | export interface FilePathDto { |
1412 | url?: string; | 1390 | url?: string; |
1413 | } | 1391 | } |
@@ -1498,6 +1476,11 @@ export interface InvoiceDto { | @@ -1498,6 +1476,11 @@ export interface InvoiceDto { | ||
1498 | notes?: string; | 1476 | notes?: string; |
1499 | /** | 1477 | /** |
1500 | * @description | 1478 | * @description |
1479 | + * 订单类型 | ||
1480 | + */ | ||
1481 | + orderTypeText?: string; | ||
1482 | + /** | ||
1483 | + * @description | ||
1501 | * 权限路径 | 1484 | * 权限路径 |
1502 | */ | 1485 | */ |
1503 | path?: Array<string>; | 1486 | path?: Array<string>; |
@@ -1507,7 +1490,6 @@ export interface InvoiceDto { | @@ -1507,7 +1490,6 @@ export interface InvoiceDto { | ||
1507 | * 收款单位 | 1490 | * 收款单位 |
1508 | */ | 1491 | */ |
1509 | payee?: string; | 1492 | payee?: string; |
1510 | - payeeText?: string; | ||
1511 | /** | 1493 | /** |
1512 | * @description | 1494 | * @description |
1513 | * 收款单位 | 1495 | * 收款单位 |
@@ -1525,6 +1507,11 @@ export interface InvoiceDto { | @@ -1525,6 +1507,11 @@ export interface InvoiceDto { | ||
1525 | sale?: string; | 1507 | sale?: string; |
1526 | /** | 1508 | /** |
1527 | * @description | 1509 | * @description |
1510 | + * 绑定流水号 | ||
1511 | + */ | ||
1512 | + serialNumbersTextByOrder?: string; | ||
1513 | + /** | ||
1514 | + * @description | ||
1528 | * 状态 | 1515 | * 状态 |
1529 | */ | 1516 | */ |
1530 | status?: string; | 1517 | status?: string; |
@@ -2785,13 +2772,13 @@ export interface QueryBankStatementDto { | @@ -2785,13 +2772,13 @@ export interface QueryBankStatementDto { | ||
2785 | /** | 2772 | /** |
2786 | * @description | 2773 | * @description |
2787 | * collection_date | 2774 | * collection_date |
2788 | - * @format date | 2775 | + * @format date-time |
2789 | */ | 2776 | */ |
2790 | collectionDatetimeBegin?: string; | 2777 | collectionDatetimeBegin?: string; |
2791 | /** | 2778 | /** |
2792 | * @description | 2779 | * @description |
2793 | * collection_date | 2780 | * collection_date |
2794 | - * @format date | 2781 | + * @format date-time |
2795 | */ | 2782 | */ |
2796 | collectionDatetimeEnd?: string; | 2783 | collectionDatetimeEnd?: string; |
2797 | createByName?: string; | 2784 | createByName?: string; |
@@ -3638,7 +3625,7 @@ export interface ResetPwdVO { | @@ -3638,7 +3625,7 @@ export interface ResetPwdVO { | ||
3638 | 3625 | ||
3639 | export interface Resource { | 3626 | export interface Resource { |
3640 | description?: string; | 3627 | description?: string; |
3641 | - file?: File; | 3628 | + file?: TsgFile; |
3642 | filename?: string; | 3629 | filename?: string; |
3643 | inputStream?: InputStream; | 3630 | inputStream?: InputStream; |
3644 | open?: boolean; | 3631 | open?: boolean; |
@@ -4181,6 +4168,32 @@ export interface CompanyInfo { | @@ -4181,6 +4168,32 @@ export interface CompanyInfo { | ||
4181 | taxIdIsNotNull?: boolean; | 4168 | taxIdIsNotNull?: boolean; |
4182 | } | 4169 | } |
4183 | 4170 | ||
4171 | +export interface TsgFile { | ||
4172 | + absolute?: boolean; | ||
4173 | + absoluteFile?: TsgFile; | ||
4174 | + absolutePath?: string; | ||
4175 | + canonicalFile?: TsgFile; | ||
4176 | + canonicalPath?: string; | ||
4177 | + directory?: boolean; | ||
4178 | + executable?: boolean; | ||
4179 | + file?: boolean; | ||
4180 | + /** @format int64 */ | ||
4181 | + freeSpace?: number; | ||
4182 | + hidden?: boolean; | ||
4183 | + /** @format int64 */ | ||
4184 | + lastModified?: number; | ||
4185 | + name?: string; | ||
4186 | + parent?: string; | ||
4187 | + parentFile?: TsgFile; | ||
4188 | + path?: string; | ||
4189 | + readable?: boolean; | ||
4190 | + /** @format int64 */ | ||
4191 | + totalSpace?: number; | ||
4192 | + /** @format int64 */ | ||
4193 | + usableSpace?: number; | ||
4194 | + writable?: boolean; | ||
4195 | +} | ||
4196 | + | ||
4184 | export interface InvoiceDetail { | 4197 | export interface InvoiceDetail { |
4185 | createByName?: string; | 4198 | createByName?: string; |
4186 | /** @format date-time */ | 4199 | /** @format date-time */ |
src/services/request.ts
@@ -35,6 +35,7 @@ import type { | @@ -35,6 +35,7 @@ import type { | ||
35 | AuditDto, | 35 | AuditDto, |
36 | AuditVO, | 36 | AuditVO, |
37 | CancelInvoiceAndBankStatementDto, | 37 | CancelInvoiceAndBankStatementDto, |
38 | + CancelInvoiceRecordDto, | ||
38 | CancelSendOrderDto, | 39 | CancelSendOrderDto, |
39 | CaptchaMessageVO, | 40 | CaptchaMessageVO, |
40 | ClientCommunicationInfo, | 41 | ClientCommunicationInfo, |
@@ -63,7 +64,6 @@ import type { | @@ -63,7 +64,6 @@ import type { | ||
63 | MaterialUnitListRes, | 64 | MaterialUnitListRes, |
64 | MeasureUnitListRes, | 65 | MeasureUnitListRes, |
65 | MessageQueryDTO, | 66 | MessageQueryDTO, |
66 | - ModelAndView, | ||
67 | OrderAddVO, | 67 | OrderAddVO, |
68 | OrderAuditLogQueryVO, | 68 | OrderAuditLogQueryVO, |
69 | OrderBaseInfoQueryVO, | 69 | OrderBaseInfoQueryVO, |
@@ -3237,7 +3237,9 @@ export interface GetErrorResponse { | @@ -3237,7 +3237,9 @@ export interface GetErrorResponse { | ||
3237 | * @description | 3237 | * @description |
3238 | * OK | 3238 | * OK |
3239 | */ | 3239 | */ |
3240 | - 200: ModelAndView; | 3240 | + 200: { |
3241 | + [propertyName: string]: any; | ||
3242 | + }; | ||
3241 | /** | 3243 | /** |
3242 | * @description | 3244 | * @description |
3243 | * Unauthorized | 3245 | * Unauthorized |
@@ -3258,9 +3260,9 @@ export interface GetErrorResponse { | @@ -3258,9 +3260,9 @@ export interface GetErrorResponse { | ||
3258 | export type GetErrorResponseSuccess = GetErrorResponse[200]; | 3260 | export type GetErrorResponseSuccess = GetErrorResponse[200]; |
3259 | /** | 3261 | /** |
3260 | * @description | 3262 | * @description |
3261 | - * errorHtml | 3263 | + * error |
3262 | * @tags basic-error-controller | 3264 | * @tags basic-error-controller |
3263 | - * @produces text/html | 3265 | + * @produces * |
3264 | */ | 3266 | */ |
3265 | export const getError = /* #__PURE__ */ (() => { | 3267 | export const getError = /* #__PURE__ */ (() => { |
3266 | const method = 'get'; | 3268 | const method = 'get'; |
@@ -3284,7 +3286,9 @@ export interface PutErrorResponse { | @@ -3284,7 +3286,9 @@ export interface PutErrorResponse { | ||
3284 | * @description | 3286 | * @description |
3285 | * OK | 3287 | * OK |
3286 | */ | 3288 | */ |
3287 | - 200: ModelAndView; | 3289 | + 200: { |
3290 | + [propertyName: string]: any; | ||
3291 | + }; | ||
3288 | /** | 3292 | /** |
3289 | * @description | 3293 | * @description |
3290 | * Created | 3294 | * Created |
@@ -3310,9 +3314,9 @@ export interface PutErrorResponse { | @@ -3310,9 +3314,9 @@ export interface PutErrorResponse { | ||
3310 | export type PutErrorResponseSuccess = PutErrorResponse[200]; | 3314 | export type PutErrorResponseSuccess = PutErrorResponse[200]; |
3311 | /** | 3315 | /** |
3312 | * @description | 3316 | * @description |
3313 | - * errorHtml | 3317 | + * error |
3314 | * @tags basic-error-controller | 3318 | * @tags basic-error-controller |
3315 | - * @produces text/html | 3319 | + * @produces * |
3316 | * @consumes application/json | 3320 | * @consumes application/json |
3317 | */ | 3321 | */ |
3318 | export const putError = /* #__PURE__ */ (() => { | 3322 | export const putError = /* #__PURE__ */ (() => { |
@@ -3337,7 +3341,9 @@ export interface PostErrorResponse { | @@ -3337,7 +3341,9 @@ export interface PostErrorResponse { | ||
3337 | * @description | 3341 | * @description |
3338 | * OK | 3342 | * OK |
3339 | */ | 3343 | */ |
3340 | - 200: ModelAndView; | 3344 | + 200: { |
3345 | + [propertyName: string]: any; | ||
3346 | + }; | ||
3341 | /** | 3347 | /** |
3342 | * @description | 3348 | * @description |
3343 | * Created | 3349 | * Created |
@@ -3363,9 +3369,9 @@ export interface PostErrorResponse { | @@ -3363,9 +3369,9 @@ export interface PostErrorResponse { | ||
3363 | export type PostErrorResponseSuccess = PostErrorResponse[200]; | 3369 | export type PostErrorResponseSuccess = PostErrorResponse[200]; |
3364 | /** | 3370 | /** |
3365 | * @description | 3371 | * @description |
3366 | - * errorHtml | 3372 | + * error |
3367 | * @tags basic-error-controller | 3373 | * @tags basic-error-controller |
3368 | - * @produces text/html | 3374 | + * @produces * |
3369 | * @consumes application/json | 3375 | * @consumes application/json |
3370 | */ | 3376 | */ |
3371 | export const postError = /* #__PURE__ */ (() => { | 3377 | export const postError = /* #__PURE__ */ (() => { |
@@ -3390,7 +3396,9 @@ export interface DeleteErrorResponse { | @@ -3390,7 +3396,9 @@ export interface DeleteErrorResponse { | ||
3390 | * @description | 3396 | * @description |
3391 | * OK | 3397 | * OK |
3392 | */ | 3398 | */ |
3393 | - 200: ModelAndView; | 3399 | + 200: { |
3400 | + [propertyName: string]: any; | ||
3401 | + }; | ||
3394 | /** | 3402 | /** |
3395 | * @description | 3403 | * @description |
3396 | * No Content | 3404 | * No Content |
@@ -3411,9 +3419,9 @@ export interface DeleteErrorResponse { | @@ -3411,9 +3419,9 @@ export interface DeleteErrorResponse { | ||
3411 | export type DeleteErrorResponseSuccess = DeleteErrorResponse[200]; | 3419 | export type DeleteErrorResponseSuccess = DeleteErrorResponse[200]; |
3412 | /** | 3420 | /** |
3413 | * @description | 3421 | * @description |
3414 | - * errorHtml | 3422 | + * error |
3415 | * @tags basic-error-controller | 3423 | * @tags basic-error-controller |
3416 | - * @produces text/html | 3424 | + * @produces * |
3417 | */ | 3425 | */ |
3418 | export const deleteError = /* #__PURE__ */ (() => { | 3426 | export const deleteError = /* #__PURE__ */ (() => { |
3419 | const method = 'delete'; | 3427 | const method = 'delete'; |
@@ -3437,7 +3445,9 @@ export interface OptionsErrorResponse { | @@ -3437,7 +3445,9 @@ export interface OptionsErrorResponse { | ||
3437 | * @description | 3445 | * @description |
3438 | * OK | 3446 | * OK |
3439 | */ | 3447 | */ |
3440 | - 200: ModelAndView; | 3448 | + 200: { |
3449 | + [propertyName: string]: any; | ||
3450 | + }; | ||
3441 | /** | 3451 | /** |
3442 | * @description | 3452 | * @description |
3443 | * No Content | 3453 | * No Content |
@@ -3458,9 +3468,9 @@ export interface OptionsErrorResponse { | @@ -3458,9 +3468,9 @@ export interface OptionsErrorResponse { | ||
3458 | export type OptionsErrorResponseSuccess = OptionsErrorResponse[200]; | 3468 | export type OptionsErrorResponseSuccess = OptionsErrorResponse[200]; |
3459 | /** | 3469 | /** |
3460 | * @description | 3470 | * @description |
3461 | - * errorHtml | 3471 | + * error |
3462 | * @tags basic-error-controller | 3472 | * @tags basic-error-controller |
3463 | - * @produces text/html | 3473 | + * @produces * |
3464 | * @consumes application/json | 3474 | * @consumes application/json |
3465 | */ | 3475 | */ |
3466 | export const optionsError = /* #__PURE__ */ (() => { | 3476 | export const optionsError = /* #__PURE__ */ (() => { |
@@ -3485,7 +3495,9 @@ export interface HeadErrorResponse { | @@ -3485,7 +3495,9 @@ export interface HeadErrorResponse { | ||
3485 | * @description | 3495 | * @description |
3486 | * OK | 3496 | * OK |
3487 | */ | 3497 | */ |
3488 | - 200: ModelAndView; | 3498 | + 200: { |
3499 | + [propertyName: string]: any; | ||
3500 | + }; | ||
3489 | /** | 3501 | /** |
3490 | * @description | 3502 | * @description |
3491 | * No Content | 3503 | * No Content |
@@ -3506,9 +3518,9 @@ export interface HeadErrorResponse { | @@ -3506,9 +3518,9 @@ export interface HeadErrorResponse { | ||
3506 | export type HeadErrorResponseSuccess = HeadErrorResponse[200]; | 3518 | export type HeadErrorResponseSuccess = HeadErrorResponse[200]; |
3507 | /** | 3519 | /** |
3508 | * @description | 3520 | * @description |
3509 | - * errorHtml | 3521 | + * error |
3510 | * @tags basic-error-controller | 3522 | * @tags basic-error-controller |
3511 | - * @produces text/html | 3523 | + * @produces * |
3512 | * @consumes application/json | 3524 | * @consumes application/json |
3513 | */ | 3525 | */ |
3514 | export const headError = /* #__PURE__ */ (() => { | 3526 | export const headError = /* #__PURE__ */ (() => { |
@@ -3533,7 +3545,9 @@ export interface PatchErrorResponse { | @@ -3533,7 +3545,9 @@ export interface PatchErrorResponse { | ||
3533 | * @description | 3545 | * @description |
3534 | * OK | 3546 | * OK |
3535 | */ | 3547 | */ |
3536 | - 200: ModelAndView; | 3548 | + 200: { |
3549 | + [propertyName: string]: any; | ||
3550 | + }; | ||
3537 | /** | 3551 | /** |
3538 | * @description | 3552 | * @description |
3539 | * No Content | 3553 | * No Content |
@@ -3554,9 +3568,9 @@ export interface PatchErrorResponse { | @@ -3554,9 +3568,9 @@ export interface PatchErrorResponse { | ||
3554 | export type PatchErrorResponseSuccess = PatchErrorResponse[200]; | 3568 | export type PatchErrorResponseSuccess = PatchErrorResponse[200]; |
3555 | /** | 3569 | /** |
3556 | * @description | 3570 | * @description |
3557 | - * errorHtml | 3571 | + * error |
3558 | * @tags basic-error-controller | 3572 | * @tags basic-error-controller |
3559 | - * @produces text/html | 3573 | + * @produces * |
3560 | * @consumes application/json | 3574 | * @consumes application/json |
3561 | */ | 3575 | */ |
3562 | export const patchError = /* #__PURE__ */ (() => { | 3576 | export const patchError = /* #__PURE__ */ (() => { |
@@ -14094,6 +14108,77 @@ export const postServiceInvoiceCancelInvoiceAndBankStatement = | @@ -14094,6 +14108,77 @@ export const postServiceInvoiceCancelInvoiceAndBankStatement = | ||
14094 | return request; | 14108 | return request; |
14095 | })(); | 14109 | })(); |
14096 | 14110 | ||
14111 | +/** @description request parameter type for postServiceInvoiceCancelInvoiceRecord */ | ||
14112 | +export interface PostServiceInvoiceCancelInvoiceRecordOption { | ||
14113 | + /** | ||
14114 | + * @description | ||
14115 | + * cancelInvoiceRecordDto | ||
14116 | + */ | ||
14117 | + body: { | ||
14118 | + /** | ||
14119 | + @description | ||
14120 | + cancelInvoiceRecordDto */ | ||
14121 | + cancelInvoiceRecordDto: CancelInvoiceRecordDto; | ||
14122 | + }; | ||
14123 | +} | ||
14124 | + | ||
14125 | +/** @description response type for postServiceInvoiceCancelInvoiceRecord */ | ||
14126 | +export interface PostServiceInvoiceCancelInvoiceRecordResponse { | ||
14127 | + /** | ||
14128 | + * @description | ||
14129 | + * OK | ||
14130 | + */ | ||
14131 | + 200: ServerResult; | ||
14132 | + /** | ||
14133 | + * @description | ||
14134 | + * Created | ||
14135 | + */ | ||
14136 | + 201: any; | ||
14137 | + /** | ||
14138 | + * @description | ||
14139 | + * Unauthorized | ||
14140 | + */ | ||
14141 | + 401: any; | ||
14142 | + /** | ||
14143 | + * @description | ||
14144 | + * Forbidden | ||
14145 | + */ | ||
14146 | + 403: any; | ||
14147 | + /** | ||
14148 | + * @description | ||
14149 | + * Not Found | ||
14150 | + */ | ||
14151 | + 404: any; | ||
14152 | +} | ||
14153 | + | ||
14154 | +export type PostServiceInvoiceCancelInvoiceRecordResponseSuccess = | ||
14155 | + PostServiceInvoiceCancelInvoiceRecordResponse[200]; | ||
14156 | +/** | ||
14157 | + * @description | ||
14158 | + * 取消开票记录 | ||
14159 | + * @tags 发票 | ||
14160 | + * @produces * | ||
14161 | + * @consumes application/json | ||
14162 | + */ | ||
14163 | +export const postServiceInvoiceCancelInvoiceRecord = /* #__PURE__ */ (() => { | ||
14164 | + const method = 'post'; | ||
14165 | + const url = '/service/invoice/cancelInvoiceRecord'; | ||
14166 | + function request( | ||
14167 | + option: PostServiceInvoiceCancelInvoiceRecordOption, | ||
14168 | + ): Promise<PostServiceInvoiceCancelInvoiceRecordResponseSuccess> { | ||
14169 | + return requester(request.url, { | ||
14170 | + method: request.method, | ||
14171 | + ...option, | ||
14172 | + }) as unknown as Promise<PostServiceInvoiceCancelInvoiceRecordResponseSuccess>; | ||
14173 | + } | ||
14174 | + | ||
14175 | + /** http method */ | ||
14176 | + request.method = method; | ||
14177 | + /** request url */ | ||
14178 | + request.url = url; | ||
14179 | + return request; | ||
14180 | +})(); | ||
14181 | + | ||
14097 | /** @description request parameter type for postServiceInvoiceDealInvoicingResult */ | 14182 | /** @description request parameter type for postServiceInvoiceDealInvoicingResult */ |
14098 | export interface PostServiceInvoiceDealInvoicingResultOption { | 14183 | export interface PostServiceInvoiceDealInvoicingResultOption { |
14099 | /** | 14184 | /** |
@@ -14309,6 +14394,77 @@ export const postServiceInvoiceDownloadInvoice = /* #__PURE__ */ (() => { | @@ -14309,6 +14394,77 @@ export const postServiceInvoiceDownloadInvoice = /* #__PURE__ */ (() => { | ||
14309 | return request; | 14394 | return request; |
14310 | })(); | 14395 | })(); |
14311 | 14396 | ||
14397 | +/** @description request parameter type for postServiceInvoiceExportBankStatements */ | ||
14398 | +export interface PostServiceInvoiceExportBankStatementsOption { | ||
14399 | + /** | ||
14400 | + * @description | ||
14401 | + * dto | ||
14402 | + */ | ||
14403 | + body: { | ||
14404 | + /** | ||
14405 | + @description | ||
14406 | + dto */ | ||
14407 | + dto: QueryBankStatementDto; | ||
14408 | + }; | ||
14409 | +} | ||
14410 | + | ||
14411 | +/** @description response type for postServiceInvoiceExportBankStatements */ | ||
14412 | +export interface PostServiceInvoiceExportBankStatementsResponse { | ||
14413 | + /** | ||
14414 | + * @description | ||
14415 | + * OK | ||
14416 | + */ | ||
14417 | + 200: any; | ||
14418 | + /** | ||
14419 | + * @description | ||
14420 | + * Created | ||
14421 | + */ | ||
14422 | + 201: any; | ||
14423 | + /** | ||
14424 | + * @description | ||
14425 | + * Unauthorized | ||
14426 | + */ | ||
14427 | + 401: any; | ||
14428 | + /** | ||
14429 | + * @description | ||
14430 | + * Forbidden | ||
14431 | + */ | ||
14432 | + 403: any; | ||
14433 | + /** | ||
14434 | + * @description | ||
14435 | + * Not Found | ||
14436 | + */ | ||
14437 | + 404: any; | ||
14438 | +} | ||
14439 | + | ||
14440 | +export type PostServiceInvoiceExportBankStatementsResponseSuccess = | ||
14441 | + PostServiceInvoiceExportBankStatementsResponse[200]; | ||
14442 | +/** | ||
14443 | + * @description | ||
14444 | + * 导出银行流水 | ||
14445 | + * @tags 发票 | ||
14446 | + * @produces * | ||
14447 | + * @consumes application/json | ||
14448 | + */ | ||
14449 | +export const postServiceInvoiceExportBankStatements = /* #__PURE__ */ (() => { | ||
14450 | + const method = 'post'; | ||
14451 | + const url = '/service/invoice/exportBankStatements'; | ||
14452 | + function request( | ||
14453 | + option: PostServiceInvoiceExportBankStatementsOption, | ||
14454 | + ): Promise<PostServiceInvoiceExportBankStatementsResponseSuccess> { | ||
14455 | + return requester(request.url, { | ||
14456 | + method: request.method, | ||
14457 | + ...option, | ||
14458 | + }) as unknown as Promise<PostServiceInvoiceExportBankStatementsResponseSuccess>; | ||
14459 | + } | ||
14460 | + | ||
14461 | + /** http method */ | ||
14462 | + request.method = method; | ||
14463 | + /** request url */ | ||
14464 | + request.url = url; | ||
14465 | + return request; | ||
14466 | +})(); | ||
14467 | + | ||
14312 | /** @description response type for getServiceInvoiceExportInvoiceDetailsTemplate */ | 14468 | /** @description response type for getServiceInvoiceExportInvoiceDetailsTemplate */ |
14313 | export interface GetServiceInvoiceExportInvoiceDetailsTemplateResponse { | 14469 | export interface GetServiceInvoiceExportInvoiceDetailsTemplateResponse { |
14314 | /** | 14470 | /** |
@@ -15134,6 +15290,77 @@ export const postServiceInvoiceInvoicing = /* #__PURE__ */ (() => { | @@ -15134,6 +15290,77 @@ export const postServiceInvoiceInvoicing = /* #__PURE__ */ (() => { | ||
15134 | return request; | 15290 | return request; |
15135 | })(); | 15291 | })(); |
15136 | 15292 | ||
15293 | +/** @description request parameter type for postServiceInvoiceModify */ | ||
15294 | +export interface PostServiceInvoiceModifyOption { | ||
15295 | + /** | ||
15296 | + * @description | ||
15297 | + * dto | ||
15298 | + */ | ||
15299 | + body: { | ||
15300 | + /** | ||
15301 | + @description | ||
15302 | + dto */ | ||
15303 | + dto: InvoiceDto; | ||
15304 | + }; | ||
15305 | +} | ||
15306 | + | ||
15307 | +/** @description response type for postServiceInvoiceModify */ | ||
15308 | +export interface PostServiceInvoiceModifyResponse { | ||
15309 | + /** | ||
15310 | + * @description | ||
15311 | + * OK | ||
15312 | + */ | ||
15313 | + 200: ServerResult; | ||
15314 | + /** | ||
15315 | + * @description | ||
15316 | + * Created | ||
15317 | + */ | ||
15318 | + 201: any; | ||
15319 | + /** | ||
15320 | + * @description | ||
15321 | + * Unauthorized | ||
15322 | + */ | ||
15323 | + 401: any; | ||
15324 | + /** | ||
15325 | + * @description | ||
15326 | + * Forbidden | ||
15327 | + */ | ||
15328 | + 403: any; | ||
15329 | + /** | ||
15330 | + * @description | ||
15331 | + * Not Found | ||
15332 | + */ | ||
15333 | + 404: any; | ||
15334 | +} | ||
15335 | + | ||
15336 | +export type PostServiceInvoiceModifyResponseSuccess = | ||
15337 | + PostServiceInvoiceModifyResponse[200]; | ||
15338 | +/** | ||
15339 | + * @description | ||
15340 | + * 修改发票 | ||
15341 | + * @tags 发票 | ||
15342 | + * @produces * | ||
15343 | + * @consumes application/json | ||
15344 | + */ | ||
15345 | +export const postServiceInvoiceModify = /* #__PURE__ */ (() => { | ||
15346 | + const method = 'post'; | ||
15347 | + const url = '/service/invoice/modify'; | ||
15348 | + function request( | ||
15349 | + option: PostServiceInvoiceModifyOption, | ||
15350 | + ): Promise<PostServiceInvoiceModifyResponseSuccess> { | ||
15351 | + return requester(request.url, { | ||
15352 | + method: request.method, | ||
15353 | + ...option, | ||
15354 | + }) as unknown as Promise<PostServiceInvoiceModifyResponseSuccess>; | ||
15355 | + } | ||
15356 | + | ||
15357 | + /** http method */ | ||
15358 | + request.method = method; | ||
15359 | + /** request url */ | ||
15360 | + request.url = url; | ||
15361 | + return request; | ||
15362 | +})(); | ||
15363 | + | ||
15137 | /** @description request parameter type for postServiceInvoiceModifyRecord */ | 15364 | /** @description request parameter type for postServiceInvoiceModifyRecord */ |
15138 | export interface PostServiceInvoiceModifyRecordOption { | 15365 | export interface PostServiceInvoiceModifyRecordOption { |
15139 | /** | 15366 | /** |