From 4ce0ef0af57ef69a8bbedd95ba754de1d69b9703 Mon Sep 17 00:00:00 2001 From: Aoi_Tori <2547614904@qq.com> Date: Fri, 11 Jul 2025 15:34:21 +0800 Subject: [PATCH] 2025/7/11 --- src/api/base/site.js | 3 + src/views/modules/base/roleInfo.vue | 175 +++++++++++++++++- .../com_bm_routing.vue | 4 +- src/views/modules/test/requestForTest.vue | 51 +++-- 4 files changed, 208 insertions(+), 25 deletions(-) diff --git a/src/api/base/site.js b/src/api/base/site.js index 5113f35..8fe0161 100644 --- a/src/api/base/site.js +++ b/src/api/base/site.js @@ -86,3 +86,6 @@ export const searchUserListForRole= data => createAPI(`/base/searchUserListForRo export const getRoleList= data => createAPI(`/base/getRoleList`,'post',data) +export const roleInformationSave= data => createAPI(`/base/saveRole`,'post',data) +export const roleInformationEdit= data => createAPI(`/base/editRole`,'post',data) +export const roleInformationDelete= data => createAPI(`/base/deleteRole`,'post',data) diff --git a/src/views/modules/base/roleInfo.vue b/src/views/modules/base/roleInfo.vue index b040c31..17cf331 100644 --- a/src/views/modules/base/roleInfo.vue +++ b/src/views/modules/base/roleInfo.vue @@ -3,7 +3,7 @@ 查询 - + 新增 @@ -113,6 +113,32 @@ + + + + + + + + + + + + + + + + + + + + + + + 保存 + 关闭 + + @@ -126,6 +152,7 @@ saveAccessBuListForBu, } from "@/api/base/site.js" import Chooselist from '@/views/modules/common/Chooselist' + import {roleInformationDelete, roleInformationEdit, roleInformationSave} from "../../../api/base/site"; export default { components: { Chooselist @@ -142,7 +169,48 @@ site:this.$store.state.user.site, username: this.$store.state.user.name, }, + modalData: { + flag: '', + title: '', + site: '', + roleNo: '', + roleDesc: '', + active: '', + type: '' + }, + rules:{ + roleNo:[ + { + required: true, + message: ' ', + trigger: 'change' + } + ], + roleDesc:[ + { + required: true, + message: ' ', + trigger: 'change' + } + ], + active:[ + { + required: true, + message: ' ', + trigger: 'change' + } + ], + type:[ + { + required: true, + message: ' ', + trigger: 'change' + } + ] + }, visible:false, + modalFlag:false, + modalDisableFlag: false, dataListLoading: false, currentRow:'', columnList1:[ @@ -463,6 +531,107 @@ return s }, + addModal(){ + this.modalData = { + flag: '1', + title: '岗位新增', + site: this.$store.state.user.site, + roleNo: '', + roleDesc: '', + active: 'Y', + type: '' + } + this.modalDisableFlag = false + this.modalFlag = true + }, + updateModel (row) { + this.modalData = { + flag: '2', + title: '岗位编辑', + site: row.site, + id: row.id, + roleNo: row.roleNo, + roleDesc: row.roleDesc, + active: row.active, + type: '' + } + this.modalDisableFlag = true + this.modalFlag = true + }, + deleteData (row) { + this.$confirm(`是否删除这条岗位信息?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + roleInformationDelete(row).then(({data}) => { + if (data && data.code === 0) { + this.searchTable() + this.partSelections = [] + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }).catch(() => { + }) + }, + saveData () { + if (this.modalData.roleNo === '' || this.modalData.roleNo == null) { + this.$message.warning('请填写岗位编码!') + return + } + if (this.modalData.roleDesc === '' || this.modalData.roleDesc == null) { + this.$message.warning('请填写岗位名称!') + return + } + if (this.modalData.active === '' || this.modalData.active == null) { + this.$message.warning('请选择是否可用!') + return + } + if (this.modalData.flag === '1') { + roleInformationSave(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.searchTable() + this.modalFlag = false + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + } else { + roleInformationEdit(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.searchTable() + this.modalFlag = false + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + } + }, }, } diff --git a/src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_routing.vue b/src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_routing.vue index a7b6261..159201f 100644 --- a/src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_routing.vue +++ b/src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_routing.vue @@ -14,7 +14,7 @@ :disabled="plmTechnicalSpecificationSheetFlag('process') === 'N'"> - + 刷新 变更 diff --git a/src/views/modules/test/requestForTest.vue b/src/views/modules/test/requestForTest.vue index e13305b..f9ea0eb 100644 --- a/src/views/modules/test/requestForTest.vue +++ b/src/views/modules/test/requestForTest.vue @@ -23,24 +23,24 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -74,6 +74,9 @@ + + + @@ -1185,7 +1188,8 @@ export default { testNo: '', buNo: '', nodeId: '', - approvalUsername: '' + approvalUsername: '', + soNumber: '' }, fileContentLoaded: false, // 其它 @@ -3552,6 +3556,12 @@ export default { searchProjectInfoList(this.searchProjectData).then(({data}) => { if (data && data.code === 0) { this.projectList = data.rows + if (!this.modalData.customerNo||this.modalData.customerNo===''){ + this.modalData.projectId = data.rows[0].projectId + this.modalData.projectName = data.rows[0].projectName + this.modalData.customerNo = data.rows[0].customerId + this.modalData.customerDesc = data.rows[0].customerName + } } else { this.projectList = [] } @@ -3676,8 +3686,9 @@ export default { this.dialogProperties = data.rows if (this.modalData.projectIdFlag&&!this.modalData.customerNoFlag){ // 料号、客户、项目都没选时选料号 - this.modalData.customerNoFlag = true + this.modalData.customerNoFlag = false this.modalData.projectIdFlag = false + this.searchProjectInfoList() } else if (!this.modalData.projectIdFlag&&this.modalData.customerNoFlag){ // 选了料号没选项目和客户时选料号 } else if (!this.modalData.projectIdFlag&&!this.modalData.customerNoFlag){