zouyu
2025-03-18 bc44c8e3c9d85691ce3fa73ef1300a6fae46e365
src/views/performance/manHour/work-time-management.vue
@@ -124,6 +124,7 @@
          type="primary"
          @click="openAdd"
          v-show="currentTable == 'ValueTable0'"
           v-hasPermi="['performance:manHour:workTimeManagement:enterData']"
          >录入数据</el-button
        >
        <el-button
@@ -131,6 +132,7 @@
          type="primary"
          @click="handleOut"
          :loading="outLoading"
          v-hasPermi="['performance:manHour:workTimeManagement:export']"
          >导 出</el-button
        >
        <el-button
@@ -138,6 +140,7 @@
          type="primary"
          v-show="currentTable == 'ValueTable0'"
          @click="openBatchCheck(0)"
          v-hasPermi="['performance:manHour:workTimeManagement:batchExamine']"
          >批量审核</el-button
        >
        <el-button
@@ -145,31 +148,12 @@
          type="primary"
          v-show="currentTable == 'ValueTable0'"
          @click="openBatchCheck(1)"
          v-hasPermi="['performance:manHour:workTimeManagement:batchApprove']"
          >批量批准</el-button
        >
      </div>
    </div>
    <div class="table">
      <!-- <ValueTable
        ref="ValueTable0"
        v-if="currentTable == 'ValueTable0'"
        :isColumnWidth="true"
        :url="$api.auxiliaryWorkingHoursDay.selectAuxiliaryWorkingHoursDay"
        :delUrl="$api.auxiliaryWorkingHoursDay.deleteAuxiliaryWorkingHoursDay"
        :componentData="componentData"
        :key="upIndex"
        @delete="handleDelete"
      /> -->
      <!-- <ValueTable
        ref="ValueTable1"
        v-if="currentTable == 'ValueTable1'"
        :isColumnWidth="true"
        :url="
          $api.auxiliaryOutputWorkingHours.selectAuxiliaryOutputWorkingHours
        "
        :componentData="componentData1"
        :key="upIndex1"
      /> -->
      <lims-table
        v-if="currentTable == 'ValueTable0'"
        :tableData="tableData"
@@ -178,7 +162,7 @@
        :column="column"
        :key="upIndex"
        :tableLoading="tableLoading"
        :height="'calc(100vh - 270px)'"
        :height="tableHeight+''"
        :page="page"
        @pagination="pagination"
      ></lims-table>
@@ -189,7 +173,7 @@
        :column="column1"
        :key="upIndex1"
        :tableLoading="tableLoading1"
        :height="'calc(100vh - 270px)'"
        :height="tableHeight+''"
        :page="page1"
        @pagination="pagination1"
      ></lims-table>
@@ -492,9 +476,12 @@
  collectWorkingHours,
  selectshiftByUser,
  selectAuxiliaryWorkingHoursByNumber,
  exportWorkingHours
  exportWorkingHours,
  deleteAuxiliaryWorkingHoursDay
} from "../../../api/business/manHour";
import { getYearAndMonthAndDays } from "../../../utils/date";
import auth from "@/plugins/auth.js";
import { getDicts } from "@/api/system/dict/data";
import Big from "big.js";
@@ -504,6 +491,7 @@
  },
  data() {
    return {
      tableHeight: "",
        shiftList:[],
      tableData: [],
      column: [
@@ -604,7 +592,54 @@
        {
            label: '日期',
            prop: 'dateTime'
        }
        },
        {
          dataType: "action",
          fixed: "right",
          label: "操作",
          operation: [
            {
              name: "删除",
              type: "text",
              clickFun: (row) => {
                this.del(row);
              },
              showHide: () => {
                return auth.hasPermi('performance:manHour:workTimeManagement:del');
              }
            },
            {
              name: "编辑",
              type: "text",
              clickFun: (row) => {
                this.handleEdit(row);
              },
              showHide: () => {
                return auth.hasPermi('performance:manHour:workTimeManagement:edit');
              }
            },
            {
              name: "审核",
              type: "text",
              clickFun: (row) => {
                this.handleCheck(row);
              },
              showHide: () => {
                return auth.hasPermi('performance:manHour:workTimeManagement:examine');
              }
            },
            {
              name: "批准",
              type: "text",
              clickFun: (row) => {
                this.handleRatify(row);
              },
              showHide: () => {
                return auth.hasPermi('performance:manHour:workTimeManagement:approve');
              }
            },
          ],
        },
      ],
      tableLoading: false,
      page: {
@@ -824,6 +859,7 @@
    //当只有产量工时tab页时,当前页改为产量工时页
    this.selectEnumByCategory();
    this.setDate();
    this.getTableHeight();
  },
  mounted() {
    console.log(11);
@@ -833,6 +869,25 @@
    this.entityCopy1 = this.HaveJson(this.entity);
  },
  methods: {
    getTableHeight() {
      this.tableHeight = window.innerHeight -50 -46 - 63 - 80 - 41 -30 -30 -32;
    },
    del(row) {
      console.log(row);
      this.$confirm("此操作将永久删除, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        deleteAuxiliaryWorkingHoursDay({id:row.id}).then((res) => {
          this.$message({
            type: "success",
            message: "删除成功!",
          });
          this.refreshTable();
        });
      });
    },
    getData() {
      if (this.currentTable == "ValueTable0") {
        console.log('辅助工时');
@@ -857,8 +912,8 @@
        console.log('产量工时');
        this.tableLoading1 = true;
        let params = {
            current: this.page.current,
            size: this.page.size,
            current: this.page1.current,
            size: this.page1.size,
            dateTime1: this.entity.dateTime[0],
            dateTime2: this.entity.dateTime[1],
            week: this.entity.week,
@@ -874,13 +929,13 @@
          });
      }
    },
    pagination({ current, limit }) {
      this.page.current = current;
    pagination({ page, limit }) {
      this.page.current = page;
      this.page.size = limit;
      this.getData();
    },
    pagination1({ current, limit }) {
      this.page1.current = current;
    pagination1({ page, limit }) {
      this.page1.current = page;
      this.page1.size = limit;
      this.getData();
    },
@@ -1137,7 +1192,6 @@
            this.$message.success("操作成功");
            this.checkVisible = false;
            this.refreshTable("page");
            this.collectWorkingHours();
          });
      }
    },