修改重新审核bug,选择固=时间去记账之后返回还是原本的时间和tab
This commit is contained in:
@ -93,16 +93,18 @@ export default {
|
||||
currentDate: new Date(),
|
||||
ymTime: '',//默认显示时间为当年当月
|
||||
isLoading:"",
|
||||
permissonList:[]
|
||||
permissonList:[],
|
||||
time:'',//当页面已经跳转到其他页面时就用原本的时间,如果没有就用当前时间
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
async mounted() {
|
||||
this.activeIndex=this.$route.params?.activeIndex || 0
|
||||
this.queryType=this.$route.params?.queryType || this.queryType
|
||||
this.initIndex()
|
||||
this.initSelectTime();
|
||||
this.getPermissions();
|
||||
this.getList();
|
||||
this.time = this.$route.params?.queryTime || this.queryTime
|
||||
await this.initIndex()
|
||||
await this.initSelectTime();
|
||||
await this.getPermissions();
|
||||
await this.getList();
|
||||
},
|
||||
computed:{
|
||||
show() {
|
||||
@ -130,7 +132,7 @@ export default {
|
||||
pageNum:this.pageNum,
|
||||
pageSize:this.pageSize,
|
||||
queryType:this.queryType,
|
||||
queryTime:this.queryTime
|
||||
queryTime:this.time || this.queryTime,//当页面已经跳转到其他页面时就用原本的时间,如果没有就用当前时间
|
||||
})
|
||||
if(res.code === 200){
|
||||
this.orderList = res.data;
|
||||
@ -139,16 +141,18 @@ export default {
|
||||
async getPermissions(){
|
||||
let res = await userOperationPermissions();
|
||||
this.permissonList = res.data
|
||||
console.log("1122",this.permissonList)
|
||||
// console.log("1122",this.permissonList)
|
||||
// console.log('工单对账',this.permissonList.includes('supplierRecordOperation'))
|
||||
},
|
||||
handleAccounting(item){
|
||||
console.log("item")
|
||||
this.$router.push({
|
||||
name: 'accountingView', // 目标路由的名称
|
||||
params: {
|
||||
id: item.id, // 参数对象的属性
|
||||
postfix:item.postfix,
|
||||
index:this.activeIndex
|
||||
index:this.activeIndex,
|
||||
queryTime:this.queryTime
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -170,6 +174,7 @@ export default {
|
||||
id: item.id, // 参数对象的属性
|
||||
postfix:item.postfix,
|
||||
index:this.activeIndex,
|
||||
queryTime:this.queryTime
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -188,6 +193,12 @@ export default {
|
||||
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
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user