diff --git a/src/views/modules/eam/com_project_proof_record.vue b/src/views/modules/eam/com_project_proof_record.vue index ef9f231..b4490b5 100644 --- a/src/views/modules/eam/com_project_proof_record.vue +++ b/src/views/modules/eam/com_project_proof_record.vue @@ -557,8 +557,6 @@ @@ -659,6 +657,7 @@ import {EventBus} from "../../../main"; import {getSiteAndBuByUserName} from "../../../api/qc/qc"; import {updateColumnSize} from "../../../api/table"; + import {uploadFileList} from '@/api/base/baseFunction.js'; export default { props: { // 增加一个 prop 用于区分是否在模态框中展示 @@ -1397,18 +1396,7 @@ this.documentSelection = val }, selectionCopyDocument(selection) { - if (selection.length > 1) { - // 只保留最后选择的那一行 - const lastRow = selection[selection.length - 1]; - // 清除所有选择 - this.$refs.copyDocumentTable.clearSelection(); - // 选中最后一次选择的那一行 - this.$refs.copyDocumentTable.toggleRowSelection(lastRow, true); - // 如有需要,可以将选中行存储到一个 data 变量中 - this.documentCopySelection = [lastRow]; - } else { this.documentCopySelection = selection; - } }, //初始化组件的参数 init(inData,authUpdate) { @@ -2109,7 +2097,6 @@ partDesc: this.searchData.partDesc, }; this.copyDialog = true - console.log(this.copyModalData) }, searchCopyDocumentFileList() { getCopyDocumentFileList(this.copyModalData).then(({data}) => { @@ -2127,12 +2114,6 @@ type: 'error' }) return - } else if (this.documentCopySelection.length > 1) { - this.$message({ - message: '只能选择一个文档', - type: 'error' - }) - return } if (this.copyModalData.conclusion === '' || this.copyModalData.conclusion === null || this.copyModalData.conclusion === undefined) { @@ -2142,34 +2123,39 @@ }) return } - const inData = { - site: this.$store.state.user.site, - ossId: this.documentCopySelection[0].ossId, - proofingId: this.copyModalData.proofingId, - projectId: this.copyModalData.projectId, - projectPartId: this.copyModalData.projectPartId, - documentDefinitionListId: this.copyModalData.documentDefinitionListId, - conclusion: this.copyModalData.conclusion, - createBy: this.$store.state.user.name, + const inDataList = this.documentCopySelection.map(item => ({ + ossId: item.ossId, + orderRef1: this.$store.state.user.site, + orderRef2: this.copyModalData.proofingId.toString(), + orderRef3: this.copyModalData.documentDefinitionListId, + orderRef4: this.copyModalData.projectId.toString(), + orderRef5: this.copyModalData.projectPartId.toString(), + documentDesc: this.copyModalData.documentTypeId, + cAdditionalInfo: this.copyModalData.documentType, + conclusion: this.copyModalData.conclusion, + createBy: this.$store.state.user.name, + folder: (this.copyModalData.proofingId === -1) + ? 'projectPMPDocumentFiles' + : 'projectPPDocumentFiles' + })); + uploadFileList('/upload/testList',inDataList).then(({data}) => { + //区分请求成功和失败的状况 + if (data && data.code === 0) { + this.$message({ + message: '复制成功', + type: 'success' + }) + this.getProofDocument() + this.copyDialog = false + //刷新表格 + this.refreshCurrentTabTable() + } else { + this.$message({ + message: '复制失败', + type: 'error' + }) } - copyDocumentFileToDoc(inData).then(({data}) => { - //区分请求成功和失败的状况 - if (data && data.code === 0) { - this.$message({ - message: '复制成功', - type: 'success' - }) - this.getProofDocument() - this.copyDialog = false - //刷新表格 - this.refreshCurrentTabTable() - } else { - this.$message({ - message: '复制失败', - type: 'error' - }) - } - }) + }) }, closeCopyDocumentFileFlag() { this.copyDialog = false diff --git a/src/views/modules/eam/eamProjectInfoForUploads.vue b/src/views/modules/eam/eamProjectInfoForUploads.vue index b772379..47f910b 100644 --- a/src/views/modules/eam/eamProjectInfoForUploads.vue +++ b/src/views/modules/eam/eamProjectInfoForUploads.vue @@ -290,8 +290,6 @@ @@ -380,6 +378,7 @@ import {removeUserFavorite, saveUserFavorite, userFavoriteList} from "../../../a import {getTableDefaultListLanguage, getTableUserListLanguage, updateColumnSize} from "../../../api/table"; import {EventBus} from "../../../main"; import UploadFileList1 from "../common/uploadFileList1.vue"; +import {uploadFileList} from '@/api/base/baseFunction.js'; export default { components: {UploadFileList1}, @@ -2921,12 +2920,6 @@ export default { type: 'error' }) return - } else if (this.documentCopySelection.length > 1) { - this.$message({ - message: '只能选择一个文档', - type: 'error' - }) - return } if (this.copyModalData.proofingNo === '*'){ this.copyModalData.conclusion = 'N/A' @@ -2939,25 +2932,32 @@ export default { }) return } - const inData = { - site: this.$store.state.user.site, - ossId: this.documentCopySelection[0].ossId, - proofingId: this.copyModalData.proofingId, - projectId: this.copyModalData.projectId, - projectPartId: this.copyModalData.projectPartId, - documentDefinitionListId: this.copyModalData.documentDefinitionListId, + const inDataList = this.documentCopySelection.map(item => ({ + ossId: item.ossId, + orderRef1: this.$store.state.user.site, + orderRef2: this.copyModalData.proofingId.toString(), + orderRef3: this.copyModalData.documentDefinitionListId, + orderRef4: this.copyModalData.projectId.toString(), + orderRef5: this.copyModalData.projectPartId.toString(), + documentDesc: this.copyModalData.documentTypeId, + cAdditionalInfo: this.copyModalData.documentType, conclusion: this.copyModalData.conclusion, createBy: this.$store.state.user.name, - } - copyDocumentFileToDoc(inData).then(({data}) => { + folder: (this.copyModalData.proofingId === -1) + ? 'projectPMPDocumentFiles' + : 'projectPPDocumentFiles' + })); + uploadFileList('/upload/testList',inDataList).then(({data}) => { //区分请求成功和失败的状况 if (data && data.code === 0) { this.$message({ message: '复制成功', type: 'success' }) - this.getDataList() - this.closeCopyDocumentFileFlag() + this.getProofDocument() + this.copyDialog = false + //刷新表格 + this.refreshCurrentTabTable() } else { this.$message({ message: '复制失败', @@ -2973,18 +2973,7 @@ export default { }, selectionCopyDocument(selection) { - if (selection.length > 1) { - // 只保留最后选择的那一行 - const lastRow = selection[selection.length - 1]; - // 清除所有选择 - this.$refs.copyDocumentTable.clearSelection(); - // 选中最后一次选择的那一行 - this.$refs.copyDocumentTable.toggleRowSelection(lastRow, true); - // 如有需要,可以将选中行存储到一个 data 变量中 - this.documentCopySelection = [lastRow]; - } else { this.documentCopySelection = selection; - } }, // 每页数 diff --git a/src/views/modules/eam/eamProjectPartInfo.vue b/src/views/modules/eam/eamProjectPartInfo.vue index 77842dd..e5e8f9d 100644 --- a/src/views/modules/eam/eamProjectPartInfo.vue +++ b/src/views/modules/eam/eamProjectPartInfo.vue @@ -1599,8 +1599,6 @@ @@ -1755,6 +1753,7 @@ import {downLoadObjectFile2} from "../../../api/eam/eam_object_list"; import {EventBus} from "../../../main"; import {arrayToTreeByLevelCode} from "../../../utils/arrayToTreeByLevelCode"; import {updateColumnSize} from "../../../api/table"; +import {uploadFileList} from '@/api/base/baseFunction.js'; /*打样记录組件*/ export default { @@ -5337,19 +5336,8 @@ import {updateColumnSize} from "../../../api/table"; selectionProjectDocument(val) { this.projectDocumentSelection = val }, - selectionCopyDocument(selection) { - if (selection.length > 1) { - // 只保留最后选择的那一行 - const lastRow = selection[selection.length - 1]; - // 清除所有选择 - this.$refs.copyDocumentTable.clearSelection(); - // 选中最后一次选择的那一行 - this.$refs.copyDocumentTable.toggleRowSelection(lastRow, true); - // 如有需要,可以将选中行存储到一个 data 变量中 - this.documentCopySelection = [lastRow]; - } else { - this.documentCopySelection = selection; - } + selectionCopyDocument(val) { + this.documentCopySelection = val; }, saveSelectionProjectDocumentType() { if (this.projectDocumentSelection.length === 0) { @@ -6228,12 +6216,6 @@ import {updateColumnSize} from "../../../api/table"; type: 'error' }) return - } else if (this.documentCopySelection.length > 1) { - this.$message({ - message: '只能选择一个文档', - type: 'error' - }) - return } if (this.copyModalData.proofingNo === '*'){ this.copyModalData.conclusion = 'N/A' @@ -6246,17 +6228,22 @@ import {updateColumnSize} from "../../../api/table"; }) return } - const inData = { - site: this.$store.state.user.site, - ossId: this.documentCopySelection[0].ossId, - proofingId: this.copyModalData.proofingId, - projectId: this.copyModalData.projectId, - projectPartId: this.copyModalData.projectPartId, - documentDefinitionListId: this.copyModalData.documentDefinitionListId, + const inDataList = this.documentCopySelection.map(item => ({ + ossId: item.ossId, + orderRef1: this.$store.state.user.site, + orderRef2: this.copyModalData.proofingId.toString(), + orderRef3: this.copyModalData.documentDefinitionListId, + orderRef4: this.copyModalData.projectId.toString(), + orderRef5: this.copyModalData.projectPartId.toString(), + documentDesc: this.copyModalData.documentTypeId, + cAdditionalInfo: this.copyModalData.documentType, conclusion: this.copyModalData.conclusion, createBy: this.$store.state.user.name, - } - copyDocumentFileToDoc(inData).then(({data}) => { + folder: (this.copyModalData.proofingId === -1) + ? 'projectPMPDocumentFiles' + : 'projectPPDocumentFiles' + })); + uploadFileList('/upload/testList',inDataList).then(({data}) => { //区分请求成功和失败的状况 if (data && data.code === 0) { this.$message({ diff --git a/src/views/modules/quote/detail/quoteDetail.vue b/src/views/modules/quote/detail/quoteDetail.vue index e7037fe..30a51ab 100644 --- a/src/views/modules/quote/detail/quoteDetail.vue +++ b/src/views/modules/quote/detail/quoteDetail.vue @@ -512,13 +512,10 @@ export default { params.quoteGroupDetailId=this.quoteGroupDetail.id; } this.queryLoading = true; + params.authFlag = this.authFlag; queryQuoteDetail(params).then(({data})=>{ if (data && data.code === 0){ - if (this.authFlag){ - this.dataList = data.rows1 - } else { this.dataList = data.rows - } }else { this.$message.warning(data.msg); }