From 1096c6f2de074ce7b3a9975e7304c96b80d34c66 Mon Sep 17 00:00:00 2001 From: b2894lxlx <517289602@qq.com> Date: Mon, 25 Aug 2025 15:12:09 +0800 Subject: [PATCH] 250825 --- .env.development | 3 +- src/api/system/user/model/index.ts | 10 +- src/api/think/thinkCardLog/index.ts | 10 + src/api/think/thinkOrder/model/index.ts | 3 + src/api/think/thinkRechargeLog/index.ts | 10 + src/api/think/thinkSite/model/index.ts | 2 + src/api/think/thinkVip/model/index.ts | 2 + src/api/think/thinkVipCardsBills/index.ts | 9 + .../think/thinkVipCardsBills/model/index.ts | 2 + .../booking/export/components/search.vue | 2 +- .../booking/finance/components/orderList.vue | 510 ++++++++++++++---- src/views/booking/finance/index.vue | 79 ++- .../system/admin/components/user-edit.vue | 459 ++++++++-------- .../think/thinkCard/components/invoice.vue | 286 ++++++++++ .../thinkCard/components/thinkCardLog.vue | 101 ++++ src/views/think/thinkCard/index.vue | 132 +---- .../think/thinkCardLog/components/search.vue | 72 +-- src/views/think/thinkCardLog/index.vue | 3 + .../thinkCardsBills/components/search.vue | 19 + src/views/think/thinkCardsBills/index.vue | 11 +- .../think/thinkField/components/fieldEdit.vue | 6 +- src/views/think/thinkInvoice/index.vue | 4 + .../think/thinkOrder/components/orderInfo.vue | 2 +- .../think/thinkOrder/components/refund.vue | 3 +- .../think/thinkOrder/components/search.vue | 17 +- src/views/think/thinkOrder/index.vue | 94 +--- src/views/think/thinkRechargeLog/index.vue | 483 +++++++++-------- .../thinkSite/components/thinkSiteEdit.vue | 115 +++- src/views/think/thinkUsersVip/index.vue | 5 +- .../thinkVip/components/thinkVipEdit.vue | 69 ++- src/views/think/thinkVip/index.vue | 24 +- .../thinkVipCardsBills/components/search.vue | 20 +- src/views/think/thinkVipCardsBills/index.vue | 4 +- 33 files changed, 1696 insertions(+), 875 deletions(-) create mode 100644 src/views/think/thinkCard/components/invoice.vue create mode 100644 src/views/think/thinkCard/components/thinkCardLog.vue diff --git a/.env.development b/.env.development index a189928..4e479a6 100644 --- a/.env.development +++ b/.env.development @@ -3,9 +3,8 @@ VITE_SOCKET_URL=wss://server.gxwebsoft.com VITE_SERVER_URL=https://gxtyzx-server.websoft.top/api VITE_API_URL=https://gxtyzx-modules.websoft.top/api VITE_THINK_URL=https://gxtyzx-api2.websoft.top/api +#VITE_THINK_URL=http://127.0.0.1:9099/api #VITE_SERVER_URL=http://127.0.0.1:30000/api #VITE_API_URL=http://127.0.0.1:9002/api -#VITE_THINK_URL=http://127.0.0.1:9099/api -#/booking/bookingItem diff --git a/src/api/system/user/model/index.ts b/src/api/system/user/model/index.ts index 39a5bb5..85264cd 100644 --- a/src/api/system/user/model/index.ts +++ b/src/api/system/user/model/index.ts @@ -1,7 +1,7 @@ -import type { PageParam } from '@/api'; -import type { Role } from '../../role/model'; -import type { Menu } from '../../menu/model'; -import { Company } from '@/api/system/company/model'; +import type { PageParam } from "@/api"; +import type { Role } from "../../role/model"; +import type { Menu } from "../../menu/model"; +import { Company } from "@/api/system/company/model"; /** * 用户 @@ -108,6 +108,7 @@ export interface User { idcard?: string; // truename?: string; + limitSite?: string; // 是否管理员:1是;2否 isAdmin?: boolean; // 客户端ID @@ -118,6 +119,7 @@ export interface User { sortNumber?: number; deleted?: number; + isOrganizationAdmin?: number; } /** diff --git a/src/api/think/thinkCardLog/index.ts b/src/api/think/thinkCardLog/index.ts index 584bdd7..0406ec1 100644 --- a/src/api/think/thinkCardLog/index.ts +++ b/src/api/think/thinkCardLog/index.ts @@ -104,3 +104,13 @@ export async function getThinkCardLog(id: number) { } return Promise.reject(new Error(res.data.message)); } + +export async function thinkCardLogExport(data: ThinkCardLog) { + const res = await request.post>( + THINK_API_URL + '/think/think-card-log/export', data + ); + if (res.data.code === 0) { + return res.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/think/thinkOrder/model/index.ts b/src/api/think/thinkOrder/model/index.ts index a762cef..c3ff415 100644 --- a/src/api/think/thinkOrder/model/index.ts +++ b/src/api/think/thinkOrder/model/index.ts @@ -88,10 +88,13 @@ export interface ThinkOrder { export interface ThinkOrderParam extends PageParam { id?: number; sid?: number; + cid?: number; payStatus?: number; orderStatus?: number; payType?: number; isInvoice?: number; + checkBill?: number; siteName?: string; keywords?: string; + wechatOrder?: string; } diff --git a/src/api/think/thinkRechargeLog/index.ts b/src/api/think/thinkRechargeLog/index.ts index 786656c..95da3cb 100644 --- a/src/api/think/thinkRechargeLog/index.ts +++ b/src/api/think/thinkRechargeLog/index.ts @@ -106,3 +106,13 @@ export async function getThinkRechargeLog(id: number) { } return Promise.reject(new Error(res.data.message)); } + +export async function thinkRechargeLogRefund(data: ThinkRechargeLog) { + const res = await request.post>( + THINK_API_URL + '/think/think-recharge-log/refund', data + ); + if (res.data.code === 0) { + return res.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/think/thinkSite/model/index.ts b/src/api/think/thinkSite/model/index.ts index 396ced9..f5a4c15 100644 --- a/src/api/think/thinkSite/model/index.ts +++ b/src/api/think/thinkSite/model/index.ts @@ -31,6 +31,7 @@ export interface ThinkSite { tel?: string; // 排序 sortNumber?: number; + sort?: number; // 类型:1天,2小时 type?: string; // 天数或小时 @@ -46,6 +47,7 @@ export interface ThinkSite { // 周末活动订场开关:1开,0关 weekendOpen?: number; dailyMaxNum?: number; + album?: string; key?: number; value?: number; title?: string; diff --git a/src/api/think/thinkVip/model/index.ts b/src/api/think/thinkVip/model/index.ts index c5a6dac..e8fc691 100644 --- a/src/api/think/thinkVip/model/index.ts +++ b/src/api/think/thinkVip/model/index.ts @@ -11,6 +11,7 @@ export interface ThinkVip { name?: string; // 会员卡价格 price?: number; + renewPrice?: number; // 会员卡介绍 desc?: string; // 会员卡说明 @@ -50,6 +51,7 @@ export interface ThinkVip { // 是否有效:1是,0否 isUse?: number; isSale?: number; + reportSid?: number; } /** diff --git a/src/api/think/thinkVipCardsBills/index.ts b/src/api/think/thinkVipCardsBills/index.ts index e5be3a6..6c4d109 100644 --- a/src/api/think/thinkVipCardsBills/index.ts +++ b/src/api/think/thinkVipCardsBills/index.ts @@ -117,3 +117,12 @@ export async function getThinkVipCardsBills(id: number) { } return Promise.reject(new Error(res.data.message)); } +export async function thinkVipCardsBillsExport(data: ThinkVipCardsBillsParam) { + const res = await request.post>( + THINK_API_URL + '/think/think-vip-cards-bills/export', data + ); + if (res.data.code === 0) { + return res.data + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/think/thinkVipCardsBills/model/index.ts b/src/api/think/thinkVipCardsBills/model/index.ts index a7cb35c..9a183c8 100644 --- a/src/api/think/thinkVipCardsBills/model/index.ts +++ b/src/api/think/thinkVipCardsBills/model/index.ts @@ -34,4 +34,6 @@ export interface ThinkVipCardsBillsParam extends PageParam { keywords?: string; dateStart?: string; dateEnd?: string; + isCard?: boolean; + isVip?: boolean; } diff --git a/src/views/booking/export/components/search.vue b/src/views/booking/export/components/search.vue index b6fe6ef..f06f55d 100644 --- a/src/views/booking/export/components/search.vue +++ b/src/views/booking/export/components/search.vue @@ -130,7 +130,7 @@ const search = () => { const [d1, d2] = dateRange.value ?? []; xlsFileName.value = `${d1}至${d2}`; where.timeStart = d1 ? dayjs(d1).valueOf() / 1000 : undefined; - where.timeEnd = d2 ? dayjs(d2).valueOf() / 1000 : undefined; + where.timeEnd = d2 ? dayjs(d2 + ' 23:59:59').valueOf() / 1000 : undefined; // where.createTimeStart = d1 ? d1 + ' 00:00:00' : undefined; // where.createTimeEnd = d2 ? d2 + ' 00:00:00' : undefined; emit("search", { diff --git a/src/views/booking/finance/components/orderList.vue b/src/views/booking/finance/components/orderList.vue index 110a548..c1cb746 100644 --- a/src/views/booking/finance/components/orderList.vue +++ b/src/views/booking/finance/components/orderList.vue @@ -4,25 +4,44 @@ :visible="visible" :confirm-loading="loading" title="订单列表" - :body-style="{ paddingBottom: '8px', background: '#f3f3f3' }" + :body-style="{ paddingBottom: '8px', background: '#f3f3f3',}" @update:visible="updateVisible" :maskClosable="false" :footer="null" > + + 订场订场 + 会员卡购买 + + + 订场订单 + 实体卡购买 + 实体卡续卡 + - - - - + + + + + + + + + + + + + @@ -147,8 +212,6 @@ diff --git a/src/views/think/thinkCard/components/invoice.vue b/src/views/think/thinkCard/components/invoice.vue new file mode 100644 index 0000000..1e39563 --- /dev/null +++ b/src/views/think/thinkCard/components/invoice.vue @@ -0,0 +1,286 @@ + + + + diff --git a/src/views/think/thinkCard/components/thinkCardLog.vue b/src/views/think/thinkCard/components/thinkCardLog.vue new file mode 100644 index 0000000..e61e9a3 --- /dev/null +++ b/src/views/think/thinkCard/components/thinkCardLog.vue @@ -0,0 +1,101 @@ + + + + diff --git a/src/views/think/thinkCard/index.vue b/src/views/think/thinkCard/index.vue index 27197c4..0938698 100644 --- a/src/views/think/thinkCard/index.vue +++ b/src/views/think/thinkCard/index.vue @@ -28,6 +28,8 @@ {{ record.username }} + 使用记录 + 注销 + + 开票 @@ -115,6 +121,8 @@ import { } from "@/api/think/thinkCard"; import type { ThinkCard, ThinkCardParam } from "@/api/think/thinkCard/model"; import MakeICCard from "@/views/think/thinkCard/components/makeICCard.vue"; +import ThinkCardLog from "./components/thinkCardLog.vue"; +import Invoice from "./components/invoice.vue"; // 表格实例 const tableRef = ref | null>(null); @@ -143,7 +151,9 @@ const payTypes = ref([ "支付宝支付", "现金", "POS机刷卡", - "平安健康卡" + "平安健康卡", + "免费", + "抖音支付", ]); const isIntegral = ref(["", "赠送", "不赠送"]); @@ -169,12 +179,12 @@ const datasource: DatasourceFunction = ({ // 表格列配置 const columns = ref([ { - title: "姓名", + title: "操作", dataIndex: "username", key: "username", align: "center", fixed: "left", - width: 280 + width: 400 }, { title: "卡号", @@ -346,110 +356,6 @@ const columns = ref([ width: 180, customRender: ({ text }) => toDateString(text, "yyyy-MM-dd HH:mm:ss") } - // { - // title: '微信订单号', - // dataIndex: 'wechatOrder', - // key: 'wechatOrder', - // align: 'center' - // }, - // { - // title: '手机号码', - // dataIndex: 'phone', - // key: 'phone', - // align: 'center', - // }, - // { - // title: '会员卡介绍', - // dataIndex: 'desc', - // key: 'desc', - // align: 'center', - // }, - // { - // title: '会员卡说明', - // dataIndex: 'info', - // key: 'info', - // align: 'center', - // }, - // { - // title: '续费累加次数', - // dataIndex: 'number', - // key: 'number', - // align: 'center', - // }, - // { - // title: '付款状态,1已付款,2未付款', - // dataIndex: 'status', - // key: 'status', - // align: 'center', - // }, - // { - // title: '卡类型:1成人卡,2儿童卡', - // dataIndex: 'cardType', - // key: 'cardType', - // align: 'center', - // }, - // { - // title: 'vip卡等级类型:1特殊vip卡,2普通vip卡', - // dataIndex: 'vipType', - // key: 'vipType', - // align: 'center', - // }, - // { - // title: '特殊卡开发凭证图', - // dataIndex: 'pic', - // key: 'pic', - // align: 'center', - // }, - // { - // title: '价格组', - // dataIndex: 'prices', - // key: 'prices', - // align: 'center', - // }, - // { - // title: '卡号', - // dataIndex: 'cardNum', - // key: 'cardNum', - // align: 'center' - // } - // { - // title: '密码', - // dataIndex: 'password', - // key: 'password', - // align: 'center', - // }, - // { - // title: '使用时间', - // dataIndex: 'useTime', - // key: 'useTime', - // align: 'center', - // }, - // { - // title: '', - // dataIndex: 'updateTime', - // key: 'updateTime', - // align: 'center', - // }, - // { - // title: '身份证号码', - // dataIndex: 'idcard', - // key: 'idcard', - // align: 'center', - // }, - // { - // title: '备注', - // dataIndex: 'remark', - // key: 'remark', - // align: 'center', - // }, - // { - // title: '操作', - // key: 'action', - // width: 180, - // fixed: 'right', - // align: 'center', - // hideInSetting: true - // } ]); /* 搜索 */ @@ -541,6 +447,18 @@ const query = () => { loading.value = true; }; +const showLog = ref(false) +const openLog = (row: ThinkCard) => { + showLog.value = true + current.value = row +} + +const showInvoice = ref(false) +const onInvoice = (row?: ThinkCard) => { + current.value = row ?? null; + showInvoice.value = true; +}; + /* 自定义行属性 */ const customRow = (record: ThinkCard) => { return { diff --git a/src/views/think/thinkCardLog/components/search.vue b/src/views/think/thinkCardLog/components/search.vue index b8c0dee..a3a3bf0 100644 --- a/src/views/think/thinkCardLog/components/search.vue +++ b/src/views/think/thinkCardLog/components/search.vue @@ -43,7 +43,7 @@ ThinkCardLog, ThinkCardLogParam } from '@/api/think/thinkCardLog/model'; - import { listThinkCardLog } from '@/api/think/thinkCardLog'; + import { listThinkCardLog, thinkCardLogExport } from "@/api/think/thinkCardLog"; const props = withDefaults( defineProps<{ @@ -106,74 +106,8 @@ // 导出 const handleExport = async () => { loading.value = true; - const array: (string | number)[][] = [ - [ - '卡号', - '姓名', - '手机号', - '会员卡名称', - '支付方式', - '充值金额', - '充值次数', - '操作员', - '第三方订单号', - '充值时间' - ] - ]; - if (!where.timeStart) { - message.error('请选择导出的开始日期、结束日期,每次最多导出5000条记录'); - return false; - } - await listThinkCardLog(where) - .then((list) => { - orders.value = list; - orders.value?.forEach((d: ThinkCardLog) => { - array.push([ - `${d.code}`, - `${d.username}`, - `${d.phone}`, - `${d.cardName}`, - `${payType.value[Number(d.payType)]}`, - `${d.money}`, - `${d.count}`, - `${d.adminName || d.aid}`, - `${d.wechatOrder}`, - `${toDateString(d.createTime)}` - ]); - }); - const sheetName = `充值记录导出`; - const workbook = { - SheetNames: [sheetName], - Sheets: {} - }; - const sheet = utils.aoa_to_sheet(array); - workbook.Sheets[sheetName] = sheet; - // 设置列宽 - sheet['!cols'] = [ - { wch: 10 }, - { wch: 10 }, - { wch: 10 }, - { wch: 10 }, - { wch: 20 }, - { wch: 40 }, - { wch: 10 } - ]; - message.loading('正在导出...'); - setTimeout(() => { - writeFile( - workbook, - `${ - where.createTimeEnd ? xlsFileName.value + '_' : '' - }${sheetName}.xlsx` - ); - loading.value = false; - }, 2000); - }) - .catch((msg) => { - message.error(msg); - loading.value = false; - }) - .finally(() => {}); + const res = await thinkCardLogExport(where) + window.open(res.data.url); }; watch( diff --git a/src/views/think/thinkCardLog/index.vue b/src/views/think/thinkCardLog/index.vue index ea0dfb4..43d12d0 100644 --- a/src/views/think/thinkCardLog/index.vue +++ b/src/views/think/thinkCardLog/index.vue @@ -29,6 +29,9 @@ 支付宝支付 现金支付 POS支付 + 平安健康卡 + 对公支付 + 抖音支付 @@ -158,6 +161,13 @@ sorter: true, align: 'center' }, + { + title: '续卡价格', + dataIndex: 'renewPrice', + key: 'renewPrice', + sorter: true, + align: 'center' + }, // { // title: '会员卡说明', // dataIndex: 'info', diff --git a/src/views/think/thinkVipCardsBills/components/search.vue b/src/views/think/thinkVipCardsBills/components/search.vue index fc221b0..f925b6c 100644 --- a/src/views/think/thinkVipCardsBills/components/search.vue +++ b/src/views/think/thinkVipCardsBills/components/search.vue @@ -9,14 +9,17 @@ value-format="YYYY-MM-DD" class="ele-fluid" /> + 导出 -

总金额:{{totalAmount }}元

+

总金额:{{ totalAmount }}元