From f298425802f59461786e5b0c9290b1074e560d57 Mon Sep 17 00:00:00 2001 From: Joe Date: Fri, 19 Jul 2024 09:33:19 +0800 Subject: [PATCH] up --- src/pages/ProductList/index.tsx | 17 ++++++++++++++++- src/services/pop-b2b2c/pbcProductController.ts | 15 +++++++++++++++ src/services/pop-b2b2c/typings.d.ts | 4 ++++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/src/pages/ProductList/index.tsx b/src/pages/ProductList/index.tsx index d23eead..3c29a0c 100644 --- a/src/pages/ProductList/index.tsx +++ b/src/pages/ProductList/index.tsx @@ -9,6 +9,7 @@ import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components'; import { PageContainer } from '@ant-design/pro-layout'; import { Access, Link, useAccess, history } from '@umijs/max'; import { Button, message } from 'antd'; +import moment from 'moment'; import React, { useRef } from 'react'; /** @@ -96,6 +97,15 @@ const TableList: React.FC<{}> = () => { return []; }, }, + { + title: '创建时间', + dataIndex: 'pbcCreateAt', + hideInTable: true, + fieldProps:{ + maxDate: moment() + }, + valueType: 'dateRange' + }, { title: '状态', dataIndex: 'pbcState', @@ -163,7 +173,12 @@ const TableList: React.FC<{}> = () => { columns={columns} actionRef={actionRef} request={(param: any) => { - return fetchData(param); + const queryParam = { + ...param, + startDate: param.pbcCreateAt && param.pbcCreateAt.length > 1 ? param.pbcCreateAt[0] : undefined, + endDate: param.pbcCreateAt && param.pbcCreateAt.length > 1 ? param.pbcCreateAt[1] + ' 23:59:59' : undefined + } + return fetchData(queryParam); }} rowKey="pbcId" size="small" diff --git a/src/services/pop-b2b2c/pbcProductController.ts b/src/services/pop-b2b2c/pbcProductController.ts index a64f22b..d049cc7 100644 --- a/src/services/pop-b2b2c/pbcProductController.ts +++ b/src/services/pop-b2b2c/pbcProductController.ts @@ -92,6 +92,21 @@ export async function deleteProductUsingGet( }); } +/** 首页的热销商品列表 首页的热销商品列表 POST /b2b2c/pbcproduct/getHotProductListForIndex */ +export async function getHotProductListForIndexUsingPost( + body: API.PbcBusinessIndexDTO, + options?: { [key: string]: any }, +) { + return request('/b2b2c/pbcproduct/getHotProductListForIndex', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + /** 扫码后通过商品id和用户id获取商品信息和商户信息,暂时预留,不需要调用 卖家端或者买家端, 暂时预留,不需要调用 GET /b2b2c/pbcproduct/getProductByQrCode/${param0} */ export async function getProductByQrCodeUsingGet( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) diff --git a/src/services/pop-b2b2c/typings.d.ts b/src/services/pop-b2b2c/typings.d.ts index 6a409a2..2cfc4b2 100644 --- a/src/services/pop-b2b2c/typings.d.ts +++ b/src/services/pop-b2b2c/typings.d.ts @@ -1927,6 +1927,8 @@ declare namespace API { type PbcProductPageDTO = { /** 当前页 */ current?: number; + /** 结束日期 */ + endDate?: string; /** 该字段用于过滤业务员私密商品,前端不要传值 */ filterBusinessUserId?: number; /** 条数 */ @@ -1963,6 +1965,8 @@ declare namespace API { sort?: string; /** 排序列,用表字段名称 */ sortField?: string; + /** 开始日期 */ + startDate?: string; }; type PbcProductPosterVO = {