diff --git a/config/config.dev.js b/config/config.dev.js index 8cbd35e..3901b44 100644 --- a/config/config.dev.js +++ b/config/config.dev.js @@ -86,8 +86,8 @@ export default defineConfig({ 'process.env': { // API_URL: "http://guangdongadminapi.zhongshuai2023.com", // API_URL: "http://iadminapi.zhongshuai2023.com", - // API_URL: "http://192.168.1.63:1002", - API_URL: "http://guangdongadminapi.zhongshuai2023.com", + API_URL: "http://192.168.112.207:1002", + // API_URL: "http://guangdongadminapi.zhongshuai2023.com", // API_URL: "http://192.168.1.54:1002", WS_URL: "ws://lv.com", diff --git a/src/.umi/core/route.tsx b/src/.umi/core/route.tsx index 8aefd9d..43e8a36 100644 --- a/src/.umi/core/route.tsx +++ b/src/.umi/core/route.tsx @@ -19,11 +19,12 @@ if (process.env.NODE_ENV === 'development') { import React from 'react'; export async function getRoutes() { - const routes = {"404":{"path":"*","id":"404","parentId":"ant-design-pro-layout"},"activity/513/components/CancellationModal":{"path":"activity/513/components/CancellationModal","id":"activity/513/components/CancellationModal","parentId":"ant-design-pro-layout"},"finance/withdraw/components/TempFormModal":{"path":"finance/withdraw/components/TempFormModal","id":"finance/withdraw/components/TempFormModal","parentId":"ant-design-pro-layout"},"activity/513/components/CreateFormModal":{"path":"activity/513/components/CreateFormModal","id":"activity/513/components/CreateFormModal","parentId":"ant-design-pro-layout"},"activity/607/components/CreateFormModal":{"path":"activity/607/components/CreateFormModal","id":"activity/607/components/CreateFormModal","parentId":"ant-design-pro-layout"},"activity/813/components/CreateFormModal":{"path":"activity/813/components/CreateFormModal","id":"activity/813/components/CreateFormModal","parentId":"ant-design-pro-layout"},"verification/components/CreateFormModal":{"path":"verification/components/CreateFormModal","id":"verification/components/CreateFormModal","parentId":"ant-design-pro-layout"},"verification/components/UpdateFormModal":{"path":"verification/components/UpdateFormModal","id":"verification/components/UpdateFormModal","parentId":"ant-design-pro-layout"},"activity/607/components/ShowDataModal":{"path":"activity/607/components/ShowDataModal","id":"activity/607/components/ShowDataModal","parentId":"ant-design-pro-layout"},"user/user/components/LevelFormModal":{"path":"user/user/components/LevelFormModal","id":"user/user/components/LevelFormModal","parentId":"ant-design-pro-layout"},"user/user/components/MoneyFormModal":{"path":"user/user/components/MoneyFormModal","id":"user/user/components/MoneyFormModal","parentId":"ant-design-pro-layout"},"user/user/components/TradeFormModal":{"path":"user/user/components/TradeFormModal","id":"user/user/components/TradeFormModal","parentId":"ant-design-pro-layout"},"user/user/components/TempFormModal":{"path":"user/user/components/TempFormModal","id":"user/user/components/TempFormModal","parentId":"ant-design-pro-layout"},"piles/components/SetinfoFormModal":{"path":"piles/components/SetinfoFormModal","id":"piles/components/SetinfoFormModal","parentId":"ant-design-pro-layout"},"order/components/OrderExportForm":{"path":"order/components/OrderExportForm","id":"order/components/OrderExportForm","parentId":"ant-design-pro-layout"},"user/register-result/style.style":{"path":"user/register-result/style/style","id":"user/register-result/style.style","parentId":"ant-design-pro-layout"},"order/components/BonusFormModal":{"path":"order/components/BonusFormModal","id":"order/components/BonusFormModal","parentId":"ant-design-pro-layout"},"piles/components/BonusFormModal":{"path":"piles/components/BonusFormModal","id":"piles/components/BonusFormModal","parentId":"ant-design-pro-layout"},"piles/components/TempFormModal":{"path":"piles/components/TempFormModal","id":"piles/components/TempFormModal","parentId":"ant-design-pro-layout"},"user/user/components/ShopModal":{"path":"user/user/components/ShopModal","id":"user/user/components/ShopModal","parentId":"ant-design-pro-layout"},"order/components/EscFormModal":{"path":"order/components/EscFormModal","id":"order/components/EscFormModal","parentId":"ant-design-pro-layout"},"facility/serviceCharge/index":{"path":"facility/serviceCharge","id":"facility/serviceCharge/index","parentId":"ant-design-pro-layout"},"user/user/components/UpRole":{"path":"user/user/components/UpRole","id":"user/user/components/UpRole","parentId":"ant-design-pro-layout"},"user/register-result/index":{"path":"user/register-result","id":"user/register-result/index","parentId":"ant-design-pro-layout"},"user/user/components/UpPem":{"path":"user/user/components/UpPem","id":"user/user/components/UpPem","parentId":"ant-design-pro-layout"},"user/register/style.style":{"path":"user/register/style/style","id":"user/register/style.style","parentId":"ant-design-pro-layout"},"finance/statistics/index":{"path":"finance/statistics","id":"finance/statistics/index","parentId":"ant-design-pro-layout"},"activity/activity/index":{"path":"activity/activity","id":"activity/activity/index","parentId":"ant-design-pro-layout"},"finance/variation/index":{"path":"finance/variation","id":"finance/variation/index","parentId":"ant-design-pro-layout"},"goodsSetMeal/$id/create":{"path":"goodsSetMeal/:id/create","id":"goodsSetMeal/$id/create","parentId":"ant-design-pro-layout"},"goodsSetMeal/$id/update":{"path":"goodsSetMeal/:id/update","id":"goodsSetMeal/$id/update","parentId":"ant-design-pro-layout"},"verificationOrder/index":{"path":"verificationOrder","id":"verificationOrder/index","parentId":"ant-design-pro-layout"},"activity/activity/edit":{"path":"activity/activity/edit","id":"activity/activity/edit","parentId":"ant-design-pro-layout"},"config/agreement/index":{"path":"config/agreement","id":"config/agreement/index","parentId":"ant-design-pro-layout"},"facility/subsidy/index":{"path":"facility/subsidy","id":"facility/subsidy/index","parentId":"ant-design-pro-layout"},"finance/earnings/index":{"path":"finance/earnings","id":"finance/earnings/index","parentId":"ant-design-pro-layout"},"finance/integral/index":{"path":"finance/integral","id":"finance/integral/index","parentId":"ant-design-pro-layout"},"finance/withdraw/index":{"path":"finance/withdraw","id":"finance/withdraw/index","parentId":"ant-design-pro-layout"},"config/agreement/edit":{"path":"config/agreement/edit","id":"config/agreement/edit","parentId":"ant-design-pro-layout"},"facility/subsidy/edit":{"path":"facility/subsidy/edit","id":"facility/subsidy/edit","parentId":"ant-design-pro-layout"},"user/login/login.test":{"path":"user/login/login/test","id":"user/login/login.test","parentId":"ant-design-pro-layout"},"user/register/service":{"path":"user/register/service","id":"user/register/service","parentId":"ant-design-pro-layout"},"finance/freeze/index":{"path":"finance/freeze","id":"finance/freeze/index","parentId":"ant-design-pro-layout"},"config/banner/index":{"path":"config/banner","id":"config/banner/index","parentId":"ant-design-pro-layout"},"config/config/index":{"path":"config/config","id":"config/config/index","parentId":"ant-design-pro-layout"},"system/uppass/index":{"path":"system/uppass","id":"system/uppass/index","parentId":"ant-design-pro-layout"},"user/register/index":{"path":"user/register","id":"user/register/index","parentId":"ant-design-pro-layout"},"user/register/_mock":{"path":"user/register/_mock","id":"user/register/_mock","parentId":"ant-design-pro-layout"},"activity/513/index":{"path":"activity/513","id":"activity/513/index","parentId":"ant-design-pro-layout"},"activity/607/index":{"path":"activity/607","id":"activity/607/index","parentId":"ant-design-pro-layout"},"activity/813/index":{"path":"activity/813","id":"activity/813/index","parentId":"ant-design-pro-layout"},"config/banner/edit":{"path":"config/banner/edit","id":"config/banner/edit","parentId":"ant-design-pro-layout"},"goodsSetMeal/index":{"path":"goodsSetMeal","id":"goodsSetMeal/index","parentId":"ant-design-pro-layout"},"verification/index":{"path":"verification","id":"verification/index","parentId":"ant-design-pro-layout"},"system/menu/index":{"path":"system/menu","id":"system/menu/index","parentId":"ant-design-pro-layout"},"system/role/index":{"path":"system/role","id":"system/role/index","parentId":"ant-design-pro-layout"},"system/user/index":{"path":"system/user","id":"system/user/index","parentId":"ant-design-pro-layout"},"goods/$id/create":{"path":"goods/:id/create","id":"goods/$id/create","parentId":"ant-design-pro-layout"},"goods/$id/update":{"path":"goods/:id/update","id":"goods/$id/update","parentId":"ant-design-pro-layout"},"system/log/index":{"path":"system/log","id":"system/log/index","parentId":"ant-design-pro-layout"},"system/menu/edit":{"path":"system/menu/edit","id":"system/menu/edit","parentId":"ant-design-pro-layout"},"system/role/edit":{"path":"system/role/edit","id":"system/role/edit","parentId":"ant-design-pro-layout"},"system/user/edit":{"path":"system/user/edit","id":"system/user/edit","parentId":"ant-design-pro-layout"},"user/grade/index":{"path":"user/grade","id":"user/grade/index","parentId":"ant-design-pro-layout"},"user/login/index":{"path":"user/login","id":"user/login/index","parentId":"ant-design-pro-layout"},"note/cate/index":{"path":"note/cate","id":"note/cate/index","parentId":"ant-design-pro-layout"},"note/note/index":{"path":"note/note","id":"note/note/index","parentId":"ant-design-pro-layout"},"user/user/index":{"path":"user/user","id":"user/user/index","parentId":"ant-design-pro-layout"},"note/cate/edit":{"path":"note/cate/edit","id":"note/cate/edit","parentId":"ant-design-pro-layout"},"note/note/edit":{"path":"note/note/edit","id":"note/note/edit","parentId":"ant-design-pro-layout"},"user/user/edit":{"path":"user/user/edit","id":"user/user/edit","parentId":"ant-design-pro-layout"},"payment/index":{"path":"payment","id":"payment/index","parentId":"ant-design-pro-layout"},"refund/index":{"path":"refund","id":"refund/index","parentId":"ant-design-pro-layout"},"goods/index":{"path":"goods","id":"goods/index","parentId":"ant-design-pro-layout"},"index/index":{"path":"/","id":"index/index","parentId":"ant-design-pro-layout"},"order/fahuo":{"path":"order/fahuo","id":"order/fahuo","parentId":"ant-design-pro-layout"},"order/index":{"path":"order","id":"order/index","parentId":"ant-design-pro-layout"},"piles/index":{"path":"piles","id":"piles/index","parentId":"ant-design-pro-layout"},"Welcome":{"path":"Welcome","id":"Welcome","parentId":"ant-design-pro-layout"},"Admin":{"path":"Admin","id":"Admin","parentId":"ant-design-pro-layout"},"ant-design-pro-layout":{"id":"ant-design-pro-layout","path":"/","isLayout":true},"umi/plugin/openapi":{"path":"/umi/plugin/openapi","id":"umi/plugin/openapi"}} as const; + const routes = {"404":{"path":"*","id":"404","parentId":"ant-design-pro-layout"},"verificationOrder/components/CheckoutModal":{"path":"verificationOrder/components/CheckoutModal","id":"verificationOrder/components/CheckoutModal","parentId":"ant-design-pro-layout"},"activity/513/components/CancellationModal":{"path":"activity/513/components/CancellationModal","id":"activity/513/components/CancellationModal","parentId":"ant-design-pro-layout"},"finance/withdraw/components/TempFormModal":{"path":"finance/withdraw/components/TempFormModal","id":"finance/withdraw/components/TempFormModal","parentId":"ant-design-pro-layout"},"activity/513/components/CreateFormModal":{"path":"activity/513/components/CreateFormModal","id":"activity/513/components/CreateFormModal","parentId":"ant-design-pro-layout"},"activity/607/components/CreateFormModal":{"path":"activity/607/components/CreateFormModal","id":"activity/607/components/CreateFormModal","parentId":"ant-design-pro-layout"},"activity/813/components/CreateFormModal":{"path":"activity/813/components/CreateFormModal","id":"activity/813/components/CreateFormModal","parentId":"ant-design-pro-layout"},"verification/components/CreateFormModal":{"path":"verification/components/CreateFormModal","id":"verification/components/CreateFormModal","parentId":"ant-design-pro-layout"},"verification/components/UpdateFormModal":{"path":"verification/components/UpdateFormModal","id":"verification/components/UpdateFormModal","parentId":"ant-design-pro-layout"},"activity/607/components/ShowDataModal":{"path":"activity/607/components/ShowDataModal","id":"activity/607/components/ShowDataModal","parentId":"ant-design-pro-layout"},"user/user/components/LevelFormModal":{"path":"user/user/components/LevelFormModal","id":"user/user/components/LevelFormModal","parentId":"ant-design-pro-layout"},"user/user/components/MoneyFormModal":{"path":"user/user/components/MoneyFormModal","id":"user/user/components/MoneyFormModal","parentId":"ant-design-pro-layout"},"user/user/components/TradeFormModal":{"path":"user/user/components/TradeFormModal","id":"user/user/components/TradeFormModal","parentId":"ant-design-pro-layout"},"user/user/components/TempFormModal":{"path":"user/user/components/TempFormModal","id":"user/user/components/TempFormModal","parentId":"ant-design-pro-layout"},"piles/components/SetinfoFormModal":{"path":"piles/components/SetinfoFormModal","id":"piles/components/SetinfoFormModal","parentId":"ant-design-pro-layout"},"order/components/OrderExportForm":{"path":"order/components/OrderExportForm","id":"order/components/OrderExportForm","parentId":"ant-design-pro-layout"},"user/register-result/style.style":{"path":"user/register-result/style/style","id":"user/register-result/style.style","parentId":"ant-design-pro-layout"},"order/components/BonusFormModal":{"path":"order/components/BonusFormModal","id":"order/components/BonusFormModal","parentId":"ant-design-pro-layout"},"piles/components/BonusFormModal":{"path":"piles/components/BonusFormModal","id":"piles/components/BonusFormModal","parentId":"ant-design-pro-layout"},"piles/components/TempFormModal":{"path":"piles/components/TempFormModal","id":"piles/components/TempFormModal","parentId":"ant-design-pro-layout"},"user/user/components/ShopModal":{"path":"user/user/components/ShopModal","id":"user/user/components/ShopModal","parentId":"ant-design-pro-layout"},"order/components/EscFormModal":{"path":"order/components/EscFormModal","id":"order/components/EscFormModal","parentId":"ant-design-pro-layout"},"facility/serviceCharge/index":{"path":"facility/serviceCharge","id":"facility/serviceCharge/index","parentId":"ant-design-pro-layout"},"user/user/components/UpRole":{"path":"user/user/components/UpRole","id":"user/user/components/UpRole","parentId":"ant-design-pro-layout"},"user/register-result/index":{"path":"user/register-result","id":"user/register-result/index","parentId":"ant-design-pro-layout"},"user/user/components/UpPem":{"path":"user/user/components/UpPem","id":"user/user/components/UpPem","parentId":"ant-design-pro-layout"},"user/register/style.style":{"path":"user/register/style/style","id":"user/register/style.style","parentId":"ant-design-pro-layout"},"finance/statistics/index":{"path":"finance/statistics","id":"finance/statistics/index","parentId":"ant-design-pro-layout"},"activity/activity/index":{"path":"activity/activity","id":"activity/activity/index","parentId":"ant-design-pro-layout"},"finance/variation/index":{"path":"finance/variation","id":"finance/variation/index","parentId":"ant-design-pro-layout"},"goodsSetMeal/$id/create":{"path":"goodsSetMeal/:id/create","id":"goodsSetMeal/$id/create","parentId":"ant-design-pro-layout"},"goodsSetMeal/$id/update":{"path":"goodsSetMeal/:id/update","id":"goodsSetMeal/$id/update","parentId":"ant-design-pro-layout"},"verificationOrder/index":{"path":"verificationOrder","id":"verificationOrder/index","parentId":"ant-design-pro-layout"},"activity/activity/edit":{"path":"activity/activity/edit","id":"activity/activity/edit","parentId":"ant-design-pro-layout"},"config/agreement/index":{"path":"config/agreement","id":"config/agreement/index","parentId":"ant-design-pro-layout"},"facility/subsidy/index":{"path":"facility/subsidy","id":"facility/subsidy/index","parentId":"ant-design-pro-layout"},"finance/earnings/index":{"path":"finance/earnings","id":"finance/earnings/index","parentId":"ant-design-pro-layout"},"finance/integral/index":{"path":"finance/integral","id":"finance/integral/index","parentId":"ant-design-pro-layout"},"finance/withdraw/index":{"path":"finance/withdraw","id":"finance/withdraw/index","parentId":"ant-design-pro-layout"},"config/agreement/edit":{"path":"config/agreement/edit","id":"config/agreement/edit","parentId":"ant-design-pro-layout"},"facility/subsidy/edit":{"path":"facility/subsidy/edit","id":"facility/subsidy/edit","parentId":"ant-design-pro-layout"},"user/login/login.test":{"path":"user/login/login/test","id":"user/login/login.test","parentId":"ant-design-pro-layout"},"user/register/service":{"path":"user/register/service","id":"user/register/service","parentId":"ant-design-pro-layout"},"finance/freeze/index":{"path":"finance/freeze","id":"finance/freeze/index","parentId":"ant-design-pro-layout"},"config/banner/index":{"path":"config/banner","id":"config/banner/index","parentId":"ant-design-pro-layout"},"config/config/index":{"path":"config/config","id":"config/config/index","parentId":"ant-design-pro-layout"},"system/uppass/index":{"path":"system/uppass","id":"system/uppass/index","parentId":"ant-design-pro-layout"},"user/register/index":{"path":"user/register","id":"user/register/index","parentId":"ant-design-pro-layout"},"user/register/_mock":{"path":"user/register/_mock","id":"user/register/_mock","parentId":"ant-design-pro-layout"},"activity/513/index":{"path":"activity/513","id":"activity/513/index","parentId":"ant-design-pro-layout"},"activity/607/index":{"path":"activity/607","id":"activity/607/index","parentId":"ant-design-pro-layout"},"activity/813/index":{"path":"activity/813","id":"activity/813/index","parentId":"ant-design-pro-layout"},"config/banner/edit":{"path":"config/banner/edit","id":"config/banner/edit","parentId":"ant-design-pro-layout"},"goodsSetMeal/index":{"path":"goodsSetMeal","id":"goodsSetMeal/index","parentId":"ant-design-pro-layout"},"verification/index":{"path":"verification","id":"verification/index","parentId":"ant-design-pro-layout"},"system/menu/index":{"path":"system/menu","id":"system/menu/index","parentId":"ant-design-pro-layout"},"system/role/index":{"path":"system/role","id":"system/role/index","parentId":"ant-design-pro-layout"},"system/user/index":{"path":"system/user","id":"system/user/index","parentId":"ant-design-pro-layout"},"goods/$id/create":{"path":"goods/:id/create","id":"goods/$id/create","parentId":"ant-design-pro-layout"},"goods/$id/update":{"path":"goods/:id/update","id":"goods/$id/update","parentId":"ant-design-pro-layout"},"system/log/index":{"path":"system/log","id":"system/log/index","parentId":"ant-design-pro-layout"},"system/menu/edit":{"path":"system/menu/edit","id":"system/menu/edit","parentId":"ant-design-pro-layout"},"system/role/edit":{"path":"system/role/edit","id":"system/role/edit","parentId":"ant-design-pro-layout"},"system/user/edit":{"path":"system/user/edit","id":"system/user/edit","parentId":"ant-design-pro-layout"},"user/grade/index":{"path":"user/grade","id":"user/grade/index","parentId":"ant-design-pro-layout"},"user/login/index":{"path":"user/login","id":"user/login/index","parentId":"ant-design-pro-layout"},"note/cate/index":{"path":"note/cate","id":"note/cate/index","parentId":"ant-design-pro-layout"},"note/note/index":{"path":"note/note","id":"note/note/index","parentId":"ant-design-pro-layout"},"user/user/index":{"path":"user/user","id":"user/user/index","parentId":"ant-design-pro-layout"},"note/cate/edit":{"path":"note/cate/edit","id":"note/cate/edit","parentId":"ant-design-pro-layout"},"note/note/edit":{"path":"note/note/edit","id":"note/note/edit","parentId":"ant-design-pro-layout"},"user/user/edit":{"path":"user/user/edit","id":"user/user/edit","parentId":"ant-design-pro-layout"},"payment/index":{"path":"payment","id":"payment/index","parentId":"ant-design-pro-layout"},"refund/index":{"path":"refund","id":"refund/index","parentId":"ant-design-pro-layout"},"goods/index":{"path":"goods","id":"goods/index","parentId":"ant-design-pro-layout"},"index/index":{"path":"/","id":"index/index","parentId":"ant-design-pro-layout"},"order/fahuo":{"path":"order/fahuo","id":"order/fahuo","parentId":"ant-design-pro-layout"},"order/index":{"path":"order","id":"order/index","parentId":"ant-design-pro-layout"},"piles/index":{"path":"piles","id":"piles/index","parentId":"ant-design-pro-layout"},"Welcome":{"path":"Welcome","id":"Welcome","parentId":"ant-design-pro-layout"},"Admin":{"path":"Admin","id":"Admin","parentId":"ant-design-pro-layout"},"ant-design-pro-layout":{"id":"ant-design-pro-layout","path":"/","isLayout":true},"umi/plugin/openapi":{"path":"/umi/plugin/openapi","id":"umi/plugin/openapi"}} as const; return { routes, routeComponents: { '404': React.lazy(() => import(/* webpackChunkName: "src__pages__404" */'../../../src/pages/404.tsx')), +'verificationOrder/components/CheckoutModal': React.lazy(() => import(/* webpackChunkName: "src__pages__verificationOrder__components__CheckoutModal" */'../../../src/pages/verificationOrder/components/CheckoutModal.tsx')), 'activity/513/components/CancellationModal': React.lazy(() => import(/* webpackChunkName: "src__pages__activity__513__components__CancellationModal" */'../../../src/pages/activity/513/components/CancellationModal.jsx')), 'finance/withdraw/components/TempFormModal': React.lazy(() => import(/* webpackChunkName: "src__pages__finance__withdraw__components__TempFormModal" */'../../../src/pages/finance/withdraw/components/TempFormModal.tsx')), 'activity/513/components/CreateFormModal': React.lazy(() => import(/* webpackChunkName: "src__pages__activity__513__components__CreateFormModal" */'../../../src/pages/activity/513/components/CreateFormModal.jsx')), diff --git a/src/components/Visible/index.tsx b/src/components/Visible/index.tsx new file mode 100644 index 0000000..0d61882 --- /dev/null +++ b/src/components/Visible/index.tsx @@ -0,0 +1,17 @@ +import React from 'react'; + +interface VisibleProps { + visible: boolean; + onCancel: () => void; + children: React.ReactNode; +} + +const Visible: React.FC = ({ visible, onCancel, children }) => { + if (!visible) { + return null; + } + + return <>{children}; +}; + +export default Visible; \ No newline at end of file diff --git a/src/pages/verificationOrder/components/CheckoutModal.tsx b/src/pages/verificationOrder/components/CheckoutModal.tsx new file mode 100644 index 0000000..141ec66 --- /dev/null +++ b/src/pages/verificationOrder/components/CheckoutModal.tsx @@ -0,0 +1,55 @@ +import React from 'react'; +import { Modal, Form, Input, Button, message } from 'antd'; +import { request } from '@umijs/max'; + +interface CheckoutModalProps { + record: any; + onOk: () => void; +} + +const CheckoutModal: React.FC = ({ record, onOk }) => { + const handleOk = async () => { + try { + const response = await request('/api/orders/updateCheckStatus', { + method: 'post', + headers: { + 'Content-Type': 'application/json;charset=UTF-8', + }, + data: { id: record?.id, checkStatus: 1 }, + }); + + if (response.success) { + message.success('对账成功'); + onOk(); + } else { + message.error('对账失败'); + } + } catch (error) { + message.error('对账失败'); + console.error('Error updating check status:', error); + } + }; + + return ( + +
+

订单号: {record?.orderNo}

+

用户: {record?.shopEntity?.userName} ({record?.shopEntity?.phone})

+

核销人: {record?.verifier?.userName} ({record?.verifier?.phone})

+

面值: ¥{record?.goodsPrice}

+

数量: {record?.couponNum}

+

状态: {record?.status ? '已核销' : '未核销'}

+

财务对账: {record?.checkStatus ? '已对账' : '未对账'}

+

备注: {record?.note || '-'}

+

创建时间: {record?.createTime}

+
+
+ ); +}; + +export default CheckoutModal; \ No newline at end of file diff --git a/src/pages/verificationOrder/index.tsx b/src/pages/verificationOrder/index.tsx index 7e35579..86cdbb3 100644 --- a/src/pages/verificationOrder/index.tsx +++ b/src/pages/verificationOrder/index.tsx @@ -1,9 +1,12 @@ import { verificationPage } from '@/services/payment'; +import { request } from '@umijs/max'; -import React, { useRef, useEffect,useState } from 'react'; +import React, { useRef, useEffect, useState } from 'react'; import { useIntl, useAccess } from '@umijs/max'; import { message, Tag, Image, Button, Select } from 'antd'; +import Visible from '@/components/Visible'; +import CheckoutModal from './components/CheckoutModal'; import { ActionType, PageContainer, ProTable } from '@ant-design/pro-components'; import { usersPage } from '@/services/user/user'; @@ -11,8 +14,9 @@ import { usersPage } from '@/services/user/user'; const LogTableList: React.FC = () => { const actionRef = useRef(); - - + const [visible, setVisible] = useState(false); + const [record, setRecord] = useState(null); + const [searchParams, setSearchParams] = useState({}); const [shopOption, setShopOption] = useState([]); const searchShop = async (value) => { const { success, data } = await usersPage({ @@ -35,13 +39,39 @@ const LogTableList: React.FC = () => { title: '用户信息', dataIndex: 'userId', valueType: 'text', - search: false, render: (_: any, record: any) => { return
用户名:{record?.shopEntity?.userName}
手机号:{record?.shopEntity?.phone}
}, + renderFormItem: ( + _, + { type, defaultRender, formItemProps, fieldProps, ...rest }, + form, + ) => { + return + }, + render: (_, record) => { + return record.checkStatus ? '已对账' : '未对账' + } + }, + { title: '备注', dataIndex: 'note', @@ -117,11 +182,62 @@ const LogTableList: React.FC = () => { valueType: 'text', search: false, }, + { + title: '操作', + dataIndex: 'operation', + search: false, + render: (_, record) => { + return
+ {!record?.checkStatus && } +
+ }, + } ]; + const handleExport = async () => { + try { + const response = await request('/api/orders/couponList-export', { + method: 'get', + responseType: 'blob', + params: searchParams + }); + + // Create download link + const url = window.URL.createObjectURL(new Blob([response])); + const link = document.createElement('a'); + link.href = url; + link.setAttribute('download', `verification-orders-${new Date().getTime()}.xlsx`); + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + } catch (error) { + message.error('导出失败'); + console.error('Error exporting data:', error); + } + }; + return (
+ { + setVisible(false); + }} + > + { + setVisible(false); + if (actionRef.current) { + actionRef.current.reload(); + } + }} + /> + { search={{ labelWidth: 120, }} + toolBarRender={() => [ + + ]} request={async (params, sorter, filter) => { + setSearchParams(params); let { data } = await verificationPage(params) return { data: data?.records || [], @@ -143,4 +265,4 @@ const LogTableList: React.FC = () => { ); }; -export default LogTableList; +export default LogTableList; \ No newline at end of file