From 784e373c7eeef8c86486cf0d3a621eb9429a0d4b Mon Sep 17 00:00:00 2001 From: 18631081161 <2088094923@qq.com> Date: Wed, 24 Dec 2025 14:23:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/src/views/appointments/index.vue | 11 +++++++++-- admin/src/views/payment-orders/index.vue | 12 +++++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/admin/src/views/appointments/index.vue b/admin/src/views/appointments/index.vue index 171c845..daf0460 100644 --- a/admin/src/views/appointments/index.vue +++ b/admin/src/views/appointments/index.vue @@ -910,8 +910,15 @@ function handleCreatePaymentOrder(row) { paymentForm.serviceContent = row.service?.titleZh || row.hotService?.name_zh || row.serviceType || '' paymentForm.amountPeso = null paymentForm.amountRmb = null - // 默认设置为当前时间 - paymentForm.paymentTime = new Date().toISOString().slice(0, 19).replace('T', ' ') + // 默认设置为当前本地时间 + const now = new Date() + const year = now.getFullYear() + const month = String(now.getMonth() + 1).padStart(2, '0') + const day = String(now.getDate()).padStart(2, '0') + const hours = String(now.getHours()).padStart(2, '0') + const minutes = String(now.getMinutes()).padStart(2, '0') + const seconds = String(now.getSeconds()).padStart(2, '0') + paymentForm.paymentTime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}` paymentForm.notes = '' paymentDialogVisible.value = true } diff --git a/admin/src/views/payment-orders/index.vue b/admin/src/views/payment-orders/index.vue index 102ea6a..1ab208c 100644 --- a/admin/src/views/payment-orders/index.vue +++ b/admin/src/views/payment-orders/index.vue @@ -316,12 +316,22 @@ function handleSizeChange(size) { } function showCreateDialog() { + // 生成当前本地时间 + const now = new Date() + const year = now.getFullYear() + const month = String(now.getMonth() + 1).padStart(2, '0') + const day = String(now.getDate()).padStart(2, '0') + const hours = String(now.getHours()).padStart(2, '0') + const minutes = String(now.getMinutes()).padStart(2, '0') + const seconds = String(now.getSeconds()).padStart(2, '0') + const currentTime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}` + Object.assign(createForm, { userId: '', amountPeso: null, amountRmb: null, serviceContent: '', - paymentTime: '', + paymentTime: currentTime, appointmentId: '', notes: '', })