This commit is contained in:
bb_pan 2025-12-22 14:08:36 +08:00
parent 5171224bea
commit d40290f9a4
4 changed files with 186 additions and 29 deletions

View File

@ -27,7 +27,6 @@
<el-form :model="queryParams" ref="queryFormRef" :inline="true" inline label-width="auto" size="small">
<el-card class="search-box">
<el-row>
<el-form-item label="审批状态" prop="status">
<el-select clearable style="width: 200px" placeholder="请选择审批状态" v-model="queryParams.status">
<el-option label="待审批" value="0" />
@ -83,10 +82,22 @@
</el-form-item>-->
<el-form-item prop="minOriginalValue" label="资产原值(万元)">
<el-input clearable style="width: 95px" placeholder="请输入" @input="handleNumberInput('minOriginalValue')" v-model.trim="queryParams.minOriginalValue" />
<el-input
clearable
style="width: 95px"
placeholder="请输入"
@input="handleNumberInput('minOriginalValue')"
v-model.trim="queryParams.minOriginalValue"
/>
</el-form-item>
<el-form-item prop="maxOriginalValue" label="-" style="margin-left: -6%">
<el-input clearable style="width: 95px" placeholder="请输入" @input="handleNumberInput('maxOriginalValue')" v-model.trim="queryParams.maxOriginalValue" />
<el-input
clearable
style="width: 95px"
placeholder="请输入"
@input="handleNumberInput('maxOriginalValue')"
v-model.trim="queryParams.maxOriginalValue"
/>
</el-form-item>
<el-form-item style="float: right">
@ -349,6 +360,17 @@
</el-table-column>
<!-- <el-table-column prop="province" label="所属省份" show-overflow-tooltip align="center" min-width="200px" /> -->
<el-table-column
prop="reportManagement"
label="相关配套资料"
show-overflow-tooltip
align="center"
min-width="200px"
>
<template v-slot="{ row }">
<span style="color: #00a288; cursor: pointer" @click="handleFileListUpload(row)">报告管理</span>
</template>
</el-table-column>
<!-- <el-table-column
prop="appearanceImages"
label="装备外观"
show-overflow-tooltip
@ -409,7 +431,7 @@
>查看</span
>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column
v-for="(item, index) in columns"
v-if="item.visible"
@ -643,6 +665,41 @@
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
<!-- 报告管理 -->
<el-dialog title="报告管理" :visible.sync="openReport" width="900px" append-to-body>
<el-table :data="fileDataList" width="100%" height="350px">
<el-table-column label="序号" type="index" width="55" align="center" />
<el-table-column label="报告类型" align="center" prop="dictLabel" :show-overflow-tooltip="true">
<template v-slot="{ row }">
<span v-if="row.type == 1 || row.type == 2 || row.type == 3">
<span style="color: red">*</span>
{{ row.dictLabel }}
</span>
<span v-else>{{ row.dictLabel }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="{ row }">
<div style="display: flex; align-items: center; justify-content: center">
<el-button v-if="currentRow.isNew" size="mini" type="text" @click="handleFileUpload(currentRow, row.type)">上传</el-button>
<el-button
v-if="
(row.type == 1 && currentRow.appearanceImages.length > 0) ||
(row.type == 2 && currentRow.certificates.length > 0) ||
(row.type == 3 && currentRow.inspectionReports.length > 0) ||
(row.type == 4 && currentRow.purchaseInvoices.length > 0)
"
size="mini"
type="text"
@click="handleView(currentRow, row.type)"
>
查看
</el-button>
</div>
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
@ -735,7 +792,7 @@ export default {
//
lastValidValues: {
minOriginalValue: '',
maxOriginalValue: ''
maxOriginalValue: '',
},
currentRow: null,
uploadType: 1, // 1:234
@ -780,6 +837,13 @@ export default {
dialogVisible: false,
dialogTitle: '',
dialogList: [],
openReport: false,
fileDataList: [
{ dictLabel: '装备外观', type: '1' },
{ dictLabel: '合格证', type: '2' },
{ dictLabel: '定期检测报告', type: '3' },
{ dictLabel: '采购发票', type: '4' },
],
}
},
watch: {
@ -1220,31 +1284,36 @@ export default {
}
this.dialogVisible = true
},
handleFileListUpload(row) {
this.currentRow = row
console.log('🚀 ~ this.currentRow:', this.currentRow)
this.openReport = true
},
//
handleFileUpload(row, type) {
this.uploadType = type
this.currentRow = row
// this.currentRow = row
if (type == 1) {
this.uploadTitle = '装备外观'
this.fileList = row.fileList1
this.fileList = this.currentRow.fileList1
this.uploadLimit = 6
this.fileSize = 5
this.uploadFileType = ['jpg', 'png', 'jpeg']
} else if (type == 2) {
this.uploadTitle = '合格证'
this.fileList = row.fileList2
this.fileList = this.currentRow.fileList2
this.uploadLimit = 3
this.fileSize = 10
this.uploadFileType = ['jpg', 'png', 'pdf']
} else if (type == 3) {
this.uploadTitle = '定期检验报告'
this.fileList = row.fileList3
this.fileList = this.currentRow.fileList3
this.uploadLimit = 3
this.fileSize = 10
this.uploadFileType = ['jpg', 'png', 'pdf']
} else if (type == 4) {
this.uploadTitle = '采购发票'
this.fileList = row.fileList4
this.fileList = this.currentRow.fileList4
this.uploadLimit = 3
this.fileSize = 10
this.uploadFileType = ['jpg', 'png', 'pdf']

View File

@ -73,7 +73,7 @@ export default {
}
@font-face {
font-family: 'DIN';
src: url('../../../assets/font-family/DIN/DIN-Medium.otf');
src: url('../../../assets/font-family/DIN/D-DIN-Bold.ttf');
}
.screen-container {
width: 100vw;

View File

@ -132,7 +132,10 @@
maxlength="999"
style="width: 120px"
/>
<span v-else-if="column.prop == 'certificates'">
<span v-else-if="column.prop == 'fileList'">
<span style="color: #00a288; cursor: pointer" @click="handleFileListUpload(row)">报告管理</span>
</span>
<!-- <span v-else-if="column.prop == 'certificates'">
<span style="color: #00a288; cursor: pointer" @click="handleFileUpload(row, 2)">上传</span>
<span
v-if="row.certificates && row.certificates.length > 0"
@ -158,7 +161,7 @@
@click="handleView(row, 4)"
>查看</span
>
</span>
</span> -->
<!-- 其他列默认显示文本 -->
<span v-else>{{ row[column.prop] }}</span>
</template>
@ -276,6 +279,40 @@
<el-button @click="showHouse = false"> </el-button>
</div>
</el-dialog>
<!-- 报告管理 -->
<el-dialog title="报告管理" :visible.sync="openReport" width="900px" append-to-body>
<el-table :data="fileDataList" width="100%" height="350px">
<el-table-column label="序号" type="index" width="55" align="center" />
<el-table-column label="报告类型" align="center" prop="dictLabel" :show-overflow-tooltip="true">
<template v-slot="{ row }">
<span v-if="row.type == 2 || row.type == 3">
<span style="color: red">*</span>
{{ row.dictLabel }}
</span>
<span v-else>{{ row.dictLabel }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="{ row, $index }">
<div style="display: flex; align-items: center; justify-content: center">
<el-button size="mini" type="text" @click="handleFileUpload(currentRow, row.type)">上传</el-button>
<el-button
v-if="
(row.type == 2 && currentRow.certificates.length > 0) ||
(row.type == 3 && currentRow.inspectionReports.length > 0) ||
(row.type == 4 && currentRow.purchaseInvoices.length > 0)
"
size="mini"
type="text"
@click="handleView(currentRow, row.type)"
>
查看
</el-button>
</div>
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
@ -315,9 +352,16 @@ export default {
{ label: '出厂日期', prop: 'productionDate', width: 180, required: true },
{ label: '资产原值(万元)', prop: 'originCost', width: 150, required: true },
{ label: '原始编码', prop: 'identifyCode', width: 150, required: true },
{ label: '合格证', prop: 'certificates', width: 100, required: true },
{ label: '检测证书', prop: 'inspectionReports', width: 100, required: true },
{ label: '采购发票', prop: 'purchaseInvoices', width: 100 },
{ label: '相关配套资料', prop: 'fileList', width: 150, required: true },
// { label: '', prop: 'certificates', width: 100, required: true },
// { label: '', prop: 'inspectionReports', width: 100, required: true },
// { label: '', prop: 'purchaseInvoices', width: 100 },
],
openReport: false,
fileDataList: [
{ dictLabel: '合格证', type: '2' },
{ dictLabel: '检测证书', type: '3' },
{ dictLabel: '采购发票', type: '4' },
],
dialogList: [],
options: [],
@ -549,19 +593,23 @@ export default {
}
this.viewVisible = true
},
handleFileListUpload(row) {
this.currentRow = row
this.openReport = true
},
//
handleFileUpload(row, type) {
this.uploadType = type
this.currentRow = row
// this.currentRow = row
if (type == 2) {
this.uploadTitle = '合格证'
this.fileList = row.fileList2
this.fileList = this.currentRow.fileList2
} else if (type == 3) {
this.uploadTitle = '定期检验报告'
this.fileList = row.fileList3
this.fileList = this.currentRow.fileList3
} else if (type == 4) {
this.uploadTitle = '采购发票'
this.fileList = row.fileList4
this.fileList = this.currentRow.fileList4
}
this.uploadVisible = true
},

View File

@ -64,7 +64,10 @@
:controls="false"
style="width: 120px"
/>
<span v-else-if="column.prop == 'certificates'">
<span v-else-if="column.prop == 'fileList'">
<span style="color: #00a288; cursor: pointer" @click="handleFileListUpload(row)">报告管理</span>
</span>
<!-- <span v-else-if="column.prop == 'certificates'">
<span style="color: #00a288; cursor: pointer" @click="handleFileUpload(row, 2)">上传</span>
<span
v-if="row.certificates && row.certificates.length > 0"
@ -90,7 +93,7 @@
@click="handleView(row, 4)"
>查看</span
>
</span>
</span> -->
<!-- 其他列默认显示文本 -->
<span v-else>{{ row[column.prop] }}</span>
</template>
@ -137,6 +140,32 @@
<el-button @click="viewVisible = false"> </el-button>
</span>
</el-dialog>
<!-- 报告管理 -->
<el-dialog title="报告管理" :visible.sync="openReport" width="900px" append-to-body>
<el-table :data="fileDataList" width="100%" height="350px">
<el-table-column label="序号" type="index" width="55" align="center" />
<el-table-column label="报告类型" align="center" prop="dictLabel" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" width="100">
<template slot-scope="{ row, $index }">
<div style="display: flex; align-items: center; justify-content: center">
<el-button size="mini" type="text" @click="handleFileUpload(currentRow, row.type)">上传</el-button>
<el-button
v-if="
(row.type == 2 && currentRow.certificates.length > 0) ||
(row.type == 3 && currentRow.inspectionReports.length > 0) ||
(row.type == 4 && currentRow.purchaseInvoices.length > 0)
"
size="mini"
type="text"
@click="handleView(currentRow, row.type)"
>
查看
</el-button>
</div>
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
@ -165,11 +194,18 @@ export default {
{ label: '计量单位', prop: 'unitName' },
{ label: '单价', prop: 'originCost', width: 150 },
{ label: '申请数量', prop: 'applyNum', width: 150 },
{ label: '合格证', prop: 'certificates' },
{ label: '检测证书', prop: 'inspectionReports' },
{ label: '采购发票', prop: 'purchaseInvoices' },
{ label: '相关配套资料', prop: 'fileList', width: 150, required: true },
// { label: '', prop: 'certificates' },
// { label: '', prop: 'inspectionReports' },
// { label: '', prop: 'purchaseInvoices' },
],
dialogList: [],
openReport: false,
fileDataList: [
{ dictLabel: '合格证', type: '2' },
{ dictLabel: '检测证书', type: '3' },
{ dictLabel: '采购发票', type: '4' },
],
options: [],
activeLabels: [],
lastNode: null,
@ -345,19 +381,23 @@ export default {
}
this.viewVisible = true
},
handleFileListUpload(row) {
this.currentRow = row
this.openReport = true
},
//
handleFileUpload(row, type) {
this.uploadType = type
this.currentRow = row
// this.currentRow = row
if (type == 2) {
this.uploadTitle = '合格证'
this.fileList = row.fileList2
this.fileList = this.currentRow.fileList2
} else if (type == 3) {
this.uploadTitle = '定期检验报告'
this.fileList = row.fileList3
this.fileList = this.currentRow.fileList3
} else if (type == 4) {
this.uploadTitle = '采购发票'
this.fileList = row.fileList4
this.fileList = this.currentRow.fileList4
}
this.uploadVisible = true
},