维修合格

This commit is contained in:
jjLv 2024-11-25 09:47:08 +08:00
parent 051b4cb8c1
commit 4dbfef45b7
3 changed files with 37 additions and 18 deletions

View File

@ -10,6 +10,16 @@ export function getRepairTaskList(query) {
params: query params: query
}) })
} }
// // 查询维修任务一级列表
// export function getRepaiDocumentInfo(query) {
// return request({
// url: '/material/repair/getRepaiDocumentInfo',
// method: 'get',
// params: query
// })
// }
// 查询维修任务机具列表二级列表 // 查询维修任务机具列表二级列表
export function getAppRepairMaTypeList(query) { export function getAppRepairMaTypeList(query) {
return request({ return request({

View File

@ -94,13 +94,13 @@
<el-table-column <el-table-column
label="退料数量" label="退料数量"
align="center" align="center"
prop="repairNum" prop="typeRepairNum"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="已修数量" label="已修数量"
align="center" align="center"
prop="repairedNum" prop="typeRepairedNum"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
@ -108,7 +108,8 @@
align="center" align="center"
prop="disrepairNum" prop="disrepairNum"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> >
</el-table-column>
<el-table-column label="管理模式" align="center" prop="manageType"> <el-table-column label="管理模式" align="center" prop="manageType">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 0编码1数量 --> <!-- 0编码1数量 -->
@ -1000,7 +1001,7 @@ export default {
// //
loading: false, loading: false,
// //
ids: [], idsTemp: [],
// //
single: true, single: true,
// //
@ -1263,30 +1264,37 @@ export default {
const res = await getAppRepairMaTypeList(param); const res = await getAppRepairMaTypeList(param);
this.equipmentList = res.data; this.equipmentList = res.data;
this.equipmentList.forEach((e) => { this.equipmentList.forEach((e) => {
e.disrepairNum = Number(e.repairNum) - Number(e.repairedNum); e.disrepairNum = Number(e.typeRepairNum) - Number(e.typeRepairedNum);
}); });
// this.GetDeviceTypeTreeFn(data.backApplyInfo.agreementId) // this.GetDeviceTypeTreeFn(data.backApplyInfo.agreementId)
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.queryParams.equipmentList = selection; this.queryParams.equipmentList = selection;
this.idsList = []; // this.idsList = [];
this.ids = selection.map((item) => item.id); selection.map((item) => {
selection.forEach((item) => { if(item.ids.length>0){
this.idsList.push(item.id); item.ids.forEach((itemTwo =>{
}); this.idsTemp.push(itemTwo)
}))
}
})
// this.idsTemp = selection.map((item) => item.ids);
// selection.forEach((item) => {
// this.idsList.push(item.id);
// });
this.single = selection.length != 1; this.single = selection.length != 1;
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
/** 批量合格按钮操作 */ /** 批量合格按钮操作 */
handleAdd() { handleAdd() {
if (this.ids.length == 0) { if (this.idsTemp.length == 0) {
this.$alert("请至少勾选一条数据", "提示", { this.$alert("请至少勾选一条数据", "提示", {
type: "warning", type: "warning",
confirmButtonText: "确定", confirmButtonText: "确定",
}); });
}else{ }else{
auditPass(this.idsList).then((response) => { auditPass(this.idsTemp).then((response) => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess("通过成功"); this.$modal.msgSuccess("通过成功");
} }
@ -1295,8 +1303,8 @@ export default {
}, },
// //
handleAddSingle(row){ handleAddSingle(row){
const ids = []; let ids = [];
ids.push(row.id); ids = row.ids;
this.$modal this.$modal
.confirm("是否确认合格所选择的数据项?") .confirm("是否确认合格所选择的数据项?")
.then(function () { .then(function () {
@ -1408,7 +1416,7 @@ export default {
const res = await getAppRepairMaTypeList(param); const res = await getAppRepairMaTypeList(param);
this.equipmentList = res.data; this.equipmentList = res.data;
this.equipmentList.forEach((e) => { this.equipmentList.forEach((e) => {
e.disrepairNum = Number(e.repairNum) - Number(e.repairedNum); e.disrepairNum = Number(e.typeRepairNum) - Number(e.typeRepairedNum);
}); });
this.openCode = false; this.openCode = false;
// console.log(this.equipmentList) // console.log(this.equipmentList)
@ -1424,7 +1432,7 @@ export default {
const res = await getAppRepairMaTypeList(param); const res = await getAppRepairMaTypeList(param);
this.equipmentList = res.data; this.equipmentList = res.data;
this.equipmentList.forEach((e) => { this.equipmentList.forEach((e) => {
e.disrepairNum = Number(e.repairNum) - Number(e.repairedNum); e.disrepairNum = Number(e.typeRepairNum) - Number(e.typeRepairedNum);
}); });
this.openCode = false; this.openCode = false;
}, },
@ -1880,7 +1888,7 @@ export default {
const res = await getAppRepairMaTypeList(param); const res = await getAppRepairMaTypeList(param);
this.equipmentList = res.data; this.equipmentList = res.data;
this.equipmentList.forEach((e) => { this.equipmentList.forEach((e) => {
e.disrepairNum = Number(e.repairNum) - Number(e.repairedNum); e.disrepairNum = Number(e.typeRepairNum) - Number(e.typeRepairedNum);
}); });
this.openNum=false; this.openNum=false;
} }
@ -1931,7 +1939,7 @@ export default {
const res = await getAppRepairMaTypeList(param); const res = await getAppRepairMaTypeList(param);
this.equipmentList = res.data; this.equipmentList = res.data;
this.equipmentList.forEach((e) => { this.equipmentList.forEach((e) => {
e.disrepairNum = Number(e.repairNum) - Number(e.repairedNum); e.disrepairNum = Number(e.typeRepairNum) - Number(e.typeRepairedNum);
}); });
this.openNum=false; this.openNum=false;
} }

View File

@ -425,6 +425,7 @@
import { import {
getRepairTaskList, getRepairTaskList,
getRepaiDocumentInfo,
rejectRepair, rejectRepair,
sendList, sendList,
getRepairInfo, getRepairInfo,