From 81cd8746b0ce2af560c8b205c4327920e3a9ed0d Mon Sep 17 00:00:00 2001 From: gyq <875626088@qq.com> Date: Fri, 17 Jul 2026 14:31:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 12 +- .env.location | 6 +- .env.production | 8 +- src/api/market/member.ts | 8 + src/views/order/index/components/orderEnum.js | 22 + src/views/order/index/config/content.ts | 5 +- src/views/order/index/detail.vue | 744 ++++++++++++++++++ src/views/order/index/index.vue | 3 +- .../user/list/components/setUserVipDialog.vue | 277 +++++++ src/views/user/list/config/content.ts | 4 +- src/views/user/list/config/edit.ts | 46 +- src/views/user/list/index.vue | 38 + 12 files changed, 1136 insertions(+), 37 deletions(-) create mode 100644 src/views/order/index/detail.vue create mode 100644 src/views/user/list/components/setUserVipDialog.vue diff --git a/.env.development b/.env.development index 666961f..3250be8 100644 --- a/.env.development +++ b/.env.development @@ -8,18 +8,18 @@ VITE_APP_BASE_API=/dev-api # VITE_APP_API_URL=https://tapi.cashier.sxczgkj.cn/ # 测试 # VITE_APP_API_URL=https://cashier.sxczgkj.com/ # 正式 -# VITE_APP_API_URL=http://192.168.1.42/ # 本地 - VITE_APP_API_URL=https://frp.sxczgkj.com # 本地映射地址 - VITE_APP_API_PHP_URL=http://192.168.1.42:8000 #php抖音美团测试环境 - VITE_APP_API_PHP_IMPORT_URL=http://192.168.1.42:8789 #本地php批量导入 + VITE_APP_API_URL=http://192.168.1.43/ # 本地 +# VITE_APP_API_URL=https://frp.sxczgkj.com # 本地映射地址 + VITE_APP_API_PHP_URL=http://192.168.1.43:8000 #php抖音美团测试环境 + VITE_APP_API_PHP_IMPORT_URL=http://192.168.1.43:8789 #本地php批量导入 # VITE_APP_API_PHP_IMPORT_URL=https://diftcs.sxczgkj.com #本地线上php批量导入 # WebSocket 端点(不配置则关闭),线上 ws://api.youlai.tech/ws ,本地 ws://localhost:8989/ws # VITE_APP_WS_ENDPOINT=wss://sockets.sxczgkj.com/wss # VITE_APP_WS_ENDPOINT=wss://czgeatws.sxczgkj.com/wss # 正式 -# VITE_APP_WS_ENDPOINT=ws://192.168.1.42:2348 # 本地 -VITE_APP_WS_ENDPOINT=ws://frp.sxczgkj.com/wss # 本地 +VITE_APP_WS_ENDPOINT=ws://192.168.1.43:2348 # 本地 +# VITE_APP_WS_ENDPOINT=ws://frp.sxczgkj.com/wss # 本地 # VITE_APP_API_PHP_URL=https://newblockwlx.sxczgkj.cn #php抖音美团正式环境 # 启用 Mock 服务 diff --git a/.env.location b/.env.location index b50434d..56348bb 100644 --- a/.env.location +++ b/.env.location @@ -8,14 +8,14 @@ VITE_APP_PORT=3000 # VITE_APP_API_URL=https://tapi.cashier.sxczgkj.cn/ # 测试 # VITE_APP_API_URL=https://cashier.sxczgkj.com/ # 正式 -VITE_APP_API_URL=http://192.168.1.42/ # 本地 +VITE_APP_API_URL=http://192.168.1.43/ # 本地 # WebSocket 端点(不配置则关闭),线上 ws://api.youlai.tech/ws ,本地 ws://localhost:8989/ws # VITE_APP_WS_ENDPOINT=wss://sockets.sxczgkj.com/wss # VITE_APP_WS_ENDPOINT=wss://czgeatws.sxczgkj.com/wss # 正式 -VITE_APP_WS_ENDPOINT=ws://192.168.1.42:2348 # 本地 - VITE_APP_API_PHP_URL=http://192.168.1.42:8000 #php抖音美团测试环境 +VITE_APP_WS_ENDPOINT=ws://192.168.1.43:2348 # 本地 + VITE_APP_API_PHP_URL=http://192.168.1.43:8000 #php抖音美团测试环境 # 启用 Mock 服务 diff --git a/.env.production b/.env.production index 0bade69..66bd161 100644 --- a/.env.production +++ b/.env.production @@ -7,8 +7,8 @@ VITE_APP_NAME=production #VITE_APP_WS_ENDPOINT=wss://api.youlai.tech/ws # 接口地址 -VITE_APP_BASE_API = https://cashier.sxczgkj.com/ -# VITE_APP_BASE_API = https://frp.sxczgkj.com/ +# VITE_APP_BASE_API = https://cashier.sxczgkj.com/ +VITE_APP_BASE_API = https://frp.sxczgkj.com/ VITE_APP_API_PHP_URL=https://newblockwlx.sxczgkj.cn #php抖音美团正式环境 @@ -19,9 +19,9 @@ VITE_APP_API_PHP_URL=https://newblockwlx.sxczgkj.cn #php抖音美团正式环 # WebSocket 端点(不配置则关闭),线上 ws://api.youlai.tech/ws ,本地 ws://localhost:8989/ws -VITE_APP_WS_ENDPOINT=wss://czgeatws.sxczgkj.com/wss +# VITE_APP_WS_ENDPOINT=wss://czgeatws.sxczgkj.com/wss -# VITE_APP_WS_ENDPOINT=wss://frp.sxczgkj.com/wss +VITE_APP_WS_ENDPOINT=wss://frp.sxczgkj.com/wss # 启用 Mock 服务 VITE_MOCK_DEV_SERVER=false diff --git a/src/api/market/member.ts b/src/api/market/member.ts index 3cf52d0..e52a991 100644 --- a/src/api/market/member.ts +++ b/src/api/market/member.ts @@ -44,6 +44,14 @@ const API = { params }); }, + // 修改会员信息 + editMemberInfo(data: any) { + return request({ + url: `/account/admin/shopUser/editVip`, + method: "put", + data: data, + }); + }, } export default API; diff --git a/src/views/order/index/components/orderEnum.js b/src/views/order/index/components/orderEnum.js index 43e8e95..fe71d19 100644 --- a/src/views/order/index/components/orderEnum.js +++ b/src/views/order/index/components/orderEnum.js @@ -81,4 +81,26 @@ export default { label: "退单", }, ], + platformType: [ + { + key: "PC", + label: "收银机客户端", + }, + { + key: "wechat", + label: "微信小程序", + }, + { + key: "alipay", + label: "支付宝小程序", + }, + { + key: "admin-pc", + label: "PC管理端", + }, + { + key: "admin-app", + label: "APP管理端", + }, + ] }; diff --git a/src/views/order/index/config/content.ts b/src/views/order/index/config/content.ts index 15236ef..ba5b2c7 100644 --- a/src/views/order/index/config/content.ts +++ b/src/views/order/index/config/content.ts @@ -2,6 +2,7 @@ import OrderApi from "@/api/order/order"; import type { editRequest } from "@/api/system/version"; import type { IContentConfig } from "@/components/CURD/types"; import { returnOptionsLabel } from "./config"; +import { useRoute } from 'vue-router' const contentConfig: IContentConfig = { pageName: "sys:user", table: { @@ -22,7 +23,9 @@ const contentConfig: IContentConfig = { delete params.createAt; } - const res = await OrderApi.getList(params) + const route = useRoute() + + const res = await OrderApi.getList({ ...params, userId: route.query.userId }) console.log('OrderApi.getList', res); res.records.map(item => { diff --git a/src/views/order/index/detail.vue b/src/views/order/index/detail.vue new file mode 100644 index 0000000..11cbf7c --- /dev/null +++ b/src/views/order/index/detail.vue @@ -0,0 +1,744 @@ + + + + + \ No newline at end of file diff --git a/src/views/order/index/index.vue b/src/views/order/index/index.vue index 8d4a9d0..fa2e20b 100644 --- a/src/views/order/index/index.vue +++ b/src/views/order/index/index.vue @@ -238,7 +238,8 @@ function toPayOrder(order: getListResponse) { //详情 const refDetail = ref(); function showdetail(row: OrderInfoVo) { - refDetail.value.show(row); + // refDetail.value.show(row); + router.push({ name: 'order_detail', query: { orderId: row.id } }) } diff --git a/src/views/user/list/components/setUserVipDialog.vue b/src/views/user/list/components/setUserVipDialog.vue new file mode 100644 index 0000000..6763944 --- /dev/null +++ b/src/views/user/list/components/setUserVipDialog.vue @@ -0,0 +1,277 @@ + + + + + + \ No newline at end of file diff --git a/src/views/user/list/config/content.ts b/src/views/user/list/config/content.ts index d7d8e45..8ef8580 100644 --- a/src/views/user/list/config/content.ts +++ b/src/views/user/list/config/content.ts @@ -94,7 +94,8 @@ const contentConfig: IContentConfig = { align: "center", fixed: "right", width: 180, - templet: "tool", + templet: "custom", + slotName: "operat", operat: [ { name: "edit", @@ -109,6 +110,7 @@ const contentConfig: IContentConfig = { { label: '充值记录', command: 'charge-list' }, { label: '赠送券', command: 'give-coupon' }, { label: '账号禁用/开启', command: 'user-disabld' }, + { label: '设置会员等级', command: 'user-vip' }, ] }, ], diff --git a/src/views/user/list/config/edit.ts b/src/views/user/list/config/edit.ts index 83b910e..0a47485 100644 --- a/src/views/user/list/config/edit.ts +++ b/src/views/user/list/config/edit.ts @@ -44,27 +44,27 @@ const modalConfig: IModalConfig = { sm: 12, }, }, - // { - // type: "input", - // label: "手机号码", - // prop: "phone", - // rules: [ - // { - // required: true, - // pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, - // message: "请输入正确的手机号码", - // trigger: "blur", - // }, - // ], - // attrs: { - // placeholder: "请输入手机号码", - // maxlength: 11, - // }, - // col: { - // xs: 24, - // sm: 12, - // }, - // }, + { + type: "input", + label: "手机号码", + prop: "phone", + rules: [ + { + required: true, + pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, + message: "请输入正确的手机号码", + trigger: "blur", + }, + ], + attrs: { + placeholder: "请输入手机号码", + maxlength: 11, + }, + col: { + xs: 24, + sm: 12, + }, + }, { label: "会员生日", prop: "birthDay", @@ -72,6 +72,10 @@ const modalConfig: IModalConfig = { type: "date-picker", attrs: { placeholder: "请选择会员生日", + // 禁止选择今天之后的日期 + 'disabled-date': (time: any) => { + return dayjs(time).isAfter(dayjs(), 'day') + } }, col: { xs: 24, diff --git a/src/views/user/list/index.vue b/src/views/user/list/index.vue index 7db7205..91523b4 100644 --- a/src/views/user/list/index.vue +++ b/src/views/user/list/index.vue @@ -89,7 +89,30 @@ + + + @@ -163,7 +186,9 @@ import shopUserApi from "@/api/account/shopUser"; import { useRoute } from 'vue-router' import { ElNotification } from 'element-plus' import { downloadFile } from "@/utils/index"; +import setUserVipDialog from "./components/setUserVipDialog.vue"; +const setUserVipDialogRef = ref(null); const editMoneyModalRef = ref(null); const userCouponDialogRef = ref(null); const GiveCouponRef = ref(null); @@ -317,6 +342,11 @@ async function getUserVipInfo() { // 赠送券 function toGiveCoupon() { } + +function dropdownCommand(command, row) { + handleOperatClick({ name: "more", command, row }); +} + // 其他操作列 async function handleOperatClick(data) { const row = data.row; @@ -343,6 +373,14 @@ async function handleOperatClick(data) { visible.value = true return } + if (data.command === 'user-vip') { + setUserVipDialogRef.value.open(row) + return + } + if (data.command === 'user-vip-cancel') { + setUserVipDialogRef.value.cancelVip(row) + return + } return; } }