diff --git a/src/api/qc/qc.js b/src/api/qc/qc.js index e6ec6fd..3321472 100644 --- a/src/api/qc/qc.js +++ b/src/api/qc/qc.js @@ -98,6 +98,20 @@ export const saveFAISubDetailed = data => createAPI(`/pms/qc/saveFAISubDetailed` export const selectFAISubDetailedRecord = data => createAPI(`/pms/qc/selectFAISubDetailedRecord`,'post',data) export const checkFAIIsSubmit = data => createAPI(`/pms/qc/checkFAIIsSubmit`,'post',data) export const checkFAISubDetailValue = data => createAPI(`/pms/qc/checkFAISubDetailValue`,'post',data) +export const saveFAIInspection = data => createAPI(`/pms/qc/saveFAIInspection`,'post',data) + +// ===================================== FQC检验 ===================================== +export const qcFQCInspectionSearch = data => createAPI(`/pms/qc/qcFQCInspectionSearch`,'post',data) +export const fqcDetailSearch = data => createAPI(`/pms/qc/fqcDetailSearch`,'post',data) +export const fqcRecordDelete = data => createAPI(`/pms/qc/fqcRecordDelete`,'post',data) +export const saveFQCDetailedRecord = data => createAPI(`/pms/qc/saveFQCDetailedRecord`,'post',data) +export const saveFQCSubmitResult = data => createAPI(`/pms/qc/saveFQCSubmitResult`,'post',data) +export const saveFQCSubDetailed = data => createAPI(`/pms/qc/saveFQCSubDetailed`,'post',data) +export const selectFQCSubDetailedRecord = data => createAPI(`/pms/qc/selectFQCSubDetailedRecord`,'post',data) +export const checkFQCIsSubmit = data => createAPI(`/pms/qc/checkFQCIsSubmit`,'post',data) +export const checkFQCSubDetailValue = data => createAPI(`/pms/qc/checkFQCSubDetailValue`,'post',data) +export const saveFQCInspection = data => createAPI(`/pms/qc/saveFQCInspection`,'post',data) + // ===================================== IPQC检验 ===================================== export const qcIPQCInspectionSearch = data => createAPI(`/pms/qc/qcIPQCInspectionSearch`,'post',data) @@ -113,6 +127,9 @@ export const getOperationList = data => createAPI(`/pms/qc/getOperationList`,'po export const getResourceList = data => createAPI(`/pms/qc/getResourceList`,'post',data) export const getPartList = data => createAPI(`/pms/qc/getPartList`,'post',data) export const saveOsInspection = data => createAPI(`/pms/qc/saveOsInspection`,'post',data) +export const getAllResourceList = data => createAPI(`/pms/qc/getAllResourceList`,'post',data) +export const getOrderNoList = data => createAPI(`/pms/qc/getOrderNoList`,'post',data) + // ===================================== IQC检验 ===================================== export const qcIQCInspectionSearch = data => createAPI(`/pms/qc/qcIQCInspectionSearch`,'post',data) diff --git a/src/views/modules/qc/FAIResultEntry.vue b/src/views/modules/qc/FAIResultEntry.vue index f59d877..b8b9c68 100644 --- a/src/views/modules/qc/FAIResultEntry.vue +++ b/src/views/modules/qc/FAIResultEntry.vue @@ -42,8 +42,8 @@ - 清空 查询 + 新增 审核 删除 + + + + + 工单号 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 保存 + 关闭 + + + @@ -346,6 +397,9 @@ + + + @@ -362,7 +416,11 @@ saveFAISubDetailed, // 新增子明细信息 selectFAISubDetailedRecord, // 子明细记录信息查询 checkFAIIsSubmit, // 检查是否已提交 - checkFAISubDetailValue // 检查子明细中的实测值是否在规定范围 + checkFAISubDetailValue, // 检查子明细中的实测值是否在规定范围 + getResourceList, // 查询机台列表 + getOperationList, // 查询工序列表 + getPartList, // 查询物料列表 + saveFAIInspection, // 新增FAI检验 } from "@/api/qc/qc.js"; import Chooselist from '@/views/modules/common/Chooselist_eam'; import {getFileContentList, downLoadObjectFile} from '@/api/eam/eam_object_list.js'; @@ -376,9 +434,6 @@ components: { Chooselist, qcFAIUploadFile - }, - watch: { - }, data () { return { @@ -425,16 +480,16 @@ dataListLoading: false, dataListSelections: [], modalData: { - flag:'', + flag: '', site: this.$store.state.user.site, - inspectionNo:'', + inspectionNo: '', partNo: '', partDesc: '', - inspectionTypeNo:'102', - inspectionTypeName:'FAI', - inspectorNo:'', - inspectorName:'', - submit_flag:'', + inspectionTypeNo: '106', + inspectionTypeName: '', + inspectorNo: '', + inspectorName: '', + submit_flag: '', }, // 展示列集 columnList: [ @@ -859,6 +914,47 @@ }, options: [], FAISelections: [], + modalFlag: false, + rules:{ + orderNoType:[ + { + required: true, + message: ' ', + trigger: 'change' + } + ], + operationDescType:[ + { + required: true, + message: ' ', + trigger: 'change' + } + ], + resourceIdType:[ + { + required: true, + message: ' ', + trigger: 'change' + } + ], + partNoType:[ + { + required: true, + message: ' ', + trigger: 'change' + } + ], + rollQtyType:[ + { + required: true, + message: ' ', + trigger: 'change' + } + ] + }, + resourceList: [], + operationList: [], + partList: [], } }, mounted () { @@ -871,20 +967,159 @@ this.favoriteIsOk() }, methods: { + // 获取基础数据列表S + getBaseList (val,type) { + this.tagNo = val + this.$nextTick(() => { + let strVal = '' + if (val === 1052) { + strVal = this.modalData.orderNo + this.$refs.baseList.init(val, strVal) + } + }) + }, + + /* 列表方法的回调 */ + getBaseData (val) { + if (this.tagNo === 1052) { + this.modalData.orderNo = val.orderno + this.getOperationList() + this.getPartList() + } + }, + + // 获取机台列表 + getResourceList(){ + getResourceList(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.resourceList = data.rows + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 获取工序列表 + getOperationList(){ + getOperationList(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.operationList = data.rows + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 获取物料列表 + getPartList(){ + getPartList(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.partList = data.rows + this.modalData.partNo = this.partList[0].partNo + this.modalData.partDesc = this.partList[0].partDesc + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 新增FAI巡检记录 + saveData(){ + if (this.modalData.orderNo === '' || this.modalData.orderNo == null) { + this.$message.warning('请选择工单!') + return + } + if (this.modalData.partNo === '' || this.modalData.partNo == null) { + this.$message.warning('请选择物料!') + return + } + if (this.modalData.operationDesc === '' || this.modalData.operationDesc == null) { + this.$message.warning('请选择工序!') + return + } + if (this.modalData.resourceId === '' || this.modalData.resourceId == null) { + this.$message.warning('请选择机台!') + return + } + if (this.modalData.rollQty === '' || this.modalData.rollQty == null) { + this.$message.warning('请填写送检数量!') + return + } + if(this.modalData.flag === '1'){ + saveFAIInspection(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.getDataList() + this.operationList = [] + this.resourceList = [] + this.partList = [] + this.modalFlag = false + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => { + } + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + } + }, + + // 新增 + addModal(){ + this.modalData = { + flag: '1', + site: this.$store.state.user.site, + inspectionNo: '', + partNo: '', + partDesc: '', + inspectionTypeNo: '106', + inspectionTypeName: '', + inspectorNo: '', + inspectorName: '', + submit_flag: '', + orderNo: '', + operationDesc: '', + operationNo: '', + resourceId: '', + resourceDesc: '', + rollQty: '', + }; + this.operationList = []; + this.resourceList = []; + this.partList = []; + this.modalDisableFlag = false; + this.modalFlag = true; + }, + selectFlag(){ return true; }, + // 单机选中 FAIClickRow(row){ this.$refs.FAITable.toggleRowSelection(row); }, + // 复选 selectionFAI(val){ this.FAISelections = val }, + //刷新派设备文档的列表 getFileContentData(row) { let currentData = { + orderRef1: row.site, orderRef2: row.inspectionNo }; getFileContentList(currentData).then(({data}) => { @@ -897,9 +1132,11 @@ }) this.fileFlag = true; }, + /*新增文件的modal*/ addUploadFileModal(){ let currentData = { + titleCon: 'FAI文件上传', site: this.$store.state.user.site, createBy: this.$store.state.user.name, inspectionNo: this.detailData.inspectionNo, @@ -911,6 +1148,7 @@ this.$refs.qcFAIUploadFile.init(currentData); }) }, + downloadFile(row){ downLoadObjectFile(row) .then(({data}) => { @@ -933,8 +1171,13 @@ document.body.removeChild(linkNode) }) }, + // 删除文件 deleteFile(row){ + let tempData = { + site: row.orderRef1, + inspectionNo: row.orderRef2 + } this.$confirm('确定要删除此文件?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -942,7 +1185,7 @@ }).then(() => { deleteObjectFile(row).then(({data}) => { if (data && data.code === 0) { - this.getFileContentData(row); + this.getFileContentData(tempData); this.$message({ message: '操作成功', type: 'success', @@ -968,21 +1211,7 @@ } }) }, - // 清空搜索栏 - doEmpty(){ - this.searchData = { - site: this.$store.state.user.site, - inspectionNo: '', - state: '', - inspectionResult: '', - orderNo: '', - operationDesc: '', - startDate: '', - endDate: '', - page: 1, - limit: 10, - } - }, + // 获取主信息数据列表 getDataList () { this.searchData.limit = this.pageSize @@ -997,21 +1226,25 @@ this.dataListLoading = false }) }, + // 每页数 sizeChangeHandle (val) { this.pageSize = val this.pageIndex = 1 this.getDataList() }, + // 当前页 currentChangeHandle (val) { this.pageIndex = val this.getDataList() }, + // 多选 selectionChangeHandle (val) { this.dataListSelections = val }, + // 删除检验记录 deleteModal () { if(this.FAISelections.length === 0){ @@ -1049,6 +1282,7 @@ }).catch(() => { }) }, + Transfer(){ if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) { this.$alert('请选择检验结论!', '错误', { @@ -1096,6 +1330,7 @@ } this.$message({message: '操作成功', type: 'success', duration: 1500, onClose: () => {}}) }, + // 新增明细信息 saveDetailInformation(){ this.saveInformationData.inspectionNo = this.detailData.inspectionNo @@ -1139,6 +1374,7 @@ this.inspectorSearch(); this.detailInformationFlag = true; }, + // 子明细记录信息查询 subDetailModal(row){ this.subDetailData.inspectionNo = row.inspectionNo; @@ -1152,6 +1388,7 @@ }) this.subDetailFlag = true; }, + // 审核按钮 submitResult(){ let tempData1 = '' // 记录不是待审核状态的单号 @@ -1210,15 +1447,18 @@ }).catch(() => { }) }, + // 子明细方法 //表格的新增 rowClassName({ row, rowIndex }) { row.xh = rowIndex + 1; }, + //单选框选中数据 handleDetailSelectionChange(selection) { this.checkedDetail = selection; }, + //点击新增更多 handleAddBtn(td) { checkFAIIsSubmit(td).then(({data}) => { @@ -1235,6 +1475,7 @@ } }) }, + //删除 handleDeleteBtn(td) { checkFAIIsSubmit(td).then(({data}) => { @@ -1282,6 +1523,7 @@ }) }, + // 新增子明细记录 saveSubDetailResult(){ for (let i = 0; i < this.tableData.length; i++) { @@ -1313,7 +1555,6 @@ }) }, - // 校验用户是否收藏 favoriteIsOk() { let userFavorite = { @@ -1332,6 +1573,7 @@ }) }, + // 收藏 OR 取消收藏 favoriteFunction() { let userFavorite = { @@ -1369,13 +1611,16 @@ return this.exportList; }, + startDownload() { // this.exportData = this.dataList }, + finishDownload() { }, + fields() { let json = "{" this.columnList.forEach((item, index) => { @@ -1391,7 +1636,6 @@ return s }, // 导出 end - } } diff --git a/src/views/modules/qc/FQCResultEntry.vue b/src/views/modules/qc/FQCResultEntry.vue new file mode 100644 index 0000000..c244e7e --- /dev/null +++ b/src/views/modules/qc/FQCResultEntry.vue @@ -0,0 +1,1613 @@ + + + + + diff --git a/src/views/modules/qc/IPQCResultEntry.vue b/src/views/modules/qc/IPQCResultEntry.vue index 093c39b..72d82b3 100644 --- a/src/views/modules/qc/IPQCResultEntry.vue +++ b/src/views/modules/qc/IPQCResultEntry.vue @@ -9,10 +9,10 @@ - + - + @@ -30,29 +30,28 @@ - + - - + + + + - + + + - + - - + - - - + - 清空 查询 新增 审核 @@ -142,14 +141,28 @@ - + - 工单号 - + 工单号 + + + + + + + + + + + + + + + - + - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 添加 @@ -424,6 +488,7 @@ getResourceList, // 查询机台列表 getPartList, // 查询物料列表 saveOsInspection, // 新增巡检记录 + getOrderNoList // 查询工单列表 } from "@/api/qc/qc.js"; import Chooselist from '@/views/modules/common/Chooselist_eam'; import {getFileContentList, downLoadObjectFile} from '@/api/eam/eam_object_list.js'; @@ -437,9 +502,6 @@ components: { Chooselist, qcFAIUploadFile - }, - watch: { - }, data () { return { @@ -475,7 +537,7 @@ operationDesc: '', startDate: '', endDate: '', - checkType: '', + inspectionTypeNo: '', partNo: '', page: 1, limit: 10, @@ -483,6 +545,9 @@ pageIndex: 1, pageSize: 50, totalPage: 0, + // pageIndex2: 1, + // pageSize2: 20, + // totalPage2: 0, height: 200, dataList: [], dataListLoading: false, @@ -544,7 +609,7 @@ fixed: '', }, { - columnProp: 'checkType', + columnProp: 'inspectionTypeName', headerAlign: "center", align: "center", columnLabel: '检验类型', @@ -981,7 +1046,23 @@ trigger: 'change' } ], - } + inspectionTypeNoType: [ + { + required: true, + message: ' ', + trigger: 'change' + } + ] + }, + // orderNoData:{ + // limit: 10, + // page: 1, + // site: this.$store.state.user.site, + // orderNo: '' + // }, + // orderNoModelFlag: false, + // orderNoList: [], + // orderNoCurrent: -1 } }, mounted () { @@ -997,17 +1078,21 @@ selectFlag(){ return true; }, + // 单机选中 IPQCClickRow(row){ this.$refs.IPQCTable.toggleRowSelection(row); }, + // 复选 selectionIPQC(val){ this.IPQCSelections = val }, + //刷新派设备文档的列表 getFileContentData(row) { let currentData = { + orderRef1: row.site, orderRef2: row.inspectionNo }; getFileContentList(currentData).then(({data}) => { @@ -1020,9 +1105,11 @@ }) this.fileFlag = true; }, + /*新增文件的modal*/ addUploadFileModal(){ let currentData = { + titleCon: 'IPQC文件上传', site: this.$store.state.user.site, createBy: this.$store.state.user.name, inspectionNo: this.detailData.inspectionNo, @@ -1034,6 +1121,7 @@ this.$refs.qcFAIUploadFile.init(currentData); }) }, + downloadFile(row){ downLoadObjectFile(row) .then(({data}) => { @@ -1056,8 +1144,13 @@ document.body.removeChild(linkNode) }) }, + // 删除文件 deleteFile(row){ + let tempData = { + site: row.orderRef1, + inspectionNo: row.orderRef2 + } this.$confirm('确定要删除此文件?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -1065,7 +1158,7 @@ }).then(() => { deleteObjectFile(row).then(({data}) => { if (data && data.code == 0) { - this.getFileContentData(row); + this.getFileContentData(tempData); this.$message({ message: '操作成功', type: 'success', @@ -1091,22 +1184,7 @@ } }) }, - // 清空搜索栏 - doEmpty(){ - this.searchData = { - site: this.$store.state.user.site, - inspectionNo: '', - state: '', - inspectionResult: '', - orderNo: '', - operationDesc: '', - startDate: '', - endDate: '', - checkType: '', - page: 1, - limit: 10, - } - }, + // 获取基础数据列表S getBaseList (val,type) { this.tagNo = val @@ -1118,6 +1196,7 @@ } }) }, + /* 列表方法的回调 */ getBaseData (val) { if (this.tagNo === 1052) { @@ -1126,6 +1205,68 @@ this.getPartList() } }, + + // // 工单号改变事件 + // orderNoChange () { + // this.getOperationList() + // this.getPartList() + // }, + // + // // 获取工单列表 + // getOrderNoList(){ + // // this.orderNoData.limit = this.pageSize2 + // // this.orderNoData.page = this.pageIndex2 + // getOrderNoList(this.orderNoData).then(({data}) => { + // if (data && data.code === 0) { + // this.orderNoList = data.rows + // // this.pageIndex2 = data.page.currPage + // // this.pageSize2 = data.page.pageSize + // // this.totalPage2 = data.page.totalCount + // this.orderNoModelFlag = true + // } else { + // this.$alert(data.msg, '错误', { + // confirmButtonText: '确定' + // }) + // } + // }) + // }, + // // 条件查询获取工单列表 + // getOrderNoList2(){ + // // this.orderNoData.limit = this.pageSize2 + // // this.orderNoData.page = this.pageIndex2 + // getOrderNoList(this.orderNoData).then(({data}) => { + // if (data && data.code === 0) { + // this.orderNoList = data.rows + // // this.pageIndex2 = data.page.currPage + // // this.pageSize2 = data.page.pageSize + // // this.totalPage2 = data.page.totalCount + // this.orderNoCurrent = -1 + // } else { + // this.$alert(data.msg, '错误', { + // confirmButtonText: '确定' + // }) + // } + // }) + // }, + // // 点击行选中机台复选框 + // orderNoClickRow (row) { + // this.$refs.orderNoTable.toggleRowSelection(row); + // }, + // // 单选工单 + // selectionOrderNoChangeHandle (val) { + // this.modalData.orderNo = val[0].orderNo + // if (val) { + // this.orderNoCurrent = val.index; + // } + // }, + // orderNoRowClassName ({row, rowIndex}) { + // row.index = rowIndex; // 在原有的数据上加一个index + // }, + // // 确认选择工单 + // confirmOrderNo () { + // this.orderNoModelFlag = false + // }, + // 获取工序列表 getOperationList(){ getOperationList(this.modalData).then(({data}) => { @@ -1138,6 +1279,7 @@ } }) }, + // 获取机台列表 getResourceList(){ getResourceList(this.modalData).then(({data}) => { @@ -1150,11 +1292,14 @@ } }) }, + // 获取物料列表 getPartList(){ getPartList(this.modalData).then(({data}) => { if (data && data.code === 0) { this.partList = data.rows + this.modalData.partNo = this.partList[0].partNo + this.modalData.partDesc = this.partList[0].partDesc } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' @@ -1162,6 +1307,7 @@ } }) }, + addModal(){ this.modalData = { flag: '1', @@ -1169,8 +1315,8 @@ inspectionNo:'', partNo: '', partDesc: '', - inspectionTypeNo:'101', - inspectionTypeName:'IPQC', + inspectionTypeNo:'', + inspectionTypeName:'', inspectorNo:'', inspectorName:'', submit_flag:'', @@ -1187,39 +1333,34 @@ this.modalDisableFlag = false; this.modalFlag = true; }, + // 新增IPQC巡检记录 saveData(){ - if (this.modalData.orderNo == '' || this.modalData.orderNo == null) { - this.$alert('请选择工单!', '错误', { - confirmButtonText: '确定' - }) - return false + if (this.modalData.orderNo === '' || this.modalData.orderNo == null) { + this.$message.warning('请选择工单!') + return } - if (this.modalData.partNo == '' || this.modalData.partNo == null) { - this.$alert('请选择物料!', '错误', { - confirmButtonText: '确定' - }) - return false + if (this.modalData.inspectionTypeNo === '' || this.modalData.inspectionTypeNo == null) { + this.$message.warning('请选择检验类型!') + return } - if (this.modalData.operationDesc == '' || this.modalData.operationDesc == null) { - this.$alert('请选择工序!', '错误', { - confirmButtonText: '确定' - }) - return false + if (this.modalData.partNo === '' || this.modalData.partNo == null) { + this.$message.warning('请选择物料!') + return } - if (this.modalData.resourceId == '' || this.modalData.resourceId == null) { - this.$alert('请选择机台!', '错误', { - confirmButtonText: '确定' - }) - return false + if (this.modalData.operationDesc === '' || this.modalData.operationDesc == null) { + this.$message.warning('请选择工序!') + return } - if (this.modalData.rollQty == '' || this.modalData.rollQty == null) { - this.$alert('请填写送检数量!', '错误', { - confirmButtonText: '确定' - }) - return false + if (this.modalData.resourceId === '' || this.modalData.resourceId == null) { + this.$message.warning('请选择机台!') + return } - if(this.modalData.flag=='1'){ + if (this.modalData.rollQty === '' || this.modalData.rollQty == null) { + this.$message.warning('请填写送检数量!') + return + } + if(this.modalData.flag === '1'){ saveOsInspection(this.modalData).then(({data}) => { if (data && data.code === 0) { this.getDataList() @@ -1257,22 +1398,37 @@ this.dataListLoading = false }) }, + // 每页数 sizeChangeHandle (val) { this.pageSize = val this.pageIndex = 1 this.getDataList() }, + // 当前页 currentChangeHandle (val) { this.pageIndex = val this.getDataList() }, + // 多选 selectionChangeHandle (val) { this.dataListSelections = val }, + // // 每页数 + // sizeChangeHandle2 (val) { + // this.pageSize2 = val + // this.pageIndex2 = 1 + // this.getOrderNoList() + // }, + // // 当前页 + // currentChangeHandle2 (val) { + // this.pageIndex2 = val + // this.getOrderNoList() + // }, + // 删除检验记录 deleteModal () { if(this.IPQCSelections.length == 0){ @@ -1310,6 +1466,7 @@ }).catch(() => { }) }, + Transfer(){ if (this.detailData.inspectionResult == '' || this.detailData.inspectionResult == null) { this.$alert('请选择检验结论!', '错误', { @@ -1357,6 +1514,7 @@ } this.$message({message: '操作成功', type: 'success', duration: 1500, onClose: () => {}}) }, + // 新增明细信息 saveDetailInformation(){ this.saveInformationData.inspectionNo = this.detailData.inspectionNo @@ -1400,6 +1558,7 @@ this.inspectorSearch(); this.detailInformationFlag = true; }, + // 子明细记录信息查询 subDetailModal(row){ this.subDetailData.inspectionNo = row.inspectionNo; @@ -1413,6 +1572,7 @@ }) this.subDetailFlag = true; }, + // 审核按钮 submitResult(){ let tempData1 = '' // 记录不是待审核状态的单号 @@ -1471,15 +1631,18 @@ }).catch(() => { }) }, + // 子明细方法 //表格的新增 rowClassName({ row, rowIndex }) { row.xh = rowIndex + 1; }, + //单选框选中数据 handleDetailSelectionChange(selection) { this.checkedDetail = selection; }, + //点击新增更多 handleAddBtn(td) { checkIPQCIsSubmit(td).then(({data}) => { @@ -1496,6 +1659,7 @@ } }) }, + //删除 handleDeleteBtn(td) { checkIPQCIsSubmit(td).then(({data}) => { @@ -1541,6 +1705,7 @@ } }) }, + // 新增子明细记录 saveSubDetailResult(){ for (let i = 0; i < this.tableData.length; i++) { @@ -1572,7 +1737,6 @@ }) }, - // 校验用户是否收藏 favoriteIsOk() { let userFavorite = { @@ -1591,6 +1755,7 @@ }) }, + // 收藏 OR 取消收藏 favoriteFunction() { let userFavorite = { @@ -1628,13 +1793,15 @@ return this.exportList; }, + startDownload() { - // this.exportData = this.dataList }, + finishDownload() { }, + fields() { let json = "{" this.columnList.forEach((item, index) => { @@ -1649,8 +1816,6 @@ return s }, - // 导出 end - } } diff --git a/src/views/modules/qc/IQCResultEntry.vue b/src/views/modules/qc/IQCResultEntry.vue index f0db4ef..6eeefdc 100644 --- a/src/views/modules/qc/IQCResultEntry.vue +++ b/src/views/modules/qc/IQCResultEntry.vue @@ -33,16 +33,11 @@ - - + - - - + - 查询 审核 删除 @@ -347,6 +342,7 @@ + @@ -564,7 +560,7 @@ fixed: '', }, { - columnProp: 'supplierNo', + columnProp: 'supplierDesc', headerAlign: "center", align: "center", columnLabel: '供应商', @@ -880,6 +876,7 @@ //刷新派设备文档的列表 getFileContentData(row) { let currentData = { + orderRef1: row.site, orderRef2: row.inspectionNo }; getFileContentList(currentData).then(({data}) => { @@ -895,6 +892,7 @@ /*新增文件的modal*/ addUploadFileModal(){ let currentData = { + titleCon: 'IQC文件上传', site: this.$store.state.user.site, createBy: this.$store.state.user.name, inspectionNo: this.detailData.inspectionNo, @@ -930,6 +928,10 @@ }, // 删除文件 deleteFile(row){ + let tempData = { + site: row.orderRef1, + inspectionNo: row.orderRef2 + } this.$confirm('确定要删除此文件?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -937,7 +939,7 @@ }).then(() => { deleteObjectFile(row).then(({data}) => { if (data && data.code == 0) { - this.getFileContentData(row); + this.getFileContentData(tempData); this.$message({ message: '操作成功', type: 'success', @@ -954,21 +956,6 @@ }).catch(() => { }) }, - - // // 清空搜索栏 - // doEmpty(){ - // this.searchData = { - // site: this.$store.state.user.site, - // inspectionNo: '', - // inspectionTypeNo:'105', - // isQualified: '', - // startDate: '', - // endDate: '', - // partNo:'', - // partDesc:'', - // state: '', - // } - // }, // 获取基础数据列表S getBaseList (val,type) { this.tagNo = val diff --git a/src/views/modules/qc/qcFamilyAttribute.vue b/src/views/modules/qc/qcFamilyAttribute.vue index b2266de..4a05ebe 100644 --- a/src/views/modules/qc/qcFamilyAttribute.vue +++ b/src/views/modules/qc/qcFamilyAttribute.vue @@ -15,7 +15,6 @@ - 查询 新增 @@ -127,7 +126,7 @@ - + @@ -177,10 +176,22 @@ + label="工序"> + + + + - + - + @@ -285,6 +296,13 @@ 查询 + + 工序 + 供应商 + + + 机台 + @@ -331,13 +349,7 @@ -
- 工序 -
-
- 供应商 -
-
+
添加>>
@@ -378,10 +390,22 @@ label="模板名称"> + + + label="机台"> + + - 查询 + 查询 - + + 确认 - 关闭 + + + + + +
+ + + + + + + + + 查询 + + + + + + + + + + + +
+ + 确认
@@ -444,10 +514,10 @@
- + - + 查询 @@ -458,7 +528,7 @@ :data="manufacturerList" ref="manufacturerTable" @row-click="manufacturerClickRow" - @selection-change="selectionChangeHandle2" + @selection-change="selectionManufacturerChangeHandle" border v-loading="dataListLoading" style="width: 100%;"> @@ -489,7 +559,8 @@ - + +
@@ -508,7 +579,8 @@ // getItemLists, // 获取模板列表 getPartTemplateLists, // 获取模板列表 getOperationDescList, // 查询工序列表 - getManufacturerList // 查询供应商列表 + getManufacturerList, // 查询供应商列表 + getAllResourceList // 查询机台列表 } from "@/api/qc/qc.js" import Chooselist from '@/views/modules/common/Chooselist_eam' import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' @@ -517,9 +589,6 @@ components: { Chooselist, qcUpload - }, - watch: { - }, data () { return { @@ -534,6 +603,7 @@ // 导出 end tagNo:'', searchData: { + site: this.$store.state.user.site, familyID: '', familyName: '', attributeType: 'B', @@ -548,6 +618,7 @@ modalFlag:false, modalDisableFlag:false, modalData:{ + site: this.$store.state.user.site, flag: '', familyID: '', familyName: '', @@ -726,20 +797,31 @@ // 工序 operationList: [], operationModelFlag: false, - dataListSelections: [], operationData:{ operationDesc: '' }, - selectionOperation: [], // 供应商 manufacturerList: [], manufacturerModelFlag: false, - dataListSelections2: [], + dataListManufacturerSelections: [], manufacturerData:{ site: this.$store.state.user.site, manufacturerID: '', manufacturerName: '' }, + operation: '', + resourceId: '', + // 单选框绑定的值 + operationCurrent: -1, + resourceCurrent: -1, + selectionManufacturer: [], + resourceModelFlag: false, + resourceData: { + site: this.$store.state.user.site, + resourceId: '', + resourceDesc: '' + }, + resourceList: [], } }, mounted () { @@ -803,27 +885,17 @@ } }) }, - // // 清空搜索栏 - // doEmpty(){ - // this.searchData = { - // codeNo: '', - // codeDesc: '', - // active:'', - // familyName:'', - // functionType:'D', - // inspectionTypeName:'', - // page: 1, - // limit: 10, - // } - // }, + chooseLevel(row){ this.tempLevelRow = row; this.getBaseList(1048); }, + chooseProgrammeRow(row){ this.tempProgrammeRow = row; this.getBaseList(1051); }, + // 获取基础数据列表S getBaseList (val,type) { this.tagNo = val @@ -843,6 +915,7 @@ } }) }, + /* 列表方法的回调 */ getBaseData (val) { if (this.tagNo === 1042) { @@ -858,6 +931,7 @@ this.tempProgrammeRow.samplingProgrammeDesc = val.sampling_programme_desc } }, + // 获取数据列表 getDataList () { this.searchData.limit = this.pageSize @@ -872,19 +946,23 @@ this.dataListLoading = false }) }, + // 每页数 sizeChangeHandle (val) { this.pageSize = val this.pageIndex = 1 this.getDataList() }, + // 当前页 currentChangeHandle (val) { this.pageIndex = val this.getDataList() }, - addModal(){ - this.modalData={ + + addModal () { + this.modalData = { + site: this.$store.state.user.site, flag: '1', familyID: '', familyName: '', @@ -897,6 +975,7 @@ this.modalDisableFlag = false; this.modalFlag = true; }, + // 删除 deletePropertiesModel (row) { this.$confirm(`是否删除这个分类属性?`, '提示', { @@ -923,6 +1002,7 @@ }).catch(() => { }) }, + saveData(){ if (this.modalData.familyID === '' || this.modalData.familyID == null) { this.$message.warning('请选择物料分类编码!') @@ -952,6 +1032,7 @@ }) } }, + // 保存属性模板 saveDetail(){ for (let i = 0; i < this.detailList.length; i++) { @@ -977,6 +1058,7 @@ }) } }, + //打开分类模板清单 detailModal(row){ this.detailData.familyID = row.familyID @@ -987,66 +1069,97 @@ }) this.detailModelFlag = true; }, + checkInspectionType(){ getPartTemplateLists(this.detailData).then(({data}) => { - this.itemList1 = data.row1; - this.itemList2 = data.row2; + this.operation = '' + this.resourceId = '' + this.operationCurrent = -1 + this.resourceCurrent = -1 + this.itemList1 = data.row1 + this.itemList2 = data.row2 }) }, + // 快速新增 addFastModal(){ this.itemSelections1 = null this.itemSelections2 = null getPartTemplateLists(this.detailData).then(({data}) => { - this.itemList1 = data.row1; - this.itemList2 = data.row2; + this.itemList1 = data.row1 + this.itemList2 = data.row2 }) this.detailData.inspectionTypeNo = this.options[0].inspectionTypeNo; this.checkInspectionType(); - this.dataListSelections = []; - this.selectionOperation = []; - this.dataListSelections2 = []; + this.operation = '' + this.resourceId = '' + this.operationCurrent = -1 + this.resourceCurrent = -1 + this.selectionManufacturer = [] + this.dataListManufacturerSelections = [] this.fastAddFlag = true; }, + // 可选项目 itemClickRow1(row){ this.$refs.itemTable1.toggleRowSelection(row); }, + // 已有项目 itemClickRow2(row){ this.$refs.itemTable2.toggleRowSelection(row); }, + selectFlag(){ return true; }, + selectionItem1(val){ this.itemSelections1 = val }, + selectionItem2(val){ this.itemSelections2 = val }, // 添加模板 - addItem(){ - if(this.itemSelections1 == null || this.itemSelections1.length == 0){ + addItem () { + if(this.itemSelections1 == null || this.itemSelections1.length === 0){ this.$message.warning('请选择可选模板!') return } + if((this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107') && (this.operation == null || this.operation === '')){ + this.$message.warning('请选择工序!') + return + } + if((this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107') && (this.resourceId == null || this.resourceId === '')){ + this.$message.warning('请选择机台!') + return + } + if((this.detailData.inspectionTypeNo === '105') && (this.selectionManufacturer == null || this.selectionManufacturer.length === 0)){ + this.$message.warning('请选择供应商!') + return + } let inData = { site: this.$store.state.user.site, attributeNo: this.detailData.familyID, itemList: this.itemSelections1, - fieldList: this.selectionOperation, + operation: this.operation, + resourceID: this.resourceId, + manufacturerList: this.selectionManufacturer, attributeType: this.detailData.attributeType, + inspectionTypeNo: this.detailData.inspectionTypeNo } savePartAttributeDetails(inData).then(({data}) => { if (data && data.code === 0) { getPartTemplateLists(this.detailData).then(({data}) => { - this.itemList1 = data.row1; - this.itemList2 = data.row2; + this.itemList1 = data.row1 + this.itemList2 = data.row2 }) - this.itemSelections1 = []; - this.selectionOperation = []; + this.itemSelections1 = [] + this.operation = '' + this.resourceId = '' + this.selectionManufacturer = [] } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' @@ -1054,6 +1167,7 @@ } }) }, + // 删除项目 deleteItem(){ if(this.itemSelections2 == null || this.itemSelections2.length === 0){ @@ -1080,12 +1194,14 @@ } }) }, + // 关闭后刷新列表 refreshDetailList(){ searchPartAttributeDetails(this.detailData).then(({data}) => { this.detailList = data.rows }) }, + // 删除物料属性中的模板 deletePartAttributeDetails(row){ this.$confirm(`是否删除这个检验模板?`, '提示', { @@ -1129,6 +1245,7 @@ } }) }, + // 收藏 OR 取消收藏 favoriteFunction() { let userFavorite = { @@ -1158,12 +1275,13 @@ }) return this.exportList; }, - startDownload() { + startDownload() { }, - finishDownload() { + finishDownload() { }, + fields() { let json = "{" this.columnList.forEach((item, index) => { @@ -1177,7 +1295,6 @@ let s = eval("(" + json + ")") return s }, - // 导出 end // 导入 qcUpload(){ @@ -1197,17 +1314,6 @@ getOperationDescList(this.operationData).then(({data}) => { if (data && data.code === 0) { this.operationList = data.rows; - // 回显数据 - // 先清空缓存选中 - this.$nextTick(() => this.$refs.operationTable.clearSelection()) - // 拿到选中的工序 - let tempDataList = this.selectionOperation - this.operationList.forEach(val => { - // 回显选中的工序 - if (tempDataList.includes(val.operationDesc)) { - this.$nextTick(() => this.$refs.operationTable.toggleRowSelection(val, true)) - } - }) this.operationModelFlag = true; } else { this.$alert(data.msg, '错误', { @@ -1216,24 +1322,40 @@ } }) }, + + // 条件查询获取工序列表 + getOperationList2(){ + getOperationDescList(this.operationData).then(({data}) => { + if (data && data.code === 0) { + this.operationList = data.rows + this.operationCurrent = -1 + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + // 点击行选中复选框 operationClickRow(row){ this.$refs.operationTable.toggleRowSelection(row); }, - // 多选 - selectionChangeHandle (val) { - this.dataListSelections = val + + // 多选工序 + selectionOperationChangeHandle (val) { + this.operation = val[0].operationDesc + if (val) { + this.operationCurrent = val.index; + } }, + + operationRowClassName ({row, rowIndex}) { + row.index = rowIndex; // 在原有的数据上加一个index + }, + // 确认多选工序 confirmOperation(){ - if(this.dataListSelections.length === 0){ - this.$message.warning('请勾选工序!') - return - } - this.selectionOperation = [] - for (let i = 0; i < this.dataListSelections.length; i++) { - this.selectionOperation.push(this.dataListSelections[i].operationDesc) - } this.operationModelFlag = false }, @@ -1245,11 +1367,11 @@ // 回显数据 // 先清空缓存选中 this.$nextTick(() => this.$refs.manufacturerTable.clearSelection()) - // 拿到选中的工序 - let tempDataList = this.selectionOperation + // 拿到选中的供应商 + let tempDataList = this.selectionManufacturer this.manufacturerList.forEach(val => { - // 回显选中的工序 - if (tempDataList.includes(val.manufacturerName)) { + // 回显选中的供应商 + if (tempDataList.includes(val.manufacturerID)) { this.$nextTick(() => this.$refs.manufacturerTable.toggleRowSelection(val, true)) } }) @@ -1261,27 +1383,75 @@ } }) }, + // 点击行选中复选框 manufacturerClickRow(row){ this.$refs.manufacturerTable.toggleRowSelection(row); }, + // 多选 - selectionChangeHandle2 (val) { - this.dataListSelections2 = val + selectionManufacturerChangeHandle (val) { + this.dataListManufacturerSelections = val }, - // 确认多选工序 + + // 确认多选供应商 confirmManufacturer(){ - if(this.dataListSelections2.length === 0){ - this.$message.warning('请勾选供应商!') - return - } - this.selectionOperation = [] - for (let i = 0; i < this.dataListSelections2.length; i++) { - this.selectionOperation.push(this.dataListSelections2[i].manufacturerName) + this.selectionManufacturer = [] + for (let i = 0; i < this.dataListManufacturerSelections.length; i++) { + this.selectionManufacturer.push(this.dataListManufacturerSelections[i].manufacturerID) } this.manufacturerModelFlag = false }, + // 获取机台列表 + getAllResourceList () { + getAllResourceList(this.resourceData).then(({data}) => { + if (data && data.code === 0) { + this.resourceList = data.rows + this.resourceModelFlag = true; + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + // 条件查询获取机台列表 + getAllResourceList2 () { + getAllResourceList(this.resourceData).then(({data}) => { + if (data && data.code === 0) { + this.resourceList = data.rows + this.resourceCurrent = -1 + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 点击行选中机台复选框 + resourceClickRow (row) { + this.$refs.resourceTable.toggleRowSelection(row); + }, + + // 多选机台 + selectionResourceChangeHandle (val) { + this.resourceId = val[0].resourceId + if (val) { + this.resourceCurrent = val.index; + } + }, + + resourceRowClassName ({row, rowIndex}) { + row.index = rowIndex; // 在原有的数据上加一个index + }, + + // 确认选择工序 + confirmResource () { + this.resourceModelFlag = false + }, + } } diff --git a/src/views/modules/qc/qcPartAttribute.vue b/src/views/modules/qc/qcPartAttribute.vue index 14596a2..ed53cb6 100644 --- a/src/views/modules/qc/qcPartAttribute.vue +++ b/src/views/modules/qc/qcPartAttribute.vue @@ -18,7 +18,6 @@ - 查询 新增 @@ -101,7 +100,7 @@ layout="total, sizes, prev, pager, next, jumper"> - + @@ -112,30 +111,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -192,15 +167,27 @@ :min-width="item.columnWidth" :label="item.columnLabel">
+ label="工序"> + + + + - + - + @@ -311,6 +298,13 @@ 查询 + + 工序 + 供应商 + + + 机台 +
@@ -357,13 +351,7 @@ -
- 工序 -
-
- 供应商 -
-
+
添加>>
@@ -402,10 +390,22 @@ label="模板名称"> + label="工序"> + + + + - + - 查询 + 查询 - + + 确认 - 关闭 + + + + + +
+ + + + + + + + + 查询 + + + + + + + + + + + +
+ + 确认
@@ -467,10 +513,10 @@
- + - + 查询 @@ -481,7 +527,7 @@ :data="manufacturerList" ref="manufacturerTable" @row-click="manufacturerClickRow" - @selection-change="selectionChangeHandle2" + @selection-change="selectionManufacturerChangeHandle" border v-loading="dataListLoading" style="width: 100%;"> @@ -513,6 +559,7 @@ +
@@ -531,7 +578,8 @@ getPartTemplateLists, // 获取模板列表 InspectionTypeSearch, // 搜索所有检验类型 getOperationDescList, // 查询工序列表 - getManufacturerList // 查询供应商列表 + getManufacturerList, // 查询供应商列表 + getAllResourceList // 查询机台列表 } from "@/api/qc/qc.js" import Chooselist from '@/views/modules/common/Chooselist_eam' import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' @@ -554,6 +602,7 @@ // 导出 end tagNo: '', searchData: { + site: this.$store.state.user.site, partNo: '', partDesc: '', familyID: '', @@ -564,7 +613,7 @@ }, height: 200, pageIndex: 1, - pageSize: 100, + pageSize: 50, totalPage: 0, modalFlag: false, modalDisableFlag: false, @@ -643,7 +692,7 @@ fixed: '', }, { - columnProp: 'supplierNo', + columnProp: 'supplierDesc', headerAlign: "center", align: "center", columnLabel: '供应商', @@ -795,60 +844,37 @@ message: ' ', trigger: 'change' } - ], - // supplierNoType:[ - // { - // required: true, - // message: ' ', - // trigger: 'change' - // } - // ], - // supplierDescType:[ - // { - // required: true, - // message: ' ', - // trigger: 'change' - // } - // ], - // operationType:[ - // { - // required: true, - // message: ' ', - // trigger: 'change' - // } - // ], - // resourceIdType:[ - // { - // required: true, - // message: ' ', - // trigger: 'change' - // } - // ], - // resourceDescType:[ - // { - // required: true, - // message: ' ', - // trigger: 'change' - // } - // ], + ] }, // 工序 operationList: [], + resourceList: [], operationModelFlag: false, - dataListSelections: [], + resourceModelFlag: false, + dataListOperationSelections: [], operationData:{ operationDesc: '' }, - selectionOperation: [], + resourceData: { + site: this.$store.state.user.site, + resourceId: '', + resourceDesc: '' + }, + operation: '', + resourceId: '', + selectionManufacturer: [], // 供应商 manufacturerList: [], manufacturerModelFlag: false, - dataListSelections2: [], + dataListManufacturerSelections: [], manufacturerData:{ site: this.$store.state.user.site, manufacturerID: '', manufacturerName: '' }, + // 单选框绑定的值 + operationCurrent: -1, + resourceCurrent: -1 } }, mounted () { @@ -913,18 +939,6 @@ } }) }, - // // 清空搜索栏 - // doEmpty(){ - // this.searchData = { - // partNo: '', - // partDesc: '', - // familyID: '', - // familyName: '', - // attributeType: 'A', - // page: 1, - // limit: 10, - // } - // }, chooseLevel(row){ this.tempLevelRow = row; this.getBaseList(1048); @@ -1002,6 +1016,7 @@ }, addModal(){ this.modalData = { + site: this.$store.state.user.site, flag: '1', partNo: '', partDesc: '', @@ -1101,7 +1116,7 @@ }, //打开物料模板清单 - detailModal(row){ + detailModal (row) { this.detailData.partNo = row.partNo this.detailData.attributeNo = row.partNo this.detailData.partDesc = row.partDesc @@ -1113,6 +1128,8 @@ checkInspectionType(){ getPartTemplateLists(this.detailData).then(({data}) => { + this.operation = '' + this.resourceId = '' this.itemList1 = data.row1; this.itemList2 = data.row2; }) @@ -1123,15 +1140,19 @@ this.itemSelections1 = null this.itemSelections2 = null getPartTemplateLists(this.detailData).then(({data}) => { - this.itemList1 = data.row1; - this.itemList2 = data.row2; + this.itemList1 = data.row1 + this.itemList2 = data.row2 }) - this.detailData.inspectionTypeNo = this.options[0].inspectionTypeNo; - this.checkInspectionType(); - this.dataListSelections = []; - this.selectionOperation = []; - this.dataListSelections2 = []; - this.fastAddFlag = true; + this.detailData.inspectionTypeNo = this.options[0].inspectionTypeNo + this.checkInspectionType() + this.dataListOperationSelections = [] + this.operation = '' + this.resourceId = '' + this.operationCurrent = -1 + this.resourceCurrent = -1 + this.selectionManufacturer = [] + this.dataListManufacturerSelections = [] + this.fastAddFlag = true }, // 可选项目 itemClickRow1(row){ @@ -1157,12 +1178,27 @@ this.$message.warning('请选择可选模板!') return } + if((this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107') && (this.operation == null || this.operation === '')){ + this.$message.warning('请选择工序!') + return + } + if((this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107') && (this.resourceId == null || this.resourceId === '')){ + this.$message.warning('请选择机台!') + return + } + if((this.detailData.inspectionTypeNo === '105') && (this.selectionManufacturer == null || this.selectionManufacturer.length === 0)){ + this.$message.warning('请选择供应商!') + return + } let inData = { site: this.$store.state.user.site, attributeNo: this.detailData.partNo, itemList: this.itemSelections1, - fieldList: this.selectionOperation, + operation: this.operation, + resourceID: this.resourceId, + manufacturerList: this.selectionManufacturer, attributeType: this.detailData.attributeType, + inspectionTypeNo: this.detailData.inspectionTypeNo } savePartAttributeDetails(inData).then(({data}) => { if (data && data.code === 0) { @@ -1171,7 +1207,9 @@ this.itemList2 = data.row2; }) this.itemSelections1 = [] - this.selectionOperation = [] + this.operation = '' + this.resourceId = '' + this.selectionManufacturer = [] } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' @@ -1322,17 +1360,17 @@ getOperationDescList(this.operationData).then(({data}) => { if (data && data.code === 0) { this.operationList = data.rows; - // 回显数据 - // 先清空缓存选中 - this.$nextTick(() => this.$refs.operationTable.clearSelection()) - // 拿到选中的工序 - let tempDataList = this.selectionOperation - this.operationList.forEach(val => { - // 回显选中的工序 - if (tempDataList.includes(val.operationDesc)) { - this.$nextTick(() => this.$refs.operationTable.toggleRowSelection(val, true)) - } - }) + // // 回显数据 + // // 先清空缓存选中 + // this.$nextTick(() => this.$refs.operationTable.clearSelection()) + // // 拿到选中的工序 + // let tempDataList = this.operationDesc + // this.operationList.forEach(val => { + // // 回显选中的工序 + // if (tempDataList === val.operationDesc) { + // this.$nextTick(() => this.$refs.operationTable.toggleRowSelection(val, true)) + // } + // }) this.operationModelFlag = true; } else { this.$alert(data.msg, '错误', { @@ -1341,27 +1379,91 @@ } }) }, - // 点击行选中复选框 - operationClickRow(row){ + // 获取机台列表 + getAllResourceList () { + getAllResourceList(this.resourceData).then(({data}) => { + if (data && data.code === 0) { + this.resourceList = data.rows + this.resourceModelFlag = true; + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + // 条件查询获取工序列表 + getOperationList2(){ + getOperationDescList(this.operationData).then(({data}) => { + if (data && data.code === 0) { + this.operationList = data.rows + this.operationCurrent = -1 + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + // 条件查询获取机台列表 + getAllResourceList2 () { + getAllResourceList(this.resourceData).then(({data}) => { + if (data && data.code === 0) { + this.resourceList = data.rows + this.resourceCurrent = -1 + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + // 点击行选中工序复选框 + operationClickRow (row) { this.$refs.operationTable.toggleRowSelection(row); }, - // 多选 - selectionChangeHandle (val) { - this.dataListSelections = val + // 点击行选中机台复选框 + resourceClickRow (row) { + this.$refs.resourceTable.toggleRowSelection(row); }, - // 确认多选工序 - confirmOperation(){ - if(this.dataListSelections.length === 0){ - this.$message.warning('请勾选工序!') - return + // 多选工序 + selectionOperationChangeHandle (val) { + this.operation = val[0].operationDesc + if (val) { + this.operationCurrent = val.index; } - this.selectionOperation = [] - for (let i = 0; i < this.dataListSelections.length; i++) { - this.selectionOperation.push(this.dataListSelections[i].operationDesc) + }, + // 多选机台 + selectionResourceChangeHandle (val) { + this.resourceId = val[0].resourceId + if (val) { + this.resourceCurrent = val.index; } + }, + operationRowClassName ({row, rowIndex}) { + row.index = rowIndex; // 在原有的数据上加一个index + }, + resourceRowClassName ({row, rowIndex}) { + row.index = rowIndex; // 在原有的数据上加一个index + }, + // // 单选 + // clickChange (row) { + // this.radioOperation = row.operationDesc + // }, + // 确认选择工序 + confirmOperation () { + //this.operationDesc = '' + // this.operationDesc = this.radioOperation + // this.radioOperation = '' + // for (let i = 0; i < this.dataListOperationSelections.length; i++) { + // this.selectionOperation.push(this.dataListOperationSelections[i].operationDesc) + // } this.operationModelFlag = false }, - + // 确认选择工序 + confirmResource () { + this.resourceModelFlag = false + }, // 获取供应商列表 getManufacturerList(){ getManufacturerList(this.manufacturerData).then(({data}) => { @@ -1370,11 +1472,11 @@ // 回显数据 // 先清空缓存选中 this.$nextTick(() => this.$refs.manufacturerTable.clearSelection()) - // 拿到选中的工序 - let tempDataList = this.selectionOperation + // 拿到选中的供应商 + let tempDataList = this.selectionManufacturer this.manufacturerList.forEach(val => { - // 回显选中的工序 - if (tempDataList.includes(val.manufacturerName)) { + // 回显选中的供应商 + if (tempDataList.includes(val.manufacturerID)) { this.$nextTick(() => this.$refs.manufacturerTable.toggleRowSelection(val, true)) } }) @@ -1391,23 +1493,17 @@ this.$refs.manufacturerTable.toggleRowSelection(row); }, // 多选 - selectionChangeHandle2 (val) { - this.dataListSelections2 = val + selectionManufacturerChangeHandle (val) { + this.dataListManufacturerSelections = val }, - // 确认多选工序 + // 确认多选供应商 confirmManufacturer(){ - if(this.dataListSelections2.length === 0){ - this.$message.warning('请勾选供应商!') - return - } - this.selectionOperation = [] - for (let i = 0; i < this.dataListSelections2.length; i++) { - this.selectionOperation.push(this.dataListSelections2[i].manufacturerName) + this.selectionManufacturer = [] + for (let i = 0; i < this.dataListManufacturerSelections.length; i++) { + this.selectionManufacturer.push(this.dataListManufacturerSelections[i].manufacturerID) } this.manufacturerModelFlag = false - }, - - + } } } diff --git a/src/views/modules/qc/qc_FAI_upload_file.vue b/src/views/modules/qc/qc_FAI_upload_file.vue index b43a788..9495228 100644 --- a/src/views/modules/qc/qc_FAI_upload_file.vue +++ b/src/views/modules/qc/qc_FAI_upload_file.vue @@ -1,6 +1,6 @@