diff --git a/src/views/modules/eam/com_eam_object_upload_file.vue b/src/views/modules/eam/com_eam_object_upload_file.vue index 764e73c..e22a162 100644 --- a/src/views/modules/eam/com_eam_object_upload_file.vue +++ b/src/views/modules/eam/com_eam_object_upload_file.vue @@ -24,9 +24,8 @@ - @@ -44,7 +43,7 @@ - 保存 + 保存 关闭 @@ -99,13 +98,15 @@ export default { }, // 选择上传文件时 - onChange (file) { - this.fileList.push(file) + onChange (file, fileList) { + this.fileList = fileList }, // 关闭modal closeDialog () { this.fileList = [] + // 清空文件上传记录 + this.$refs.uploadFile.clearFiles() //刷新报工的页面 this.$emit('refreshPageTables') //关闭当前的页面 @@ -126,7 +127,9 @@ export default { } const formData = new FormData() // 片接文件 - formData.append("file", this.fileList[0].raw) + for (let i = 0; i < this.fileList.length; i++) { + formData.append("file",this.fileList[i].raw) + } formData.append("folder", this.folder) formData.append("site", this.pageData.site) formData.append("objectID", this.pageData.objectID) @@ -149,6 +152,5 @@ export default { - diff --git a/src/views/modules/qc/FAIResultEntry.vue b/src/views/modules/qc/FAIResultEntry.vue index 089a40d..ffb3b7a 100644 --- a/src/views/modules/qc/FAIResultEntry.vue +++ b/src/views/modules/qc/FAIResultEntry.vue @@ -517,7 +517,8 @@ - 保存 + 应用 + 保存 关闭 @@ -1601,7 +1602,8 @@ operatorName: '', responsiblePerson: '', responsiblePersonName: '', - subDetailList: [] + subDetailList: [], + type: '' }, detailColumnList: [ { @@ -3409,31 +3411,33 @@ }) }, - Transfer () { - if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) { - this.$message.warning('请选择检验结论!') - return - } - if (this.detailData.inspectionResult === '不合格' && (this.detailData.disposalMeasures == null || this.detailData.disposalMeasures === '')) { - this.$message.warning('请选择处置措施!') - return - } - if (this.detailList.length > 0 && this.detailData.inspectionResult === '不合格') { - const flag = this.detailList.some(item => item.itemResult === 'N') - if (!flag) { - this.$message.warning('请选择不合格项目!') + Transfer (type) { + if (type === '2') { + if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) { + this.$message.warning('请选择检验结论!') return } + if (this.detailData.inspectionResult === '不合格' && (this.detailData.disposalMeasures == null || this.detailData.disposalMeasures === '')) { + this.$message.warning('请选择处置措施!') + return + } + if (this.detailList.length > 0 && this.detailData.inspectionResult === '不合格') { + const flag = this.detailList.some(item => item.itemResult === 'N') + if (!flag) { + this.$message.warning('请选择不合格项目!') + return + } + } + if (this.detailData.inspectionResult !== '不合格') { + this.detailData.disposalMeasures = '' + this.detailData.disposalRemark = '' + } } - if (this.detailData.inspectionResult !== '不合格') { - this.detailData.disposalMeasures = '' - this.detailData.disposalRemark = '' - } - this.saveDetailInformation() + this.saveDetailInformation(type) }, // 新增明细信息 - saveDetailInformation () { + saveDetailInformation (type) { this.saveInformationData.site = this.detailData.site this.saveInformationData.buNo = this.detailData.buNo this.saveInformationData.inspectionNo = this.detailData.inspectionNo @@ -3450,6 +3454,7 @@ this.saveInformationData.operator = this.detailData.operator this.saveInformationData.responsiblePerson = this.detailData.responsiblePerson this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList)) + this.saveInformationData.type = type // this.saveInformationData.subDetailList = this.acquisitionList saveFAIDetailedRecord(this.saveInformationData).then(({data}) => { if (data && data.code === 0) { diff --git a/src/views/modules/qc/FQCResultEntry.vue b/src/views/modules/qc/FQCResultEntry.vue index 845747b..03e0afe 100644 --- a/src/views/modules/qc/FQCResultEntry.vue +++ b/src/views/modules/qc/FQCResultEntry.vue @@ -502,7 +502,8 @@ - 保存 + 应用 + 保存 关闭 @@ -1576,7 +1577,8 @@ operatorName: '', responsiblePerson: '', responsiblePersonName: '', - subDetailList: [] + subDetailList: [], + type: '' }, detailColumnList: [ { @@ -3383,31 +3385,33 @@ }) }, - Transfer () { - if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) { - this.$message.warning('请选择检验结论!') - return - } - if (this.detailData.inspectionResult === '不合格' && (this.detailData.disposalMeasures == null || this.detailData.disposalMeasures === '')) { - this.$message.warning('请选择处置措施!') - return - } - if (this.detailList.length > 0 && this.detailData.inspectionResult === '不合格') { - const flag = this.detailList.some(item => item.itemResult === 'N') - if (!flag) { - this.$message.warning('请选择不合格项目!') + Transfer (type) { + if (type === '2') { + if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) { + this.$message.warning('请选择检验结论!') return } + if (this.detailData.inspectionResult === '不合格' && (this.detailData.disposalMeasures == null || this.detailData.disposalMeasures === '')) { + this.$message.warning('请选择处置措施!') + return + } + if (this.detailList.length > 0 && this.detailData.inspectionResult === '不合格') { + const flag = this.detailList.some(item => item.itemResult === 'N') + if (!flag) { + this.$message.warning('请选择不合格项目!') + return + } + } + if (this.detailData.inspectionResult !== '不合格') { + this.detailData.disposalMeasures = '' + this.detailData.disposalRemark = '' + } } - if (this.detailData.inspectionResult !== '不合格') { - this.detailData.disposalMeasures = '' - this.detailData.disposalRemark = '' - } - this.saveDetailInformation() + this.saveDetailInformation(type) }, // 新增明细信息 - saveDetailInformation () { + saveDetailInformation (type) { this.saveInformationData.site = this.detailData.site this.saveInformationData.buNo = this.detailData.buNo this.saveInformationData.inspectionNo = this.detailData.inspectionNo @@ -3424,6 +3428,7 @@ this.saveInformationData.operator = this.detailData.operator this.saveInformationData.responsiblePerson = this.detailData.responsiblePerson this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList)) + this.saveInformationData.type = type // this.saveInformationData.subDetailList = this.acquisitionList saveFQCDetailedRecord(this.saveInformationData).then(({data}) => { if (data && data.code === 0) { diff --git a/src/views/modules/qc/IPQCResultEntry.vue b/src/views/modules/qc/IPQCResultEntry.vue index 28d8efc..06575d0 100644 --- a/src/views/modules/qc/IPQCResultEntry.vue +++ b/src/views/modules/qc/IPQCResultEntry.vue @@ -515,7 +515,8 @@ - 保存 + 应用 + 保存 关闭 @@ -1627,7 +1628,8 @@ operatorName: '', responsiblePerson: '', responsiblePersonName: '', - subDetailList: [] + subDetailList: [], + type: '' }, detailColumnList: [ { @@ -3450,36 +3452,33 @@ }) }, - Transfer () { - if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) { - this.$message.warning('请选择检验结论!') - return - } - // for (let i = 0; i < this.detailList.length; i++) { - // if(this.detailList[i].itemResult === '' || this.detailList[i].itemResult == null){ - // this.detailList[i].itemResult = 'Y' - // } - // } - if (this.detailData.inspectionResult === '不合格' && (this.detailData.disposalMeasures == null || this.detailData.disposalMeasures === '')) { - this.$message.warning('请选择处置措施!') - return - } - if (this.detailList.length > 0 && this.detailData.inspectionResult === '不合格') { - const flag = this.detailList.some(item => item.itemResult === 'N') - if (!flag) { - this.$message.warning('请选择不合格项目!') + Transfer (type) { + if (type === '2') { + if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) { + this.$message.warning('请选择检验结论!') return } + if (this.detailData.inspectionResult === '不合格' && (this.detailData.disposalMeasures == null || this.detailData.disposalMeasures === '')) { + this.$message.warning('请选择处置措施!') + return + } + if (this.detailList.length > 0 && this.detailData.inspectionResult === '不合格') { + const flag = this.detailList.some(item => item.itemResult === 'N') + if (!flag) { + this.$message.warning('请选择不合格项目!') + return + } + } + if (this.detailData.inspectionResult !== '不合格') { + this.detailData.disposalMeasures = '' + this.detailData.disposalRemark = '' + } } - if (this.detailData.inspectionResult !== '不合格') { - this.detailData.disposalMeasures = '' - this.detailData.disposalRemark = '' - } - this.saveDetailInformation() + this.saveDetailInformation(type) }, // 新增明细信息 - saveDetailInformation () { + saveDetailInformation (type) { this.saveInformationData.site = this.detailData.site this.saveInformationData.buNo = this.detailData.buNo this.saveInformationData.inspectionNo = this.detailData.inspectionNo @@ -3496,6 +3495,7 @@ this.saveInformationData.operator = this.detailData.operator this.saveInformationData.responsiblePerson = this.detailData.responsiblePerson this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList)) + this.saveInformationData.type = type // this.saveInformationData.subDetailList = this.acquisitionList saveIPQCDetailedRecord(this.saveInformationData).then(({data}) => { if (data && data.code === 0) { diff --git a/src/views/modules/qc/IQCResultEntry.vue b/src/views/modules/qc/IQCResultEntry.vue index 73dc22b..61e72c2 100644 --- a/src/views/modules/qc/IQCResultEntry.vue +++ b/src/views/modules/qc/IQCResultEntry.vue @@ -394,7 +394,8 @@ - 保存 + 应用 + 保存 关闭 @@ -1610,7 +1611,8 @@ operatorName: '', responsiblePerson: '', responsiblePersonName: '', - subDetailList: [] + subDetailList: [], + type: '' }, // 子明细数据对象 tableData: [], @@ -2298,31 +2300,33 @@ }) }, - async Transfer () { - if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) { - this.$message.warning('请选择检验结论!') - return - } - if (this.detailData.inspectionResult === '不合格' && (this.detailData.disposalMeasures == null || this.detailData.disposalMeasures === '')) { - this.$message.warning('请选择处置措施!') - return - } - if (this.detailList.length > 0 && this.detailData.inspectionResult === '不合格') { - const flag = this.detailList.some(item => item.itemResult === 'N') - if (!flag) { - this.$message.warning('请选择不合格项目!') + async Transfer (type) { + if (type === '2') { + if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) { + this.$message.warning('请选择检验结论!') return } + if (this.detailData.inspectionResult === '不合格' && (this.detailData.disposalMeasures == null || this.detailData.disposalMeasures === '')) { + this.$message.warning('请选择处置措施!') + return + } + if (this.detailList.length > 0 && this.detailData.inspectionResult === '不合格') { + const flag = this.detailList.some(item => item.itemResult === 'N') + if (!flag) { + this.$message.warning('请选择不合格项目!') + return + } + } + if (this.detailData.inspectionResult !== '不合格') { + this.detailData.disposalMeasures = '' + this.detailData.disposalRemark = '' + } } - if (this.detailData.inspectionResult !== '不合格') { - this.detailData.disposalMeasures = '' - this.detailData.disposalRemark = '' - } - this.saveDetailInformation() + this.saveDetailInformation(type) }, // 新增明细信息 - saveDetailInformation () { + saveDetailInformation (type) { this.saveInformationData.site = this.detailData.site this.saveInformationData.buNo = this.detailData.buNo this.saveInformationData.inspectionNo = this.detailData.inspectionNo @@ -2342,6 +2346,7 @@ this.saveInformationData.operator = this.detailData.operator this.saveInformationData.responsiblePerson = this.detailData.responsiblePerson this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList)) + this.saveInformationData.type = type // this.saveInformationData.subDetailList = this.acquisitionList saveIQCDetailedRecord(this.saveInformationData).then(({data}) => { if (data && data.code === 0) { diff --git a/src/views/modules/qc/com_qc_itemImage_upload_file.vue b/src/views/modules/qc/com_qc_itemImage_upload_file.vue index effb5a4..e9f8828 100644 --- a/src/views/modules/qc/com_qc_itemImage_upload_file.vue +++ b/src/views/modules/qc/com_qc_itemImage_upload_file.vue @@ -28,8 +28,8 @@ - @@ -40,7 +40,7 @@ - 保存 + 保存 关闭 @@ -108,14 +108,18 @@ export default { } }, // 选择上传文件时 - onChange (file) { - this.fileList.push(file) + onChange (file, fileList) { + console.log(fileList) + this.fileList = fileList + //this.fileList.push(file) }, // 关闭modal closeDialog () { this.fileList = [] + // 清空文件上传记录 + this.$refs.uploadFile.clearFiles() // 刷新报工的页面 - this.$emit('refreshPageTables2') + //this.$emit('refreshPageTables2') // 关闭当前的页面 this.visible = false }, @@ -129,7 +133,10 @@ export default { } const formData = new FormData() // 片接文件 - formData.append("file", this.fileList[0].raw) + for (let i = 0; i < this.fileList.length; i++) { + formData.append("file",this.fileList[i].raw) + } + //formData.append("file", this.fileList[0].raw) formData.append("site", this.pageData.site) formData.append("folder", this.pageData.folder) formData.append("objectID", this.pageData.inspectionNo) @@ -175,8 +182,10 @@ export default { **/ handleDialogClose () { this.fileList = [] + // 清空文件上传记录 + this.$refs.uploadFile.clearFiles() // 刷新报工的页面 - this.$emit('refreshPageTables2') + //this.$emit('refreshPageTables2') } }, } diff --git a/src/views/modules/qc/qc_FAI_upload_file.vue b/src/views/modules/qc/qc_FAI_upload_file.vue index f7f256a..93a3572 100644 --- a/src/views/modules/qc/qc_FAI_upload_file.vue +++ b/src/views/modules/qc/qc_FAI_upload_file.vue @@ -11,8 +11,8 @@ - @@ -32,7 +32,7 @@ - 保存 + 保存 关闭 @@ -86,12 +86,14 @@ export default { // this.num++ }, // 选择上传文件时 - onChange (file) { - this.fileList.push(file) + onChange (file, fileList) { + this.fileList = fileList }, // 关闭modal closeDialog () { this.fileList = [] + // 清空文件上传记录 + this.$refs.uploadFile.clearFiles() // 刷新报工的页面 this.$emit('refreshPageTables') //关闭当前的页面 @@ -110,7 +112,9 @@ export default { } const formData = new FormData() // 片接文件 - formData.append("file", this.fileList[0].raw) + for (let i = 0; i < this.fileList.length; i++) { + formData.append("file",this.fileList[i].raw) + } formData.append("folder", this.folder) formData.append("site", this.pageData.site) formData.append("objectID", this.pageData.inspectionNo) diff --git a/src/views/modules/reportWorkOrder/com_eam_itemImage_upload_file.vue b/src/views/modules/reportWorkOrder/com_eam_itemImage_upload_file.vue index 614e37d..536202c 100644 --- a/src/views/modules/reportWorkOrder/com_eam_itemImage_upload_file.vue +++ b/src/views/modules/reportWorkOrder/com_eam_itemImage_upload_file.vue @@ -28,8 +28,8 @@ - @@ -40,7 +40,7 @@ - 保存 + 保存 关闭 @@ -110,12 +110,14 @@ export default { this.num++ }, /*选择上传文件时*/ - onChange (file) { - this.fileList.push(file); + onChange (file, fileList) { + this.fileList = fileList }, /*关闭modal*/ closeDialog () { this.fileList = [] + // 清空文件上传记录 + this.$refs.uploadFile.clearFiles() // 刷新报工的页面 // this.$emit('refreshPageTables') // 关闭当前的页面 @@ -131,7 +133,9 @@ export default { } const formData = new FormData() //片接文件 - formData.append("file", this.fileList[0].raw) + for (let i = 0; i < this.fileList.length; i++) { + formData.append("file",this.fileList[i].raw) + } formData.append("site", this.pageData.site) formData.append("folder", this.pageData.folder) formData.append("objectID", this.pageData.orderNo) @@ -170,15 +174,6 @@ export default { }).catch(() => { }) }, - - /** - * 点击 X 关闭对话框的回调 - **/ - handleDialogClose () { - this.fileList = [] - // 刷新报工的页面 - // this.$emit('refreshPageTables') - } } }