forked from yoone/WEB
Compare commits
No commits in common. "e5794c3d25fdab5ee2c674906ddde285478881b7" and "1843a16dd7cf315b9b7e9804cd3d58a71895efe2" have entirely different histories.
e5794c3d25
...
1843a16dd7
|
|
@ -105,16 +105,4 @@ export const ORDER_STATUS_ENUM: ProSchemaValueEnumObj = {
|
||||||
text: '待退款',
|
text: '待退款',
|
||||||
status: 'warning',
|
status: 'warning',
|
||||||
},
|
},
|
||||||
refund_requested: {
|
|
||||||
text: '已申请退款',
|
|
||||||
status: 'refund_approved',
|
|
||||||
},
|
|
||||||
refund_approved: {
|
|
||||||
text: '退款申请已通过',
|
|
||||||
status: 'refund_approved',
|
|
||||||
},
|
|
||||||
refund_cancelled: {
|
|
||||||
text: '已取消退款',
|
|
||||||
status: 'refund_cancelled',
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ import {
|
||||||
ordercontrollerUpdateorderitems,
|
ordercontrollerUpdateorderitems,
|
||||||
} from '@/servers/api/order';
|
} from '@/servers/api/order';
|
||||||
import { productcontrollerSearchproducts } from '@/servers/api/product';
|
import { productcontrollerSearchproducts } from '@/servers/api/product';
|
||||||
import { wpproductcontrollerSearchproducts } from '@/servers/api/wpProduct';
|
|
||||||
import { sitecontrollerAll } from '@/servers/api/site';
|
import { sitecontrollerAll } from '@/servers/api/site';
|
||||||
import { stockcontrollerGetallstockpoints } from '@/servers/api/stock';
|
import { stockcontrollerGetallstockpoints } from '@/servers/api/stock';
|
||||||
import { formatShipmentState, formatSource } from '@/utils/format';
|
import { formatShipmentState, formatSource } from '@/utils/format';
|
||||||
|
|
@ -123,18 +122,6 @@ const ListPage: React.FC = () => {
|
||||||
key: 'pending_reshipment',
|
key: 'pending_reshipment',
|
||||||
label: '待补发',
|
label: '待补发',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
key: 'refund_requested',
|
|
||||||
label: '已申请退款',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'refund_approved',
|
|
||||||
label: '退款申请已通过',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'refund_cancelled',
|
|
||||||
label: '已取消退款',
|
|
||||||
},
|
|
||||||
// {
|
// {
|
||||||
// key: 'pending_refund',
|
// key: 'pending_refund',
|
||||||
// label: '待退款',
|
// label: '待退款',
|
||||||
|
|
@ -223,11 +210,6 @@ const ListPage: React.FC = () => {
|
||||||
title: '联系电话',
|
title: '联系电话',
|
||||||
dataIndex: 'billing_phone',
|
dataIndex: 'billing_phone',
|
||||||
render: (_, record) => record.shipping?.phone || record.billing?.phone,
|
render: (_, record) => record.shipping?.phone || record.billing?.phone,
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '换货次数',
|
|
||||||
dataIndex: 'exchange_frequency',
|
|
||||||
hideInSearch: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '州',
|
title: '州',
|
||||||
|
|
@ -772,11 +754,11 @@ const Detail: React.FC<{
|
||||||
<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 || '-'}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}} />
|
}} />
|
||||||
<ProDescriptions.Item label="交易Id" dataIndex="transaction_id" />
|
<ProDescriptions.Item label="交易Id" dataIndex="transaction_id" />
|
||||||
|
|
@ -1986,20 +1968,17 @@ const SalesChange: React.FC<{
|
||||||
},
|
},
|
||||||
[],
|
[],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// setOptions(
|
// setOptions(
|
||||||
// data.sales?.map((item) => ({
|
// data.sales?.map((item) => ({
|
||||||
// label: item.name,
|
// label: item.name,
|
||||||
// value: item.sku,
|
// value: item.sku,
|
||||||
// })) || [],
|
// })) || [],
|
||||||
// );
|
// );
|
||||||
return { ...data};
|
return { ...data };
|
||||||
}}
|
}}
|
||||||
onFinish={async (formData: any) => {
|
onFinish={async (formData: any) => {
|
||||||
const { sales,items } = formData;
|
const { sales } = formData;
|
||||||
const data ={sales,items }
|
const res = await ordercontrollerUpdateorderitems({orderId:id}, sales);
|
||||||
const res = await ordercontrollerUpdateorderitems({orderId:id}, data);
|
|
||||||
if (!res.success) {
|
if (!res.success) {
|
||||||
message.error(`更新货物信息失败: ${res.message}`);
|
message.error(`更新货物信息失败: ${res.message}`);
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -2009,63 +1988,11 @@ const SalesChange: React.FC<{
|
||||||
return true;
|
return true;
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ProFormList
|
|
||||||
label="换货订单"
|
|
||||||
name="items"
|
|
||||||
>
|
|
||||||
<ProForm.Group>
|
|
||||||
|
|
||||||
<ProFormSelect
|
|
||||||
params={{ }}
|
|
||||||
request={async ({ keyWords }) => {
|
|
||||||
try {
|
|
||||||
const { data } = await wpproductcontrollerSearchproducts({
|
|
||||||
name: keyWords,
|
|
||||||
});
|
|
||||||
return (
|
|
||||||
data?.map((item) => {
|
|
||||||
return {
|
|
||||||
label: `${item.name}`,
|
|
||||||
value: item?.sku,
|
|
||||||
};
|
|
||||||
})
|
|
||||||
);
|
|
||||||
} catch (error) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
name="sku"
|
|
||||||
label="订单"
|
|
||||||
placeholder="请选择订单"
|
|
||||||
tooltip="至少输入3个字符"
|
|
||||||
fieldProps={{
|
|
||||||
showSearch: true,
|
|
||||||
filterOption: false,
|
|
||||||
}}
|
|
||||||
debounceTime={300} // 防抖,减少请求频率
|
|
||||||
rules={[{ required: true, message: '请选择订单' }]}
|
|
||||||
/>
|
|
||||||
<ProFormDigit
|
|
||||||
name="quantity"
|
|
||||||
colProps={{ span: 12 }}
|
|
||||||
label="订单数量"
|
|
||||||
placeholder="请输入数量"
|
|
||||||
rules={[{ required: true, message: '请输入数量' }]}
|
|
||||||
fieldProps={{
|
|
||||||
precision: 0,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
|
|
||||||
</ProForm.Group>
|
|
||||||
</ProFormList>
|
|
||||||
|
|
||||||
<ProFormList
|
<ProFormList
|
||||||
label="换货产品"
|
label="换货产品"
|
||||||
name="sales"
|
name="sales"
|
||||||
>
|
>
|
||||||
<ProForm.Group>
|
<ProForm.Group>
|
||||||
|
|
||||||
|
|
||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
params={{ }}
|
params={{ }}
|
||||||
request={async ({ keyWords }) => {
|
request={async ({ keyWords }) => {
|
||||||
|
|
|
||||||
|
|
@ -332,10 +332,7 @@ declare namespace API {
|
||||||
| 'failed'
|
| 'failed'
|
||||||
| 'after_sale_pending'
|
| 'after_sale_pending'
|
||||||
| 'pending_reshipment'
|
| 'pending_reshipment'
|
||||||
| 'pending_refund'
|
| 'pending_refund';
|
||||||
| 'refund_requested'
|
|
||||||
| 'refund_approved'
|
|
||||||
| 'refund_cancelled';
|
|
||||||
payment_method?: string;
|
payment_method?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -860,10 +857,7 @@ declare namespace API {
|
||||||
| 'failed'
|
| 'failed'
|
||||||
| 'after_sale_pending'
|
| 'after_sale_pending'
|
||||||
| 'pending_reshipment'
|
| 'pending_reshipment'
|
||||||
| 'pending_refund'
|
| 'pending_refund';
|
||||||
| 'refund_requested'
|
|
||||||
| 'refund_approved'
|
|
||||||
| 'refund_cancelled';
|
|
||||||
payment_method?: string;
|
payment_method?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue