From 54befa1d4b03838113b0000697fc9af803cb896f Mon Sep 17 00:00:00 2001 From: zhouxueli <2841188632@qq.com> Date: Mon, 6 Nov 2023 18:01:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=87=8D=E6=96=B0=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8bug=EF=BC=8C=E9=80=89=E6=8B=A9=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=8E=BB=E8=AE=B0=E8=B4=A6=E4=B9=8B=E5=90=8E?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E8=BF=98=E6=98=AF=E5=8E=9F=E6=9C=AC=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=92=8Ctab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/workOrder/accounting.vue | 18 +++++++++--------- src/views/workOrder/aduitCompleteDetail.vue | 1 + .../workOrder/workOrderReconciliation.vue | 15 +++++++++------ 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/views/workOrder/accounting.vue b/src/views/workOrder/accounting.vue index efc62b43..b530b81b 100644 --- a/src/views/workOrder/accounting.vue +++ b/src/views/workOrder/accounting.vue @@ -360,7 +360,6 @@ export default { this.postfix=this.$route.params?.postfix; this.index=this.$route.params?.index; this.queryTime = this.$route.params?.queryTime - // console.log(" this.queryTime", this.queryTime) this.$nextTick(async ()=>{ await this.getDetail() }) @@ -395,13 +394,14 @@ export default { console.log("file",file) }, goback(){ - this.$router.push({ - name:"workOrderReconciliation", - params:{ - activeIndex:this.index, - queryTime:this.queryTime - } - }) + // console.log("aaaaa",this.queryTime) + this.$router.push({ + name:"workOrderReconciliation", + params:{ + activeIndex:this.index, + queryTime:this.queryTime, + } + }) }, async compute() { //现金业务置为0 @@ -575,7 +575,7 @@ export default { name:"workOrderReconciliation", params:{ activeIndex:this.index, - queryTime:this.queryTime + queryTime:this.queryTime, } }) },2000) diff --git a/src/views/workOrder/aduitCompleteDetail.vue b/src/views/workOrder/aduitCompleteDetail.vue index 63f56a21..ccda9d85 100644 --- a/src/views/workOrder/aduitCompleteDetail.vue +++ b/src/views/workOrder/aduitCompleteDetail.vue @@ -163,6 +163,7 @@ export default { this.postfix=this.$route.params?.postfix; this.index=this.$route.params?.index; this.queryTime = this.$route.params?.queryTime + console.log("111111111111",this.$route.params?.queryTime) await this.getDetail() }, methods: { diff --git a/src/views/workOrder/workOrderReconciliation.vue b/src/views/workOrder/workOrderReconciliation.vue index 6a7536f0..cfd809a3 100644 --- a/src/views/workOrder/workOrderReconciliation.vue +++ b/src/views/workOrder/workOrderReconciliation.vue @@ -98,9 +98,10 @@ export default { } }, async mounted() { + console.log("params",this.$route.params?.queryTime) this.activeIndex=this.$route.params?.activeIndex || 0 this.queryType=this.$route.params?.queryType || this.queryType - this.time = this.$route.params?.queryTime || this.queryTime + this.time = this.$route.params?.queryTime await this.initIndex() await this.initSelectTime(); await this.getPermissions(); @@ -174,7 +175,7 @@ export default { id: item.id, // 参数对象的属性 postfix:item.postfix, index:this.activeIndex, - queryTime:this.queryTime + queryTime: this.time || this.queryTime } }); }, @@ -189,16 +190,18 @@ export default { await this.getList(); }, initSelectTime() {//初始化查询时间 - const year = this.currentDate.getFullYear(); // 获取年份,结果为 2023 - const month = (this.currentDate.getMonth() + 1).toString().padStart(2, '0'); // 获取月份,需要注意月份从 0 开始,所以要加 1,结果为 9 - this.ymTime = year + '-' + month; - this.queryTime=timeFormat(new Date()); if(this.time){ const date = new Date(this.time); const year = date.getFullYear(); // 获取年份,结果为 2023 const month = (date.getMonth() + 1).toString().padStart(2, '0'); // 获取月份,需要注意月份从 0 开始,所以要加 1,结果为 9 this.ymTime = year + '-' + month + return } + const year = this.currentDate.getFullYear(); // 获取年份,结果为 2023 + const month = (this.currentDate.getMonth() + 1).toString().padStart(2, '0'); // 获取月份,需要注意月份从 0 开始,所以要加 1,结果为 9 + this.ymTime = year + '-' + month; + this.queryTime=timeFormat(new Date()); + }, } }