diff --git a/src/views/business-examine/receive-apply/business-details.vue b/src/views/business-examine/receive-apply/business-details.vue index 9329e2aa..d5aa2581 100644 --- a/src/views/business-examine/receive-apply/business-details.vue +++ b/src/views/business-examine/receive-apply/business-details.vue @@ -26,11 +26,13 @@ - - - - - + @@ -41,15 +43,15 @@ - - - + + + @@ -151,7 +153,7 @@ export default { leaseId: '', // 外键id taskCode: '', // 任务编码 unitName: '', // 单位名称 - projectName: '', // 项目名称 + projectName: '' // 项目名称 } } }, @@ -172,7 +174,9 @@ export default { async onHandleAuditing(type) { // 组装参数 // 1. 先找出当前用户有权限的所有节点 - const userAuthorizedNodes = this.auditingList.filter(e => e.configValues && e.configValues.includes(this.userId)); + const userAuthorizedNodes = this.auditingList.filter( + e => e.configValues && e.configValues.includes(this.userId) + ) if (userAuthorizedNodes.length === 0) { this.$modal.msgError('未查询到您的审核权限!') @@ -181,16 +185,16 @@ export default { // 2. 根据当前节点状态找出应该审核的节点 // 优先找待审核的节点(isAccept === 0) - let currentNode = userAuthorizedNodes.find(node => node.isAccept === 0); + let currentNode = userAuthorizedNodes.find(node => node.isAccept === 0) // 如果没有待审核的节点,则使用第一个有权限的节点 if (!currentNode) { - currentNode = userAuthorizedNodes[0]; + currentNode = userAuthorizedNodes[0] } - console.log('当前审核节点:', currentNode); + console.log('当前审核节点:', currentNode) - const { recordId, id, typeId, isAccept } = currentNode; + const { recordId, id, typeId, isAccept } = currentNode // if (isAccept != 0) { // this.$modal.msgError('当前已审核,不可重复审核') @@ -201,9 +205,9 @@ export default { typeId, recordId, nodeId: id - }); + }) - this.auditingParams.isAccept = type; + this.auditingParams.isAccept = type this.auditingParams.leaseId = this.detailsInfo.id @@ -214,23 +218,23 @@ export default { this.auditingParams.projectName = this.detailsInfo.leaseProject // 找出当前节点在审核列表中的索引 - const currentIndex = this.auditingList.findIndex(e => e.id === id); + const currentIndex = this.auditingList.findIndex(e => e.id === id) if (currentIndex !== -1 && currentIndex !== this.auditingList.length - 1) { - this.auditingParams.nextNodeId = this.auditingList[currentIndex + 1].id; + this.auditingParams.nextNodeId = this.auditingList[currentIndex + 1].id } - console.log('提交的审核参数:', this.auditingParams); + console.log('提交的审核参数:', this.auditingParams) - const res = await submitAuditingApi(this.auditingParams); - console.log(res, '提交结果'); + const res = await submitAuditingApi(this.auditingParams) + console.log(res, '提交结果') if (res.code === 200) { - this.$modal.msgSuccess('审核成功'); + this.$modal.msgSuccess('审核成功') setTimeout(() => { - const obj = { path: '/business-examine/receive-apply' }; - this.$tab.closeOpenPage(obj); - }, 500); + const obj = { path: '/business-examine/receive-apply' } + this.$tab.closeOpenPage(obj) + }, 500) } }, @@ -246,11 +250,14 @@ export default { console.log('审核列表数据:', this.auditingList) console.log('当前用户ID:', this.userId) - console.log('审核权限检查:', this.auditingList.map(item => ({ - nodeName: item.nodeName, - configValues: item.configValues, - hasPermission: item.configValues && item.configValues.includes(this.userId) - }))) + console.log( + '审核权限检查:', + this.auditingList.map(item => ({ + nodeName: item.nodeName, + configValues: item.configValues, + hasPermission: item.configValues && item.configValues.includes(this.userId) + })) + ) } } } diff --git a/src/views/business/businessHandling/index.vue b/src/views/business/businessHandling/index.vue index a4eda9a5..3a7dfd40 100644 --- a/src/views/business/businessHandling/index.vue +++ b/src/views/business/businessHandling/index.vue @@ -486,7 +486,7 @@ export default { } ], phone: [ - { required: true, message: '联系电话不能为空', trigger: 'blur' }, + // { required: true, message: '联系电话不能为空', trigger: 'blur' }, { pattern: /^(?:(?:\+|00)86)?1[3-9]\d{9}$/, message: '请输入正确的手机号码', @@ -500,13 +500,6 @@ export default { trigger: 'blur' } ], - supplierPlace: [ - { - required: true, - message: '请输入供货地点', - trigger: 'blur' - } - ], bmFileInfos: [ { required: false, // 是否分包商(是:合同编号必填) @@ -593,22 +586,48 @@ export default { } // 重置表单验证状态,避免旧的错误提示残留 this.$refs.maForm.clearValidate('deviceType') + }, + + // 监听一下路由的type + $route: { + handler(newVal) { + if (newVal.query.type == 'edit') { + this.isEdit = true + this.isDetail = false + this.id = newVal.query.id + const obj = Object.assign({}, newVal, { title: '领用申请编辑' }) + this.$tab.updatePage(obj) + } else if (newVal.query.type == 'detail') { + this.isEdit = false + this.isDetail = true + this.id = newVal.query.id + const obj = Object.assign({}, this.$route, { title: '领用申请详情' }) + this.$tab.updatePage(obj) + } + + if (this.isEdit || this.isDetail) { + console.log('isEdit', this.isEdit) + this.getTaskInfo() + } + }, + deep: true, + immediate: true } }, created() { // getCode() if (this.$route.query.type == 'edit') { - this.isEdit = true - this.isDetail = false - this.id = this.$route.query.id - const obj = Object.assign({}, this.$route, { title: '领用申请编辑' }) - this.$tab.updatePage(obj) + // this.isEdit = true + // this.isDetail = false + // this.id = this.$route.query.id + // const obj = Object.assign({}, this.$route, { title: '领用申请编辑' }) + // this.$tab.updatePage(obj) } else if (this.$route.query.type == 'detail') { - this.isEdit = false - this.isDetail = true - this.id = this.$route.query.id - const obj = Object.assign({}, this.$route, { title: '领用申请详情' }) - this.$tab.updatePage(obj) + // this.isEdit = false + // this.isDetail = true + // this.id = this.$route.query.id + // const obj = Object.assign({}, this.$route, { title: '领用申请详情' }) + // this.$tab.updatePage(obj) } else { this.isEdit = false this.isDetail = false @@ -620,10 +639,10 @@ export default { this.equipmentType() //机具类型下拉选 this.getStandardConfigList() // 标准配置下拉选 this.getMaTypeNameOpt() // 类型名称下拉选 - if (this.isEdit || this.isDetail) { - console.log('isEdit', this.isEdit) - this.getTaskInfo() - } + // if (this.isEdit || this.isDetail) { + // console.log('isEdit', this.isEdit) + // this.getTaskInfo() + // } console.log('🚀 ~ created ~ this.isDetail:', this.isDetail) console.log(this.$store, 'this.$store.getters') console.log(this.$route.query, 'this.$route.query') diff --git a/src/views/material/ma/mechEquipConfigMgmt/index.vue b/src/views/material/ma/mechEquipConfigMgmt/index.vue index f9d9f0b6..30510049 100644 --- a/src/views/material/ma/mechEquipConfigMgmt/index.vue +++ b/src/views/material/ma/mechEquipConfigMgmt/index.vue @@ -201,13 +201,34 @@ :props="{ value: 'typeId', label: 'typeName' }" @change="changeType" style="width: 100%" + clearable + filterable > - + + + + +