diff --git a/config/routes.ts b/config/routes.ts index b552535..216d2dd 100644 --- a/config/routes.ts +++ b/config/routes.ts @@ -70,7 +70,7 @@ export default [ { name: '角色管理', path: '/role-list', - icon: 'bell', + icon: 'setting', access: 'roleQuery', component: './RoleList', }, @@ -96,7 +96,7 @@ export default [ { name: '需求审核', path: '/requirement', - icon: 'verified', + icon: 'SafetyCertificate', access: 'requirementQuery', routes: [ { @@ -115,7 +115,7 @@ export default [ { name: '采购员管理', path: '/purchase-agent', - icon: 'verified', + icon: 'UserSwitch', routes: [ { path: 'list', @@ -190,7 +190,7 @@ export default [ { name: '商品管理', path: '/product', - icon: 'book', + icon: 'skin', routes: [ { name: '商品类目管理', @@ -280,28 +280,28 @@ export default [ { name: '字典管理', path: '/dictionary-list', - icon: 'message', + icon: 'read', access: 'dictionaryQuery', component: './Dictionary', }, { name: '操作指引', path: '/operating-instructions', - icon: 'message', + icon: 'FileSearch', access: 'operateInstructionQuery', component: './OperatingInstructions', }, { name: '流行趋势', path: '/fashion-trend', - icon: 'message', + icon: 'rise', access: 'fashionTrendQuery', component: './FashionTrend', }, { name: '创新服务', path: '/innovative-service', - icon: 'message', + icon: 'solution', access: 'innovativeServiceQuery', component: './InnovativeService', }, @@ -324,6 +324,44 @@ export default [ } ] }, + { + name: '样单管理', + path: '/sample', + icon: 'ShoppingCart', + access: 'sampleQuery', + routes: [ + { + path: '', + name: '样单管理', + component: './SampleList', + }, + { + name: '详情', + path: 'detail/:id', + hideInMenu: true, + component: './SampleList/detail', + }, + ], + }, + { + name: '订单管理', + path: '/order', + icon: 'ShoppingCart', + access: 'orderQuery', + routes: [ + { + path: '', + name: '订单管理', + component: './OrderList', + }, + { + name: '详情', + path: 'detail/:id', + hideInMenu: true, + component: './OrderList/detail', + }, + ], + }, { path: '/' }, { path: '*', layout: false, component: './404' }, ]; diff --git a/src/constants.ts b/src/constants.ts index 095e292..20e8a3d 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -166,6 +166,28 @@ const Constants = { pbcBannerType: { 1: '平台首页', }, + + // 订单状态枚举 + orderStateEnum: { + 1: { text: '预订单', status: 'warning' }, + 2: { text: '已配货', status: 'processing' }, + 3: { text: '已取消', status: 'default' }, + 4: { text: '已完成', status: 'success' }, + } as any, + + // 样单状态枚举 + sampleStateEnum: { + 1: { text: '待出样', status: 'warning' }, + 2: { text: '已发货', status: 'processing' }, + 3: { text: '已取消', status: 'default' }, + 4: { text: '已完成', status: 'success' }, + } as any, + + // 订单类型枚举 + orderTypeEnum: { + 1: { text: '到店自取', status: 'default' }, + 2: { text: '快递邮寄', status: 'processing' }, + } as any, // 手机正则 PHONE_PATTERN: /^(?:(0\d{2,3}-)?\d{7,8}|1[3-9]\d{9})$/, //邮箱正则 diff --git a/src/pages/OrderList/detail.tsx b/src/pages/OrderList/detail.tsx new file mode 100644 index 0000000..af13b1c --- /dev/null +++ b/src/pages/OrderList/detail.tsx @@ -0,0 +1,170 @@ +import Constants from '@/constants'; +import { orderDetailForAdminUsingGet } from '@/services/pop-b2b2c/pbcOrderController'; +import { isNumeric } from '@/utils/utils'; +import { ProCard } from '@ant-design/pro-components'; +import { PageContainer } from '@ant-design/pro-layout'; +import { useParams } from '@umijs/max'; +import { Button, Descriptions, Table, Tag, Timeline } from 'antd'; +import React, { useEffect, useState } from 'react'; + +const Detail: React.FC = () => { + const params = useParams(); + + const [info, setInfo] = useState({}); + + const getInfo = () => { + if (params.id) { + orderDetailForAdminUsingGet({ orderId: parseInt(params.id) }).then((res) => { + if (res.retcode && res.data) { + setInfo(res.data); + } + }); + } + }; + + const columns = [ + { + title: '商品名', + dataIndex: 'pbcProductName', + key: 'pbcProductName', + render: (text: string, item: API.PbcOrderItem_) => ( +
+ {item.pbcProductImage && ( + {item.pbcProductName} + )} +
+
{text}
+
颜色: {item.pbcSkuColorName || '默认'}
+
+
+ ), + }, + { + title: '单价', + dataIndex: 'pbcSkuPrice', + key: 'pbcSkuPrice', + render: (text: any) => typeof text === 'number' || (typeof text === 'string' && isNumeric(text)) ? `¥${text}` : text, + width: 100, + }, + { + title: '数量', + dataIndex: 'pbcSkuCnt', + key: 'pbcSkuCnt', + width: 80, + }, + { + title: '总金额', + key: 'totalPrice', + render: (_: any, item: API.PbcOrderItem_) => typeof item.pbcSkuPrice === 'number' || (typeof item.pbcSkuPrice === 'string' && isNumeric(item.pbcSkuPrice)) ? `¥${Number(item.pbcSkuPrice) * (item.pbcSkuCnt || 0)}` : item.pbcSkuPrice, + width: 100, + }, + { + title: '实付金额', + key: 'actualPrice', + render: () => `-`, + width: 100, + }, + ]; + + useEffect(() => { + getInfo(); + }, []); + + return ( + { + history.back(); + }} + > + 返回 + , + ]} + > + + + 订单信息 + + {Constants.orderStateEnum[String(info.pbcOrderState || 1)]?.text} + + + } + column={3} + > + {info.pbcOrderNo} + + {Constants.orderTypeEnum[info.pbcOrderType || 1]?.text} + + {info.pbcCreateAt} + {info.pbcBusinessName} + {info.pbcBusinessContact} + {info.pbcBusinessContactMobile} + {info.pbcOrderReceiverName} + {info.pbcOrderReceiverPhone} + + {`${info.pbcOrderReceiverProvince || ''}${info.pbcOrderReceiverCity || ''}${info.pbcOrderReceiverArea || ''}${info.pbcOrderReceiverStreet || ''}${info.pbcOrderReceiverAddress || ''}`} + + {info.pbcOrderType === 2 && ( + <> + {info.pbcOrderExpressCompanyName} + {info.pbcOrderExpressNo} + + )} + + + + + item.pbcId || Math.random().toString(36).slice(2)} + size="small" + bordered + /> + + + + = 2 + }, + { + label: info.pbcOrderCompletionTime, + children: '订单已完成', + show: info.pbcOrderState === 4 + }, + { + label: info.pbcOrderCancelTime, + children: '订单已取消', + show: info.pbcOrderState === 3 + }, + ].filter(item => item.show)} + /> + + + ); +}; + +export default Detail; \ No newline at end of file diff --git a/src/pages/OrderList/index.less b/src/pages/OrderList/index.less new file mode 100644 index 0000000..0dfbb84 --- /dev/null +++ b/src/pages/OrderList/index.less @@ -0,0 +1,14 @@ +.ant-list-item-action { + overflow: auto; +} + +.ant-list-item-action li { + float: right; +} + +.ant-pro-list-row-title { + cursor: unset; +} +.ant-pro-list-row-title:hover { + color: unset; +} \ No newline at end of file diff --git a/src/pages/OrderList/index.tsx b/src/pages/OrderList/index.tsx new file mode 100644 index 0000000..0cf8043 --- /dev/null +++ b/src/pages/OrderList/index.tsx @@ -0,0 +1,300 @@ +import Constants from '@/constants'; +import { + getOrderPageForAdminUsingPost, + exportOrderPageForAdminUsingPost, + deliverGoodForOrderAdminUsingGet, + confirmReceiveForOrderAdminUsingGet +} from '@/services/pop-b2b2c/pbcOrderController'; +import { isNumeric } from '@/utils/utils'; +import { ActionType, ProFormInstance, ProList } from '@ant-design/pro-components'; +import { PageContainer } from '@ant-design/pro-layout'; +import { Access, history, useAccess } from '@umijs/max'; +import { Button, message, Tag, Table } from 'antd'; +import React, { useRef, useState } from 'react'; +import './index.less'; + +/** + * 查询表格 + * @param param0 + */ +const fetchData = async (params: any) => { + const msg = await getOrderPageForAdminUsingPost(params); + return { + data: msg.data?.records, + total: msg.data?.total, + success: msg.retcode, + } as any; +}; + +const handleExport = async (values?: API.PbcOrder_) => { + + const hide = message.loading('正在处理', 0); + try { + await exportOrderPageForAdminUsingPost( + { ...values }, + { + responseType: 'blob', + getResponse: true, + parseResponse: false, + data: { ...values, fileName: '导出' }, + }, + ); + hide(); + return false; + } catch (error) { + console.log(error); + hide(); + message.error('处理失败,请重试'); + return false; + } +}; + + +// eslint-disable-next-line @typescript-eslint/ban-types +const TableList: React.FC<{}> = () => { + const actionRef = useRef(); + const access: any = useAccess(); + const ref = useRef>(); + const [tabActiveKey, setTabActiveKey] = useState('0'); // 默认显示全部样单 + + return ( + setTabActiveKey(key)} + tabList={[ + { + tab: "全部", + key: "0" + }, + { + tab: "预订单", + key: "1" + }, + { + tab: "已配货", + key: "2" + }, + { + tab: "已完成", + key: "4" + }, + { + tab: "已取消", + key: "3" + }, + ]} + > + + rowKey="pbcId" + actionRef={actionRef} + formRef={ref} + itemLayout='vertical' + request={(param: any) => { + const queryParam = { + ...param, + pbcOrderState: tabActiveKey !== '0' ? parseInt(tabActiveKey) : undefined + }; + return fetchData(queryParam); + }} + pagination={{ + defaultPageSize: 10, + showSizeChanger: true, + }} + search={{ + labelWidth: 'auto', + span: 6, + }} + params={{ pbcOrderState: tabActiveKey !== '0' ? parseInt(tabActiveKey) : undefined }} + dateFormatter="string" + toolBarRender={() => [ + + + , + ]} + metas={{ + pbcOrderNo: { + title: '订单编号', + }, + productName: { + title: '商品名称', + }, + pbcOrderReceiverName: { + title: '买家姓名', + }, + pbcOrderReceiverPhone: { + title: '买家手机号', + }, + pbcBusinessName: { + title: '所属商户', + }, + pbcUpdateAt: { + search: { + transform: (value) => { + return { + expectedStartTime: value[0], + expectedEndTime: value[1] + ' 23:59:59', + }; + }, + }, + valueType: 'dateRange', + title: '期望交货时间', + }, + pbcCreateAt: { + search: { + transform: (value) => { + return { + startTime: value[0], + endTime: value[1] + ' 23:59:59', + }; + }, + }, + valueType: 'dateRange', + title: '下单时间', + }, + title: { + search: false, + render: (_, record) => ( +
+
+ + {Constants.orderStateEnum[String(record.pbcOrderState || 1)]?.text} + + {Constants.orderTypeEnum[record.pbcOrderType || 1]?.text} + 订单编号: {record.pbcOrderNo} + 买家姓名: {record.pbcOrderReceiverName} + 买家手机号: {record.pbcOrderReceiverPhone} + 期望交货日期: {record.pbcExpectedDeliveryDate || '无'} + 下单时间: {record.pbcCreateAt} + 所属商户: {record.pbcBusinessName} +
+
+ ), + }, + content: { + search: false, + render: (_, record) => { + const columns1 = [ + { + title: '商品名', + dataIndex: 'pbcProductName', + key: 'pbcProductName', + render: (text: string, item: API.PbcOrderItem_) => ( +
+ {item.pbcProductImage && ( + {item.pbcProductName} + )} +
+
{text}
+
颜色: {item.pbcSkuColorName || '默认'}
+
+
+ ), + }, + { + title: '单价', + dataIndex: 'pbcSkuPrice', + key: 'pbcSkuPrice', + render: (text: any) => typeof text === 'number' || (typeof text === 'string' && isNumeric(text)) ? `¥${text}` : text, + width: 100, + }, + { + title: '数量', + dataIndex: 'pbcSkuCnt', + key: 'pbcSkuCnt', + width: 80, + }, + { + title: '总金额', + key: 'totalPrice', + render: (_: any, item: API.PbcOrderItem_) => typeof item.pbcSkuPrice === 'number' || (typeof item.pbcSkuPrice === 'string' && isNumeric(item.pbcSkuPrice)) ? `¥${Number(item.pbcSkuPrice) * (item.pbcSkuCnt || 0)}` : item.pbcSkuPrice, + width: 100, + }, + { + title: '实付金额', + key: 'actualPrice', + render: () => `-`, + width: 100, + }, + ]; + + return ( +
item.pbcId || Math.random().toString(36).slice(2)} + size="small" + bordered + /> + ); + }, + }, + actions: { + render: (_, record) => [ + , + + {record.pbcOrderState === 1 && ( + + )} + {record.pbcOrderState === 2 && ( + + )} + + ], + }, + }} + headerTitle="" + /> + + ); +}; + +export default TableList; \ No newline at end of file diff --git a/src/pages/SampleList/detail.tsx b/src/pages/SampleList/detail.tsx new file mode 100644 index 0000000..af13b1c --- /dev/null +++ b/src/pages/SampleList/detail.tsx @@ -0,0 +1,170 @@ +import Constants from '@/constants'; +import { orderDetailForAdminUsingGet } from '@/services/pop-b2b2c/pbcOrderController'; +import { isNumeric } from '@/utils/utils'; +import { ProCard } from '@ant-design/pro-components'; +import { PageContainer } from '@ant-design/pro-layout'; +import { useParams } from '@umijs/max'; +import { Button, Descriptions, Table, Tag, Timeline } from 'antd'; +import React, { useEffect, useState } from 'react'; + +const Detail: React.FC = () => { + const params = useParams(); + + const [info, setInfo] = useState({}); + + const getInfo = () => { + if (params.id) { + orderDetailForAdminUsingGet({ orderId: parseInt(params.id) }).then((res) => { + if (res.retcode && res.data) { + setInfo(res.data); + } + }); + } + }; + + const columns = [ + { + title: '商品名', + dataIndex: 'pbcProductName', + key: 'pbcProductName', + render: (text: string, item: API.PbcOrderItem_) => ( +
+ {item.pbcProductImage && ( + {item.pbcProductName} + )} +
+
{text}
+
颜色: {item.pbcSkuColorName || '默认'}
+
+
+ ), + }, + { + title: '单价', + dataIndex: 'pbcSkuPrice', + key: 'pbcSkuPrice', + render: (text: any) => typeof text === 'number' || (typeof text === 'string' && isNumeric(text)) ? `¥${text}` : text, + width: 100, + }, + { + title: '数量', + dataIndex: 'pbcSkuCnt', + key: 'pbcSkuCnt', + width: 80, + }, + { + title: '总金额', + key: 'totalPrice', + render: (_: any, item: API.PbcOrderItem_) => typeof item.pbcSkuPrice === 'number' || (typeof item.pbcSkuPrice === 'string' && isNumeric(item.pbcSkuPrice)) ? `¥${Number(item.pbcSkuPrice) * (item.pbcSkuCnt || 0)}` : item.pbcSkuPrice, + width: 100, + }, + { + title: '实付金额', + key: 'actualPrice', + render: () => `-`, + width: 100, + }, + ]; + + useEffect(() => { + getInfo(); + }, []); + + return ( + { + history.back(); + }} + > + 返回 + , + ]} + > + + + 订单信息 + + {Constants.orderStateEnum[String(info.pbcOrderState || 1)]?.text} + + + } + column={3} + > + {info.pbcOrderNo} + + {Constants.orderTypeEnum[info.pbcOrderType || 1]?.text} + + {info.pbcCreateAt} + {info.pbcBusinessName} + {info.pbcBusinessContact} + {info.pbcBusinessContactMobile} + {info.pbcOrderReceiverName} + {info.pbcOrderReceiverPhone} + + {`${info.pbcOrderReceiverProvince || ''}${info.pbcOrderReceiverCity || ''}${info.pbcOrderReceiverArea || ''}${info.pbcOrderReceiverStreet || ''}${info.pbcOrderReceiverAddress || ''}`} + + {info.pbcOrderType === 2 && ( + <> + {info.pbcOrderExpressCompanyName} + {info.pbcOrderExpressNo} + + )} + + + + +
item.pbcId || Math.random().toString(36).slice(2)} + size="small" + bordered + /> + + + + = 2 + }, + { + label: info.pbcOrderCompletionTime, + children: '订单已完成', + show: info.pbcOrderState === 4 + }, + { + label: info.pbcOrderCancelTime, + children: '订单已取消', + show: info.pbcOrderState === 3 + }, + ].filter(item => item.show)} + /> + + + ); +}; + +export default Detail; \ No newline at end of file diff --git a/src/pages/SampleList/index.less b/src/pages/SampleList/index.less new file mode 100644 index 0000000..0dfbb84 --- /dev/null +++ b/src/pages/SampleList/index.less @@ -0,0 +1,14 @@ +.ant-list-item-action { + overflow: auto; +} + +.ant-list-item-action li { + float: right; +} + +.ant-pro-list-row-title { + cursor: unset; +} +.ant-pro-list-row-title:hover { + color: unset; +} \ No newline at end of file diff --git a/src/pages/SampleList/index.tsx b/src/pages/SampleList/index.tsx new file mode 100644 index 0000000..5c34a82 --- /dev/null +++ b/src/pages/SampleList/index.tsx @@ -0,0 +1,291 @@ +import Constants from '@/constants'; +import { + getOrderPageForAdminUsingPost, + confirmReceiveForAdminUsingGet, + deliverGoodForAdminUsingGet, + exportOrderPageForAdminUsingPost +} from '@/services/pop-b2b2c/pbcOrderController'; +import { isNumeric } from '@/utils/utils'; +import { ActionType, ProFormInstance, ProList } from '@ant-design/pro-components'; +import { PageContainer } from '@ant-design/pro-layout'; +import { Access, history, useAccess } from '@umijs/max'; +import { Button, message, Tag, Table } from 'antd'; +import React, { useRef, useState } from 'react'; +import './index.less'; + +/** + * 查询表格 + * @param param0 + */ +const fetchData = async (params: any) => { + const msg = await getOrderPageForAdminUsingPost(params); + return { + data: msg.data?.records, + total: msg.data?.total, + success: msg.retcode, + } as any; +}; + +const handleExport = async (values?: API.PbcOrder_) => { + + const hide = message.loading('正在处理', 0); + try { + await exportOrderPageForAdminUsingPost( + { ...values }, + { + responseType: 'blob', + getResponse: true, + parseResponse: false, + data: { ...values, fileName: '导出' }, + }, + ); + hide(); + return false; + } catch (error) { + console.log(error); + hide(); + message.error('处理失败,请重试'); + return false; + } +}; + + +// eslint-disable-next-line @typescript-eslint/ban-types +const TableList: React.FC<{}> = () => { + const actionRef = useRef(); + const access: any = useAccess(); + const ref = useRef>(); + const [tabActiveKey, setTabActiveKey] = useState('0'); // 默认显示全部样单 + + return ( + setTabActiveKey(key)} + tabList={[ + { + tab: "全部", + key: "0" + }, + { + tab: "待出样", + key: "1" + }, + { + tab: "已发货", + key: "2" + }, + { + tab: "已完成", + key: "4" + }, + { + tab: "已取消", + key: "3" + }, + ]} + > + + rowKey="pbcId" + actionRef={actionRef} + formRef={ref} + itemLayout='vertical' + request={(param: any) => { + const queryParam = { + ...param, + pbcOrderState: tabActiveKey !== '0' ? parseInt(tabActiveKey) : undefined + }; + return fetchData(queryParam); + }} + pagination={{ + defaultPageSize: 10, + showSizeChanger: true, + }} + search={{ + labelWidth: 'auto', + span: 6, + }} + params={{ pbcOrderState: tabActiveKey !== '0' ? parseInt(tabActiveKey) : undefined }} + dateFormatter="string" + toolBarRender={() => [ + + + , + ]} + metas={{ + pbcOrderNo: { + title: '样单编号', + }, + productName: { + title: '商品名称', + }, + pbcOrderReceiverName: { + title: '买家姓名', + }, + pbcOrderReceiverPhone: { + title: '买家手机号', + }, + pbcBusinessName: { + title: '所属商户', + }, + pbcOrderType: { + title: '发货方式', + render: (text: any) => Constants.orderTypeEnum[text]?.text, + }, + pbcCreateAt: { + search: { + transform: (value) => { + return { + startTime: value[0], + endTime: value[1] + ' 23:59:59', + }; + }, + }, + valueType: 'dateRange', + title: '下单时间', + }, + title: { + search: false, + render: (_, record) => ( +
+
+ + {Constants.sampleStateEnum[String(record.pbcOrderState || 1)]?.text} + + {Constants.orderTypeEnum[record.pbcOrderType || 1]?.text} + 样单编号: {record.pbcOrderNo} + 买家姓名: {record.pbcOrderReceiverName} + 买家手机号: {record.pbcOrderReceiverPhone} + 下单时间: {record.pbcCreateAt} + 所属商户: {record.pbcBusinessName} +
+
+ ), + }, + content: { + search: false, + render: (_, record) => { + const columns1 = [ + { + title: '商品名', + dataIndex: 'pbcProductName', + key: 'pbcProductName', + render: (text: string, item: API.PbcOrderItem_) => ( +
+ {item.pbcProductImage && ( + {item.pbcProductName} + )} +
+
{text}
+
颜色: {item.pbcSkuColorName || '默认'}
+
+
+ ), + }, + { + title: '单价', + dataIndex: 'pbcSkuPrice', + key: 'pbcSkuPrice', + render: (text: any) => typeof text === 'number' || (typeof text === 'string' && isNumeric(text)) ? `¥${text}` : text, + width: 100, + }, + { + title: '数量', + dataIndex: 'pbcSkuCnt', + key: 'pbcSkuCnt', + width: 80, + }, + { + title: '总金额', + key: 'totalPrice', + render: (_: any, item: API.PbcOrderItem_) => typeof item.pbcSkuPrice === 'number' || (typeof item.pbcSkuPrice === 'string' && isNumeric(item.pbcSkuPrice)) ? `¥${Number(item.pbcSkuPrice) * (item.pbcSkuCnt || 0)}` : item.pbcSkuPrice, + width: 100, + }, + { + title: '实付金额', + key: 'actualPrice', + render: () => `-`, + width: 100, + }, + ]; + + return ( +
item.pbcId || Math.random().toString(36).slice(2)} + size="small" + bordered + /> + ); + }, + }, + actions: { + render: (_, record) => [ + , + + {record.pbcOrderState === 1 && ( + + )} + {record.pbcOrderState === 2 && ( + + )} + + ], + }, + }} + headerTitle="" + /> + + ); +}; + +export default TableList; \ No newline at end of file diff --git a/src/services/pop-b2b2c/pbcOrderController.ts b/src/services/pop-b2b2c/pbcOrderController.ts index 649df1c..262bfb2 100644 --- a/src/services/pop-b2b2c/pbcOrderController.ts +++ b/src/services/pop-b2b2c/pbcOrderController.ts @@ -16,6 +16,23 @@ export async function deliverGoodForAdminUsingGet( }); } +/** 卖家发货订单,如果类型是到店自取,则就是状态变成已发货;如果类型是邮寄,还需要生成快递 卖家 GET /b2b2c/pbcOrder/admin/deliverGoodForOrderAdmin/${param0} */ +export async function deliverGoodForOrderAdminUsingGet( + // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) + params: API.deliverGoodForOrderAdminUsingGETParams, + options?: { [key: string]: any }, +) { + const { orderId: param0, ...queryParams } = params; + return request( + `/b2b2c/pbcOrder/admin/deliverGoodForOrderAdmin/${param0}`, + { + method: 'GET', + params: { ...queryParams }, + ...(options || {}), + }, + ); +} + /** 买家取消订单。这里暂时限定只有待出样状态的订单才能够取消掉 GET /b2b2c/pbcOrder/cancelOrderForBuyer/${param0} */ export async function cancelOrderForBuyerUsingGet( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) @@ -58,6 +75,20 @@ export async function confirmReceiveForBuyerUsingGet( }); } +/** 后台把订单状态更改为已完成,不做任何校验 买家 GET /b2b2c/pbcOrder/confirmReceiveForOrderAdmin/${param0} */ +export async function confirmReceiveForOrderAdminUsingGet( + // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) + params: API.confirmReceiveForOrderAdminUsingGETParams, + options?: { [key: string]: any }, +) { + const { orderId: param0, ...queryParams } = params; + return request(`/b2b2c/pbcOrder/confirmReceiveForOrderAdmin/${param0}`, { + method: 'GET', + params: { ...queryParams }, + ...(options || {}), + }); +} + /** 卖家发货订单,如果类型是到店自取,则就是状态变成已发货;如果类型是邮寄,还需要生成快递 卖家 GET /b2b2c/pbcOrder/deliverGoodForBusiness/${param0} */ export async function deliverGoodForBusinessUsingGet( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) diff --git a/src/services/pop-b2b2c/pbcPurchaseAgentInfoController.ts b/src/services/pop-b2b2c/pbcPurchaseAgentInfoController.ts index fbc41bc..3596691 100644 --- a/src/services/pop-b2b2c/pbcPurchaseAgentInfoController.ts +++ b/src/services/pop-b2b2c/pbcPurchaseAgentInfoController.ts @@ -89,7 +89,25 @@ export async function getPurchaseAgentPageUsingPost( ); } -/** 前端获取采购员申请详情 前端 GET /b2b2c/pbcPurchaseAgentInfo/purchaseAgentDetail */ +/** 前端根据id获取采购员申请详情 后台 GET /b2b2c/pbcPurchaseAgentInfo/front/purchaseAgentDetail */ +export async function purchaseAgentDetailForFrontUsingGet( + // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) + params: API.purchaseAgentDetailForFrontUsingGETParams, + options?: { [key: string]: any }, +) { + return request( + '/b2b2c/pbcPurchaseAgentInfo/front/purchaseAgentDetail', + { + method: 'GET', + params: { + ...params, + }, + ...(options || {}), + }, + ); +} + +/** 前端获取采购员申请详情,获取活跃状态 前端 GET /b2b2c/pbcPurchaseAgentInfo/purchaseAgentDetail */ export async function purchaseAgentDetailUsingGet(options?: { [key: string]: any }) { return request( '/b2b2c/pbcPurchaseAgentInfo/purchaseAgentDetail', diff --git a/src/services/pop-b2b2c/typings.d.ts b/src/services/pop-b2b2c/typings.d.ts index 91afff2..1677c79 100644 --- a/src/services/pop-b2b2c/typings.d.ts +++ b/src/services/pop-b2b2c/typings.d.ts @@ -1070,6 +1070,11 @@ declare namespace API { orderId: number; }; + type confirmReceiveForOrderAdminUsingGETParams = { + /** orderId */ + orderId: number; + }; + type createQrCodeUsingGETParams = { /** 类型 */ codeType: string; @@ -1117,6 +1122,11 @@ declare namespace API { orderId: number; }; + type deliverGoodForOrderAdminUsingGETParams = { + /** orderId */ + orderId: number; + }; + type fashionTrendDetailForAdminUsingGETParams = { /** pbcId */ pbcId: number; @@ -4509,6 +4519,11 @@ declare namespace API { pbcId: number; }; + type purchaseAgentDetailForFrontUsingGETParams = { + /** pbcId */ + pbcId: number; + }; + type queryAuthorityUsingPOSTParams = { /** roleId */ roleId: number; diff --git a/src/utils/utils.ts b/src/utils/utils.ts index 71a1c6c..925b9d2 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -106,4 +106,9 @@ export const handlePageQuery = ( param.sort = 'DESC'; param.filters = filters; return param; -}; \ No newline at end of file +}; + +// 判断字符串是否为数字 +export const isNumeric = (str: string): boolean => { + return !isNaN(Number(str)) && !isNaN(parseFloat(str)); +} \ No newline at end of file