zksu
/
WEB
forked from yoone/WEB
1
0
Fork 0

refactor(Order/List): 更新退款相关状态标签为更简洁的表达

refund_approved 已退款
refund_cancelled 已完成
This commit is contained in:
tikkhun 2025-10-14 11:13:06 +08:00
parent 37c8518289
commit 87534c4d22
1 changed files with 39 additions and 36 deletions

View File

@ -128,11 +128,13 @@ const ListPage: React.FC = () => {
}, },
{ {
key: 'refund_approved', key: 'refund_approved',
label: '退款申请已通过', label: "已退款",
// label: '退款申请已通过',
}, },
{ {
key: 'refund_cancelled', key: 'refund_cancelled',
label: '已取消退款', label: "已完成"
// label: '已取消退款',
}, },
// { // {
// key: 'pending_refund', // key: 'pending_refund',
@ -289,7 +291,7 @@ const ListPage: React.FC = () => {
record.orderStatus, record.orderStatus,
) ? ( ) ? (
<> <>
<Shipping id={record.id as number} tableRef={actionRef} setActiveLine={setActiveLine}/> <Shipping id={record.id as number} tableRef={actionRef} setActiveLine={setActiveLine} />
<Divider type="vertical" /> <Divider type="vertical" />
</> </>
) : ( ) : (
@ -419,7 +421,7 @@ const ListPage: React.FC = () => {
actionRef={actionRef} actionRef={actionRef}
rowKey="id" rowKey="id"
rowClassName={(record) => { rowClassName={(record) => {
return record.id === activeLine ? styles['selected-line-order-protable']: ''; return record.id === activeLine ? styles['selected-line-order-protable'] : '';
}} }}
toolBarRender={() => [ toolBarRender={() => [
<CreateOrder tableRef={actionRef} />, <CreateOrder tableRef={actionRef} />,
@ -765,7 +767,8 @@ const Detail: React.FC<{
<ProDescriptions.Item label="金额" dataIndex="total" /> <ProDescriptions.Item label="金额" dataIndex="total" />
<ProDescriptions.Item label="客户邮箱" dataIndex="customer_email" /> <ProDescriptions.Item label="客户邮箱" dataIndex="customer_email" />
<ProDescriptions.Item label="联系电话" span={3} <ProDescriptions.Item label="联系电话" span={3}
render={(_, record) => { return ( render={(_, record) => {
return (
<div> <div>
<span> <span>
{record?.shipping?.phone || record?.billing?.phone || '-'} {record?.shipping?.phone || record?.billing?.phone || '-'}
@ -1990,7 +1993,7 @@ const SalesChange: React.FC<{
}} }}
onFinish={async (formData: any) => { onFinish={async (formData: any) => {
const { sales } = formData; const { sales } = formData;
const res = await ordercontrollerUpdateorderitems({orderId:id}, sales); const res = await ordercontrollerUpdateorderitems({ orderId: id }, sales);
if (!res.success) { if (!res.success) {
message.error(`更新货物信息失败: ${res.message}`); message.error(`更新货物信息失败: ${res.message}`);
return false; return false;
@ -2006,7 +2009,7 @@ const SalesChange: React.FC<{
> >
<ProForm.Group> <ProForm.Group>
<ProFormSelect <ProFormSelect
params={{ }} params={{}}
request={async ({ keyWords }) => { request={async ({ keyWords }) => {
try { try {
const { data } = await productcontrollerSearchproducts({ const { data } = await productcontrollerSearchproducts({