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()); + }, } }