diff --git a/src/pages/Customer/List/index.tsx b/src/pages/Customer/List/index.tsx index d937a9d..77d8b5a 100644 --- a/src/pages/Customer/List/index.tsx +++ b/src/pages/Customer/List/index.tsx @@ -343,6 +343,7 @@ const CustomerList: React.FC = () => { scroll={{ x: 'max-content' }} headerTitle="查询表格" actionRef={actionRef} + columns={columns} rowKey="id" request={async (params, sorter,filter) => { console.log('custoemr request',params, sorter,filter) @@ -370,7 +371,7 @@ const CustomerList: React.FC = () => { success: true, }; }} - columns={columns} + search={{ labelWidth: 'auto', span: 6, diff --git a/src/pages/Customer/Statistic/index.tsx b/src/pages/Customer/Statistic/index.tsx index 0f758b3..f16c106 100644 --- a/src/pages/Customer/Statistic/index.tsx +++ b/src/pages/Customer/Statistic/index.tsx @@ -137,7 +137,7 @@ const ListPage: React.FC = () => { { title: '账单地址', dataIndex: 'billing', - render: (_, record) => record?.billing.state || record?.shipping.state, + render: (_, record) => JSON.stringify(record?.billing || record?.shipping), }, { title: '标签', diff --git a/src/pages/Order/List/index.tsx b/src/pages/Order/List/index.tsx index 3409ccf..454c799 100644 --- a/src/pages/Order/List/index.tsx +++ b/src/pages/Order/List/index.tsx @@ -189,11 +189,21 @@ const ListPage: React.FC = () => { dataIndex: 'siteId', valueType: 'select', request: async () => { - const { data = [] } = await sitecontrollerAll(); - return data.map((item) => ({ - label: item.name, - value: item.id, - })); + try { + const result = await sitecontrollerAll(); + console.log('result',result) + const {success, data}= result + if (success && data) { + return data.map((site: API.SiteConfig) => ({ + label: site.name, + value: site.id, + })); + } + return []; + } catch (error) { + console.error('获取站点列表失败:', error); + return []; + } }, }, { diff --git a/src/pages/Product/List/index.tsx b/src/pages/Product/List/index.tsx index 2d8e9c2..799017f 100644 --- a/src/pages/Product/List/index.tsx +++ b/src/pages/Product/List/index.tsx @@ -492,9 +492,12 @@ const List: React.FC = () => { sortField = field; sortOrder = sort[field]; } - + const {current,pageSize,...where} = params + console.log(`params`,params) const { data, success } = await productcontrollerGetproductlist({ - ...params, + where, + page: current || 1, + per_page: pageSize || 10, sortField, sortOrder, } as any); @@ -505,17 +508,17 @@ const List: React.FC = () => { }; }} columns={columns} - expandable={{ - expandedRowRender: (record) => ( - - ), - rowExpandable: (record) => - !!(record.siteSkus && record.siteSkus.length > 0), - }} + // expandable={{ + // expandedRowRender: (record) => ( + // + // ), + // rowExpandable: (record) => + // !!(record.siteSkus && record.siteSkus.length > 0), + // }} editable={{ type: 'single', onSave: async (key, record, originRow) => { diff --git a/src/pages/Site/Shop/Orders/index.tsx b/src/pages/Site/Shop/Orders/index.tsx index a949523..1ad74a3 100644 --- a/src/pages/Site/Shop/Orders/index.tsx +++ b/src/pages/Site/Shop/Orders/index.tsx @@ -62,11 +62,10 @@ const OrdersPage: React.FC = () => { return [{ key: 'all', label: `全部(${total})` }, ...tabs]; }, [count]); - const columns: ProColumns[] = [ + const columns: ProColumns[] = [ { title: '订单号', dataIndex: 'id', - hideInSearch: true, }, { title: '状态', @@ -97,7 +96,6 @@ const OrdersPage: React.FC = () => { { title: '客户姓名', dataIndex: 'customer_name', - hideInSearch: true, }, { title: '商品', @@ -129,7 +127,6 @@ const OrdersPage: React.FC = () => { }, { title: '联系电话', - hideInSearch: true, render: (_, record) => record.shipping?.phone || record.billing?.phone, }, { @@ -319,6 +316,8 @@ const OrdersPage: React.FC = () => { setSelectedRowKeys={setSelectedRowKeys} siteId={siteId} />, + + ,