修改重新审核bug,选择固定时间去记账之后返回还是原本的时间和tab

This commit is contained in:
2023-11-06 18:01:10 +08:00
parent afa3dedc05
commit 54befa1d4b
3 changed files with 19 additions and 15 deletions

View File

@ -360,7 +360,6 @@ export default {
this.postfix=this.$route.params?.postfix; this.postfix=this.$route.params?.postfix;
this.index=this.$route.params?.index; this.index=this.$route.params?.index;
this.queryTime = this.$route.params?.queryTime this.queryTime = this.$route.params?.queryTime
// console.log(" this.queryTime", this.queryTime)
this.$nextTick(async ()=>{ this.$nextTick(async ()=>{
await this.getDetail() await this.getDetail()
}) })
@ -395,11 +394,12 @@ export default {
console.log("file",file) console.log("file",file)
}, },
goback(){ goback(){
// console.log("aaaaa",this.queryTime)
this.$router.push({ this.$router.push({
name:"workOrderReconciliation", name:"workOrderReconciliation",
params:{ params:{
activeIndex:this.index, activeIndex:this.index,
queryTime:this.queryTime queryTime:this.queryTime,
} }
}) })
}, },
@ -575,7 +575,7 @@ export default {
name:"workOrderReconciliation", name:"workOrderReconciliation",
params:{ params:{
activeIndex:this.index, activeIndex:this.index,
queryTime:this.queryTime queryTime:this.queryTime,
} }
}) })
},2000) },2000)

View File

@ -163,6 +163,7 @@ export default {
this.postfix=this.$route.params?.postfix; this.postfix=this.$route.params?.postfix;
this.index=this.$route.params?.index; this.index=this.$route.params?.index;
this.queryTime = this.$route.params?.queryTime this.queryTime = this.$route.params?.queryTime
console.log("111111111111",this.$route.params?.queryTime)
await this.getDetail() await this.getDetail()
}, },
methods: { methods: {

View File

@ -98,9 +98,10 @@ export default {
} }
}, },
async mounted() { async mounted() {
console.log("params",this.$route.params?.queryTime)
this.activeIndex=this.$route.params?.activeIndex || 0 this.activeIndex=this.$route.params?.activeIndex || 0
this.queryType=this.$route.params?.queryType || this.queryType 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.initIndex()
await this.initSelectTime(); await this.initSelectTime();
await this.getPermissions(); await this.getPermissions();
@ -174,7 +175,7 @@ export default {
id: item.id, // 参数对象的属性 id: item.id, // 参数对象的属性
postfix:item.postfix, postfix:item.postfix,
index:this.activeIndex, index:this.activeIndex,
queryTime:this.queryTime queryTime: this.time || this.queryTime
} }
}); });
}, },
@ -189,16 +190,18 @@ export default {
await this.getList(); await this.getList();
}, },
initSelectTime() {//初始化查询时间 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){ if(this.time){
const date = new Date(this.time); const date = new Date(this.time);
const year = date.getFullYear(); // 获取年份,结果为 2023 const year = date.getFullYear(); // 获取年份,结果为 2023
const month = (date.getMonth() + 1).toString().padStart(2, '0'); // 获取月份,需要注意月份从 0 开始,所以要加 1结果为 9 const month = (date.getMonth() + 1).toString().padStart(2, '0'); // 获取月份,需要注意月份从 0 开始,所以要加 1结果为 9
this.ymTime = year + '-' + month 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());
}, },
} }
} }