Commit 2ec279c1530935b5bda2612210cc9c37e339dd1f
Merge branch 'feature-installment' into 'dev'
Feature installment See merge request !45
Showing
7 changed files
with
822 additions
and
105 deletions
src/pages/Order/OrderList/CheckModal.tsx
@@ -70,6 +70,8 @@ export default ({ | @@ -70,6 +70,8 @@ export default ({ | ||
70 | 70 | ||
71 | const [afterSalesInfo, setAfterSalesInfo] = useState<any>(); | 71 | const [afterSalesInfo, setAfterSalesInfo] = useState<any>(); |
72 | const [prepaidProofImages, setPrepaidProofImages] = useState<any[]>([]); | 72 | const [prepaidProofImages, setPrepaidProofImages] = useState<any[]>([]); |
73 | + const [partialPaymentReceiptsImages, setPartialPaymentReceiptsImages] = | ||
74 | + useState<any[]>([]); | ||
73 | /** | 75 | /** |
74 | * 审核类型 | 76 | * 审核类型 |
75 | */ | 77 | */ |
@@ -129,6 +131,7 @@ export default ({ | @@ -129,6 +131,7 @@ export default ({ | ||
129 | } | 131 | } |
130 | getOrderAfterSalesInfo(); | 132 | getOrderAfterSalesInfo(); |
131 | 133 | ||
134 | + // 常规回款凭证 | ||
132 | let paymentReceiptsImagesList: any[] = []; | 135 | let paymentReceiptsImagesList: any[] = []; |
133 | subOrders?.forEach((item: any) => { | 136 | subOrders?.forEach((item: any) => { |
134 | if (item.paymentReceiptAnnexList) { | 137 | if (item.paymentReceiptAnnexList) { |
@@ -139,6 +142,22 @@ export default ({ | @@ -139,6 +142,22 @@ export default ({ | ||
139 | paymentReceiptsImagesList = [...new Set(paymentReceiptsImagesList)]; | 142 | paymentReceiptsImagesList = [...new Set(paymentReceiptsImagesList)]; |
140 | setPymentReceiptsImages(paymentReceiptsImagesList); | 143 | setPymentReceiptsImages(paymentReceiptsImagesList); |
141 | 144 | ||
145 | + // 分期付款凭证从 subOrderInformationLists 获取 | ||
146 | + let partialPaymentImages: any[] = []; | ||
147 | + if ( | ||
148 | + checkType(CHECK_TYPE.PARTIAL_PAYMENT_RECEIPTS_AUDIT) && | ||
149 | + data?.subOrderInformationLists | ||
150 | + ) { | ||
151 | + data.subOrderInformationLists.forEach((subOrder: any) => { | ||
152 | + if (subOrder.paymentReceiptAnnexPartialList) { | ||
153 | + partialPaymentImages.push(...subOrder.paymentReceiptAnnexPartialList); | ||
154 | + } | ||
155 | + }); | ||
156 | + } | ||
157 | + // 去重 | ||
158 | + partialPaymentImages = [...new Set(partialPaymentImages)]; | ||
159 | + setPartialPaymentReceiptsImages(partialPaymentImages); | ||
160 | + | ||
142 | //预存审核的凭证 | 161 | //预存审核的凭证 |
143 | let proofImages: any[] = []; | 162 | let proofImages: any[] = []; |
144 | subOrders?.forEach((item) => { | 163 | subOrders?.forEach((item) => { |
@@ -403,7 +422,10 @@ export default ({ | @@ -403,7 +422,10 @@ export default ({ | ||
403 | if (checkType(CHECK_TYPE.URGENT_INVOICE_AUDITING)) { | 422 | if (checkType(CHECK_TYPE.URGENT_INVOICE_AUDITING)) { |
404 | type = 'urgent_invoice_audit'; | 423 | type = 'urgent_invoice_audit'; |
405 | } | 424 | } |
406 | - if (checkType(CHECK_TYPE.PAYMENT_RECEIPTS_AUDIT)) { | 425 | + if ( |
426 | + checkType(CHECK_TYPE.PAYMENT_RECEIPTS_AUDIT) || | ||
427 | + checkType(CHECK_TYPE.PARTIAL_PAYMENT_RECEIPTS_AUDIT) | ||
428 | + ) { | ||
407 | type = 'payment_receipt_audit'; | 429 | type = 'payment_receipt_audit'; |
408 | } | 430 | } |
409 | if (checkType(CHECK_TYPE.CONFIRM_REISSUE)) { | 431 | if (checkType(CHECK_TYPE.CONFIRM_REISSUE)) { |
@@ -585,6 +607,18 @@ export default ({ | @@ -585,6 +607,18 @@ export default ({ | ||
585 | }); | 607 | }); |
586 | } | 608 | } |
587 | 609 | ||
610 | + // 分期回款审核处理 | ||
611 | + if (checkType(CHECK_TYPE.PARTIAL_PAYMENT_RECEIPTS_AUDIT)) { | ||
612 | + let type = computeType(); | ||
613 | + return doCheck({ | ||
614 | + ...values, | ||
615 | + pass: true, | ||
616 | + subOrderIds: subOrderIds, | ||
617 | + type: type, | ||
618 | + notes: form.getFieldValue('name'), | ||
619 | + }); | ||
620 | + } | ||
621 | + | ||
588 | let type = ''; | 622 | let type = ''; |
589 | type = computeType(); | 623 | type = computeType(); |
590 | doCheck({ | 624 | doCheck({ |
@@ -621,7 +655,6 @@ export default ({ | @@ -621,7 +655,6 @@ export default ({ | ||
621 | <span className="text-sm">回款凭证</span> | 655 | <span className="text-sm">回款凭证</span> |
622 | </Divider> | 656 | </Divider> |
623 | <Image.PreviewGroup | 657 | <Image.PreviewGroup |
624 | - className="mr-10" | ||
625 | preview={{ | 658 | preview={{ |
626 | onChange: (current, prev) => | 659 | onChange: (current, prev) => |
627 | console.log(`current index: ${current}, prev index: ${prev}`), | 660 | console.log(`current index: ${current}, prev index: ${prev}`), |
@@ -639,13 +672,60 @@ export default ({ | @@ -639,13 +672,60 @@ export default ({ | ||
639 | '' | 672 | '' |
640 | )} | 673 | )} |
641 | 674 | ||
675 | + {checkType(CHECK_TYPE.PARTIAL_PAYMENT_RECEIPTS_AUDIT) ? ( | ||
676 | + <> | ||
677 | + <Row gutter={[16, 16]}> | ||
678 | + <Col span={24}> | ||
679 | + <div className="mb-2"> | ||
680 | + <span className="font-semibold">回款类型:</span> | ||
681 | + <span>分期付款</span> | ||
682 | + </div> | ||
683 | + </Col> | ||
684 | + <Col span={24}> | ||
685 | + <div className="mb-2"> | ||
686 | + <span className="font-semibold">回款金额:</span> | ||
687 | + <span>{data?.installmentMoney || 0} 元</span> | ||
688 | + </div> | ||
689 | + </Col> | ||
690 | + <Col span={24}> | ||
691 | + <div className="mb-2 font-semibold">附件凭证:</div> | ||
692 | + <div> | ||
693 | + <Image.PreviewGroup | ||
694 | + preview={{ | ||
695 | + onChange: (current, prev) => | ||
696 | + console.log( | ||
697 | + `current index: ${current}, prev index: ${prev}`, | ||
698 | + ), | ||
699 | + }} | ||
700 | + > | ||
701 | + {partialPaymentReceiptsImages.map((url, index) => ( | ||
702 | + <span key={`img-${index}`}> | ||
703 | + <Image width={120} src={url} />{' '} | ||
704 | + <Divider type="vertical" /> | ||
705 | + </span> | ||
706 | + ))} | ||
707 | + </Image.PreviewGroup> | ||
708 | + </div> | ||
709 | + </Col> | ||
710 | + <Col span={24}> | ||
711 | + <div className="mb-2"> | ||
712 | + <span className="font-semibold">备注:</span> | ||
713 | + <span>{data?.installmentComment || '-'}</span> | ||
714 | + </div> | ||
715 | + </Col> | ||
716 | + </Row> | ||
717 | + <Divider></Divider> | ||
718 | + </> | ||
719 | + ) : ( | ||
720 | + '' | ||
721 | + )} | ||
722 | + | ||
642 | {checkType(CHECK_TYPE.PREPAID_AUDIT) && ( | 723 | {checkType(CHECK_TYPE.PREPAID_AUDIT) && ( |
643 | <> | 724 | <> |
644 | <Divider orientation="center"> | 725 | <Divider orientation="center"> |
645 | <span className="text-sm">凭证</span> | 726 | <span className="text-sm">凭证</span> |
646 | </Divider> | 727 | </Divider> |
647 | <Image.PreviewGroup | 728 | <Image.PreviewGroup |
648 | - className="mr-10" | ||
649 | preview={{ | 729 | preview={{ |
650 | onChange: (current, prev) => | 730 | onChange: (current, prev) => |
651 | console.log(`current index: ${current}, prev index: ${prev}`), | 731 | console.log(`current index: ${current}, prev index: ${prev}`), |
src/pages/Order/OrderList/HirePurchaseUploadPayBillModal.tsx
0 → 100644
1 | +import { RESPONSE_CODE } from '@/constants/enum'; | ||
2 | +import { | ||
3 | + postServiceOrderFileProcess, | ||
4 | + postServiceOrderHirePurchase, | ||
5 | +} from '@/services'; | ||
6 | +import { transImageFile } from '@/utils'; | ||
7 | +import { PlusOutlined } from '@ant-design/icons'; | ||
8 | +import { Button, Form, Input, Modal, Radio, Upload, message } from 'antd'; | ||
9 | +import { RcFile } from 'antd/lib/upload'; | ||
10 | +import { UploadFile, UploadProps } from 'antd/lib/upload/interface'; | ||
11 | +import { cloneDeep } from 'lodash'; | ||
12 | +import { useEffect, useRef, useState } from 'react'; | ||
13 | +import { COMFIR_RECEIPT_IMAGES_NUMBER } from '../constant'; | ||
14 | + | ||
15 | +interface HirePurchaseUploadPayBillModalProps { | ||
16 | + visible: boolean; | ||
17 | + onCancel: () => void; | ||
18 | + onOk: () => void; | ||
19 | + orderAmount?: number; | ||
20 | + paidAmount?: number; | ||
21 | + record?: any; | ||
22 | + subOrders?: any[]; | ||
23 | +} | ||
24 | + | ||
25 | +const HirePurchaseUploadPayBillModal: React.FC< | ||
26 | + HirePurchaseUploadPayBillModalProps | ||
27 | +> = ({ | ||
28 | + visible, | ||
29 | + onCancel, | ||
30 | + onOk, | ||
31 | + orderAmount = 100000.0, | ||
32 | + paidAmount = 0, | ||
33 | + record, | ||
34 | + subOrders = [], | ||
35 | +}) => { | ||
36 | + // 订单总金额 | ||
37 | + const totalPayment = record?.totalPayment || orderAmount; | ||
38 | + // 已回款金额 | ||
39 | + const installedMoney = record?.installmentMoneyAudit || paidAmount; | ||
40 | + // 待回款金额 | ||
41 | + const remainingMoney = totalPayment - installedMoney; | ||
42 | + const [form] = Form.useForm(); | ||
43 | + const [fileList, setFileList] = useState<UploadFile[]>([]); | ||
44 | + const [paymentType, setPaymentType] = useState<string>('INSTALLMENT'); | ||
45 | + const [previewOpen, setPreviewOpen] = useState(false); | ||
46 | + const [previewImage, setPreviewImage] = useState(''); | ||
47 | + const [previewTitle, setPreviewTitle] = useState(''); | ||
48 | + | ||
49 | + const fileListObj = useRef<UploadFile[]>([]); | ||
50 | + | ||
51 | + const getBase64 = (file: RcFile): Promise<string> => | ||
52 | + new Promise((resolve, reject) => { | ||
53 | + const reader = new FileReader(); | ||
54 | + reader.readAsDataURL(file); | ||
55 | + reader.onload = () => resolve(reader.result as string); | ||
56 | + reader.onerror = (error) => reject(error); | ||
57 | + }); | ||
58 | + | ||
59 | + const handleCancel = () => setPreviewOpen(false); | ||
60 | + | ||
61 | + const uploadButton = ( | ||
62 | + <div> | ||
63 | + <PlusOutlined /> | ||
64 | + <div style={{ marginTop: 8 }}>上传凭证</div> | ||
65 | + </div> | ||
66 | + ); | ||
67 | + | ||
68 | + const handleTypeChange = (e: any) => { | ||
69 | + const newType = e.target.value; | ||
70 | + setPaymentType(newType); | ||
71 | + | ||
72 | + // 如果选择全部回款,自动填入待回款金额 | ||
73 | + if (newType === 'FULL') { | ||
74 | + form.setFieldsValue({ | ||
75 | + amount: remainingMoney.toFixed(2), | ||
76 | + }); | ||
77 | + } | ||
78 | + }; | ||
79 | + | ||
80 | + // 验证回款金额不能超过待回款金额 | ||
81 | + const validateAmount = (_: any, value: string) => { | ||
82 | + if (!value) return Promise.reject('请输入回款金额'); | ||
83 | + | ||
84 | + const amount = parseFloat(value); | ||
85 | + if (isNaN(amount)) return Promise.reject('请输入有效的数字'); | ||
86 | + if (amount <= 0) return Promise.reject('回款金额必须大于0'); | ||
87 | + if (amount > remainingMoney) | ||
88 | + return Promise.reject( | ||
89 | + `回款金额不能超过待回款金额 ${remainingMoney.toFixed(2)}元`, | ||
90 | + ); | ||
91 | + | ||
92 | + return Promise.resolve(); | ||
93 | + }; | ||
94 | + | ||
95 | + const handleBeforeUpload = (file: any) => { | ||
96 | + setFileList([...fileList, file]); | ||
97 | + return false; | ||
98 | + }; | ||
99 | + | ||
100 | + /** 粘贴快捷键的回调 */ | ||
101 | + const onPaste = async (e: any) => { | ||
102 | + /** 获取剪切板的数据clipboardData */ | ||
103 | + let clipboardData = e.clipboardData, | ||
104 | + i = 0, | ||
105 | + items, | ||
106 | + item, | ||
107 | + types; | ||
108 | + | ||
109 | + /** 为空判断 */ | ||
110 | + if (clipboardData) { | ||
111 | + items = clipboardData.items; | ||
112 | + if (!items) { | ||
113 | + message.info('您的剪贴板中没有照片'); | ||
114 | + return; | ||
115 | + } | ||
116 | + | ||
117 | + item = items[0]; | ||
118 | + types = clipboardData.types || []; | ||
119 | + /** 遍历剪切板的数据 */ | ||
120 | + for (; i < types.length; i++) { | ||
121 | + if (types[i] === 'Files') { | ||
122 | + item = items[i]; | ||
123 | + break; | ||
124 | + } | ||
125 | + } | ||
126 | + | ||
127 | + /** 判断文件是否为图片 */ | ||
128 | + if (item && item.kind === 'file' && item.type.match(/^image\//i)) { | ||
129 | + const imgItem = item.getAsFile(); | ||
130 | + const newFileList = cloneDeep(fileListObj.current); | ||
131 | + let filteredArray = newFileList.filter( | ||
132 | + (obj) => obj.status !== 'removed', | ||
133 | + ); //过滤掉状态为已删除的照片 | ||
134 | + const listItem = { | ||
135 | + ...imgItem, | ||
136 | + status: 'done', | ||
137 | + url: await getBase64(imgItem), | ||
138 | + originFileObj: imgItem, | ||
139 | + }; | ||
140 | + | ||
141 | + if (filteredArray.length >= COMFIR_RECEIPT_IMAGES_NUMBER) { | ||
142 | + message.info('上传凭证数量不能超过3'); | ||
143 | + return; | ||
144 | + } | ||
145 | + fileListObj.current = filteredArray; | ||
146 | + filteredArray.push(listItem); | ||
147 | + setFileList(filteredArray); | ||
148 | + return; | ||
149 | + } | ||
150 | + } | ||
151 | + | ||
152 | + message.info('您的剪贴板中没有照片'); | ||
153 | + }; | ||
154 | + | ||
155 | + const handleChange: UploadProps['onChange'] = ({ fileList: newFileList }) => { | ||
156 | + fileListObj.current = newFileList; | ||
157 | + setFileList(newFileList); | ||
158 | + }; | ||
159 | + | ||
160 | + const handlePreview = async (file: UploadFile) => { | ||
161 | + if (!file.url && !file.preview) { | ||
162 | + file.preview = await getBase64(file.originFileObj as RcFile); | ||
163 | + } | ||
164 | + setPreviewImage(file.url || (file.preview as string)); | ||
165 | + setPreviewOpen(true); | ||
166 | + setPreviewTitle( | ||
167 | + file.name || | ||
168 | + file.originFileObj?.name || | ||
169 | + file.url!.substring(file.url!.lastIndexOf('/') + 1), | ||
170 | + ); | ||
171 | + }; | ||
172 | + | ||
173 | + const props: UploadProps = { | ||
174 | + onRemove: (file) => { | ||
175 | + const index = fileList.indexOf(file); | ||
176 | + const newFileList = fileList.slice(); | ||
177 | + newFileList.splice(index, 1); | ||
178 | + setFileList(newFileList); | ||
179 | + }, | ||
180 | + beforeUpload: handleBeforeUpload, | ||
181 | + listType: 'picture-card', | ||
182 | + onPreview: handlePreview, | ||
183 | + fileList, | ||
184 | + onChange: handleChange, | ||
185 | + accept: 'image/png, image/jpeg, image/png', | ||
186 | + name: 'files', | ||
187 | + headers: { Authorization: localStorage.getItem('token') }, | ||
188 | + }; | ||
189 | + | ||
190 | + useEffect(() => { | ||
191 | + document.addEventListener('paste', onPaste); | ||
192 | + return () => { | ||
193 | + document.removeEventListener('paste', onPaste); | ||
194 | + }; | ||
195 | + }, []); | ||
196 | + | ||
197 | + const handleOk = async () => { | ||
198 | + try { | ||
199 | + const values = await form.validateFields(); | ||
200 | + | ||
201 | + if (fileList.length <= 0) { | ||
202 | + message.error('请上传至少一张凭证'); | ||
203 | + return; | ||
204 | + } | ||
205 | + | ||
206 | + message.open({ | ||
207 | + type: 'loading', | ||
208 | + content: '正在上传凭证...', | ||
209 | + duration: 0, | ||
210 | + }); | ||
211 | + | ||
212 | + // 附件处理 | ||
213 | + let formData = new FormData(); | ||
214 | + for (let file of fileList) { | ||
215 | + if (file.originFileObj) { | ||
216 | + formData.append('files', file.originFileObj as RcFile); | ||
217 | + } else { | ||
218 | + // 有url的话取url(源文件),没url取thumbUrl。有url的时候thumbUrl是略缩图 | ||
219 | + if (file?.url === undefined || file?.url === null) { | ||
220 | + formData.append( | ||
221 | + 'files', | ||
222 | + transImageFile(file?.thumbUrl), | ||
223 | + file?.originFileObj?.name, | ||
224 | + ); | ||
225 | + } else { | ||
226 | + formData.append( | ||
227 | + 'files', | ||
228 | + transImageFile(file?.url), | ||
229 | + file?.originFileObj?.name, | ||
230 | + ); | ||
231 | + } | ||
232 | + } | ||
233 | + } | ||
234 | + | ||
235 | + let res = await postServiceOrderFileProcess({ | ||
236 | + data: formData, | ||
237 | + }); | ||
238 | + | ||
239 | + message.destroy(); | ||
240 | + | ||
241 | + if (res.result === RESPONSE_CODE.SUCCESS) { | ||
242 | + let fileUrls = res?.data?.map((item) => { | ||
243 | + return { url: item }; | ||
244 | + }); | ||
245 | + | ||
246 | + // 分期付款提交 | ||
247 | + const installmentMoney = values.amount; | ||
248 | + const installmentComment = values.remarks; | ||
249 | + | ||
250 | + // 获取子订单IDs | ||
251 | + const subOrderIds = | ||
252 | + subOrders?.map((item: any) => { | ||
253 | + return item.id; | ||
254 | + }) || []; | ||
255 | + | ||
256 | + const data = await postServiceOrderHirePurchase({ | ||
257 | + data: { | ||
258 | + subOrderIds: subOrderIds, | ||
259 | + filePaths: fileUrls, | ||
260 | + installmentMoney: installmentMoney, | ||
261 | + installmentComment: installmentComment, | ||
262 | + }, | ||
263 | + }); | ||
264 | + | ||
265 | + if (data.result === RESPONSE_CODE.SUCCESS) { | ||
266 | + message.success(data.message || '提交成功'); | ||
267 | + onOk(); | ||
268 | + } else { | ||
269 | + message.error(data.message || '提交失败'); | ||
270 | + } | ||
271 | + } else { | ||
272 | + message.error(res.message || '上传失败'); | ||
273 | + } | ||
274 | + } catch (error) { | ||
275 | + console.error('Validate Failed:', error); | ||
276 | + message.error('提交失败'); | ||
277 | + } | ||
278 | + }; | ||
279 | + | ||
280 | + return ( | ||
281 | + <> | ||
282 | + <Modal | ||
283 | + title="回款" | ||
284 | + open={visible} | ||
285 | + onCancel={onCancel} | ||
286 | + footer={[ | ||
287 | + <Button key="cancel" onClick={onCancel}> | ||
288 | + 取消 | ||
289 | + </Button>, | ||
290 | + <Button key="submit" type="primary" onClick={handleOk}> | ||
291 | + 确认 | ||
292 | + </Button>, | ||
293 | + ]} | ||
294 | + width={500} | ||
295 | + > | ||
296 | + <Form form={form} layout="vertical"> | ||
297 | + <div style={{ marginBottom: 16 }}> | ||
298 | + <div | ||
299 | + style={{ | ||
300 | + display: 'flex', | ||
301 | + justifyContent: 'space-between', | ||
302 | + marginBottom: 8, | ||
303 | + }} | ||
304 | + > | ||
305 | + <span>订单总金额:</span> | ||
306 | + <span>{totalPayment.toFixed(2)}元</span> | ||
307 | + </div> | ||
308 | + <div | ||
309 | + style={{ | ||
310 | + display: 'flex', | ||
311 | + justifyContent: 'space-between', | ||
312 | + marginBottom: 8, | ||
313 | + }} | ||
314 | + > | ||
315 | + <span>已回款金额:</span> | ||
316 | + <span>{installedMoney.toFixed(2)}元</span> | ||
317 | + </div> | ||
318 | + <div | ||
319 | + style={{ | ||
320 | + display: 'flex', | ||
321 | + justifyContent: 'space-between', | ||
322 | + marginBottom: 8, | ||
323 | + }} | ||
324 | + > | ||
325 | + <span>待回款金额:</span> | ||
326 | + <span>{remainingMoney.toFixed(2)}元</span> | ||
327 | + </div> | ||
328 | + </div> | ||
329 | + | ||
330 | + <Form.Item | ||
331 | + label="回款类型" | ||
332 | + name="paymentType" | ||
333 | + initialValue={paymentType} | ||
334 | + > | ||
335 | + <Radio.Group onChange={handleTypeChange}> | ||
336 | + <Radio value="INSTALLMENT">分期回款</Radio> | ||
337 | + <Radio value="FULL">全部回款</Radio> | ||
338 | + </Radio.Group> | ||
339 | + </Form.Item> | ||
340 | + | ||
341 | + <Form.Item | ||
342 | + label="回款金额" | ||
343 | + name="amount" | ||
344 | + rules={[{ required: true, validator: validateAmount }]} | ||
345 | + > | ||
346 | + <Input | ||
347 | + placeholder="请输入回款金额" | ||
348 | + suffix="元" | ||
349 | + disabled={paymentType === 'FULL'} | ||
350 | + /> | ||
351 | + </Form.Item> | ||
352 | + | ||
353 | + <div className="pb-4 text-xs decoration-gray-50">可复制照片粘贴</div> | ||
354 | + <Form.Item | ||
355 | + label="附件凭证" | ||
356 | + name="attachments" | ||
357 | + rules={[{ required: true, message: '请上传回款凭证' }]} | ||
358 | + > | ||
359 | + <Upload {...props}> | ||
360 | + {fileList.length < COMFIR_RECEIPT_IMAGES_NUMBER | ||
361 | + ? uploadButton | ||
362 | + : ''} | ||
363 | + </Upload> | ||
364 | + </Form.Item> | ||
365 | + | ||
366 | + <Form.Item label="备注" name="remarks"> | ||
367 | + <Input.TextArea rows={4} placeholder="请输入备注信息" /> | ||
368 | + </Form.Item> | ||
369 | + </Form> | ||
370 | + </Modal> | ||
371 | + | ||
372 | + <Modal | ||
373 | + open={previewOpen} | ||
374 | + title={previewTitle} | ||
375 | + footer={null} | ||
376 | + onCancel={handleCancel} | ||
377 | + > | ||
378 | + <img alt="图片预览" style={{ width: '100%' }} src={previewImage} /> | ||
379 | + </Modal> | ||
380 | + </> | ||
381 | + ); | ||
382 | +}; | ||
383 | + | ||
384 | +export default HirePurchaseUploadPayBillModal; |
src/pages/Order/OrderList/OrderDrawer.tsx
@@ -75,6 +75,8 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -75,6 +75,8 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
75 | const [kingdeeCstomerModalVisible, setKingdeeCstomerModalVisible] = | 75 | const [kingdeeCstomerModalVisible, setKingdeeCstomerModalVisible] = |
76 | useState(false); | 76 | useState(false); |
77 | const [paymentMethod, setPaymentMethod] = useState(''); | 77 | const [paymentMethod, setPaymentMethod] = useState(''); |
78 | + const [paymentMethodDisabled, setPaymentMethodDisabled] = useState(false); | ||
79 | + const [paymentChannelDisabled, setPaymentChannelDisabled] = useState(false); | ||
78 | const [customerRequestCount, setCustomerRequestCount] = useState(0); | 80 | const [customerRequestCount, setCustomerRequestCount] = useState(0); |
79 | const [ | 81 | const [ |
80 | productParametersDisabledFlagList, | 82 | productParametersDisabledFlagList, |
@@ -1096,8 +1098,31 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -1096,8 +1098,31 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
1096 | placeholder="请输入销售代表" | 1098 | placeholder="请输入销售代表" |
1097 | rules={[{ required: true, message: '销售代表必填' }]} | 1099 | rules={[{ required: true, message: '销售代表必填' }]} |
1098 | options={salesCodeOptions} | 1100 | options={salesCodeOptions} |
1099 | - onChange={(_, option) => { | 1101 | + onChange={(value, option) => { |
1100 | autoFillSalesInfo(option); | 1102 | autoFillSalesInfo(option); |
1103 | + | ||
1104 | + // 检查是否是特殊的淘宝销售代码 | ||
1105 | + const isTaobaoSalesCode = ['TB', 'TBHC', 'HCTB'].includes(value); | ||
1106 | + | ||
1107 | + if (isTaobaoSalesCode) { | ||
1108 | + // 设置支付渠道为淘宝并锁定 | ||
1109 | + form.setFieldsValue({ paymentChannel: 'TAOBAO' }); | ||
1110 | + setPaymentChannelDisabled(true); | ||
1111 | + | ||
1112 | + // 支付方式默认锁定为预付 | ||
1113 | + form.setFieldsValue({ paymentMethod: 'PAYMENT_IN_ADVANCE' }); | ||
1114 | + setPaymentMethod('PAYMENT_IN_ADVANCE'); | ||
1115 | + setPaymentMethodDisabled(true); | ||
1116 | + } else { | ||
1117 | + // 如果不是淘宝销售代码,解除锁定 | ||
1118 | + setPaymentChannelDisabled(false); | ||
1119 | + // 只有当前支付渠道不是扣预存时才解除付款方式的锁定 | ||
1120 | + const currentPaymentChannel = | ||
1121 | + form.getFieldValue('paymentChannel'); | ||
1122 | + if (currentPaymentChannel !== 'BALANCE') { | ||
1123 | + setPaymentMethodDisabled(false); | ||
1124 | + } | ||
1125 | + } | ||
1101 | }} | 1126 | }} |
1102 | disabled={optType('after-sales-check')} | 1127 | disabled={optType('after-sales-check')} |
1103 | /> | 1128 | /> |
@@ -1767,9 +1792,26 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -1767,9 +1792,26 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
1767 | width="lg" | 1792 | width="lg" |
1768 | key="paymentChannel" | 1793 | key="paymentChannel" |
1769 | label="支付渠道" | 1794 | label="支付渠道" |
1770 | - options={enumToSelect(PAYMENT_CHANNEL_OPTIONS)} | 1795 | + options={enumToSelect(PAYMENT_CHANNEL_OPTIONS).map((option) => { |
1796 | + // 将淘宝选项设置为禁用状态,使其无法手动选择 | ||
1797 | + if (option.value === 'TAOBAO') { | ||
1798 | + return { ...option, disabled: true }; | ||
1799 | + } | ||
1800 | + return option; | ||
1801 | + })} | ||
1771 | rules={[{ required: true, message: '支付渠道必填' }]} | 1802 | rules={[{ required: true, message: '支付渠道必填' }]} |
1772 | - disabled={optType('after-sales-check')} | 1803 | + disabled={optType('after-sales-check') || paymentChannelDisabled} |
1804 | + onChange={(val: any) => { | ||
1805 | + // 当支付渠道选为扣预存或淘宝时,付款方式默认锁定为预付 | ||
1806 | + if (val === 'BALANCE' || val === 'TAOBAO') { | ||
1807 | + setPaymentMethodDisabled(true); | ||
1808 | + form.setFieldsValue({ paymentMethod: 'PAYMENT_IN_ADVANCE' }); | ||
1809 | + setPaymentMethod('PAYMENT_IN_ADVANCE'); | ||
1810 | + } else { | ||
1811 | + // 支付渠道修改为其他的去除锁定状态 | ||
1812 | + setPaymentMethodDisabled(false); | ||
1813 | + } | ||
1814 | + }} | ||
1773 | /> | 1815 | /> |
1774 | <ProFormSelect | 1816 | <ProFormSelect |
1775 | placeholder="请输入支付方式" | 1817 | placeholder="请输入支付方式" |
@@ -1780,9 +1822,36 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -1780,9 +1822,36 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
1780 | onChange={(val: any) => { | 1822 | onChange={(val: any) => { |
1781 | setPaymentMethod(val); | 1823 | setPaymentMethod(val); |
1782 | }} | 1824 | }} |
1783 | - options={enumToSelect(PAYMENT_METHOD_OPTIONS_4_ADD)} | 1825 | + options={[ |
1826 | + // 默认可选项 | ||
1827 | + ...enumToSelect(PAYMENT_METHOD_OPTIONS_4_ADD), | ||
1828 | + // 强制禁用项 | ||
1829 | + { label: '未付款', value: 'UNPAID', disabled: true }, | ||
1830 | + { | ||
1831 | + label: '淘宝订单已付款', | ||
1832 | + value: 'TAOBAO_ORDER_HAS_BEEN_PAID', | ||
1833 | + disabled: true, | ||
1834 | + }, | ||
1835 | + { | ||
1836 | + label: '官网订单已付款', | ||
1837 | + value: 'OFFICIAL_WEBSITE_ORDER_HAS_BEEN_PAID', | ||
1838 | + disabled: true, | ||
1839 | + }, | ||
1840 | + { | ||
1841 | + label: '扣预存', | ||
1842 | + value: 'WITHHOLDING_ADVANCE_DEPOSIT', | ||
1843 | + disabled: true, | ||
1844 | + }, | ||
1845 | + { label: '平台结算', value: 'PLATFORM_SETTLEMENT', disabled: true }, | ||
1846 | + { label: '已回款', value: 'PAYMENT_RECEIPT', disabled: true }, | ||
1847 | + { | ||
1848 | + label: '预存款无需发货', | ||
1849 | + value: 'PREPAID_NO_NEED_SEND', | ||
1850 | + disabled: true, | ||
1851 | + }, | ||
1852 | + ]} | ||
1784 | rules={[{ required: true, message: '支付方式必填' }]} | 1853 | rules={[{ required: true, message: '支付方式必填' }]} |
1785 | - disabled={optType('after-sales-check')} | 1854 | + disabled={optType('after-sales-check') || paymentMethodDisabled} |
1786 | /> | 1855 | /> |
1787 | {/* 隐藏字段用于存储真实UID和privatePocket标志 */} | 1856 | {/* 隐藏字段用于存储真实UID和privatePocket标志 */} |
1788 | <ProFormText name="realPrepaidUid" hidden /> | 1857 | <ProFormText name="realPrepaidUid" hidden /> |
src/pages/Order/OrderList/OrderList.tsx
@@ -115,6 +115,7 @@ import FinancialDrawer from './FinancialDrawer'; | @@ -115,6 +115,7 @@ import FinancialDrawer from './FinancialDrawer'; | ||
115 | import FinancialEditDrawer from './FinancialEditDrawer'; | 115 | import FinancialEditDrawer from './FinancialEditDrawer'; |
116 | import FinancialMergeDrawer from './FinancialMergeDrawer'; | 116 | import FinancialMergeDrawer from './FinancialMergeDrawer'; |
117 | import FinancialReceiptsModal from './FinancialReceiptsModal'; | 117 | import FinancialReceiptsModal from './FinancialReceiptsModal'; |
118 | +import HirePurchaseUploadPayBillModal from './HirePurchaseUploadPayBillModal'; | ||
118 | import HistoryModal from './HistoryModal'; | 119 | import HistoryModal from './HistoryModal'; |
119 | import ImagesViewerModal from './ImagesViewerModal'; | 120 | import ImagesViewerModal from './ImagesViewerModal'; |
120 | import ImportModal from './ImportModal'; | 121 | import ImportModal from './ImportModal'; |
@@ -147,6 +148,10 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -147,6 +148,10 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
147 | const [uploadPayBillModalVisible, setUploadPayBillModalVisible] = | 148 | const [uploadPayBillModalVisible, setUploadPayBillModalVisible] = |
148 | useState<boolean>(false); | 149 | useState<boolean>(false); |
149 | const [ | 150 | const [ |
151 | + hirePurchaseUploadPayBillModalVisible, | ||
152 | + setHirePurchaseUploadPayBillModalVisible, | ||
153 | + ] = useState<boolean>(false); | ||
154 | + const [ | ||
150 | feedbackRegistrationModalVisible, | 155 | feedbackRegistrationModalVisible, |
151 | setFeedbackRegistrationModalVisible, | 156 | setFeedbackRegistrationModalVisible, |
152 | ] = useState<boolean>(false); | 157 | ] = useState<boolean>(false); |
@@ -909,14 +914,14 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -909,14 +914,14 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
909 | {/* 商品名称 */} | 914 | {/* 商品名称 */} |
910 | <div> | 915 | <div> |
911 | <div | 916 | <div |
912 | - className="overflow-hidden whitespace-no-wrap overflow-ellipsis hover:cursor-pointer" | 917 | + className="overflow-hidden overflow-ellipsis whitespace-no-wrap hover:cursor-pointer" |
913 | onClick={() => { | 918 | onClick={() => { |
914 | copyToClipboard(optRecord.productName); | 919 | copyToClipboard(optRecord.productName); |
915 | message.info('商品名称复制成功:' + optRecord.productName); | 920 | message.info('商品名称复制成功:' + optRecord.productName); |
916 | }} | 921 | }} |
917 | title={optRecord.productName} | 922 | title={optRecord.productName} |
918 | > | 923 | > |
919 | - <span className="font-medium text-black "> | 924 | + <span className="font-medium text-black"> |
920 | {optRecord.productName} | 925 | {optRecord.productName} |
921 | </span> | 926 | </span> |
922 | </div> | 927 | </div> |
@@ -976,7 +981,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -976,7 +981,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
976 | </div> | 981 | </div> |
977 | 982 | ||
978 | <div | 983 | <div |
979 | - className="overflow-hidden whitespace-no-wrap overflow-ellipsis hover:cursor-pointer" | 984 | + className="overflow-hidden overflow-ellipsis whitespace-no-wrap hover:cursor-pointer" |
980 | title={optRecord.parameters} | 985 | title={optRecord.parameters} |
981 | onClick={() => { | 986 | onClick={() => { |
982 | copyToClipboard(optRecord.parameters); | 987 | copyToClipboard(optRecord.parameters); |
@@ -992,7 +997,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -992,7 +997,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
992 | {!isSupplier() ? ( | 997 | {!isSupplier() ? ( |
993 | <> | 998 | <> |
994 | <div | 999 | <div |
995 | - className="overflow-hidden whitespace-no-wrap overflow-ellipsis" | 1000 | + className="overflow-hidden overflow-ellipsis whitespace-no-wrap" |
996 | title={optRecord.productPrice} | 1001 | title={optRecord.productPrice} |
997 | > | 1002 | > |
998 | <span className="text-[#8C8C8C]">单价:</span> | 1003 | <span className="text-[#8C8C8C]">单价:</span> |
@@ -1006,7 +1011,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1006,7 +1011,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1006 | )} | 1011 | )} |
1007 | 1012 | ||
1008 | <div | 1013 | <div |
1009 | - className="overflow-hidden whitespace-no-wrap overflow-ellipsis" | 1014 | + className="overflow-hidden overflow-ellipsis whitespace-no-wrap" |
1010 | title={optRecord.quantity} | 1015 | title={optRecord.quantity} |
1011 | > | 1016 | > |
1012 | <span className="text-[#8C8C8C]">数量:</span> | 1017 | <span className="text-[#8C8C8C]">数量:</span> |
@@ -1018,7 +1023,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1018,7 +1023,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1018 | 1023 | ||
1019 | {!isSupplier() ? ( | 1024 | {!isSupplier() ? ( |
1020 | <div | 1025 | <div |
1021 | - className="overflow-hidden whitespace-no-wrap overflow-ellipsis" | 1026 | + className="overflow-hidden overflow-ellipsis whitespace-no-wrap" |
1022 | title={optRecord.subOrderPayment} | 1027 | title={optRecord.subOrderPayment} |
1023 | > | 1028 | > |
1024 | <span className="text-[#8C8C8C]">合计:</span> | 1029 | <span className="text-[#8C8C8C]">合计:</span> |
@@ -1032,7 +1037,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1032,7 +1037,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1032 | 1037 | ||
1033 | {optRecord.deliveryDate && ( | 1038 | {optRecord.deliveryDate && ( |
1034 | <div | 1039 | <div |
1035 | - className="overflow-hidden whitespace-no-wrap overflow-ellipsis" | 1040 | + className="overflow-hidden overflow-ellipsis whitespace-no-wrap" |
1036 | title={optRecord.deliveryDate} | 1041 | title={optRecord.deliveryDate} |
1037 | > | 1042 | > |
1038 | <span className="text-[#8C8C8C]">产品交期:</span> | 1043 | <span className="text-[#8C8C8C]">产品交期:</span> |
@@ -1045,13 +1050,13 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1045,13 +1050,13 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1045 | {!isSupplier() ? ( | 1050 | {!isSupplier() ? ( |
1046 | <> | 1051 | <> |
1047 | {/* 支付方式 */} | 1052 | {/* 支付方式 */} |
1048 | - <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1053 | + <div className="overflow-hidden overflow-ellipsis whitespace-no-wrap"> |
1049 | <span className="text-slate-700"> | 1054 | <span className="text-slate-700"> |
1050 | {optRecord.paymentMethodText} | 1055 | {optRecord.paymentMethodText} |
1051 | </span> | 1056 | </span> |
1052 | </div> | 1057 | </div> |
1053 | {/* 支付渠道 */} | 1058 | {/* 支付渠道 */} |
1054 | - <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1059 | + <div className="overflow-hidden overflow-ellipsis whitespace-no-wrap"> |
1055 | <span className="text-slate-700"> | 1060 | <span className="text-slate-700"> |
1056 | {enumValueToLabel( | 1061 | {enumValueToLabel( |
1057 | optRecord.paymentChannel, | 1062 | optRecord.paymentChannel, |
@@ -1059,9 +1064,18 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1059,9 +1064,18 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1059 | )} | 1064 | )} |
1060 | </span> | 1065 | </span> |
1061 | </div> | 1066 | </div> |
1067 | + {/* 回款状态 */} | ||
1068 | + {/* <div className="overflow-hidden overflow-ellipsis whitespace-no-wrap"> | ||
1069 | + <span className="text-slate-700"> | ||
1070 | + {enumValueToLabel( | ||
1071 | + optRecord.paymentReceiptStatus, | ||
1072 | + PAYMENT_RECEIPTS_STATUS_OPTIONS, | ||
1073 | + )} | ||
1074 | + </span> | ||
1075 | + </div> */} | ||
1062 | {/* 回款审核状态 */} | 1076 | {/* 回款审核状态 */} |
1063 | {optRecord.paymentReceiptStatus !== null ? ( | 1077 | {optRecord.paymentReceiptStatus !== null ? ( |
1064 | - <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1078 | + <div className="overflow-hidden overflow-ellipsis whitespace-no-wrap"> |
1065 | <Tag | 1079 | <Tag |
1066 | className="hover:cursor-pointer" | 1080 | className="hover:cursor-pointer" |
1067 | onMouseEnter={(e: any) => { | 1081 | onMouseEnter={(e: any) => { |
@@ -1100,7 +1114,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1100,7 +1114,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1100 | <> | 1114 | <> |
1101 | {/* 所属部门 */} | 1115 | {/* 所属部门 */} |
1102 | <div | 1116 | <div |
1103 | - className="overflow-hidden whitespace-no-wrap overflow-ellipsis" | 1117 | + className="overflow-hidden overflow-ellipsis whitespace-no-wrap" |
1104 | title={enumValueToLabel( | 1118 | title={enumValueToLabel( |
1105 | optRecord.productBelongBusiness, | 1119 | optRecord.productBelongBusiness, |
1106 | PRODUCT_BELONG_DEPARTMENT_OPTIONS, | 1120 | PRODUCT_BELONG_DEPARTMENT_OPTIONS, |
@@ -1116,7 +1130,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1116,7 +1130,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1116 | 1130 | ||
1117 | {/* 开票类型 */} | 1131 | {/* 开票类型 */} |
1118 | {optRecord.invoicingStatus !== null ? ( | 1132 | {optRecord.invoicingStatus !== null ? ( |
1119 | - <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1133 | + <div className="overflow-hidden overflow-ellipsis whitespace-no-wrap"> |
1120 | <span className="text-slate-700"> | 1134 | <span className="text-slate-700"> |
1121 | {getInvoicingType(optRecord)} | 1135 | {getInvoicingType(optRecord)} |
1122 | </span> | 1136 | </span> |
@@ -1127,7 +1141,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1127,7 +1141,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1127 | 1141 | ||
1128 | {/* 开票状态 */} | 1142 | {/* 开票状态 */} |
1129 | {optRecord.afterInvoicingStatus !== null ? ( | 1143 | {optRecord.afterInvoicingStatus !== null ? ( |
1130 | - <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1144 | + <div className="overflow-hidden overflow-ellipsis whitespace-no-wrap"> |
1131 | <Tooltip | 1145 | <Tooltip |
1132 | title={ | 1146 | title={ |
1133 | optRecord.invoicingUrgentCause !== null && | 1147 | optRecord.invoicingUrgentCause !== null && |
@@ -1156,7 +1170,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1156,7 +1170,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1156 | 1170 | ||
1157 | {/* 是否加急图标显示 */} | 1171 | {/* 是否加急图标显示 */} |
1158 | {optRecord.isUrgent ? ( | 1172 | {optRecord.isUrgent ? ( |
1159 | - <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1173 | + <div className="overflow-hidden overflow-ellipsis whitespace-no-wrap"> |
1160 | <Tooltip | 1174 | <Tooltip |
1161 | title={'期望开票时间:' + formatdate(optRecord.deadline)} | 1175 | title={'期望开票时间:' + formatdate(optRecord.deadline)} |
1162 | > | 1176 | > |
@@ -1170,7 +1184,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1170,7 +1184,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1170 | {(roleCode === 'warehouseKeeper' || roleCode === 'admin') && | 1184 | {(roleCode === 'warehouseKeeper' || roleCode === 'admin') && |
1171 | optRecord.shippingWarehouse !== null ? ( | 1185 | optRecord.shippingWarehouse !== null ? ( |
1172 | <div | 1186 | <div |
1173 | - className="overflow-hidden whitespace-no-wrap overflow-ellipsis" | 1187 | + className="overflow-hidden overflow-ellipsis whitespace-no-wrap" |
1174 | title={enumValueToLabel( | 1188 | title={enumValueToLabel( |
1175 | optRecord.shippingWarehouse, | 1189 | optRecord.shippingWarehouse, |
1176 | SHIPPING_WAREHOUSE_OPTIONS, | 1190 | SHIPPING_WAREHOUSE_OPTIONS, |
@@ -1188,7 +1202,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1188,7 +1202,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1188 | )} | 1202 | )} |
1189 | 1203 | ||
1190 | {/* 生产时间 */} | 1204 | {/* 生产时间 */} |
1191 | - <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1205 | + <div className="overflow-hidden overflow-ellipsis whitespace-no-wrap"> |
1192 | {optRecord.productionStartTime !== null || | 1206 | {optRecord.productionStartTime !== null || |
1193 | optRecord.productionEndTime !== null ? ( | 1207 | optRecord.productionEndTime !== null ? ( |
1194 | <MyToolTip | 1208 | <MyToolTip |
@@ -1216,7 +1230,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1216,7 +1230,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1216 | <Flex className="w-[10%]" vertical gap="small"> | 1230 | <Flex className="w-[10%]" vertical gap="small"> |
1217 | {/* 开票状态 */} | 1231 | {/* 开票状态 */} |
1218 | {!isSupplier() ? ( | 1232 | {!isSupplier() ? ( |
1219 | - <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1233 | + <div className="overflow-hidden overflow-ellipsis whitespace-no-wrap"> |
1220 | <Tag | 1234 | <Tag |
1221 | color={ | 1235 | color={ |
1222 | optRecord.afterInvoicingStatus !== 'COMPLETE_INVOICING' && | 1236 | optRecord.afterInvoicingStatus !== 'COMPLETE_INVOICING' && |
@@ -1233,13 +1247,13 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1233,13 +1247,13 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1233 | )} | 1247 | )} |
1234 | 1248 | ||
1235 | {/* 订单状态 */} | 1249 | {/* 订单状态 */} |
1236 | - <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1250 | + <div className="overflow-hidden overflow-ellipsis whitespace-no-wrap"> |
1237 | {getOrderStatusTag(optRecord)} | 1251 | {getOrderStatusTag(optRecord)} |
1238 | </div> | 1252 | </div> |
1239 | 1253 | ||
1240 | {/* 确认发票状态 */} | 1254 | {/* 确认发票状态 */} |
1241 | {optRecord.invoiceConfirmStatusText !== null && ( | 1255 | {optRecord.invoiceConfirmStatusText !== null && ( |
1242 | - <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1256 | + <div className="overflow-hidden overflow-ellipsis whitespace-no-wrap"> |
1243 | <Tag color={'success'} style={{ marginRight: '4px' }}> | 1257 | <Tag color={'success'} style={{ marginRight: '4px' }}> |
1244 | {optRecord.invoiceConfirmStatusText} | 1258 | {optRecord.invoiceConfirmStatusText} |
1245 | </Tag> | 1259 | </Tag> |
@@ -1248,7 +1262,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1248,7 +1262,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1248 | 1262 | ||
1249 | {/* 确认发票状态 */} | 1263 | {/* 确认发票状态 */} |
1250 | {optRecord.deliveryStatusText !== null && ( | 1264 | {optRecord.deliveryStatusText !== null && ( |
1251 | - <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1265 | + <div className="overflow-hidden overflow-ellipsis whitespace-no-wrap"> |
1252 | <Tag color={'success'} style={{ marginRight: '4px' }}> | 1266 | <Tag color={'success'} style={{ marginRight: '4px' }}> |
1253 | {optRecord.deliveryStatusText} | 1267 | {optRecord.deliveryStatusText} |
1254 | </Tag> | 1268 | </Tag> |
@@ -1257,7 +1271,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1257,7 +1271,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1257 | 1271 | ||
1258 | {/* 后置审核状态 */} | 1272 | {/* 后置审核状态 */} |
1259 | {optRecord.postAuditStatus !== null ? ( | 1273 | {optRecord.postAuditStatus !== null ? ( |
1260 | - <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1274 | + <div className="overflow-hidden overflow-ellipsis whitespace-no-wrap"> |
1261 | {getPostAuditStatusTag(optRecord)} | 1275 | {getPostAuditStatusTag(optRecord)} |
1262 | </div> | 1276 | </div> |
1263 | ) : ( | 1277 | ) : ( |
@@ -1265,7 +1279,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1265,7 +1279,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1265 | )} | 1279 | )} |
1266 | {/* 后置审核状态 */} | 1280 | {/* 后置审核状态 */} |
1267 | {optRecord.orderStatus === 'PROCURE_REJECT' ? ( | 1281 | {optRecord.orderStatus === 'PROCURE_REJECT' ? ( |
1268 | - <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1282 | + <div className="overflow-hidden overflow-ellipsis whitespace-no-wrap"> |
1269 | <Tag color={'red'} style={{ marginRight: '4px' }}> | 1283 | <Tag color={'red'} style={{ marginRight: '4px' }}> |
1270 | {'采购驳回'} | 1284 | {'采购驳回'} |
1271 | </Tag> | 1285 | </Tag> |
@@ -1277,7 +1291,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1277,7 +1291,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1277 | {/**采购是否已下单状态 */} | 1291 | {/**采购是否已下单状态 */} |
1278 | {optRecord.procureOrderStatus !== null && | 1292 | {optRecord.procureOrderStatus !== null && |
1279 | optRecord.procureOrderStatus !== undefined ? ( | 1293 | optRecord.procureOrderStatus !== undefined ? ( |
1280 | - <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1294 | + <div className="overflow-hidden overflow-ellipsis whitespace-no-wrap"> |
1281 | <Tag color="success"> | 1295 | <Tag color="success"> |
1282 | {enumValueToLabel( | 1296 | {enumValueToLabel( |
1283 | optRecord.procureOrderStatus, | 1297 | optRecord.procureOrderStatus, |
@@ -1290,7 +1304,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1290,7 +1304,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1290 | )} | 1304 | )} |
1291 | 1305 | ||
1292 | {/* 物流信息 */} | 1306 | {/* 物流信息 */} |
1293 | - <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1307 | + <div className="overflow-hidden overflow-ellipsis whitespace-no-wrap"> |
1294 | {optRecord.orderStatus === 'CONFIRM_RECEIPT' || | 1308 | {optRecord.orderStatus === 'CONFIRM_RECEIPT' || |
1295 | optRecord.orderStatus === 'AFTER_SALES_COMPLETION' || | 1309 | optRecord.orderStatus === 'AFTER_SALES_COMPLETION' || |
1296 | optRecord.orderStatus === 'IN_AFTER_SALES' || | 1310 | optRecord.orderStatus === 'IN_AFTER_SALES' || |
@@ -1321,7 +1335,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1321,7 +1335,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1321 | {/* 修改审核状态 */} | 1335 | {/* 修改审核状态 */} |
1322 | {optRecord.modifiedAuditStatus !== null && | 1336 | {optRecord.modifiedAuditStatus !== null && |
1323 | optRecord.modifiedAuditStatus !== 'AUDIT_FAILURE' ? ( | 1337 | optRecord.modifiedAuditStatus !== 'AUDIT_FAILURE' ? ( |
1324 | - <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 1338 | + <div className="overflow-hidden overflow-ellipsis whitespace-no-wrap"> |
1325 | <Tooltip | 1339 | <Tooltip |
1326 | title={recordOptNode ? recordOptNode : <Spin />} | 1340 | title={recordOptNode ? recordOptNode : <Spin />} |
1327 | onOpenChange={(open) => { | 1341 | onOpenChange={(open) => { |
@@ -2254,7 +2268,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -2254,7 +2268,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
2254 | </div> | 2268 | </div> |
2255 | {!isSupplier() && (isSales() || isWarehousekeeper() || isAdmin()) && ( | 2269 | {!isSupplier() && (isSales() || isWarehousekeeper() || isAdmin()) && ( |
2256 | <EditTwoTone | 2270 | <EditTwoTone |
2257 | - className="pl-1 pr-1 hover:curcor-pointer" | 2271 | + className="pr-1 pl-1 hover:curcor-pointer" |
2258 | onClick={() => { | 2272 | onClick={() => { |
2259 | setNotesEditVisible(true); | 2273 | setNotesEditVisible(true); |
2260 | setSelectedRows([optRecord.id]); | 2274 | setSelectedRows([optRecord.id]); |
@@ -2280,7 +2294,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -2280,7 +2294,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
2280 | 2294 | ||
2281 | <Divider type="vertical" /> | 2295 | <Divider type="vertical" /> |
2282 | 2296 | ||
2283 | - <div className="overflow-hidden whitespace-normal overflow-ellipsis hover:cursor-pointer"> | 2297 | + <div className="overflow-hidden overflow-ellipsis whitespace-normal hover:cursor-pointer"> |
2284 | <span className="text-[#8C8C8C]"> | 2298 | <span className="text-[#8C8C8C]"> |
2285 | 采购备注: | 2299 | 采购备注: |
2286 | {optRecord.procureNotes === null | 2300 | {optRecord.procureNotes === null |
@@ -2291,7 +2305,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -2291,7 +2305,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
2291 | {/* 编辑备注按钮 */} | 2305 | {/* 编辑备注按钮 */} |
2292 | {(isProcure() || isAdmin()) && ( | 2306 | {(isProcure() || isAdmin()) && ( |
2293 | <EditTwoTone | 2307 | <EditTwoTone |
2294 | - className="pl-1 pr-1 hover:curcor-pointer" | 2308 | + className="pr-1 pl-1 hover:curcor-pointer" |
2295 | onClick={() => { | 2309 | onClick={() => { |
2296 | setSelectedRows([optRecord.id]); | 2310 | setSelectedRows([optRecord.id]); |
2297 | setNotes(optRecord.procureNotes); | 2311 | setNotes(optRecord.procureNotes); |
@@ -2333,7 +2347,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -2333,7 +2347,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
2333 | <Flex title={optRecord.notes} className="pt-2"> | 2347 | <Flex title={optRecord.notes} className="pt-2"> |
2334 | <div className="flex items-center"> | 2348 | <div className="flex items-center"> |
2335 | <div className="flex items-center max-w-[500px]"> | 2349 | <div className="flex items-center max-w-[500px]"> |
2336 | - <div className="max-w-md overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 2350 | + <div className="overflow-hidden max-w-md overflow-ellipsis whitespace-no-wrap"> |
2337 | <Tooltip | 2351 | <Tooltip |
2338 | title={optRecord.applyInvoicingNotes} | 2352 | title={optRecord.applyInvoicingNotes} |
2339 | placement="topLeft" | 2353 | placement="topLeft" |
@@ -2364,7 +2378,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -2364,7 +2378,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
2364 | </div> | 2378 | </div> |
2365 | <Divider type="vertical" className="mx-5" /> | 2379 | <Divider type="vertical" className="mx-5" /> |
2366 | <div className="flex items-center max-w-[500px]"> | 2380 | <div className="flex items-center max-w-[500px]"> |
2367 | - <div className="max-w-md overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 2381 | + <div className="overflow-hidden max-w-md overflow-ellipsis whitespace-no-wrap"> |
2368 | <Tooltip title={optRecord.checkNotes} placement="topLeft"> | 2382 | <Tooltip title={optRecord.checkNotes} placement="topLeft"> |
2369 | <span className="text-[#8C8C8C] mr-3"> | 2383 | <span className="text-[#8C8C8C] mr-3"> |
2370 | 财务审核备注: | 2384 | 财务审核备注: |
@@ -2388,7 +2402,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -2388,7 +2402,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
2388 | <Flex title={optRecord.notes} className="pt-2"> | 2402 | <Flex title={optRecord.notes} className="pt-2"> |
2389 | <div className="flex items-center"> | 2403 | <div className="flex items-center"> |
2390 | <div className="flex items-center max-w-[500px]"> | 2404 | <div className="flex items-center max-w-[500px]"> |
2391 | - <div className="max-w-md overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 2405 | + <div className="overflow-hidden max-w-md overflow-ellipsis whitespace-no-wrap"> |
2392 | <Tooltip title={optRecord.reissueNotes} placement="topLeft"> | 2406 | <Tooltip title={optRecord.reissueNotes} placement="topLeft"> |
2393 | <span className="text-[#8C8C8C]"> | 2407 | <span className="text-[#8C8C8C]"> |
2394 | 重新开票备注: | 2408 | 重新开票备注: |
@@ -2423,7 +2437,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -2423,7 +2437,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
2423 | <Flex title={optRecord.notes} className="pt-2"> | 2437 | <Flex title={optRecord.notes} className="pt-2"> |
2424 | <div className="flex items-center"> | 2438 | <div className="flex items-center"> |
2425 | <div className="flex items-center max-w-[500px]"> | 2439 | <div className="flex items-center max-w-[500px]"> |
2426 | - <div className="max-w-md overflow-hidden whitespace-no-wrap overflow-ellipsis"> | 2440 | + <div className="overflow-hidden max-w-md overflow-ellipsis whitespace-no-wrap"> |
2427 | <Tooltip | 2441 | <Tooltip |
2428 | title={optRecord.feedbackRegistrationContent} | 2442 | title={optRecord.feedbackRegistrationContent} |
2429 | placement="topLeft" | 2443 | placement="topLeft" |
@@ -2452,7 +2466,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -2452,7 +2466,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
2452 | return ( | 2466 | return ( |
2453 | <ProTable | 2467 | <ProTable |
2454 | id="sub-table" | 2468 | id="sub-table" |
2455 | - className="w-full " | 2469 | + className="w-full" |
2456 | showHeader={false} | 2470 | showHeader={false} |
2457 | columns={[ | 2471 | columns={[ |
2458 | { | 2472 | { |
@@ -2770,7 +2784,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -2770,7 +2784,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
2770 | {record.goodsWeight !== null ? ( | 2784 | {record.goodsWeight !== null ? ( |
2771 | <div title={record.goodsWeight + 'kg'} className="pl-3"> | 2785 | <div title={record.goodsWeight + 'kg'} className="pl-3"> |
2772 | <div | 2786 | <div |
2773 | - className="max-w-md overflow-hidden whitespace-no-wrap overflow-ellipsis hover:cursor-pointer" | 2787 | + className="overflow-hidden max-w-md overflow-ellipsis whitespace-no-wrap hover:cursor-pointer" |
2774 | onClick={() => { | 2788 | onClick={() => { |
2775 | copyToClipboard(record.goodsWeight + 'kg'); | 2789 | copyToClipboard(record.goodsWeight + 'kg'); |
2776 | message.info( | 2790 | message.info( |
@@ -2789,7 +2803,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -2789,7 +2803,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
2789 | {record.goodsVolume !== null ? ( | 2803 | {record.goodsVolume !== null ? ( |
2790 | <div title={record.goodsVolume + 'm³'} className="pl-3"> | 2804 | <div title={record.goodsVolume + 'm³'} className="pl-3"> |
2791 | <div | 2805 | <div |
2792 | - className="max-w-md overflow-hidden whitespace-no-wrap overflow-ellipsis hover:cursor-pointer" | 2806 | + className="overflow-hidden max-w-md overflow-ellipsis whitespace-no-wrap hover:cursor-pointer" |
2793 | onClick={() => { | 2807 | onClick={() => { |
2794 | copyToClipboard(record.goodsVolume + 'm³'); | 2808 | copyToClipboard(record.goodsVolume + 'm³'); |
2795 | message.info( | 2809 | message.info( |
@@ -2957,6 +2971,40 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -2957,6 +2971,40 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
2957 | ) : ( | 2971 | ) : ( |
2958 | '' | 2972 | '' |
2959 | )} | 2973 | )} |
2974 | + {record.paths?.includes('updateHirePurchase') ? ( | ||
2975 | + <Button | ||
2976 | + className="p-0" | ||
2977 | + type="link" | ||
2978 | + onClick={() => { | ||
2979 | + createOptObject(record.id, record.id); | ||
2980 | + setHirePurchaseUploadPayBillModalVisible(true); | ||
2981 | + }} | ||
2982 | + > | ||
2983 | + 回款 | ||
2984 | + </Button> | ||
2985 | + ) : ( | ||
2986 | + '' | ||
2987 | + )} | ||
2988 | + | ||
2989 | + {/* 输出日志以检查权限和支付方式 */} | ||
2990 | + {console.log('Order info:', record.id, record.paths)} | ||
2991 | + {record.paths?.includes('auditPartialPaymentReceipt') ? ( | ||
2992 | + <Button | ||
2993 | + className="p-0" | ||
2994 | + type="link" | ||
2995 | + onClick={() => { | ||
2996 | + createOptObject(null, record.id); | ||
2997 | + setCheckVisible(true); | ||
2998 | + setOrderCheckType( | ||
2999 | + CHECK_TYPE.PARTIAL_PAYMENT_RECEIPTS_AUDIT, | ||
3000 | + ); | ||
3001 | + }} | ||
3002 | + > | ||
3003 | + 回款审核(分期) | ||
3004 | + </Button> | ||
3005 | + ) : ( | ||
3006 | + '' | ||
3007 | + )} | ||
2960 | 3008 | ||
2961 | {record.paths?.includes('modifiedAuditRequest') ? ( | 3009 | {record.paths?.includes('modifiedAuditRequest') ? ( |
2962 | <Button | 3010 | <Button |
@@ -2990,6 +3038,8 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -2990,6 +3038,8 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
2990 | '' | 3038 | '' |
2991 | )} | 3039 | )} |
2992 | 3040 | ||
3041 | + {/* 第二个回款审核(分期)按钮已被移除,使用上面的带权限检查的按钮 */} | ||
3042 | + | ||
2993 | {record.paths?.includes('modifiedLeaderAuditRequest') ? ( | 3043 | {record.paths?.includes('modifiedLeaderAuditRequest') ? ( |
2994 | <Button | 3044 | <Button |
2995 | className="p-0" | 3045 | className="p-0" |
@@ -5295,6 +5345,27 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -5295,6 +5345,27 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
5295 | }} | 5345 | }} |
5296 | /> | 5346 | /> |
5297 | )} | 5347 | )} |
5348 | + | ||
5349 | + {hirePurchaseUploadPayBillModalVisible && data && currentOptMainId && ( | ||
5350 | + <HirePurchaseUploadPayBillModal | ||
5351 | + visible={hirePurchaseUploadPayBillModalVisible} | ||
5352 | + onCancel={() => { | ||
5353 | + setHirePurchaseUploadPayBillModalVisible(false); | ||
5354 | + clearOptObject(); | ||
5355 | + }} | ||
5356 | + onOk={() => { | ||
5357 | + setHirePurchaseUploadPayBillModalVisible(false); | ||
5358 | + message.success('回款凭证上传成功'); | ||
5359 | + refreshTable(); | ||
5360 | + }} | ||
5361 | + record={data.find((item) => item.id === currentOptMainId) || {}} | ||
5362 | + subOrders={ | ||
5363 | + data.find((item) => item.id === currentOptMainId) | ||
5364 | + ?.subOrderInformationLists || [] | ||
5365 | + } | ||
5366 | + /> | ||
5367 | + )} | ||
5368 | + | ||
5298 | {feedbackRegistrationModalVisible && ( | 5369 | {feedbackRegistrationModalVisible && ( |
5299 | <FeedbackRegistrationModal | 5370 | <FeedbackRegistrationModal |
5300 | setVisible={(val: boolean) => { | 5371 | setVisible={(val: boolean) => { |
src/pages/Order/constant.ts
@@ -7,11 +7,13 @@ import { getReceivingCompanyOptions, isSupplier } from '@/utils/order'; | @@ -7,11 +7,13 @@ import { getReceivingCompanyOptions, isSupplier } from '@/utils/order'; | ||
7 | export const COMFIR_RECEIPT_IMAGES_NUMBER = 3; | 7 | export const COMFIR_RECEIPT_IMAGES_NUMBER = 3; |
8 | 8 | ||
9 | export const PAYMENT_CHANNEL_OPTIONS = { | 9 | export const PAYMENT_CHANNEL_OPTIONS = { |
10 | - ALIPAY: '支付宝', | ||
11 | - WECHAT: '微信', | ||
12 | BANK_TRANSFER: '银行转账', | 10 | BANK_TRANSFER: '银行转账', |
13 | - BALANCE: '预存款', | ||
14 | - OFFLINE: '线下付款', | 11 | + WECHAT: '微信支付', |
12 | + ALIPAY: '支付宝支付', | ||
13 | + BALANCE: '扣预存', | ||
14 | + PLATFORM: '平台结算', | ||
15 | + OFFLINE: '线下支付', | ||
16 | + TAOBAO: '淘宝', | ||
15 | }; | 17 | }; |
16 | 18 | ||
17 | export const RECEIPTS_RECORD_TYPES = { | 19 | export const RECEIPTS_RECORD_TYPES = { |
@@ -35,15 +37,9 @@ export const PAYMENT_METHOD_OPTIONS = { | @@ -35,15 +37,9 @@ export const PAYMENT_METHOD_OPTIONS = { | ||
35 | }; | 37 | }; |
36 | 38 | ||
37 | export const PAYMENT_METHOD_OPTIONS_4_ADD = { | 39 | export const PAYMENT_METHOD_OPTIONS_4_ADD = { |
38 | - UNPAID: '未付款', | ||
39 | - TAOBAO_ORDER_HAS_BEEN_PAID: '淘宝订单已付款', | ||
40 | - OFFICIAL_WEBSITE_ORDER_HAS_BEEN_PAID: '官网订单已付款', | ||
41 | - PAYMENT_IN_ADVANCE: '预付款', | ||
42 | - WITHHOLDING_ADVANCE_DEPOSIT: '扣预存', | ||
43 | - PLATFORM_SETTLEMENT: '平台结算', | 40 | + PAYMENT_IN_ADVANCE: '预付', |
44 | CASH_ON_DELIVERY: '货到付款', | 41 | CASH_ON_DELIVERY: '货到付款', |
45 | HIRE_PURCHASE: '分期付款', | 42 | HIRE_PURCHASE: '分期付款', |
46 | - PREPAID_NO_NEED_SEND: '预存款无需发货', | ||
47 | }; | 43 | }; |
48 | 44 | ||
49 | export const PRODUCT_BELONG_DEPARTMENT_OPTIONS = { | 45 | export const PRODUCT_BELONG_DEPARTMENT_OPTIONS = { |
@@ -125,6 +121,7 @@ export const CHECK_TYPE = { | @@ -125,6 +121,7 @@ export const CHECK_TYPE = { | ||
125 | URGENT_INVOICE_AUDITING: 'URGENT_INVOICE_AUDITING', | 121 | URGENT_INVOICE_AUDITING: 'URGENT_INVOICE_AUDITING', |
126 | URGENT_INVOICE_AUDITING_OLD: 'URGENT_INVOICE_AUDITING_OLD', | 122 | URGENT_INVOICE_AUDITING_OLD: 'URGENT_INVOICE_AUDITING_OLD', |
127 | PAYMENT_RECEIPTS_AUDIT: 'PAYMENT_RECEIPTS_AUDIT', | 123 | PAYMENT_RECEIPTS_AUDIT: 'PAYMENT_RECEIPTS_AUDIT', |
124 | + PARTIAL_PAYMENT_RECEIPTS_AUDIT: 'PARTIAL_PAYMENT_RECEIPTS_AUDIT', | ||
128 | CONFIRM_REISSUE: 'CONFIRM_REISSUE', | 125 | CONFIRM_REISSUE: 'CONFIRM_REISSUE', |
129 | CONFIRM_REISSUE_OLD: 'CONFIRM_REISSUE_OLD', | 126 | CONFIRM_REISSUE_OLD: 'CONFIRM_REISSUE_OLD', |
130 | PREPAID_AUDIT: 'PREPAID_AUDIT', | 127 | PREPAID_AUDIT: 'PREPAID_AUDIT', |
@@ -193,9 +190,11 @@ export const POST_AUDIT_OPTIONS = { | @@ -193,9 +190,11 @@ export const POST_AUDIT_OPTIONS = { | ||
193 | }; | 190 | }; |
194 | 191 | ||
195 | export const PAYMENT_RECEIPTS_STATUS_OPTIONS = { | 192 | export const PAYMENT_RECEIPTS_STATUS_OPTIONS = { |
196 | - WAIT_AUDIT: '回款待审核', | ||
197 | - AUDIT_PASS: '回款已审核', | 193 | + WAIT_AUDIT: '回款审核中', |
194 | + AUDIT_PASS: '已回款', | ||
198 | AUDIT_NOTPASS: '回款审核失败', | 195 | AUDIT_NOTPASS: '回款审核失败', |
196 | + NOT_RECEIVED: '未回款', | ||
197 | + PARTIAL_RECEIVED: '部分回款', | ||
199 | }; | 198 | }; |
200 | 199 | ||
201 | export const ORDER_STATUS_OPTIONS = { | 200 | export const ORDER_STATUS_OPTIONS = { |
src/services/definition.ts
@@ -1556,32 +1556,6 @@ export interface ExchangeRecordsRequestDto { | @@ -1556,32 +1556,6 @@ export interface ExchangeRecordsRequestDto { | ||
1556 | total?: number; | 1556 | total?: number; |
1557 | } | 1557 | } |
1558 | 1558 | ||
1559 | -export interface File { | ||
1560 | - absolute?: boolean; | ||
1561 | - absoluteFile?: File; | ||
1562 | - absolutePath?: string; | ||
1563 | - canonicalFile?: File; | ||
1564 | - canonicalPath?: string; | ||
1565 | - directory?: boolean; | ||
1566 | - executable?: boolean; | ||
1567 | - file?: boolean; | ||
1568 | - /** @format int64 */ | ||
1569 | - freeSpace?: number; | ||
1570 | - hidden?: boolean; | ||
1571 | - /** @format int64 */ | ||
1572 | - lastModified?: number; | ||
1573 | - name?: string; | ||
1574 | - parent?: string; | ||
1575 | - parentFile?: File; | ||
1576 | - path?: string; | ||
1577 | - readable?: boolean; | ||
1578 | - /** @format int64 */ | ||
1579 | - totalSpace?: number; | ||
1580 | - /** @format int64 */ | ||
1581 | - usableSpace?: number; | ||
1582 | - writable?: boolean; | ||
1583 | -} | ||
1584 | - | ||
1585 | export interface FilePathDto { | 1559 | export interface FilePathDto { |
1586 | url?: string; | 1560 | url?: string; |
1587 | } | 1561 | } |
@@ -1613,6 +1587,30 @@ export interface GroupExchangeRecordsRequestDto { | @@ -1613,6 +1587,30 @@ export interface GroupExchangeRecordsRequestDto { | ||
1613 | 1587 | ||
1614 | export type InputStream = any; | 1588 | export type InputStream = any; |
1615 | 1589 | ||
1590 | +export interface InstallmentPaymentDTO { | ||
1591 | + /** | ||
1592 | + * @description | ||
1593 | + * 回款单 | ||
1594 | + */ | ||
1595 | + filePaths?: Array<FilePathDto>; | ||
1596 | + /** | ||
1597 | + * @description | ||
1598 | + * 分期付款备注 | ||
1599 | + */ | ||
1600 | + installmentComment?: string; | ||
1601 | + /** | ||
1602 | + * @description | ||
1603 | + * 分期付款金额 | ||
1604 | + * @format int64 | ||
1605 | + */ | ||
1606 | + installmentMoney?: number; | ||
1607 | + /** | ||
1608 | + * @description | ||
1609 | + * 子订单id | ||
1610 | + */ | ||
1611 | + subOrderIds?: Array<number>; | ||
1612 | +} | ||
1613 | + | ||
1616 | export interface InventoryMaterialStockReq { | 1614 | export interface InventoryMaterialStockReq { |
1617 | auxPropId?: string; | 1615 | auxPropId?: string; |
1618 | isShowStockPosition?: boolean; | 1616 | isShowStockPosition?: boolean; |
@@ -4282,7 +4280,7 @@ export interface ResetPwdVO { | @@ -4282,7 +4280,7 @@ export interface ResetPwdVO { | ||
4282 | 4280 | ||
4283 | export interface Resource { | 4281 | export interface Resource { |
4284 | description?: string; | 4282 | description?: string; |
4285 | - file?: File; | 4283 | + file?: TsgFile; |
4286 | filename?: string; | 4284 | filename?: string; |
4287 | inputStream?: InputStream; | 4285 | inputStream?: InputStream; |
4288 | open?: boolean; | 4286 | open?: boolean; |
@@ -4904,6 +4902,11 @@ export interface UserPrivatePocketBalanceUpdateRequest { | @@ -4904,6 +4902,11 @@ export interface UserPrivatePocketBalanceUpdateRequest { | ||
4904 | * @format int32 | 4902 | * @format int32 |
4905 | */ | 4903 | */ |
4906 | uid?: number; | 4904 | uid?: number; |
4905 | + /** | ||
4906 | + * @description | ||
4907 | + * 修改人 | ||
4908 | + */ | ||
4909 | + updateBy?: string; | ||
4907 | } | 4910 | } |
4908 | 4911 | ||
4909 | export interface UserPrivatePocketDeleteRequest { | 4912 | export interface UserPrivatePocketDeleteRequest { |
@@ -5138,6 +5141,32 @@ export interface CompanyInfo { | @@ -5138,6 +5141,32 @@ export interface CompanyInfo { | ||
5138 | taxIdIsNotNull?: boolean; | 5141 | taxIdIsNotNull?: boolean; |
5139 | } | 5142 | } |
5140 | 5143 | ||
5144 | +export interface TsgFile { | ||
5145 | + absolute?: boolean; | ||
5146 | + absoluteFile?: TsgFile; | ||
5147 | + absolutePath?: string; | ||
5148 | + canonicalFile?: TsgFile; | ||
5149 | + canonicalPath?: string; | ||
5150 | + directory?: boolean; | ||
5151 | + executable?: boolean; | ||
5152 | + file?: boolean; | ||
5153 | + /** @format int64 */ | ||
5154 | + freeSpace?: number; | ||
5155 | + hidden?: boolean; | ||
5156 | + /** @format int64 */ | ||
5157 | + lastModified?: number; | ||
5158 | + name?: string; | ||
5159 | + parent?: string; | ||
5160 | + parentFile?: TsgFile; | ||
5161 | + path?: string; | ||
5162 | + readable?: boolean; | ||
5163 | + /** @format int64 */ | ||
5164 | + totalSpace?: number; | ||
5165 | + /** @format int64 */ | ||
5166 | + usableSpace?: number; | ||
5167 | + writable?: boolean; | ||
5168 | +} | ||
5169 | + | ||
5141 | export interface InvoiceDetail { | 5170 | export interface InvoiceDetail { |
5142 | createByName?: string; | 5171 | createByName?: string; |
5143 | /** @format date-time */ | 5172 | /** @format date-time */ |
src/services/request.ts
@@ -60,6 +60,7 @@ import type { | @@ -60,6 +60,7 @@ import type { | ||
60 | ExchangeRecordsRequestDto, | 60 | ExchangeRecordsRequestDto, |
61 | FeedbackRegistrationDTO, | 61 | FeedbackRegistrationDTO, |
62 | GroupExchangeRecordsRequestDto, | 62 | GroupExchangeRecordsRequestDto, |
63 | + InstallmentPaymentDTO, | ||
63 | InventoryMaterialStockReq, | 64 | InventoryMaterialStockReq, |
64 | InvoiceBatchDownloadDto, | 65 | InvoiceBatchDownloadDto, |
65 | InvoiceDto, | 66 | InvoiceDto, |
@@ -74,7 +75,6 @@ import type { | @@ -74,7 +75,6 @@ import type { | ||
74 | MeasureUnitListRes, | 75 | MeasureUnitListRes, |
75 | MergeIntegralDto, | 76 | MergeIntegralDto, |
76 | MessageQueryDTO, | 77 | MessageQueryDTO, |
77 | - ModelAndView, | ||
78 | OrderAddVO, | 78 | OrderAddVO, |
79 | OrderAuditLogQueryVO, | 79 | OrderAuditLogQueryVO, |
80 | OrderBaseInfoQueryVO, | 80 | OrderBaseInfoQueryVO, |
@@ -4267,7 +4267,9 @@ export interface GetErrorResponse { | @@ -4267,7 +4267,9 @@ export interface GetErrorResponse { | ||
4267 | * @description | 4267 | * @description |
4268 | * OK | 4268 | * OK |
4269 | */ | 4269 | */ |
4270 | - 200: ModelAndView; | 4270 | + 200: { |
4271 | + [propertyName: string]: any; | ||
4272 | + }; | ||
4271 | /** | 4273 | /** |
4272 | * @description | 4274 | * @description |
4273 | * Unauthorized | 4275 | * Unauthorized |
@@ -4288,9 +4290,9 @@ export interface GetErrorResponse { | @@ -4288,9 +4290,9 @@ export interface GetErrorResponse { | ||
4288 | export type GetErrorResponseSuccess = GetErrorResponse[200]; | 4290 | export type GetErrorResponseSuccess = GetErrorResponse[200]; |
4289 | /** | 4291 | /** |
4290 | * @description | 4292 | * @description |
4291 | - * errorHtml | 4293 | + * error |
4292 | * @tags basic-error-controller | 4294 | * @tags basic-error-controller |
4293 | - * @produces text/html | 4295 | + * @produces * |
4294 | */ | 4296 | */ |
4295 | export const getError = /* #__PURE__ */ (() => { | 4297 | export const getError = /* #__PURE__ */ (() => { |
4296 | const method = 'get'; | 4298 | const method = 'get'; |
@@ -4314,7 +4316,9 @@ export interface PutErrorResponse { | @@ -4314,7 +4316,9 @@ export interface PutErrorResponse { | ||
4314 | * @description | 4316 | * @description |
4315 | * OK | 4317 | * OK |
4316 | */ | 4318 | */ |
4317 | - 200: ModelAndView; | 4319 | + 200: { |
4320 | + [propertyName: string]: any; | ||
4321 | + }; | ||
4318 | /** | 4322 | /** |
4319 | * @description | 4323 | * @description |
4320 | * Created | 4324 | * Created |
@@ -4340,9 +4344,9 @@ export interface PutErrorResponse { | @@ -4340,9 +4344,9 @@ export interface PutErrorResponse { | ||
4340 | export type PutErrorResponseSuccess = PutErrorResponse[200]; | 4344 | export type PutErrorResponseSuccess = PutErrorResponse[200]; |
4341 | /** | 4345 | /** |
4342 | * @description | 4346 | * @description |
4343 | - * errorHtml | 4347 | + * error |
4344 | * @tags basic-error-controller | 4348 | * @tags basic-error-controller |
4345 | - * @produces text/html | 4349 | + * @produces * |
4346 | * @consumes application/json | 4350 | * @consumes application/json |
4347 | */ | 4351 | */ |
4348 | export const putError = /* #__PURE__ */ (() => { | 4352 | export const putError = /* #__PURE__ */ (() => { |
@@ -4367,7 +4371,9 @@ export interface PostErrorResponse { | @@ -4367,7 +4371,9 @@ export interface PostErrorResponse { | ||
4367 | * @description | 4371 | * @description |
4368 | * OK | 4372 | * OK |
4369 | */ | 4373 | */ |
4370 | - 200: ModelAndView; | 4374 | + 200: { |
4375 | + [propertyName: string]: any; | ||
4376 | + }; | ||
4371 | /** | 4377 | /** |
4372 | * @description | 4378 | * @description |
4373 | * Created | 4379 | * Created |
@@ -4393,9 +4399,9 @@ export interface PostErrorResponse { | @@ -4393,9 +4399,9 @@ export interface PostErrorResponse { | ||
4393 | export type PostErrorResponseSuccess = PostErrorResponse[200]; | 4399 | export type PostErrorResponseSuccess = PostErrorResponse[200]; |
4394 | /** | 4400 | /** |
4395 | * @description | 4401 | * @description |
4396 | - * errorHtml | 4402 | + * error |
4397 | * @tags basic-error-controller | 4403 | * @tags basic-error-controller |
4398 | - * @produces text/html | 4404 | + * @produces * |
4399 | * @consumes application/json | 4405 | * @consumes application/json |
4400 | */ | 4406 | */ |
4401 | export const postError = /* #__PURE__ */ (() => { | 4407 | export const postError = /* #__PURE__ */ (() => { |
@@ -4420,7 +4426,9 @@ export interface DeleteErrorResponse { | @@ -4420,7 +4426,9 @@ export interface DeleteErrorResponse { | ||
4420 | * @description | 4426 | * @description |
4421 | * OK | 4427 | * OK |
4422 | */ | 4428 | */ |
4423 | - 200: ModelAndView; | 4429 | + 200: { |
4430 | + [propertyName: string]: any; | ||
4431 | + }; | ||
4424 | /** | 4432 | /** |
4425 | * @description | 4433 | * @description |
4426 | * No Content | 4434 | * No Content |
@@ -4441,9 +4449,9 @@ export interface DeleteErrorResponse { | @@ -4441,9 +4449,9 @@ export interface DeleteErrorResponse { | ||
4441 | export type DeleteErrorResponseSuccess = DeleteErrorResponse[200]; | 4449 | export type DeleteErrorResponseSuccess = DeleteErrorResponse[200]; |
4442 | /** | 4450 | /** |
4443 | * @description | 4451 | * @description |
4444 | - * errorHtml | 4452 | + * error |
4445 | * @tags basic-error-controller | 4453 | * @tags basic-error-controller |
4446 | - * @produces text/html | 4454 | + * @produces * |
4447 | */ | 4455 | */ |
4448 | export const deleteError = /* #__PURE__ */ (() => { | 4456 | export const deleteError = /* #__PURE__ */ (() => { |
4449 | const method = 'delete'; | 4457 | const method = 'delete'; |
@@ -4467,7 +4475,9 @@ export interface OptionsErrorResponse { | @@ -4467,7 +4475,9 @@ export interface OptionsErrorResponse { | ||
4467 | * @description | 4475 | * @description |
4468 | * OK | 4476 | * OK |
4469 | */ | 4477 | */ |
4470 | - 200: ModelAndView; | 4478 | + 200: { |
4479 | + [propertyName: string]: any; | ||
4480 | + }; | ||
4471 | /** | 4481 | /** |
4472 | * @description | 4482 | * @description |
4473 | * No Content | 4483 | * No Content |
@@ -4488,9 +4498,9 @@ export interface OptionsErrorResponse { | @@ -4488,9 +4498,9 @@ export interface OptionsErrorResponse { | ||
4488 | export type OptionsErrorResponseSuccess = OptionsErrorResponse[200]; | 4498 | export type OptionsErrorResponseSuccess = OptionsErrorResponse[200]; |
4489 | /** | 4499 | /** |
4490 | * @description | 4500 | * @description |
4491 | - * errorHtml | 4501 | + * error |
4492 | * @tags basic-error-controller | 4502 | * @tags basic-error-controller |
4493 | - * @produces text/html | 4503 | + * @produces * |
4494 | * @consumes application/json | 4504 | * @consumes application/json |
4495 | */ | 4505 | */ |
4496 | export const optionsError = /* #__PURE__ */ (() => { | 4506 | export const optionsError = /* #__PURE__ */ (() => { |
@@ -4515,7 +4525,9 @@ export interface HeadErrorResponse { | @@ -4515,7 +4525,9 @@ export interface HeadErrorResponse { | ||
4515 | * @description | 4525 | * @description |
4516 | * OK | 4526 | * OK |
4517 | */ | 4527 | */ |
4518 | - 200: ModelAndView; | 4528 | + 200: { |
4529 | + [propertyName: string]: any; | ||
4530 | + }; | ||
4519 | /** | 4531 | /** |
4520 | * @description | 4532 | * @description |
4521 | * No Content | 4533 | * No Content |
@@ -4536,9 +4548,9 @@ export interface HeadErrorResponse { | @@ -4536,9 +4548,9 @@ export interface HeadErrorResponse { | ||
4536 | export type HeadErrorResponseSuccess = HeadErrorResponse[200]; | 4548 | export type HeadErrorResponseSuccess = HeadErrorResponse[200]; |
4537 | /** | 4549 | /** |
4538 | * @description | 4550 | * @description |
4539 | - * errorHtml | 4551 | + * error |
4540 | * @tags basic-error-controller | 4552 | * @tags basic-error-controller |
4541 | - * @produces text/html | 4553 | + * @produces * |
4542 | * @consumes application/json | 4554 | * @consumes application/json |
4543 | */ | 4555 | */ |
4544 | export const headError = /* #__PURE__ */ (() => { | 4556 | export const headError = /* #__PURE__ */ (() => { |
@@ -4563,7 +4575,9 @@ export interface PatchErrorResponse { | @@ -4563,7 +4575,9 @@ export interface PatchErrorResponse { | ||
4563 | * @description | 4575 | * @description |
4564 | * OK | 4576 | * OK |
4565 | */ | 4577 | */ |
4566 | - 200: ModelAndView; | 4578 | + 200: { |
4579 | + [propertyName: string]: any; | ||
4580 | + }; | ||
4567 | /** | 4581 | /** |
4568 | * @description | 4582 | * @description |
4569 | * No Content | 4583 | * No Content |
@@ -4584,9 +4598,9 @@ export interface PatchErrorResponse { | @@ -4584,9 +4598,9 @@ export interface PatchErrorResponse { | ||
4584 | export type PatchErrorResponseSuccess = PatchErrorResponse[200]; | 4598 | export type PatchErrorResponseSuccess = PatchErrorResponse[200]; |
4585 | /** | 4599 | /** |
4586 | * @description | 4600 | * @description |
4587 | - * errorHtml | 4601 | + * error |
4588 | * @tags basic-error-controller | 4602 | * @tags basic-error-controller |
4589 | - * @produces text/html | 4603 | + * @produces * |
4590 | * @consumes application/json | 4604 | * @consumes application/json |
4591 | */ | 4605 | */ |
4592 | export const patchError = /* #__PURE__ */ (() => { | 4606 | export const patchError = /* #__PURE__ */ (() => { |
@@ -23367,6 +23381,77 @@ export const postServiceOrderGetReissueInfo = /* #__PURE__ */ (() => { | @@ -23367,6 +23381,77 @@ export const postServiceOrderGetReissueInfo = /* #__PURE__ */ (() => { | ||
23367 | return request; | 23381 | return request; |
23368 | })(); | 23382 | })(); |
23369 | 23383 | ||
23384 | +/** @description request parameter type for postServiceOrderHirePurchase */ | ||
23385 | +export interface PostServiceOrderHirePurchaseOption { | ||
23386 | + /** | ||
23387 | + * @description | ||
23388 | + * dto | ||
23389 | + */ | ||
23390 | + body: { | ||
23391 | + /** | ||
23392 | + @description | ||
23393 | + dto */ | ||
23394 | + dto: InstallmentPaymentDTO; | ||
23395 | + }; | ||
23396 | +} | ||
23397 | + | ||
23398 | +/** @description response type for postServiceOrderHirePurchase */ | ||
23399 | +export interface PostServiceOrderHirePurchaseResponse { | ||
23400 | + /** | ||
23401 | + * @description | ||
23402 | + * OK | ||
23403 | + */ | ||
23404 | + 200: ServerResult; | ||
23405 | + /** | ||
23406 | + * @description | ||
23407 | + * Created | ||
23408 | + */ | ||
23409 | + 201: any; | ||
23410 | + /** | ||
23411 | + * @description | ||
23412 | + * Unauthorized | ||
23413 | + */ | ||
23414 | + 401: any; | ||
23415 | + /** | ||
23416 | + * @description | ||
23417 | + * Forbidden | ||
23418 | + */ | ||
23419 | + 403: any; | ||
23420 | + /** | ||
23421 | + * @description | ||
23422 | + * Not Found | ||
23423 | + */ | ||
23424 | + 404: any; | ||
23425 | +} | ||
23426 | + | ||
23427 | +export type PostServiceOrderHirePurchaseResponseSuccess = | ||
23428 | + PostServiceOrderHirePurchaseResponse[200]; | ||
23429 | +/** | ||
23430 | + * @description | ||
23431 | + * 分期付款 | ||
23432 | + * @tags 内部订单 | ||
23433 | + * @produces * | ||
23434 | + * @consumes application/json | ||
23435 | + */ | ||
23436 | +export const postServiceOrderHirePurchase = /* #__PURE__ */ (() => { | ||
23437 | + const method = 'post'; | ||
23438 | + const url = '/service/order/hirePurchase'; | ||
23439 | + function request( | ||
23440 | + option: PostServiceOrderHirePurchaseOption, | ||
23441 | + ): Promise<PostServiceOrderHirePurchaseResponseSuccess> { | ||
23442 | + return requester(request.url, { | ||
23443 | + method: request.method, | ||
23444 | + ...option, | ||
23445 | + }) as unknown as Promise<PostServiceOrderHirePurchaseResponseSuccess>; | ||
23446 | + } | ||
23447 | + | ||
23448 | + /** http method */ | ||
23449 | + request.method = method; | ||
23450 | + /** request url */ | ||
23451 | + request.url = url; | ||
23452 | + return request; | ||
23453 | +})(); | ||
23454 | + | ||
23370 | /** @description request parameter type for postServiceOrderImportExcel */ | 23455 | /** @description request parameter type for postServiceOrderImportExcel */ |
23371 | export interface PostServiceOrderImportExcelOption { | 23456 | export interface PostServiceOrderImportExcelOption { |
23372 | /** | 23457 | /** |