|
|
|
@ -211,11 +211,20 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-button type="primary" icon="el-icon-upload" style="margin-top: -5px" @click="addDocumentTypeFlag = true">新增</el-button> |
|
|
|
<el-button type="danger" icon="el-icon-delete" style="margin-top: -5px;margin-left: 8px" @click="batchDeleteDocumentTypeHandle">批量删除</el-button> |
|
|
|
<el-table |
|
|
|
ref="documentDefinitionTable" |
|
|
|
@selection-change="selectionDocumentDefinition" |
|
|
|
:height="this.height + 50" |
|
|
|
:data="proofDocumentListDefinition" |
|
|
|
border |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
header-align="center" |
|
|
|
type="selection" |
|
|
|
align="center" |
|
|
|
width="55"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in columnDocumentManifestDefinitionList" :key="index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
@ -242,7 +251,7 @@ |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<el-footer style="height:40px;margin-top: 25px;text-align:center"> |
|
|
|
<el-button @click="documentListVisible = false;this.proofDocumentListDefinition = [];">关闭</el-button> |
|
|
|
<el-button @click="documentListVisibleFalse">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
@ -645,7 +654,7 @@ |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
|
import { deleteFileInfo, saveFileInfo, updateUploadedFlag } from '@/api/test/fileService.js'; |
|
|
|
import |
|
|
|
{proofingInformationSearch,deleteProofingRecord,proofingDocumentNEW,getExtraDocumentList,editProofingRecord,proofingInformationSave,getProofDocument,deleteDocumentType,proofingDocumentSave,getCopyDocumentFileList} from "@/api/eam/eamProofing.js"; |
|
|
|
{proofingInformationSearch,deleteProofingRecord,proofingDocumentNEW,getExtraDocumentList,editProofingRecord,proofingInformationSave,getProofDocument,deleteDocumentType,batchDeleteDocumentType,proofingDocumentSave,getCopyDocumentFileList} from "@/api/eam/eamProofing.js"; |
|
|
|
import row from "element-ui/packages/row"; |
|
|
|
import UploadFileList1 from "../common/uploadFileList1.vue"; |
|
|
|
import he from "element-ui/src/locale/lang/he"; |
|
|
|
@ -762,6 +771,7 @@ |
|
|
|
documentTypeId: '' |
|
|
|
}, |
|
|
|
documentSelection: [], |
|
|
|
documentDefinitionSelection: [], |
|
|
|
documentCopySelection: [], |
|
|
|
extraDocumentList:[], |
|
|
|
cProjectTypeDbList: [ |
|
|
|
@ -1544,6 +1554,12 @@ |
|
|
|
} else { |
|
|
|
this.proofDocumentList = [] |
|
|
|
} |
|
|
|
this.documentDefinitionSelection = [] |
|
|
|
this.$nextTick(() => { |
|
|
|
if (this.$refs.documentDefinitionTable) { |
|
|
|
this.$refs.documentDefinitionTable.clearSelection() |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
@ -1572,6 +1588,10 @@ |
|
|
|
documentListVisibleFalse() { |
|
|
|
this.documentListVisible = false |
|
|
|
this.proofDocumentListDefinition = [] |
|
|
|
this.documentDefinitionSelection = [] |
|
|
|
if (this.$refs.documentDefinitionTable) { |
|
|
|
this.$refs.documentDefinitionTable.clearSelection() |
|
|
|
} |
|
|
|
}, |
|
|
|
addDocumentList(row) { |
|
|
|
this.proofDocumenCurrentRow = row |
|
|
|
@ -2010,6 +2030,63 @@ |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
selectionDocumentDefinition(val) { |
|
|
|
this.documentDefinitionSelection = val |
|
|
|
}, |
|
|
|
batchDeleteDocumentTypeHandle() { |
|
|
|
if (this.documentDefinitionSelection.length === 0) { |
|
|
|
this.$message({ |
|
|
|
message: '请选择需要删除的文档清单', |
|
|
|
type: 'error' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
const hasUploadedDocument = this.documentDefinitionSelection.some(item => item.documentId !== null && item.documentId !== undefined && item.documentId !== '') |
|
|
|
if (hasUploadedDocument) { |
|
|
|
this.$alert('选中的文档类型存在上传文件,不允许批量删除!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
const documentDefinitionListIds = this.documentDefinitionSelection |
|
|
|
.filter(item => item.documentDefinitionListId !== null && item.documentDefinitionListId !== undefined && item.documentDefinitionListId !== '') |
|
|
|
.map(item => String(item.documentDefinitionListId)) |
|
|
|
if (documentDefinitionListIds.length === 0) { |
|
|
|
this.$message({ |
|
|
|
message: '选中的文档清单无有效ID', |
|
|
|
type: 'error' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
this.$confirm(`是否删除选中的 ${documentDefinitionListIds.length} 条文档清单?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
const inData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
documentDefinitionListIds: documentDefinitionListIds |
|
|
|
} |
|
|
|
batchDeleteDocumentType(inData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message({ |
|
|
|
message: '批量删除成功', |
|
|
|
type: 'success' |
|
|
|
}) |
|
|
|
this.getProofDocument() |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: 'info', |
|
|
|
message: '已取消删除' |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
addDocumentTypeModal() { |
|
|
|
this.addDocumentTypeFlag = true |
|
|
|
}, |
|
|
|
|