From 33abd4a76a0ac697224eefd41e7645badd628cde Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Thu, 6 Jun 2024 09:07:50 +0800 Subject: [PATCH] =?UTF-8?q?2024-06-06=20=E5=8A=9F=E8=83=BD=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/qc/qc.js | 5 + .../modules/eam/eamWorkOrderForCheck.vue | 10 + .../eam/eamWorkOrderForMaintenance.vue | 8 + src/views/modules/qc/FAIResultEntry.vue | 465 ++++++++++++++++- src/views/modules/qc/FQCResultEntry.vue | 466 ++++++++++++++++- src/views/modules/qc/IPQCResultEntry.vue | 466 ++++++++++++++++- src/views/modules/qc/IQCResultEntry.vue | 469 +++++++++++++++++- 7 files changed, 1784 insertions(+), 105 deletions(-) diff --git a/src/api/qc/qc.js b/src/api/qc/qc.js index d71f81f..e78b055 100644 --- a/src/api/qc/qc.js +++ b/src/api/qc/qc.js @@ -162,6 +162,11 @@ export const searchSeqInfo = data => createAPI(`/pms/qc/searchSeqInfo`,'post',da export const searchPartInfo = data => createAPI(`/pms/qc/searchPartInfo`,'post',data) // 获取采购类型 export const orderTypeSearch = data => createAPI(`/pms/qc/orderTypeSearch`,'post',data) +export const actionIQCInspection = data => createAPI(`/pms/qc/actionIQCInspection`,'post',data) +export const actionFAIInspection = data => createAPI(`/pms/qc/actionFAIInspection`,'post',data) +export const actionIPQCInspection = data => createAPI(`/pms/qc/actionIPQCInspection`,'post',data) +export const actionFQCInspection = data => createAPI(`/pms/qc/actionFQCInspection`,'post',data) +export const dataAcquisition = data => createAPI(`/pms/qc/dataAcquisition`,'post',data) diff --git a/src/views/modules/eam/eamWorkOrderForCheck.vue b/src/views/modules/eam/eamWorkOrderForCheck.vue index 841e327..12e8adc 100644 --- a/src/views/modules/eam/eamWorkOrderForCheck.vue +++ b/src/views/modules/eam/eamWorkOrderForCheck.vue @@ -854,6 +854,7 @@ reachDate: '', actualDate: '', operator: '', + adminID: '' }, columnDetailList: [ { @@ -1419,6 +1420,7 @@ reachDate: row.reachDate, actualDate: row.actualDate, operator: row.operator, + adminID: row.adminID } this.detailModelFlag = true }, @@ -1621,9 +1623,17 @@ // 查询机修人员列表 getOperatorList2 () { + // 拿到选中的人员编号 + let tempDataList = (this.saveData.adminID == null ? '' : this.saveData.adminID).split(';') getOperatorList(this.operatorData).then(({data}) => { if (data && data.code === 0) { this.operatorList = data.rows + this.operatorList.forEach(val => { + // 回显选中的部门 + if (tempDataList.includes(val.adminID)) { + this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true)) + } + }) } else { this.operatorList = [] } diff --git a/src/views/modules/eam/eamWorkOrderForMaintenance.vue b/src/views/modules/eam/eamWorkOrderForMaintenance.vue index 024d889..0dea045 100644 --- a/src/views/modules/eam/eamWorkOrderForMaintenance.vue +++ b/src/views/modules/eam/eamWorkOrderForMaintenance.vue @@ -1552,9 +1552,17 @@ // 查询机修人员列表 getOperatorList2 () { + // 拿到选中的人员编号 + let tempDataList = (this.saveData.adminID == null ? '' : this.saveData.adminID).split(';') getOperatorList(this.operatorData).then(({data}) => { if (data && data.code === 0) { this.operatorList = data.rows + this.operatorList.forEach(val => { + // 回显选中的部门 + if (tempDataList.includes(val.adminID)) { + this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true)) + } + }) } else { this.operatorList = [] } diff --git a/src/views/modules/qc/FAIResultEntry.vue b/src/views/modules/qc/FAIResultEntry.vue index 13f6821..d43d9d9 100644 --- a/src/views/modules/qc/FAIResultEntry.vue +++ b/src/views/modules/qc/FAIResultEntry.vue @@ -48,6 +48,7 @@ + @@ -156,7 +157,8 @@ width="130" label="操作"> @@ -336,6 +338,9 @@ + + 数据采集 + @@ -356,28 +361,6 @@ - - - - - - - - - - - - - - + + 协同人员 + 协同人员 + + + + 责任人 + 责任人 + + 上传文件 明细导入 + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + 查询 + + + + + + + + + +
+ + 确认 + 关闭 + +
+ @@ -794,11 +872,17 @@ umSearch, // 查询单位列表 getSiteAndBuByUserName, searchSeqInfo, // 派工单号查询 + actionFAIInspection, // 开始检验 + dataAcquisition, // 数据采集 } from "@/api/qc/qc.js" import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" import Chooselist from '@/views/modules/common/Chooselist_eam' import {getFileContentList, downLoadObjectFile} from '@/api/eam/eam_object_list.js' - import {deleteObjectFile} from '@/api/eam/eam.js' + import { + deleteObjectFile, + getUserRoleList, // 获取用户角色列表 + getOperatorList + } from '@/api/eam/eam.js' import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' import qcFAIUploadFile from "./qc_FAI_upload_file" import comQcItemImageUploadFile from "./com_qc_itemImage_upload_file" @@ -827,6 +911,7 @@ }, data () { return { + loadFlag: false, inspectionNo: '', fileFlag: false, fileContentList: [], @@ -1307,6 +1392,24 @@ fixed: '', columnWidth: 120, }, + { + userId: this.$store.state.user.name, + functionId: 301007, + serialNumber: '301007Table1ActionDate', + tableId: "301007Table1", + tableName: "FQC检验记录表", + columnProp: 'actionDate', + headerAlign: "center", + align: "center", + columnLabel: '开始检验时间', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 150, + }, { userId: this.$store.state.user.name, functionId: 301007, @@ -1384,7 +1487,11 @@ sku: '', spec: '', umId: '', - umName: '' + umName: '', + operator: '', + operatorName: '', + responsiblePerson: '', + responsiblePersonName: '' }, detailInformationFlag: false, detailList: [], @@ -1402,6 +1509,11 @@ unqualifiedQty: '', partNo: '', partDesc: '', + operator: '', + operatorName: '', + responsiblePerson: '', + responsiblePersonName: '', + subDetailList: [] }, detailColumnList: [ { @@ -2081,6 +2193,70 @@ authDetail: false, authFile: false, menuId: this.$route.meta.menuId, + roleList: [], + operatorList: [], + operatorData: { + flag: '', + site: '', + bu: '', + adminID: '', + adminName: '', + roleName: '', + roleId: '', + }, + operatorModelFlag: false, + dataListSelections2: [], + operatorDetailList: [ + { + columnProp: 'adminID', + headerAlign: "center", + align: "center", + columnLabel: '用户账号', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'adminName', + headerAlign: "center", + align: "center", + columnLabel: '用户名称', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'email', + headerAlign: "center", + align: "center", + columnLabel: '邮箱', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'phone', + headerAlign: "center", + align: "center", + columnLabel: '手机号', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + ], + acquisitionList: [] } }, @@ -2113,9 +2289,207 @@ // 获取数据列表 this.getDataList() } + // 获取用户角色 + this.getUserRoleList() }, methods: { + // 数据采集 + dataAcquisition () { + this.loadFlag = true + let tempDate = { + site: this.detailData.site, + buNo: this.detailData.buNo, + inspectionNo: this.detailData.inspectionNo, + } + dataAcquisition(tempDate).then(({data}) => { + if (data.code === 0) { + this.acquisitionList = data.rows + if (this.acquisitionList.length > 0) { + this.$message({ + message: '数据采集成功', + type: 'success', + duration: 1500 + }) + } else { + this.$message({ + message: '未采集到数据信息!', + type: 'warning', + duration: 1500 + }) + } + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + this.loadFlag = false + }) + }, + + // 获取用户角色 + getUserRoleList () { + getUserRoleList().then(({data}) => { + if (data.code === 0) { + this.roleList = data.rows + } else { + this.roleList = [] + } + }) + }, + + // 获取协同人员列表 + getOperatorList () { + this.operatorData.flag = '1' + this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo + if (this.roleList.length > 0) { + let filterList = this.roleList.filter(item => item.roleName === '机修人员') + if (filterList.length > 0) { + this.operatorData.roleId = filterList[0].roleId + } else { + this.operatorData.roleId = this.roleList[0].roleId + } + } else { + this.operatorData.roleId = '' + } + // 先清空缓存选中 + this.$nextTick(() => this.$refs.operatorTable.clearSelection()) + // 拿到选中的人员编号 + let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';') + getOperatorList(this.operatorData).then(({data}) => { + if (data && data.code === 0) { + this.operatorList = data.rows + this.operatorList.forEach(val => { + // 回显选中 + if (tempDataList.includes(val.adminID)) { + this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true)) + } + }) + this.operatorModelFlag = true + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 获取责任人员列表 + getResponsiblePersonList () { + this.operatorData.flag = '2' + this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo + if (this.roleList.length > 0) { + let filterList = this.roleList.filter(item => item.roleName === '系统管理员') + if (filterList.length > 0) { + this.operatorData.roleId = filterList[0].roleId + } else { + this.operatorData.roleId = this.roleList[0].roleId + } + } else { + this.operatorData.roleId = '' + } + // 先清空缓存选中 + this.$nextTick(() => this.$refs.operatorTable.clearSelection()) + // 拿到选中的人员编号 + let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';') + getOperatorList(this.operatorData).then(({data}) => { + if (data && data.code === 0) { + this.operatorList = data.rows + this.operatorList.forEach(val => { + // 回显选中 + if (tempDataList.includes(val.adminID)) { + this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true)) + } + }) + this.operatorModelFlag = true + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 查询机修人员列表 + getOperatorList2 () { + if (this.operatorData.flag === '1') { + // 拿到选中的人员编号 + let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';') + getOperatorList(this.operatorData).then(({data}) => { + if (data && data.code === 0) { + this.operatorList = data.rows + this.operatorList.forEach(val => { + // 回显选中的部门 + if (tempDataList.includes(val.adminID)) { + this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true)) + } + }) + } else { + this.operatorList = [] + } + }) + } else { + // 拿到选中的人员编号 + let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';') + getOperatorList(this.operatorData).then(({data}) => { + if (data && data.code === 0) { + this.operatorList = data.rows + this.operatorList.forEach(val => { + // 回显选中的部门 + if (tempDataList.includes(val.adminID)) { + this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true)) + } + }) + } else { + this.operatorList = [] + } + }) + } + }, + + // 点击行选中复选框 + operatorClickRow (row) { + this.$refs.operatorTable.toggleRowSelection(row) + }, + + // 多选 + selectionChangeHandle2 (val) { + this.dataListSelections2 = val + }, + + // 确认多选协同人员 + confirmOperator () { + if (this.dataListSelections2.length === 0) { + this.$message.warning('请勾选人员!') + return + } + if (this.operatorData.flag === '1') { + for (let i = 0; i < this.dataListSelections2.length; i++) { + this.detailData.operatorName = this.detailData.operatorName + ";" + this.dataListSelections2[i].adminName + this.detailData.operator = this.detailData.operator + ";" + this.dataListSelections2[i].adminID + } + this.detailData.operator = this.detailData.operator.substring(1) + this.detailData.operatorName = this.detailData.operatorName.substring(1) + } else { + for (let i = 0; i < this.dataListSelections2.length; i++) { + this.detailData.responsiblePersonName = this.detailData.responsiblePersonName + ";" + this.dataListSelections2[i].adminName + this.detailData.responsiblePerson = this.detailData.responsiblePerson + ";" + this.dataListSelections2[i].adminID + } + this.detailData.responsiblePerson = this.detailData.responsiblePerson.substring(1) + this.detailData.responsiblePersonName = this.detailData.responsiblePersonName.substring(1) + } + this.operatorData = { + flag: '', + site: '', + bu: '', + adminID: '', + adminName: '', + roleName: '', + roleId: '', + } + this.operatorModelFlag = false + }, + // bu内容改变事件 buChange () { if (this.modalData.specialTaskFlag !== 'Y') { // 正常检验 @@ -2130,7 +2504,6 @@ this.modalData.templateId = '' this.modalData.templateName = '' } - }, // 获取用户的bu @@ -2901,7 +3274,10 @@ this.saveInformationData.unqualifiedQty = this.detailData.unqualifiedQty this.saveInformationData.partNo = this.detailData.partNo this.saveInformationData.partDesc = this.detailData.partDesc + this.saveInformationData.operator = this.detailData.operator + this.saveInformationData.responsiblePerson = this.detailData.responsiblePerson this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList)) + this.saveInformationData.subDetailList = this.acquisitionList saveFAIDetailedRecord(this.saveInformationData).then(({data}) => { if (data && data.code === 0) { this.getDataList() @@ -2920,6 +3296,38 @@ }) }, + // 开始检验 + actionModal (row) { + this.$confirm(`确认开始检验?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + let tempData = { + site: row.site, + buNo: row.buNo, + inspectionNo: row.inspectionNo, + actionBy: this.$store.state.user.name, + state: '待检验' + } + actionFAIInspection(tempData).then(({data}) => { + if (data && data.code === 0) { + this.getDataList() + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }) + }, + // 明细记录信息查询 detailModal (row) { this.detailData.site = row.site @@ -2943,8 +3351,13 @@ this.detailData.spec = row.spec this.detailData.umId = row.umId this.detailData.umName = row.umName + this.detailData.operator = row.operator + this.detailData.operatorName = row.operatorName + this.detailData.responsiblePerson = row.responsiblePerson + this.detailData.responsiblePersonName = row.responsiblePersonName this.getInspectionFormData() this.inspectorSearch() + this.acquisitionList = [] this.detailInformationFlag = true }, diff --git a/src/views/modules/qc/FQCResultEntry.vue b/src/views/modules/qc/FQCResultEntry.vue index 7c6b4b5..59a4a3a 100644 --- a/src/views/modules/qc/FQCResultEntry.vue +++ b/src/views/modules/qc/FQCResultEntry.vue @@ -50,6 +50,7 @@ + @@ -158,7 +159,8 @@ width="130" label="操作"> @@ -322,6 +324,9 @@ + + 数据采集 + @@ -342,28 +347,6 @@ - - - - - - - - - - - - - - + + 协同人员 + 协同人员 + + + + 责任人 + 责任人 + + 上传文件 明细导入 + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + 查询 + + + + + + + + + +
+ + 确认 + 关闭 + +
+ @@ -771,11 +850,17 @@ umSearch, // 查询单位列表 getSiteAndBuByUserName, searchSeqInfo, // 查询派工单号 + actionFQCInspection, // 开始检验 + dataAcquisition, // 数据采集 } from "@/api/qc/qc.js" import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" import Chooselist from '@/views/modules/common/Chooselist_eam' import {getFileContentList, downLoadObjectFile} from '@/api/eam/eam_object_list.js' - import {deleteObjectFile} from '@/api/eam/eam.js' + import { + deleteObjectFile, + getUserRoleList, // 获取用户角色列表 + getOperatorList + } from '@/api/eam/eam.js' import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' import qcFAIUploadFile from "./qc_FAI_upload_file" import comQcItemImageUploadFile from "./com_qc_itemImage_upload_file" @@ -804,6 +889,7 @@ }, data () { return { + loadFlag: false, inspectionNo: '', fileFlag: false, fileContentList: [], @@ -1282,6 +1368,24 @@ fixed: '', columnWidth: 120, }, + { + userId: this.$store.state.user.name, + functionId: 301015, + serialNumber: '301015Table1ActionDate', + tableId: "301015Table1", + tableName: "FQC检验记录表", + columnProp: 'actionDate', + headerAlign: "center", + align: "center", + columnLabel: '开始检验时间', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 150, + }, { userId: this.$store.state.user.name, functionId: 301015, @@ -1359,7 +1463,11 @@ sku: '', spec: '', umId: '', - umName: '' + umName: '', + operator: '', + operatorName: '', + responsiblePerson: '', + responsiblePersonName: '' }, detailInformationFlag: false, detailList: [], @@ -1377,6 +1485,11 @@ unqualifiedQty: '', partNo: '', partDesc: '', + operator: '', + operatorName: '', + responsiblePerson: '', + responsiblePersonName: '', + subDetailList: [] }, detailColumnList: [ { @@ -2056,6 +2169,70 @@ authDetail: false, authFile: false, menuId: this.$route.meta.menuId, + roleList: [], + operatorList: [], + operatorData: { + flag: '', + site: '', + bu: '', + adminID: '', + adminName: '', + roleName: '', + roleId: '', + }, + operatorModelFlag: false, + dataListSelections2: [], + operatorDetailList: [ + { + columnProp: 'adminID', + headerAlign: "center", + align: "center", + columnLabel: '用户账号', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'adminName', + headerAlign: "center", + align: "center", + columnLabel: '用户名称', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'email', + headerAlign: "center", + align: "center", + columnLabel: '邮箱', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'phone', + headerAlign: "center", + align: "center", + columnLabel: '手机号', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + ], + acquisitionList: [] } }, @@ -2088,9 +2265,207 @@ // 获取数据列表 this.getDataList() } + // 获取用户角色 + this.getUserRoleList() }, methods: { + // 数据采集 + dataAcquisition () { + this.loadFlag = true + let tempDate = { + site: this.detailData.site, + buNo: this.detailData.buNo, + inspectionNo: this.detailData.inspectionNo, + } + dataAcquisition(tempDate).then(({data}) => { + if (data.code === 0) { + this.acquisitionList = data.rows + if (this.acquisitionList.length > 0) { + this.$message({ + message: '数据采集成功', + type: 'success', + duration: 1500 + }) + } else { + this.$message({ + message: '未采集到数据信息!', + type: 'warning', + duration: 1500 + }) + } + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + this.loadFlag = false + }) + }, + + // 获取用户角色 + getUserRoleList () { + getUserRoleList().then(({data}) => { + if (data.code === 0) { + this.roleList = data.rows + } else { + this.roleList = [] + } + }) + }, + + // 获取协同人员列表 + getOperatorList () { + this.operatorData.flag = '1' + this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo + if (this.roleList.length > 0) { + let filterList = this.roleList.filter(item => item.roleName === '机修人员') + if (filterList.length > 0) { + this.operatorData.roleId = filterList[0].roleId + } else { + this.operatorData.roleId = this.roleList[0].roleId + } + } else { + this.operatorData.roleId = '' + } + // 先清空缓存选中 + this.$nextTick(() => this.$refs.operatorTable.clearSelection()) + // 拿到选中的人员编号 + let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';') + getOperatorList(this.operatorData).then(({data}) => { + if (data && data.code === 0) { + this.operatorList = data.rows + this.operatorList.forEach(val => { + // 回显选中 + if (tempDataList.includes(val.adminID)) { + this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true)) + } + }) + this.operatorModelFlag = true + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 获取责任人员列表 + getResponsiblePersonList () { + this.operatorData.flag = '2' + this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo + if (this.roleList.length > 0) { + let filterList = this.roleList.filter(item => item.roleName === '系统管理员') + if (filterList.length > 0) { + this.operatorData.roleId = filterList[0].roleId + } else { + this.operatorData.roleId = this.roleList[0].roleId + } + } else { + this.operatorData.roleId = '' + } + // 先清空缓存选中 + this.$nextTick(() => this.$refs.operatorTable.clearSelection()) + // 拿到选中的人员编号 + let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';') + getOperatorList(this.operatorData).then(({data}) => { + if (data && data.code === 0) { + this.operatorList = data.rows + this.operatorList.forEach(val => { + // 回显选中 + if (tempDataList.includes(val.adminID)) { + this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true)) + } + }) + this.operatorModelFlag = true + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 查询机修人员列表 + getOperatorList2 () { + if (this.operatorData.flag === '1') { + // 拿到选中的人员编号 + let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';') + getOperatorList(this.operatorData).then(({data}) => { + if (data && data.code === 0) { + this.operatorList = data.rows + this.operatorList.forEach(val => { + // 回显选中的部门 + if (tempDataList.includes(val.adminID)) { + this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true)) + } + }) + } else { + this.operatorList = [] + } + }) + } else { + // 拿到选中的人员编号 + let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';') + getOperatorList(this.operatorData).then(({data}) => { + if (data && data.code === 0) { + this.operatorList = data.rows + this.operatorList.forEach(val => { + // 回显选中的部门 + if (tempDataList.includes(val.adminID)) { + this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true)) + } + }) + } else { + this.operatorList = [] + } + }) + } + }, + + // 点击行选中复选框 + operatorClickRow (row) { + this.$refs.operatorTable.toggleRowSelection(row) + }, + + // 多选 + selectionChangeHandle2 (val) { + this.dataListSelections2 = val + }, + + // 确认多选协同人员 + confirmOperator () { + if (this.dataListSelections2.length === 0) { + this.$message.warning('请勾选人员!') + return + } + if (this.operatorData.flag === '1') { + for (let i = 0; i < this.dataListSelections2.length; i++) { + this.detailData.operatorName = this.detailData.operatorName + ";" + this.dataListSelections2[i].adminName + this.detailData.operator = this.detailData.operator + ";" + this.dataListSelections2[i].adminID + } + this.detailData.operator = this.detailData.operator.substring(1) + this.detailData.operatorName = this.detailData.operatorName.substring(1) + } else { + for (let i = 0; i < this.dataListSelections2.length; i++) { + this.detailData.responsiblePersonName = this.detailData.responsiblePersonName + ";" + this.dataListSelections2[i].adminName + this.detailData.responsiblePerson = this.detailData.responsiblePerson + ";" + this.dataListSelections2[i].adminID + } + this.detailData.responsiblePerson = this.detailData.responsiblePerson.substring(1) + this.detailData.responsiblePersonName = this.detailData.responsiblePersonName.substring(1) + } + this.operatorData = { + flag: '', + site: '', + bu: '', + adminID: '', + adminName: '', + roleName: '', + roleId: '', + } + this.operatorModelFlag = false + }, + // bu内容改变事件 buChange () { if (this.modalData.specialTaskFlag !== 'Y') { // 正常检验 @@ -2105,7 +2480,6 @@ this.modalData.templateId = '' this.modalData.templateName = '' } - }, // 获取用户的bu @@ -2875,7 +3249,10 @@ this.saveInformationData.unqualifiedQty = this.detailData.unqualifiedQty this.saveInformationData.partNo = this.detailData.partNo this.saveInformationData.partDesc = this.detailData.partDesc + this.saveInformationData.operator = this.detailData.operator + this.saveInformationData.responsiblePerson = this.detailData.responsiblePerson this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList)) + this.saveInformationData.subDetailList = this.acquisitionList saveFQCDetailedRecord(this.saveInformationData).then(({data}) => { if (data && data.code === 0) { this.getDataList() @@ -2894,6 +3271,38 @@ }) }, + // 开始检验 + actionModal (row) { + this.$confirm(`确认开始检验?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + let tempData = { + site: row.site, + buNo: row.buNo, + inspectionNo: row.inspectionNo, + actionBy: this.$store.state.user.name, + state: '待检验' + } + actionFQCInspection(tempData).then(({data}) => { + if (data && data.code === 0) { + this.getDataList() + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }) + }, + // 明细记录信息查询 detailModal (row) { this.detailData.site = row.site @@ -2917,8 +3326,13 @@ this.detailData.spec = row.spec this.detailData.umId = row.umId this.detailData.umName = row.umName + this.detailData.operator = row.operator + this.detailData.operatorName = row.operatorName + this.detailData.responsiblePerson = row.responsiblePerson + this.detailData.responsiblePersonName = row.responsiblePersonName this.getInspectionFormData() this.inspectorSearch() + this.acquisitionList = [] this.detailInformationFlag = true }, diff --git a/src/views/modules/qc/IPQCResultEntry.vue b/src/views/modules/qc/IPQCResultEntry.vue index fc66685..bf88500 100644 --- a/src/views/modules/qc/IPQCResultEntry.vue +++ b/src/views/modules/qc/IPQCResultEntry.vue @@ -48,6 +48,7 @@ + @@ -160,7 +161,8 @@ width="130" label="操作"> @@ -334,6 +336,9 @@ + + 数据采集 + @@ -354,28 +359,6 @@ - - - - - - - - - - - - - - + + 协同人员 + 协同人员 + + + + 责任人 + 责任人 + + 上传文件 明细导入 + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + 查询 + + + + + + + + + +
+ + 确认 + 关闭 + +
+ @@ -791,11 +869,17 @@ umSearch, // 查询单位列表 getSiteAndBuByUserName, searchSeqInfo, // 派工单号查询 + actionIPQCInspection, // 开始检验 + dataAcquisition, // 数据采集 } from "@/api/qc/qc.js" import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" import Chooselist from '@/views/modules/common/Chooselist_eam' import {getFileContentList, downLoadObjectFile} from '@/api/eam/eam_object_list.js' - import {deleteObjectFile} from '@/api/eam/eam.js' + import { + deleteObjectFile, + getUserRoleList, // 获取用户角色列表 + getOperatorList + } from '@/api/eam/eam.js' import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' import qcFAIUploadFile from "./qc_FAI_upload_file" import comQcItemImageUploadFile from "./com_qc_itemImage_upload_file" @@ -824,6 +908,7 @@ }, data () { return { + loadFlag: false, inspectionNo: '', fileFlag: false, fileContentList: [], @@ -1327,6 +1412,24 @@ fixed: '', columnWidth: 120, }, + { + userId: this.$store.state.user.name, + functionId: 301014, + serialNumber: '301014Table1ActionDate', + tableId: "301014Table1", + tableName: "IPQC检验记录表", + columnProp: 'actionDate', + headerAlign: "center", + align: "center", + columnLabel: '开始检验时间', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 150, + }, { userId: this.$store.state.user.name, functionId: 301014, @@ -1404,7 +1507,11 @@ sku: '', spec: '', umId: '', - umName: '' + umName: '', + operator: '', + operatorName: '', + responsiblePerson: '', + responsiblePersonName: '' }, detailInformationFlag: false, detailList: [], @@ -1422,6 +1529,11 @@ unqualifiedQty: '', partNo: '', partDesc: '', + operator: '', + operatorName: '', + responsiblePerson: '', + responsiblePersonName: '', + subDetailList: [] }, detailColumnList: [ { @@ -2110,6 +2222,70 @@ authDetail: false, authFile: false, menuId: this.$route.meta.menuId, + roleList: [], + operatorList: [], + operatorData: { + flag: '', + site: '', + bu: '', + adminID: '', + adminName: '', + roleName: '', + roleId: '', + }, + operatorModelFlag: false, + dataListSelections2: [], + operatorDetailList: [ + { + columnProp: 'adminID', + headerAlign: "center", + align: "center", + columnLabel: '用户账号', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'adminName', + headerAlign: "center", + align: "center", + columnLabel: '用户名称', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'email', + headerAlign: "center", + align: "center", + columnLabel: '邮箱', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'phone', + headerAlign: "center", + align: "center", + columnLabel: '手机号', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + ], + acquisitionList: [] } }, @@ -2142,9 +2318,207 @@ // 获取数据列表 this.getDataList() } + // 获取用户角色 + this.getUserRoleList() }, methods: { + // 数据采集 + dataAcquisition () { + this.loadFlag = true + let tempDate = { + site: this.detailData.site, + buNo: this.detailData.buNo, + inspectionNo: this.detailData.inspectionNo, + } + dataAcquisition(tempDate).then(({data}) => { + if (data.code === 0) { + this.acquisitionList = data.rows + if (this.acquisitionList.length > 0) { + this.$message({ + message: '数据采集成功', + type: 'success', + duration: 1500 + }) + } else { + this.$message({ + message: '未采集到数据信息!', + type: 'warning', + duration: 1500 + }) + } + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + this.loadFlag = false + }) + }, + + // 获取用户角色 + getUserRoleList () { + getUserRoleList().then(({data}) => { + if (data.code === 0) { + this.roleList = data.rows + } else { + this.roleList = [] + } + }) + }, + + // 获取协同人员列表 + getOperatorList () { + this.operatorData.flag = '1' + this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo + if (this.roleList.length > 0) { + let filterList = this.roleList.filter(item => item.roleName === '机修人员') + if (filterList.length > 0) { + this.operatorData.roleId = filterList[0].roleId + } else { + this.operatorData.roleId = this.roleList[0].roleId + } + } else { + this.operatorData.roleId = '' + } + // 先清空缓存选中 + this.$nextTick(() => this.$refs.operatorTable.clearSelection()) + // 拿到选中的人员编号 + let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';') + getOperatorList(this.operatorData).then(({data}) => { + if (data && data.code === 0) { + this.operatorList = data.rows + this.operatorList.forEach(val => { + // 回显选中 + if (tempDataList.includes(val.adminID)) { + this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true)) + } + }) + this.operatorModelFlag = true + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 获取责任人员列表 + getResponsiblePersonList () { + this.operatorData.flag = '2' + this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo + if (this.roleList.length > 0) { + let filterList = this.roleList.filter(item => item.roleName === '系统管理员') + if (filterList.length > 0) { + this.operatorData.roleId = filterList[0].roleId + } else { + this.operatorData.roleId = this.roleList[0].roleId + } + } else { + this.operatorData.roleId = '' + } + // 先清空缓存选中 + this.$nextTick(() => this.$refs.operatorTable.clearSelection()) + // 拿到选中的人员编号 + let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';') + getOperatorList(this.operatorData).then(({data}) => { + if (data && data.code === 0) { + this.operatorList = data.rows + this.operatorList.forEach(val => { + // 回显选中 + if (tempDataList.includes(val.adminID)) { + this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true)) + } + }) + this.operatorModelFlag = true + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 查询机修人员列表 + getOperatorList2 () { + if (this.operatorData.flag === '1') { + // 拿到选中的人员编号 + let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';') + getOperatorList(this.operatorData).then(({data}) => { + if (data && data.code === 0) { + this.operatorList = data.rows + this.operatorList.forEach(val => { + // 回显选中的部门 + if (tempDataList.includes(val.adminID)) { + this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true)) + } + }) + } else { + this.operatorList = [] + } + }) + } else { + // 拿到选中的人员编号 + let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';') + getOperatorList(this.operatorData).then(({data}) => { + if (data && data.code === 0) { + this.operatorList = data.rows + this.operatorList.forEach(val => { + // 回显选中的部门 + if (tempDataList.includes(val.adminID)) { + this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true)) + } + }) + } else { + this.operatorList = [] + } + }) + } + }, + + // 点击行选中复选框 + operatorClickRow (row) { + this.$refs.operatorTable.toggleRowSelection(row) + }, + + // 多选 + selectionChangeHandle2 (val) { + this.dataListSelections2 = val + }, + + // 确认多选协同人员 + confirmOperator () { + if (this.dataListSelections2.length === 0) { + this.$message.warning('请勾选人员!') + return + } + if (this.operatorData.flag === '1') { + for (let i = 0; i < this.dataListSelections2.length; i++) { + this.detailData.operatorName = this.detailData.operatorName + ";" + this.dataListSelections2[i].adminName + this.detailData.operator = this.detailData.operator + ";" + this.dataListSelections2[i].adminID + } + this.detailData.operator = this.detailData.operator.substring(1) + this.detailData.operatorName = this.detailData.operatorName.substring(1) + } else { + for (let i = 0; i < this.dataListSelections2.length; i++) { + this.detailData.responsiblePersonName = this.detailData.responsiblePersonName + ";" + this.dataListSelections2[i].adminName + this.detailData.responsiblePerson = this.detailData.responsiblePerson + ";" + this.dataListSelections2[i].adminID + } + this.detailData.responsiblePerson = this.detailData.responsiblePerson.substring(1) + this.detailData.responsiblePersonName = this.detailData.responsiblePersonName.substring(1) + } + this.operatorData = { + flag: '', + site: '', + bu: '', + adminID: '', + adminName: '', + roleName: '', + roleId: '', + } + this.operatorModelFlag = false + }, + // bu内容改变事件 buChange () { if (this.modalData.specialTaskFlag !== 'Y') { // 正常检验 @@ -2159,7 +2533,6 @@ this.modalData.templateId = '' this.modalData.templateName = '' } - }, // 获取用户的bu @@ -2939,7 +3312,10 @@ this.saveInformationData.unqualifiedQty = this.detailData.unqualifiedQty this.saveInformationData.partNo = this.detailData.partNo this.saveInformationData.partDesc = this.detailData.partDesc + this.saveInformationData.operator = this.detailData.operator + this.saveInformationData.responsiblePerson = this.detailData.responsiblePerson this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList)) + this.saveInformationData.subDetailList = this.acquisitionList saveIPQCDetailedRecord(this.saveInformationData).then(({data}) => { if (data && data.code === 0) { this.getDataList() @@ -2958,6 +3334,39 @@ }) }, + + // 开始检验 + actionModal (row) { + this.$confirm(`确认开始检验?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + let tempData = { + site: row.site, + buNo: row.buNo, + inspectionNo: row.inspectionNo, + actionBy: this.$store.state.user.name, + state: '待检验' + } + actionIPQCInspection(tempData).then(({data}) => { + if (data && data.code === 0) { + this.getDataList() + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }) + }, + // 明细记录信息查询 detailModal (row) { this.detailData.site = row.site @@ -2982,8 +3391,13 @@ this.detailData.spec = row.spec this.detailData.umId = row.umId this.detailData.umName = row.umName + this.detailData.operator = row.operator + this.detailData.operatorName = row.operatorName + this.detailData.responsiblePerson = row.responsiblePerson + this.detailData.responsiblePersonName = row.responsiblePersonName this.getInspectionFormData() this.inspectorSearch() + this.acquisitionList = [] this.detailInformationFlag = true }, diff --git a/src/views/modules/qc/IQCResultEntry.vue b/src/views/modules/qc/IQCResultEntry.vue index 3a3ea72..1eccb70 100644 --- a/src/views/modules/qc/IQCResultEntry.vue +++ b/src/views/modules/qc/IQCResultEntry.vue @@ -51,6 +51,7 @@ + @@ -166,7 +167,8 @@ width="130" label="操作">