Browse Source

2024.6.27 产品文档收集优化

java8
yuejiayang 2 years ago
parent
commit
78a7dafc54
  1. 43
      src/views/modules/common/uploadFileList1.vue
  2. 58
      src/views/modules/eam/com_project_proof_record.vue
  3. 1
      src/views/modules/eam/eamProjectInfo.vue

43
src/views/modules/common/uploadFileList1.vue

@ -221,6 +221,16 @@ export default {
} }
}) })
}, },
getCombinedDocumentType(row) {
//
if (row.documentType === null || row.documentType === undefined) {
return row.documentDesc
}
if (row.documentDesc === null || row.documentDesc === undefined) {
return row.documentType
}
return `${row.documentType}${row.documentDesc}`;
},
// getDocumentList() { // getDocumentList() {
// getDocumentList(this.modalData).then(({data}) => { // getDocumentList(this.modalData).then(({data}) => {
// if (data && data.code === 0) { // if (data && data.code === 0) {
@ -272,10 +282,10 @@ export default {
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" label-width="80px" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" label-width="80px" style="margin-left: 7px;margin-top: -5px;">
<el-form-item :label="label" >
<el-form-item :label="label" v-if="!isEditable">
<el-input v-model="no" :readonly="!isEditable" style="width: 110px"></el-input> <el-input v-model="no" :readonly="!isEditable" style="width: 110px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="文件类型">
<el-form-item label="文件类型" v-if="!isEditable">
<el-input v-model="noType" :readonly="!isEditable" style="width: 170px"></el-input> <el-input v-model="noType" :readonly="!isEditable" style="width: 170px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -284,6 +294,12 @@ export default {
<a href="javascript:void(0);" @click="triggerUpload">点击选择文件</a> <a href="javascript:void(0);" @click="triggerUpload">点击选择文件</a>
<tr></tr> <tr></tr>
<el-input v-model="fileName" readonly placeholder="文件名称" style="width: 200px"></el-input> <el-input v-model="fileName" readonly placeholder="文件名称" style="width: 200px"></el-input>
<el-form-item :label="label" v-if="isEditable" style="margin-top: -18px;margin-left: 10px">
<el-input v-model="no" :readonly="!isEditable" style="width: 110px"></el-input>
</el-form-item>
<el-form-item label="文件类型" v-if="isEditable" style="margin-top: -18px">
<el-input v-model="noType" :readonly="!isEditable" style="width: 170px"></el-input>
</el-form-item>
<el-button type="primary" @click="upload">上传</el-button> <el-button type="primary" @click="upload">上传</el-button>
<el-upload drag :file-list="fileList" <el-upload drag :file-list="fileList"
ref="uploadFile" ref="uploadFile"
@ -303,17 +319,10 @@ export default {
height="252" height="252"
ref="proofDocumentTable" ref="proofDocumentTable"
@row-click="uploadDocumentClickRow" @row-click="uploadDocumentClickRow"
@current-change="changeCurrentRow1"
:row-style="rowStyle"
v-loading="dataListLoading">
<el-table-column
header-align="center"
align="center"
width="100"
fixed="right"
label="操作">
@current-change="changeCurrentRow1">
<el-table-column label="文档类型" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a type="text" size="small" @click="DeleteDocumentType(scope.row)">删除</a>
{{ getCombinedDocumentType(scope.row) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -332,6 +341,16 @@ export default {
style="width: 100px; height: 80px"/></span> style="width: 100px; height: 80px"/></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
header-align="center"
align="center"
width="100"
fixed="right"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="DeleteDocumentType(scope.row)">删除</a>
</template>
</el-table-column>
</el-table> </el-table>
<!-- <el-form-item label="备注:">--> <!-- <el-form-item label="备注:">-->

58
src/views/modules/eam/com_project_proof_record.vue

@ -69,6 +69,11 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="序号" type="index" align="center" :index="indexMethod"></el-table-column> <el-table-column label="序号" type="index" align="center" :index="indexMethod"></el-table-column>
<el-table-column label="文档类型" align="center">
<template slot-scope="scope">
{{ getCombinedDocumentType(scope.row) }}
</template>
</el-table-column>
<el-table-column <el-table-column
v-for="(item,index) in columnFileContentArray" :key="index" v-for="(item,index) in columnFileContentArray" :key="index"
:sortable="item.columnSortable" :sortable="item.columnSortable"
@ -379,6 +384,13 @@
page: 1, page: 1,
limit: 1000 limit: 1000
}, },
searchProofData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
projectId: '',
page: 1,
limit: 1000
},
visible:false, visible:false,
documentListVisible:false, documentListVisible:false,
dataListLoading: false, dataListLoading: false,
@ -450,6 +462,7 @@
proofingNo: '', proofingNo: '',
documentTypeId: '', documentTypeId: '',
documentType: '', documentType: '',
documentDesc: '',
responsibleDepartment: '', responsibleDepartment: '',
estimatedCompletionDays: '', estimatedCompletionDays: '',
page: 1, page: 1,
@ -461,6 +474,7 @@
proofingNo: '', proofingNo: '',
documentTypeId: '', documentTypeId: '',
documentType: '', documentType: '',
documentDesc: '',
responsibleDepartment: '', responsibleDepartment: '',
estimatedCompletionDays: '', estimatedCompletionDays: '',
createBy: this.$store.state.user.name, createBy: this.$store.state.user.name,
@ -652,24 +666,6 @@
}, },
], ],
columnFileContentArray: [ columnFileContentArray: [
{
userId: this.$store.state.user.name,
functionId: 103001,
serialNumber: '103001Table1DocumentType',
tableId: '103001Table1',
tableName: '打样文档表',
columnProp: 'documentType',
headerAlign: 'center',
align: 'center',
columnLabel: '文档类型',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 101001014, functionId: 101001014,
@ -833,6 +829,7 @@
this.visible = true this.visible = true
// //
this.modalData = JSON.parse(JSON.stringify(inData1)); this.modalData = JSON.parse(JSON.stringify(inData1));
this.searchProofData = JSON.parse(JSON.stringify(inData1));
}, },
newProofingRecord() { newProofingRecord() {
proofingInformationSave(this.modalData).then(({data}) => { proofingInformationSave(this.modalData).then(({data}) => {
@ -844,6 +841,7 @@
}) })
this.visible = false this.visible = false
// //
this.getProofingInformation()
this.refreshCurrentTabTable() this.refreshCurrentTabTable()
} else { } else {
this.$message({ this.$message({
@ -855,7 +853,13 @@
this.newProofingDocument() this.newProofingDocument()
}, },
getProofingInformation() { getProofingInformation() {
let tempData = this.modalData
let tempData = {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
projectId: this.searchProofData.projectId,
page: 1,
limit: 1000
}
proofingInformationSearch(tempData).then(({data}) => { proofingInformationSearch(tempData).then(({data}) => {
// //
if (data && data.code === 0) { if (data && data.code === 0) {
@ -887,7 +891,6 @@
for (let i = 0; i < this.proofDocumentList.length; i++) { for (let i = 0; i < this.proofDocumentList.length; i++) {
this.proofDocumentList[i].buNo = this.proofDocumenCurrentRow.buNo this.proofDocumentList[i].buNo = this.proofDocumenCurrentRow.buNo
} }
console.log(this.proofDocumentList)
if (this.totalPage > 0) { if (this.totalPage > 0) {
// //
this.$refs.proofDocumentTable.setCurrentRow(this.proofDocumentList[0]) this.$refs.proofDocumentTable.setCurrentRow(this.proofDocumentList[0])
@ -900,6 +903,16 @@
} }
}) })
}, },
getCombinedDocumentType(row) {
//
if (row.documentType === null || row.documentType === undefined) {
return row.documentDesc
}
if (row.documentDesc === null || row.documentDesc === undefined) {
return row.documentType
}
return `${row.documentType}${row.documentDesc}`;
},
addDocumentList(row) { addDocumentList(row) {
this.documentListVisible = true this.documentListVisible = true
row.bu = row.site + "-" + row.buNo row.bu = row.site + "-" + row.buNo
@ -998,11 +1011,13 @@
}) })
}, },
saveSelectionDocumentType() { saveSelectionDocumentType() {
this.getProofDocument()
if (this.documentSelection.length === 0) { if (this.documentSelection.length === 0) {
this.$message({ this.$message({
message: '请选择文档类型', message: '请选择文档类型',
type: 'error' type: 'error'
}) })
this.extraDocumentList = []
return return
} }
this.documentSelection.forEach((item) => { this.documentSelection.forEach((item) => {
@ -1111,6 +1126,9 @@
if (this.activeName === 'proofDocument') { if (this.activeName === 'proofDocument') {
this.getProofDocument() this.getProofDocument()
} }
if (this.activeName === 'proofingTable') {
this.getProofingInformation()
}
}, },
createExportData() { createExportData() {

1
src/views/modules/eam/eamProjectInfo.vue

@ -1758,7 +1758,6 @@
createBy: this.$store.state.user.name, createBy: this.$store.state.user.name,
} }
this.$refs.proofRecord.init1(inData1) this.$refs.proofRecord.init1(inData1)
this.getDataList()
}, },
updateModal (row) { updateModal (row) {
this.modalData = { this.modalData = {

Loading…
Cancel
Save