Compare commits
6 Commits
7c5e4917dd
...
a8ba59ba88
| Author | SHA1 | Date |
|---|---|---|
|
|
a8ba59ba88 | |
|
|
adbc087171 | |
|
|
f78a68414d | |
|
|
77590f2b22 | |
|
|
972e127dc2 | |
|
|
e5794c3d25 |
|
|
@ -14,3 +14,5 @@
|
||||||
/package-lock.json
|
/package-lock.json
|
||||||
/yarn.lock
|
/yarn.lock
|
||||||
*.yaml
|
*.yaml
|
||||||
|
#
|
||||||
|
/docs
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ const isDev = process.env.NODE_ENV === 'development';
|
||||||
const UMI_APP_API_URL = isDev
|
const UMI_APP_API_URL = isDev
|
||||||
? 'http://localhost:7001'
|
? 'http://localhost:7001'
|
||||||
: 'https://api.yoone.ca';
|
: 'https://api.yoone.ca';
|
||||||
|
import { codeInspectorPlugin } from 'code-inspector-plugin';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
hash: true,
|
hash: true,
|
||||||
|
|
@ -18,6 +19,13 @@ export default defineConfig({
|
||||||
define: {
|
define: {
|
||||||
UMI_APP_API_URL,
|
UMI_APP_API_URL,
|
||||||
},
|
},
|
||||||
|
chainWebpack(config) {
|
||||||
|
config.plugin('code-inspector-plugin').use(
|
||||||
|
codeInspectorPlugin({
|
||||||
|
bundler: 'webpack',
|
||||||
|
})
|
||||||
|
);
|
||||||
|
},
|
||||||
routes: [
|
routes: [
|
||||||
{ path: '/', redirect: '/home' },
|
{ path: '/', redirect: '/home' },
|
||||||
{ name: '追踪', path: '/track', component: './Track', layout: false },
|
{ name: '追踪', path: '/track', component: './Track', layout: false },
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/react": "^18.0.33",
|
"@types/react": "^18.0.33",
|
||||||
"@types/react-dom": "^18.0.11",
|
"@types/react-dom": "^18.0.11",
|
||||||
|
"code-inspector-plugin": "^1.2.10",
|
||||||
"husky": "^9",
|
"husky": "^9",
|
||||||
"lint-staged": "^13.2.0",
|
"lint-staged": "^13.2.0",
|
||||||
"prettier": "^2.8.7",
|
"prettier": "^2.8.7",
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ 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';
|
||||||
|
|
@ -127,12 +128,15 @@ const ListPage: React.FC = () => {
|
||||||
label: '已申请退款',
|
label: '已申请退款',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
||||||
key: 'refund_approved',
|
key: 'refund_approved',
|
||||||
label: '退款申请已通过',
|
label: "已退款",
|
||||||
|
// label: '退款申请已通过',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'refund_cancelled',
|
key: 'refund_cancelled',
|
||||||
label: '已取消退款',
|
label: "已完成"
|
||||||
|
// label: '已取消退款',
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// key: 'pending_refund',
|
// key: 'pending_refund',
|
||||||
|
|
@ -222,6 +226,11 @@ 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: '州',
|
||||||
|
|
@ -765,7 +774,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 || '-'}
|
||||||
|
|
@ -1980,6 +1990,8 @@ const SalesChange: React.FC<{
|
||||||
},
|
},
|
||||||
[],
|
[],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// setOptions(
|
// setOptions(
|
||||||
// data.sales?.map((item) => ({
|
// data.sales?.map((item) => ({
|
||||||
// label: item.name,
|
// label: item.name,
|
||||||
|
|
@ -2000,11 +2012,63 @@ 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 }) => {
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,16 @@ export async function ordercontrollerCreatenote(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 GET /order/excel/price */
|
||||||
|
export async function ordercontrollerGetorderspriceinexcel(options?: {
|
||||||
|
[key: string]: any;
|
||||||
|
}) {
|
||||||
|
return request<any>('/order/excel/price', {
|
||||||
|
method: 'GET',
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 此处后端没有提供注释 POST /order/getOrderByNumber */
|
/** 此处后端没有提供注释 POST /order/getOrderByNumber */
|
||||||
export async function ordercontrollerGetorderbynumber(
|
export async function ordercontrollerGetorderbynumber(
|
||||||
body: string,
|
body: string,
|
||||||
|
|
|
||||||
|
|
@ -235,7 +235,6 @@ declare namespace API {
|
||||||
total_tax?: number;
|
total_tax?: number;
|
||||||
customer_id?: number;
|
customer_id?: number;
|
||||||
customer_email?: string;
|
customer_email?: string;
|
||||||
billing_phone?: string;
|
|
||||||
order_key?: string;
|
order_key?: string;
|
||||||
billing?: OrderAddress;
|
billing?: OrderAddress;
|
||||||
shipping?: OrderAddress;
|
shipping?: OrderAddress;
|
||||||
|
|
@ -258,6 +257,8 @@ declare namespace API {
|
||||||
device_type?: string;
|
device_type?: string;
|
||||||
source_type?: string;
|
source_type?: string;
|
||||||
utm_source?: string;
|
utm_source?: string;
|
||||||
|
is_exchange?: boolean;
|
||||||
|
exchange_frequency?: number;
|
||||||
/** 创建时间 */
|
/** 创建时间 */
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
/** 更新时间 */
|
/** 更新时间 */
|
||||||
|
|
@ -333,9 +334,9 @@ declare namespace API {
|
||||||
| 'after_sale_pending'
|
| 'after_sale_pending'
|
||||||
| 'pending_reshipment'
|
| 'pending_reshipment'
|
||||||
| 'pending_refund'
|
| 'pending_refund'
|
||||||
| 'refund_requested'
|
| 'return-requested'
|
||||||
| 'refund_approved'
|
| 'return-approved'
|
||||||
| 'refund_cancelled';
|
| 'return-cancelled';
|
||||||
payment_method?: string;
|
payment_method?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -377,7 +378,6 @@ declare namespace API {
|
||||||
total_tax?: number;
|
total_tax?: number;
|
||||||
customer_id?: number;
|
customer_id?: number;
|
||||||
customer_email?: string;
|
customer_email?: string;
|
||||||
billing_phone?: string;
|
|
||||||
order_key?: string;
|
order_key?: string;
|
||||||
billing?: OrderAddress;
|
billing?: OrderAddress;
|
||||||
shipping?: OrderAddress;
|
shipping?: OrderAddress;
|
||||||
|
|
@ -400,6 +400,8 @@ declare namespace API {
|
||||||
device_type?: string;
|
device_type?: string;
|
||||||
source_type?: string;
|
source_type?: string;
|
||||||
utm_source?: string;
|
utm_source?: string;
|
||||||
|
is_exchange?: boolean;
|
||||||
|
exchange_frequency?: number;
|
||||||
/** 创建时间 */
|
/** 创建时间 */
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
/** 更新时间 */
|
/** 更新时间 */
|
||||||
|
|
@ -861,9 +863,9 @@ declare namespace API {
|
||||||
| 'after_sale_pending'
|
| 'after_sale_pending'
|
||||||
| 'pending_reshipment'
|
| 'pending_reshipment'
|
||||||
| 'pending_refund'
|
| 'pending_refund'
|
||||||
| 'refund_requested'
|
| 'return-requested'
|
||||||
| 'refund_approved'
|
| 'return-approved'
|
||||||
| 'refund_cancelled';
|
| 'return-cancelled';
|
||||||
payment_method?: string;
|
payment_method?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1415,6 +1417,8 @@ declare namespace API {
|
||||||
sale_price?: number;
|
sale_price?: number;
|
||||||
/** 是否促销中 */
|
/** 是否促销中 */
|
||||||
on_sale?: boolean;
|
on_sale?: boolean;
|
||||||
|
/** 是否删除 */
|
||||||
|
on_delete?: boolean;
|
||||||
/** 创建时间 */
|
/** 创建时间 */
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
/** 更新时间 */
|
/** 更新时间 */
|
||||||
|
|
@ -1448,6 +1452,10 @@ declare namespace API {
|
||||||
| 'inherit';
|
| 'inherit';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type wpproductcontrollerSearchproductsParams = {
|
||||||
|
name?: string;
|
||||||
|
};
|
||||||
|
|
||||||
type wpproductcontrollerSetconstitutionParams = {
|
type wpproductcontrollerSetconstitutionParams = {
|
||||||
id: number;
|
id: number;
|
||||||
};
|
};
|
||||||
|
|
@ -1500,6 +1508,8 @@ declare namespace API {
|
||||||
sale_price?: number;
|
sale_price?: number;
|
||||||
/** 是否促销中 */
|
/** 是否促销中 */
|
||||||
on_sale?: boolean;
|
on_sale?: boolean;
|
||||||
|
/** 是否删除 */
|
||||||
|
on_delete?: boolean;
|
||||||
/** 产品类型 */
|
/** 产品类型 */
|
||||||
type?: 'simple' | 'variable' | 'woosb';
|
type?: 'simple' | 'variable' | 'woosb';
|
||||||
/** 创建时间 */
|
/** 创建时间 */
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,21 @@ export async function wpproductcontrollerGetwpproducts(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 GET /wp_product/search */
|
||||||
|
export async function wpproductcontrollerSearchproducts(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.wpproductcontrollerSearchproductsParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<API.ProductsRes>('/wp_product/search', {
|
||||||
|
method: 'GET',
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 此处后端没有提供注释 PUT /wp_product/siteId/${param1}/products/${param0} */
|
/** 此处后端没有提供注释 PUT /wp_product/siteId/${param1}/products/${param0} */
|
||||||
export async function wpproductcontrollerUpdateproduct(
|
export async function wpproductcontrollerUpdateproduct(
|
||||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue