Compare commits
No commits in common. "36c470a5b3d542cb2829ab37d7087e2c2e58f87a" and "87534c4d2261432d34f7c6a8d2c63e016afa25e0" have entirely different histories.
36c470a5b3
...
87534c4d22
|
|
@ -27,7 +27,6 @@ import {
|
|||
ordercontrollerUpdateorderitems,
|
||||
} from '@/servers/api/order';
|
||||
import { productcontrollerSearchproducts } from '@/servers/api/product';
|
||||
import { wpproductcontrollerSearchproducts } from '@/servers/api/wpProduct';
|
||||
import { sitecontrollerAll } from '@/servers/api/site';
|
||||
import { stockcontrollerGetallstockpoints } from '@/servers/api/stock';
|
||||
import { formatShipmentState, formatSource } from '@/utils/format';
|
||||
|
|
@ -225,11 +224,6 @@ const ListPage: React.FC = () => {
|
|||
title: '联系电话',
|
||||
dataIndex: 'billing_phone',
|
||||
render: (_, record) => record.shipping?.phone || record.billing?.phone,
|
||||
},
|
||||
{
|
||||
title: '换货次数',
|
||||
dataIndex: 'exchange_frequency',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '州',
|
||||
|
|
@ -771,16 +765,17 @@ const Detail: React.FC<{
|
|||
valueEnum={ORDER_STATUS_ENUM}
|
||||
/>
|
||||
<ProDescriptions.Item label="金额" dataIndex="total" />
|
||||
<ProDescriptions.Item label="客户邮箱" dataIndex="customer_email" />
|
||||
<ProDescriptions.Item label="联系电话" span={3}
|
||||
render={(_, record) => { return (
|
||||
<div>
|
||||
<span>
|
||||
{record?.shipping?.phone || record?.billing?.phone || '-'}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
}} />
|
||||
<ProDescriptions.Item label="客户邮箱" dataIndex="customer_email" />
|
||||
<ProDescriptions.Item label="联系电话" span={3}
|
||||
render={(_, record) => {
|
||||
return (
|
||||
<div>
|
||||
<span>
|
||||
{record?.shipping?.phone || record?.billing?.phone || '-'}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
}} />
|
||||
<ProDescriptions.Item label="交易Id" dataIndex="transaction_id" />
|
||||
<ProDescriptions.Item label="IP" dataIndex="customer_id_address" />
|
||||
<ProDescriptions.Item label="设备" dataIndex="device_type" />
|
||||
|
|
@ -1988,20 +1983,17 @@ const SalesChange: React.FC<{
|
|||
},
|
||||
[],
|
||||
);
|
||||
|
||||
|
||||
// setOptions(
|
||||
// data.sales?.map((item) => ({
|
||||
// label: item.name,
|
||||
// value: item.sku,
|
||||
// })) || [],
|
||||
// );
|
||||
return { ...data};
|
||||
return { ...data };
|
||||
}}
|
||||
onFinish={async (formData: any) => {
|
||||
const { sales,items } = formData;
|
||||
const data ={sales,items }
|
||||
const res = await ordercontrollerUpdateorderitems({orderId:id}, data);
|
||||
const { sales } = formData;
|
||||
const res = await ordercontrollerUpdateorderitems({ orderId: id }, sales);
|
||||
if (!res.success) {
|
||||
message.error(`更新货物信息失败: ${res.message}`);
|
||||
return false;
|
||||
|
|
@ -2011,63 +2003,11 @@ const SalesChange: React.FC<{
|
|||
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
|
||||
label="换货产品"
|
||||
name="sales"
|
||||
>
|
||||
<ProForm.Group>
|
||||
|
||||
|
||||
<ProFormSelect
|
||||
params={{}}
|
||||
request={async ({ keyWords }) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue