diff --git a/src/api/repair/testExamine.js b/src/api/repair/testExamine.js index 1ce24116..f287f288 100644 --- a/src/api/repair/testExamine.js +++ b/src/api/repair/testExamine.js @@ -9,10 +9,11 @@ export function getListTestExamineApply(query) { }) } // 查询修试审核详细列表 -export function getAudit(id) { +export function getAuditInfo(query) { return request({ - url: '/material/repair_audit_details/' + id, + url: '/material/repair_audit_details/getRepairAuditList', method: 'get', + params: query }) } diff --git a/src/views/material/repair/testExamine/component/homeApply.vue b/src/views/material/repair/testExamine/component/homeApply.vue index 54f41372..c23e7098 100644 --- a/src/views/material/repair/testExamine/component/homeApply.vue +++ b/src/views/material/repair/testExamine/component/homeApply.vue @@ -338,7 +338,7 @@ export default { endTime: this.queryParams.time && this.queryParams.time[1], pageSize: this.queryParams.pageSize, pageNum: this.queryParams.pageNum, - taskStatus:this.queryParams.taskStatus + taskStatus: this.queryParams.taskStatus, }; getListTestExamineApply(this.addDateRange(params)).then((response) => { this.typeList = response.rows; @@ -364,7 +364,7 @@ export default { }, /** 查看按钮操作 */ handleView(row) { - this.$emit("queryTools", row.taskId, row.id); + this.$emit("queryTools", row.taskId, row.id, row); }, /** 修改按钮操作 */ handleUpdate(row) { @@ -452,9 +452,10 @@ export default { handleExport() { this.download( "/material/repair_audit_details/export", - { ...this.queryParams, + { + ...this.queryParams, startTime: this.queryParams.time && this.queryParams.time[0], - endTime: this.queryParams.time && this.queryParams.time[1] + endTime: this.queryParams.time && this.queryParams.time[1], }, `修试审核_${new Date().getTime()}.xlsx` ); diff --git a/src/views/material/repair/testExamine/component/queryToolsApply.vue b/src/views/material/repair/testExamine/component/queryToolsApply.vue index 33b03cf4..3b445331 100644 --- a/src/views/material/repair/testExamine/component/queryToolsApply.vue +++ b/src/views/material/repair/testExamine/component/queryToolsApply.vue @@ -8,9 +8,9 @@ :inline="true" label-width="120px" > - + - + - + - + + 通过 - 驳回 + @@ -162,54 +170,124 @@ export default { return ""; }, }, + param: { + type: Object, + default: () => { + return ""; + }, + }, }, data() { return { + paramTemp: {}, //任务ID taskId: "", // 遮罩层 loading: true, + total: 0, //租赁单位 uniteList: [], //租赁工程 projectList: [], // 表格数据 equipmentList: [], + // 选中数组 + ids: [], + // 非单个禁用 + single: true, + // 非多个禁用 + multiple: true, // 是否显示弹出层 open: false, rowData: {}, maForm: { - leaseUnitId: undefined, - leaseProjectId: undefined, + pageNum: 1, + pageSize: 10, + unitName: undefined, + projectName: undefined, + repairNum: undefined, }, }; }, computed: {}, mounted() { this.taskId = this.queryTaskId; - // this.projectInfoList(); + this.paramTemp = this.param; this.getTaskInfo(); }, methods: { - // /** 租赁单位和工程-下拉选 */ - // projectInfoList() { - // getListUnite({ id: null }).then((response) => { - // this.uniteList = response.data; - // }); - // getListProject({ id: null }).then((response) => { - // this.projectList = response.data; - // }); - // }, + // 多选框选中数据 + handleSelectionChange(selection) { + this.ids = selection.map((item) => item.id); + this.single = selection.length != 1; + this.multiple = !selection.length; + }, //获取任务详情-列表数据 getTaskInfo() { this.loading = true; - getAuditInfo(this.taskId).then((response) => { - this.maForm = response.data.leaseApplyInfo; - this.equipmentList = response.data.leaseApplyDetailsList; - + getAuditInfo({ taskId: this.taskId }).then((response) => { + this.maForm = this.paramTemp; + this.equipmentList = response.rows; + this.total = response.total; this.loading = false; }); }, + handlePass(row) { + this.$modal + .confirm("是否确认合格所选择的数据项?") + .then(function () { + // return applySend(row.id); + }) + .then(() => { + this.getTaskInfo(); + this.$modal.msgSuccess("合格成功"); + }) + .catch(() => {}); + }, + handleFail(row) { + this.$modal + .confirm("是否确认驳回所选择的数据项?") + .then(function () { + // return applySend(row.id); + }) + .then(() => { + this.getTaskInfo(); + this.$modal.msgSuccess("驳回成功"); + }) + .catch(() => {}); + }, + handlePassAll() { + if (this.ids.length == 0) { + this.$alert("请至少勾选一条审核数据", "提示", { + type: "warning", + confirmButtonText: "确定", + }); + return; + } else { + // applySendAll(this.sendTemp).then((response) => { + // if (response.code == 200) { + // this.$modal.msgSuccess("合格成功"); + // } + // this.getTaskInfo(); + // }); + } + }, + handleFailAll() { + if (this.ids.length == 0) { + this.$alert("请至少勾选一条审核数据", "提示", { + type: "warning", + confirmButtonText: "确定", + }); + return; + } else { + // applySendAll(this.sendTemp).then((response) => { + // if (response.code == 200) { + // this.$modal.msgSuccess("驳回成功"); + // } + // this.getTaskInfo(); + // }); + } + }, }, }; diff --git a/src/views/material/repair/testExamine/index.vue b/src/views/material/repair/testExamine/index.vue index a33f5a19..ab58a9bc 100644 --- a/src/views/material/repair/testExamine/index.vue +++ b/src/views/material/repair/testExamine/index.vue @@ -13,6 +13,7 @@ :editId="editId" :queryTaskId="queryTaskId" :queryId="queryId" + :param="param" :isView="isView" :codingTaskId="codingTaskId" @addTools="addTools" @@ -44,6 +45,7 @@ export default { editId: "", queryId: "", queryTaskId: "", + param: {}, isView: false, codingTaskId: "", }; @@ -71,11 +73,12 @@ export default { this.isShowComponent = "AddTools"; }, /* 查询工机具 */ - queryTools(taskId, id) { + queryTools(taskId, id, row) { this.isView = true; this.pageContent = "详情信息"; this.queryTaskId = taskId; this.queryId = id; + this.param = row; this.isShowComponent = "QueryTools"; }, /* 返回按钮 */