领料审核一级加限制,web工单按钮限制优化

This commit is contained in:
hongchao 2025-09-16 10:03:55 +08:00
parent e91ebde2fd
commit fd3f909789
3 changed files with 45 additions and 89 deletions

View File

@ -120,7 +120,7 @@ export default {
pageNum: 1,
pageSize: 10,
keyWord: '', //
status: '' //
status: '1' //
},
//
statusOptions: [
@ -144,10 +144,10 @@ export default {
},
created() {
this.userId = sessionStorage.getItem('userId')
//
if (this.statusOptions.length > 0) {
this.queryParams.status = this.statusOptions[0].value
}
// //
// if (this.statusOptions.length > 1) {
// this.queryParams.status = this.statusOptions[1].value
// }
this.getList()
},
methods: {

View File

@ -161,94 +161,35 @@ export default {
}
},
async created() {
const origin = window.location.href
console.log("xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",origin)
// if (origin.indexOf('ticket') != -1) {
// console.log("11111111111111111111111111",origin)
// await this.getConfigApi() //
// try {
// console.log("hhhhhhhhhhhhhhhhhhhhhh",origin)
// const urlParams = new URLSearchParams(origin);
// console.log("urlParamshhhhhhhhhhhhhhh",urlParams)
// this.auditingParams.taskId = urlParams.get('taskId');
// const id = urlParams.get('id');
// console.log("idhhhhhhhhhhhhhhh",id)
// const ticketMatch = origin.match(/ticket=([^&]*)/);
// console.log("ticket11111111111111111111",ticketMatch)
// const ticket = ticketMatch ? ticketMatch[1] : '';
// const res = await iwsLogin({
// ticket: ticket,
// sysType: 0
// })
// console.log('🚀 ~ created ~ resxxxxxxxxxxxxxxx:', res)
// // 1. token
// if (res.code == 200) {
// setToken(res.data.access_token)
// this.$store.commit('SET_TOKEN', res.data.access_token)
// setExpiresIn(1800)
// this.$store.commit('SET_EXPIRES_IN', 1800)
// }
// // 2.
// const resUser = await getInfo()
// // userId
// sessionStorage.setItem('userId', resUser.user?.userId)
// sessionStorage.setItem('deptName', resUser.user?.dept?.deptName)
// // sessionStorage.setItem('userName', resUser.user?.userName)
// this.userId = sessionStorage.getItem('userId')
// console.log("yyyyyyyyyyyyyyyuserId",this.userId)
// await this.getLeaseTaskDetailFun(id, this.auditingParams.taskId)
// // setExpiresIn(res.data.expires_in)
// // this.$store.commit('SET_EXPIRES_IN', res.data.expires_in)
// } catch (error) {
// console.log('🚀 ~ created ~ error:', error)
// this.$message({
// message: ', ',
// type: 'error'
// })
// // setTimeout(() => {
// // //
// // window.close()
// // }, 1500)
// }
// }else{
//
if (this.$route.query) {
const { id, taskId, type } = this.$route.query
console.log('路由参数:', id, taskId, type)
this.auditingParams.taskId = taskId
// typepagesType
if (type !== undefined) {
this.pagesType = type
}else{
this.getNodeAuditStatus()
}
// this.currentNodeId = nodeId
await this.getLeaseTaskDetailFun(id, taskId)
}
this.userId = sessionStorage.getItem('userId')
//
if (this.$route.query) {
const { id, taskId, type } = this.$route.query
console.log('路由参数:', id, taskId, type)
this.auditingParams.taskId = taskId
// typepagesType
if (type !== undefined) {
this.pagesType = type
}else{
this.getNodeAuditStatus()
}
// this.currentNodeId = nodeId
await this.getLeaseTaskDetailFun(id, taskId)
}
this.userId = sessionStorage.getItem('userId')
},
methods: {
// async getConfigApi(){
// getConfig().then(response => {
// // console.log(response)
// localStorage.setItem('systemConfig', JSON.stringify(response.data || {}))
// sessionStorage.setItem('systemConfig', JSON.stringify(response.data || {}))
// })
// .catch(error => {
// console.error('Failed to fetch config:', error);
// });
// },
async getNodeAuditStatus(){
const res = await getNodeAuditStatusAPI({taskId:this.auditingParams.taskId})
if(res.data){
this.pagesType = res.data.auditStatus
if (res.data.auditStatus == 0) {
this.pagesType = 1;
} else if (res.data.auditStatus == 1) {
this.pagesType = 2;
}else{
this.pagesType = 1;
}
}else{
this.pagesType = 0
this.pagesType = 1
}
},

View File

@ -118,7 +118,7 @@ export default {
pageNum: 1,
pageSize: 10,
keyWord: '', //
taskStatus: '' //
taskStatus: '1' //
},
//
statusOptions: [
@ -143,6 +143,12 @@ export default {
}
},
async created() {
const end = new Date()
let start = new Date()
start.setMonth(start.getMonth() - 1)
this.timeRange = [this.format(start), this.format(end)]
const origin = window.location.href
console.log(origin.split('ticket')[1], 'origin')
const token = getToken()
@ -199,13 +205,22 @@ export default {
}
},
methods: {
format(date) {
const y = date.getFullYear()
const m = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0')
return `${y}-${m}-${day}`
},
//
handleQuery() {
this.getList()
},
//
handleReset() {
this.timeRange = []
const end = new Date()
let start = new Date()
start.setMonth(start.getMonth() - 1)
this.timeRange = [this.format(start), this.format(end)]
this.queryParams.pageNum = 1
this.queryParams.pageSize = 10
this.$refs.queryForm.resetFields()