时间
This commit is contained in:
parent
b25822aa61
commit
784e373c7e
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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: '',
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user