Commit 5f62387d8d01926b79066cb8b7811b9f8f63fcbd
1 parent
1b65ce07
feat: 售后优化
Showing
9 changed files
with
1098 additions
and
91 deletions
src/pages/Order/FeedBack/CheckModal.tsx
@@ -102,8 +102,6 @@ export default ({ | @@ -102,8 +102,6 @@ export default ({ | ||
102 | ); | 102 | ); |
103 | }); | 103 | }); |
104 | 104 | ||
105 | - console.log(annexLinks); | ||
106 | - | ||
107 | setAfterSalesInfo( | 105 | setAfterSalesInfo( |
108 | <div className="my-5"> | 106 | <div className="my-5"> |
109 | <Row gutter={[16, 24]}> | 107 | <Row gutter={[16, 24]}> |
@@ -676,7 +674,7 @@ export default ({ | @@ -676,7 +674,7 @@ export default ({ | ||
676 | <ProFormTextArea | 674 | <ProFormTextArea |
677 | width="lg" | 675 | width="lg" |
678 | name="name" | 676 | name="name" |
679 | - placeholder="若驳回,请填写驳回理由" | 677 | + // placeholder="若驳回,请填写驳回理由" |
680 | /> | 678 | /> |
681 | ) : ( | 679 | ) : ( |
682 | <></> | 680 | <></> |
src/pages/Order/FeedBack/OrderList.tsx
@@ -8,7 +8,6 @@ import { | @@ -8,7 +8,6 @@ import { | ||
8 | postKingdeeRepSalOrderSave, | 8 | postKingdeeRepSalOrderSave, |
9 | postServiceConstCanApplyAfterInvoicingStatus, | 9 | postServiceConstCanApplyAfterInvoicingStatus, |
10 | postServiceInvoiceCancelApply, | 10 | postServiceInvoiceCancelApply, |
11 | - postServiceOrderAfterSalesCheck, | ||
12 | postServiceOrderCancelSend, | 11 | postServiceOrderCancelSend, |
13 | postServiceOrderConfirmInvoice, | 12 | postServiceOrderConfirmInvoice, |
14 | postServiceOrderGetCurrentOptNode, | 13 | postServiceOrderGetCurrentOptNode, |
@@ -100,6 +99,7 @@ import ProcureCheckModal from './ProcureCheckModal'; | @@ -100,6 +99,7 @@ import ProcureCheckModal from './ProcureCheckModal'; | ||
100 | import ProcureConvertModal from './ProcureConvertModal'; | 99 | import ProcureConvertModal from './ProcureConvertModal'; |
101 | import ProductionTimeModal from './ProductionTimeModal'; | 100 | import ProductionTimeModal from './ProductionTimeModal'; |
102 | import ShippingWarehouseChangeModal from './ShippingWarehouseChangeModal'; | 101 | import ShippingWarehouseChangeModal from './ShippingWarehouseChangeModal'; |
102 | +import StoreCheckModal from './StoreCheckModal'; | ||
103 | import UploadPayBillModal from './UploadPayBillModal'; | 103 | import UploadPayBillModal from './UploadPayBillModal'; |
104 | import { | 104 | import { |
105 | AFTER_INVOICING_STATUS, | 105 | AFTER_INVOICING_STATUS, |
@@ -128,6 +128,8 @@ import { OrderListItemType, OrderType } from './type.d'; | @@ -128,6 +128,8 @@ import { OrderListItemType, OrderType } from './type.d'; | ||
128 | const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | 128 | const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { |
129 | const [orderDrawerVisible, setOrderDrawerVisible] = useState<boolean>(false); | 129 | const [orderDrawerVisible, setOrderDrawerVisible] = useState<boolean>(false); |
130 | const [checkVisible, setCheckVisible] = useState<boolean>(false); | 130 | const [checkVisible, setCheckVisible] = useState<boolean>(false); |
131 | + const [storeCheckModalVisible, setStoreCheckModalVisible] = | ||
132 | + useState<boolean>(false); | ||
131 | const [orderPrintVisible, setOrderPrintVisible] = useState<boolean>(false); | 133 | const [orderPrintVisible, setOrderPrintVisible] = useState<boolean>(false); |
132 | const [allMainChecked, setAllMainChecked] = useState(false); | 134 | const [allMainChecked, setAllMainChecked] = useState(false); |
133 | const [imagesViewerModalVisible, setImagesViewerModalVisible] = | 135 | const [imagesViewerModalVisible, setImagesViewerModalVisible] = |
@@ -413,15 +415,15 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -413,15 +415,15 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
413 | return null; | 415 | return null; |
414 | } | 416 | } |
415 | 417 | ||
416 | - async function doAfterSalesCheck(body: object) { | ||
417 | - const data = await postServiceOrderAfterSalesCheck({ | ||
418 | - data: body, | ||
419 | - }); | ||
420 | - console.log(data); | ||
421 | - if (data.data) { | ||
422 | - refreshTable(); | ||
423 | - } | ||
424 | - } | 418 | + // async function doAfterSalesCheck(body: object) { |
419 | + // const data = await postServiceOrderAfterSalesCheck({ | ||
420 | + // data: body, | ||
421 | + // }); | ||
422 | + // console.log(data); | ||
423 | + // if (data.data) { | ||
424 | + // refreshTable(); | ||
425 | + // } | ||
426 | + // } | ||
425 | 427 | ||
426 | /** | 428 | /** |
427 | * 返回当前操作的主订单数据 | 429 | * 返回当前操作的主订单数据 |
@@ -1914,6 +1916,23 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1914,6 +1916,23 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1914 | )} | 1916 | )} |
1915 | 1917 | ||
1916 | {optRecord.paths?.includes('afterSalesConfirm') ? ( | 1918 | {optRecord.paths?.includes('afterSalesConfirm') ? ( |
1919 | + <Button | ||
1920 | + className="p-0" | ||
1921 | + type="link" | ||
1922 | + onClick={() => { | ||
1923 | + setCurrentMainId(record.id); | ||
1924 | + createOptObject(optRecord.id, record.id); | ||
1925 | + setStoreCheckModalVisible(true); | ||
1926 | + setOrderCheckType(CHECK_TYPE.AFTER_SALES); | ||
1927 | + }} | ||
1928 | + > | ||
1929 | + 仓库确认 | ||
1930 | + </Button> | ||
1931 | + ) : ( | ||
1932 | + '' | ||
1933 | + )} | ||
1934 | + | ||
1935 | + {/* {optRecord.paths?.includes('afterSalesConfirm') ? ( | ||
1917 | <ButtonConfirm | 1936 | <ButtonConfirm |
1918 | className="p-0" | 1937 | className="p-0" |
1919 | title="确认通过?" | 1938 | title="确认通过?" |
@@ -1925,8 +1944,8 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1925,8 +1944,8 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1925 | isAfterSalesSuccess: true, | 1944 | isAfterSalesSuccess: true, |
1926 | subOrderIds: isMainOrder | 1945 | subOrderIds: isMainOrder |
1927 | ? [...record.subOrderInformationLists] | 1946 | ? [...record.subOrderInformationLists] |
1928 | - .flat() | ||
1929 | - ?.map((subOrder) => subOrder.id) | 1947 | + .flat() |
1948 | + ?.map((subOrder) => subOrder.id) | ||
1930 | : [optRecord.id], | 1949 | : [optRecord.id], |
1931 | mainId: record.id, | 1950 | mainId: record.id, |
1932 | }); | 1951 | }); |
@@ -1934,7 +1953,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1934,7 +1953,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1934 | /> | 1953 | /> |
1935 | ) : ( | 1954 | ) : ( |
1936 | '' | 1955 | '' |
1937 | - )} | 1956 | + )} */} |
1938 | 1957 | ||
1939 | {optRecord.paths?.includes('financeCheckOrder') ? ( | 1958 | {optRecord.paths?.includes('financeCheckOrder') ? ( |
1940 | <Button | 1959 | <Button |
@@ -2022,7 +2041,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -2022,7 +2041,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
2022 | onClick={() => { | 2041 | onClick={() => { |
2023 | createOptObject(optRecord.id, record.id); | 2042 | createOptObject(optRecord.id, record.id); |
2024 | setOrderDrawerVisible(true); | 2043 | setOrderDrawerVisible(true); |
2025 | - setOrderOptType('after_sales'); | 2044 | + setOrderOptType('after-sales'); |
2026 | }} | 2045 | }} |
2027 | > | 2046 | > |
2028 | 申请售后 | 2047 | 申请售后 |
@@ -3673,23 +3692,35 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -3673,23 +3692,35 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
3673 | )} | 3692 | )} |
3674 | 3693 | ||
3675 | {record.paths?.includes('afterSalesConfirm') ? ( | 3694 | {record.paths?.includes('afterSalesConfirm') ? ( |
3676 | - <ButtonConfirm | 3695 | + <Button |
3677 | className="p-0" | 3696 | className="p-0" |
3678 | - title="确认通过?" | ||
3679 | - text="仓库确认" | ||
3680 | - onConfirm={() => { | ||
3681 | - setIsMainOrder(true); | ||
3682 | - doAfterSalesCheck({ | ||
3683 | - applyType: 'after-sales', | ||
3684 | - isAfterSalesSuccess: true, | ||
3685 | - subOrderIds: [...record.subOrderInformationLists] | ||
3686 | - .flat() | ||
3687 | - ?.map((subOrder) => subOrder.id), | ||
3688 | - mainId: record.id, | ||
3689 | - }); | 3697 | + type="link" |
3698 | + onClick={() => { | ||
3699 | + setCurrentMainId(record.id); | ||
3700 | + createOptObject(null, record.id); | ||
3701 | + setStoreCheckModalVisible(true); | ||
3702 | + setOrderCheckType(CHECK_TYPE.AFTER_SALES); | ||
3690 | }} | 3703 | }} |
3691 | - /> | 3704 | + > |
3705 | + 仓库确认 | ||
3706 | + </Button> | ||
3692 | ) : ( | 3707 | ) : ( |
3708 | + // <ButtonConfirm | ||
3709 | + // className="p-0" | ||
3710 | + // title="确认通过?" | ||
3711 | + // text="仓库确认" | ||
3712 | + // onConfirm={() => { | ||
3713 | + // setIsMainOrder(true); | ||
3714 | + // doAfterSalesCheck({ | ||
3715 | + // applyType: 'after-sales', | ||
3716 | + // isAfterSalesSuccess: true, | ||
3717 | + // subOrderIds: [...record.subOrderInformationLists] | ||
3718 | + // .flat() | ||
3719 | + // ?.map((subOrder) => subOrder.id), | ||
3720 | + // mainId: record.id, | ||
3721 | + // }); | ||
3722 | + // }} | ||
3723 | + // /> | ||
3693 | '' | 3724 | '' |
3694 | )} | 3725 | )} |
3695 | 3726 | ||
@@ -3876,7 +3907,9 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -3876,7 +3907,9 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
3876 | selectedSubOrders[i].orderStatus !== | 3907 | selectedSubOrders[i].orderStatus !== |
3877 | 'CONFIRM_RECEIPT' && | 3908 | 'CONFIRM_RECEIPT' && |
3878 | selectedSubOrders[i].orderStatus !== | 3909 | selectedSubOrders[i].orderStatus !== |
3879 | - 'AFTER_SALES_FAILURE' | 3910 | + 'AFTER_SALES_FAILURE' && |
3911 | + selectedSubOrders[i].orderStatus !== | ||
3912 | + 'AFTER_SALES_COMPLETION' | ||
3880 | ) { | 3913 | ) { |
3881 | message.error('请选择确认收货状态的子订单进行售后'); | 3914 | message.error('请选择确认收货状态的子订单进行售后'); |
3882 | return; | 3915 | return; |
@@ -4857,6 +4890,34 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -4857,6 +4890,34 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
4857 | /> | 4890 | /> |
4858 | )} | 4891 | )} |
4859 | 4892 | ||
4893 | + {storeCheckModalVisible && ( | ||
4894 | + <StoreCheckModal | ||
4895 | + setCheckVisible={(val: boolean) => { | ||
4896 | + setStoreCheckModalVisible(val); | ||
4897 | + if (!val) { | ||
4898 | + clearOptObject(); | ||
4899 | + } | ||
4900 | + }} | ||
4901 | + data={isMainOrder ? getFirstMainOrder() : buildMainOrder()} | ||
4902 | + subOrders={ | ||
4903 | + isMainOrder | ||
4904 | + ? [...subOrderSelectedMap.values()].flat() | ||
4905 | + : buildSubOrders() | ||
4906 | + } | ||
4907 | + orderCheckType={orderCheckType} | ||
4908 | + openOrderDrawer={(type: any, id: any) => { | ||
4909 | + setCurrentMainId(id); | ||
4910 | + setOrderOptType(type); | ||
4911 | + setOrderDrawerVisible(true); | ||
4912 | + }} | ||
4913 | + onClose={() => { | ||
4914 | + clearOptObject(); | ||
4915 | + setStoreCheckModalVisible(false); | ||
4916 | + refreshTable(); | ||
4917 | + }} | ||
4918 | + /> | ||
4919 | + )} | ||
4920 | + | ||
4860 | {applyForInvoicingVisible && ( | 4921 | {applyForInvoicingVisible && ( |
4861 | <ApplyForInvoicingModal | 4922 | <ApplyForInvoicingModal |
4862 | setCheckVisible={(val: boolean) => { | 4923 | setCheckVisible={(val: boolean) => { |
src/pages/Order/FeedBack/StoreCheckModal.tsx
0 → 100644
1 | +import { RESPONSE_CODE } from '@/constants/enum'; | ||
2 | +import { | ||
3 | + postPrepaidAudit, | ||
4 | + postServiceOrderAfterSalesStoreSure, | ||
5 | + postServiceOrderAudit, | ||
6 | + postServiceOrderFileProcess, | ||
7 | + postServiceOrderFinanceCheckOrder, | ||
8 | + postServiceOrderLeaderAudit, | ||
9 | + postServiceOrderToProcureAudit, | ||
10 | +} from '@/services'; | ||
11 | +import { | ||
12 | + ModalForm, | ||
13 | + ProFormText, | ||
14 | + ProFormTextArea, | ||
15 | + ProList, | ||
16 | +} from '@ant-design/pro-components'; | ||
17 | +import { | ||
18 | + Button, | ||
19 | + Col, | ||
20 | + Divider, | ||
21 | + Form, | ||
22 | + Image, | ||
23 | + Modal, | ||
24 | + Row, | ||
25 | + Space, | ||
26 | + Tag, | ||
27 | + UploadFile, | ||
28 | + message, | ||
29 | +} from 'antd'; | ||
30 | +import Upload, { RcFile, UploadProps } from 'antd/es/upload'; | ||
31 | +import { useEffect, useRef, useState } from 'react'; | ||
32 | +import { | ||
33 | + AFTE_SALES_PLAN_OPTIONS, | ||
34 | + CHECK_TYPE, | ||
35 | + COMFIR_RECEIPT_IMAGES_NUMBER, | ||
36 | +} from './constant'; | ||
37 | +// import { cloneDeep } from 'lodash'; | ||
38 | +import InvoiceSubOrderInfoTable from '@/pages/Order/Order/components/InvoiceSubOrderInfoTable'; | ||
39 | +import { enumValueToLabel, transImageFile } from '@/utils'; | ||
40 | +import { PlusOutlined } from '@ant-design/icons'; | ||
41 | +import { cloneDeep } from 'lodash'; | ||
42 | + | ||
43 | +export default ({ | ||
44 | + setCheckVisible, | ||
45 | + data, | ||
46 | + subOrders, | ||
47 | + orderCheckType, | ||
48 | + openOrderDrawer, | ||
49 | + onClose, | ||
50 | +}) => { | ||
51 | + const [previewOpen, setPreviewOpen] = useState(false); | ||
52 | + const [aPopoverTitle, setAPopoverTitle] = useState('审核'); | ||
53 | + const [previewImage, setPreviewImage] = useState(''); | ||
54 | + const [previewTitle, setPreviewTitle] = useState(''); | ||
55 | + const [paymentReceiptsImages, setPymentReceiptsImages] = useState<any[]>([]); | ||
56 | + const fileListObj = useRef<UploadFile[]>([]); //使用引用类型,使得在useEffect里面设置监听事件后,不用更新监听事件也能保持obj与外界一致 | ||
57 | + const getBase64 = (file: RcFile): Promise<string> => | ||
58 | + new Promise((resolve, reject) => { | ||
59 | + const reader = new FileReader(); | ||
60 | + reader.readAsDataURL(file); | ||
61 | + reader.onload = () => resolve(reader.result as string); | ||
62 | + reader.onerror = (error) => reject(error); | ||
63 | + }); | ||
64 | + const [fileList, setFileList] = useState<UploadFile[]>([]); | ||
65 | + const handleCancel = () => setPreviewOpen(false); | ||
66 | + const [messageApi, contextHolder] = message.useMessage(); | ||
67 | + const [form] = Form.useForm<{ name: string; company: string }>(); | ||
68 | + let subOrderIds: any[] = subOrders?.map((subOrder) => subOrder.id); | ||
69 | + const [mainOrderId] = useState(data?.id || null); | ||
70 | + | ||
71 | + const [afterSalesInfo, setAfterSalesInfo] = useState<any>(); | ||
72 | + const [prepaidProofImages, setPrepaidProofImages] = useState<any[]>([]); | ||
73 | + /** | ||
74 | + * 审核类型 | ||
75 | + */ | ||
76 | + function checkType(check: string) { | ||
77 | + if (orderCheckType === check) { | ||
78 | + return true; | ||
79 | + } | ||
80 | + return false; | ||
81 | + } | ||
82 | + | ||
83 | + const getOrderAfterSalesInfo = async () => { | ||
84 | + // let res = await postServiceOrderQueryAfterSalesInfoSnapshot({ | ||
85 | + // data: { subOrderIds: subOrderIds }, | ||
86 | + // }); | ||
87 | + | ||
88 | + //附件 | ||
89 | + let annex = subOrders[0].afterSalesAnnexList; | ||
90 | + let index = 1; | ||
91 | + let annexLinks = annex?.map((f) => { | ||
92 | + return ( | ||
93 | + <Button | ||
94 | + className="p-0 pr-1" | ||
95 | + type="link" | ||
96 | + key="key" | ||
97 | + href={f} | ||
98 | + onClick={console.log(data)} | ||
99 | + > | ||
100 | + {'附件' + index++} | ||
101 | + </Button> | ||
102 | + ); | ||
103 | + }); | ||
104 | + | ||
105 | + setAfterSalesInfo( | ||
106 | + <div className="my-5"> | ||
107 | + <Row gutter={[16, 24]}> | ||
108 | + <Col span={6}> | ||
109 | + <span className="text-[#333333]">售后方案</span> | ||
110 | + </Col> | ||
111 | + <Col span={18}> | ||
112 | + {enumValueToLabel( | ||
113 | + subOrders[0]?.afterSalesPlan, | ||
114 | + AFTE_SALES_PLAN_OPTIONS, | ||
115 | + )} | ||
116 | + </Col> | ||
117 | + <Col span={6}> | ||
118 | + <span className="className='text-[#333333]'">售后原因</span> | ||
119 | + </Col> | ||
120 | + <Col span={18}>{subOrders[0]?.afterSalesNotes}</Col> | ||
121 | + <Col span={6}> | ||
122 | + <span className="className='text-[#333333]'">附件</span> | ||
123 | + </Col> | ||
124 | + <Col span={18}>{annexLinks}</Col> | ||
125 | + </Row> | ||
126 | + </div>, | ||
127 | + ); | ||
128 | + }; | ||
129 | + | ||
130 | + useEffect(() => { | ||
131 | + if (checkType(CHECK_TYPE.CONFIRM_DELIVER)) { | ||
132 | + setAPopoverTitle('确认发货'); | ||
133 | + } | ||
134 | + getOrderAfterSalesInfo(); | ||
135 | + | ||
136 | + let paymentReceiptsImagesList: any[] = []; | ||
137 | + subOrders?.forEach((item: any) => { | ||
138 | + if (item.paymentReceiptAnnexList) { | ||
139 | + paymentReceiptsImagesList.push(...item.paymentReceiptAnnexList); | ||
140 | + } | ||
141 | + }); | ||
142 | + //去重 | ||
143 | + paymentReceiptsImagesList = [...new Set(paymentReceiptsImagesList)]; | ||
144 | + setPymentReceiptsImages(paymentReceiptsImagesList); | ||
145 | + | ||
146 | + //预存审核的凭证 | ||
147 | + let proofImages: any[] = []; | ||
148 | + subOrders?.forEach((item) => { | ||
149 | + let images = item.proofImages; | ||
150 | + if (images !== null && images !== undefined) { | ||
151 | + proofImages.push(...images); | ||
152 | + } | ||
153 | + }); | ||
154 | + setPrepaidProofImages(proofImages); | ||
155 | + }, []); | ||
156 | + | ||
157 | + const handleChange: UploadProps['onChange'] = ({ fileList: newFileList }) => { | ||
158 | + //fileListObj得在change里变化,change的参数是已经处理过的file数组 | ||
159 | + //beforeUpload中的参数file是未处理过,还需要Base64拿到文件数据处理 | ||
160 | + fileListObj.current = newFileList; | ||
161 | + setFileList(newFileList); | ||
162 | + }; | ||
163 | + | ||
164 | + /** 粘贴快捷键的回调 */ | ||
165 | + const onPaste = async (e: any) => { | ||
166 | + /** 获取剪切板的数据clipboardData */ | ||
167 | + let clipboardData = e.clipboardData, | ||
168 | + i = 0, | ||
169 | + items, | ||
170 | + item, | ||
171 | + types; | ||
172 | + | ||
173 | + /** 为空判断 */ | ||
174 | + if (clipboardData) { | ||
175 | + items = clipboardData.items; | ||
176 | + if (!items) { | ||
177 | + message.info('您的剪贴板中没有照片'); | ||
178 | + return; | ||
179 | + } | ||
180 | + | ||
181 | + item = items[0]; | ||
182 | + types = clipboardData.types || []; | ||
183 | + /** 遍历剪切板的数据 */ | ||
184 | + for (; i < types.length; i++) { | ||
185 | + if (types[i] === 'Files') { | ||
186 | + item = items[i]; | ||
187 | + break; | ||
188 | + } | ||
189 | + } | ||
190 | + | ||
191 | + /** 判断文件是否为图片 */ | ||
192 | + if (item && item.kind === 'file' && item.type.match(/^image\//i)) { | ||
193 | + const imgItem = item.getAsFile(); | ||
194 | + const newFileList = cloneDeep(fileListObj.current); | ||
195 | + let filteredArray = newFileList.filter( | ||
196 | + (obj) => obj.status !== 'removed', | ||
197 | + ); //过滤掉状态为已删除的照片 | ||
198 | + const listItem = { | ||
199 | + ...imgItem, | ||
200 | + status: 'done', | ||
201 | + url: await getBase64(imgItem), | ||
202 | + originFileObj: imgItem, | ||
203 | + }; | ||
204 | + | ||
205 | + if (filteredArray.length >= COMFIR_RECEIPT_IMAGES_NUMBER) { | ||
206 | + message.info('发货照片数量不能超过3'); | ||
207 | + return; | ||
208 | + } | ||
209 | + fileListObj.current = filteredArray; | ||
210 | + filteredArray.push(listItem); | ||
211 | + setFileList(filteredArray); | ||
212 | + return; | ||
213 | + } | ||
214 | + } | ||
215 | + | ||
216 | + message.info('您的剪贴板中没有照片'); | ||
217 | + }; | ||
218 | + useEffect(() => { | ||
219 | + //回显售后信息 | ||
220 | + // if (checkType(CHECK_TYPE.AFTER_SALES)) { | ||
221 | + // getOrderAfterSalesInfo(); | ||
222 | + // } | ||
223 | + | ||
224 | + document.addEventListener('paste', onPaste); | ||
225 | + return () => { | ||
226 | + document.removeEventListener('paste', onPaste); | ||
227 | + }; | ||
228 | + }, []); | ||
229 | + const uploadButton = ( | ||
230 | + <div> | ||
231 | + <PlusOutlined /> | ||
232 | + <div style={{ marginTop: 8 }}>上传凭证</div> | ||
233 | + </div> | ||
234 | + ); | ||
235 | + const handlePreview = async (file: UploadFile) => { | ||
236 | + if (!file.url && !file.preview) { | ||
237 | + file.preview = await getBase64(file.originFileObj as RcFile); | ||
238 | + } | ||
239 | + setPreviewImage(file.url || (file.preview as string)); | ||
240 | + setPreviewOpen(true); | ||
241 | + setPreviewTitle( | ||
242 | + file.name || | ||
243 | + file.originFileObj?.name || | ||
244 | + file.url!.substring(file.url!.lastIndexOf('/') + 1), | ||
245 | + ); | ||
246 | + }; | ||
247 | + | ||
248 | + const handleBeforeUpload = (file: any) => { | ||
249 | + setFileList([...fileList, file]); | ||
250 | + return false; | ||
251 | + }; | ||
252 | + | ||
253 | + const props: UploadProps = { | ||
254 | + onRemove: (file) => { | ||
255 | + const index = fileList.indexOf(file); | ||
256 | + const newFileList = fileList.slice(); | ||
257 | + newFileList.splice(index, 1); | ||
258 | + setFileList(newFileList); | ||
259 | + }, | ||
260 | + beforeUpload: handleBeforeUpload, | ||
261 | + listType: 'picture-card', | ||
262 | + onPreview: handlePreview, | ||
263 | + fileList, | ||
264 | + onChange: handleChange, | ||
265 | + accept: 'image/png, image/jpeg, image/png', | ||
266 | + // action: '/api/service/order/fileProcess', | ||
267 | + name: 'files', | ||
268 | + headers: { Authorization: localStorage.getItem('token') }, | ||
269 | + }; | ||
270 | + | ||
271 | + //仓库审核 | ||
272 | + async function doCheck(body: object) { | ||
273 | + const data = await postServiceOrderAudit({ | ||
274 | + data: body, | ||
275 | + }); | ||
276 | + if (data.result === RESPONSE_CODE.SUCCESS) { | ||
277 | + message.success(data.message); | ||
278 | + onClose(); | ||
279 | + } | ||
280 | + } | ||
281 | + | ||
282 | + /** | ||
283 | + * | ||
284 | + * @param body 财务审核 | ||
285 | + */ | ||
286 | + async function doFinancailCheck(values: any, isAgree: boolean) { | ||
287 | + if (fileList.length <= 0) { | ||
288 | + message.error('凭证不能为空'); | ||
289 | + return; | ||
290 | + } | ||
291 | + messageApi.open({ | ||
292 | + type: 'loading', | ||
293 | + content: '正在上传图片...', | ||
294 | + duration: 0, | ||
295 | + }); | ||
296 | + //附件处理 | ||
297 | + let formData = new FormData(); | ||
298 | + //附件处理 | ||
299 | + for (let file of fileList) { | ||
300 | + if (file.originFileObj) { | ||
301 | + formData.append('files', file.originFileObj as RcFile); | ||
302 | + } else { | ||
303 | + //有url的话取url(源文件),没url取thumbUrl。有url的时候thumbUrl是略缩图 | ||
304 | + if (file?.url === undefined || file?.url === null) { | ||
305 | + formData.append( | ||
306 | + 'files', | ||
307 | + transImageFile(file?.thumbUrl), | ||
308 | + file?.originFileObj?.name, | ||
309 | + ); | ||
310 | + } else { | ||
311 | + formData.append( | ||
312 | + 'files', | ||
313 | + transImageFile(file?.url), | ||
314 | + file?.originFileObj?.name, | ||
315 | + ); | ||
316 | + } | ||
317 | + } | ||
318 | + } | ||
319 | + let res = await postServiceOrderFileProcess({ | ||
320 | + data: formData, | ||
321 | + }); | ||
322 | + messageApi.destroy(); | ||
323 | + if (res.result === RESPONSE_CODE.SUCCESS) { | ||
324 | + message.success('上传成功!'); | ||
325 | + | ||
326 | + let fileUrls = res?.data?.map((item) => { | ||
327 | + return { url: item }; | ||
328 | + }); | ||
329 | + //财务审核 | ||
330 | + const data = await postServiceOrderFinanceCheckOrder({ | ||
331 | + data: { | ||
332 | + ...values, | ||
333 | + checkNotes: values.name, | ||
334 | + ids: subOrderIds, | ||
335 | + checkPassOrReject: isAgree, | ||
336 | + invoicingCheckAnnex: fileUrls, | ||
337 | + }, | ||
338 | + }); | ||
339 | + if (data.result === RESPONSE_CODE.SUCCESS) { | ||
340 | + message.success(data.message); | ||
341 | + onClose(); | ||
342 | + } | ||
343 | + } else { | ||
344 | + message.success('上传失败'); | ||
345 | + } | ||
346 | + } | ||
347 | + | ||
348 | + /** | ||
349 | + * | ||
350 | + * @param body 售后审核 | ||
351 | + */ | ||
352 | + async function doAfterSalesCheck(body: object) { | ||
353 | + const data = await postServiceOrderAfterSalesStoreSure({ | ||
354 | + data: body, | ||
355 | + }); | ||
356 | + if (data.result === RESPONSE_CODE.SUCCESS) { | ||
357 | + message.success(data.message); | ||
358 | + onClose(); | ||
359 | + } | ||
360 | + } | ||
361 | + | ||
362 | + /** | ||
363 | + * | ||
364 | + * @param body 领导审核 | ||
365 | + */ | ||
366 | + async function doLeaderCheck(body: object) { | ||
367 | + const data = await postServiceOrderLeaderAudit({ | ||
368 | + data: body, | ||
369 | + }); | ||
370 | + if (data.result === RESPONSE_CODE.SUCCESS) { | ||
371 | + message.success(data.message); | ||
372 | + onClose(); | ||
373 | + } | ||
374 | + } | ||
375 | + | ||
376 | + /** | ||
377 | + * 预存审核 | ||
378 | + * @param body | ||
379 | + */ | ||
380 | + async function doPrepaidAudit(body: any) { | ||
381 | + const data = await postPrepaidAudit({ | ||
382 | + data: body, | ||
383 | + }); | ||
384 | + if (data.result === RESPONSE_CODE.SUCCESS) { | ||
385 | + message.success(data.message); | ||
386 | + onClose(); | ||
387 | + } | ||
388 | + } | ||
389 | + | ||
390 | + function computeType() { | ||
391 | + let type: string = ''; | ||
392 | + if (checkType(CHECK_TYPE.CONFIRM_DELIVER)) { | ||
393 | + type = 'confirm_deliver'; | ||
394 | + } | ||
395 | + if (checkType(CHECK_TYPE.WEARHOUSE_KEEPER)) { | ||
396 | + type = 'warehouse_audit'; | ||
397 | + } | ||
398 | + if (checkType(CHECK_TYPE.WAITING_FOR_POST_AUDIT)) { | ||
399 | + type = 'post_audit'; | ||
400 | + } | ||
401 | + if (checkType(CHECK_TYPE.NODE_OPERATING_AUDIT)) { | ||
402 | + type = 'node_operating_audit'; | ||
403 | + } | ||
404 | + if (checkType(CHECK_TYPE.MODIFY_LEADER_AUDIT)) { | ||
405 | + type = 'modify_leader_audit'; | ||
406 | + } | ||
407 | + if (checkType(CHECK_TYPE.URGENT_INVOICE_AUDITING)) { | ||
408 | + type = 'urgent_invoice_audit'; | ||
409 | + } | ||
410 | + if (checkType(CHECK_TYPE.PAYMENT_RECEIPTS_AUDIT)) { | ||
411 | + type = 'payment_receipt_audit'; | ||
412 | + } | ||
413 | + if (checkType(CHECK_TYPE.CONFIRM_REISSUE)) { | ||
414 | + type = 'confirm_reissue'; | ||
415 | + } | ||
416 | + if (checkType(CHECK_TYPE.CREDIT_AUDIT)) { | ||
417 | + type = 'credit_audit'; | ||
418 | + } | ||
419 | + if (checkType(CHECK_TYPE.URGENT_INVOICE_AUDITING_OLD)) { | ||
420 | + type = 'urgent_invoice_audit_old'; | ||
421 | + } | ||
422 | + if (checkType(CHECK_TYPE.CONFIRM_REISSUE_OLD)) { | ||
423 | + type = 'confirm_reissue_old'; | ||
424 | + } | ||
425 | + return type; | ||
426 | + } | ||
427 | + | ||
428 | + return ( | ||
429 | + <> | ||
430 | + <ModalForm<{ | ||
431 | + name: string; | ||
432 | + company: string; | ||
433 | + }> | ||
434 | + width={500} | ||
435 | + open | ||
436 | + title={aPopoverTitle} | ||
437 | + form={form} | ||
438 | + autoFocusFirstInput | ||
439 | + modalProps={{ | ||
440 | + okText: '通过', | ||
441 | + cancelText: '取消', | ||
442 | + destroyOnClose: true, | ||
443 | + onCancel: () => { | ||
444 | + setCheckVisible(false); | ||
445 | + }, | ||
446 | + }} | ||
447 | + submitter={{ | ||
448 | + render: () => { | ||
449 | + let myDoms = []; | ||
450 | + if (!checkType(CHECK_TYPE.CONFIRM_DELIVER)) { | ||
451 | + myDoms | ||
452 | + .push | ||
453 | + // <Button | ||
454 | + // key="驳回" | ||
455 | + // onClick={async () => { | ||
456 | + // if (checkType(CHECK_TYPE.AFTER_SALES)) { | ||
457 | + // doAfterSalesCheck({ | ||
458 | + // applyType: 'after-sales', | ||
459 | + // isAfterSalesSuccess: false, | ||
460 | + // subOrderIds: subOrderIds, | ||
461 | + // mainId: mainOrderId, | ||
462 | + // afterSalesRejectionNotes: form.getFieldValue('name'), | ||
463 | + // }); | ||
464 | + // return; | ||
465 | + // } | ||
466 | + | ||
467 | + // if (checkType(CHECK_TYPE.FINALCIAL)) { | ||
468 | + // let values = { name: form.getFieldValue('name') }; | ||
469 | + // doFinancailCheck(values, false); | ||
470 | + // return; | ||
471 | + // } | ||
472 | + | ||
473 | + // if (checkType(CHECK_TYPE.LEADER_AUDIT)) { | ||
474 | + // doLeaderCheck({ | ||
475 | + // pass: false, | ||
476 | + // subOrderIds: subOrderIds, | ||
477 | + // reason: form.getFieldValue('name'), | ||
478 | + // }); | ||
479 | + // return; | ||
480 | + // } | ||
481 | + | ||
482 | + // if (checkType(CHECK_TYPE.MODIFY_APPLY_WAIT_FOR_AUDIT)) { | ||
483 | + // doAfterSalesCheck({ | ||
484 | + // applyType: 'order-change-normal', | ||
485 | + // isAfterSalesSuccess: false, | ||
486 | + // subOrderIds: subOrderIds, | ||
487 | + // mainId: mainOrderId, | ||
488 | + // afterSalesRejectionNotes: form.getFieldValue('name'), | ||
489 | + // }); | ||
490 | + // return; | ||
491 | + // } | ||
492 | + | ||
493 | + // //预存审核,先暂时共用同一个审核弹窗 | ||
494 | + // if (checkType(CHECK_TYPE.PREPAID_AUDIT)) { | ||
495 | + // return doPrepaidAudit({ | ||
496 | + // pass: false, | ||
497 | + // ids: subOrderIds, | ||
498 | + // auditNotes: form.getFieldValue('name'), | ||
499 | + // }); | ||
500 | + // } | ||
501 | + | ||
502 | + // let type = ''; | ||
503 | + // type = computeType(); | ||
504 | + // console.log('type:' + type); | ||
505 | + // doCheck({ | ||
506 | + // pass: false, | ||
507 | + // subOrderIds: subOrderIds, | ||
508 | + // type: type, | ||
509 | + // notes: form.getFieldValue('name'), | ||
510 | + // }); | ||
511 | + // }} | ||
512 | + // > | ||
513 | + // 驳回 | ||
514 | + // </Button>, | ||
515 | + (); | ||
516 | + } | ||
517 | + | ||
518 | + //如果是仓库审核,那么显示这个外部采购 | ||
519 | + if (checkType(CHECK_TYPE.WEARHOUSE_KEEPER)) { | ||
520 | + myDoms.push( | ||
521 | + <Button | ||
522 | + key="外部采购" | ||
523 | + onClick={async () => { | ||
524 | + let res = await postServiceOrderToProcureAudit({ | ||
525 | + data: { | ||
526 | + subOrderIds: subOrderIds, | ||
527 | + }, | ||
528 | + }); | ||
529 | + | ||
530 | + if (res && res.result === RESPONSE_CODE.SUCCESS) { | ||
531 | + message.success(res.message); | ||
532 | + onClose(); | ||
533 | + } | ||
534 | + }} | ||
535 | + > | ||
536 | + 外部采购 | ||
537 | + </Button>, | ||
538 | + ); | ||
539 | + } | ||
540 | + | ||
541 | + //确认 | ||
542 | + // myDoms.push(defaultDoms[1]); | ||
543 | + return myDoms; | ||
544 | + }, | ||
545 | + }} | ||
546 | + submitTimeout={2000} | ||
547 | + onFinish={async (values) => { | ||
548 | + if (checkType(CHECK_TYPE.AFTER_SALES)) { | ||
549 | + //审核通过 | ||
550 | + return doAfterSalesCheck({ | ||
551 | + applyType: 'after-sales', | ||
552 | + isAfterSalesSuccess: true, | ||
553 | + subOrderIds: subOrderIds, | ||
554 | + mainId: mainOrderId, | ||
555 | + afterSalesRejectionNotes: values.name, | ||
556 | + afterSalesStoreNotes: values.sure, | ||
557 | + }); | ||
558 | + } | ||
559 | + console.log('h'); | ||
560 | + if (checkType(CHECK_TYPE.FINALCIAL)) { | ||
561 | + doFinancailCheck(values, true); | ||
562 | + return; | ||
563 | + } | ||
564 | + | ||
565 | + if (checkType(CHECK_TYPE.LEADER_AUDIT)) { | ||
566 | + doLeaderCheck({ | ||
567 | + pass: true, | ||
568 | + subOrderIds: subOrderIds, | ||
569 | + reason: values.name, | ||
570 | + }); | ||
571 | + return; | ||
572 | + } | ||
573 | + | ||
574 | + if (checkType(CHECK_TYPE.MODIFY_APPLY_WAIT_FOR_AUDIT)) { | ||
575 | + //审核通过 | ||
576 | + return doAfterSalesCheck({ | ||
577 | + applyType: 'order-change-normal', | ||
578 | + isAfterSalesSuccess: true, | ||
579 | + subOrderIds: subOrderIds, | ||
580 | + mainId: mainOrderId, | ||
581 | + afterSalesRejectionNotes: values.name, | ||
582 | + afterSalesStoreNotes: values.sure, | ||
583 | + }); | ||
584 | + } | ||
585 | + | ||
586 | + //预存审核,先暂时共用同一个审核弹窗 | ||
587 | + if (checkType(CHECK_TYPE.PREPAID_AUDIT)) { | ||
588 | + return doPrepaidAudit({ | ||
589 | + pass: true, | ||
590 | + ids: subOrderIds, | ||
591 | + auditNotes: form.getFieldValue('name'), | ||
592 | + }); | ||
593 | + } | ||
594 | + | ||
595 | + let type = ''; | ||
596 | + type = computeType(); | ||
597 | + doCheck({ | ||
598 | + ...values, | ||
599 | + pass: true, | ||
600 | + subOrderIds: subOrderIds, | ||
601 | + type: type, | ||
602 | + notes: form.getFieldValue('name'), | ||
603 | + }); | ||
604 | + }} | ||
605 | + onOpenChange={setCheckVisible} | ||
606 | + > | ||
607 | + {checkType(CHECK_TYPE.AFTER_SALES) ? ( | ||
608 | + <> | ||
609 | + {afterSalesInfo} | ||
610 | + <Button | ||
611 | + className="px-0" | ||
612 | + type="link" | ||
613 | + onClick={() => { | ||
614 | + console.log(data); | ||
615 | + openOrderDrawer('after-sales-check', mainOrderId); | ||
616 | + }} | ||
617 | + > | ||
618 | + 查看旧订单 | ||
619 | + </Button> | ||
620 | + </> | ||
621 | + ) : ( | ||
622 | + '' | ||
623 | + )} | ||
624 | + {checkType(CHECK_TYPE.PAYMENT_RECEIPTS_AUDIT) ? ( | ||
625 | + <> | ||
626 | + <Divider orientation="center"> | ||
627 | + <span className="text-sm">回款凭证</span> | ||
628 | + </Divider> | ||
629 | + <Image.PreviewGroup | ||
630 | + className="mr-10" | ||
631 | + preview={{ | ||
632 | + onChange: (current, prev) => | ||
633 | + console.log(`current index: ${current}, prev index: ${prev}`), | ||
634 | + }} | ||
635 | + > | ||
636 | + {paymentReceiptsImages.map((url) => ( | ||
637 | + <> | ||
638 | + <Image width={120} src={url} /> <Divider type="vertical" /> | ||
639 | + </> | ||
640 | + ))} | ||
641 | + </Image.PreviewGroup> | ||
642 | + <Divider></Divider> | ||
643 | + </> | ||
644 | + ) : ( | ||
645 | + '' | ||
646 | + )} | ||
647 | + | ||
648 | + {checkType(CHECK_TYPE.PREPAID_AUDIT) && ( | ||
649 | + <> | ||
650 | + <Divider orientation="center"> | ||
651 | + <span className="text-sm">凭证</span> | ||
652 | + </Divider> | ||
653 | + <Image.PreviewGroup | ||
654 | + className="mr-10" | ||
655 | + preview={{ | ||
656 | + onChange: (current, prev) => | ||
657 | + console.log(`current index: ${current}, prev index: ${prev}`), | ||
658 | + }} | ||
659 | + > | ||
660 | + {prepaidProofImages.map((url) => ( | ||
661 | + <> | ||
662 | + <Image width={120} src={url} /> <Divider type="vertical" /> | ||
663 | + </> | ||
664 | + ))} | ||
665 | + </Image.PreviewGroup> | ||
666 | + <Divider></Divider> | ||
667 | + </> | ||
668 | + )} | ||
669 | + | ||
670 | + {/* {checkType('prepaidAudit') ? ( | ||
671 | + <div>请特别注意手机号码和充值金额。</div> | ||
672 | + ) : ( | ||
673 | + <div>请特别注意订单总金额与订单金额。</div> | ||
674 | + )} */} | ||
675 | + {!checkType(CHECK_TYPE.CONFIRM_DELIVER) ? ( | ||
676 | + <ProFormTextArea | ||
677 | + width="lg" | ||
678 | + name="name" | ||
679 | + readonly | ||
680 | + initialValue={subOrders?.find((order) => order.notes)?.notes || ''} | ||
681 | + // placeholder="若驳回,请填写驳回理由" | ||
682 | + /> | ||
683 | + ) : ( | ||
684 | + <></> | ||
685 | + )} | ||
686 | + | ||
687 | + <ProFormTextArea | ||
688 | + width="lg" | ||
689 | + name="sure" | ||
690 | + label="确认原因 :" | ||
691 | + rules={[ | ||
692 | + { | ||
693 | + required: true, | ||
694 | + message: '请输入确认原因!', | ||
695 | + }, | ||
696 | + ]} | ||
697 | + // placeholder="若驳回,请填写驳回理由" | ||
698 | + /> | ||
699 | + | ||
700 | + {checkType(CHECK_TYPE.FINALCIAL) ? ( | ||
701 | + <> | ||
702 | + <ProFormText | ||
703 | + width="md" | ||
704 | + name="bankStatementSerialNumbersText" | ||
705 | + label="流水号" | ||
706 | + rules={[ | ||
707 | + { | ||
708 | + required: true, | ||
709 | + message: '请输入流水号!', | ||
710 | + }, | ||
711 | + ]} | ||
712 | + placeholder={'多个流水号用逗号隔开'} | ||
713 | + /> | ||
714 | + <div className="pb-4 text-xs decoration-gray-50"> | ||
715 | + 可复制照片粘贴 | ||
716 | + </div> | ||
717 | + <Upload {...props}> | ||
718 | + {fileList.length < COMFIR_RECEIPT_IMAGES_NUMBER | ||
719 | + ? uploadButton | ||
720 | + : ''} | ||
721 | + </Upload> | ||
722 | + </> | ||
723 | + ) : ( | ||
724 | + '' | ||
725 | + )} | ||
726 | + {checkType(CHECK_TYPE.CONFIRM_REISSUE) && ( | ||
727 | + <> | ||
728 | + <InvoiceSubOrderInfoTable | ||
729 | + subOrderIds={subOrderIds} | ||
730 | + ></InvoiceSubOrderInfoTable> | ||
731 | + </> | ||
732 | + )} | ||
733 | + {checkType(CHECK_TYPE.URGENT_INVOICE_AUDITING) ? ( | ||
734 | + <> | ||
735 | + <ProList | ||
736 | + rowKey="id" | ||
737 | + headerTitle="发票信息" | ||
738 | + metas={{ | ||
739 | + title: { | ||
740 | + dataIndex: 'name', | ||
741 | + }, | ||
742 | + avatar: { | ||
743 | + dataIndex: 'image', | ||
744 | + editable: false, | ||
745 | + }, | ||
746 | + description: { | ||
747 | + dataIndex: 'desc', | ||
748 | + }, | ||
749 | + subTitle: { | ||
750 | + render: () => { | ||
751 | + return ( | ||
752 | + <Space size={0}> | ||
753 | + <Tag color="blue">Ant Design</Tag> | ||
754 | + <Tag color="#5BD8A6">TechUI</Tag> | ||
755 | + </Space> | ||
756 | + ); | ||
757 | + }, | ||
758 | + }, | ||
759 | + actions: { | ||
760 | + render: (text, row, index, action) => [ | ||
761 | + <a | ||
762 | + onClick={() => { | ||
763 | + action?.startEditable(row.id); | ||
764 | + }} | ||
765 | + key="link" | ||
766 | + > | ||
767 | + 编辑 | ||
768 | + </a>, | ||
769 | + ], | ||
770 | + }, | ||
771 | + }} | ||
772 | + ></ProList> | ||
773 | + </> | ||
774 | + ) : ( | ||
775 | + '' | ||
776 | + )} | ||
777 | + | ||
778 | + <Form.Item> | ||
779 | + <Button type="primary" htmlType="submit"> | ||
780 | + 确认 | ||
781 | + </Button> | ||
782 | + </Form.Item> | ||
783 | + </ModalForm> | ||
784 | + | ||
785 | + <Modal | ||
786 | + open={previewOpen} | ||
787 | + title={previewTitle} | ||
788 | + footer={null} | ||
789 | + onCancel={handleCancel} | ||
790 | + > | ||
791 | + <img alt="图片预览" style={{ width: '100%' }} src={previewImage} /> | ||
792 | + </Modal> | ||
793 | + {contextHolder} | ||
794 | + </> | ||
795 | + ); | ||
796 | +}; |
src/pages/Order/Order/components/ProcureCheckModal.tsx
@@ -2,6 +2,7 @@ import { RESPONSE_CODE } from '@/constants/enum'; | @@ -2,6 +2,7 @@ import { RESPONSE_CODE } from '@/constants/enum'; | ||
2 | import { | 2 | import { |
3 | postServiceOrderProcureCheckOrder, | 3 | postServiceOrderProcureCheckOrder, |
4 | postServiceOrderProcureConvertWarehouseKeeper, | 4 | postServiceOrderProcureConvertWarehouseKeeper, |
5 | + postServiceOrderPurchaseRejectionToSale, | ||
5 | postServiceOrderQuerySupplier, | 6 | postServiceOrderQuerySupplier, |
6 | } from '@/services'; | 7 | } from '@/services'; |
7 | import { | 8 | import { |
@@ -13,7 +14,7 @@ import { Button, Form, Input, Popconfirm, message } from 'antd'; | @@ -13,7 +14,7 @@ import { Button, Form, Input, Popconfirm, message } from 'antd'; | ||
13 | import { useState } from 'react'; | 14 | import { useState } from 'react'; |
14 | export default ({ setCheckVisible, isMainOrder, orders, onClose }) => { | 15 | export default ({ setCheckVisible, isMainOrder, orders, onClose }) => { |
15 | const [form] = Form.useForm<{ supplier: string }>(); | 16 | const [form] = Form.useForm<{ supplier: string }>(); |
16 | - const [checkNotes, setCheckNotes] = useState<string>(''); | 17 | + const [procureNotes, setProcureNotes] = useState<string>(''); |
17 | 18 | ||
18 | console.log(isMainOrder); | 19 | console.log(isMainOrder); |
19 | 20 | ||
@@ -50,7 +51,38 @@ export default ({ setCheckVisible, isMainOrder, orders, onClose }) => { | @@ -50,7 +51,38 @@ export default ({ setCheckVisible, isMainOrder, orders, onClose }) => { | ||
50 | return [ | 51 | return [ |
51 | defaultDoms[0], | 52 | defaultDoms[0], |
52 | <> | 53 | <> |
53 | - <Button>驳回至销售</Button> | 54 | + <Popconfirm |
55 | + title="是否驳回至销售" | ||
56 | + description={ | ||
57 | + <div> | ||
58 | + <Input.TextArea | ||
59 | + placeholder="请填写备注" | ||
60 | + onChange={(e: any) => { | ||
61 | + setProcureNotes(e.target.value); | ||
62 | + }} | ||
63 | + rows={4} | ||
64 | + ></Input.TextArea> | ||
65 | + </div> | ||
66 | + } | ||
67 | + onConfirm={async () => { | ||
68 | + let res = await postServiceOrderPurchaseRejectionToSale({ | ||
69 | + data: { | ||
70 | + subIds: ids, | ||
71 | + procureNotes: procureNotes, | ||
72 | + }, | ||
73 | + }); | ||
74 | + | ||
75 | + if (res?.result === RESPONSE_CODE.SUCCESS) { | ||
76 | + message.success(res.message); | ||
77 | + onClose(); | ||
78 | + return true; | ||
79 | + } | ||
80 | + }} | ||
81 | + okText="确定" | ||
82 | + cancelText="取消" | ||
83 | + > | ||
84 | + <Button type="primary">驳回至销售</Button> | ||
85 | + </Popconfirm> | ||
54 | <Popconfirm | 86 | <Popconfirm |
55 | title="是否转回仓库" | 87 | title="是否转回仓库" |
56 | description={ | 88 | description={ |
@@ -61,7 +93,7 @@ export default ({ setCheckVisible, isMainOrder, orders, onClose }) => { | @@ -61,7 +93,7 @@ export default ({ setCheckVisible, isMainOrder, orders, onClose }) => { | ||
61 | <Input.TextArea | 93 | <Input.TextArea |
62 | placeholder="请填写备注" | 94 | placeholder="请填写备注" |
63 | onChange={(e: any) => { | 95 | onChange={(e: any) => { |
64 | - setCheckNotes(e.target.value); | 96 | + setProcureNotes(e.target.value); |
65 | }} | 97 | }} |
66 | rows={4} | 98 | rows={4} |
67 | ></Input.TextArea> | 99 | ></Input.TextArea> |
@@ -72,7 +104,7 @@ export default ({ setCheckVisible, isMainOrder, orders, onClose }) => { | @@ -72,7 +104,7 @@ export default ({ setCheckVisible, isMainOrder, orders, onClose }) => { | ||
72 | { | 104 | { |
73 | data: { | 105 | data: { |
74 | subIds: ids, | 106 | subIds: ids, |
75 | - checkNotes: checkNotes, | 107 | + procureNotes: procureNotes, |
76 | }, | 108 | }, |
77 | }, | 109 | }, |
78 | ); | 110 | ); |
src/pages/Order/Order/index copy.tsx
@@ -2003,7 +2003,7 @@ const OrderPage = () => { | @@ -2003,7 +2003,7 @@ const OrderPage = () => { | ||
2003 | onClick={() => { | 2003 | onClick={() => { |
2004 | createOptObject(optRecord.id, record.id); | 2004 | createOptObject(optRecord.id, record.id); |
2005 | setOrderDrawerVisible(true); | 2005 | setOrderDrawerVisible(true); |
2006 | - setOrderOptType('after_sales'); | 2006 | + setOrderOptType('after-sales'); |
2007 | }} | 2007 | }} |
2008 | > | 2008 | > |
2009 | 申请售后 | 2009 | 申请售后 |
@@ -3835,7 +3835,9 @@ const OrderPage = () => { | @@ -3835,7 +3835,9 @@ const OrderPage = () => { | ||
3835 | selectedSubOrders[i].orderStatus !== | 3835 | selectedSubOrders[i].orderStatus !== |
3836 | 'CONFIRM_RECEIPT' && | 3836 | 'CONFIRM_RECEIPT' && |
3837 | selectedSubOrders[i].orderStatus !== | 3837 | selectedSubOrders[i].orderStatus !== |
3838 | - 'AFTER_SALES_FAILURE' | 3838 | + 'AFTER_SALES_FAILURE' && |
3839 | + selectedSubOrders[i].orderStatus !== | ||
3840 | + 'AFTER_SALES_COMPLETION' | ||
3839 | ) { | 3841 | ) { |
3840 | message.error('请选择确认收货状态的子订单进行售后'); | 3842 | message.error('请选择确认收货状态的子订单进行售后'); |
3841 | return; | 3843 | return; |
src/pages/Order/OrderList/OrderList.tsx
@@ -9,7 +9,6 @@ import { | @@ -9,7 +9,6 @@ import { | ||
9 | postKingdeeRepSalOrderSave, | 9 | postKingdeeRepSalOrderSave, |
10 | postServiceConstCanApplyAfterInvoicingStatus, | 10 | postServiceConstCanApplyAfterInvoicingStatus, |
11 | postServiceInvoiceCancelApply, | 11 | postServiceInvoiceCancelApply, |
12 | - postServiceOrderAfterSalesCheck, | ||
13 | postServiceOrderCancelSend, | 12 | postServiceOrderCancelSend, |
14 | postServiceOrderConfirmInvoice, | 13 | postServiceOrderConfirmInvoice, |
15 | postServiceOrderGetCurrentOptNode, | 14 | postServiceOrderGetCurrentOptNode, |
@@ -81,6 +80,7 @@ import Base64 from 'base-64'; | @@ -81,6 +80,7 @@ import Base64 from 'base-64'; | ||
81 | import { cloneDeep } from 'lodash'; | 80 | import { cloneDeep } from 'lodash'; |
82 | import React, { Key, useEffect, useMemo, useRef, useState } from 'react'; | 81 | import React, { Key, useEffect, useMemo, useRef, useState } from 'react'; |
83 | import OrderPrintModal from '../../OrderPrint/OrderPrintModal'; | 82 | import OrderPrintModal from '../../OrderPrint/OrderPrintModal'; |
83 | +import StoreCheckModal from '../FeedBack/StoreCheckModal'; | ||
84 | import { | 84 | import { |
85 | AFTER_INVOICING_STATUS, | 85 | AFTER_INVOICING_STATUS, |
86 | CHECK_TYPE, | 86 | CHECK_TYPE, |
@@ -156,6 +156,8 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -156,6 +156,8 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
156 | useState<boolean>(false); | 156 | useState<boolean>(false); |
157 | const [afterSalesDrawerVisible, setAfterSalesDrawerVisible] = | 157 | const [afterSalesDrawerVisible, setAfterSalesDrawerVisible] = |
158 | useState<boolean>(false); | 158 | useState<boolean>(false); |
159 | + const [storeCheckModalVisible, setStoreCheckModalVisible] = | ||
160 | + useState<boolean>(false); | ||
159 | const [historyModalVisible, setHistoryModalVisible] = | 161 | const [historyModalVisible, setHistoryModalVisible] = |
160 | useState<boolean>(false); | 162 | useState<boolean>(false); |
161 | const [isRePrintOrder, setIsRePrintOrder] = useState<boolean>(false); | 163 | const [isRePrintOrder, setIsRePrintOrder] = useState<boolean>(false); |
@@ -563,15 +565,15 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -563,15 +565,15 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
563 | } | 565 | } |
564 | }; | 566 | }; |
565 | 567 | ||
566 | - async function doAfterSalesCheck(body: object) { | ||
567 | - const data = await postServiceOrderAfterSalesCheck({ | ||
568 | - data: body, | ||
569 | - }); | ||
570 | - console.log(data); | ||
571 | - if (data.data) { | ||
572 | - refreshTable(); | ||
573 | - } | ||
574 | - } | 568 | + // async function doAfterSalesCheck(body: object) { |
569 | + // const data = await postServiceOrderAfterSalesCheck({ | ||
570 | + // data: body, | ||
571 | + // }); | ||
572 | + // console.log(data); | ||
573 | + // if (data.data) { | ||
574 | + // refreshTable(); | ||
575 | + // } | ||
576 | + // } | ||
575 | 577 | ||
576 | const onCheckboxChange = (record: never) => { | 578 | const onCheckboxChange = (record: never) => { |
577 | let newSelectedMainOrderKeys = []; | 579 | let newSelectedMainOrderKeys = []; |
@@ -1238,6 +1240,16 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1238,6 +1240,16 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1238 | ) : ( | 1240 | ) : ( |
1239 | '' | 1241 | '' |
1240 | )} | 1242 | )} |
1243 | + {/* 后置审核状态 */} | ||
1244 | + {optRecord.orderStatus === 'PROCURE_REJECT' ? ( | ||
1245 | + <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | ||
1246 | + <Tag color={'red'} style={{ marginRight: '4px' }}> | ||
1247 | + {'采购驳回'} | ||
1248 | + </Tag> | ||
1249 | + </div> | ||
1250 | + ) : ( | ||
1251 | + '' | ||
1252 | + )} | ||
1241 | 1253 | ||
1242 | {/**采购是否已下单状态 */} | 1254 | {/**采购是否已下单状态 */} |
1243 | {optRecord.procureOrderStatus !== null && | 1255 | {optRecord.procureOrderStatus !== null && |
@@ -1924,24 +1936,18 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1924,24 +1936,18 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1924 | )} | 1936 | )} |
1925 | 1937 | ||
1926 | {optRecord.paths?.includes('afterSalesConfirm') ? ( | 1938 | {optRecord.paths?.includes('afterSalesConfirm') ? ( |
1927 | - <ButtonConfirm | 1939 | + <Button |
1928 | className="p-0" | 1940 | className="p-0" |
1929 | - title="确认通过?" | ||
1930 | - text="仓库确认" | ||
1931 | - onConfirm={() => { | ||
1932 | - setIsMainOrder(false); | ||
1933 | - doAfterSalesCheck({ | ||
1934 | - applyType: 'after-sales', | ||
1935 | - isAfterSalesSuccess: true, | ||
1936 | - subOrderIds: isMainOrder | ||
1937 | - ? [...record.subOrderInformationLists] | ||
1938 | - .flat() | ||
1939 | - ?.map((subOrder) => subOrder.id) | ||
1940 | - : [optRecord.id], | ||
1941 | - mainId: record.id, | ||
1942 | - }); | 1941 | + type="link" |
1942 | + onClick={() => { | ||
1943 | + setCurrentMainId(record.id); | ||
1944 | + createOptObject(optRecord.id, record.id); | ||
1945 | + setStoreCheckModalVisible(true); | ||
1946 | + setOrderCheckType(CHECK_TYPE.AFTER_SALES); | ||
1943 | }} | 1947 | }} |
1944 | - /> | 1948 | + > |
1949 | + 仓库确认 | ||
1950 | + </Button> | ||
1945 | ) : ( | 1951 | ) : ( |
1946 | '' | 1952 | '' |
1947 | )} | 1953 | )} |
@@ -2032,7 +2038,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -2032,7 +2038,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
2032 | onClick={() => { | 2038 | onClick={() => { |
2033 | createOptObject(optRecord.id, record.id); | 2039 | createOptObject(optRecord.id, record.id); |
2034 | setOrderDrawerVisible(true); | 2040 | setOrderDrawerVisible(true); |
2035 | - setOrderOptType('after_sales'); | 2041 | + setOrderOptType('after-sales'); |
2036 | }} | 2042 | }} |
2037 | > | 2043 | > |
2038 | 申请售后 | 2044 | 申请售后 |
@@ -3682,22 +3688,18 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -3682,22 +3688,18 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
3682 | )} | 3688 | )} |
3683 | 3689 | ||
3684 | {record.paths?.includes('afterSalesConfirm') ? ( | 3690 | {record.paths?.includes('afterSalesConfirm') ? ( |
3685 | - <ButtonConfirm | 3691 | + <Button |
3686 | className="p-0" | 3692 | className="p-0" |
3687 | - title="确认通过?" | ||
3688 | - text="仓库确认" | ||
3689 | - onConfirm={() => { | ||
3690 | - setIsMainOrder(true); | ||
3691 | - doAfterSalesCheck({ | ||
3692 | - applyType: 'after-sales', | ||
3693 | - isAfterSalesSuccess: true, | ||
3694 | - subOrderIds: [...record.subOrderInformationLists] | ||
3695 | - .flat() | ||
3696 | - ?.map((subOrder) => subOrder.id), | ||
3697 | - mainId: record.id, | ||
3698 | - }); | 3693 | + type="link" |
3694 | + onClick={() => { | ||
3695 | + setCurrentMainId(record.id); | ||
3696 | + createOptObject(null, record.id); | ||
3697 | + setStoreCheckModalVisible(true); | ||
3698 | + setOrderCheckType(CHECK_TYPE.AFTER_SALES); | ||
3699 | }} | 3699 | }} |
3700 | - /> | 3700 | + > |
3701 | + 仓库确认 | ||
3702 | + </Button> | ||
3701 | ) : ( | 3703 | ) : ( |
3702 | '' | 3704 | '' |
3703 | )} | 3705 | )} |
@@ -3885,7 +3887,9 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -3885,7 +3887,9 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
3885 | selectedSubOrders[i].orderStatus !== | 3887 | selectedSubOrders[i].orderStatus !== |
3886 | 'CONFIRM_RECEIPT' && | 3888 | 'CONFIRM_RECEIPT' && |
3887 | selectedSubOrders[i].orderStatus !== | 3889 | selectedSubOrders[i].orderStatus !== |
3888 | - 'AFTER_SALES_FAILURE' | 3890 | + 'AFTER_SALES_FAILURE' && |
3891 | + selectedSubOrders[i].orderStatus !== | ||
3892 | + 'AFTER_SALES_COMPLETION' | ||
3889 | ) { | 3893 | ) { |
3890 | message.error('请选择确认收货状态的子订单进行售后'); | 3894 | message.error('请选择确认收货状态的子订单进行售后'); |
3891 | return; | 3895 | return; |
@@ -4836,6 +4840,34 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -4836,6 +4840,34 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
4836 | /> | 4840 | /> |
4837 | )} | 4841 | )} |
4838 | 4842 | ||
4843 | + {storeCheckModalVisible && ( | ||
4844 | + <StoreCheckModal | ||
4845 | + setCheckVisible={(val: boolean) => { | ||
4846 | + setStoreCheckModalVisible(val); | ||
4847 | + if (!val) { | ||
4848 | + clearOptObject(); | ||
4849 | + } | ||
4850 | + }} | ||
4851 | + data={isMainOrder ? getFirstMainOrder() : buildMainOrder()} | ||
4852 | + subOrders={ | ||
4853 | + isMainOrder | ||
4854 | + ? [...subOrderSelectedMap.values()].flat() | ||
4855 | + : buildSubOrders() | ||
4856 | + } | ||
4857 | + orderCheckType={orderCheckType} | ||
4858 | + openOrderDrawer={(type: any, id: any) => { | ||
4859 | + setCurrentMainId(id); | ||
4860 | + setOrderOptType(type); | ||
4861 | + setOrderDrawerVisible(true); | ||
4862 | + }} | ||
4863 | + onClose={() => { | ||
4864 | + clearOptObject(); | ||
4865 | + setStoreCheckModalVisible(false); | ||
4866 | + refreshTable(); | ||
4867 | + }} | ||
4868 | + /> | ||
4869 | + )} | ||
4870 | + | ||
4839 | {applyForInvoicingVisible && ( | 4871 | {applyForInvoicingVisible && ( |
4840 | <ApplyForInvoicingModal | 4872 | <ApplyForInvoicingModal |
4841 | setCheckVisible={(val: boolean) => { | 4873 | setCheckVisible={(val: boolean) => { |
src/pages/Order/OrderList/ProcureCheckModal.tsx
@@ -14,7 +14,7 @@ import { Button, Form, Input, Popconfirm, message } from 'antd'; | @@ -14,7 +14,7 @@ import { Button, Form, Input, Popconfirm, message } from 'antd'; | ||
14 | import { useState } from 'react'; | 14 | import { useState } from 'react'; |
15 | export default ({ setCheckVisible, isMainOrder, orders, onClose }) => { | 15 | export default ({ setCheckVisible, isMainOrder, orders, onClose }) => { |
16 | const [form] = Form.useForm<{ supplier: string }>(); | 16 | const [form] = Form.useForm<{ supplier: string }>(); |
17 | - const [checkNotes, setCheckNotes] = useState<string>(''); | 17 | + const [procureNotes, setProcureNotes] = useState<string>(''); |
18 | 18 | ||
19 | console.log(isMainOrder); | 19 | console.log(isMainOrder); |
20 | 20 | ||
@@ -51,13 +51,24 @@ export default ({ setCheckVisible, isMainOrder, orders, onClose }) => { | @@ -51,13 +51,24 @@ export default ({ setCheckVisible, isMainOrder, orders, onClose }) => { | ||
51 | return [ | 51 | return [ |
52 | defaultDoms[0], | 52 | defaultDoms[0], |
53 | <> | 53 | <> |
54 | - <Button | ||
55 | - type="primary" | ||
56 | - onClick={async () => { | 54 | + <Popconfirm |
55 | + title="是否驳回至销售" | ||
56 | + description={ | ||
57 | + <div> | ||
58 | + <Input.TextArea | ||
59 | + placeholder="请填写备注" | ||
60 | + onChange={(e: any) => { | ||
61 | + setProcureNotes(e.target.value); | ||
62 | + }} | ||
63 | + rows={4} | ||
64 | + ></Input.TextArea> | ||
65 | + </div> | ||
66 | + } | ||
67 | + onConfirm={async () => { | ||
57 | let res = await postServiceOrderPurchaseRejectionToSale({ | 68 | let res = await postServiceOrderPurchaseRejectionToSale({ |
58 | data: { | 69 | data: { |
59 | subIds: ids, | 70 | subIds: ids, |
60 | - checkNotes: checkNotes, | 71 | + procureNotes: procureNotes, |
61 | }, | 72 | }, |
62 | }); | 73 | }); |
63 | 74 | ||
@@ -67,9 +78,11 @@ export default ({ setCheckVisible, isMainOrder, orders, onClose }) => { | @@ -67,9 +78,11 @@ export default ({ setCheckVisible, isMainOrder, orders, onClose }) => { | ||
67 | return true; | 78 | return true; |
68 | } | 79 | } |
69 | }} | 80 | }} |
81 | + okText="确定" | ||
82 | + cancelText="取消" | ||
70 | > | 83 | > |
71 | - 驳回至销售 | ||
72 | - </Button> | 84 | + <Button type="primary">驳回至销售</Button> |
85 | + </Popconfirm> | ||
73 | <Popconfirm | 86 | <Popconfirm |
74 | title="是否转回仓库" | 87 | title="是否转回仓库" |
75 | description={ | 88 | description={ |
@@ -80,7 +93,7 @@ export default ({ setCheckVisible, isMainOrder, orders, onClose }) => { | @@ -80,7 +93,7 @@ export default ({ setCheckVisible, isMainOrder, orders, onClose }) => { | ||
80 | <Input.TextArea | 93 | <Input.TextArea |
81 | placeholder="请填写备注" | 94 | placeholder="请填写备注" |
82 | onChange={(e: any) => { | 95 | onChange={(e: any) => { |
83 | - setCheckNotes(e.target.value); | 96 | + setProcureNotes(e.target.value); |
84 | }} | 97 | }} |
85 | rows={4} | 98 | rows={4} |
86 | ></Input.TextArea> | 99 | ></Input.TextArea> |
@@ -91,7 +104,7 @@ export default ({ setCheckVisible, isMainOrder, orders, onClose }) => { | @@ -91,7 +104,7 @@ export default ({ setCheckVisible, isMainOrder, orders, onClose }) => { | ||
91 | { | 104 | { |
92 | data: { | 105 | data: { |
93 | subIds: ids, | 106 | subIds: ids, |
94 | - checkNotes: checkNotes, | 107 | + procureNotes: procureNotes, |
95 | }, | 108 | }, |
96 | }, | 109 | }, |
97 | ); | 110 | ); |
src/pages/Order/OrderWarning/index copy.tsx
@@ -1939,7 +1939,7 @@ const OrderPage = () => { | @@ -1939,7 +1939,7 @@ const OrderPage = () => { | ||
1939 | onClick={() => { | 1939 | onClick={() => { |
1940 | createOptObject(optRecord.id, record.id); | 1940 | createOptObject(optRecord.id, record.id); |
1941 | setOrderDrawerVisible(true); | 1941 | setOrderDrawerVisible(true); |
1942 | - setOrderOptType('after_sales'); | 1942 | + setOrderOptType('after-sales'); |
1943 | }} | 1943 | }} |
1944 | > | 1944 | > |
1945 | 申请售后 | 1945 | 申请售后 |
@@ -3793,7 +3793,9 @@ const OrderPage = () => { | @@ -3793,7 +3793,9 @@ const OrderPage = () => { | ||
3793 | selectedSubOrders[i].orderStatus !== | 3793 | selectedSubOrders[i].orderStatus !== |
3794 | 'CONFIRM_RECEIPT' && | 3794 | 'CONFIRM_RECEIPT' && |
3795 | selectedSubOrders[i].orderStatus !== | 3795 | selectedSubOrders[i].orderStatus !== |
3796 | - 'AFTER_SALES_FAILURE' | 3796 | + 'AFTER_SALES_FAILURE' && |
3797 | + selectedSubOrders[i].orderStatus !== | ||
3798 | + 'AFTER_SALES_COMPLETION' | ||
3797 | ) { | 3799 | ) { |
3798 | message.error('请选择确认收货状态的子订单进行售后'); | 3800 | message.error('请选择确认收货状态的子订单进行售后'); |
3799 | return; | 3801 | return; |
src/services/request.ts
@@ -18868,6 +18868,77 @@ export const postServiceOrderAfterSalesQuerySnapshotOrder = | @@ -18868,6 +18868,77 @@ export const postServiceOrderAfterSalesQuerySnapshotOrder = | ||
18868 | return request; | 18868 | return request; |
18869 | })(); | 18869 | })(); |
18870 | 18870 | ||
18871 | +/** @description request parameter type for postServiceOrderAfterSalesStoreSure */ | ||
18872 | +export interface PostServiceOrderAfterSalesStoreSureOption { | ||
18873 | + /** | ||
18874 | + * @description | ||
18875 | + * dto | ||
18876 | + */ | ||
18877 | + body: { | ||
18878 | + /** | ||
18879 | + @description | ||
18880 | + dto */ | ||
18881 | + dto: Dto; | ||
18882 | + }; | ||
18883 | +} | ||
18884 | + | ||
18885 | +/** @description response type for postServiceOrderAfterSalesStoreSure */ | ||
18886 | +export interface PostServiceOrderAfterSalesStoreSureResponse { | ||
18887 | + /** | ||
18888 | + * @description | ||
18889 | + * OK | ||
18890 | + */ | ||
18891 | + 200: ServerResult; | ||
18892 | + /** | ||
18893 | + * @description | ||
18894 | + * Created | ||
18895 | + */ | ||
18896 | + 201: any; | ||
18897 | + /** | ||
18898 | + * @description | ||
18899 | + * Unauthorized | ||
18900 | + */ | ||
18901 | + 401: any; | ||
18902 | + /** | ||
18903 | + * @description | ||
18904 | + * Forbidden | ||
18905 | + */ | ||
18906 | + 403: any; | ||
18907 | + /** | ||
18908 | + * @description | ||
18909 | + * Not Found | ||
18910 | + */ | ||
18911 | + 404: any; | ||
18912 | +} | ||
18913 | + | ||
18914 | +export type PostServiceOrderAfterSalesStoreSureResponseSuccess = | ||
18915 | + PostServiceOrderAfterSalesStoreSureResponse[200]; | ||
18916 | +/** | ||
18917 | + * @description | ||
18918 | + * 仓库确认售后订单 | ||
18919 | + * @tags 内部订单 | ||
18920 | + * @produces * | ||
18921 | + * @consumes application/json | ||
18922 | + */ | ||
18923 | +export const postServiceOrderAfterSalesStoreSure = /* #__PURE__ */ (() => { | ||
18924 | + const method = 'post'; | ||
18925 | + const url = '/service/order/afterSalesStoreSure'; | ||
18926 | + function request( | ||
18927 | + option: PostServiceOrderAfterSalesStoreSureOption, | ||
18928 | + ): Promise<PostServiceOrderAfterSalesStoreSureResponseSuccess> { | ||
18929 | + return requester(request.url, { | ||
18930 | + method: request.method, | ||
18931 | + ...option, | ||
18932 | + }) as unknown as Promise<PostServiceOrderAfterSalesStoreSureResponseSuccess>; | ||
18933 | + } | ||
18934 | + | ||
18935 | + /** http method */ | ||
18936 | + request.method = method; | ||
18937 | + /** request url */ | ||
18938 | + request.url = url; | ||
18939 | + return request; | ||
18940 | +})(); | ||
18941 | + | ||
18871 | /** @description request parameter type for postServiceOrderApplyAfterSales */ | 18942 | /** @description request parameter type for postServiceOrderApplyAfterSales */ |
18872 | export interface PostServiceOrderApplyAfterSalesOption { | 18943 | export interface PostServiceOrderApplyAfterSalesOption { |
18873 | /** | 18944 | /** |