Commit 406f52372a332fba420d14183469970874a706be
1 parent
62bc5c39
feat: updat
Showing
2 changed files
with
8 additions
and
9 deletions
src/pages/Order/components/OrderDrawer.tsx
... | ... | @@ -326,11 +326,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { |
326 | 326 | values.filePaths = values.filePaths?.map((file) => { |
327 | 327 | return { url: file.response.data[0] }; |
328 | 328 | }); |
329 | - let res = await postServiceOrderApplyAfterSales({ data: values }); | |
330 | - if (res?.result === RESPONSE_CODE.SUCCESS) { | |
331 | - message.success(res.message); | |
332 | - onClose(); | |
333 | - } | |
329 | + res = await postServiceOrderApplyAfterSales({ data: values }); | |
334 | 330 | } |
335 | 331 | } |
336 | 332 | ... | ... |
src/pages/Order/index.tsx
... | ... | @@ -1049,21 +1049,22 @@ const OrderPage = () => { |
1049 | 1049 | '' |
1050 | 1050 | )} |
1051 | 1051 | |
1052 | - {/* {optRecord.subPath?.includes('applyAfterSales') ? ( | |
1052 | + {optRecord.subPath?.includes('applyAfterSales') ? ( | |
1053 | 1053 | <Button |
1054 | 1054 | className="p-0" |
1055 | 1055 | type="link" |
1056 | 1056 | onClick={() => { |
1057 | - setAfterSalesDrawerVisible(true); | |
1058 | 1057 | setSelectedRows([optRecord]); |
1058 | + setOrderDrawerVisible(true); | |
1059 | 1059 | setOrderRow(record); |
1060 | + setOrderOptType('after-sales'); | |
1060 | 1061 | }} |
1061 | 1062 | > |
1062 | 1063 | 申请售后 |
1063 | 1064 | </Button> |
1064 | 1065 | ) : ( |
1065 | 1066 | '' |
1066 | - )} */} | |
1067 | + )} | |
1067 | 1068 | |
1068 | 1069 | {optRecord.subPath?.includes('afterSalesCompletion') ? ( |
1069 | 1070 | <ButtonConfirm |
... | ... | @@ -1918,7 +1919,9 @@ const OrderPage = () => { |
1918 | 1919 | for (let i = 0; i < selectedSubOrders.length; i++) { |
1919 | 1920 | if ( |
1920 | 1921 | selectedSubOrders[i].orderStatus !== |
1921 | - 'CONFIRM_RECEIPT' | |
1922 | + 'CONFIRM_RECEIPT' && | |
1923 | + selectedSubOrders[i].orderStatus !== | |
1924 | + 'AFTER_SALES_FAILURE' | |
1922 | 1925 | ) { |
1923 | 1926 | message.error('请选择确认收货状态的子订单进行售后'); |
1924 | 1927 | return; | ... | ... |