From fa45406d8d8fca97d505f74316e41cb5daebf236 Mon Sep 17 00:00:00 2001 From: claw_bot Date: Tue, 10 Mar 2026 01:32:59 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=BA=A4=E6=98=93?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E9=80=89=E6=8B=A9=E6=A1=86=EF=BC=8C=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=89=8B=E5=8A=A8=E9=80=89=E6=8B=A9=E4=BA=A4=E6=98=93?= =?UTF-8?q?=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/detail/detail.vue | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/pages/detail/detail.vue b/pages/detail/detail.vue index 02d117d..a5601e7 100644 --- a/pages/detail/detail.vue +++ b/pages/detail/detail.vue @@ -214,6 +214,16 @@ + + 交易时间 + + + {{ transactionForm.transactionDate }} + + + + + 备注 { + 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'); + return `${year}-${month}-${day}`; +}; + const transactionForm = ref({ stockCode: '', amount: '', price: '', currency: 'CNY', + transactionDate: getCurrentDate(), remark: '' }); @@ -285,6 +305,10 @@ const onCurrencyChange = (e) => { transactionForm.value.currency = currencyList.value[currencyIndex.value].code; }; +const onDateChange = (e) => { + transactionForm.value.transactionDate = e.detail.value; +}; + // 股票搜索相关 const searchResults = ref([]); const searchTimer = ref(null); @@ -398,6 +422,7 @@ const resetTransactionForm = () => { amount: '', price: '', currency: 'CNY', + transactionDate: getCurrentDate(), remark: '' }; }; @@ -421,6 +446,7 @@ const submitTransaction = async () => { amount: parseFloat(transactionForm.value.amount), price: parseFloat(transactionForm.value.price), currency: transactionForm.value.currency, + transactionDate: transactionForm.value.transactionDate, remark: transactionForm.value.remark };