|
|
|
@ -347,6 +347,8 @@ |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="primary" v-if="scope.row.documentDefinitionListId !== '-1'" @click="uploadFile(scope.row)">上传文件</a> |
|
|
|
<a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && scope.row.documentId === null" |
|
|
|
@click="copyFile(scope.row)">复制</a> |
|
|
|
<a type="text" size="small" v-if="shouldShowDelete(scope.row) || scope.row.projectPhase === 'SOP文档'" @click="viewMassDocumentFile(scope.row)">查看附件</a> |
|
|
|
<a type="text" size="small" v-if="shouldShowDelete(scope.row) && scope.row.createdBy === $store.state.user.name" |
|
|
|
@click="massProductionDocumentDelete(scope.row)">删除</a> |
|
|
|
@ -361,6 +363,8 @@ |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="primary" v-if="scope.row.documentDefinitionListId !== '-1'" @click="uploadFile(scope.row)">上传文件</a> |
|
|
|
<a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && scope.row.documentId === null" |
|
|
|
@click="copyFile(scope.row)">复制</a> |
|
|
|
<a type="text" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && !shouldShowDelete(scope.row)" @click="warnSendMail(scope.row)">提醒</a> |
|
|
|
<a type="text" size="small" v-if="shouldShowDelete(scope.row) || scope.row.projectPhase === 'SOP文档'" @click="viewMassDocumentFile(scope.row)">查看附件</a> |
|
|
|
<a type="text" size="small" v-if="shouldShowDelete(scope.row)" @click="massProductionDocumentDelete(scope.row)">删除</a> |
|
|
|
@ -413,10 +417,12 @@ |
|
|
|
header-align="center" |
|
|
|
fixed="left" |
|
|
|
align="center" |
|
|
|
width="80" |
|
|
|
width="90" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="text" size="small" v-if="shouldShowDelete(scope.row) || scope.row.uploadedFlag === 'Y'" @click="viewMassDocumentFile(scope.row)">查看附件</a> |
|
|
|
<a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && scope.row.documentId === null" |
|
|
|
@click="copyFile(scope.row)">复制</a> |
|
|
|
<a type="text" size="small" v-if="scope.row.uploadedFlag === 'N'" @click="uploadAllDocumentFile(scope.row)">上传文件</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -1235,7 +1241,7 @@ |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 模态框:详情 --> |
|
|
|
<el-dialog :visible.sync="dialogVisible" width="80%"> |
|
|
|
<el-dialog :visible.sync="dialogVisible" width="80%" style="margin-top: -15px"> |
|
|
|
<el-tabs style="margin-top: -2px; width: 100%; height: 100%;" v-model="activeModalTab" type="border-card" @tab-click="tabClick"> |
|
|
|
<el-tab-pane label="打样记录" name="proofRecord"> |
|
|
|
<!-- 注意这里使用了一个新的 ref,用于模态框内部的 proofRecord 组件 --> |
|
|
|
@ -1264,7 +1270,11 @@ |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="primary" v-if="scope.row.documentDefinitionListId !== '-1'" @click="uploadFile(scope.row)">上传文件</a> |
|
|
|
<a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && scope.row.documentId === null" |
|
|
|
@click="copyFile(scope.row)">复制</a> |
|
|
|
<a type="text" size="small" v-if="shouldShowDelete(scope.row) || scope.row.projectPhase === 'SOP文档'" @click="viewMassDocumentFile(scope.row)">查看附件</a> |
|
|
|
<a type="text" size="small" v-if="shouldShowDelete(scope.row) && scope.row.createdBy === $store.state.user.name" |
|
|
|
@click="massProductionDocumentDelete(scope.row)">删除</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
@ -1276,6 +1286,8 @@ |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="primary" v-if="scope.row.documentDefinitionListId !== '-1'" @click="uploadFile(scope.row)">上传文件</a> |
|
|
|
<a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && scope.row.documentId === null" |
|
|
|
@click="copyFile(scope.row)">复制</a> |
|
|
|
<a type="text" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && !shouldShowDelete(scope.row)" @click="warnSendMail(scope.row)">提醒</a> |
|
|
|
<a type="text" size="small" v-if="shouldShowDelete(scope.row) || scope.row.projectPhase === 'SOP文档'" @click="viewMassDocumentFile(scope.row)">查看附件</a> |
|
|
|
<a type="text" size="small" v-if="shouldShowDelete(scope.row)" @click="massProductionDocumentDelete(scope.row)">删除</a> |
|
|
|
@ -1328,10 +1340,12 @@ |
|
|
|
header-align="center" |
|
|
|
fixed="left" |
|
|
|
align="center" |
|
|
|
width="80" |
|
|
|
width="90" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="text" size="small" v-if="shouldShowDelete(scope.row) || scope.row.uploadedFlag === 'Y'" @click="viewMassDocumentFile(scope.row)">查看附件</a> |
|
|
|
<a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && scope.row.documentId === null" |
|
|
|
@click="copyFile(scope.row)">复制</a> |
|
|
|
<a type="text" size="small" v-if="scope.row.uploadedFlag === 'N'" @click="uploadAllDocumentFile(scope.row)">上传文件</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -1506,6 +1520,113 @@ |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 复制文件模态框 --> |
|
|
|
<el-dialog title="复制" @close="closeCopyDocumentFileFlag" @open="searchCopyDocumentFileList" |
|
|
|
:visible.sync="copyDialog" width="1168px" style="margin-top: -15px" v-drag |
|
|
|
:close-on-click-modal="false" append-to-body> |
|
|
|
<el-form inline="inline" label-position="top" :model="copyModalData" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="项目编码"> |
|
|
|
<el-input v-model="copyModalData.projectNo" readonly style="width: 101px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="项目名称"> |
|
|
|
<el-input v-model="copyModalData.projectDesc" readonly style="width: 181px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="物料编码"> |
|
|
|
<el-input v-model="copyModalData.testPartNo" readonly style="width: 101px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="物料描述"> |
|
|
|
<el-input v-model="copyModalData.partDesc" readonly style="width: 181px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="打样单号"> |
|
|
|
<el-input v-model="copyModalData.proofingNo" readonly style="width: 101px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form inline="inline" label-position="top" :model="copyModalData" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="文档类型ID"> |
|
|
|
<el-input v-model="copyModalData.documentTypeId" readonly style="width: 101px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="文档类型"> |
|
|
|
<el-input v-model="copyModalData.documentType" readonly style="width: 181px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="结论" :rules="rules.conclusion" v-if="copyModalData.proofingNo !== '*'"> |
|
|
|
<el-select v-model="copyModalData.conclusion" placeholder="请选择" clearable style="width: 101px"> |
|
|
|
<el-option label = "合格" value = "合格"></el-option> |
|
|
|
<el-option label = "不合格" value = "不合格"></el-option> |
|
|
|
<el-option label = "让步接受" value = "让步接受"></el-option> |
|
|
|
<el-option label = "N/A" value = "N/A"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
:height="this.height + 200" |
|
|
|
:data="copyDocumentList" |
|
|
|
stripe |
|
|
|
border |
|
|
|
@selection-change="selectionCopyDocument" |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
type="selection" |
|
|
|
align="center" |
|
|
|
width="55"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="testPartNo" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
width="141" |
|
|
|
label="物料编码"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="partDesc" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
width="191" |
|
|
|
label="物料描述"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="proofingNo" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
label="打样单号"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="documentTypeId" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
label="文档类型ID"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="documentType" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
label="文档类型"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="fileName" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
width="191" |
|
|
|
label="文档文件"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="createDate" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="上传时间"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="createdBy" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
label="上传人"> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<el-footer style="height:40px;margin-top: 25px;text-align:center"> |
|
|
|
<el-button type="primary" @click="saveSelectionCopyDocumentType()">确定</el-button> |
|
|
|
<el-button @click="copyDialog = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<upload-file-list-1 folder="projectPMPDocumentFiles" title="上传文档" :file-list.sync="fileList" :label="'文档类型ID:'" :no="otherDocumentCurrentRow.documentTypeId" :no-type="otherDocumentCurrentRow.documentType" |
|
|
|
:proofing-id="proofingCurrentRow.proofingId" :proofing-no="proofingCurrentRow.proofingNo" :bu="proofingCurrentRow.buNo" :site="proofingCurrentRow.site" :upload-dialog.sync="uploadDialog" :no-desc="otherDocumentCurrentRow.documentDesc" :id="otherDocumentCurrentRow.id" |
|
|
|
:project-id="proofingCurrentRow.projectId" :project-no="proofingCurrentRow.projectNo" :project-desc="proofingCurrentRow.projectDesc" :document-type="proofingCurrentRow.documentType" :conclusion="'N/A'" |
|
|
|
@ -1551,8 +1672,9 @@ import {getProjectOtherDocument} from "@/api/eam/eamProofing.js"; |
|
|
|
import UploadFileList1 from "../common/uploadFileList1.vue"; |
|
|
|
import UploadFileList2 from "../common/uploadFileList1.vue"; |
|
|
|
import { |
|
|
|
copyDocumentFileToDoc, |
|
|
|
deleteDocumentType, deleteProofDocument, |
|
|
|
editProjectDocument, |
|
|
|
editProjectDocument, getCopyDocumentFileList, |
|
|
|
getExtraDocumentList, getProofDocument, |
|
|
|
projectDocumentSave, |
|
|
|
proofingDocumentNEW, proofingDocumentSave, proofingInformationSave, |
|
|
|
@ -1964,6 +2086,18 @@ import {updateColumnSize} from "../../../api/table"; |
|
|
|
username: '', |
|
|
|
userDisplay: '' |
|
|
|
}, |
|
|
|
copyModalData: { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
username: this.$store.state.user.name, |
|
|
|
projectId: '', |
|
|
|
projectNo: '', |
|
|
|
proofingId: '', |
|
|
|
proofingNo: '', |
|
|
|
documentTypeId: '' |
|
|
|
}, |
|
|
|
documentCopySelection: [], |
|
|
|
copyDocumentList: [], |
|
|
|
copyDialog: false, |
|
|
|
departmentList:[], |
|
|
|
cProjectTypeDbList: [ |
|
|
|
{cProjectTypeDb: 'Sustaining'}, |
|
|
|
@ -3530,7 +3664,14 @@ import {updateColumnSize} from "../../../api/table"; |
|
|
|
message: ' ', |
|
|
|
trigger: ['blur','change'] |
|
|
|
} |
|
|
|
] |
|
|
|
], |
|
|
|
conclusion: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: ['blur','change'] |
|
|
|
} |
|
|
|
], |
|
|
|
}, |
|
|
|
projectCategoryList: [ |
|
|
|
{ |
|
|
|
@ -4559,7 +4700,11 @@ import {updateColumnSize} from "../../../api/table"; |
|
|
|
let inData={ |
|
|
|
site: this.proofingCurrentRow.site, |
|
|
|
projectId: this.proofingCurrentRow.projectId, |
|
|
|
projectNo: this.proofingCurrentRow.projectNo, |
|
|
|
projectDesc: this.proofingCurrentRow.projectDesc, |
|
|
|
projectPartId: this.proofingCurrentRow.projectPartId, |
|
|
|
testPartNo: this.proofingCurrentRow.testPartNo, |
|
|
|
partDesc: this.proofingCurrentRow.partDesc, |
|
|
|
projectManager: this.proofingCurrentRow.projectManager, |
|
|
|
projectOwner: this.proofingCurrentRow.projectOwner, |
|
|
|
engineer: this.proofingCurrentRow.engineer, |
|
|
|
@ -4586,10 +4731,14 @@ import {updateColumnSize} from "../../../api/table"; |
|
|
|
this.dialogVisible = true; |
|
|
|
// 模态框打开后刷新 proofRecord 组件的数据 |
|
|
|
this.$nextTick(() => { |
|
|
|
let inData = { |
|
|
|
let inData={ |
|
|
|
site: this.proofingCurrentRow.site, |
|
|
|
projectId: this.proofingCurrentRow.projectId, |
|
|
|
projectNo: this.proofingCurrentRow.projectNo, |
|
|
|
projectDesc: this.proofingCurrentRow.projectDesc, |
|
|
|
projectPartId: this.proofingCurrentRow.projectPartId, |
|
|
|
testPartNo: this.proofingCurrentRow.testPartNo, |
|
|
|
partDesc: this.proofingCurrentRow.partDesc, |
|
|
|
projectManager: this.proofingCurrentRow.projectManager, |
|
|
|
projectOwner: this.proofingCurrentRow.projectOwner, |
|
|
|
engineer: this.proofingCurrentRow.engineer, |
|
|
|
@ -4602,9 +4751,10 @@ import {updateColumnSize} from "../../../api/table"; |
|
|
|
cManufactureEngineer: this.proofingCurrentRow.cManufactureEngineer, |
|
|
|
docEngineer: this.proofingCurrentRow.docEngineer, |
|
|
|
ipqcHardTag: this.proofingCurrentRow.ipqcHardTag, |
|
|
|
// username:this.$store.state.user.name, |
|
|
|
page: 1, |
|
|
|
limit: 1000 |
|
|
|
}; |
|
|
|
} |
|
|
|
// 调用模态框内 proofRecord 组件的 init 方法刷新数据 |
|
|
|
this.$refs.proofRecordModal.init(inData,this.authUpdate); |
|
|
|
}); |
|
|
|
@ -4903,7 +5053,7 @@ import {updateColumnSize} from "../../../api/table"; |
|
|
|
documentType: row.documentType, |
|
|
|
documentId: row.documentId, |
|
|
|
} |
|
|
|
if (tempData.createBy !== tempData.username) { |
|
|
|
if (tempData.createBy !== tempData.username && tempData.username !== 'admin') { |
|
|
|
this.$message({ |
|
|
|
message: '只有上传人才能删除该文件', |
|
|
|
type: 'warning' |
|
|
|
@ -5151,6 +5301,9 @@ import {updateColumnSize} from "../../../api/table"; |
|
|
|
selectionProjectDocument(val) { |
|
|
|
this.projectDocumentSelection = val |
|
|
|
}, |
|
|
|
selectionCopyDocument(val) { |
|
|
|
this.documentCopySelection = val |
|
|
|
}, |
|
|
|
saveSelectionProjectDocumentType() { |
|
|
|
if (this.projectDocumentSelection.length === 0) { |
|
|
|
this.$message({ |
|
|
|
@ -6001,6 +6154,87 @@ import {updateColumnSize} from "../../../api/table"; |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
copyFile (row) { |
|
|
|
this.copyModalData = { |
|
|
|
...row, |
|
|
|
projectNo: this.proofingCurrentRow.projectNo, |
|
|
|
projectDesc: this.proofingCurrentRow.projectDesc, |
|
|
|
projectPartId: this.proofingCurrentRow.projectPartId, |
|
|
|
testPartNo: this.proofingCurrentRow.testPartNo, |
|
|
|
partDesc: this.proofingCurrentRow.partDesc, |
|
|
|
}; |
|
|
|
this.copyDialog = true |
|
|
|
console.log(this.copyModalData) |
|
|
|
}, |
|
|
|
searchCopyDocumentFileList() { |
|
|
|
getCopyDocumentFileList(this.copyModalData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.copyDocumentList = data.list |
|
|
|
} else { |
|
|
|
this.copyDocumentList = [] |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
saveSelectionCopyDocumentType() { |
|
|
|
if (this.documentCopySelection.length === 0) { |
|
|
|
this.$message({ |
|
|
|
message: '请选择文档', |
|
|
|
type: 'error' |
|
|
|
}) |
|
|
|
return |
|
|
|
} else if (this.documentCopySelection.length > 1) { |
|
|
|
this.$message({ |
|
|
|
message: '只能选择一个文档', |
|
|
|
type: 'error' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.copyModalData.proofingNo === '*'){ |
|
|
|
this.copyModalData.conclusion = 'N/A' |
|
|
|
} |
|
|
|
if (this.copyModalData.conclusion === '' || this.copyModalData.conclusion === null || |
|
|
|
this.copyModalData.conclusion === undefined) { |
|
|
|
this.$message({ |
|
|
|
message: '结论不能为空', |
|
|
|
type: 'warning' |
|
|
|
}) |
|
|
|
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, |
|
|
|
} |
|
|
|
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 |
|
|
|
this.copyModalData = {} |
|
|
|
this.copyDocumentList = [] |
|
|
|
}, |
|
|
|
|
|
|
|
// 列表表格选择替换 |
|
|
|
tabClick (tab, event) { |
|
|
|
// 刷新列表数据 |
|
|
|
|