2024-11-14 15:30:10 +08:00
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<el-form
|
|
|
|
|
:model="maForm"
|
|
|
|
|
ref="maForm"
|
|
|
|
|
size="small"
|
|
|
|
|
:inline="true"
|
|
|
|
|
label-width="120px"
|
|
|
|
|
>
|
2024-11-15 09:03:22 +08:00
|
|
|
<el-form-item label="退料单位" prop="unitName">
|
2024-11-14 15:30:10 +08:00
|
|
|
<el-input
|
2024-11-15 09:03:22 +08:00
|
|
|
v-model="maForm.unitName"
|
2024-11-14 15:30:10 +08:00
|
|
|
placeholder="请输入退料单位"
|
|
|
|
|
clearable
|
|
|
|
|
maxlength="50"
|
|
|
|
|
style="width: 240px"
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
disabled
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
2024-11-15 09:03:22 +08:00
|
|
|
<el-form-item label="工程名称" prop="projectName">
|
2024-11-14 15:30:10 +08:00
|
|
|
<el-input
|
2024-11-15 09:03:22 +08:00
|
|
|
v-model="maForm.projectName"
|
2024-11-14 15:30:10 +08:00
|
|
|
placeholder="请输入工程名称"
|
|
|
|
|
clearable
|
|
|
|
|
maxlength="50"
|
|
|
|
|
style="width: 240px"
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
disabled
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
2024-11-15 09:03:22 +08:00
|
|
|
<el-form-item label="维修单号" prop="repairNum">
|
2024-11-14 15:30:10 +08:00
|
|
|
<el-input
|
2024-11-15 09:03:22 +08:00
|
|
|
v-model="maForm.repairNum"
|
2024-11-14 15:30:10 +08:00
|
|
|
placeholder="请输入维修单号"
|
|
|
|
|
clearable
|
|
|
|
|
maxlength="50"
|
|
|
|
|
style="width: 240px"
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
disabled
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
|
2024-11-15 09:03:22 +08:00
|
|
|
<el-table
|
|
|
|
|
v-loading="loading"
|
|
|
|
|
:data="equipmentList"
|
|
|
|
|
row-key="id"
|
|
|
|
|
>
|
2024-11-14 15:30:10 +08:00
|
|
|
<el-table-column label="序号" align="center" type="index" />
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="类型名称"
|
|
|
|
|
align="center"
|
2024-11-15 13:53:51 +08:00
|
|
|
prop="specificationType"
|
2024-11-14 15:30:10 +08:00
|
|
|
:show-overflow-tooltip="true"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="规格型号"
|
|
|
|
|
align="center"
|
2024-11-15 13:53:51 +08:00
|
|
|
prop="machineTypeName"
|
2024-11-14 15:30:10 +08:00
|
|
|
:show-overflow-tooltip="true"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="计量单位"
|
|
|
|
|
align="center"
|
|
|
|
|
prop="unitName"
|
|
|
|
|
:show-overflow-tooltip="true"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="退料数量"
|
|
|
|
|
align="center"
|
2024-11-25 14:02:34 +08:00
|
|
|
prop="repairNum"
|
2024-11-14 15:30:10 +08:00
|
|
|
:show-overflow-tooltip="true"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="已修数量"
|
|
|
|
|
align="center"
|
2024-11-15 13:53:51 +08:00
|
|
|
prop="repairedNum"
|
2024-11-14 15:30:10 +08:00
|
|
|
:show-overflow-tooltip="true"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="待修数量"
|
|
|
|
|
align="center"
|
2024-11-15 13:53:51 +08:00
|
|
|
prop="waitNum"
|
2024-11-14 15:30:10 +08:00
|
|
|
:show-overflow-tooltip="true"
|
2024-11-15 13:53:51 +08:00
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div>
|
|
|
|
|
{{ scope.row.repairNum - scope.row.repairedNum }}
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-11-14 15:30:10 +08:00
|
|
|
<el-table-column
|
|
|
|
|
label="管理模式"
|
|
|
|
|
align="center"
|
|
|
|
|
prop="alNum"
|
|
|
|
|
:show-overflow-tooltip="true"
|
2024-12-05 17:52:22 +08:00
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<!-- 0编码1数量 -->
|
|
|
|
|
<div v-if="scope.row.manageType==0">编码管理</div>
|
|
|
|
|
<div v-if="scope.row.manageType==1">数量管理</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-11-15 13:53:51 +08:00
|
|
|
<el-table-column
|
|
|
|
|
label="审核状态"
|
|
|
|
|
align="center"
|
|
|
|
|
prop="status"
|
|
|
|
|
:show-overflow-tooltip="true"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div v-if="scope.row.status == '0'" style="color: #e6a23c">
|
|
|
|
|
{{ "未审核" }}
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="scope.row.status == '1'" style="color: #67c23a">
|
|
|
|
|
{{ "已审核" }}
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="scope.row.status == '2'" style="color: #f56c6c">
|
|
|
|
|
{{ "驳回" }}
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div v-else style="color: red;"></div> -->
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-11-25 14:02:34 +08:00
|
|
|
<!-- <el-table-column label="操作" align="center" width="300">
|
2024-11-14 15:30:10 +08:00
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
style="margin-bottom: 10px"
|
|
|
|
|
type="primary"
|
2024-11-15 13:53:51 +08:00
|
|
|
v-if="scope.row.status == '0'"
|
2024-11-14 15:30:10 +08:00
|
|
|
@click="handlePass(scope.row)"
|
|
|
|
|
>通过
|
|
|
|
|
</el-button>
|
|
|
|
|
|
2024-11-15 13:53:51 +08:00
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="danger"
|
|
|
|
|
@click="handleFail(scope.row)"
|
|
|
|
|
v-if="scope.row.status == '0'"
|
2024-11-14 15:30:10 +08:00
|
|
|
>驳回
|
|
|
|
|
</el-button>
|
2024-11-15 13:53:51 +08:00
|
|
|
<div v-if="scope.row.status != '0'">-</div>
|
2024-11-14 15:30:10 +08:00
|
|
|
</template>
|
2024-11-25 14:02:34 +08:00
|
|
|
</el-table-column> -->
|
2024-11-14 15:30:10 +08:00
|
|
|
</el-table>
|
2024-11-15 09:03:22 +08:00
|
|
|
<pagination
|
|
|
|
|
v-show="total > 0"
|
|
|
|
|
:total="total"
|
|
|
|
|
:page.sync="maForm.pageNum"
|
|
|
|
|
:limit.sync="maForm.pageSize"
|
|
|
|
|
@pagination="getTaskInfo"
|
|
|
|
|
/>
|
2024-11-14 15:30:10 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2024-11-15 13:53:51 +08:00
|
|
|
import { getAuditInfo, auditPass } from "@/api/repair/testExamine";
|
2024-11-14 15:30:10 +08:00
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
|
|
export default {
|
|
|
|
|
name: "QueryTools",
|
|
|
|
|
components: {
|
|
|
|
|
// UploadImg,
|
|
|
|
|
},
|
|
|
|
|
props: {
|
|
|
|
|
isView: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default: () => {
|
|
|
|
|
return false;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
queryTaskId: {
|
|
|
|
|
type: [String, Number],
|
|
|
|
|
default: () => {
|
|
|
|
|
return "";
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
queryId: {
|
|
|
|
|
type: [String, Number],
|
|
|
|
|
default: () => {
|
|
|
|
|
return "";
|
|
|
|
|
},
|
|
|
|
|
},
|
2024-11-15 09:03:22 +08:00
|
|
|
param: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default: () => {
|
|
|
|
|
return "";
|
|
|
|
|
},
|
|
|
|
|
},
|
2024-11-14 15:30:10 +08:00
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2024-11-15 09:03:22 +08:00
|
|
|
paramTemp: {},
|
2024-11-14 15:30:10 +08:00
|
|
|
//任务ID
|
|
|
|
|
taskId: "",
|
|
|
|
|
// 遮罩层
|
|
|
|
|
loading: true,
|
2024-11-15 09:03:22 +08:00
|
|
|
total: 0,
|
2024-11-14 15:30:10 +08:00
|
|
|
//租赁单位
|
|
|
|
|
uniteList: [],
|
|
|
|
|
//租赁工程
|
|
|
|
|
projectList: [],
|
|
|
|
|
// 表格数据
|
|
|
|
|
equipmentList: [],
|
2024-11-15 13:53:51 +08:00
|
|
|
passTemp: [],
|
|
|
|
|
faliTemp: [],
|
2024-11-15 09:03:22 +08:00
|
|
|
// 选中数组
|
|
|
|
|
ids: [],
|
|
|
|
|
// 非单个禁用
|
|
|
|
|
single: true,
|
|
|
|
|
// 非多个禁用
|
|
|
|
|
multiple: true,
|
2024-11-14 15:30:10 +08:00
|
|
|
// 是否显示弹出层
|
|
|
|
|
open: false,
|
|
|
|
|
rowData: {},
|
|
|
|
|
maForm: {
|
2024-11-15 09:03:22 +08:00
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
unitName: undefined,
|
|
|
|
|
projectName: undefined,
|
|
|
|
|
repairNum: undefined,
|
2024-11-14 15:30:10 +08:00
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
computed: {},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.taskId = this.queryTaskId;
|
2024-11-15 09:03:22 +08:00
|
|
|
this.paramTemp = this.param;
|
2024-11-14 15:30:10 +08:00
|
|
|
this.getTaskInfo();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2024-11-15 13:53:51 +08:00
|
|
|
//是否可用勾选框
|
|
|
|
|
selectable(row) {
|
|
|
|
|
if (row.status == "0") {
|
|
|
|
|
return true;
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-11-15 09:03:22 +08:00
|
|
|
// 多选框选中数据
|
|
|
|
|
handleSelectionChange(selection) {
|
2024-11-15 13:53:51 +08:00
|
|
|
this.passTemp = [];
|
|
|
|
|
this.failTemp = [];
|
2024-11-15 09:03:22 +08:00
|
|
|
this.ids = selection.map((item) => item.id);
|
2024-11-15 13:53:51 +08:00
|
|
|
selection.forEach((item) => {
|
|
|
|
|
this.passTemp.push({ id: item.id, status: "1" });
|
|
|
|
|
});
|
|
|
|
|
selection.forEach((item) => {
|
|
|
|
|
this.failTemp.push({ id: item.id, status: "2" });
|
|
|
|
|
});
|
2024-11-15 09:03:22 +08:00
|
|
|
this.single = selection.length != 1;
|
|
|
|
|
this.multiple = !selection.length;
|
|
|
|
|
},
|
2024-11-14 15:30:10 +08:00
|
|
|
//获取任务详情-列表数据
|
|
|
|
|
getTaskInfo() {
|
|
|
|
|
this.loading = true;
|
2024-11-15 09:03:22 +08:00
|
|
|
getAuditInfo({ taskId: this.taskId }).then((response) => {
|
|
|
|
|
this.maForm = this.paramTemp;
|
|
|
|
|
this.equipmentList = response.rows;
|
|
|
|
|
this.total = response.total;
|
2024-11-14 15:30:10 +08:00
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
2024-11-15 13:53:51 +08:00
|
|
|
//单个通过
|
2024-11-15 09:03:22 +08:00
|
|
|
handlePass(row) {
|
2024-11-15 13:53:51 +08:00
|
|
|
const param = [];
|
|
|
|
|
param.push({ id: row.id, status: "1" });
|
2024-11-15 09:03:22 +08:00
|
|
|
this.$modal
|
2024-11-15 13:53:51 +08:00
|
|
|
.confirm("是否确认通过所选择的数据项?")
|
2024-11-15 09:03:22 +08:00
|
|
|
.then(function () {
|
2024-11-15 13:53:51 +08:00
|
|
|
return auditPass(param);
|
2024-11-15 09:03:22 +08:00
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
this.getTaskInfo();
|
2024-11-15 13:53:51 +08:00
|
|
|
this.$modal.msgSuccess("通过成功");
|
2024-11-15 09:03:22 +08:00
|
|
|
})
|
|
|
|
|
.catch(() => {});
|
|
|
|
|
},
|
2024-11-15 13:53:51 +08:00
|
|
|
//单个驳回
|
2024-11-15 09:03:22 +08:00
|
|
|
handleFail(row) {
|
2024-11-15 13:53:51 +08:00
|
|
|
const param = [];
|
|
|
|
|
param.push({ id: row.id, status: "2" });
|
2024-11-15 09:03:22 +08:00
|
|
|
this.$modal
|
|
|
|
|
.confirm("是否确认驳回所选择的数据项?")
|
|
|
|
|
.then(function () {
|
2024-11-15 13:53:51 +08:00
|
|
|
return auditPass(param);
|
2024-11-15 09:03:22 +08:00
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
this.getTaskInfo();
|
|
|
|
|
this.$modal.msgSuccess("驳回成功");
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {});
|
|
|
|
|
},
|
2024-11-15 13:53:51 +08:00
|
|
|
//多个通过
|
2024-11-15 09:03:22 +08:00
|
|
|
handlePassAll() {
|
|
|
|
|
if (this.ids.length == 0) {
|
|
|
|
|
this.$alert("请至少勾选一条审核数据", "提示", {
|
|
|
|
|
type: "warning",
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
2024-11-15 13:53:51 +08:00
|
|
|
auditPass(this.passTemp).then((response) => {
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
this.$modal.msgSuccess("通过成功");
|
|
|
|
|
}
|
|
|
|
|
this.getTaskInfo();
|
|
|
|
|
});
|
2024-11-15 09:03:22 +08:00
|
|
|
}
|
|
|
|
|
},
|
2024-11-15 13:53:51 +08:00
|
|
|
//多个驳回
|
2024-11-15 09:03:22 +08:00
|
|
|
handleFailAll() {
|
|
|
|
|
if (this.ids.length == 0) {
|
|
|
|
|
this.$alert("请至少勾选一条审核数据", "提示", {
|
|
|
|
|
type: "warning",
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
2024-11-15 13:53:51 +08:00
|
|
|
auditPass(this.failTemp).then((response) => {
|
|
|
|
|
if (response.code == 200) {
|
|
|
|
|
this.$modal.msgSuccess("驳回成功");
|
|
|
|
|
}
|
|
|
|
|
this.getTaskInfo();
|
|
|
|
|
});
|
2024-11-15 09:03:22 +08:00
|
|
|
}
|
|
|
|
|
},
|
2024-11-14 15:30:10 +08:00
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
::v-deep.el-table .fixed-width .el-button--mini {
|
|
|
|
|
width: 60px !important;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
//隐藏图片上传框的css
|
|
|
|
|
::v-deep.disabled {
|
|
|
|
|
.el-upload--picture-card {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.custom-textarea {
|
|
|
|
|
width: 300px;
|
|
|
|
|
height: 100px;
|
|
|
|
|
}
|
|
|
|
|
.accept-img {
|
|
|
|
|
color: #409eff;
|
|
|
|
|
|
|
|
|
|
.a-two {
|
|
|
|
|
margin-left: 20px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.left-tip {
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
letter-spacing: 1px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|