From 8ef0bf734294810eef8c19e0139b609d058cbed1 Mon Sep 17 00:00:00 2001 From: ruanqi Date: Tue, 26 Sep 2023 18:13:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E8=97=8F=E5=A4=B9+demo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/common/Chooselist.vue | 3 +- .../com_technical-add-or-update.vue | 494 ++++++------------ .../technicalSpecificationList.vue | 27 +- 3 files changed, 161 insertions(+), 363 deletions(-) diff --git a/src/views/modules/common/Chooselist.vue b/src/views/modules/common/Chooselist.vue index a497da2..0552881 100644 --- a/src/views/modules/common/Chooselist.vue +++ b/src/views/modules/common/Chooselist.vue @@ -18,7 +18,7 @@ - + @@ -116,7 +116,6 @@ export default { let length = end - start let columns = data.data.sqlcode.trim().substring(start + 6, length).trim() let props = columns.split(",") - props.forEach((item, index) => { let name = '信息列' switch (index) { diff --git a/src/views/modules/sampleManagement/technicalSpecificationList/com_technical-add-or-update.vue b/src/views/modules/sampleManagement/technicalSpecificationList/com_technical-add-or-update.vue index 201e2ac..ffbb851 100644 --- a/src/views/modules/sampleManagement/technicalSpecificationList/com_technical-add-or-update.vue +++ b/src/views/modules/sampleManagement/technicalSpecificationList/com_technical-add-or-update.vue @@ -5,212 +5,116 @@ :title="!dataForm.id ? '添加' :'编辑'" :close-on-click-modal="false" :visible.sync="visible"> - - - - - - - + + + 打样申请号 + - - 项目类型 - + + - - 所属客户 - + + - - - + + + - - - - - - - - - 项目来源 - + + - - 优先级 - - - - - + + 报价员 + - - - 项目经理 - + + + 工程师 + - - 项目负责人 - + + 技术员 + - - + + + - - - - - - - - 项目权限 - - - - +
+ {{'确定'}} {{'关闭'}} +
- +
- 确定 - 取消 + 确定 + 取消
- - +
- 确定 - 取消 + 确定 + 取消
- - - - - - - - - - - - - - - - - - - - - - - + :visible.sync="ownerFlag"> +
- 确定 - 取消 + 确定 + 取消
+ + @@ -219,7 +123,6 @@ import {projectInfoSearch, searchOperatorWithSite, searchProjectTeamStr, - searchUserRoll, saveProjectInfo, } from "@/api/project/project.js" import Chooselist from '@/views/modules/common/Chooselist' @@ -233,109 +136,70 @@ tagNo1:'', visible: false, treeVisible: false, - managerFlag:false, + quotationOfficerFlag:false, + engineerFlag:false, userRoleFlag:false, ownerFlag:false, operatorList:[], dataForm: { id: 0, site:this.$store.state.user.site, - projectLevel:1, + proofingNo:'', projectId:'', - projectTypeDb:'', - projectType:'', - customerName:'', - customerId:'', - projectName:'', - projectDesc:'', - needDate:'', - priority:'', - projectSource:'', - priorityDesc:'', - projectSourceDesc:'', - projectManagerName:'', - projectOwnerName:'', - customerRemark:'', + codeNo:'', + testPartNo:'', + partName:'', + status:'', + revNo:'', remark:'', - userRoleName:'', - projectManagerList:[], - projectOwnerList:[], - userRoleList:[], + technician:'', + quotationOfficer:'', + engineer:'', + quotationOfficerList:[], + engineerList:[], + technicianList:[], }, - projectManagerList:[], - projectOwnerList:[], - userRoleList:[], - projectRole: { - projectLevel: [ - { - required: true, - message: ' ', - trigger: 'change' - } - ], - projectType: [ - { - required: true, - message: ' ', - trigger: 'change' - } - ], - customerName: [ - { - required: true, - message: ' ', - trigger: 'change' - } - ], - projectName: [ - { - required: true, - message: ' ', - trigger: 'change' - } - ], - projectSourceDesc: [ + quotationOfficerList:[], + engineerList:[], + technicianList:[], + technicianList:[], + dataRole: { + proofingNo: [ { required: true, message: ' ', trigger: 'change' } ], - priorityDesc: [ + revNo: [ { required: true, message: ' ', trigger: 'change' } ], - needDate: [ + quotationOfficer: [ { required: true, message: ' ', trigger: 'change' } ], - projectManagerName: [ + engineer: [ { required: true, message: ' ', trigger: 'change' } ], - projectOwnerName: [ - { - required: true, - message: ' ', - trigger: 'change' - } - ], - userRoleName: [ + technician: [ { required: true, message: ' ', trigger: 'change' } ], + } } }, @@ -349,9 +213,9 @@ this.tagNo1 = type this.$nextTick(() => { let strVal = '' - if (val === 1010) { + if (val === 501) { if(type==1) { - strVal = this.dataForm.projectTypeDb + strVal = '' } } if (val === 102) { @@ -374,10 +238,12 @@ }, /* 列表方法的回调 */ getBaseData (val) { - if (this.tagNo === 1010) { + if (this.tagNo === 501) { if(this.tagNo1==1) { - this.dataForm.projectTypeDb = val.Base_id - this.dataForm.projectType = val.Base_desc + this.dataForm.proofingNo = val.Proofing_no + this.dataForm.projectId = val.Project_id + this.dataForm.testPartNo = val.Test_part_no + this.dataForm.partName = val.Part_name } } if (this.tagNo === 102) { @@ -416,7 +282,7 @@ type:'manager', } searchProjectTeamStr(inData).then(({data}) => { - this.dataForm.projectManagerList=data.rows + this.dataForm.quotationOfficerList=data.rows }) let inData2={ site:this.dataForm.site, @@ -424,115 +290,105 @@ type:'owner', } 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.dataForm.technicianList=data.rows }) + } }) }else { this.dataForm={ id: 0, site:this.$store.state.user.site, - projectLevel:1, + proofingNo:'', projectId:'', - projectTypeDb:'', - projectType:'', - customerName:'', - customerId:'', - projectName:'', - projectDesc:'', - needDate:'', - priority:'', - projectSource:'', - priorityDesc:'', - projectSourceDesc:'', - projectManagerName:'', - projectOwnerName:'', - customerRemark:'', + codeNo:'', + testPartNo:'', + partName:'', + status:'', + revNo:'', remark:'', - userRoleName:'', - projectManagerList:[], - projectOwnerList:[], + technician:'', + quotationOfficer:'', + engineer:'', + quotationOfficerList:[], + engineerList:[], + technicianList:[], } - let inData={ - site:this.dataForm.site, - projectId:this.dataForm.projectId, - } - searchUserRoll(inData).then(({data}) => { - this.dataForm.userRoleList=data.rows - }) + } this.visible = true }, - managerChooseModal(){ + quotationOfficerChooseModal(){ let inData={ site:this.dataForm.site, - projectId:this.dataForm.projectId, } searchOperatorWithSite(inData).then(({data}) => { this.operatorList=data.rows }) - this.projectManagerList = JSON.parse(JSON.stringify(this.dataForm.projectManagerList)); - this.managerFlag=true + this.quotationOfficerList = JSON.parse(JSON.stringify(this.dataForm.quotationOfficerList)); + this.quotationOfficerFlag=true }, - saveManagerList(){ - let projectManagerName=''; - for (let i = 0; i < this.projectManagerList.length; i++) { - let select= this.operatorList.filter(item => item.operatorId === this.projectManagerList[i]) + + saveQuotationOfficerList(){ + let quotationOfficerName=''; + for (let i = 0; i < this.quotationOfficerList.length; i++) { + let select= this.operatorList.filter(item => item.operatorId === this.quotationOfficerList[i]) if(select.length>0){ - projectManagerName+=select[0].operatorName+';' + quotationOfficerName+=select[0].operatorName+';' } } - this.dataForm.projectManagerName=projectManagerName - this.dataForm.projectManagerList=JSON.parse(JSON.stringify(this.projectManagerList)); - this.managerFlag=false + this.dataForm.quotationOfficer=quotationOfficerName + this.dataForm.quotationOfficerList=JSON.parse(JSON.stringify(this.quotationOfficerList)); + this.quotationOfficerFlag=false }, - ownerChooseModal(){ + + engineerChooseModal(){ let inData={ site:this.dataForm.site, - projectId:this.dataForm.projectId, } searchOperatorWithSite(inData).then(({data}) => { this.operatorList=data.rows }) - this.projectOwnerList = JSON.parse(JSON.stringify(this.dataForm.projectOwnerList)); - this.ownerFlag=true + this.engineerList = JSON.parse(JSON.stringify(this.dataForm.engineerList)); + this.engineerFlag=true }, - saveOwnerList(){ - let projectOwnerName=''; - for (let i = 0; i < this.projectOwnerList.length; i++) { - let select= this.operatorList.filter(item => item.operatorId === this.projectOwnerList[i]) + + saveEngineerList(){ + let engineerName=''; + for (let i = 0; i < this.engineerList.length; i++) { + let select= this.operatorList.filter(item => item.operatorId === this.engineerList[i]) if(select.length>0){ - projectOwnerName+=select[0].operatorName+';' + engineerName+=select[0].operatorName+';' } } - this.dataForm.projectOwnerName=projectOwnerName - this.dataForm.projectOwnerList=JSON.parse(JSON.stringify(this.projectOwnerList)); - this.ownerFlag=false + this.dataForm.engineer=engineerName + this.dataForm.engineerList=JSON.parse(JSON.stringify(this.engineerList)); + this.engineerFlag=false }, - userRollModal(){ - this.userRoleList=JSON.parse(JSON.stringify(this.dataForm.userRoleList)); - this.userRoleFlag=true + technicianModal(){ + let inData={ + site:this.dataForm.site, + } + searchOperatorWithSite(inData).then(({data}) => { + this.operatorList=data.rows + }) + this.technicianList = JSON.parse(JSON.stringify(this.dataForm.technicianList)); + this.ownerFlag=true }, - saveUserList(){ - console.log(this.userRoleList) - let name= ''; - for (let i = 0; i < this.userRoleList.length; i++) { - if(this.userRoleList[i].searchCheck||this.userRoleList[i].updateCheck||this.userRoleList[i].downCheck||this.userRoleList[i].deleteCheck){ - name+=this.userRoleList[i].userDisplay+';' + saveOwnerList(){ + let technicianName=''; + for (let i = 0; i < this.technicianList.length; i++) { + let select= this.operatorList.filter(item => item.operatorId === this.technicianList[i]) + if(select.length>0){ + technicianName+=select[0].operatorName+';' } } - this.dataForm.userRoleName=name - this.dataForm.userRoleList=JSON.parse(JSON.stringify(this.userRoleList)); - this.userRoleFlag=false + this.dataForm.technician=technicianName + this.dataForm.technicianList=JSON.parse(JSON.stringify(this.technicianList)); + this.ownerFlag=false }, + changeAll(row){ if(row.checkAll){ row.searchCheck=true; @@ -592,60 +448,6 @@ }, // 表单提交 dataFormSubmit () { - if(this.dataForm.projectTypeDb==''||this.dataForm.projectTypeDb==null){ - this.$alert('请选择项目类型!', '错误', { - confirmButtonText: '确定' - }) - return false; - } - if(this.dataForm.customerId==''||this.dataForm.customerId==null){ - this.$alert('请选择所属客户!', '错误', { - confirmButtonText: '确定' - }) - return false; - } - if(this.dataForm.projectName==''||this.dataForm.projectName==null){ - this.$alert('请输入项目名称!', '错误', { - confirmButtonText: '确定' - }) - return false; - } - if(this.dataForm.projectSource==''||this.dataForm.projectSource==null){ - this.$alert('请选择项目来源!', '错误', { - confirmButtonText: '确定' - }) - return false; - } - if(this.dataForm.priority==''||this.dataForm.priority==null){ - this.$alert('请选择优先级!', '错误', { - confirmButtonText: '确定' - }) - return false; - } - if(this.dataForm.needDate==''||this.dataForm.needDate==null){ - this.$alert('请选择要求日期!', '错误', { - confirmButtonText: '确定' - }) - return false; - } - if(this.dataForm.projectManagerName==''||this.dataForm.projectManagerName==null){ - this.$alert('请选择项目经理!', '错误', { - confirmButtonText: '确定' - }) - return false; - } - if(this.dataForm.projectOwnerName==''||this.dataForm.projectOwnerName==null){ - this.$alert('请选择项目负责人!', '错误', { - confirmButtonText: '确定' - }) - return false; - } - if(this.dataForm.userRoleName==''||this.dataForm.userRoleName==null){ - this.$alert('请选择权限!', '错误', { - confirmButtonText: '确定' - }) - return false; - } saveProjectInfo(this.dataForm).then(({data}) => { if (data && data.code === 0) { this.$message.success( '操作成功') diff --git a/src/views/modules/sampleManagement/technicalSpecificationList/technicalSpecificationList.vue b/src/views/modules/sampleManagement/technicalSpecificationList/technicalSpecificationList.vue index a129fa2..03c49db 100644 --- a/src/views/modules/sampleManagement/technicalSpecificationList/technicalSpecificationList.vue +++ b/src/views/modules/sampleManagement/technicalSpecificationList/technicalSpecificationList.vue @@ -63,7 +63,6 @@ - { - // if (data.code == 0) { - // this.dataList1 = data.page.list - // this.pageIndex = data.page.currPage - // this.pageSize = data.page.pageSize - // this.totalPage = data.page.totalCount - // } - // this.dataListLoading = false - // }) - this.$refs.selectDiv.setLengthAll(3) - this.$refs.selectDiv.setLengthselected(2) + this.searchData.limit = this.pageSize + this.searchData.page = this.pageIndex + technicalSpecificationListSearch(this.searchData).then(({data}) => { + if (data.code == 0) { + this.dataList1 = data.page.list + this.pageIndex = data.page.currPage + this.pageSize = data.page.pageSize + this.totalPage = data.page.totalCount + } + this.dataListLoading = false + }) }, // 获取基础数据列表S getBaseList (val, type) {