From 46da7e87d693cd8d8ad5c89caf4c5a9d3485f3fe Mon Sep 17 00:00:00 2001 From: ruanqi Date: Mon, 3 Jun 2024 19:43:58 +0800 Subject: [PATCH] plm BM --- .../com_bm_bom.vue | 91 +++++++++++++- .../com_bm_customerInformation.vue | 102 ++++++++++++++- .../com_bm_demoSlot.vue | 109 ++++++++++++++-- .../com_bm_packageInfo.vue | 1 + .../com_bm_routing.vue | 117 +++++++++++++++++- .../com_tsd_basicInformation.vue | 3 - .../technicalSpecificationDetail.vue | 3 +- 7 files changed, 406 insertions(+), 20 deletions(-) diff --git a/src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_bom.vue b/src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_bom.vue index cc70bf0..894305c 100644 --- a/src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_bom.vue +++ b/src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_bom.vue @@ -15,8 +15,10 @@ 刷新 - 变更 + 变更 跳转至BOM + 同意 + 驳回 @@ -127,7 +129,12 @@ searchBMBom, searchBMBomDetail, updateBMBomRev, + tsdBasicInformationSearch, + submitChange, // 提交 } from "@/api/sampleManagement/technicalSpecificationList.js" + import { + getNodeAuthority, // 获取节点权限 + } from '@/api/changeManagement/changeManagement.js' import Chooselist from '@/views/modules/common/Chooselist' export default { components: { @@ -144,6 +151,7 @@ username: this.$store.state.user.name, codeNo: '', buNo:'', + fieldId:'', }, bomData:{ site: '', @@ -355,7 +363,10 @@ columnWidth: 150 }, ], - + baseForm:{ + status:'', + isReject:'', + }, ifDisableFlag:false, @@ -424,6 +435,10 @@ this.$message.error(data.msg) } }); + tsdBasicInformationSearch(this.searchData).then(({data}) => { + this.baseForm=data.row; + this.getNodeAuthority(data.row) + }) }, searchDetailTable(){ searchBMBomDetail(this.bomData).then(({data}) => { @@ -479,6 +494,78 @@ localStorage.setItem('bomData', JSON.stringify(inData)) window.open('#/part-bomManagement'); }, + // 获取流程的配置权限 + getNodeAuthority (row) { + //区分请求成功和失败的状况 + let tempData = { + site: row.site, + stepId: row.stepId, + menuId: '103002' + } + getNodeAuthority(tempData).then(({data}) => { + if (data && data.code === 0) { + let plmStepRoleBaseBm = data.rows.plm_stepRole_base_bm + let arr = plmStepRoleBaseBm.filter(a => a.fieldId === this.searchData.fieldId) + if (arr.length > 0) { + if (arr[0].updateFlag === 'N') { + this.ifDisableFlag = true + } else { + this.ifDisableFlag = false + } + } else { + this.ifDisableFlag = true + } + } + }) + }, + + // 同意提交 + agreeSubmit () { + this.$confirm(`是否确认提交?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + let tempData = { + site: this.searchData.site, + userName: this.$store.state.user.name, + codeNo: this.searchData.codeNo, + menuId: '103002', + nodeConclusion: 'Y' + } + this.submitData(tempData) + }) + }, + + // 驳回提交 + rejectSubmit () { + this.$confirm(`是否确认驳回?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + let tempData = { + site: this.searchData.site, + userName: this.$store.state.user.name, + codeNo: this.searchData.codeNo, + menuId: '103002', + nodeConclusion: 'N' + } + this.submitData(tempData) + }) + }, + submitData (tempData) { + submitChange(tempData).then(({data}) => { + if (data && data.code === 0) { + this.$message({message: '操作成功', type: 'success'}) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + + }, }, } diff --git a/src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_customerInformation.vue b/src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_customerInformation.vue index 614476d..66aaae5 100644 --- a/src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_customerInformation.vue +++ b/src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_customerInformation.vue @@ -3,8 +3,8 @@ 刷新数据 保存 - 同意 - 驳回 + 同意 + 驳回 @@ -157,9 +157,9 @@ - + - + @@ -169,7 +169,12 @@ import { searchBMcustomerInfo, updateBMcustomerInfo, + tsdBasicInformationSearch, + submitChange, // 提交 } from "@/api/sampleManagement/technicalSpecificationList.js" + import { + getNodeAuthority, // 获取节点权限 + } from '@/api/changeManagement/changeManagement.js' import Chooselist from '@/views/modules/common/Chooselist' export default { components: { @@ -182,6 +187,7 @@ username: this.$store.state.user.name, codeNo: '', buNo:'', + fieldId:'', }, ifDisableFlag:false, baseForm:{ @@ -271,6 +277,10 @@ }) return false } + tsdBasicInformationSearch(this.searchData).then(({data}) => { + this.baseForm=data.row; + this.getNodeAuthority(data.row) + }) searchBMcustomerInfo(this.searchData).then(({data}) => { if(data.rows.length>0){ this.dataForm = data.rows[0]; @@ -286,6 +296,10 @@ }); }, searchTable(){ + tsdBasicInformationSearch(this.searchData).then(({data}) => { + this.baseForm=data.row; + this.getNodeAuthority(data.row) + }) searchBMcustomerInfo(this.searchData).then(({data}) => { if(data.rows.length>0){ this.dataForm = data.rows[0]; @@ -311,6 +325,86 @@ return }) }, + + // 获取流程的配置权限 + getNodeAuthority (row) { + //区分请求成功和失败的状况 + let tempData = { + site: row.site, + stepId: row.stepId, + menuId: '103002' + } + getNodeAuthority(tempData).then(({data}) => { + if (data && data.code === 0) { + let plmStepRoleBaseBm = data.rows.plm_stepRole_base_bm + let arr = plmStepRoleBaseBm.filter(a => a.fieldId === this.searchData.fieldId) + if (arr.length > 0) { + if (arr[0].updateFlag === 'N') { + this.ifDisableFlag = true + } else { + this.ifDisableFlag = false + } + } else { + this.ifDisableFlag = true + } + } + }) + }, + + // 同意提交 + agreeSubmit () { + this.$confirm(`是否确认提交?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + let tempData = { + site: this.searchData.site, + userName: this.$store.state.user.name, + codeNo: this.searchData.codeNo, + menuId: '103002', + nodeConclusion: 'Y' + } + this.submitData(tempData) + }) + }, + + // 驳回提交 + rejectSubmit () { + this.$confirm(`是否确认驳回?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + let tempData = { + site: this.searchData.site, + userName: this.$store.state.user.name, + codeNo: this.searchData.codeNo, + menuId: '103002', + nodeConclusion: 'N' + } + this.submitData(tempData) + }) + }, + submitData (tempData) { + + updateBMcustomerInfo(this.dataForm).then(({data}) => { + if (data && data.code === 0) { + submitChange(tempData).then(({data}) => { + if (data && data.code === 0) { + this.$message({message: '操作成功', type: 'success'}) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + } else { + this.$message.error(data.msg) + } + }) + + }, }, } diff --git a/src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_demoSlot.vue b/src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_demoSlot.vue index 7358986..6b1c4e8 100644 --- a/src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_demoSlot.vue +++ b/src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_demoSlot.vue @@ -11,6 +11,8 @@ 更新模板 刷新数据 保存数据 + 同意 + 驳回