|
|
@ -2,7 +2,7 @@ |
|
|
<div class="customer-css"> |
|
|
<div class="customer-css"> |
|
|
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;"> |
|
|
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;"> |
|
|
<el-form :inline="true" label-position="top" style="margin-top: 0px"> |
|
|
<el-form :inline="true" label-position="top" style="margin-top: 0px"> |
|
|
<el-button type="primary" @click="addModal()">新增</el-button> |
|
|
|
|
|
|
|
|
<el-button type="primary" @click="openDocumentListModel()">编辑文档清单</el-button> |
|
|
</el-form> |
|
|
</el-form> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-table |
|
|
<el-table |
|
|
@ -34,24 +34,249 @@ |
|
|
fixed="right" |
|
|
fixed="right" |
|
|
label="操作"> |
|
|
label="操作"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<a type="text" size="small" v-if="scope.row.needRenew=='Y'" @click="renewModew(scope.row)">Renew |</a> |
|
|
|
|
|
<a type="text" size="small" @click="editModel(scope.row)">Edit |</a> |
|
|
|
|
|
<a type="text" size="small" @click="deleteData(scope.row)"> Delete</a> |
|
|
|
|
|
|
|
|
<a type="text" size="small" @click="openFileModel(scope.row)"> View </a> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
|
|
|
<el-dialog title="文档清单定义" :visible.sync="documentListModelFlag" width="650px" v-drag style="margin-top: 7px" > |
|
|
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
|
|
<el-row :gutter="20"> |
|
|
|
|
|
<el-col :span="8"> |
|
|
|
|
|
<el-form-item :label="'Supplier No'" style="width: 100%"> |
|
|
|
|
|
<el-input v-model="searchData.supplierNo" disabled style="" ></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="16"> |
|
|
|
|
|
<el-form-item :label="'Supplier Name'" style="width: 100%"> |
|
|
|
|
|
<el-input v-model="searchData.supplierName" disabled ></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-row :gutter="20"> |
|
|
|
|
|
<el-col :span="8"> |
|
|
|
|
|
<el-form-item :label="'供应商分类'" style="width: 100%"> |
|
|
|
|
|
<el-input v-model="searchData.supplierDocType" disabled style="" ></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
|
|
|
<el-button type="primary" icon="el-icon-upload" style="margin-top: -5px" @click="addDocumentTypeModel">新增</el-button> |
|
|
|
|
|
<el-table |
|
|
|
|
|
height="300" |
|
|
|
|
|
:data="dataList" |
|
|
|
|
|
border |
|
|
|
|
|
style="width: 100%;"> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
v-for="(item,index) in columnProjectDocumentManifestDefinitionList" :key="index" |
|
|
|
|
|
:sortable="item.columnSortable" |
|
|
|
|
|
:prop="item.columnProp" |
|
|
|
|
|
:header-align="item.headerAlign" |
|
|
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
|
|
:align="item.align" |
|
|
|
|
|
:fixed="item.fixed==''?false:item.fixed" |
|
|
|
|
|
:min-width="item.columnWidth" |
|
|
|
|
|
:label="item.columnLabel"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span> |
|
|
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|
|
|
|
|
style="width: 100px; height: 80px"/></span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center" |
|
|
|
|
|
width="100" |
|
|
|
|
|
label="操作"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<a type="text" size="small" v-if="scope.row.manualFlag==='Y'" @click="deleteObjectDocumentType(scope.row)">删除</a> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
<el-footer style="height:40px;margin-top: 25px;text-align:center"> |
|
|
|
|
|
<el-button @click="documentListModelFlag = false">关闭</el-button> |
|
|
|
|
|
</el-footer> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
<!-- 新增文档类型 --> |
|
|
|
|
|
<el-dialog title="新增文档类型" :visible.sync="addDocumentTypeFlag" width="600px" style="margin-top: 7px" v-drag :close-on-click-modal="false"> |
|
|
|
|
|
<el-form inline="inline" label-position="top" :model="searchDocumentTypeData" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
|
|
<el-form-item label="文档类型ID"> |
|
|
|
|
|
<el-input v-model="searchDocumentTypeData.documentTypeId" clearable style="width: 151px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="文档类型"> |
|
|
|
|
|
<el-input v-model="searchDocumentTypeData.documentType" clearable style="width: 151px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label=" "> |
|
|
|
|
|
<el-button type="primary" style="padding: 3px 12px" @click="searchDocumentTypeList()">查询</el-button> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-table |
|
|
|
|
|
:height="300" |
|
|
|
|
|
:data="extraProjectDocumentList" |
|
|
|
|
|
stripe |
|
|
|
|
|
border |
|
|
|
|
|
@selection-change="selectionDocument" |
|
|
|
|
|
style="width: 100%;"> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
type="selection" |
|
|
|
|
|
align="center" |
|
|
|
|
|
width="55"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="documentTypeId" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center" |
|
|
|
|
|
width="100" |
|
|
|
|
|
label="文档类型ID"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="documentType" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="left" |
|
|
|
|
|
label="文档类型"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="responsibleDepartment" |
|
|
|
|
|
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="saveSelectionDocumentType()">确定</el-button> |
|
|
|
|
|
<el-button @click="addDocumentTypeFlag = false">关闭</el-button> |
|
|
|
|
|
</el-footer> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog title="文档清单" :visible.sync="fileListModelFlag" width="600px" v-drag style="margin-top: 7px" > |
|
|
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
|
|
<el-row :gutter="20"> |
|
|
|
|
|
<el-col :span="8"> |
|
|
|
|
|
<el-form-item :label="'Supplier No'" style="width: 100%"> |
|
|
|
|
|
<el-input v-model="searchData.supplierNo" disabled style="" ></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="16"> |
|
|
|
|
|
<el-form-item :label="'Supplier Name'" style="width: 100%"> |
|
|
|
|
|
<el-input v-model="searchData.supplierName" disabled ></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-row :gutter="20"> |
|
|
|
|
|
<el-col :span="8"> |
|
|
|
|
|
<el-form-item :label="'文档类型编号'" style="width: 100%"> |
|
|
|
|
|
<el-input v-model="fileData.documentTypeId" disabled style="" ></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="8"> |
|
|
|
|
|
<el-form-item :label="'文档类型名称'" style="width: 100%"> |
|
|
|
|
|
<el-input v-model="fileData.documentType" disabled ></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="8"> |
|
|
|
|
|
<el-form-item :label="'责任人'" style="width: 100%"> |
|
|
|
|
|
<el-input v-model="fileData.responsibleDepartmentName" disabled ></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-button type="primary" @click="handleUpload">上传文档</el-button> |
|
|
|
|
|
|
|
|
|
|
|
<el-table |
|
|
|
|
|
:height="240" |
|
|
|
|
|
:data="fileList2" |
|
|
|
|
|
ref="fileTableRef" |
|
|
|
|
|
style="width: 100%;" > |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="fileName" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="left" |
|
|
|
|
|
min-width="200" |
|
|
|
|
|
label="File No"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="createdBy" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center" |
|
|
|
|
|
min-width="100" |
|
|
|
|
|
label="Upload By"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="createDate" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center" |
|
|
|
|
|
min-width="100" |
|
|
|
|
|
label="Upload Time"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center" |
|
|
|
|
|
width="100" |
|
|
|
|
|
fixed="right" |
|
|
|
|
|
label="Actions"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<a type="text" size="small" @click="handleDownload(scope.row)">View |</a> |
|
|
|
|
|
<a type="text" size="small" @click="handleRemove(scope.row)"> delete</a> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
<el-footer style="height:40px;margin-top: 25px;text-align:center"> |
|
|
|
|
|
<el-button @click="fileListModelFlag = false">关闭</el-button> |
|
|
|
|
|
</el-footer> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog title="上传文档" :visible.sync="ossVisible" v-drag width="400px" append-to-body :close-on-click-modal="false"> |
|
|
|
|
|
<el-form ref="form" :model="ossForm" label-width="80px" label-position="top"> |
|
|
|
|
|
<el-row :gutter="10"> |
|
|
|
|
|
<slot></slot> |
|
|
|
|
|
<el-col :span="24"> |
|
|
|
|
|
<el-form-item label=" " class="auto"> |
|
|
|
|
|
<el-upload drag :file-list="fileList" |
|
|
|
|
|
action="#" ref="upload" |
|
|
|
|
|
:on-remove="onRemoveFile" |
|
|
|
|
|
:on-change="onChangeFile" |
|
|
|
|
|
multiple |
|
|
|
|
|
:auto-upload="false"> |
|
|
|
|
|
<i class="el-icon-upload"></i> |
|
|
|
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> |
|
|
|
|
|
</el-upload> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="24"> |
|
|
|
|
|
<el-form-item label="备注" class="auto"> |
|
|
|
|
|
<el-input type="textarea" v-model="ossForm.remark" resize="none" :autosize="{minRows: 3, maxRows: 3}"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
|
<el-button type="primary" :loading="uploadLoading" @click="handleUploadFiles">确定</el-button> |
|
|
|
|
|
<el-button @click="ossVisible = false">关闭</el-button> |
|
|
|
|
|
</span> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { |
|
|
|
|
|
createNewSupplierContract,getNewSupplierContract,deleteSupplierContract |
|
|
|
|
|
} from '@/api/srm/srmSupplier.js' |
|
|
|
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
import {ossUploadNoSaveOSS, previewOssFileById, queryOss} from "../../../api/oss/oss"; |
|
|
|
|
|
|
|
|
import { |
|
|
|
|
|
ossUpload, |
|
|
|
|
|
ossUploadNoSaveOSS, |
|
|
|
|
|
previewOssFileById, |
|
|
|
|
|
queryOss, queryOssFilePlus, |
|
|
|
|
|
removeOss, |
|
|
|
|
|
uploadWithTtpe |
|
|
|
|
|
} from '../../../api/oss/oss' |
|
|
|
|
|
import { |
|
|
|
|
|
getDocumentListDefinition, |
|
|
|
|
|
searchDocumentTypeListOther, |
|
|
|
|
|
saveSelectionDocumentTypeManual, |
|
|
|
|
|
deleteObjectDocumentType |
|
|
|
|
|
} from '../../../api/srm/srmDocument' |
|
|
|
|
|
import {proofingDocumentNEW} from '../../../api/eam/eamProofing' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
components: { |
|
|
components: { |
|
|
@ -59,11 +284,16 @@ export default { |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
documentSelection: [], |
|
|
dataList: [], |
|
|
dataList: [], |
|
|
searchData: { |
|
|
searchData: { |
|
|
site: '', |
|
|
site: '', |
|
|
username: this.$store.state.user.name, |
|
|
username: this.$store.state.user.name, |
|
|
supplierNo: '', |
|
|
supplierNo: '', |
|
|
|
|
|
supplierDocType: '', |
|
|
|
|
|
supplierName: '', |
|
|
|
|
|
objectNo: '', |
|
|
|
|
|
objectType: 'supplier', |
|
|
height:'300', |
|
|
height:'300', |
|
|
page: 1, |
|
|
page: 1, |
|
|
limit: 1000 |
|
|
limit: 1000 |
|
|
@ -74,85 +304,85 @@ export default { |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: 811001, |
|
|
functionId: 811001, |
|
|
serialNumber: '811001Table5ContractNo', |
|
|
|
|
|
tableId: '811001Table5', |
|
|
|
|
|
tableName: '供应商合同', |
|
|
|
|
|
columnProp: 'contractNo', |
|
|
|
|
|
|
|
|
serialNumber: '811001Table6SeqNo', |
|
|
|
|
|
tableId: '811001Table6', |
|
|
|
|
|
tableName: '供应商文档', |
|
|
|
|
|
columnProp: 'seqNo', |
|
|
headerAlign: 'center', |
|
|
headerAlign: 'center', |
|
|
align: 'left', |
|
|
|
|
|
columnLabel: '合同编号', |
|
|
|
|
|
|
|
|
align: 'center', |
|
|
|
|
|
columnLabel: '序号', |
|
|
columnHidden: false, |
|
|
columnHidden: false, |
|
|
columnImage: false, |
|
|
columnImage: false, |
|
|
columnSortable: false, |
|
|
columnSortable: false, |
|
|
sortLv: 0, |
|
|
sortLv: 0, |
|
|
status: true, |
|
|
status: true, |
|
|
fixed: '', |
|
|
fixed: '', |
|
|
columnWidth: 120 |
|
|
|
|
|
|
|
|
columnWidth: 50 |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: 811001, |
|
|
functionId: 811001, |
|
|
serialNumber: '811001Table5ContractName', |
|
|
|
|
|
tableId: '811001Table5', |
|
|
|
|
|
tableName: '供应商合同', |
|
|
|
|
|
columnProp: 'contractName', |
|
|
|
|
|
|
|
|
serialNumber: '811001Table6DocumentTypeId', |
|
|
|
|
|
tableId: '811001Table6', |
|
|
|
|
|
tableName: '供应商文档', |
|
|
|
|
|
columnProp: 'documentTypeId', |
|
|
headerAlign: 'center', |
|
|
headerAlign: 'center', |
|
|
align: 'left', |
|
|
align: 'left', |
|
|
columnLabel: '合同名称', |
|
|
|
|
|
|
|
|
columnLabel: '文档类型编号', |
|
|
columnHidden: false, |
|
|
columnHidden: false, |
|
|
columnImage: false, |
|
|
columnImage: false, |
|
|
columnSortable: false, |
|
|
columnSortable: false, |
|
|
sortLv: 0, |
|
|
sortLv: 0, |
|
|
status: true, |
|
|
status: true, |
|
|
fixed: '', |
|
|
fixed: '', |
|
|
columnWidth: 120 |
|
|
|
|
|
|
|
|
columnWidth: 100 |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: 811001, |
|
|
functionId: 811001, |
|
|
serialNumber: '811001Table5ContractDetail', |
|
|
|
|
|
tableId: '811001Table5', |
|
|
|
|
|
tableName: '供应商合同', |
|
|
|
|
|
columnProp: 'contractDetail', |
|
|
|
|
|
|
|
|
serialNumber: '811001Table6DocumentType', |
|
|
|
|
|
tableId: '811001Table6', |
|
|
|
|
|
tableName: '供应商文档', |
|
|
|
|
|
columnProp: 'documentType', |
|
|
headerAlign: 'center', |
|
|
headerAlign: 'center', |
|
|
align: 'left', |
|
|
align: 'left', |
|
|
columnLabel: '合同描述', |
|
|
|
|
|
|
|
|
columnLabel: '文档类型名称', |
|
|
columnHidden: false, |
|
|
columnHidden: false, |
|
|
columnImage: false, |
|
|
columnImage: false, |
|
|
columnSortable: false, |
|
|
columnSortable: false, |
|
|
sortLv: 0, |
|
|
sortLv: 0, |
|
|
status: true, |
|
|
status: true, |
|
|
fixed: '', |
|
|
fixed: '', |
|
|
columnWidth: 240 |
|
|
|
|
|
|
|
|
columnWidth: 120 |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: 811001, |
|
|
functionId: 811001, |
|
|
serialNumber: '811001Table5ContractDate', |
|
|
|
|
|
tableId: '811001Table5', |
|
|
|
|
|
tableName: '供应商合同', |
|
|
|
|
|
columnProp: 'contractDate', |
|
|
|
|
|
|
|
|
serialNumber: '811001Table6UploadedFlag', |
|
|
|
|
|
tableId: '811001Table6', |
|
|
|
|
|
tableName: '供应商文档', |
|
|
|
|
|
columnProp: 'uploadedFlag', |
|
|
headerAlign: 'center', |
|
|
headerAlign: 'center', |
|
|
align: 'left', |
|
|
|
|
|
columnLabel: '合同日期', |
|
|
|
|
|
|
|
|
align: 'center', |
|
|
|
|
|
columnLabel: '是否上传', |
|
|
columnHidden: false, |
|
|
columnHidden: false, |
|
|
columnImage: false, |
|
|
columnImage: false, |
|
|
columnSortable: false, |
|
|
columnSortable: false, |
|
|
sortLv: 0, |
|
|
sortLv: 0, |
|
|
status: true, |
|
|
status: true, |
|
|
fixed: '', |
|
|
fixed: '', |
|
|
columnWidth: 120 |
|
|
|
|
|
|
|
|
columnWidth: 80 |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: 811001, |
|
|
functionId: 811001, |
|
|
serialNumber: '811001Table5CreatedBy', |
|
|
|
|
|
tableId: '811001Table5', |
|
|
|
|
|
tableName: '供应商合同', |
|
|
|
|
|
columnProp: 'createBy', |
|
|
|
|
|
|
|
|
serialNumber: '811001Table6ResponsibleDepartmentName', |
|
|
|
|
|
tableId: '811001Table6', |
|
|
|
|
|
tableName: '供应商文档', |
|
|
|
|
|
columnProp: 'responsibleDepartmentName', |
|
|
headerAlign: 'center', |
|
|
headerAlign: 'center', |
|
|
align: 'center', |
|
|
align: 'center', |
|
|
columnLabel: 'CreatedBy', |
|
|
|
|
|
|
|
|
columnLabel: '责任人', |
|
|
columnHidden: false, |
|
|
columnHidden: false, |
|
|
columnImage: false, |
|
|
columnImage: false, |
|
|
columnSortable: false, |
|
|
columnSortable: false, |
|
|
@ -164,13 +394,13 @@ export default { |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: 811001, |
|
|
functionId: 811001, |
|
|
serialNumber: '811001Table5CreateDate', |
|
|
|
|
|
tableId: '811001Table5', |
|
|
|
|
|
tableName: '供应商合同', |
|
|
|
|
|
columnProp: 'createDate', |
|
|
|
|
|
|
|
|
serialNumber: '811001Table6ValidTo', |
|
|
|
|
|
tableId: '811001Table6', |
|
|
|
|
|
tableName: '供应商文档', |
|
|
|
|
|
columnProp: 'validTo', |
|
|
headerAlign: 'center', |
|
|
headerAlign: 'center', |
|
|
align: 'center', |
|
|
align: 'center', |
|
|
columnLabel: 'Created Time', |
|
|
|
|
|
|
|
|
columnLabel: 'Valid To', |
|
|
columnHidden: false, |
|
|
columnHidden: false, |
|
|
columnImage: false, |
|
|
columnImage: false, |
|
|
columnSortable: false, |
|
|
columnSortable: false, |
|
|
@ -179,28 +409,110 @@ export default { |
|
|
fixed: '', |
|
|
fixed: '', |
|
|
columnWidth: 120 |
|
|
columnWidth: 120 |
|
|
}, |
|
|
}, |
|
|
|
|
|
], |
|
|
|
|
|
tagNo:'', |
|
|
|
|
|
tagNo1:'', |
|
|
|
|
|
uploadLoading:false, |
|
|
|
|
|
documentListModelFlag: false, |
|
|
|
|
|
columnProjectDocumentManifestDefinitionList:[ |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: 811001, |
|
|
functionId: 811001, |
|
|
serialNumber: '811001Table5ValidTo', |
|
|
|
|
|
tableId: '811001Table5', |
|
|
|
|
|
tableName: '供应商合同', |
|
|
|
|
|
columnProp: 'validTo', |
|
|
|
|
|
headerAlign: 'center', |
|
|
|
|
|
align: 'center', |
|
|
|
|
|
columnLabel: 'Valid To', |
|
|
|
|
|
|
|
|
serialNumber: '811001Table7DocumentTypeId', |
|
|
|
|
|
tableId: "811001Table7", |
|
|
|
|
|
tableName: "文档清单表", |
|
|
|
|
|
columnProp: 'documentTypeId', |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "center", |
|
|
|
|
|
columnLabel: '文档类型ID', |
|
|
columnHidden: false, |
|
|
columnHidden: false, |
|
|
columnImage: false, |
|
|
columnImage: false, |
|
|
columnSortable: false, |
|
|
columnSortable: false, |
|
|
sortLv: 0, |
|
|
sortLv: 0, |
|
|
status: true, |
|
|
status: true, |
|
|
fixed: '', |
|
|
|
|
|
columnWidth: 100 |
|
|
|
|
|
|
|
|
fixed: false, |
|
|
|
|
|
columnWidth: 120, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
userId: this.$store.state.user.name, |
|
|
|
|
|
functionId: 811001, |
|
|
|
|
|
serialNumber: '811001Table7DocumentType', |
|
|
|
|
|
tableId: "811001Table7", |
|
|
|
|
|
tableName: "文档清单表", |
|
|
|
|
|
columnProp: 'documentType', |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "left", |
|
|
|
|
|
columnLabel: '文档类型', |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
columnSortable: false, |
|
|
|
|
|
sortLv: 0, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: false, |
|
|
|
|
|
columnWidth: 120, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
userId: this.$store.state.user.name, |
|
|
|
|
|
functionId: 811001, |
|
|
|
|
|
serialNumber: '811001Table7ResponsibleDepartmentName', |
|
|
|
|
|
tableId: "811001Table7", |
|
|
|
|
|
tableName: "文档清单表", |
|
|
|
|
|
columnProp: 'responsibleDepartmentName', |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "left", |
|
|
|
|
|
columnLabel: '责任部门', |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
columnSortable: false, |
|
|
|
|
|
sortLv: 0, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: false, |
|
|
|
|
|
columnWidth: 120, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
userId: this.$store.state.user.name, |
|
|
|
|
|
functionId: 811001, |
|
|
|
|
|
serialNumber: '811001Table7EstimatedCompletionDays', |
|
|
|
|
|
tableId: "811001Table7", |
|
|
|
|
|
tableName: "文档清单表", |
|
|
|
|
|
columnProp: 'estimatedCompletionDays', |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "right", |
|
|
|
|
|
columnLabel: '预计完成天数', |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
columnSortable: false, |
|
|
|
|
|
sortLv: 0, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: false, |
|
|
|
|
|
columnWidth: 80, |
|
|
}, |
|
|
}, |
|
|
], |
|
|
], |
|
|
tagNo:'', |
|
|
|
|
|
tagNo1:'', |
|
|
|
|
|
uploadLoading:false, |
|
|
|
|
|
|
|
|
addDocumentTypeFlag:false, |
|
|
|
|
|
searchDocumentTypeData:{ |
|
|
|
|
|
site:'', |
|
|
|
|
|
objectNo:'', |
|
|
|
|
|
objectType:'', |
|
|
|
|
|
documentTypeId:'', |
|
|
|
|
|
documentType:'', |
|
|
|
|
|
responsibleDepartment:'', |
|
|
|
|
|
}, |
|
|
|
|
|
extraProjectDocumentList:[], |
|
|
|
|
|
fileData:{ |
|
|
|
|
|
id:'', |
|
|
|
|
|
documentTypeId:'', |
|
|
|
|
|
documentType:'', |
|
|
|
|
|
responsibleDepartmentName:'', |
|
|
|
|
|
}, |
|
|
|
|
|
fileList2:[], |
|
|
|
|
|
fileList:[], |
|
|
|
|
|
fileListModelFlag:false, |
|
|
|
|
|
ossVisible:false, |
|
|
|
|
|
ossForm:{ |
|
|
|
|
|
orderRef2:'', |
|
|
|
|
|
rfqNo:'', |
|
|
|
|
|
remark:'' |
|
|
|
|
|
}, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
@ -226,17 +538,209 @@ export default { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
searchTable(){ |
|
|
searchTable(){ |
|
|
getNewSupplierContract(this.searchData).then(({data}) => { |
|
|
|
|
|
|
|
|
getDocumentListDefinition(this.searchData).then(({data}) => { |
|
|
//区分请求成功和失败的状况 |
|
|
//区分请求成功和失败的状况 |
|
|
if (data && data.code == 0) { |
|
|
if (data && data.code == 0) { |
|
|
this.dataList = data.rows |
|
|
this.dataList = data.rows |
|
|
console.log(this.dataList) |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
this.dataList = []; |
|
|
this.dataList = []; |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
openDocumentListModel(){ |
|
|
|
|
|
|
|
|
|
|
|
this.documentListModelFlag=true; |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
deleteObjectDocumentType(row){ |
|
|
|
|
|
this.$confirm(`确定删除这条数据?`, '提示', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
deleteObjectDocumentType(row).then(({data}) => { |
|
|
|
|
|
//区分请求成功和失败的状况 |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '删除成功', |
|
|
|
|
|
type: 'success' |
|
|
|
|
|
}) |
|
|
|
|
|
//刷新表格 |
|
|
|
|
|
this.searchTable(); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '新增失败', |
|
|
|
|
|
type: 'error' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
addDocumentTypeModel(){ |
|
|
|
|
|
this.searchDocumentTypeData={ |
|
|
|
|
|
site:this.searchData.site, |
|
|
|
|
|
objectNo:this.searchData.objectNo, |
|
|
|
|
|
objectType:this.searchData.objectType, |
|
|
|
|
|
documentTypeId:'', |
|
|
|
|
|
documentType:'', |
|
|
|
|
|
responsibleDepartment:'', |
|
|
|
|
|
} |
|
|
|
|
|
this.searchDocumentTypeList() |
|
|
|
|
|
this.addDocumentTypeFlag=true; |
|
|
|
|
|
}, |
|
|
|
|
|
searchDocumentTypeList(){ |
|
|
|
|
|
searchDocumentTypeListOther(this.searchDocumentTypeData).then(({data}) => { |
|
|
|
|
|
//区分请求成功和失败的状况 |
|
|
|
|
|
if (data && data.code == 0) { |
|
|
|
|
|
this.extraProjectDocumentList = data.rows |
|
|
|
|
|
} else { |
|
|
|
|
|
this.extraProjectDocumentList = []; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
selectionDocument(val) { |
|
|
|
|
|
this.documentSelection = val |
|
|
|
|
|
}, |
|
|
|
|
|
saveSelectionDocumentType(){ |
|
|
|
|
|
if(this.documentSelection.length===0){ |
|
|
|
|
|
this.$message.error("未选择数据!") |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
let inData={ |
|
|
|
|
|
site:this.searchData.site, |
|
|
|
|
|
supplierNo:this.searchData.supplierNo, |
|
|
|
|
|
objectNo:this.searchData.objectNo, |
|
|
|
|
|
objectType:this.searchData.objectType, |
|
|
|
|
|
documentList:this.documentSelection, |
|
|
|
|
|
} |
|
|
|
|
|
saveSelectionDocumentTypeManual(inData).then(({data}) => { |
|
|
|
|
|
//区分请求成功和失败的状况 |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '新增成功', |
|
|
|
|
|
type: 'success' |
|
|
|
|
|
}) |
|
|
|
|
|
this.addDocumentTypeFlag = false |
|
|
|
|
|
//刷新表格 |
|
|
|
|
|
this.searchTable(); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '新增失败', |
|
|
|
|
|
type: 'error' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
openFileModel(row){ |
|
|
|
|
|
this.fileData={ |
|
|
|
|
|
id:row.id, |
|
|
|
|
|
documentTypeId:row.documentType, |
|
|
|
|
|
documentType:row.documentType, |
|
|
|
|
|
responsibleDepartmentName:row.responsibleDepartmentName, |
|
|
|
|
|
} |
|
|
|
|
|
this.searchFiles(); |
|
|
|
|
|
this.fileListModelFlag=true |
|
|
|
|
|
}, |
|
|
|
|
|
searchFiles(){ |
|
|
|
|
|
let params={ |
|
|
|
|
|
orderRef1:this.searchData.site, |
|
|
|
|
|
orderRef2:this.searchData.supplierNo, |
|
|
|
|
|
orderRef3:this.fileData.id.toString(), |
|
|
|
|
|
orderReftype:'SrmSupplierDocument', |
|
|
|
|
|
} |
|
|
|
|
|
queryOssFilePlus(params).then(({data})=>{ |
|
|
|
|
|
if (data && data.code === 0){ |
|
|
|
|
|
this.fileList2 = data.rows; |
|
|
|
|
|
}else { |
|
|
|
|
|
this.$message.warning(data.msg); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
handleDownload(row){ |
|
|
|
|
|
|
|
|
|
|
|
// 之前代码多选时只能下载一个,因为下载第一个后this.$refs.table.clearSelection()会清空选中项 |
|
|
|
|
|
let selectList = []; |
|
|
|
|
|
selectList.push(row); |
|
|
|
|
|
for (let i = 0; i < selectList.length; i++) { |
|
|
|
|
|
let params = { |
|
|
|
|
|
id:selectList[i].id, |
|
|
|
|
|
} |
|
|
|
|
|
previewOssFileById(params).then((response) => { |
|
|
|
|
|
const blob = new Blob([response.data], { type: response.headers['content-type'] }); |
|
|
|
|
|
const link = document.createElement('a'); |
|
|
|
|
|
link.href = URL.createObjectURL(blob); |
|
|
|
|
|
link.setAttribute('download', selectList[i].fileName); |
|
|
|
|
|
link.target = '_blank'; // 打开新窗口预览 |
|
|
|
|
|
link.click(); |
|
|
|
|
|
URL.revokeObjectURL(link.href); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
handleRemove(row){ |
|
|
|
|
|
this.$confirm('确认删除吗?', '提示').then(() => { |
|
|
|
|
|
let ids = [row.id] |
|
|
|
|
|
removeOss(ids).then(({data})=>{ |
|
|
|
|
|
if (data && data.code === 0){ |
|
|
|
|
|
this.$message.success(data.msg); |
|
|
|
|
|
this.searchFiles(); |
|
|
|
|
|
}else { |
|
|
|
|
|
this.$message.warning(data.msg); |
|
|
|
|
|
} |
|
|
|
|
|
}).catch((error)=>{ |
|
|
|
|
|
this.$message.error(error); |
|
|
|
|
|
}) |
|
|
|
|
|
}).catch(()=>{ |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
handleUpload(){ |
|
|
|
|
|
this.$nextTick(()=>{ |
|
|
|
|
|
if (this.$refs.upload){ |
|
|
|
|
|
this.$refs.upload.clearFiles(); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
this.fileList = []; |
|
|
|
|
|
this.ossForm.remark = ''; |
|
|
|
|
|
this.ossVisible = true |
|
|
|
|
|
}, |
|
|
|
|
|
onRemoveFile(file, fileList){ |
|
|
|
|
|
this.fileList = fileList |
|
|
|
|
|
}, |
|
|
|
|
|
onChangeFile(file, fileList){ |
|
|
|
|
|
this.fileList = fileList |
|
|
|
|
|
}, |
|
|
|
|
|
handleUploadFiles(){ |
|
|
|
|
|
if (this.fileList.length === 0){ |
|
|
|
|
|
this.$message.error('请选择文件'); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
let formData = new FormData(); |
|
|
|
|
|
for (let i = 0; i < this.fileList.length; i++) { |
|
|
|
|
|
formData.append('file', this.fileList[i].raw); |
|
|
|
|
|
} |
|
|
|
|
|
formData.append('orderRef1', this.searchData.site); |
|
|
|
|
|
formData.append('orderRef2',this.searchData.supplierNo,); |
|
|
|
|
|
formData.append('orderRef3',this.fileData.id.toString(),); |
|
|
|
|
|
formData.append('createdBy', this.$store.state.user.name); |
|
|
|
|
|
formData.append('orderReftype', 'SrmSupplierDocument'); |
|
|
|
|
|
formData.append('fileRemark', this.ossForm.remark); |
|
|
|
|
|
this.uploadLoading = true; |
|
|
|
|
|
uploadWithTtpe(formData).then(({data})=>{ |
|
|
|
|
|
if (data && data.code === 0){ |
|
|
|
|
|
this.$message.success(data.msg); |
|
|
|
|
|
this.searchFiles(); |
|
|
|
|
|
this.ossVisible = false; |
|
|
|
|
|
}else { |
|
|
|
|
|
this.$message.warning(data.msg); |
|
|
|
|
|
} |
|
|
|
|
|
this.uploadLoading = false; |
|
|
|
|
|
}).catch((error)=>{ |
|
|
|
|
|
this.$message.error(error); |
|
|
|
|
|
this.uploadLoading = false; |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
@ -247,6 +751,9 @@ export default { |
|
|
height: auto; |
|
|
height: auto; |
|
|
line-height: 1.5; |
|
|
line-height: 1.5; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.auto /deep/ .el-form-item__content{ |
|
|
|
|
|
height: auto; |
|
|
|
|
|
line-height: 1.5; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
</style> |
|
|
</style> |