From 4b9dfff19ff70db47f99cb93070d0650267c6896 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期四, 06 三月 2025 16:22:19 +0800 Subject: [PATCH] 检验任务-添加查看工时功能 --- src/views/business/inspectionTask/index.vue | 35 ++++++++++++++++++++++++----------- 1 files changed, 24 insertions(+), 11 deletions(-) diff --git a/src/views/business/inspectionTask/index.vue b/src/views/business/inspectionTask/index.vue index d9ded15..b514734 100644 --- a/src/views/business/inspectionTask/index.vue +++ b/src/views/business/inspectionTask/index.vue @@ -232,7 +232,10 @@ ref="showInfoDialog" :showInfoDialog="showInfoDialog" ></ShowInfo> --> + <!--淇敼妫�楠屽�煎脊妗�--> <edit-inspection-item ref="editInspectionItem"></edit-inspection-item> + <!--鏌ョ湅宸ユ椂寮规--> + <viewManHourDia ref="viewManHourDia"></viewManHourDia> </div> </template> @@ -240,6 +243,7 @@ import { getYearAndMonthAndDays } from "@/utils/date"; import EditInspectionItem from "./components/EditInspectionItem.vue"; import limsTable from "@/components/Table/lims-table.vue"; +import viewManHourDia from "./components/viewManHourDia.vue" import { claimInsOrderPlan, upPlanUser2, @@ -258,6 +262,7 @@ components: { EditInspectionItem, limsTable, + viewManHourDia }, dicts: ["urgency_level", "inspection_task_state"], computed: { @@ -376,6 +381,9 @@ formatData: (params) => { return this.urgencyLevel.find((m) => m.value == params).label; }, + formatType: (params) => { + return this.urgencyLevel.find((m) => m.value == params).type; + }, }, { label: "妫�楠岀被鍨�", @@ -394,8 +402,7 @@ prop: "insState", dataType: "tag", formatData: (params) => { - return this.inspectionTaskState.find((m) => m.value == params) - .label; + return this.inspectionTaskState.find((m) => m.value == params).label; }, formatType: (params) => { return this.inspectionTaskState.find((m) => m.value == params).type; @@ -426,9 +433,17 @@ this.editInspection(row); }, disabled: (row) => { - return ( - row.userName == null || row.insState == 3 || row.insState == 5 - ); + return (row.userName == null || row.insState == 3 || row.insState == 5) && this.checkPermi(['update:product:onPlan']) + }, + }, + { + name: "鏌ョ湅宸ユ椂", + type: "text", + clickFun: (row) => { + this.viewManHour(row); + }, + showHide: (row) => { + return this.checkPermi(['get:working:hours:byOrder']) }, }, { @@ -566,7 +581,7 @@ // 鏁版嵁鏌ョ湅鐩稿叧瀛楁---缁撴潫 }; }, - created() { + mounted() { this.getAuthorizedPerson(); this.currentTime = getYearAndMonthAndDays(); this.getDicts("urgency_level").then((response) => { @@ -576,8 +591,6 @@ this.inspectionTaskState = this.dictToValue(response.data); }); this.refreshTable(); - }, - mounted() { this.queryParams.userId = this.userId; }, activated() { @@ -631,9 +644,9 @@ editInspection(row) { this.$refs.editInspectionItem.showDialog(row.id); }, - // 鍒锋柊椤甸潰 - refreshView() { - this.getList(); + // 鏌ョ湅宸ユ椂 + viewManHour(row) { + this.$refs.viewManHourDia.showDialog(row.id); }, // 鏁版嵁鏌ョ湅 handleDataLook(row) { -- Gitblit v1.9.3