退料,领料,结算,维修问题修复

This commit is contained in:
hongchao 2025-10-15 17:13:19 +08:00
parent 0bd067695f
commit b438bf543c
5 changed files with 269 additions and 86 deletions

View File

@ -110,14 +110,14 @@
<div <div
style="color: #02a7f0; cursor: pointer" style="color: #02a7f0; cursor: pointer"
@click="openFileDialog(scope.row)" @click="openFileDialog(scope.row)"
v-if="scope.row.isExitFile == 0" v-if="scope.row.isExitFile == 1"
> >
报告管理 报告管理
</div> </div>
<div <div
style="color: red; cursor: pointer" style="color: red; cursor: pointer"
@click="openFileDialog(scope.row)" @click="openFileDialog(scope.row)"
v-if="scope.row.isExitFile == 1" v-if="scope.row.isExitFile == 0"
> >
报告管理 报告管理
</div> </div>
@ -226,8 +226,8 @@
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@click="picturePreview(scope.row)" @click="picturePreviewFile(scope.row)"
v-if="scope.row.url" v-if="scope.row.fileListTemp != 0"
style="margin-left: 10px" style="margin-left: 10px"
> >
查看 查看
@ -243,6 +243,23 @@
<img width="100%" height="500px" :src="dialogImageUrl" /> <img width="100%" height="500px" :src="dialogImageUrl" />
</el-dialog> </el-dialog>
<!-- 文件查看列表 -->
<el-dialog title="文件列表" :visible.sync="dialogVisibleFile" width="500px" height="500px">
<el-table :data="fileListInfo" width="100%" height="350px">
<el-table-column label="序号" type="index" width="55" align="center" />
<el-table-column label="文件名称" align="center" prop="name" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="picturePreview(scope.row)" v-if="scope.row.url">
查看
</el-button>
</template>
</el-table-column>
</el-table>
</el-dialog>
<!-- 验收弹窗 --> <!-- 验收弹窗 -->
<el-dialog title="验收" :visible.sync="confirmShow" width="600px" height="300px"> <el-dialog title="验收" :visible.sync="confirmShow" width="600px" height="300px">
<div style="width: 100%; height: 80%; display: flex; margin-bottom: 10px"> <div style="width: 100%; height: 80%; display: flex; margin-bottom: 10px">
@ -329,9 +346,13 @@ export default {
taskStatus: '', //31 taskStatus: '', //31
checkResult: '', checkResult: '',
verifyPass: true, //truefalse verifyPass: true, //truefalse
fileListInfo: [],
fileId: '',
// //
dialogImageUrl: '', dialogImageUrl: '',
dialogVisible: false, dialogVisible: false,
dialogVisibleFile: false,
// //
upload: { upload: {
// //
@ -588,32 +609,93 @@ export default {
}) })
}, },
// //
openFileDialog(row) { async openFileDialog(row) {
this.rowData = row this.rowData = row
this.fileDataList = [ this.fileDataList = [
{ dictLabel: '合格证', fileType: '0', name: '', url: '' }, { dictLabel: '合格证', fileType: '0', name: '', url: '', fileList: [], fileListTemp: [] },
{ dictLabel: '型式试验报告', fileType: '1', name: '', url: '' }, { dictLabel: '型式试验报告', fileType: '1', name: '', url: '', fileList: [], fileListTemp: [] },
{ dictLabel: '出厂检测报告', fileType: '2', name: '', url: '' }, { dictLabel: '出厂检测报告', fileType: '2', name: '', url: '', fileList: [], fileListTemp: [] },
{ dictLabel: '第三方检测报告', fileType: '3', name: '', url: '' }, { dictLabel: '第三方检测报告', fileType: '3', name: '', url: '', fileList: [], fileListTemp: [] },
{ dictLabel: '其他', fileType: '4', name: '', url: '' } { dictLabel: '其他', fileType: '4', name: '', url: '', fileList: [], fileListTemp: [] }
] ]
this.getFileData() if (this.rowData.bmFileInfos == null) {
await this.getFileData()
if (this.rowData.bmFileInfos.length > 0) {
this.rowData.bmFileInfos.forEach(item => {
let index = this.fileDataList.findIndex(v => v.fileType == item.fileType)
this.fileDataList[index].name = item.name
this.fileDataList[index].url = item.url
this.fileDataList[index].fileList.push({
name: item.name,
url: item.url
})
this.fileDataList[index].fileListTemp.push({
name: item.name,
url: item.url
})
})
}
} else {
if (this.rowData.bmFileInfos.length > 0) {
this.rowData.bmFileInfos.forEach(item => {
let index = this.fileDataList.findIndex(v => v.fileType == item.fileType)
this.fileDataList[index].name = item.name
this.fileDataList[index].url = item.url
this.fileDataList[index].fileList.push({
name: item.name,
url: item.url
})
this.fileDataList[index].fileListTemp.push({
name: item.name,
url: item.url
})
})
}
}
// this.fileDataList = [
// { dictLabel: '', fileType: '0', name: '', url: '' },
// { dictLabel: '', fileType: '1', name: '', url: '' },
// { dictLabel: '', fileType: '2', name: '', url: '' },
// { dictLabel: '', fileType: '3', name: '', url: '' },
// { dictLabel: '', fileType: '4', name: '', url: '' }
// ]
// this.getFileData()
this.open = true this.open = true
}, },
// //
getFileData() { async getFileData() {
let param = { let param = {
modelId: this.rowData.typeId, modelId: this.rowData.typeId,
taskType: 0, taskType: 0,
taskId: this.rowData.taskId taskId: this.rowData.taskId
} }
getPurchaseFileList(param) this.rowData.bmFileInfos = []
await getPurchaseFileList(param)
.then(response => { .then(response => {
if (response.rows.length > 0) { if (response.rows.length > 0) {
response.rows.forEach(item => { response.rows.forEach(item => {
let index = this.fileDataList.findIndex(v => v.fileType == item.fileType) let index = this.fileDataList.findIndex(v => v.fileType == item.fileType)
this.fileDataList[index].name = item.name item.fileDetailList.forEach(item2 => {
this.fileDataList[index].url = item.url // this.fileDataList[index].fileList.push({
// name:item2.name,
// url:item2.url
// })
// this.fileDataList[index].fileListTemp.push({
// name:item2.name,
// url:item2.url
// })
const obj = {
taskId: this.taskId,
taskType: '0',
name: item2.name,
url: item2.url,
modelId: this.rowData.partId,
fileType: item2.fileType
}
this.rowData.bmFileInfos.push(obj)
console.log('77777777', this.rowData)
})
}) })
} }
}) })
@ -646,6 +728,22 @@ export default {
}) })
} }
}, },
picturePreviewFile(row) {
row.fileList = []
row.fileListTemp.forEach(item => {
row.fileList.push({
name: item.name,
url: item.url
})
})
this.fileId = row.fileType
this.fileListInfo = row.fileListTemp
this.dialogVisibleFile = true
},
// //
picturePreview(file) { picturePreview(file) {
this.dialogImageUrl = file.url.replaceAll('#', '%23') this.dialogImageUrl = file.url.replaceAll('#', '%23')

View File

@ -473,6 +473,7 @@ export default {
{dictLabel:"其他",fileType:"4",name:"",url:"",fileList:[],fileListTemp:[]}, {dictLabel:"其他",fileType:"4",name:"",url:"",fileList:[],fileListTemp:[]},
], ],
fileListInfo: [], fileListInfo: [],
fileId: '',
// //
dialogImageUrl: '', dialogImageUrl: '',
dialogVisible: false, dialogVisible: false,

View File

@ -106,8 +106,8 @@
</el-table-column> </el-table-column>
<el-table-column label="相关配套资料" align="center" prop="" :show-overflow-tooltip="true"> <el-table-column label="相关配套资料" align="center" prop="" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="color: #02A7F0;cursor: pointer;" @click="openFileDialog(scope.row)" v-if="scope.row.isExitFile==0">报告管理</div> <div style="color: #02A7F0;cursor: pointer;" @click="openFileDialog(scope.row)" v-if="scope.row.isExitFile==1">报告管理</div>
<div style="color: red;cursor: pointer;" @click="openFileDialog(scope.row)" v-if="scope.row.isExitFile==1">报告管理</div> <div style="color: red;cursor: pointer;" @click="openFileDialog(scope.row)" v-if="scope.row.isExitFile==0">报告管理</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="验收结论" align="center" prop="checkResult" :show-overflow-tooltip="true"/> <el-table-column label="验收结论" align="center" prop="checkResult" :show-overflow-tooltip="true"/>
@ -168,7 +168,7 @@
</el-button> </el-button>
</el-upload> </el-upload>
<el-button size="mini" type="text" @click="picturePreview(scope.row)" v-if="scope.row.url" style="margin-left: 10px;"> <el-button size="mini" type="text" @click="picturePreviewFile(scope.row)" v-if="scope.row.url" style="margin-left: 10px;">
查看 查看
</el-button> </el-button>
</div> </div>
@ -184,6 +184,21 @@
<img width="100%" height="500px" :src="dialogImageUrl" /> <img width="100%" height="500px" :src="dialogImageUrl" />
</el-dialog> </el-dialog>
<!-- 文件查看列表 -->
<el-dialog title="文件列表" :visible.sync="dialogVisibleFile" width="500px" height="500px">
<el-table :data="fileListInfo" width="100%" height="350px">
<el-table-column label="序号" type="index" width="55" align="center" />
<el-table-column label="文件名称" align="center" prop="name" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="picturePreview(scope.row)" v-if="scope.row.url">
查看
</el-button>
</template>
</el-table-column>
</el-table>
</el-dialog>
<!-- 编码入库 --> <!-- 编码入库 -->
<el-dialog title="编码入库" :visible.sync="openCode" width="1000px" append-to-body> <el-dialog title="编码入库" :visible.sync="openCode" width="1000px" append-to-body>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
@ -217,6 +232,8 @@
<el-button type="normal" size="mini" @click="openCode=false">取消</el-button> <el-button type="normal" size="mini" @click="openCode=false">取消</el-button>
</div> --> </div> -->
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -273,9 +290,12 @@ export default {
supplierId:undefined, supplierId:undefined,
productionTime:undefined, productionTime:undefined,
}, },
fileListInfo: [],
fileId: '',
// //
dialogImageUrl: '', dialogImageUrl: '',
dialogVisible: false, dialogVisible: false,
dialogVisibleFile: false,
// //
upload: { upload: {
// //
@ -457,32 +477,94 @@ export default {
}).catch(() => {}); }).catch(() => {});
}, },
// //
openFileDialog(row){ async openFileDialog(row){
this.rowData=row; this.rowData=row;
this.fileDataList = [{dictLabel:"合格证",fileType:"0",name:"",url:""}, this.fileDataList = [
{dictLabel:"型式试验报告",fileType:"1",name:"",url:""}, { dictLabel: '合格证', fileType: '0', name: '', url: '', fileList: [], fileListTemp: [] },
{dictLabel:"出厂检测报告",fileType:"2",name:"",url:""}, { dictLabel: '型式试验报告', fileType: '1', name: '', url: '', fileList: [], fileListTemp: [] },
{dictLabel:"第三方检测报告",fileType:"3",name:"",url:""}, { dictLabel: '出厂检测报告', fileType: '2', name: '', url: '', fileList: [], fileListTemp: [] },
{dictLabel:"其他报告",fileType:"4",name:"",url:""}] { dictLabel: '第三方检测报告', fileType: '3', name: '', url: '', fileList: [], fileListTemp: [] },
this.getFileData() { dictLabel: '其他', fileType: '4', name: '', url: '', fileList: [], fileListTemp: [] }
]
if (this.rowData.bmFileInfos == null) {
await this.getFileData()
if (this.rowData.bmFileInfos.length > 0) {
this.rowData.bmFileInfos.forEach(item => {
let index = this.fileDataList.findIndex(v => v.fileType == item.fileType)
this.fileDataList[index].name = item.name
this.fileDataList[index].url = item.url
this.fileDataList[index].fileList.push({
name: item.name,
url: item.url
})
this.fileDataList[index].fileListTemp.push({
name: item.name,
url: item.url
})
})
}
} else {
if (this.rowData.bmFileInfos.length > 0) {
this.rowData.bmFileInfos.forEach(item => {
let index = this.fileDataList.findIndex(v => v.fileType == item.fileType)
this.fileDataList[index].name = item.name
this.fileDataList[index].url = item.url
this.fileDataList[index].fileList.push({
name: item.name,
url: item.url
})
this.fileDataList[index].fileListTemp.push({
name: item.name,
url: item.url
})
})
}
}
// this.fileDataList = [{dictLabel:"",fileType:"0",name:"",url:""},
// {dictLabel:"",fileType:"1",name:"",url:""},
// {dictLabel:"",fileType:"2",name:"",url:""},
// {dictLabel:"",fileType:"3",name:"",url:""},
// {dictLabel:"",fileType:"4",name:"",url:""}]
// this.getFileData()
this.open=true this.open=true
}, },
getFileData(){ async getFileData(){
let param = { let param = {
modelId:this.rowData.typeId, modelId:this.rowData.typeId,
taskType:0, taskType:0,
taskId:this.rowData.taskId taskId:this.rowData.taskId
} }
getPurchaseFileList(param).then((response) => { this.rowData.bmFileInfos = []
if(response.rows.length>0){ await getPurchaseFileList(param)
response.rows.forEach(item=>{ .then(response => {
let index = this.fileDataList.findIndex(v=>v.fileType==item.fileType) if (response.rows.length > 0) {
this.fileDataList[index].name = item.name response.rows.forEach(item => {
this.fileDataList[index].url = item.url let index = this.fileDataList.findIndex(v => v.fileType == item.fileType)
item.fileDetailList.forEach(item2 => {
// this.fileDataList[index].fileList.push({
// name:item2.name,
// url:item2.url
// })
// this.fileDataList[index].fileListTemp.push({
// name:item2.name,
// url:item2.url
// })
const obj = {
taskId: this.taskId,
taskType: '0',
name: item2.name,
url: item2.url,
modelId: this.rowData.partId,
fileType: item2.fileType
}
this.rowData.bmFileInfos.push(obj)
console.log('77777777', this.rowData)
})
}) })
} }
}).catch(() => {
}) })
.catch(() => {})
}, },
beforeFileUpload(row){ beforeFileUpload(row){
this.rowData.fileType=row.fileType; this.rowData.fileType=row.fileType;
@ -508,6 +590,21 @@ export default {
}) })
} }
}, },
picturePreviewFile(row) {
row.fileList = []
row.fileListTemp.forEach(item => {
row.fileList.push({
name: item.name,
url: item.url
})
})
this.fileId = row.fileType
this.fileListInfo = row.fileListTemp
this.dialogVisibleFile = true
},
// //
picturePreview(file) { picturePreview(file) {
this.dialogImageUrl = file.url.replaceAll('#','%23'); this.dialogImageUrl = file.url.replaceAll('#','%23');

View File

@ -123,50 +123,29 @@
prop="unitName" prop="unitName"
/> />
<el-table-column <el-table-column
label="退料工程" label="工程名称"
align="center" align="center"
prop="projectName" prop="projectName"
/> />
<el-table-column
label="退料单号"
align="center"
width="150"
prop="backCode"
:show-overflow-tooltip="true"
/>
<el-table-column <el-table-column
label="维修审核单号" label="维修审核单号"
align="center" align="center"
width="150" width="150"
prop="auditCode" prop="repairNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="任务单号"
align="center"
width="150"
prop="repairTaskCode"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column <el-table-column
label="物资类型" label="物资类型"
align="center" align="center"
width="150" width="150"
prop="typeName2" prop="itemType"
:show-overflow-tooltip="true"
/>
<el-table-column
label="退料数量"
align="center"
width="150"
prop="repairNum2"
:show-overflow-tooltip="true"
/>
<el-table-column
label="合格数量"
align="center"
width="150"
prop="repairedNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="报废数量"
align="center"
width="150"
prop="scrapNum3"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<!-- <el-table-column <!-- <el-table-column
@ -177,16 +156,16 @@
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> --> /> -->
<el-table-column <el-table-column
label="维修人" label="提交人"
align="center" align="center"
prop="createBy2" prop="createBy"
width="75px" width="75px"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column <el-table-column
label="审核时间" label="提交时间"
align="center" align="center"
prop="auditTime" prop="createTime"
width="100px" width="100px"
> >
</el-table-column> </el-table-column>
@ -245,7 +224,6 @@ import {
outerAudit, outerAudit,
} from "@/api/repair/testExamine"; } from "@/api/repair/testExamine";
import router from "@/router"; import router from "@/router";
import { formatTime } from '@/utils/bonus'
export default { export default {
name: "Home", name: "Home",
dicts: ['repair_task_status'], dicts: ['repair_task_status'],
@ -532,8 +510,17 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const formatTime = (date) => {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
const seconds = String(date.getSeconds()).padStart(2, '0');
return `${year}${month}${day}_${hours}${minutes}${seconds}`;
};
const currentTime = formatTime(new Date()); const currentTime = formatTime(new Date());
this.download( this.download(
"/material/repair_audit_details/export", "/material/repair_audit_details/export",
@ -542,7 +529,7 @@ export default {
startTime: this.queryParams.time && this.queryParams.time[0], startTime: this.queryParams.time && this.queryParams.time[0],
endTime: this.queryParams.time && this.queryParams.time[1], endTime: this.queryParams.time && this.queryParams.time[1],
}, },
`修试审核数据一览表_${currentTime}.xlsx` `修试审核_${currentTime}.xlsx`
); );
}, },

View File

@ -91,7 +91,7 @@
<el-button type="primary" size="mini" @click="handleExport4" :disabled="!hasData">报废明细导出</el-button> <el-button type="primary" size="mini" @click="handleExport4" :disabled="!hasData">报废明细导出</el-button>
<el-button type="primary" size="mini" @click="handleExport2" :disabled="!hasData">未归还明细导出</el-button> <el-button type="primary" size="mini" @click="handleExport2" :disabled="!hasData">未归还明细导出</el-button>
<el-button type="primary" size="mini" @click="handleExport5" :disabled="!hasData">减免明细导出</el-button> <el-button type="primary" size="mini" @click="handleExport5" :disabled="!hasData">减免明细导出</el-button>
<!-- <el-button type="warning" size="mini" @click="handleExportAll" :disabled="!hasData">全部明细导出</el-button> --> <el-button type="warning" size="mini" @click="handleExportAll" :disabled="!hasData">全部明细导出</el-button>
<!-- <el-button type="warning" size="mini" @click="handleExportEach" :disabled="!hasData">各结算明细导出</el-button> --> <!-- <el-button type="warning" size="mini" @click="handleExportEach" :disabled="!hasData">各结算明细导出</el-button> -->
<el-button type="success" size="mini" @click="handleAdd" :disabled="!hasData">提交</el-button> <el-button type="success" size="mini" @click="handleAdd" :disabled="!hasData">提交</el-button>
</el-col> </el-col>