Commit 2ca7483f8daf216ab881a3ed8530ece52f151a2f
1 parent
317053aa
feat: update
Showing
10 changed files
with
789 additions
and
69 deletions
src/access.ts
@@ -3,8 +3,8 @@ export default (initialState: API.UserInfo) => { | @@ -3,8 +3,8 @@ export default (initialState: API.UserInfo) => { | ||
3 | // 参考文档 https://umijs.org/docs/max/access | 3 | // 参考文档 https://umijs.org/docs/max/access |
4 | const { roleSmallVO } = initialState; | 4 | const { roleSmallVO } = initialState; |
5 | 5 | ||
6 | - console.log(roleSmallVO.code === 'admin'); | 6 | + console.log(roleSmallVO?.code === 'admin'); |
7 | return { | 7 | return { |
8 | - canReadAdmin: roleSmallVO.code === 'admin', | 8 | + canReadAdmin: roleSmallVO?.code === 'admin', |
9 | }; | 9 | }; |
10 | }; | 10 | }; |
src/pages/Order/components/CheckModal.tsx
1 | import { RESPONSE_CODE } from '@/constants/enum'; | 1 | import { RESPONSE_CODE } from '@/constants/enum'; |
2 | -import { postServiceOrderCheckOrder } from '@/services'; | 2 | +import { |
3 | + postServiceOrderCheckOrder, | ||
4 | + postServiceOrderFinanceCheckOrder, | ||
5 | +} from '@/services'; | ||
3 | import { ModalForm, ProFormTextArea } from '@ant-design/pro-components'; | 6 | import { ModalForm, ProFormTextArea } from '@ant-design/pro-components'; |
4 | import { Button, Form, message } from 'antd'; | 7 | import { Button, Form, message } from 'antd'; |
5 | -export default ({ setCheckVisible, data, subOrders, onClose }) => { | 8 | +import { CHECK_TYPE } from '../constant'; |
9 | +export default ({ | ||
10 | + setCheckVisible, | ||
11 | + data, | ||
12 | + subOrders, | ||
13 | + orderCheckType, | ||
14 | + onClose, | ||
15 | +}) => { | ||
6 | const [form] = Form.useForm<{ name: string; company: string }>(); | 16 | const [form] = Form.useForm<{ name: string; company: string }>(); |
7 | let subOrderIds: any[] = []; | 17 | let subOrderIds: any[] = []; |
8 | //是单条子订单审核 | 18 | //是单条子订单审核 |
@@ -11,6 +21,7 @@ export default ({ setCheckVisible, data, subOrders, onClose }) => { | @@ -11,6 +21,7 @@ export default ({ setCheckVisible, data, subOrders, onClose }) => { | ||
11 | } else { | 21 | } else { |
12 | subOrderIds = subOrders.map((subOrder) => subOrder.id); | 22 | subOrderIds = subOrders.map((subOrder) => subOrder.id); |
13 | } | 23 | } |
24 | + | ||
14 | async function doCheck(body: object) { | 25 | async function doCheck(body: object) { |
15 | const data = await postServiceOrderCheckOrder({ | 26 | const data = await postServiceOrderCheckOrder({ |
16 | data: body, | 27 | data: body, |
@@ -20,6 +31,31 @@ export default ({ setCheckVisible, data, subOrders, onClose }) => { | @@ -20,6 +31,31 @@ export default ({ setCheckVisible, data, subOrders, onClose }) => { | ||
20 | onClose(); | 31 | onClose(); |
21 | } | 32 | } |
22 | } | 33 | } |
34 | + | ||
35 | + /** | ||
36 | + * | ||
37 | + * @param body 财务审核 | ||
38 | + */ | ||
39 | + async function doFinancailCheck(body: object) { | ||
40 | + const data = await postServiceOrderFinanceCheckOrder({ | ||
41 | + data: body, | ||
42 | + }); | ||
43 | + if (data.result === RESPONSE_CODE.SUCCESS) { | ||
44 | + message.success(data.message); | ||
45 | + onClose(); | ||
46 | + } | ||
47 | + } | ||
48 | + | ||
49 | + /** | ||
50 | + * 审核类型 | ||
51 | + */ | ||
52 | + function checkType(check: string) { | ||
53 | + if (orderCheckType === check) { | ||
54 | + return true; | ||
55 | + } | ||
56 | + return false; | ||
57 | + } | ||
58 | + | ||
23 | return ( | 59 | return ( |
24 | <ModalForm<{ | 60 | <ModalForm<{ |
25 | name: string; | 61 | name: string; |
@@ -40,30 +76,74 @@ export default ({ setCheckVisible, data, subOrders, onClose }) => { | @@ -40,30 +76,74 @@ export default ({ setCheckVisible, data, subOrders, onClose }) => { | ||
40 | }} | 76 | }} |
41 | submitter={{ | 77 | submitter={{ |
42 | render: (props, defaultDoms) => { | 78 | render: (props, defaultDoms) => { |
43 | - return [ | 79 | + let myDoms = []; |
80 | + myDoms.push( | ||
44 | <Button | 81 | <Button |
45 | key="驳回" | 82 | key="驳回" |
46 | onClick={() => { | 83 | onClick={() => { |
47 | - doCheck({ | ||
48 | - flag: false, | ||
49 | - ids: subOrderIds, | 84 | + if (checkType(CHECK_TYPE.NORMAL)) { |
85 | + doCheck({ | ||
86 | + flag: false, | ||
87 | + ids: subOrderIds, | ||
88 | + externalProcurement: 0, | ||
89 | + checkNotes: form.getFieldValue('name'), | ||
90 | + }); | ||
91 | + return; | ||
92 | + } | ||
93 | + | ||
94 | + //财务审核 | ||
95 | + doFinancailCheck({ | ||
50 | checkNotes: form.getFieldValue('name'), | 96 | checkNotes: form.getFieldValue('name'), |
97 | + ids: subOrderIds, | ||
98 | + checkPassOrReject: false, | ||
51 | }); | 99 | }); |
52 | }} | 100 | }} |
53 | > | 101 | > |
54 | 驳回 | 102 | 驳回 |
55 | </Button>, | 103 | </Button>, |
56 | - defaultDoms[1], | ||
57 | - ]; | 104 | + ); |
105 | + | ||
106 | + //如果不是财务审核,那么显示这个外部采购 | ||
107 | + if (checkType(CHECK_TYPE.NORMAL)) { | ||
108 | + myDoms.push( | ||
109 | + <Button | ||
110 | + key="外部采购" | ||
111 | + onClick={() => { | ||
112 | + doCheck({ | ||
113 | + flag: false, | ||
114 | + ids: subOrderIds, | ||
115 | + externalProcurement: 1, | ||
116 | + checkNotes: form.getFieldValue('name'), | ||
117 | + }); | ||
118 | + }} | ||
119 | + > | ||
120 | + 外部采购 | ||
121 | + </Button>, | ||
122 | + ); | ||
123 | + } | ||
124 | + | ||
125 | + //确认 | ||
126 | + myDoms.push(defaultDoms[1]); | ||
127 | + return myDoms; | ||
58 | }, | 128 | }, |
59 | }} | 129 | }} |
60 | submitTimeout={2000} | 130 | submitTimeout={2000} |
61 | onFinish={async (values) => { | 131 | onFinish={async (values) => { |
62 | - //审核通过 | ||
63 | - return doCheck({ | ||
64 | - flag: true, | ||
65 | - ids: subOrderIds, | 132 | + if (checkType(CHECK_TYPE.NORMAL)) { |
133 | + //审核通过 | ||
134 | + return doCheck({ | ||
135 | + flag: true, | ||
136 | + ids: subOrderIds, | ||
137 | + externalProcurement: 0, | ||
138 | + checkNotes: values.name, | ||
139 | + }); | ||
140 | + } | ||
141 | + | ||
142 | + //财务审核 | ||
143 | + return doFinancailCheck({ | ||
66 | checkNotes: values.name, | 144 | checkNotes: values.name, |
145 | + ids: subOrderIds, | ||
146 | + checkPassOrReject: true, | ||
67 | }); | 147 | }); |
68 | }} | 148 | }} |
69 | onOpenChange={setCheckVisible} | 149 | onOpenChange={setCheckVisible} |
src/pages/Order/components/DeliverModal.tsx
1 | import { RESPONSE_CODE } from '@/constants/enum'; | 1 | import { RESPONSE_CODE } from '@/constants/enum'; |
2 | -import { postServiceOrderSendProduct } from '@/services'; | 2 | +import { |
3 | + postServiceOrderSendProduct, | ||
4 | + postServiceOrderSupplierSendOrder, | ||
5 | +} from '@/services'; | ||
3 | import { enumToSelect } from '@/utils'; | 6 | import { enumToSelect } from '@/utils'; |
4 | import { | 7 | import { |
5 | ProColumns, | 8 | ProColumns, |
@@ -11,17 +14,31 @@ import { | @@ -11,17 +14,31 @@ import { | ||
11 | import { Button, Input, InputNumber, Modal, Select, message } from 'antd'; | 14 | import { Button, Input, InputNumber, Modal, Select, message } from 'antd'; |
12 | import { cloneDeep } from 'lodash'; | 15 | import { cloneDeep } from 'lodash'; |
13 | import { useEffect, useRef, useState } from 'react'; | 16 | import { useEffect, useRef, useState } from 'react'; |
14 | -import { LOGISTICS_STATUS_OPTIONS } from '../constant'; | 17 | +import { CHECK_TYPE, LOGISTICS_STATUS_OPTIONS } from '../constant'; |
15 | 18 | ||
16 | const DeliverModal = ({ | 19 | const DeliverModal = ({ |
17 | data: propsData, | 20 | data: propsData, |
18 | isSendProduct, | 21 | isSendProduct, |
19 | setVisible, | 22 | setVisible, |
23 | + sendType, | ||
20 | onClose, | 24 | onClose, |
21 | }) => { | 25 | }) => { |
22 | const [data, setData] = useState(propsData || {}); | 26 | const [data, setData] = useState(propsData || {}); |
23 | const form = useRef(); | 27 | const form = useRef(); |
24 | 28 | ||
29 | + /** | ||
30 | + * 是供应商发货还是普通发货 | ||
31 | + * @param typeString | ||
32 | + * @returns | ||
33 | + */ | ||
34 | + function optType(typeString: string) { | ||
35 | + if (sendType === typeString) { | ||
36 | + return true; | ||
37 | + } | ||
38 | + | ||
39 | + return false; | ||
40 | + } | ||
41 | + | ||
25 | useEffect(() => { | 42 | useEffect(() => { |
26 | setData(propsData); | 43 | setData(propsData); |
27 | }, [propsData]); | 44 | }, [propsData]); |
@@ -136,7 +153,13 @@ const DeliverModal = ({ | @@ -136,7 +153,13 @@ const DeliverModal = ({ | ||
136 | body.flag = true; | 153 | body.flag = true; |
137 | } | 154 | } |
138 | //发货请求 | 155 | //发货请求 |
139 | - const res = await postServiceOrderSendProduct({ data: body }); | 156 | + let res; |
157 | + if (optType(CHECK_TYPE.SUPPLIER)) { | ||
158 | + res = await postServiceOrderSupplierSendOrder({ data: body }); | ||
159 | + } else { | ||
160 | + res = await postServiceOrderSendProduct({ data: body }); | ||
161 | + } | ||
162 | + | ||
140 | if (res.result === RESPONSE_CODE.SUCCESS) { | 163 | if (res.result === RESPONSE_CODE.SUCCESS) { |
141 | message.success(res.message); | 164 | message.success(res.message); |
142 | onClose(); | 165 | onClose(); |
src/pages/Order/constant.ts
@@ -9,11 +9,12 @@ export const PAYMENT_CHANNEL_OPTIONS = { | @@ -9,11 +9,12 @@ export const PAYMENT_CHANNEL_OPTIONS = { | ||
9 | }; | 9 | }; |
10 | 10 | ||
11 | export const PAYMENT_METHOD_OPTIONS = { | 11 | export const PAYMENT_METHOD_OPTIONS = { |
12 | - PAYMENT_IN_ADVANCE: '预付', | ||
13 | - CASH_ON_DELIVERY: '货到付款', | ||
14 | UNPAID: '未付款', | 12 | UNPAID: '未付款', |
15 | - PLATFORM_SETTLEMENT: '平台结算', | 13 | + TAOBAO_ORDER_HAS_BEEN_PAID: '淘宝订单已付款', |
14 | + PAYMENT_IN_ADVANCE: '预付款', | ||
16 | WITHHOLDING_ADVANCE_DEPOSIT: '扣预存', | 15 | WITHHOLDING_ADVANCE_DEPOSIT: '扣预存', |
16 | + PLATFORM_SETTLEMENT: '平台结算', | ||
17 | + CASH_ON_DELIVERY: '货到付款', | ||
17 | }; | 18 | }; |
18 | 19 | ||
19 | export const PRODUCT_BELONG_DEPARTMENT_OPTIONS = { | 20 | export const PRODUCT_BELONG_DEPARTMENT_OPTIONS = { |
@@ -45,6 +46,18 @@ export const INVOCING_STATUS = { | @@ -45,6 +46,18 @@ export const INVOCING_STATUS = { | ||
45 | }; | 46 | }; |
46 | 47 | ||
47 | /** | 48 | /** |
49 | + * 普通审核 | ||
50 | + * 财务审核 | ||
51 | + * 采购审核 | ||
52 | + */ | ||
53 | +export const CHECK_TYPE = { | ||
54 | + NORMAL: 'NORMAL', | ||
55 | + FINALCIAL: 'FINALCIAL', | ||
56 | + PROCURE: 'PROCURE', | ||
57 | + SUPPLIER: 'SUPPLIER', | ||
58 | +}; | ||
59 | + | ||
60 | +/** | ||
48 | * 是否需要开票 | 61 | * 是否需要开票 |
49 | * @param subOrder | 62 | * @param subOrder |
50 | */ | 63 | */ |
@@ -80,15 +93,21 @@ export const LOGISTICS_STATUS_OPTIONS = { | @@ -80,15 +93,21 @@ export const LOGISTICS_STATUS_OPTIONS = { | ||
80 | JINGDONG_LOGISTICS: '京东', | 93 | JINGDONG_LOGISTICS: '京东', |
81 | SF_EXPRESS: '顺丰', | 94 | SF_EXPRESS: '顺丰', |
82 | DEBANG_LOGISTICS: '德邦物流', | 95 | DEBANG_LOGISTICS: '德邦物流', |
96 | + OTHER_LOGISTICS: '其他物流方式', | ||
83 | }; | 97 | }; |
84 | 98 | ||
85 | export const ORDER_STATUS_OPTIONS = { | 99 | export const ORDER_STATUS_OPTIONS = { |
86 | UNAUDITED: '未审核', | 100 | UNAUDITED: '未审核', |
87 | - AUDIT_FAILED: '审核失败', | 101 | + FINANCE_PROCESS: '财务已审核', |
88 | AUDITED: '已审核', | 102 | AUDITED: '已审核', |
103 | + PROCURE_UN_PROCESS: '采购未审核', | ||
104 | + PROCURE_PROCESS: '采购已审核', | ||
105 | + SUPPLIER_WAIT_SHIP: '供应商-待发货', | ||
106 | + SUPPLIER_SHIPPED: '供应商-已发货', | ||
89 | WAIT_SHIP: '待发货', | 107 | WAIT_SHIP: '待发货', |
90 | SHIPPED: '已发货', | 108 | SHIPPED: '已发货', |
91 | CONFIRM_RECEIPT: '确认收货', | 109 | CONFIRM_RECEIPT: '确认收货', |
110 | + AUDIT_FAILED: '审核失败', | ||
92 | }; | 111 | }; |
93 | 112 | ||
94 | export const FINANCIAL_STATUS_OPTIONS = { | 113 | export const FINANCIAL_STATUS_OPTIONS = { |
@@ -107,7 +126,12 @@ export const TAGS_COLOR = new Map<string, string>([ | @@ -107,7 +126,12 @@ export const TAGS_COLOR = new Map<string, string>([ | ||
107 | ['WAIT_SHIP', 'processing'], | 126 | ['WAIT_SHIP', 'processing'], |
108 | ['SHIPPED', 'processing'], | 127 | ['SHIPPED', 'processing'], |
109 | ['AUDIT_FAILED', 'error'], | 128 | ['AUDIT_FAILED', 'error'], |
110 | - ['CONFIRM_RECEIPT', 'success'], | 129 | + ['CONFIRM_RECEIPT', 'processing'], |
130 | + ['FINANCE_PROCESS', 'processing'], | ||
131 | + ['PROCURE_UN_PROCESS', 'processing'], | ||
132 | + ['PROCURE_PROCESS', 'processing'], | ||
133 | + ['SUPPLIER_WAIT_SHIP', 'processing'], | ||
134 | + ['SUPPLIER_SHIPPED', 'processing'], | ||
111 | ]); | 135 | ]); |
112 | 136 | ||
113 | export const SALES_CODE_OPTIONS = [ | 137 | export const SALES_CODE_OPTIONS = [ |
@@ -168,6 +192,10 @@ export const HISTORY_OPT_TYPE = new Map<string, string>([ | @@ -168,6 +192,10 @@ export const HISTORY_OPT_TYPE = new Map<string, string>([ | ||
168 | ['EDIT_ORDER', '财务编辑'], | 192 | ['EDIT_ORDER', '财务编辑'], |
169 | ['MODIFY_SEN_INFORMATION', '发货信息编辑'], | 193 | ['MODIFY_SEN_INFORMATION', '发货信息编辑'], |
170 | ['UN_INVOICING', '财务取消开票'], | 194 | ['UN_INVOICING', '财务取消开票'], |
195 | + ['FINANCE_CHECK_ORDER', '财务审核'], | ||
196 | + ['PROCURE_CHECK_ORDER', '采购审核'], | ||
197 | + ['SUPPLIER_PRINT', '供应商打印'], | ||
198 | + ['EXTERNAL_PROCUREMENT', '仓库操作外部采购子订单'], | ||
171 | ]); | 199 | ]); |
172 | 200 | ||
173 | export const MAIN_ORDER_COLUMNS = [ | 201 | export const MAIN_ORDER_COLUMNS = [ |
src/pages/Order/index.tsx
@@ -47,8 +47,10 @@ import HistoryModal from './components/HistoryModal'; | @@ -47,8 +47,10 @@ import HistoryModal from './components/HistoryModal'; | ||
47 | import ImportModal from './components/ImportModal'; | 47 | import ImportModal from './components/ImportModal'; |
48 | import OrderDrawer from './components/OrderDrawer'; | 48 | import OrderDrawer from './components/OrderDrawer'; |
49 | import OrderNotesEditModal from './components/OrderNotesEditModal'; | 49 | import OrderNotesEditModal from './components/OrderNotesEditModal'; |
50 | +import ProcureCheckModal from './components/ProcureCheckModal'; | ||
50 | import SubOrderComfirmReceiptImagesModal from './components/SubOrderComfirmReceiptImagesModal'; | 51 | import SubOrderComfirmReceiptImagesModal from './components/SubOrderComfirmReceiptImagesModal'; |
51 | import { | 52 | import { |
53 | + CHECK_TYPE, | ||
52 | LOGISTICS_STATUS_OPTIONS, | 54 | LOGISTICS_STATUS_OPTIONS, |
53 | MAIN_ORDER_COLUMNS, | 55 | MAIN_ORDER_COLUMNS, |
54 | ORDER_STATUS_OPTIONS, | 56 | ORDER_STATUS_OPTIONS, |
@@ -80,6 +82,8 @@ const OrderPage = () => { | @@ -80,6 +82,8 @@ const OrderPage = () => { | ||
80 | const [isSendProduct, setIsSendProduct] = useState<boolean>(false); | 82 | const [isSendProduct, setIsSendProduct] = useState<boolean>(false); |
81 | const [isMainOrder, setIsMainOrder] = useState<boolean>(false); | 83 | const [isMainOrder, setIsMainOrder] = useState<boolean>(false); |
82 | const [importModalVisible, setImportModalVisible] = useState<boolean>(false); | 84 | const [importModalVisible, setImportModalVisible] = useState<boolean>(false); |
85 | + const [procureCheckModalVisible, setProcureCheckModalVisible] = | ||
86 | + useState<boolean>(false); | ||
83 | const [confirmReceiptVisible, setConfirmReceiptVisible] = | 87 | const [confirmReceiptVisible, setConfirmReceiptVisible] = |
84 | useState<boolean>(false); | 88 | useState<boolean>(false); |
85 | const [deliverVisible, setDeliverVisible] = useState<boolean>(false); | 89 | const [deliverVisible, setDeliverVisible] = useState<boolean>(false); |
@@ -99,6 +103,7 @@ const OrderPage = () => { | @@ -99,6 +103,7 @@ const OrderPage = () => { | ||
99 | const [selectedRowKeys, setSelectedRowKeys] = useState([]); | 103 | const [selectedRowKeys, setSelectedRowKeys] = useState([]); |
100 | const [pageSize, setPageSize] = useState(10); | 104 | const [pageSize, setPageSize] = useState(10); |
101 | const [currentPage, setCurrentPage] = useState(1); | 105 | const [currentPage, setCurrentPage] = useState(1); |
106 | + const [orderCheckType, setOrderCheckType] = useState(''); | ||
102 | const mainTableRef = useRef(); | 107 | const mainTableRef = useRef(); |
103 | const [messageApi, contextHolder] = message.useMessage(); | 108 | const [messageApi, contextHolder] = message.useMessage(); |
104 | 109 | ||
@@ -382,6 +387,7 @@ const OrderPage = () => { | @@ -382,6 +387,7 @@ const OrderPage = () => { | ||
382 | setSelectedRows([cloneDeep(optRecord)]); //克隆一份数据,避免后续修改污染 | 387 | setSelectedRows([cloneDeep(optRecord)]); //克隆一份数据,避免后续修改污染 |
383 | setDeliverVisible(true); | 388 | setDeliverVisible(true); |
384 | setIsSendProduct(true); | 389 | setIsSendProduct(true); |
390 | + setOrderCheckType(CHECK_TYPE.NORMAL); | ||
385 | }} | 391 | }} |
386 | > | 392 | > |
387 | 发货 | 393 | 发货 |
@@ -390,7 +396,26 @@ const OrderPage = () => { | @@ -390,7 +396,26 @@ const OrderPage = () => { | ||
390 | '' | 396 | '' |
391 | )} | 397 | )} |
392 | 398 | ||
393 | - {optRecord.subPath.includes('queryAnnex') ? ( | 399 | + {optRecord.subPath.includes('supplierSendOrder') ? ( |
400 | + <Button | ||
401 | + className="p-0" | ||
402 | + type="link" | ||
403 | + onClick={() => { | ||
404 | + optRecord.mainOrderId = record.id; | ||
405 | + setSelectedRows([cloneDeep(optRecord)]); //克隆一份数据,避免后续修改污染 | ||
406 | + setDeliverVisible(true); | ||
407 | + setIsSendProduct(true); | ||
408 | + setOrderCheckType(CHECK_TYPE.SUPPLIER); | ||
409 | + }} | ||
410 | + > | ||
411 | + 供应商发货 | ||
412 | + </Button> | ||
413 | + ) : ( | ||
414 | + '' | ||
415 | + )} | ||
416 | + | ||
417 | + {optRecord.subPath.includes('queryAnnex') && | ||
418 | + optRecord.listAnnex?.length > 0 ? ( | ||
394 | <Button | 419 | <Button |
395 | className="p-0" | 420 | className="p-0" |
396 | type="link" | 421 | type="link" |
@@ -431,6 +456,7 @@ const OrderPage = () => { | @@ -431,6 +456,7 @@ const OrderPage = () => { | ||
431 | setOrderPrintVisible(true); | 456 | setOrderPrintVisible(true); |
432 | setSelectedRows([optRecord]); | 457 | setSelectedRows([optRecord]); |
433 | setOrderRow(record); | 458 | setOrderRow(record); |
459 | + setOrderCheckType(CHECK_TYPE.NORMAL); | ||
434 | }} | 460 | }} |
435 | > | 461 | > |
436 | 打印 | 462 | 打印 |
@@ -438,6 +464,24 @@ const OrderPage = () => { | @@ -438,6 +464,24 @@ const OrderPage = () => { | ||
438 | ) : ( | 464 | ) : ( |
439 | '' | 465 | '' |
440 | )} | 466 | )} |
467 | + | ||
468 | + {optRecord.subPath.includes('supplierPrint') ? ( | ||
469 | + <Button | ||
470 | + className="p-0" | ||
471 | + type="link" | ||
472 | + onClick={async () => { | ||
473 | + setOrderPrintVisible(true); | ||
474 | + setSelectedRows([optRecord]); | ||
475 | + setOrderRow(record); | ||
476 | + setOrderCheckType(CHECK_TYPE.SUPPLIER); | ||
477 | + }} | ||
478 | + > | ||
479 | + 打印 | ||
480 | + </Button> | ||
481 | + ) : ( | ||
482 | + '' | ||
483 | + )} | ||
484 | + | ||
441 | {optRecord.subPath.includes('editOrder') ? ( | 485 | {optRecord.subPath.includes('editOrder') ? ( |
442 | <Button | 486 | <Button |
443 | className="p-0" | 487 | className="p-0" |
@@ -479,6 +523,7 @@ const OrderPage = () => { | @@ -479,6 +523,7 @@ const OrderPage = () => { | ||
479 | setOrderRow(optRecord); | 523 | setOrderRow(optRecord); |
480 | setCheckVisible(true); | 524 | setCheckVisible(true); |
481 | setSelectedRows([optRecord]); | 525 | setSelectedRows([optRecord]); |
526 | + setOrderCheckType(CHECK_TYPE.NORMAL); | ||
482 | }} | 527 | }} |
483 | > | 528 | > |
484 | 审核 | 529 | 审核 |
@@ -487,6 +532,40 @@ const OrderPage = () => { | @@ -487,6 +532,40 @@ const OrderPage = () => { | ||
487 | '' | 532 | '' |
488 | )} | 533 | )} |
489 | 534 | ||
535 | + {optRecord.subPath.includes('financeCheckOrder') ? ( | ||
536 | + <Button | ||
537 | + className="p-0" | ||
538 | + type="link" | ||
539 | + onClick={() => { | ||
540 | + setOrderRow(optRecord); | ||
541 | + setCheckVisible(true); | ||
542 | + setSelectedRows([optRecord]); | ||
543 | + setOrderCheckType(CHECK_TYPE.FINALCIAL); | ||
544 | + }} | ||
545 | + > | ||
546 | + 财务审核 | ||
547 | + </Button> | ||
548 | + ) : ( | ||
549 | + '' | ||
550 | + )} | ||
551 | + | ||
552 | + {optRecord.subPath.includes('procureCheckOrder') ? ( | ||
553 | + <Button | ||
554 | + className="p-0" | ||
555 | + type="link" | ||
556 | + onClick={() => { | ||
557 | + setOrderRow(optRecord); | ||
558 | + setSelectedRows([optRecord]); | ||
559 | + setOrderCheckType(CHECK_TYPE.PROCURE); | ||
560 | + setProcureCheckModalVisible(true); | ||
561 | + }} | ||
562 | + > | ||
563 | + 采购审核 | ||
564 | + </Button> | ||
565 | + ) : ( | ||
566 | + '' | ||
567 | + )} | ||
568 | + | ||
490 | {optRecord.subPath.includes('rePrintOrder') ? ( | 569 | {optRecord.subPath.includes('rePrintOrder') ? ( |
491 | <Button | 570 | <Button |
492 | className="p-0" | 571 | className="p-0" |
@@ -740,6 +819,7 @@ const OrderPage = () => { | @@ -740,6 +819,7 @@ const OrderPage = () => { | ||
740 | setSelectedRows(selectedRowObj[record.id]); | 819 | setSelectedRows(selectedRowObj[record.id]); |
741 | setDeliverVisible(true); | 820 | setDeliverVisible(true); |
742 | setIsSendProduct(true); | 821 | setIsSendProduct(true); |
822 | + setOrderCheckType(CHECK_TYPE.NORMAL); | ||
743 | }} | 823 | }} |
744 | > | 824 | > |
745 | 发货 | 825 | 发货 |
@@ -747,6 +827,27 @@ const OrderPage = () => { | @@ -747,6 +827,27 @@ const OrderPage = () => { | ||
747 | ) : ( | 827 | ) : ( |
748 | '' | 828 | '' |
749 | )} | 829 | )} |
830 | + | ||
831 | + {/* 供应商发货 */} | ||
832 | + {record.mainPath.includes('supplierSendOrder') ? ( | ||
833 | + <Button | ||
834 | + className="p-0" | ||
835 | + type="link" | ||
836 | + onClick={() => { | ||
837 | + if (!selectedRowObj[record.id]?.length) { | ||
838 | + return message.error('请选择选择子订单'); | ||
839 | + } | ||
840 | + setSelectedRows(selectedRowObj[record.id]); | ||
841 | + setDeliverVisible(true); | ||
842 | + setIsSendProduct(true); | ||
843 | + setOrderCheckType(CHECK_TYPE.SUPPLIER); | ||
844 | + }} | ||
845 | + > | ||
846 | + 供应商发货 | ||
847 | + </Button> | ||
848 | + ) : ( | ||
849 | + '' | ||
850 | + )} | ||
750 | {record.mainPath.includes('printOrder') ? ( | 851 | {record.mainPath.includes('printOrder') ? ( |
751 | <Button | 852 | <Button |
752 | className="p-0" | 853 | className="p-0" |
@@ -758,6 +859,7 @@ const OrderPage = () => { | @@ -758,6 +859,7 @@ const OrderPage = () => { | ||
758 | setSelectedRows(selectedRowObj[record.id]); | 859 | setSelectedRows(selectedRowObj[record.id]); |
759 | setOrderRow(record); | 860 | setOrderRow(record); |
760 | setOrderPrintVisible(true); | 861 | setOrderPrintVisible(true); |
862 | + setOrderCheckType(CHECK_TYPE.NORMAL); | ||
761 | }} | 863 | }} |
762 | > | 864 | > |
763 | 打印 | 865 | 打印 |
@@ -765,6 +867,27 @@ const OrderPage = () => { | @@ -765,6 +867,27 @@ const OrderPage = () => { | ||
765 | ) : ( | 867 | ) : ( |
766 | '' | 868 | '' |
767 | )} | 869 | )} |
870 | + | ||
871 | + {record.mainPath.includes('supplierPrint') ? ( | ||
872 | + <Button | ||
873 | + className="p-0" | ||
874 | + type="link" | ||
875 | + onClick={() => { | ||
876 | + if (!selectedRowObj[record.id]?.length) { | ||
877 | + return message.error('请选择选择子订单'); | ||
878 | + } | ||
879 | + setSelectedRows(selectedRowObj[record.id]); | ||
880 | + setOrderRow(record); | ||
881 | + setOrderPrintVisible(true); | ||
882 | + setOrderCheckType(CHECK_TYPE.SUPPLIER); | ||
883 | + }} | ||
884 | + > | ||
885 | + 打印 | ||
886 | + </Button> | ||
887 | + ) : ( | ||
888 | + '' | ||
889 | + )} | ||
890 | + | ||
768 | {record.mainPath.includes('rePrintOrder') ? ( | 891 | {record.mainPath.includes('rePrintOrder') ? ( |
769 | <Button | 892 | <Button |
770 | className="p-0" | 893 | className="p-0" |
@@ -889,6 +1012,38 @@ const OrderPage = () => { | @@ -889,6 +1012,38 @@ const OrderPage = () => { | ||
889 | setSelectedRows(selectedSubOrders); | 1012 | setSelectedRows(selectedSubOrders); |
890 | if (selectedSubOrders === undefined) { | 1013 | if (selectedSubOrders === undefined) { |
891 | setSelectedRows(record.subOrderInformationLists); | 1014 | setSelectedRows(record.subOrderInformationLists); |
1015 | + } | ||
1016 | + console.log(selectedRows); | ||
1017 | + for (let i = 0; i < selectedRows.length; i++) { | ||
1018 | + if ( | ||
1019 | + selectedRows[i].orderStatus !== 'UNAUDITED' && | ||
1020 | + selectedRows[i].orderStatus !== 'FINANCE_PROCESS' | ||
1021 | + ) { | ||
1022 | + message.error('请选择未审核的子订单进行审核'); | ||
1023 | + return; | ||
1024 | + } | ||
1025 | + } | ||
1026 | + setOrderRow(record); | ||
1027 | + setCheckVisible(true); | ||
1028 | + setOrderCheckType(CHECK_TYPE.NORMAL); | ||
1029 | + }} | ||
1030 | + > | ||
1031 | + 审核 | ||
1032 | + </Button> | ||
1033 | + ) : ( | ||
1034 | + '' | ||
1035 | + )} | ||
1036 | + | ||
1037 | + {/* 财务审核:主订单暂无 */} | ||
1038 | + {record.mainPath.includes('financeCheckOrder') ? ( | ||
1039 | + <Button | ||
1040 | + className="p-0" | ||
1041 | + type="link" | ||
1042 | + onClick={() => { | ||
1043 | + let selectedSubOrders = selectedRowObj[record.id]; | ||
1044 | + setSelectedRows(selectedSubOrders); | ||
1045 | + if (selectedSubOrders === undefined) { | ||
1046 | + setSelectedRows(record.subOrderInformationLists); | ||
892 | console.log( | 1047 | console.log( |
893 | 'subOrderInformationLists:' + | 1048 | 'subOrderInformationLists:' + |
894 | record.subOrderInformationLists, | 1049 | record.subOrderInformationLists, |
@@ -897,19 +1052,52 @@ const OrderPage = () => { | @@ -897,19 +1052,52 @@ const OrderPage = () => { | ||
897 | for (let i = 0; i < selectedRows.length; i++) { | 1052 | for (let i = 0; i < selectedRows.length; i++) { |
898 | if ( | 1053 | if ( |
899 | selectedRows[i].orderStatus !== 'UNAUDITED' && | 1054 | selectedRows[i].orderStatus !== 'UNAUDITED' && |
900 | - selectedRows[i].orderStatus !== 'AUDIT_FAILED' | 1055 | + selectedRows[i].orderStatus !== 'FINANCE_PROCESS' |
901 | ) { | 1056 | ) { |
902 | - message.error( | ||
903 | - '请选择未审核或者审核失败的子订单进行审核', | ||
904 | - ); | 1057 | + message.error('请选择未审核的子订单进行审核'); |
905 | return; | 1058 | return; |
906 | } | 1059 | } |
907 | } | 1060 | } |
908 | setOrderRow(record); | 1061 | setOrderRow(record); |
909 | setCheckVisible(true); | 1062 | setCheckVisible(true); |
1063 | + setOrderCheckType(CHECK_TYPE.FINALCIAL); | ||
910 | }} | 1064 | }} |
911 | > | 1065 | > |
912 | - 审核 | 1066 | + 财务审核 |
1067 | + </Button> | ||
1068 | + ) : ( | ||
1069 | + '' | ||
1070 | + )} | ||
1071 | + | ||
1072 | + {/* 采购审核 */} | ||
1073 | + {record.mainPath.includes('procureCheckOrder') ? ( | ||
1074 | + <Button | ||
1075 | + className="p-0" | ||
1076 | + type="link" | ||
1077 | + onClick={() => { | ||
1078 | + let selectedSubOrders = selectedRowObj[record.id]; | ||
1079 | + setSelectedRows(selectedSubOrders); | ||
1080 | + if (selectedSubOrders === undefined) { | ||
1081 | + setSelectedRows(record.subOrderInformationLists); | ||
1082 | + console.log( | ||
1083 | + 'subOrderInformationLists:' + | ||
1084 | + record.subOrderInformationLists, | ||
1085 | + ); | ||
1086 | + } | ||
1087 | + for (let i = 0; i < selectedRows.length; i++) { | ||
1088 | + if ( | ||
1089 | + selectedRows[i].orderStatus !== 'PROCURE_UN_PROCESS' | ||
1090 | + ) { | ||
1091 | + message.error('请选择未审核的子订单进行审核'); | ||
1092 | + return; | ||
1093 | + } | ||
1094 | + } | ||
1095 | + setOrderRow(record); | ||
1096 | + setProcureCheckModalVisible(true); | ||
1097 | + setOrderCheckType(CHECK_TYPE.PROCURE); | ||
1098 | + }} | ||
1099 | + > | ||
1100 | + 采购审核 | ||
913 | </Button> | 1101 | </Button> |
914 | ) : ( | 1102 | ) : ( |
915 | '' | 1103 | '' |
@@ -1197,6 +1385,7 @@ const OrderPage = () => { | @@ -1197,6 +1385,7 @@ const OrderPage = () => { | ||
1197 | setCheckVisible={setCheckVisible} | 1385 | setCheckVisible={setCheckVisible} |
1198 | data={orderRow} | 1386 | data={orderRow} |
1199 | subOrders={selectedRows} | 1387 | subOrders={selectedRows} |
1388 | + orderCheckType={orderCheckType} | ||
1200 | onClose={() => { | 1389 | onClose={() => { |
1201 | setCheckVisible(false); | 1390 | setCheckVisible(false); |
1202 | setOrderRow({}); | 1391 | setOrderRow({}); |
@@ -1226,6 +1415,7 @@ const OrderPage = () => { | @@ -1226,6 +1415,7 @@ const OrderPage = () => { | ||
1226 | setVisible={(b: boolean) => { | 1415 | setVisible={(b: boolean) => { |
1227 | setDeliverVisible(b); | 1416 | setDeliverVisible(b); |
1228 | }} | 1417 | }} |
1418 | + sendType={orderCheckType} | ||
1229 | onClose={() => { | 1419 | onClose={() => { |
1230 | setDeliverVisible(false); | 1420 | setDeliverVisible(false); |
1231 | setOrderRow({}); | 1421 | setOrderRow({}); |
@@ -1265,6 +1455,7 @@ const OrderPage = () => { | @@ -1265,6 +1455,7 @@ const OrderPage = () => { | ||
1265 | setVisible={(b: boolean) => { | 1455 | setVisible={(b: boolean) => { |
1266 | setOrderPrintVisible(b); | 1456 | setOrderPrintVisible(b); |
1267 | }} | 1457 | }} |
1458 | + printOptType={orderCheckType} | ||
1268 | onClose={() => { | 1459 | onClose={() => { |
1269 | setOrderPrintVisible(false); | 1460 | setOrderPrintVisible(false); |
1270 | setOrderRow({}); | 1461 | setOrderRow({}); |
@@ -1334,6 +1525,30 @@ const OrderPage = () => { | @@ -1334,6 +1525,30 @@ const OrderPage = () => { | ||
1334 | /> | 1525 | /> |
1335 | )} | 1526 | )} |
1336 | 1527 | ||
1528 | + {deliverInfoDrawerVisible && ( | ||
1529 | + <DeliverInfoDrawer | ||
1530 | + data={orderRow} | ||
1531 | + onClose={() => { | ||
1532 | + setDeliverInfoDrawerVisible(false); | ||
1533 | + setOrderRow({}); | ||
1534 | + }} | ||
1535 | + /> | ||
1536 | + )} | ||
1537 | + | ||
1538 | + {procureCheckModalVisible && ( | ||
1539 | + <ProcureCheckModal | ||
1540 | + setCheckVisible={setProcureCheckModalVisible} | ||
1541 | + data={orderRow} | ||
1542 | + subOrders={selectedRows} | ||
1543 | + onClose={() => { | ||
1544 | + setProcureCheckModalVisible(false); | ||
1545 | + setOrderRow({}); | ||
1546 | + setSelectedRows({}); | ||
1547 | + refreshTable(); | ||
1548 | + }} | ||
1549 | + /> | ||
1550 | + )} | ||
1551 | + | ||
1337 | {contextHolder} | 1552 | {contextHolder} |
1338 | </PageContainer> | 1553 | </PageContainer> |
1339 | ); | 1554 | ); |
src/pages/OrderPrint/OrderPrintModal.tsx
1 | import { RESPONSE_CODE } from '@/constants/enum'; | 1 | import { RESPONSE_CODE } from '@/constants/enum'; |
2 | import '@/pages/OrderPrint/index.less'; | 2 | import '@/pages/OrderPrint/index.less'; |
3 | -import { postServiceOrderPrintOrder } from '@/services'; | 3 | +import { |
4 | + postServiceOrderPrintOrder, | ||
5 | + postServiceOrderSupplierPrint, | ||
6 | +} from '@/services'; | ||
4 | import { ExclamationCircleFilled } from '@ant-design/icons'; | 7 | import { ExclamationCircleFilled } from '@ant-design/icons'; |
5 | import { Modal, Select, Space, message } from 'antd'; | 8 | import { Modal, Select, Space, message } from 'antd'; |
6 | import printJS from 'print-js'; | 9 | import printJS from 'print-js'; |
7 | import { useState } from 'react'; | 10 | import { useState } from 'react'; |
11 | +import { CHECK_TYPE } from '../Order/constant'; | ||
8 | import { printerCSS } from './PrinterCSS'; | 12 | import { printerCSS } from './PrinterCSS'; |
9 | import DalangPrinter from './components/DalangPrinter'; | 13 | import DalangPrinter from './components/DalangPrinter'; |
10 | import HoujiePrinter from './components/HoujiePrinter'; | 14 | import HoujiePrinter from './components/HoujiePrinter'; |
11 | import ZhuguangPrinter from './components/ZhuguangPrinter'; | 15 | import ZhuguangPrinter from './components/ZhuguangPrinter'; |
12 | 16 | ||
13 | -export default ({ mainOrder, subOrders, isRePrint, setVisible, onClose }) => { | 17 | +export default ({ |
18 | + mainOrder, | ||
19 | + subOrders, | ||
20 | + isRePrint, | ||
21 | + setVisible, | ||
22 | + printOptType, | ||
23 | + onClose, | ||
24 | +}) => { | ||
14 | const [printerType, setPrinterType] = useState('Houjie'); | 25 | const [printerType, setPrinterType] = useState('Houjie'); |
15 | const { confirm } = Modal; | 26 | const { confirm } = Modal; |
16 | const handleChange = (value: string) => { | 27 | const handleChange = (value: string) => { |
17 | setPrinterType(value); | 28 | setPrinterType(value); |
18 | }; | 29 | }; |
30 | + /** | ||
31 | + * 是供应商打印还是普通打印 | ||
32 | + * @param typeString | ||
33 | + * @returns | ||
34 | + */ | ||
35 | + function optType(typeString: string) { | ||
36 | + if (printOptType === typeString) { | ||
37 | + return true; | ||
38 | + } | ||
39 | + | ||
40 | + return false; | ||
41 | + } | ||
19 | const showPropsConfirm = () => { | 42 | const showPropsConfirm = () => { |
20 | if (isRePrint) { | 43 | if (isRePrint) { |
21 | return; | 44 | return; |
@@ -34,7 +57,19 @@ export default ({ mainOrder, subOrders, isRePrint, setVisible, onClose }) => { | @@ -34,7 +57,19 @@ export default ({ mainOrder, subOrders, isRePrint, setVisible, onClose }) => { | ||
34 | return item.id; | 57 | return item.id; |
35 | }), | 58 | }), |
36 | }; | 59 | }; |
37 | - const res = await postServiceOrderPrintOrder({ data: body }); | 60 | + let res; |
61 | + if (optType(CHECK_TYPE.SUPPLIER)) { | ||
62 | + res = await postServiceOrderSupplierPrint({ | ||
63 | + data: { | ||
64 | + ids: subOrders.map((item) => { | ||
65 | + return item.id; | ||
66 | + }), | ||
67 | + }, | ||
68 | + }); | ||
69 | + } else { | ||
70 | + res = await postServiceOrderPrintOrder({ data: body }); | ||
71 | + } | ||
72 | + | ||
38 | if (res.result === RESPONSE_CODE.SUCCESS) { | 73 | if (res.result === RESPONSE_CODE.SUCCESS) { |
39 | message.success(res.message); | 74 | message.success(res.message); |
40 | onClose(); | 75 | onClose(); |
src/pages/OrderReport/components/OrderStatisticCard.tsx
@@ -247,14 +247,14 @@ export default ({ data, statisticsMethod, reFreshData }) => { | @@ -247,14 +247,14 @@ export default ({ data, statisticsMethod, reFreshData }) => { | ||
247 | </ProCard> | 247 | </ProCard> |
248 | <ProCard | 248 | <ProCard |
249 | className="order-statictis-card" | 249 | className="order-statictis-card" |
250 | - title={<CardTitle title={'未审核订单'} />} | 250 | + title={<CardTitle title={'未审核子订单'} />} |
251 | bordered | 251 | bordered |
252 | > | 252 | > |
253 | <CardContent unit="单" content={data.unCheckOrderNumber} /> | 253 | <CardContent unit="单" content={data.unCheckOrderNumber} /> |
254 | </ProCard> | 254 | </ProCard> |
255 | <ProCard | 255 | <ProCard |
256 | className="order-statictis-card" | 256 | className="order-statictis-card" |
257 | - title={<CardTitle title={'未发货订单'} />} | 257 | + title={<CardTitle title={'待发货子订单'} />} |
258 | bordered | 258 | bordered |
259 | > | 259 | > |
260 | <CardContent unit="单" content={data.unSendOrderNumber} /> | 260 | <CardContent unit="单" content={data.unSendOrderNumber} /> |
src/services/definition.ts
@@ -691,6 +691,19 @@ export interface OrderUpdateVO { | @@ -691,6 +691,19 @@ export interface OrderUpdateVO { | ||
691 | trackStageInfo?: OrderTrackStageVO; | 691 | trackStageInfo?: OrderTrackStageVO; |
692 | } | 692 | } |
693 | 693 | ||
694 | +export interface ProcureCheckOrderDto { | ||
695 | + /** | ||
696 | + * @description | ||
697 | + * 子订单集合 | ||
698 | + */ | ||
699 | + ids?: Array<number>; | ||
700 | + /** | ||
701 | + * @description | ||
702 | + * 采购人姓名 | ||
703 | + */ | ||
704 | + supplier?: string; | ||
705 | +} | ||
706 | + | ||
694 | export interface ProductInformationDto { | 707 | export interface ProductInformationDto { |
695 | /** | 708 | /** |
696 | * @description | 709 | * @description |
src/services/request.ts
@@ -26,6 +26,7 @@ import type { | @@ -26,6 +26,7 @@ import type { | ||
26 | DictionaryQueryVO, | 26 | DictionaryQueryVO, |
27 | DictionaryVO, | 27 | DictionaryVO, |
28 | Dto, | 28 | Dto, |
29 | + ModelAndView, | ||
29 | OrderAddVO, | 30 | OrderAddVO, |
30 | OrderAuditLogQueryVO, | 31 | OrderAuditLogQueryVO, |
31 | OrderBaseInfoQueryVO, | 32 | OrderBaseInfoQueryVO, |
@@ -34,6 +35,7 @@ import type { | @@ -34,6 +35,7 @@ import type { | ||
34 | OrderProfitAnalysisVo, | 35 | OrderProfitAnalysisVo, |
35 | OrderUnlockFieldApplyVO, | 36 | OrderUnlockFieldApplyVO, |
36 | OrderUpdateVO, | 37 | OrderUpdateVO, |
38 | + ProcureCheckOrderDto, | ||
37 | ProductInformationDto, | 39 | ProductInformationDto, |
38 | QueryAnnexDto, | 40 | QueryAnnexDto, |
39 | QueryHistoryRecordDto, | 41 | QueryHistoryRecordDto, |
@@ -221,9 +223,7 @@ export interface GetErrorResponse { | @@ -221,9 +223,7 @@ export interface GetErrorResponse { | ||
221 | * @description | 223 | * @description |
222 | * OK | 224 | * OK |
223 | */ | 225 | */ |
224 | - 200: { | ||
225 | - [propertyName: string]: any; | ||
226 | - }; | 226 | + 200: ModelAndView; |
227 | /** | 227 | /** |
228 | * @description | 228 | * @description |
229 | * Unauthorized | 229 | * Unauthorized |
@@ -244,9 +244,9 @@ export interface GetErrorResponse { | @@ -244,9 +244,9 @@ export interface GetErrorResponse { | ||
244 | export type GetErrorResponseSuccess = GetErrorResponse[200]; | 244 | export type GetErrorResponseSuccess = GetErrorResponse[200]; |
245 | /** | 245 | /** |
246 | * @description | 246 | * @description |
247 | - * error | 247 | + * errorHtml |
248 | * @tags basic-error-controller | 248 | * @tags basic-error-controller |
249 | - * @produces * | 249 | + * @produces text/html |
250 | */ | 250 | */ |
251 | export const getError = /* #__PURE__ */ (() => { | 251 | export const getError = /* #__PURE__ */ (() => { |
252 | const method = 'get'; | 252 | const method = 'get'; |
@@ -270,9 +270,7 @@ export interface PutErrorResponse { | @@ -270,9 +270,7 @@ export interface PutErrorResponse { | ||
270 | * @description | 270 | * @description |
271 | * OK | 271 | * OK |
272 | */ | 272 | */ |
273 | - 200: { | ||
274 | - [propertyName: string]: any; | ||
275 | - }; | 273 | + 200: ModelAndView; |
276 | /** | 274 | /** |
277 | * @description | 275 | * @description |
278 | * Created | 276 | * Created |
@@ -298,9 +296,9 @@ export interface PutErrorResponse { | @@ -298,9 +296,9 @@ export interface PutErrorResponse { | ||
298 | export type PutErrorResponseSuccess = PutErrorResponse[200]; | 296 | export type PutErrorResponseSuccess = PutErrorResponse[200]; |
299 | /** | 297 | /** |
300 | * @description | 298 | * @description |
301 | - * error | 299 | + * errorHtml |
302 | * @tags basic-error-controller | 300 | * @tags basic-error-controller |
303 | - * @produces * | 301 | + * @produces text/html |
304 | * @consumes application/json | 302 | * @consumes application/json |
305 | */ | 303 | */ |
306 | export const putError = /* #__PURE__ */ (() => { | 304 | export const putError = /* #__PURE__ */ (() => { |
@@ -325,9 +323,7 @@ export interface PostErrorResponse { | @@ -325,9 +323,7 @@ export interface PostErrorResponse { | ||
325 | * @description | 323 | * @description |
326 | * OK | 324 | * OK |
327 | */ | 325 | */ |
328 | - 200: { | ||
329 | - [propertyName: string]: any; | ||
330 | - }; | 326 | + 200: ModelAndView; |
331 | /** | 327 | /** |
332 | * @description | 328 | * @description |
333 | * Created | 329 | * Created |
@@ -353,9 +349,9 @@ export interface PostErrorResponse { | @@ -353,9 +349,9 @@ export interface PostErrorResponse { | ||
353 | export type PostErrorResponseSuccess = PostErrorResponse[200]; | 349 | export type PostErrorResponseSuccess = PostErrorResponse[200]; |
354 | /** | 350 | /** |
355 | * @description | 351 | * @description |
356 | - * error | 352 | + * errorHtml |
357 | * @tags basic-error-controller | 353 | * @tags basic-error-controller |
358 | - * @produces * | 354 | + * @produces text/html |
359 | * @consumes application/json | 355 | * @consumes application/json |
360 | */ | 356 | */ |
361 | export const postError = /* #__PURE__ */ (() => { | 357 | export const postError = /* #__PURE__ */ (() => { |
@@ -380,9 +376,7 @@ export interface DeleteErrorResponse { | @@ -380,9 +376,7 @@ export interface DeleteErrorResponse { | ||
380 | * @description | 376 | * @description |
381 | * OK | 377 | * OK |
382 | */ | 378 | */ |
383 | - 200: { | ||
384 | - [propertyName: string]: any; | ||
385 | - }; | 379 | + 200: ModelAndView; |
386 | /** | 380 | /** |
387 | * @description | 381 | * @description |
388 | * No Content | 382 | * No Content |
@@ -403,9 +397,9 @@ export interface DeleteErrorResponse { | @@ -403,9 +397,9 @@ export interface DeleteErrorResponse { | ||
403 | export type DeleteErrorResponseSuccess = DeleteErrorResponse[200]; | 397 | export type DeleteErrorResponseSuccess = DeleteErrorResponse[200]; |
404 | /** | 398 | /** |
405 | * @description | 399 | * @description |
406 | - * error | 400 | + * errorHtml |
407 | * @tags basic-error-controller | 401 | * @tags basic-error-controller |
408 | - * @produces * | 402 | + * @produces text/html |
409 | */ | 403 | */ |
410 | export const deleteError = /* #__PURE__ */ (() => { | 404 | export const deleteError = /* #__PURE__ */ (() => { |
411 | const method = 'delete'; | 405 | const method = 'delete'; |
@@ -429,9 +423,7 @@ export interface OptionsErrorResponse { | @@ -429,9 +423,7 @@ export interface OptionsErrorResponse { | ||
429 | * @description | 423 | * @description |
430 | * OK | 424 | * OK |
431 | */ | 425 | */ |
432 | - 200: { | ||
433 | - [propertyName: string]: any; | ||
434 | - }; | 426 | + 200: ModelAndView; |
435 | /** | 427 | /** |
436 | * @description | 428 | * @description |
437 | * No Content | 429 | * No Content |
@@ -452,9 +444,9 @@ export interface OptionsErrorResponse { | @@ -452,9 +444,9 @@ export interface OptionsErrorResponse { | ||
452 | export type OptionsErrorResponseSuccess = OptionsErrorResponse[200]; | 444 | export type OptionsErrorResponseSuccess = OptionsErrorResponse[200]; |
453 | /** | 445 | /** |
454 | * @description | 446 | * @description |
455 | - * error | 447 | + * errorHtml |
456 | * @tags basic-error-controller | 448 | * @tags basic-error-controller |
457 | - * @produces * | 449 | + * @produces text/html |
458 | * @consumes application/json | 450 | * @consumes application/json |
459 | */ | 451 | */ |
460 | export const optionsError = /* #__PURE__ */ (() => { | 452 | export const optionsError = /* #__PURE__ */ (() => { |
@@ -479,9 +471,7 @@ export interface HeadErrorResponse { | @@ -479,9 +471,7 @@ export interface HeadErrorResponse { | ||
479 | * @description | 471 | * @description |
480 | * OK | 472 | * OK |
481 | */ | 473 | */ |
482 | - 200: { | ||
483 | - [propertyName: string]: any; | ||
484 | - }; | 474 | + 200: ModelAndView; |
485 | /** | 475 | /** |
486 | * @description | 476 | * @description |
487 | * No Content | 477 | * No Content |
@@ -502,9 +492,9 @@ export interface HeadErrorResponse { | @@ -502,9 +492,9 @@ export interface HeadErrorResponse { | ||
502 | export type HeadErrorResponseSuccess = HeadErrorResponse[200]; | 492 | export type HeadErrorResponseSuccess = HeadErrorResponse[200]; |
503 | /** | 493 | /** |
504 | * @description | 494 | * @description |
505 | - * error | 495 | + * errorHtml |
506 | * @tags basic-error-controller | 496 | * @tags basic-error-controller |
507 | - * @produces * | 497 | + * @produces text/html |
508 | * @consumes application/json | 498 | * @consumes application/json |
509 | */ | 499 | */ |
510 | export const headError = /* #__PURE__ */ (() => { | 500 | export const headError = /* #__PURE__ */ (() => { |
@@ -529,9 +519,7 @@ export interface PatchErrorResponse { | @@ -529,9 +519,7 @@ export interface PatchErrorResponse { | ||
529 | * @description | 519 | * @description |
530 | * OK | 520 | * OK |
531 | */ | 521 | */ |
532 | - 200: { | ||
533 | - [propertyName: string]: any; | ||
534 | - }; | 522 | + 200: ModelAndView; |
535 | /** | 523 | /** |
536 | * @description | 524 | * @description |
537 | * No Content | 525 | * No Content |
@@ -552,9 +540,9 @@ export interface PatchErrorResponse { | @@ -552,9 +540,9 @@ export interface PatchErrorResponse { | ||
552 | export type PatchErrorResponseSuccess = PatchErrorResponse[200]; | 540 | export type PatchErrorResponseSuccess = PatchErrorResponse[200]; |
553 | /** | 541 | /** |
554 | * @description | 542 | * @description |
555 | - * error | 543 | + * errorHtml |
556 | * @tags basic-error-controller | 544 | * @tags basic-error-controller |
557 | - * @produces * | 545 | + * @produces text/html |
558 | * @consumes application/json | 546 | * @consumes application/json |
559 | */ | 547 | */ |
560 | export const patchError = /* #__PURE__ */ (() => { | 548 | export const patchError = /* #__PURE__ */ (() => { |
@@ -5350,6 +5338,77 @@ export const postServiceOrderFileProcess = /* #__PURE__ */ (() => { | @@ -5350,6 +5338,77 @@ export const postServiceOrderFileProcess = /* #__PURE__ */ (() => { | ||
5350 | return request; | 5338 | return request; |
5351 | })(); | 5339 | })(); |
5352 | 5340 | ||
5341 | +/** @description request parameter type for postServiceOrderFinanceCheckOrder */ | ||
5342 | +export interface PostServiceOrderFinanceCheckOrderOption { | ||
5343 | + /** | ||
5344 | + * @description | ||
5345 | + * dto | ||
5346 | + */ | ||
5347 | + body: { | ||
5348 | + /** | ||
5349 | + @description | ||
5350 | + dto */ | ||
5351 | + dto: Dto; | ||
5352 | + }; | ||
5353 | +} | ||
5354 | + | ||
5355 | +/** @description response type for postServiceOrderFinanceCheckOrder */ | ||
5356 | +export interface PostServiceOrderFinanceCheckOrderResponse { | ||
5357 | + /** | ||
5358 | + * @description | ||
5359 | + * OK | ||
5360 | + */ | ||
5361 | + 200: ServerResult; | ||
5362 | + /** | ||
5363 | + * @description | ||
5364 | + * Created | ||
5365 | + */ | ||
5366 | + 201: any; | ||
5367 | + /** | ||
5368 | + * @description | ||
5369 | + * Unauthorized | ||
5370 | + */ | ||
5371 | + 401: any; | ||
5372 | + /** | ||
5373 | + * @description | ||
5374 | + * Forbidden | ||
5375 | + */ | ||
5376 | + 403: any; | ||
5377 | + /** | ||
5378 | + * @description | ||
5379 | + * Not Found | ||
5380 | + */ | ||
5381 | + 404: any; | ||
5382 | +} | ||
5383 | + | ||
5384 | +export type PostServiceOrderFinanceCheckOrderResponseSuccess = | ||
5385 | + PostServiceOrderFinanceCheckOrderResponse[200]; | ||
5386 | +/** | ||
5387 | + * @description | ||
5388 | + * 财务审核订单 | ||
5389 | + * @tags 内部订单 | ||
5390 | + * @produces * | ||
5391 | + * @consumes application/json | ||
5392 | + */ | ||
5393 | +export const postServiceOrderFinanceCheckOrder = /* #__PURE__ */ (() => { | ||
5394 | + const method = 'post'; | ||
5395 | + const url = '/service/order/financeCheckOrder'; | ||
5396 | + function request( | ||
5397 | + option: PostServiceOrderFinanceCheckOrderOption, | ||
5398 | + ): Promise<PostServiceOrderFinanceCheckOrderResponseSuccess> { | ||
5399 | + return requester(request.url, { | ||
5400 | + method: request.method, | ||
5401 | + ...option, | ||
5402 | + }) as unknown as Promise<PostServiceOrderFinanceCheckOrderResponseSuccess>; | ||
5403 | + } | ||
5404 | + | ||
5405 | + /** http method */ | ||
5406 | + request.method = method; | ||
5407 | + /** request url */ | ||
5408 | + request.url = url; | ||
5409 | + return request; | ||
5410 | +})(); | ||
5411 | + | ||
5353 | /** @description request parameter type for postServiceOrderImportExcel */ | 5412 | /** @description request parameter type for postServiceOrderImportExcel */ |
5354 | export interface PostServiceOrderImportExcelOption { | 5413 | export interface PostServiceOrderImportExcelOption { |
5355 | /** | 5414 | /** |
@@ -5634,6 +5693,77 @@ export const postServiceOrderPrintOrder = /* #__PURE__ */ (() => { | @@ -5634,6 +5693,77 @@ export const postServiceOrderPrintOrder = /* #__PURE__ */ (() => { | ||
5634 | return request; | 5693 | return request; |
5635 | })(); | 5694 | })(); |
5636 | 5695 | ||
5696 | +/** @description request parameter type for postServiceOrderProcureCheckOrder */ | ||
5697 | +export interface PostServiceOrderProcureCheckOrderOption { | ||
5698 | + /** | ||
5699 | + * @description | ||
5700 | + * dto | ||
5701 | + */ | ||
5702 | + body: { | ||
5703 | + /** | ||
5704 | + @description | ||
5705 | + dto */ | ||
5706 | + dto: ProcureCheckOrderDto; | ||
5707 | + }; | ||
5708 | +} | ||
5709 | + | ||
5710 | +/** @description response type for postServiceOrderProcureCheckOrder */ | ||
5711 | +export interface PostServiceOrderProcureCheckOrderResponse { | ||
5712 | + /** | ||
5713 | + * @description | ||
5714 | + * OK | ||
5715 | + */ | ||
5716 | + 200: ServerResult; | ||
5717 | + /** | ||
5718 | + * @description | ||
5719 | + * Created | ||
5720 | + */ | ||
5721 | + 201: any; | ||
5722 | + /** | ||
5723 | + * @description | ||
5724 | + * Unauthorized | ||
5725 | + */ | ||
5726 | + 401: any; | ||
5727 | + /** | ||
5728 | + * @description | ||
5729 | + * Forbidden | ||
5730 | + */ | ||
5731 | + 403: any; | ||
5732 | + /** | ||
5733 | + * @description | ||
5734 | + * Not Found | ||
5735 | + */ | ||
5736 | + 404: any; | ||
5737 | +} | ||
5738 | + | ||
5739 | +export type PostServiceOrderProcureCheckOrderResponseSuccess = | ||
5740 | + PostServiceOrderProcureCheckOrderResponse[200]; | ||
5741 | +/** | ||
5742 | + * @description | ||
5743 | + * 采购审核订单 | ||
5744 | + * @tags 内部订单 | ||
5745 | + * @produces * | ||
5746 | + * @consumes application/json | ||
5747 | + */ | ||
5748 | +export const postServiceOrderProcureCheckOrder = /* #__PURE__ */ (() => { | ||
5749 | + const method = 'post'; | ||
5750 | + const url = '/service/order/procureCheckOrder'; | ||
5751 | + function request( | ||
5752 | + option: PostServiceOrderProcureCheckOrderOption, | ||
5753 | + ): Promise<PostServiceOrderProcureCheckOrderResponseSuccess> { | ||
5754 | + return requester(request.url, { | ||
5755 | + method: request.method, | ||
5756 | + ...option, | ||
5757 | + }) as unknown as Promise<PostServiceOrderProcureCheckOrderResponseSuccess>; | ||
5758 | + } | ||
5759 | + | ||
5760 | + /** http method */ | ||
5761 | + request.method = method; | ||
5762 | + /** request url */ | ||
5763 | + request.url = url; | ||
5764 | + return request; | ||
5765 | +})(); | ||
5766 | + | ||
5637 | /** @description response type for getServiceOrderProvideInvoicingStatus */ | 5767 | /** @description response type for getServiceOrderProvideInvoicingStatus */ |
5638 | export interface GetServiceOrderProvideInvoicingStatusResponse { | 5768 | export interface GetServiceOrderProvideInvoicingStatusResponse { |
5639 | /** | 5769 | /** |
@@ -6376,6 +6506,60 @@ export const postServiceOrderQueryServiceOrder = /* #__PURE__ */ (() => { | @@ -6376,6 +6506,60 @@ export const postServiceOrderQueryServiceOrder = /* #__PURE__ */ (() => { | ||
6376 | return request; | 6506 | return request; |
6377 | })(); | 6507 | })(); |
6378 | 6508 | ||
6509 | +/** @description response type for postServiceOrderQuerySupplier */ | ||
6510 | +export interface PostServiceOrderQuerySupplierResponse { | ||
6511 | + /** | ||
6512 | + * @description | ||
6513 | + * OK | ||
6514 | + */ | ||
6515 | + 200: ServerResult; | ||
6516 | + /** | ||
6517 | + * @description | ||
6518 | + * Created | ||
6519 | + */ | ||
6520 | + 201: any; | ||
6521 | + /** | ||
6522 | + * @description | ||
6523 | + * Unauthorized | ||
6524 | + */ | ||
6525 | + 401: any; | ||
6526 | + /** | ||
6527 | + * @description | ||
6528 | + * Forbidden | ||
6529 | + */ | ||
6530 | + 403: any; | ||
6531 | + /** | ||
6532 | + * @description | ||
6533 | + * Not Found | ||
6534 | + */ | ||
6535 | + 404: any; | ||
6536 | +} | ||
6537 | + | ||
6538 | +export type PostServiceOrderQuerySupplierResponseSuccess = | ||
6539 | + PostServiceOrderQuerySupplierResponse[200]; | ||
6540 | +/** | ||
6541 | + * @description | ||
6542 | + * 提供供应商名单 | ||
6543 | + * @tags 内部订单 | ||
6544 | + * @produces * | ||
6545 | + * @consumes application/json | ||
6546 | + */ | ||
6547 | +export const postServiceOrderQuerySupplier = /* #__PURE__ */ (() => { | ||
6548 | + const method = 'post'; | ||
6549 | + const url = '/service/order/querySupplier'; | ||
6550 | + function request(): Promise<PostServiceOrderQuerySupplierResponseSuccess> { | ||
6551 | + return requester(request.url, { | ||
6552 | + method: request.method, | ||
6553 | + }) as unknown as Promise<PostServiceOrderQuerySupplierResponseSuccess>; | ||
6554 | + } | ||
6555 | + | ||
6556 | + /** http method */ | ||
6557 | + request.method = method; | ||
6558 | + /** request url */ | ||
6559 | + request.url = url; | ||
6560 | + return request; | ||
6561 | +})(); | ||
6562 | + | ||
6379 | /** @description request parameter type for postServiceOrderSendProduct */ | 6563 | /** @description request parameter type for postServiceOrderSendProduct */ |
6380 | export interface PostServiceOrderSendProductOption { | 6564 | export interface PostServiceOrderSendProductOption { |
6381 | /** | 6565 | /** |
@@ -6447,6 +6631,148 @@ export const postServiceOrderSendProduct = /* #__PURE__ */ (() => { | @@ -6447,6 +6631,148 @@ export const postServiceOrderSendProduct = /* #__PURE__ */ (() => { | ||
6447 | return request; | 6631 | return request; |
6448 | })(); | 6632 | })(); |
6449 | 6633 | ||
6634 | +/** @description request parameter type for postServiceOrderSupplierPrint */ | ||
6635 | +export interface PostServiceOrderSupplierPrintOption { | ||
6636 | + /** | ||
6637 | + * @description | ||
6638 | + * dto | ||
6639 | + */ | ||
6640 | + body: { | ||
6641 | + /** | ||
6642 | + @description | ||
6643 | + dto */ | ||
6644 | + dto: Dto; | ||
6645 | + }; | ||
6646 | +} | ||
6647 | + | ||
6648 | +/** @description response type for postServiceOrderSupplierPrint */ | ||
6649 | +export interface PostServiceOrderSupplierPrintResponse { | ||
6650 | + /** | ||
6651 | + * @description | ||
6652 | + * OK | ||
6653 | + */ | ||
6654 | + 200: ServerResult; | ||
6655 | + /** | ||
6656 | + * @description | ||
6657 | + * Created | ||
6658 | + */ | ||
6659 | + 201: any; | ||
6660 | + /** | ||
6661 | + * @description | ||
6662 | + * Unauthorized | ||
6663 | + */ | ||
6664 | + 401: any; | ||
6665 | + /** | ||
6666 | + * @description | ||
6667 | + * Forbidden | ||
6668 | + */ | ||
6669 | + 403: any; | ||
6670 | + /** | ||
6671 | + * @description | ||
6672 | + * Not Found | ||
6673 | + */ | ||
6674 | + 404: any; | ||
6675 | +} | ||
6676 | + | ||
6677 | +export type PostServiceOrderSupplierPrintResponseSuccess = | ||
6678 | + PostServiceOrderSupplierPrintResponse[200]; | ||
6679 | +/** | ||
6680 | + * @description | ||
6681 | + * 供应商打印 | ||
6682 | + * @tags 内部订单 | ||
6683 | + * @produces * | ||
6684 | + * @consumes application/json | ||
6685 | + */ | ||
6686 | +export const postServiceOrderSupplierPrint = /* #__PURE__ */ (() => { | ||
6687 | + const method = 'post'; | ||
6688 | + const url = '/service/order/supplierPrint'; | ||
6689 | + function request( | ||
6690 | + option: PostServiceOrderSupplierPrintOption, | ||
6691 | + ): Promise<PostServiceOrderSupplierPrintResponseSuccess> { | ||
6692 | + return requester(request.url, { | ||
6693 | + method: request.method, | ||
6694 | + ...option, | ||
6695 | + }) as unknown as Promise<PostServiceOrderSupplierPrintResponseSuccess>; | ||
6696 | + } | ||
6697 | + | ||
6698 | + /** http method */ | ||
6699 | + request.method = method; | ||
6700 | + /** request url */ | ||
6701 | + request.url = url; | ||
6702 | + return request; | ||
6703 | +})(); | ||
6704 | + | ||
6705 | +/** @description request parameter type for postServiceOrderSupplierSendOrder */ | ||
6706 | +export interface PostServiceOrderSupplierSendOrderOption { | ||
6707 | + /** | ||
6708 | + * @description | ||
6709 | + * dto | ||
6710 | + */ | ||
6711 | + body: { | ||
6712 | + /** | ||
6713 | + @description | ||
6714 | + dto */ | ||
6715 | + dto: Dto; | ||
6716 | + }; | ||
6717 | +} | ||
6718 | + | ||
6719 | +/** @description response type for postServiceOrderSupplierSendOrder */ | ||
6720 | +export interface PostServiceOrderSupplierSendOrderResponse { | ||
6721 | + /** | ||
6722 | + * @description | ||
6723 | + * OK | ||
6724 | + */ | ||
6725 | + 200: ServerResult; | ||
6726 | + /** | ||
6727 | + * @description | ||
6728 | + * Created | ||
6729 | + */ | ||
6730 | + 201: any; | ||
6731 | + /** | ||
6732 | + * @description | ||
6733 | + * Unauthorized | ||
6734 | + */ | ||
6735 | + 401: any; | ||
6736 | + /** | ||
6737 | + * @description | ||
6738 | + * Forbidden | ||
6739 | + */ | ||
6740 | + 403: any; | ||
6741 | + /** | ||
6742 | + * @description | ||
6743 | + * Not Found | ||
6744 | + */ | ||
6745 | + 404: any; | ||
6746 | +} | ||
6747 | + | ||
6748 | +export type PostServiceOrderSupplierSendOrderResponseSuccess = | ||
6749 | + PostServiceOrderSupplierSendOrderResponse[200]; | ||
6750 | +/** | ||
6751 | + * @description | ||
6752 | + * 供应商发货 | ||
6753 | + * @tags 内部订单 | ||
6754 | + * @produces * | ||
6755 | + * @consumes application/json | ||
6756 | + */ | ||
6757 | +export const postServiceOrderSupplierSendOrder = /* #__PURE__ */ (() => { | ||
6758 | + const method = 'post'; | ||
6759 | + const url = '/service/order/supplierSendOrder'; | ||
6760 | + function request( | ||
6761 | + option: PostServiceOrderSupplierSendOrderOption, | ||
6762 | + ): Promise<PostServiceOrderSupplierSendOrderResponseSuccess> { | ||
6763 | + return requester(request.url, { | ||
6764 | + method: request.method, | ||
6765 | + ...option, | ||
6766 | + }) as unknown as Promise<PostServiceOrderSupplierSendOrderResponseSuccess>; | ||
6767 | + } | ||
6768 | + | ||
6769 | + /** http method */ | ||
6770 | + request.method = method; | ||
6771 | + /** request url */ | ||
6772 | + request.url = url; | ||
6773 | + return request; | ||
6774 | +})(); | ||
6775 | + | ||
6450 | /** @description request parameter type for postServiceOrderUpdateAnnex */ | 6776 | /** @description request parameter type for postServiceOrderUpdateAnnex */ |
6451 | export interface PostServiceOrderUpdateAnnexOption { | 6777 | export interface PostServiceOrderUpdateAnnexOption { |
6452 | /** | 6778 | /** |
src/utils/user.ts
@@ -6,7 +6,7 @@ export const getUserInfo = () => { | @@ -6,7 +6,7 @@ export const getUserInfo = () => { | ||
6 | let localUserInfo = localStorage.getItem('userInfo'); | 6 | let localUserInfo = localStorage.getItem('userInfo'); |
7 | 7 | ||
8 | if (localUserInfo === null || localUserInfo === undefined) { | 8 | if (localUserInfo === null || localUserInfo === undefined) { |
9 | - localUserInfo = ''; | 9 | + localUserInfo = '{}'; |
10 | } | 10 | } |
11 | const userInfo = JSON.parse(localUserInfo); | 11 | const userInfo = JSON.parse(localUserInfo); |
12 | 12 |