From d66ab921c996c38da3aa373ffdc7c974c157df33 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 07 三月 2025 09:37:53 +0800
Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/lims-ruoyi-before into dev

---
 src/views/business/inspectionTask/components/viewManHourDia.vue |  204 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 204 insertions(+), 0 deletions(-)

diff --git a/src/views/business/inspectionTask/components/viewManHourDia.vue b/src/views/business/inspectionTask/components/viewManHourDia.vue
new file mode 100644
index 0000000..54268fd
--- /dev/null
+++ b/src/views/business/inspectionTask/components/viewManHourDia.vue
@@ -0,0 +1,204 @@
+<template>
+  <div>
+    <el-dialog
+      :visible.sync="editInspectionDia"
+      title="鏌ョ湅宸ユ椂"
+      width="80%"
+      @close="editInspectionDia = false"
+    >
+      <div>
+        <el-form :model="entity" :inline="true">
+          <el-form-item label="妫�楠岄」" prop="outputWorkTime">
+            <el-input v-model="entity.inspectionItem" clearable size="small"></el-input>
+          </el-form-item>
+          <el-form-item>
+            <el-button size="small" type="primary" @click="getList0">鏌ヨ</el-button>
+          </el-form-item>
+        </el-form>
+      </div>
+      <lims-table :tableData="tableData0" :column="column0"
+                  :page="page0" :tableLoading="tableLoading"
+                  height="500" @pagination="pagination0"></lims-table>
+      <span slot="footer" class="dialog-footer" v-if="insState == 99">
+        <el-button @click="editInspectionDia = false">鍙� 娑�</el-button>
+        <el-button type="primary" @click="handleSubmit">纭� 瀹�</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog :visible.sync="editAskDia" title="淇敼" width="50%">
+      <el-form ref="form" :model="editForm" label-width="100px">
+        <el-form-item label="妫�娴嬩汉" prop="name">
+          <el-select v-model="editForm.name" clearable size="small">
+            <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="浜ч噺宸ユ椂" prop="outputWorkTime">
+          <el-input v-model="editForm.outputWorkTime" clearable size="small"></el-input>
+        </el-form-item>
+        <el-form-item label="鏃ユ湡" prop="dateTime">
+          <el-date-picker
+            v-model="editForm.dateTime"
+            placeholder="閫夋嫨鏃ユ湡"
+            size="small"
+            style="width: 100%;"
+            type="date"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd">
+          </el-date-picker>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="editAskDia = false">鍙� 娑�</el-button>
+        <el-button
+          :loading="handleEditLoading"
+          type="primary"
+          @click="handleEdit"
+        >纭� 瀹�</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import limsTable from "@/components/Table/lims-table.vue";
+import {
+  getWorkingHoursByOrderId, updateWorkingHours,
+} from "@/api/business/inspectionTask.js";
+import {selectUserCondition} from "@/api/system/user";
+export default {
+  name: "EditInspectionItem",
+  // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
+  components: { limsTable },
+  data() {
+    // 杩欓噷瀛樻斁鏁版嵁
+    return {
+      editInspectionDia: false,
+      entity: {
+        orderId: 0,
+        inspectionItem: ''
+      },
+      insState: 0,
+      tableData0: [],
+      tableLoading: false,
+      column0: [
+        { label: "妫�娴嬩汉", prop: "name" },
+        { label: "妫�娴嬮」鍒嗙被", prop: "inspectionItemClass" },
+        { label: "妫�娴嬮」", prop: "inspectionItem", width: 110 },
+        { label: "妫�娴嬪瓙椤�", prop: "inspectionItemSubclass", width: 110  },
+        { label: "鏍峰搧缂栧彿", prop: "sample", width: 160 },
+        { label: "濮旀墭鍗曞彿", prop: "orderNo", width: 160 },
+        { label: "鐢电紗鏍囪瘑", prop: "cableTag" },
+        { label: "浜ч噺宸ユ椂", prop: "outputWorkTime" },
+        { label: "宸ユ椂鍒嗙粍", prop: "manHourGroup" },
+        { label: "鍗曚环", prop: "price" },
+        { label: "鏃ユ湡", prop: "dateTime" },
+        { label: "鍛ㄦ", prop: "week" },
+        { label: "鏄熸湡", prop: "weekDay" },
+        {
+          dataType: "action",
+          width: "80px",
+          label: "鎿嶄綔",
+          fixed: "right",
+          operation: [
+            {
+              name: "缂栬緫",
+              type: "text",
+              clickFun: (row) => {
+                this.editIns(row);
+              },
+              disabled: (row) => {
+                return this.insState == 3 || this.insState == 5 || this.insState == 99
+              },
+            },
+          ],
+        },
+      ],
+      page0: {
+        total: 0,
+        size: 10,
+        current: 1,
+      },
+      editAskDia: false,
+      editForm: {
+        id: "",
+        name: "",
+        outputWorkTime: "",
+        inspectionValueType: "",
+      },
+      handleEditLoading: false,
+      inspectionValueType: [],
+      responsibleOptions: []
+    };
+  },
+  mounted() {
+
+  },
+  // 鏂规硶闆嗗悎
+  methods: {
+    showDialog(id, insState) {
+      this.insState = insState
+      this.editInspectionDia = true;
+      this.entity.orderId = id;
+      this.getList0();
+    },
+    getList0() {
+      this.tableLoading = true;
+      getWorkingHoursByOrderId({ ...this.entity, ...this.page0 })
+        .then((res) => {
+          this.tableLoading = false;
+          if (res.code === 200) {
+            this.tableData0 = res.data.records;
+            this.page0.total = res.data.total;
+          }
+        })
+        .catch((err) => {
+          this.tableLoading = false;
+        });
+    },
+    // 淇敼寮规
+    editIns(row) {
+      this.editAskDia = true;
+      this.editForm = { ...row };
+      this.getUserList()
+    },
+    // 鎻愪氦淇敼
+    handleEdit() {
+      this.handleEditLoading = true;
+      updateWorkingHours({...this.editForm})
+        .then((res) => {
+          this.handleEditLoading = false;
+          this.$message.success("淇敼鎴愬姛");
+          this.editAskDia = false;
+          this.getList0();
+        })
+        .catch(() => {
+          this.handleEditLoading = false;
+        });
+    },
+    // 纭宸ユ椂
+    handleSubmit () {
+      this.editInspectionDia = false;
+      this.$emit("submit");
+    },
+    pagination0({ page, limit }) {
+      this.page0.current = page;
+      this.page0.size = limit;
+      this.getList0();
+    },
+    // 鑾峰彇璐熻矗浜轰俊鎭帴鍙�
+    getUserList() {
+      selectUserCondition({ type: 1 }).then((res) => {
+        this.responsibleOptions = res.data;
+      })
+    }
+  },
+};
+</script>
+
+<style scoped>
+.pagination {
+  display: flex;
+  justify-content: space-between;
+}
+</style>

--
Gitblit v1.9.3