From 643ad5c968b9d7194f0ef1cd07c3ab4b6f094f47 Mon Sep 17 00:00:00 2001 From: qiezi <15576055375@163.com> Date: Tue, 23 Jul 2024 09:14:30 +0800 Subject: [PATCH] 2024-06-21 --- src/views/modules/base/factoryInformation.vue | 238 ++++++++++-------- .../com_projectInfo-add-or-update.vue | 133 +++++++--- .../projectInfo/com_project_change_record.vue | 99 ++++++++ .../com_project_info_quotation.vue | 6 +- .../projectInfo/com_project_upload_file.vue | 86 +++---- .../project/projectInfo/projectInfo.vue | 77 +++--- .../technicalSpecificationList.vue | 2 +- src/views/modules/sys/user.vue | 25 +- 8 files changed, 428 insertions(+), 238 deletions(-) create mode 100644 src/views/modules/project/projectInfo/com_project_change_record.vue diff --git a/src/views/modules/base/factoryInformation.vue b/src/views/modules/base/factoryInformation.vue index 7e197a5..dbf4f56 100644 --- a/src/views/modules/base/factoryInformation.vue +++ b/src/views/modules/base/factoryInformation.vue @@ -62,80 +62,99 @@ - - - - - - - - - - - - - - - - - {{ labels.company }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + {{ labels.company }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - {{ buttons.save }} + {{ buttons.save }} {{ buttons.close }} @@ -714,6 +733,17 @@ export default { columnWidth: 120 } ], + siteRules:{ + siteID: [ + { required: true, message: '请输入工厂编码', trigger: 'blur' }, + ], + siteName: [ + { required: true, message: '请输入工厂名称', trigger: 'blur' }, + ], + companyID: [ + { required: true, message: '请选择会计单位', trigger: 'blur' }, + ], + } } }, @@ -792,34 +822,38 @@ export default { this.siteFlag = true; }, siteSave() { - siteSave(this.siteData).then(({data}) => { - if (this.siteData.companyID == '' || this.siteData.companyID == null) { - this.$alert("请选择会计单位!", '错误', { - confirmButtonText: '确定' - }) - return false; - } - if (this.siteData.siteID == '' || this.siteData.siteID == null) { - this.$alert("请输入工厂编码!", '错误', { - confirmButtonText: '确定' - }) - return false; - } - if (this.siteData.siteName == '' || this.siteData.siteName == null) { - this.$alert("请输入工厂名称!", '错误', { - confirmButtonText: '确定' - }) - return false; - } - - if (data && data.code == 200) { - this.siteFlag = false - this.getData(); - this.$message.success('操作成功') - } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' + this.$refs.siteForm.validate((valid) => { + if (valid){ + siteSave(this.siteData).then(({data}) => { + if (data && data.code == 200) { + this.siteFlag = false + this.getData(); + this.$message.success('操作成功') + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } }) + }else { + if (this.siteData.companyID === '' || this.siteData.companyID == null) { + this.$alert("请选择会计单位!", '错误', { + confirmButtonText: '确定' + }) + return false; + } + if (this.siteData.siteID === '' || this.siteData.siteID == null) { + this.$alert("请输入工厂编码!", '错误', { + confirmButtonText: '确定' + }) + return false; + } + if (this.siteData.siteName === '' || this.siteData.siteName == null) { + this.$alert("请输入工厂名称!", '错误', { + confirmButtonText: '确定' + }) + return false; + } } }) }, @@ -989,11 +1023,15 @@ export default { } - diff --git a/src/views/modules/project/projectInfo/com_projectInfo-add-or-update.vue b/src/views/modules/project/projectInfo/com_projectInfo-add-or-update.vue index 40007c6..8d140e5 100644 --- a/src/views/modules/project/projectInfo/com_projectInfo-add-or-update.vue +++ b/src/views/modules/project/projectInfo/com_projectInfo-add-or-update.vue @@ -86,7 +86,7 @@ - 项目权限 + 项目权限 @@ -134,6 +134,17 @@ title="权限" :close-on-click-modal="false" :visible.sync="userRoleFlag"> + + + + + + + + + 查询 + + + item.checkAll === true)){ + this.saveCheckAll = 'Y' + return false + }else if (this.userRoleList.every(item => item.checkAll === false)){ + this.saveCheckAll = 'N' + return false + }else { + this.saveCheckAll = 'N' + return true + } + }, + userRoleIndeterminateList(){ + return this.userRoleList.map(item=>{ + if (item.checkAll === true){ + return false + }else { + return !(item.searchCheck === false && item.updateCheck === false && item.downCheck === false && item.deleteCheck === false); + } + }) + }, }, methods: { // 获取基础数据列表S @@ -457,13 +508,7 @@ searchProjectTeamStr(inData2).then(({data}) => { this.dataForm.projectOwnerList=data.rows }) - let inData3={ - site:this.dataForm.site, - projectId:this.dataForm.projectId, - } - searchUserRoll(inData3).then(({data}) => { - this.dataForm.userRoleList=data.rows - }) + this.searchUserRoll(); } }) }else { @@ -495,13 +540,7 @@ finalCustomerId:'', finalCustomerName:'', } - let inData={ - site:this.dataForm.site, - projectId:this.dataForm.projectId, - } - searchUserRoll(inData).then(({data}) => { - this.dataForm.userRoleList=data.rows - }) + this.searchUserRoll(); } if (requestCustomer){ @@ -509,7 +548,22 @@ } this.visible = true }, - + searchUserRoll(val){ + let arr = [] + if (val === 'none'){// 判断是否走搜索的方法 + arr =JSON.parse(JSON.stringify(this.userRoleList)); + } + let inData3={ + site:this.dataForm.site, + projectId:this.dataForm.projectId, + username:this.userRoleForm.username, + userDisplay:this.userRoleForm.userDisplay, + } + searchUserRoll(inData3).then(({data}) => { + this.dataForm.userRoleList=data.rows; + this.userRollModal(undefined,arr); + }) + }, managerChooseModal(){ let inData={ site:this.dataForm.site, @@ -556,21 +610,27 @@ this.dataForm.projectOwnerList=JSON.parse(JSON.stringify(this.projectOwnerList)); this.ownerFlag=false }, - userRollModal(){ + userRollModal(val,arr){ this.userRoleList=JSON.parse(JSON.stringify(this.dataForm.userRoleList)); for (let i = 0; i 0){ + for (let i = 0; i < this.userRoleList.length; i++) { + let row = arr[i] + if (arr[i].username !== this.$store.state.user.name){ + row = arr.find(item => item.username === arr[i].username) + } + this.$set(this.userRoleList, i, row) } } - this.userRoleFlag=true + if (val === 'none'){ + this.userRoleFlag=true + } }, saveUserList(){ for (let i = 0; i diff --git a/src/views/modules/project/projectInfo/com_project_change_record.vue b/src/views/modules/project/projectInfo/com_project_change_record.vue new file mode 100644 index 0000000..e6ba95e --- /dev/null +++ b/src/views/modules/project/projectInfo/com_project_change_record.vue @@ -0,0 +1,99 @@ + + + + + diff --git a/src/views/modules/project/projectInfo/com_project_info_quotation.vue b/src/views/modules/project/projectInfo/com_project_info_quotation.vue index c1cc69a..55b0dd2 100644 --- a/src/views/modules/project/projectInfo/com_project_info_quotation.vue +++ b/src/views/modules/project/projectInfo/com_project_info_quotation.vue @@ -189,7 +189,7 @@ export default { }, ], exportData: [], - exportName: '项目询价'+this.dayjs().format('YYYYMMDDHHmmss'), + exportName: '项目报价'+this.dayjs().format('YYYYMMDDHHmmss'), exportHeader: ["项目询价"], exportFooter: [], } @@ -212,9 +212,7 @@ export default { } }) json += "}" - let s = eval("(" + json + ")") - - return s + return eval("(" + json + ")") }, createExportData() { return this.dataList; diff --git a/src/views/modules/project/projectInfo/com_project_upload_file.vue b/src/views/modules/project/projectInfo/com_project_upload_file.vue index 694f75b..3b87cb2 100644 --- a/src/views/modules/project/projectInfo/com_project_upload_file.vue +++ b/src/views/modules/project/projectInfo/com_project_upload_file.vue @@ -1,60 +1,44 @@