Commit 88238577 authored by XieZhiXiong's avatar XieZhiXiong

chore: 删除 确认本单所有退款到账按钮相关

parent 61c91834
......@@ -8,10 +8,6 @@ export default {
'returnApplication.returnPrConfirmBack.back':'Confirm return slip',
'returnApplication.returnPrConfirmFinish.finish':'Confirm after-sales completion',
'returnApplication.returnPrConfirmResult.allRefund':'Confirm that all refunds of this order are received',
'returnApplication.returnPrConfirmResult.allRefund.tip':'Tips',
'returnApplication.returnPrConfirmResult.allRefund.content':'Are all refunds of this order confirmed to the account? ',
'returnApplication.returnPrDeliver.allRefund.deliver':'Return Delivery',
......
......@@ -8,10 +8,6 @@ export default {
'returnApplication.returnPrConfirmBack.back': '반품 확인서',
'returnApplication.returnPrConfirmFinish.finish': '판매 후 완료 확인',
'returnApplication.returnPrConfirmResult.allRefund': '본 계약서의 모든 환불 입금을 확인하다',
'returnApplication.returnPrConfirmResult.allRefund.tip': '프롬프트',
'returnApplication.returnPrConfirmResult.allRefund.content': '본 계약서의 모든 환불이 입금되었습니까?',
'returnApplication.returnPrDeliver.allRefund.deliver': '반품 출하',
......
......@@ -8,10 +8,6 @@ export default {
'returnApplication.returnPrConfirmBack.back': '确认退货回单',
'returnApplication.returnPrConfirmFinish.finish': '确认售后完成',
'returnApplication.returnPrConfirmResult.allRefund': '确认本单所有退款到账',
'returnApplication.returnPrConfirmResult.allRefund.tip': '提示',
'returnApplication.returnPrConfirmResult.allRefund.content': '是否本单所有退款确认到账?',
'returnApplication.returnPrDeliver.allRefund.deliver': '退货发货',
......
......@@ -6,65 +6,16 @@
* @Description:
*/
import React from 'react';
import { Button, Modal } from 'antd';
import { history, useIntl } from 'umi';
import { postAsReturnGoodsConfirmAllRefund } from '@/services/AfterServiceV2Api';
import { FormOutlined, ExclamationCircleOutlined } from '@ant-design/icons';
import { usePageStatus } from '@/hooks/usePageStatus';
import { REFUND_OUTER_STATUS_RECEIVED, REFUND_OUTER_STATUS_NEED_NOT } from '../../constants';
import DetailInfo, { DetailInfoData } from '../components/DetailInfo';
const { confirm } = Modal;
import DetailInfo from '../components/DetailInfo';
const ReturnPrConfirmResultVerify: React.FC = () => {
const { id } = usePageStatus();
const intl = useIntl();
const handleSubmit = values => {
if (!id) {
return;
}
confirm({
title: intl.formatMessage({ id: 'returnApplication.returnPrConfirmResult.allRefund.tip' }, { default: '提示' }),
icon: <ExclamationCircleOutlined />,
content: intl.formatMessage({ id: 'returnApplication.returnPrConfirmResult.allRefund.content' }, { default: '是否本单所有退款确认到账?' }),
onOk() {
return postAsReturnGoodsConfirmAllRefund({
dataId: +id,
}).then(res => {
if (res.code === 1000) {
history.goBack();
}
});
},
});
};
return (
<>
<DetailInfo
id={id}
headExtra={(info: DetailInfoData) => {
const { refundList = [] } = info || {};
// 是否全部已退款,只有当退款明细中所有退款金额大于0的记录的状态都为确认退款到账时本按钮才可点击
// 或 该批次无需退款
const isAllRefunded =
refundList.every((item) => item.detailList.every((detail) => (detail.refundAmount > 0 && detail.outerStatus === REFUND_OUTER_STATUS_RECEIVED) || detail.outerStatus === REFUND_OUTER_STATUS_NEED_NOT));
return [
isAllRefunded ? (
<Button
type="primary"
icon={<FormOutlined />}
onClick={handleSubmit}
key="confirmAllRefunded"
>
{intl.formatMessage({ id: 'returnApplication.returnPrConfirmResult.allRefund' }, { default: '确认本单所有退款到账' })}
</Button>
) : null,
]
}}
target="/memberCenter/afterService/returnApplication/returnPrConfirmResult"
isEditRefund
/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment