批量通过和驳回

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