Commit d2df4bf4d2478bc80ac5c632d0d4e14b1cbd3b92
1 parent
78b2816b
feat: update 采购批量审核
Showing
7 changed files
with
257 additions
and
52 deletions
src/pages/Order/components/OrderDrawer copy.tsx
@@ -556,6 +556,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -556,6 +556,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
556 | }} | 556 | }} |
557 | // disabled={mainInfoDisbled} | 557 | // disabled={mainInfoDisbled} |
558 | /> | 558 | /> |
559 | + | ||
559 | <ProFormText | 560 | <ProFormText |
560 | key="erpCustomerName" | 561 | key="erpCustomerName" |
561 | name="erpCustomerName" | 562 | name="erpCustomerName" |
src/pages/Order/components/ProcureCheckModal.tsx
@@ -4,20 +4,24 @@ import { | @@ -4,20 +4,24 @@ import { | ||
4 | postServiceOrderProcureConvertWarehouseKeeper, | 4 | postServiceOrderProcureConvertWarehouseKeeper, |
5 | postServiceOrderQuerySupplier, | 5 | postServiceOrderQuerySupplier, |
6 | } from '@/services'; | 6 | } from '@/services'; |
7 | -import { ModalForm, ProFormSelect } from '@ant-design/pro-components'; | 7 | +import { |
8 | + ModalForm, | ||
9 | + ProFormSelect, | ||
10 | + ProFormTextArea, | ||
11 | +} from '@ant-design/pro-components'; | ||
8 | import { Button, Form, Input, Popconfirm, message } from 'antd'; | 12 | import { Button, Form, Input, Popconfirm, message } from 'antd'; |
9 | import { useState } from 'react'; | 13 | import { useState } from 'react'; |
10 | -export default ({ setCheckVisible, data, subOrders, onClose }) => { | ||
11 | - const [form] = Form.useForm<{ name: string; company: string }>(); | 14 | +export default ({ setCheckVisible, isMainOrder, data, orders, onClose }) => { |
15 | + const [form] = Form.useForm<{ supplier: string }>(); | ||
12 | 16 | ||
13 | const [checkNotes, setCheckNotes] = useState<string>(''); | 17 | const [checkNotes, setCheckNotes] = useState<string>(''); |
14 | 18 | ||
15 | - let subOrderIds: any[] = []; | 19 | + let ids: any[] = []; |
16 | //是单条子订单审核 | 20 | //是单条子订单审核 |
17 | - if (subOrders === undefined) { | ||
18 | - subOrderIds = [data.id]; | 21 | + if (orders === undefined) { |
22 | + ids = [data.id]; | ||
19 | } else { | 23 | } else { |
20 | - subOrderIds = subOrders.map((subOrder) => subOrder.id); | 24 | + ids = orders.map((order: any) => order.id); |
21 | } | 25 | } |
22 | async function doCheck(body: object) { | 26 | async function doCheck(body: object) { |
23 | const data = await postServiceOrderProcureCheckOrder({ | 27 | const data = await postServiceOrderProcureCheckOrder({ |
@@ -31,8 +35,7 @@ export default ({ setCheckVisible, data, subOrders, onClose }) => { | @@ -31,8 +35,7 @@ export default ({ setCheckVisible, data, subOrders, onClose }) => { | ||
31 | 35 | ||
32 | return ( | 36 | return ( |
33 | <ModalForm<{ | 37 | <ModalForm<{ |
34 | - name: string; | ||
35 | - company: string; | 38 | + supplier: string; |
36 | }> | 39 | }> |
37 | width={500} | 40 | width={500} |
38 | open | 41 | open |
@@ -69,13 +72,22 @@ export default ({ setCheckVisible, data, subOrders, onClose }) => { | @@ -69,13 +72,22 @@ export default ({ setCheckVisible, data, subOrders, onClose }) => { | ||
69 | </div> | 72 | </div> |
70 | } | 73 | } |
71 | onConfirm={async () => { | 74 | onConfirm={async () => { |
72 | - const res = | ||
73 | - await postServiceOrderProcureConvertWarehouseKeeper({ | 75 | + let res; |
76 | + if (isMainOrder) { | ||
77 | + res = await postServiceOrderProcureConvertWarehouseKeeper({ | ||
78 | + data: { | ||
79 | + mainIds: ids, | ||
80 | + checkNotes: checkNotes, | ||
81 | + }, | ||
82 | + }); | ||
83 | + } else { | ||
84 | + res = await postServiceOrderProcureConvertWarehouseKeeper({ | ||
74 | data: { | 85 | data: { |
75 | - subIds: subOrderIds, | 86 | + subIds: ids, |
76 | checkNotes: checkNotes, | 87 | checkNotes: checkNotes, |
77 | }, | 88 | }, |
78 | }); | 89 | }); |
90 | + } | ||
79 | 91 | ||
80 | if (res?.result === RESPONSE_CODE.SUCCESS) { | 92 | if (res?.result === RESPONSE_CODE.SUCCESS) { |
81 | message.success(res.message); | 93 | message.success(res.message); |
@@ -95,7 +107,7 @@ export default ({ setCheckVisible, data, subOrders, onClose }) => { | @@ -95,7 +107,7 @@ export default ({ setCheckVisible, data, subOrders, onClose }) => { | ||
95 | }} | 107 | }} |
96 | submitTimeout={2000} | 108 | submitTimeout={2000} |
97 | onFinish={async (values) => { | 109 | onFinish={async (values) => { |
98 | - if (values.name === '0') { | 110 | + if (values.supplier === '0') { |
99 | message.error('选择转回仓库请点击转回仓库按钮!'); | 111 | message.error('选择转回仓库请点击转回仓库按钮!'); |
100 | return; | 112 | return; |
101 | } | 113 | } |
@@ -103,11 +115,19 @@ export default ({ setCheckVisible, data, subOrders, onClose }) => { | @@ -103,11 +115,19 @@ export default ({ setCheckVisible, data, subOrders, onClose }) => { | ||
103 | // if (values.name === '采购自行发货') { | 115 | // if (values.name === '采购自行发货') { |
104 | // procureIsPrintAndSend = true; | 116 | // procureIsPrintAndSend = true; |
105 | // } | 117 | // } |
106 | - return doCheck({ | ||
107 | - ids: subOrderIds, | ||
108 | - supplier: values.name, | ||
109 | - procureIsPrintAndSend: procureIsPrintAndSend, | ||
110 | - }); | 118 | + if (isMainOrder) { |
119 | + return doCheck({ | ||
120 | + ...values, | ||
121 | + mainOrderIds: ids, | ||
122 | + procureIsPrintAndSend: procureIsPrintAndSend, | ||
123 | + }); | ||
124 | + } else { | ||
125 | + return doCheck({ | ||
126 | + ...values, | ||
127 | + subOrderIds: ids, | ||
128 | + procureIsPrintAndSend: procureIsPrintAndSend, | ||
129 | + }); | ||
130 | + } | ||
111 | }} | 131 | }} |
112 | onOpenChange={setCheckVisible} | 132 | onOpenChange={setCheckVisible} |
113 | > | 133 | > |
@@ -115,7 +135,7 @@ export default ({ setCheckVisible, data, subOrders, onClose }) => { | @@ -115,7 +135,7 @@ export default ({ setCheckVisible, data, subOrders, onClose }) => { | ||
115 | key="key" | 135 | key="key" |
116 | label="采购名称" | 136 | label="采购名称" |
117 | width="lg" | 137 | width="lg" |
118 | - name="name" | 138 | + name="supplier" |
119 | // options={options} | 139 | // options={options} |
120 | placeholder="请选择采购" | 140 | placeholder="请选择采购" |
121 | rules={[{ required: true, message: '采购名称必填' }]} | 141 | rules={[{ required: true, message: '采购名称必填' }]} |
@@ -128,6 +148,8 @@ export default ({ setCheckVisible, data, subOrders, onClose }) => { | @@ -128,6 +148,8 @@ export default ({ setCheckVisible, data, subOrders, onClose }) => { | ||
128 | return options; | 148 | return options; |
129 | }} | 149 | }} |
130 | /> | 150 | /> |
151 | + | ||
152 | + <ProFormTextArea label="备注" name="procureNotes" key="procureNotes" /> | ||
131 | </ModalForm> | 153 | </ModalForm> |
132 | ); | 154 | ); |
133 | }; | 155 | }; |
src/pages/Order/components/ProcureNotesEditModal.tsx
0 → 100644
1 | +import { RESPONSE_CODE } from '@/constants/enum'; | ||
2 | +import { postServiceOrderProcureNotesEdit } from '@/services'; | ||
3 | +import { ModalForm, ProFormTextArea } from '@ant-design/pro-components'; | ||
4 | +import { Form, message } from 'antd'; | ||
5 | +export default ({ setNotesEditVisible, data, onClose }) => { | ||
6 | + const [form] = Form.useForm<{ procureNotes: string }>(); | ||
7 | + return ( | ||
8 | + <ModalForm<{ | ||
9 | + procureNotes: string; | ||
10 | + }> | ||
11 | + width={500} | ||
12 | + open | ||
13 | + title="修改备注" | ||
14 | + form={form} | ||
15 | + autoFocusFirstInput | ||
16 | + modalProps={{ | ||
17 | + okText: '保存', | ||
18 | + cancelText: '取消', | ||
19 | + destroyOnClose: true, | ||
20 | + onCancel: () => { | ||
21 | + setNotesEditVisible(false); | ||
22 | + }, | ||
23 | + }} | ||
24 | + submitTimeout={2000} | ||
25 | + onFinish={async (values) => { | ||
26 | + let body = { | ||
27 | + subOrderId: data.id, | ||
28 | + procureNotes: values.procureNotes, | ||
29 | + }; | ||
30 | + const res = await postServiceOrderProcureNotesEdit({ data: body }); | ||
31 | + if (res.result === RESPONSE_CODE.SUCCESS) { | ||
32 | + message.success(res.message); | ||
33 | + onClose(); | ||
34 | + } | ||
35 | + }} | ||
36 | + onOpenChange={setNotesEditVisible} | ||
37 | + > | ||
38 | + <ProFormTextArea | ||
39 | + width="lg" | ||
40 | + key="procureNotes" | ||
41 | + name="procureNotes" | ||
42 | + initialValue={data.procureNotes} | ||
43 | + placeholder="填写备注内容" | ||
44 | + /> | ||
45 | + </ModalForm> | ||
46 | + ); | ||
47 | +}; |
src/pages/Order/constant.ts
@@ -56,6 +56,9 @@ export const PAYEE_OPTIONS = { | @@ -56,6 +56,9 @@ export const PAYEE_OPTIONS = { | ||
56 | INNOVATION_ALIPAY: '创新支付宝', | 56 | INNOVATION_ALIPAY: '创新支付宝', |
57 | ZHUGUANG_ALIPAY: '烛光支付宝', | 57 | ZHUGUANG_ALIPAY: '烛光支付宝', |
58 | ZHUGUANG_WISE_COLLECTION: '烛光慧收款', | 58 | ZHUGUANG_WISE_COLLECTION: '烛光慧收款', |
59 | + EXPERIMENT_QR_CODE: '实验二维码', | ||
60 | + INNOVATION_QR_CODE: '创新二维码', | ||
61 | + NEW_ENERGY_QR_CODE: '新能源二维码', | ||
59 | }; | 62 | }; |
60 | 63 | ||
61 | export const PROCURE_ORDER_STATUS = { | 64 | export const PROCURE_ORDER_STATUS = { |
src/pages/Order/index.tsx
@@ -72,6 +72,7 @@ import OrderDrawer from './components/OrderDrawer'; | @@ -72,6 +72,7 @@ import OrderDrawer from './components/OrderDrawer'; | ||
72 | import OrderNotesEditModal from './components/OrderNotesEditModal'; | 72 | import OrderNotesEditModal from './components/OrderNotesEditModal'; |
73 | import ProcureCheckModal from './components/ProcureCheckModal'; | 73 | import ProcureCheckModal from './components/ProcureCheckModal'; |
74 | import ProcureConvertModal from './components/ProcureConvertModal'; | 74 | import ProcureConvertModal from './components/ProcureConvertModal'; |
75 | +import ProcureNotesEditModal from './components/ProcureNotesEditModal'; | ||
75 | import SubOrderComfirmReceiptImagesModal from './components/SubOrderComfirmReceiptImagesModal'; | 76 | import SubOrderComfirmReceiptImagesModal from './components/SubOrderComfirmReceiptImagesModal'; |
76 | import { | 77 | import { |
77 | AFTER_INVOICING_STATUS, | 78 | AFTER_INVOICING_STATUS, |
@@ -103,6 +104,8 @@ const OrderPage = () => { | @@ -103,6 +104,8 @@ const OrderPage = () => { | ||
103 | ] = useState<boolean>(false); | 104 | ] = useState<boolean>(false); |
104 | const [data, setData] = useState([]); //列表数据 | 105 | const [data, setData] = useState([]); //列表数据 |
105 | const [notesEditVisible, setNotesEditVisible] = useState<boolean>(false); | 106 | const [notesEditVisible, setNotesEditVisible] = useState<boolean>(false); |
107 | + const [procureNotesEditModalVisible, setProcureNotesEditModalVisible] = | ||
108 | + useState<boolean>(false); | ||
106 | const [financialMergeDrawerVisible, setFinancialMergeDrawerVisible] = | 109 | const [financialMergeDrawerVisible, setFinancialMergeDrawerVisible] = |
107 | useState<boolean>(false); | 110 | useState<boolean>(false); |
108 | const [attachmentModalVisible, setAttachmentModalVisible] = | 111 | const [attachmentModalVisible, setAttachmentModalVisible] = |
@@ -164,6 +167,7 @@ const OrderPage = () => { | @@ -164,6 +167,7 @@ const OrderPage = () => { | ||
164 | const mainTableFormRef = useRef<ProFormInstance>(); | 167 | const mainTableFormRef = useRef<ProFormInstance>(); |
165 | let [searchParams, setSearchParam] = useState(Object); //表格的查询条件存储 | 168 | let [searchParams, setSearchParam] = useState(Object); //表格的查询条件存储 |
166 | const [messageApi, contextHolder] = message.useMessage(); | 169 | const [messageApi, contextHolder] = message.useMessage(); |
170 | + const roleCode = userInfo?.roleSmallVO?.code; | ||
167 | 171 | ||
168 | // const openCheckNotes = (checkNotes: string) => { | 172 | // const openCheckNotes = (checkNotes: string) => { |
169 | // Modal.info({ | 173 | // Modal.info({ |
@@ -567,7 +571,7 @@ const OrderPage = () => { | @@ -567,7 +571,7 @@ const OrderPage = () => { | ||
567 | <div className="max-w-[90%] whitespace-no-wrap overflow-hidden overflow-ellipsis"> | 571 | <div className="max-w-[90%] whitespace-no-wrap overflow-hidden overflow-ellipsis"> |
568 | <span className="text-[#8C8C8C]"> | 572 | <span className="text-[#8C8C8C]"> |
569 | 备注: | 573 | 备注: |
570 | - {optRecord.notes === undefined ? '暂无备注' : optRecord.notes} | 574 | + {optRecord.notes === null ? '暂无备注' : optRecord.notes} |
571 | </span> | 575 | </span> |
572 | </div> | 576 | </div> |
573 | {/* 编辑备注按钮 */} | 577 | {/* 编辑备注按钮 */} |
@@ -580,6 +584,30 @@ const OrderPage = () => { | @@ -580,6 +584,30 @@ const OrderPage = () => { | ||
580 | }} | 584 | }} |
581 | /> | 585 | /> |
582 | </Flex> | 586 | </Flex> |
587 | + {roleCode === 'procure' || | ||
588 | + roleCode === 'warehouseKeeper' || | ||
589 | + roleCode === 'admin' ? ( | ||
590 | + <Flex title={optRecord.procureNotes}> | ||
591 | + <div className="max-w-[90%] whitespace-no-wrap overflow-hidden overflow-ellipsis"> | ||
592 | + <span className="text-[#8C8C8C]"> | ||
593 | + 采购备注: | ||
594 | + {optRecord.procureNotes === null | ||
595 | + ? '暂无备注' | ||
596 | + : optRecord.procureNotes} | ||
597 | + </span> | ||
598 | + </div> | ||
599 | + {/* 编辑备注按钮 */} | ||
600 | + <EditTwoTone | ||
601 | + className="pl-1 hover:curcor-pointer" | ||
602 | + onClick={() => { | ||
603 | + setOrderRow(optRecord); | ||
604 | + setProcureNotesEditModalVisible(true); | ||
605 | + }} | ||
606 | + /> | ||
607 | + </Flex> | ||
608 | + ) : ( | ||
609 | + '' | ||
610 | + )} | ||
583 | 611 | ||
584 | {/* {optRecord.applyInvoicingNotes !== undefined && | 612 | {/* {optRecord.applyInvoicingNotes !== undefined && |
585 | optRecord.applyInvoicingNotes !== null ? ( | 613 | optRecord.applyInvoicingNotes !== null ? ( |
@@ -1232,10 +1260,10 @@ const OrderPage = () => { | @@ -1232,10 +1260,10 @@ const OrderPage = () => { | ||
1232 | </Flex> | 1260 | </Flex> |
1233 | </Flex> | 1261 | </Flex> |
1234 | 1262 | ||
1235 | - {userInfo?.roleSmallVO?.code === 'admin' || | ||
1236 | - userInfo?.roleSmallVO?.code === 'salesManager' || | ||
1237 | - userInfo?.roleSmallVO?.code === 'salesRepresentative' || | ||
1238 | - userInfo?.roleSmallVO?.code === 'finance' ? ( | 1263 | + {roleCode === 'admin' || |
1264 | + roleCode === 'salesManager' || | ||
1265 | + roleCode === 'salesRepresentative' || | ||
1266 | + roleCode === 'finance' ? ( | ||
1239 | <Flex title={optRecord.notes}> | 1267 | <Flex title={optRecord.notes}> |
1240 | <div className="flex items-center"> | 1268 | <div className="flex items-center"> |
1241 | <div className="flex items-center max-w-[500px]"> | 1269 | <div className="flex items-center max-w-[500px]"> |
@@ -1410,7 +1438,7 @@ const OrderPage = () => { | @@ -1410,7 +1438,7 @@ const OrderPage = () => { | ||
1410 | </Flex> | 1438 | </Flex> |
1411 | </Flex> | 1439 | </Flex> |
1412 | <Flex className="pl-6" align="center"> | 1440 | <Flex className="pl-6" align="center"> |
1413 | - {userInfo?.roleSmallVO?.code === 'finance' ? ( | 1441 | + {roleCode === 'finance' ? ( |
1414 | <div | 1442 | <div |
1415 | title={enumValueToLabel( | 1443 | title={enumValueToLabel( |
1416 | record.receivingCompany, | 1444 | record.receivingCompany, |
@@ -1432,11 +1460,7 @@ const OrderPage = () => { | @@ -1432,11 +1460,7 @@ const OrderPage = () => { | ||
1432 | '' | 1460 | '' |
1433 | )} | 1461 | )} |
1434 | 1462 | ||
1435 | - {userInfo?.roleSmallVO?.code === 'finance' ? ( | ||
1436 | - <Divider type="vertical" /> | ||
1437 | - ) : ( | ||
1438 | - '' | ||
1439 | - )} | 1463 | + {roleCode === 'finance' ? <Divider type="vertical" /> : ''} |
1440 | 1464 | ||
1441 | <div title={record.notes}> | 1465 | <div title={record.notes}> |
1442 | <div className="max-w-md overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1466 | <div className="max-w-md overflow-hidden whitespace-no-wrap overflow-ellipsis"> |
@@ -1530,7 +1554,7 @@ const OrderPage = () => { | @@ -1530,7 +1554,7 @@ const OrderPage = () => { | ||
1530 | '' | 1554 | '' |
1531 | )} | 1555 | )} |
1532 | 1556 | ||
1533 | - {record.mainPath?.includes('orderChangeRequest') && false ? ( | 1557 | + {record.mainPath?.includes('orderChangeRequest') ? ( |
1534 | <Button | 1558 | <Button |
1535 | className="p-0" | 1559 | className="p-0" |
1536 | type="link" | 1560 | type="link" |
@@ -1881,8 +1905,8 @@ const OrderPage = () => { | @@ -1881,8 +1905,8 @@ const OrderPage = () => { | ||
1881 | selectedSubOrders[index].orderStatus; | 1905 | selectedSubOrders[index].orderStatus; |
1882 | //仓库管理员在审核之后的任何时候都可以编辑 | 1906 | //仓库管理员在审核之后的任何时候都可以编辑 |
1883 | if ( | 1907 | if ( |
1884 | - userInfo?.roleSmallVO?.code !== 'warehouseKeeper' && | ||
1885 | - userInfo?.roleSmallVO?.code !== 'admin' | 1908 | + roleCode !== 'warehouseKeeper' && |
1909 | + roleCode !== 'admin' | ||
1886 | ) { | 1910 | ) { |
1887 | //是审核通过及之后的订单 | 1911 | //是审核通过及之后的订单 |
1888 | if ( | 1912 | if ( |
@@ -1898,7 +1922,7 @@ const OrderPage = () => { | @@ -1898,7 +1922,7 @@ const OrderPage = () => { | ||
1898 | } else { | 1922 | } else { |
1899 | //仓库管理员只能编辑是还未审核的订单 | 1923 | //仓库管理员只能编辑是还未审核的订单 |
1900 | if ( | 1924 | if ( |
1901 | - userInfo?.roleSmallVO?.code !== 'admin' && | 1925 | + roleCode !== 'admin' && |
1902 | (orderStatus === 'UNAUDITED' || | 1926 | (orderStatus === 'UNAUDITED' || |
1903 | orderStatus === 'AUDIT_FAILED') | 1927 | orderStatus === 'AUDIT_FAILED') |
1904 | ) { | 1928 | ) { |
@@ -2389,10 +2413,7 @@ const OrderPage = () => { | @@ -2389,10 +2413,7 @@ const OrderPage = () => { | ||
2389 | /** | 2413 | /** |
2390 | * 采购的订单状态筛选内容 | 2414 | * 采购的订单状态筛选内容 |
2391 | */ | 2415 | */ |
2392 | - if ( | ||
2393 | - userInfo?.roleSmallVO?.code === 'procure' && | ||
2394 | - item.dataIndex === 'orderStatus' | ||
2395 | - ) { | 2416 | + if (roleCode === 'procure' && item.dataIndex === 'orderStatus') { |
2396 | item.valueEnum = enumToProTableEnumValue( | 2417 | item.valueEnum = enumToProTableEnumValue( |
2397 | PROCURE_PRIMARY_ORDER_STATUS_OPTIONS, | 2418 | PROCURE_PRIMARY_ORDER_STATUS_OPTIONS, |
2398 | ); | 2419 | ); |
@@ -2402,10 +2423,7 @@ const OrderPage = () => { | @@ -2402,10 +2423,7 @@ const OrderPage = () => { | ||
2402 | ); | 2423 | ); |
2403 | 2424 | ||
2404 | //判断是否是采购,是的话新增一个筛选条件 | 2425 | //判断是否是采购,是的话新增一个筛选条件 |
2405 | - if ( | ||
2406 | - userInfo?.roleSmallVO?.code === 'procure' || | ||
2407 | - userInfo?.roleSmallVO?.code === 'admin' | ||
2408 | - ) { | 2426 | + if (roleCode === 'procure' || roleCode === 'admin') { |
2409 | mainOrdersColumns.push({ | 2427 | mainOrdersColumns.push({ |
2410 | title: '采购下单状态', | 2428 | title: '采购下单状态', |
2411 | dataIndex: 'procureOrderStatus', | 2429 | dataIndex: 'procureOrderStatus', |
@@ -2416,7 +2434,6 @@ const OrderPage = () => { | @@ -2416,7 +2434,6 @@ const OrderPage = () => { | ||
2416 | } | 2434 | } |
2417 | 2435 | ||
2418 | function toolBarRender() { | 2436 | function toolBarRender() { |
2419 | - let roleCode = userInfo?.roleSmallVO?.code; | ||
2420 | let toolBtns = []; | 2437 | let toolBtns = []; |
2421 | 2438 | ||
2422 | if ( | 2439 | if ( |
@@ -2546,6 +2563,28 @@ const OrderPage = () => { | @@ -2546,6 +2563,28 @@ const OrderPage = () => { | ||
2546 | onClick: () => {}, | 2563 | onClick: () => {}, |
2547 | }; | 2564 | }; |
2548 | 2565 | ||
2566 | + if (rolePath?.includes('mergeAudit')) { | ||
2567 | + toolBtns.push( | ||
2568 | + <Button | ||
2569 | + type="primary" | ||
2570 | + key="out" | ||
2571 | + onClick={() => { | ||
2572 | + //选中订单 | ||
2573 | + let mainOrderList = []; | ||
2574 | + for (let order of mainOrderSelectedMap.values()) { | ||
2575 | + mainOrderList.push(order); | ||
2576 | + } | ||
2577 | + setIsMainOrder(true); | ||
2578 | + setSelectedRows(mainOrderList); | ||
2579 | + setProcureCheckModalVisible(true); | ||
2580 | + }} | ||
2581 | + disabled={selectedItems?.length === 0} | ||
2582 | + > | ||
2583 | + 一键审核 | ||
2584 | + </Button>, | ||
2585 | + ); | ||
2586 | + } | ||
2587 | + | ||
2549 | if (rolePath?.includes('mergeApplyInvoicing')) { | 2588 | if (rolePath?.includes('mergeApplyInvoicing')) { |
2550 | toolBtns.push( | 2589 | toolBtns.push( |
2551 | <Button | 2590 | <Button |
@@ -2564,7 +2603,7 @@ const OrderPage = () => { | @@ -2564,7 +2603,7 @@ const OrderPage = () => { | ||
2564 | }} | 2603 | }} |
2565 | disabled={selectedItems?.length === 0} | 2604 | disabled={selectedItems?.length === 0} |
2566 | > | 2605 | > |
2567 | - {userInfo?.roleSmallVO?.code === 'admin' ? '合并(销售)' : '合并开票'} | 2606 | + {roleCode === 'admin' ? '合并(销售)' : '合并开票'} |
2568 | </Button>, | 2607 | </Button>, |
2569 | ); | 2608 | ); |
2570 | } | 2609 | } |
@@ -2605,7 +2644,7 @@ const OrderPage = () => { | @@ -2605,7 +2644,7 @@ const OrderPage = () => { | ||
2605 | }} | 2644 | }} |
2606 | disabled={selectedItems?.length === 0} | 2645 | disabled={selectedItems?.length === 0} |
2607 | > | 2646 | > |
2608 | - {userInfo?.roleSmallVO?.code === 'admin' ? '合并(财务)' : '合并开票'} | 2647 | + {roleCode === 'admin' ? '合并(财务)' : '合并开票'} |
2609 | </Button>, | 2648 | </Button>, |
2610 | ); | 2649 | ); |
2611 | } | 2650 | } |
@@ -2884,6 +2923,19 @@ const OrderPage = () => { | @@ -2884,6 +2923,19 @@ const OrderPage = () => { | ||
2884 | onClose={() => { | 2923 | onClose={() => { |
2885 | setNotesEditVisible(false); | 2924 | setNotesEditVisible(false); |
2886 | setOrderRow({}); | 2925 | setOrderRow({}); |
2926 | + setIsMainOrder(false); | ||
2927 | + refreshTable(); | ||
2928 | + }} | ||
2929 | + /> | ||
2930 | + )} | ||
2931 | + | ||
2932 | + {procureNotesEditModalVisible && ( | ||
2933 | + <ProcureNotesEditModal | ||
2934 | + setNotesEditVisible={setProcureNotesEditModalVisible} | ||
2935 | + data={orderRow} | ||
2936 | + onClose={() => { | ||
2937 | + setProcureNotesEditModalVisible(false); | ||
2938 | + setOrderRow({}); | ||
2887 | refreshTable(); | 2939 | refreshTable(); |
2888 | }} | 2940 | }} |
2889 | /> | 2941 | /> |
@@ -3039,11 +3091,13 @@ const OrderPage = () => { | @@ -3039,11 +3091,13 @@ const OrderPage = () => { | ||
3039 | <ProcureCheckModal | 3091 | <ProcureCheckModal |
3040 | setCheckVisible={setProcureCheckModalVisible} | 3092 | setCheckVisible={setProcureCheckModalVisible} |
3041 | data={orderRow} | 3093 | data={orderRow} |
3042 | - subOrders={selectedRows} | 3094 | + isMainOrder={isMainOrder} |
3095 | + orders={selectedRows} | ||
3043 | onClose={() => { | 3096 | onClose={() => { |
3044 | setProcureCheckModalVisible(false); | 3097 | setProcureCheckModalVisible(false); |
3045 | setOrderRow({}); | 3098 | setOrderRow({}); |
3046 | setSelectedRows({}); | 3099 | setSelectedRows({}); |
3100 | + setIsMainOrder(false); | ||
3047 | refreshTable(); | 3101 | refreshTable(); |
3048 | }} | 3102 | }} |
3049 | /> | 3103 | /> |
src/services/definition.ts
@@ -1132,6 +1132,12 @@ export interface ProcureConvertProcureDto { | @@ -1132,6 +1132,12 @@ export interface ProcureConvertProcureDto { | ||
1132 | subIds?: Array<number>; | 1132 | subIds?: Array<number>; |
1133 | } | 1133 | } |
1134 | 1134 | ||
1135 | +export interface ProcureNotesEditDto { | ||
1136 | + procureNotes?: string; | ||
1137 | + /** @format int64 */ | ||
1138 | + subOrderId?: number; | ||
1139 | +} | ||
1140 | + | ||
1135 | export interface ProcureOrderDto { | 1141 | export interface ProcureOrderDto { |
1136 | /** | 1142 | /** |
1137 | * @description | 1143 | * @description |
src/services/request.ts
@@ -49,6 +49,7 @@ import type { | @@ -49,6 +49,7 @@ import type { | ||
49 | OrderUnlockFieldApplyVO, | 49 | OrderUnlockFieldApplyVO, |
50 | OrderUpdateVO, | 50 | OrderUpdateVO, |
51 | ProcureConvertProcureDto, | 51 | ProcureConvertProcureDto, |
52 | + ProcureNotesEditDto, | ||
52 | ProcureOrderDto, | 53 | ProcureOrderDto, |
53 | ProcurePrintDto, | 54 | ProcurePrintDto, |
54 | ProductInformationDto, | 55 | ProductInformationDto, |
@@ -6322,7 +6323,7 @@ export type PostServiceOrderAfterSalesCheckResponseSuccess = | @@ -6322,7 +6323,7 @@ export type PostServiceOrderAfterSalesCheckResponseSuccess = | ||
6322 | PostServiceOrderAfterSalesCheckResponse[200]; | 6323 | PostServiceOrderAfterSalesCheckResponse[200]; |
6323 | /** | 6324 | /** |
6324 | * @description | 6325 | * @description |
6325 | - * 售后审核 | 6326 | + * 修改订单审核 |
6326 | * @tags 内部订单 | 6327 | * @tags 内部订单 |
6327 | * @produces * | 6328 | * @produces * |
6328 | * @consumes application/json | 6329 | * @consumes application/json |
@@ -6465,7 +6466,7 @@ export type PostServiceOrderApplyAfterSalesResponseSuccess = | @@ -6465,7 +6466,7 @@ export type PostServiceOrderApplyAfterSalesResponseSuccess = | ||
6465 | PostServiceOrderApplyAfterSalesResponse[200]; | 6466 | PostServiceOrderApplyAfterSalesResponse[200]; |
6466 | /** | 6467 | /** |
6467 | * @description | 6468 | * @description |
6468 | - * 申请售后 | 6469 | + * 申请修改订单 |
6469 | * @tags 内部订单 | 6470 | * @tags 内部订单 |
6470 | * @produces * | 6471 | * @produces * |
6471 | * @consumes application/json | 6472 | * @consumes application/json |
@@ -6536,7 +6537,7 @@ export type PostServiceOrderApplyInvoicingResponseSuccess = | @@ -6536,7 +6537,7 @@ export type PostServiceOrderApplyInvoicingResponseSuccess = | ||
6536 | PostServiceOrderApplyInvoicingResponse[200]; | 6537 | PostServiceOrderApplyInvoicingResponse[200]; |
6537 | /** | 6538 | /** |
6538 | * @description | 6539 | * @description |
6539 | - * 销售发起开票 | 6540 | + * 申请开票 |
6540 | * @tags 内部订单 | 6541 | * @tags 内部订单 |
6541 | * @produces * | 6542 | * @produces * |
6542 | * @consumes application/json | 6543 | * @consumes application/json |
@@ -6907,7 +6908,7 @@ export type PostServiceOrderErrorExcelInformationResponseSuccess = | @@ -6907,7 +6908,7 @@ export type PostServiceOrderErrorExcelInformationResponseSuccess = | ||
6907 | PostServiceOrderErrorExcelInformationResponse[200]; | 6908 | PostServiceOrderErrorExcelInformationResponse[200]; |
6908 | /** | 6909 | /** |
6909 | * @description | 6910 | * @description |
6910 | - * 错误表格导入 | 6911 | + * 错误表格导出 |
6911 | * @tags 内部订单 | 6912 | * @tags 内部订单 |
6912 | * @produces * | 6913 | * @produces * |
6913 | * @consumes multipart/form-data | 6914 | * @consumes multipart/form-data |
@@ -7316,7 +7317,7 @@ export type PostServiceOrderInvoicingResponseSuccess = | @@ -7316,7 +7317,7 @@ export type PostServiceOrderInvoicingResponseSuccess = | ||
7316 | PostServiceOrderInvoicingResponse[200]; | 7317 | PostServiceOrderInvoicingResponse[200]; |
7317 | /** | 7318 | /** |
7318 | * @description | 7319 | * @description |
7319 | - * 开票 | 7320 | + * 财务开票 |
7320 | * @tags 内部订单 | 7321 | * @tags 内部订单 |
7321 | * @produces * | 7322 | * @produces * |
7322 | * @consumes application/json | 7323 | * @consumes application/json |
@@ -8051,6 +8052,77 @@ export const postServiceOrderProcureConvertWarehouseKeeper = | @@ -8051,6 +8052,77 @@ export const postServiceOrderProcureConvertWarehouseKeeper = | ||
8051 | return request; | 8052 | return request; |
8052 | })(); | 8053 | })(); |
8053 | 8054 | ||
8055 | +/** @description request parameter type for postServiceOrderProcureNotesEdit */ | ||
8056 | +export interface PostServiceOrderProcureNotesEditOption { | ||
8057 | + /** | ||
8058 | + * @description | ||
8059 | + * dto | ||
8060 | + */ | ||
8061 | + body: { | ||
8062 | + /** | ||
8063 | + @description | ||
8064 | + dto */ | ||
8065 | + dto: ProcureNotesEditDto; | ||
8066 | + }; | ||
8067 | +} | ||
8068 | + | ||
8069 | +/** @description response type for postServiceOrderProcureNotesEdit */ | ||
8070 | +export interface PostServiceOrderProcureNotesEditResponse { | ||
8071 | + /** | ||
8072 | + * @description | ||
8073 | + * OK | ||
8074 | + */ | ||
8075 | + 200: ServerResult; | ||
8076 | + /** | ||
8077 | + * @description | ||
8078 | + * Created | ||
8079 | + */ | ||
8080 | + 201: any; | ||
8081 | + /** | ||
8082 | + * @description | ||
8083 | + * Unauthorized | ||
8084 | + */ | ||
8085 | + 401: any; | ||
8086 | + /** | ||
8087 | + * @description | ||
8088 | + * Forbidden | ||
8089 | + */ | ||
8090 | + 403: any; | ||
8091 | + /** | ||
8092 | + * @description | ||
8093 | + * Not Found | ||
8094 | + */ | ||
8095 | + 404: any; | ||
8096 | +} | ||
8097 | + | ||
8098 | +export type PostServiceOrderProcureNotesEditResponseSuccess = | ||
8099 | + PostServiceOrderProcureNotesEditResponse[200]; | ||
8100 | +/** | ||
8101 | + * @description | ||
8102 | + * 编辑采购备注 | ||
8103 | + * @tags 内部订单 | ||
8104 | + * @produces * | ||
8105 | + * @consumes application/json | ||
8106 | + */ | ||
8107 | +export const postServiceOrderProcureNotesEdit = /* #__PURE__ */ (() => { | ||
8108 | + const method = 'post'; | ||
8109 | + const url = '/service/order/procureNotesEdit'; | ||
8110 | + function request( | ||
8111 | + option: PostServiceOrderProcureNotesEditOption, | ||
8112 | + ): Promise<PostServiceOrderProcureNotesEditResponseSuccess> { | ||
8113 | + return requester(request.url, { | ||
8114 | + method: request.method, | ||
8115 | + ...option, | ||
8116 | + }) as unknown as Promise<PostServiceOrderProcureNotesEditResponseSuccess>; | ||
8117 | + } | ||
8118 | + | ||
8119 | + /** http method */ | ||
8120 | + request.method = method; | ||
8121 | + /** request url */ | ||
8122 | + request.url = url; | ||
8123 | + return request; | ||
8124 | +})(); | ||
8125 | + | ||
8054 | /** @description request parameter type for postServiceOrderProcureOrder */ | 8126 | /** @description request parameter type for postServiceOrderProcureOrder */ |
8055 | export interface PostServiceOrderProcureOrderOption { | 8127 | export interface PostServiceOrderProcureOrderOption { |
8056 | /** | 8128 | /** |
@@ -9287,7 +9359,7 @@ export type PostServiceOrderQueryServiceOrderResponseSuccess = | @@ -9287,7 +9359,7 @@ export type PostServiceOrderQueryServiceOrderResponseSuccess = | ||
9287 | PostServiceOrderQueryServiceOrderResponse[200]; | 9359 | PostServiceOrderQueryServiceOrderResponse[200]; |
9288 | /** | 9360 | /** |
9289 | * @description | 9361 | * @description |
9290 | - * 订单页查询 | 9362 | + * 查询订单列表 |
9291 | * @tags 内部订单 | 9363 | * @tags 内部订单 |
9292 | * @produces * | 9364 | * @produces * |
9293 | * @consumes application/json | 9365 | * @consumes application/json |