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

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
style="color: #02a7f0; cursor: pointer"
@click="openFileDialog(scope.row)"
v-if="scope.row.isExitFile == 0"
v-if="scope.row.isExitFile == 1"
>
报告管理
</div>
<div
style="color: red; cursor: pointer"
@click="openFileDialog(scope.row)"
v-if="scope.row.isExitFile == 1"
v-if="scope.row.isExitFile == 0"
>
报告管理
</div>
@ -226,8 +226,8 @@
<el-button
size="mini"
type="text"
@click="picturePreview(scope.row)"
v-if="scope.row.url"
@click="picturePreviewFile(scope.row)"
v-if="scope.row.fileListTemp != 0"
style="margin-left: 10px"
>
查看
@ -243,6 +243,23 @@
<img width="100%" height="500px" :src="dialogImageUrl" />
</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">
<div style="width: 100%; height: 80%; display: flex; margin-bottom: 10px">
@ -329,9 +346,13 @@ export default {
taskStatus: '', //31
checkResult: '',
verifyPass: true, //truefalse
fileListInfo: [],
fileId: '',
//
dialogImageUrl: '',
dialogVisible: false,
dialogVisibleFile: false,
//
upload: {
//
@ -588,36 +609,97 @@ export default {
})
},
//
openFileDialog(row) {
async openFileDialog(row) {
this.rowData = row
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: '' }
{ dictLabel: '合格证', fileType: '0', name: '', url: '', fileList: [], fileListTemp: [] },
{ dictLabel: '型式试验报告', fileType: '1', name: '', url: '', fileList: [], fileListTemp: [] },
{ dictLabel: '出厂检测报告', fileType: '2', name: '', url: '', fileList: [], fileListTemp: [] },
{ dictLabel: '第三方检测报告', fileType: '3', name: '', url: '', fileList: [], fileListTemp: [] },
{ 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
},
//
getFileData() {
async getFileData() {
let param = {
modelId: this.rowData.typeId,
taskType: 0,
taskId: this.rowData.taskId
}
getPurchaseFileList(param)
.then(response => {
if (response.rows.length > 0) {
response.rows.forEach(item => {
let index = this.fileDataList.findIndex(v => v.fileType == item.fileType)
this.fileDataList[index].name = item.name
this.fileDataList[index].url = item.url
})
}
})
.catch(() => {})
this.rowData.bmFileInfos = []
await getPurchaseFileList(param)
.then(response => {
if (response.rows.length > 0) {
response.rows.forEach(item => {
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(() => {})
},
//
beforeFileUpload(row) {
@ -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) {
this.dialogImageUrl = file.url.replaceAll('#', '%23')

View File

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

View File

@ -106,8 +106,8 @@
</el-table-column>
<el-table-column label="相关配套资料" align="center" prop="" :show-overflow-tooltip="true">
<template slot-scope="scope">
<div style="color: #02A7F0;cursor: pointer;" @click="openFileDialog(scope.row)" v-if="scope.row.isExitFile==0">报告管理</div>
<div style="color: red;cursor: pointer;" @click="openFileDialog(scope.row)" v-if="scope.row.isExitFile==1">报告管理</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==0">报告管理</div>
</template>
</el-table-column>
<el-table-column label="验收结论" align="center" prop="checkResult" :show-overflow-tooltip="true"/>
@ -168,7 +168,7 @@
</el-button>
</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>
</div>
@ -184,6 +184,21 @@
<img width="100%" height="500px" :src="dialogImageUrl" />
</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-row :gutter="10" class="mb8">
@ -217,6 +232,8 @@
<el-button type="normal" size="mini" @click="openCode=false">取消</el-button>
</div> -->
</el-dialog>
</div>
</template>
@ -273,9 +290,12 @@ export default {
supplierId:undefined,
productionTime:undefined,
},
fileListInfo: [],
fileId: '',
//
dialogImageUrl: '',
dialogVisible: false,
dialogVisibleFile: false,
//
upload: {
//
@ -457,32 +477,94 @@ export default {
}).catch(() => {});
},
//
openFileDialog(row){
async openFileDialog(row){
this.rowData=row;
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.fileDataList = [
{ dictLabel: '合格证', fileType: '0', name: '', url: '', fileList: [], fileListTemp: [] },
{ dictLabel: '型式试验报告', fileType: '1', name: '', url: '', fileList: [], fileListTemp: [] },
{ dictLabel: '出厂检测报告', fileType: '2', name: '', url: '', fileList: [], fileListTemp: [] },
{ dictLabel: '第三方检测报告', fileType: '3', name: '', url: '', fileList: [], fileListTemp: [] },
{ 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
},
getFileData(){
async getFileData(){
let param = {
modelId:this.rowData.typeId,
taskType:0,
taskId:this.rowData.taskId
}
getPurchaseFileList(param).then((response) => {
if(response.rows.length>0){
response.rows.forEach(item=>{
let index = this.fileDataList.findIndex(v=>v.fileType==item.fileType)
this.fileDataList[index].name = item.name
this.fileDataList[index].url = item.url
})
}
}).catch(() => {
})
this.rowData.bmFileInfos = []
await getPurchaseFileList(param)
.then(response => {
if (response.rows.length > 0) {
response.rows.forEach(item => {
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(() => {})
},
beforeFileUpload(row){
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) {
this.dialogImageUrl = file.url.replaceAll('#','%23');

View File

@ -123,50 +123,29 @@
prop="unitName"
/>
<el-table-column
label="退料工程"
label="工程名称"
align="center"
prop="projectName"
/>
<el-table-column
label="退料单号"
align="center"
width="150"
prop="backCode"
:show-overflow-tooltip="true"
/>
<el-table-column
label="维修审核单号"
align="center"
width="150"
prop="auditCode"
prop="repairNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="任务单号"
align="center"
width="150"
prop="repairTaskCode"
:show-overflow-tooltip="true"
/>
<el-table-column
label="物资类型"
align="center"
width="150"
prop="typeName2"
: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"
prop="itemType"
:show-overflow-tooltip="true"
/>
<!-- <el-table-column
@ -177,16 +156,16 @@
:show-overflow-tooltip="true"
/> -->
<el-table-column
label="维修人"
label="提交人"
align="center"
prop="createBy2"
prop="createBy"
width="75px"
:show-overflow-tooltip="true"
/>
<el-table-column
label="审核时间"
label="提交时间"
align="center"
prop="auditTime"
prop="createTime"
width="100px"
>
</el-table-column>
@ -245,7 +224,6 @@ import {
outerAudit,
} from "@/api/repair/testExamine";
import router from "@/router";
import { formatTime } from '@/utils/bonus'
export default {
name: "Home",
dicts: ['repair_task_status'],
@ -329,15 +307,15 @@ export default {
onDictReady(dict) {
// repair_task_status101112
const allOptions = dict.type.repair_task_status || []
const validOptions = allOptions.filter(item =>
const validOptions = allOptions.filter(item =>
item.value == 10 || item.value == 11 || item.value == 12
)
//
if (validOptions.length > 0) {
this.queryParams.taskStatus = validOptions[0].value
}
//
this.getList()
},
@ -532,8 +510,17 @@ export default {
},
/** 导出按钮操作 */
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());
this.download(
"/material/repair_audit_details/export",
@ -542,7 +529,7 @@ export default {
startTime: this.queryParams.time && this.queryParams.time[0],
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="handleExport2" :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="success" size="mini" @click="handleAdd" :disabled="!hasData">提交</el-button>
</el-col>