From 178c69ab3706804dc6df05ccc499a542a8679fc3 Mon Sep 17 00:00:00 2001 From: zq <136432190602163.com> Date: Wed, 7 May 2025 17:48:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E6=9C=9F=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=97=A0=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/super/Ranking/Purchase.vue | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/src/views/super/Ranking/Purchase.vue b/src/views/super/Ranking/Purchase.vue index 38e5687..25a0a71 100644 --- a/src/views/super/Ranking/Purchase.vue +++ b/src/views/super/Ranking/Purchase.vue @@ -31,10 +31,8 @@ - - + @@ -163,7 +161,7 @@ export default { unit_price: '', unit_num: '', cost: '', - date: '', + date: [], start_date: '', end_date: '', }, @@ -199,17 +197,24 @@ export default { this.currentPage = 1 this.getData() }, - 'form.date'(newVal) { - if (Array.isArray(newVal) && newVal.length === 2) { - this.form.start_date = this.formatDateTime(new Date(newVal[0])); - this.form.end_date = this.formatDateTime(new Date(newVal[1])); - } else { - this.form.start_date = ''; - this.form.end_date = ''; - } - } + // 'form.date'(newVal) { + // if (Array.isArray(newVal) && newVal.length === 2) { + // this.form.start_date = this.formatDateTime(new Date(newVal[0])); + // this.form.end_date = this.formatDateTime(new Date(newVal[1])); + // } else { + // this.form.start_date = ''; + // this.form.end_date = ''; + // } + // } }, methods: { + testClick(e) { + this.$nextTick(() => { + // this.$set(this.form, "date", [e[0], e[1]]); + this.$set(this.form, "start_date", e[0]); + this.$set(this.form, "end_date", e[1]); + }); + }, getData(){ if (this.type == 'purchase') { this.getPurchase() @@ -379,7 +384,7 @@ export default { this.dialogVisible = true; this.$nextTick(()=>{ this.form = { ...row }; - this.form.date = [row.start_date, row.end_date] + this.$set(this.form,'date', [row.start_date, row.end_date]) this.$forceUpdate(); }) },