Commit f8f768b072203119a03f5956925af06bb2b65db4
1 parent
4681a0ab
feat: 售后
Showing
5 changed files
with
124 additions
and
6 deletions
.umirc.ts
@@ -14,9 +14,9 @@ export default defineConfig({ | @@ -14,9 +14,9 @@ export default defineConfig({ | ||
14 | }, | 14 | }, |
15 | proxy: { | 15 | proxy: { |
16 | '/api/': { | 16 | '/api/': { |
17 | - target: 'http://localhost:8085/', | 17 | + // target: 'http://localhost:8085/', |
18 | // target: 'http://192.168.1.6:8085/', | 18 | // target: 'http://192.168.1.6:8085/', |
19 | - // target: 'http://39.108.227.113:8085/', | 19 | + target: 'http://39.108.227.113:8085/', |
20 | changeOrigin: true, | 20 | changeOrigin: true, |
21 | pathRewrite: { '^/api': '' }, | 21 | pathRewrite: { '^/api': '' }, |
22 | }, | 22 | }, |
@@ -51,7 +51,6 @@ export default defineConfig({ | @@ -51,7 +51,6 @@ export default defineConfig({ | ||
51 | { | 51 | { |
52 | name: '订单预警', | 52 | name: '订单预警', |
53 | path: 'OrderWarning', | 53 | path: 'OrderWarning', |
54 | - access: 'canReadAdminAndSales', | ||
55 | component: './Order/OrderWarning', | 54 | component: './Order/OrderWarning', |
56 | }, | 55 | }, |
57 | { | 56 | { |
@@ -149,7 +148,7 @@ export default defineConfig({ | @@ -149,7 +148,7 @@ export default defineConfig({ | ||
149 | name: '客户管理', | 148 | name: '客户管理', |
150 | path: '/Client', | 149 | path: '/Client', |
151 | icon: 'BookOutlined', | 150 | icon: 'BookOutlined', |
152 | - access: 'canReadAdminAndSalesAndWarehouseKeeper', | 151 | + access: 'canReadAdminAndSales', |
153 | routes: [ | 152 | routes: [ |
154 | { | 153 | { |
155 | name: '客户列表', | 154 | name: '客户列表', |
src/pages/Order/FeedBack/OrderList.tsx
@@ -8,6 +8,7 @@ import { | @@ -8,6 +8,7 @@ import { | ||
8 | postKingdeeRepSalOrderSave, | 8 | postKingdeeRepSalOrderSave, |
9 | postServiceConstCanApplyAfterInvoicingStatus, | 9 | postServiceConstCanApplyAfterInvoicingStatus, |
10 | postServiceInvoiceCancelApply, | 10 | postServiceInvoiceCancelApply, |
11 | + postServiceOrderAfterSalesCheck, | ||
11 | postServiceOrderCancelSend, | 12 | postServiceOrderCancelSend, |
12 | postServiceOrderConfirmInvoice, | 13 | postServiceOrderConfirmInvoice, |
13 | postServiceOrderGetCurrentOptNode, | 14 | postServiceOrderGetCurrentOptNode, |
@@ -412,6 +413,16 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -412,6 +413,16 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
412 | return null; | 413 | return null; |
413 | } | 414 | } |
414 | 415 | ||
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 | + } | ||
425 | + | ||
415 | /** | 426 | /** |
416 | * 返回当前操作的主订单数据 | 427 | * 返回当前操作的主订单数据 |
417 | */ | 428 | */ |
@@ -728,7 +739,8 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -728,7 +739,8 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
728 | 739 | ||
729 | if ( | 740 | if ( |
730 | orderStatus === 'AFTER_SALES_COMPLETION' || | 741 | orderStatus === 'AFTER_SALES_COMPLETION' || |
731 | - orderStatus === 'IN_AFTER_SALES' | 742 | + orderStatus === 'IN_AFTER_SALES' || |
743 | + orderStatus === 'AFTER_SALES_CHECK' | ||
732 | ) { | 744 | ) { |
733 | return ( | 745 | return ( |
734 | <Tag | 746 | <Tag |
@@ -1894,6 +1906,29 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1894,6 +1906,29 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1894 | '' | 1906 | '' |
1895 | )} | 1907 | )} |
1896 | 1908 | ||
1909 | + {optRecord.paths?.includes('afterSalesConfirm') ? ( | ||
1910 | + <ButtonConfirm | ||
1911 | + className="p-0" | ||
1912 | + title="确认通过?" | ||
1913 | + text="售后已审核待确认" | ||
1914 | + onConfirm={() => { | ||
1915 | + setIsMainOrder(false); | ||
1916 | + doAfterSalesCheck({ | ||
1917 | + applyType: 'after-sales', | ||
1918 | + isAfterSalesSuccess: true, | ||
1919 | + subOrderIds: isMainOrder | ||
1920 | + ? [...record.subOrderInformationLists] | ||
1921 | + .flat() | ||
1922 | + ?.map((subOrder) => subOrder.id) | ||
1923 | + : [optRecord.id], | ||
1924 | + mainId: record.id, | ||
1925 | + }); | ||
1926 | + }} | ||
1927 | + /> | ||
1928 | + ) : ( | ||
1929 | + '' | ||
1930 | + )} | ||
1931 | + | ||
1897 | {optRecord.paths?.includes('financeCheckOrder') ? ( | 1932 | {optRecord.paths?.includes('financeCheckOrder') ? ( |
1898 | <Button | 1933 | <Button |
1899 | className="p-0" | 1934 | className="p-0" |
@@ -3626,6 +3661,27 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -3626,6 +3661,27 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
3626 | '' | 3661 | '' |
3627 | )} | 3662 | )} |
3628 | 3663 | ||
3664 | + {record.paths?.includes('afterSalesConfirm') ? ( | ||
3665 | + <ButtonConfirm | ||
3666 | + className="p-0" | ||
3667 | + title="确认通过?" | ||
3668 | + text="售后已审核待确认" | ||
3669 | + onConfirm={() => { | ||
3670 | + setIsMainOrder(true); | ||
3671 | + doAfterSalesCheck({ | ||
3672 | + applyType: 'after-sales', | ||
3673 | + isAfterSalesSuccess: true, | ||
3674 | + subOrderIds: [...record.subOrderInformationLists] | ||
3675 | + .flat() | ||
3676 | + ?.map((subOrder) => subOrder.id), | ||
3677 | + mainId: record.id, | ||
3678 | + }); | ||
3679 | + }} | ||
3680 | + /> | ||
3681 | + ) : ( | ||
3682 | + '' | ||
3683 | + )} | ||
3684 | + | ||
3629 | {record.paths?.includes('noNeedSend') ? ( | 3685 | {record.paths?.includes('noNeedSend') ? ( |
3630 | <ButtonConfirm | 3686 | <ButtonConfirm |
3631 | className="p-0" | 3687 | className="p-0" |
@@ -4230,6 +4286,9 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -4230,6 +4286,9 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
4230 | afterSalesRadios.push(<Radio value={0}>全部</Radio>); | 4286 | afterSalesRadios.push(<Radio value={0}>全部</Radio>); |
4231 | afterSalesRadios.push(<Radio value={'IN_AFTER_SALES'}>售后中</Radio>); | 4287 | afterSalesRadios.push(<Radio value={'IN_AFTER_SALES'}>售后中</Radio>); |
4232 | afterSalesRadios.push( | 4288 | afterSalesRadios.push( |
4289 | + <Radio value={'AFTER_SALES_CHECK'}>售后已审核</Radio>, | ||
4290 | + ); | ||
4291 | + afterSalesRadios.push( | ||
4233 | <Radio value={'AFTER_SALES_COMPLETION'}>售后完成</Radio>, | 4292 | <Radio value={'AFTER_SALES_COMPLETION'}>售后完成</Radio>, |
4234 | ); | 4293 | ); |
4235 | afterSalesRadios.push( | 4294 | afterSalesRadios.push( |
@@ -4703,7 +4762,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -4703,7 +4762,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
4703 | // @ts-ignore | 4762 | // @ts-ignore |
4704 | sorter, | 4763 | sorter, |
4705 | filter, | 4764 | filter, |
4706 | - data: { ...params, ...paramsNew }, | 4765 | + data: { ...params, ...paramsNew, currentPath: 'feedBack' }, |
4707 | }); | 4766 | }); |
4708 | 4767 | ||
4709 | setRolePath(data.specialPath); | 4768 | setRolePath(data.specialPath); |
src/pages/Order/FeedBack/constant.ts
@@ -196,6 +196,7 @@ export const ORDER_STATUS_OPTIONS = { | @@ -196,6 +196,7 @@ export const ORDER_STATUS_OPTIONS = { | ||
196 | CONFIRM_RECEIPT: '确认收货', | 196 | CONFIRM_RECEIPT: '确认收货', |
197 | AUDIT_FAILED: '审核失败', | 197 | AUDIT_FAILED: '审核失败', |
198 | IN_AFTER_SALES: '售后中', | 198 | IN_AFTER_SALES: '售后中', |
199 | + AFTER_SALES_CHECK: '售后已审核', | ||
199 | AFTER_SALES_COMPLETION: '售后完成', | 200 | AFTER_SALES_COMPLETION: '售后完成', |
200 | AFTER_SALES_FAILURE: '售后失败', | 201 | AFTER_SALES_FAILURE: '售后失败', |
201 | NO_NEED_SEND: '无需发货', | 202 | NO_NEED_SEND: '无需发货', |
@@ -275,6 +276,7 @@ export const TAGS_COLOR = new Map<string, string>([ | @@ -275,6 +276,7 @@ export const TAGS_COLOR = new Map<string, string>([ | ||
275 | ['SUPPLIER_WAIT_SHIP', 'processing'], | 276 | ['SUPPLIER_WAIT_SHIP', 'processing'], |
276 | ['SUPPLIER_SHIPPED', 'processing'], | 277 | ['SUPPLIER_SHIPPED', 'processing'], |
277 | ['IN_AFTER_SALES', 'red'], | 278 | ['IN_AFTER_SALES', 'red'], |
279 | + ['AFTER_SALES_CHECK', 'red'], | ||
278 | ['AFTER_SALES_COMPLETION', 'red'], | 280 | ['AFTER_SALES_COMPLETION', 'red'], |
279 | ['PROCURE_PROCESS_FOR_MINE', 'processing'], | 281 | ['PROCURE_PROCESS_FOR_MINE', 'processing'], |
280 | ['PROCURE_WAIT_SHIP', 'processing'], | 282 | ['PROCURE_WAIT_SHIP', 'processing'], |
@@ -584,6 +586,7 @@ export const MAIN_ORDER_COLUMNS = [ | @@ -584,6 +586,7 @@ export const MAIN_ORDER_COLUMNS = [ | ||
584 | ([key]) => | 586 | ([key]) => |
585 | [ | 587 | [ |
586 | 'IN_AFTER_SALES', | 588 | 'IN_AFTER_SALES', |
589 | + 'AFTER_SALES_CHECK', | ||
587 | 'AFTER_SALES_COMPLETION', | 590 | 'AFTER_SALES_COMPLETION', |
588 | 'AFTER_SALES_FAILURE', | 591 | 'AFTER_SALES_FAILURE', |
589 | ].includes(key), | 592 | ].includes(key), |
src/pages/Order/OrderList/OrderList.tsx
@@ -9,6 +9,7 @@ import { | @@ -9,6 +9,7 @@ import { | ||
9 | postKingdeeRepSalOrderSave, | 9 | postKingdeeRepSalOrderSave, |
10 | postServiceConstCanApplyAfterInvoicingStatus, | 10 | postServiceConstCanApplyAfterInvoicingStatus, |
11 | postServiceInvoiceCancelApply, | 11 | postServiceInvoiceCancelApply, |
12 | + postServiceOrderAfterSalesCheck, | ||
12 | postServiceOrderCancelSend, | 13 | postServiceOrderCancelSend, |
13 | postServiceOrderConfirmInvoice, | 14 | postServiceOrderConfirmInvoice, |
14 | postServiceOrderGetCurrentOptNode, | 15 | postServiceOrderGetCurrentOptNode, |
@@ -562,6 +563,16 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -562,6 +563,16 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
562 | } | 563 | } |
563 | }; | 564 | }; |
564 | 565 | ||
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 | + } | ||
575 | + | ||
565 | const onCheckboxChange = (record: never) => { | 576 | const onCheckboxChange = (record: never) => { |
566 | let newSelectedMainOrderKeys = []; | 577 | let newSelectedMainOrderKeys = []; |
567 | if (selectedMainOrderKeys.includes(record.id)) { | 578 | if (selectedMainOrderKeys.includes(record.id)) { |
@@ -1908,6 +1919,29 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -1908,6 +1919,29 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
1908 | '' | 1919 | '' |
1909 | )} | 1920 | )} |
1910 | 1921 | ||
1922 | + {optRecord.paths?.includes('afterSalesConfirm') ? ( | ||
1923 | + <ButtonConfirm | ||
1924 | + className="p-0" | ||
1925 | + title="确认通过?" | ||
1926 | + text="售后已审核待确认" | ||
1927 | + onConfirm={() => { | ||
1928 | + setIsMainOrder(false); | ||
1929 | + doAfterSalesCheck({ | ||
1930 | + applyType: 'after-sales', | ||
1931 | + isAfterSalesSuccess: true, | ||
1932 | + subOrderIds: isMainOrder | ||
1933 | + ? [...record.subOrderInformationLists] | ||
1934 | + .flat() | ||
1935 | + ?.map((subOrder) => subOrder.id) | ||
1936 | + : [optRecord.id], | ||
1937 | + mainId: record.id, | ||
1938 | + }); | ||
1939 | + }} | ||
1940 | + /> | ||
1941 | + ) : ( | ||
1942 | + '' | ||
1943 | + )} | ||
1944 | + | ||
1911 | {optRecord.paths?.includes('financeCheckOrder') ? ( | 1945 | {optRecord.paths?.includes('financeCheckOrder') ? ( |
1912 | <Button | 1946 | <Button |
1913 | className="p-0" | 1947 | className="p-0" |
@@ -3640,6 +3674,27 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | @@ -3640,6 +3674,27 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) => { | ||
3640 | '' | 3674 | '' |
3641 | )} | 3675 | )} |
3642 | 3676 | ||
3677 | + {record.paths?.includes('afterSalesConfirm') ? ( | ||
3678 | + <ButtonConfirm | ||
3679 | + className="p-0" | ||
3680 | + title="确认通过?" | ||
3681 | + text="售后已审核待确认" | ||
3682 | + onConfirm={() => { | ||
3683 | + setIsMainOrder(true); | ||
3684 | + doAfterSalesCheck({ | ||
3685 | + applyType: 'after-sales', | ||
3686 | + isAfterSalesSuccess: true, | ||
3687 | + subOrderIds: [...record.subOrderInformationLists] | ||
3688 | + .flat() | ||
3689 | + ?.map((subOrder) => subOrder.id), | ||
3690 | + mainId: record.id, | ||
3691 | + }); | ||
3692 | + }} | ||
3693 | + /> | ||
3694 | + ) : ( | ||
3695 | + '' | ||
3696 | + )} | ||
3697 | + | ||
3643 | {record.paths?.includes('noNeedSend') ? ( | 3698 | {record.paths?.includes('noNeedSend') ? ( |
3644 | <ButtonConfirm | 3699 | <ButtonConfirm |
3645 | className="p-0" | 3700 | className="p-0" |
src/pages/Order/constant.ts
@@ -197,6 +197,7 @@ export const ORDER_STATUS_OPTIONS = { | @@ -197,6 +197,7 @@ export const ORDER_STATUS_OPTIONS = { | ||
197 | CONFIRM_RECEIPT: '确认收货', | 197 | CONFIRM_RECEIPT: '确认收货', |
198 | AUDIT_FAILED: '审核失败', | 198 | AUDIT_FAILED: '审核失败', |
199 | IN_AFTER_SALES: '售后中', | 199 | IN_AFTER_SALES: '售后中', |
200 | + AFTER_SALES_CHECK: '售后已审核', | ||
200 | AFTER_SALES_COMPLETION: '售后完成', | 201 | AFTER_SALES_COMPLETION: '售后完成', |
201 | AFTER_SALES_FAILURE: '售后失败', | 202 | AFTER_SALES_FAILURE: '售后失败', |
202 | NO_NEED_SEND: '无需发货', | 203 | NO_NEED_SEND: '无需发货', |
@@ -270,6 +271,7 @@ export const TAGS_COLOR = new Map<string, string>([ | @@ -270,6 +271,7 @@ export const TAGS_COLOR = new Map<string, string>([ | ||
270 | ['SUPPLIER_WAIT_SHIP', 'processing'], | 271 | ['SUPPLIER_WAIT_SHIP', 'processing'], |
271 | ['SUPPLIER_SHIPPED', 'processing'], | 272 | ['SUPPLIER_SHIPPED', 'processing'], |
272 | ['IN_AFTER_SALES', 'red'], | 273 | ['IN_AFTER_SALES', 'red'], |
274 | + ['AFTER_SALES_CHECK', 'red'], | ||
273 | ['AFTER_SALES_COMPLETION', 'red'], | 275 | ['AFTER_SALES_COMPLETION', 'red'], |
274 | ['PROCURE_PROCESS_FOR_MINE', 'processing'], | 276 | ['PROCURE_PROCESS_FOR_MINE', 'processing'], |
275 | ['PROCURE_WAIT_SHIP', 'processing'], | 277 | ['PROCURE_WAIT_SHIP', 'processing'], |