批量通过和驳回

This commit is contained in:
hongchao 2025-02-21 02:02:46 +08:00
parent b91e4a816e
commit 90b9fbab66
1 changed files with 41 additions and 27 deletions

View File

@ -48,7 +48,7 @@
plain
icon="el-icon-check"
size="mini"
:disabled="multiple"
@click="handlePassAll"
>通过</el-button
>
@ -59,7 +59,7 @@
plain
icon="el-icon-close"
size="mini"
:disabled="multiple"
@click="handleFailAll"
>驳回</el-button
>
@ -81,12 +81,12 @@
row-key="id"
@selection-change="handleSelectionChange"
>
<el-table-column
<!-- <el-table-column
type="selection"
width="55"
align="center"
:selectable="selectable"
/>
/> -->
<el-table-column label="序号" align="center" type="index" />
<el-table-column
label="类型名称"
@ -376,37 +376,51 @@ export default {
},
//
handlePassAll() {
if (this.ids.length == 0) {
this.$alert("请至少勾选一条审核数据", "提示", {
type: "warning",
confirmButtonText: "确定",
});
return;
} else {
auditPass(this.passTemp).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess("通过成功");
}
this.getTaskInfo();
});
}
// if (this.ids.length == 0) {
// this.$alert("", "", {
// type: "warning",
// confirmButtonText: "",
// });
// return;
// } else {
let param = [];
this.equipmentList.forEach((item) => {
param.push({ id: item.id, status: "1",specificationType: item.specificationType,machineTypeName:item.machineTypeName,
unitName:item.unitName,repairNum:item.repairNum,repairedNum:item.repairedNum,scrapNum:item.scrapNum,typeId:item.typeId,taskId:item.taskId,
auditId:item.id,repairId:item.repairId,maId:item.maId,maCode:item.maCode });
})
auditPass(param).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess("通过成功");
}
this.getTaskInfo();
});
// }
},
//
handleFailAll() {
if (this.ids.length == 0) {
this.$alert("请至少勾选一条审核数据", "提示", {
type: "warning",
confirmButtonText: "确定",
});
return;
} else {
auditPass(this.failTemp).then((response) => {
// if (this.ids.length == 0) {
// this.$alert("", "", {
// type: "warning",
// confirmButtonText: "",
// });
// return;
// } else {
let param = [];
this.equipmentList.forEach((item) => {
param.push({ id: item.id, status: "2",specificationType: item.specificationType,machineTypeName:item.machineTypeName,
unitName:item.unitName,repairNum:item.repairNum,repairedNum:item.repairedNum,scrapNum:item.scrapNum,typeId:item.typeId,taskId:item.taskId,
auditId:item.id,repairId:item.repairId,maId:item.maId,maCode:item.maCode
});
})
auditPass(param).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess("驳回成功");
}
this.getTaskInfo();
});
}
// }
},
},
};