Crunchy
2025-03-17 0a26d58a3906b9e13946c7cb46fae51a0de98920
src/views/performance/manHour/workTimeManagement.vue
@@ -47,23 +47,23 @@
        <el-radio-button label="ValueTable1"> 产量工时 </el-radio-button>
      </el-radio-group>
      <div style="display: flex; align-items: center">
        <p style="font-size: 14px; margin-right: 30px">
          总工时汇总:<span v-if="totalInfo" style="font-size: 16px; color: #3a7bfa">{{
            totalInfo["产量工时汇总"] + totalInfo["辅助工时汇总"]
              ? Number(
                totalInfo["产量工时汇总"] + totalInfo["辅助工时汇总"]
              ).tofixed(4)
              : 0
          }}</span>&nbsp;&nbsp;&nbsp;&nbsp;产量工时汇总:<span v-if="totalInfo" style="font-size: 16px; color: #3a7bfa">{{
              totalInfo["产量工时汇总"]
                ? Number(totalInfo["产量工时汇总"]).tofixed(4)
                : 0
            }}</span>&nbsp;&nbsp;&nbsp;&nbsp;辅助工时汇总:<span v-if="totalInfo" style="font-size: 16px; color: #3a7bfa">{{
              totalInfo["辅助工时汇总"]
                ? Number(totalInfo["辅助工时汇总"]).tofixed(4)
                : 0
            }}</span>
        </p>
<!--        <p style="font-size: 14px; margin-right: 30px">-->
<!--          总工时汇总:<span v-if="totalInfo" style="font-size: 16px; color: #3a7bfa">{{-->
<!--            totalInfo["产量工时汇总"] + totalInfo["辅助工时汇总"]-->
<!--              ? Number(-->
<!--                totalInfo["产量工时汇总"] + totalInfo["辅助工时汇总"]-->
<!--              ).tofixed(4)-->
<!--              : 0-->
<!--          }}</span>&nbsp;&nbsp;&nbsp;&nbsp;产量工时汇总:<span v-if="totalInfo" style="font-size: 16px; color: #3a7bfa">{{-->
<!--              totalInfo["产量工时汇总"]-->
<!--                ? Number(totalInfo["产量工时汇总"]).tofixed(4)-->
<!--                : 0-->
<!--            }}</span>&nbsp;&nbsp;&nbsp;&nbsp;辅助工时汇总:<span v-if="totalInfo" style="font-size: 16px; color: #3a7bfa">{{-->
<!--              totalInfo["辅助工时汇总"]-->
<!--                ? Number(totalInfo["辅助工时汇总"]).tofixed(4)-->
<!--                : 0-->
<!--            }}</span>-->
<!--        </p>-->
        <el-button v-show="currentTable == 'ValueTable0' &&
          checkPermi(['performance:manHour:workTimeManagement:add'])
          " size="small" type="primary" @click="openAdd">录入数据</el-button>
@@ -250,13 +250,13 @@
      down: false,
      addFileVisible: false,
      weekList: [
        { label: "周一", value: "周一", type: "primary" },
        { label: "周二", value: "周二", type: "primary" },
        { label: "周三", value: "周三", type: "primary" },
        { label: "周四", value: "周四", type: "primary" },
        { label: "周五", value: "周五", type: "primary" },
        { label: "周六", value: "周六", type: "primary" },
        { label: "周日", value: "周日", type: "primary" },
        { label: "周一", value: "1", type: "primary" },
        { label: "周二", value: "2", type: "primary" },
        { label: "周三", value: "3", type: "primary" },
        { label: "周四", value: "4", type: "primary" },
        { label: "周五", value: "5", type: "primary" },
        { label: "周六", value: "6", type: "primary" },
        { label: "周日", value: "0", type: "primary" },
      ],
      currentTable: "ValueTable0",
      addVisible: false,
@@ -354,10 +354,23 @@
          label: "班次",
          prop: "shift",
          dataType: "tag",
          formatData: this.shifList,
          formatData: (params) => {
            if (this.shifList.find(m => m.value == params)) {
              return this.shifList.find(m => m.value == params).label
            } else {
              return null
            }
          },
        },
        { label: "周次", prop: "week" },
        { label: "星期", prop: "weekDay" },
        {
          label: "星期",
          prop: "weekDay",
          dataType: "tag",
          formatData: (params) => {
            return this.weekList.find(m => m.value == params).label
          },
        },
        { label: "创建时间", prop: "createTime" },
        { label: "日期", prop: "dateTime" },
        {
@@ -505,7 +518,7 @@
  },
  mounted() {
    this.getCurrentWeekNumber();
    this.collectWorkingHours();
    // this.collectWorkingHours();
    this.selectshiftByUser();
    this.searchList()
  },
@@ -612,10 +625,12 @@
        this.page0.current = 1;
        this.getList0(entity);
      }
      this.collectWorkingHours();
      // this.collectWorkingHours();
    },
    refresh() {
      this.entity = {};
      this.entity.dateTime = []
      this.setDate()
      this.refreshTable();
    },
    openAdd() {
@@ -677,7 +692,7 @@
          this.formData.auxiliaryProject = "";
          this.addVisible = false;
          this.refreshTable("page");
          this.collectWorkingHours();
          // this.collectWorkingHours();
        });
      } else {
        updateAuxiliaryWorkingHoursDay(this.formData).then((res) => {
@@ -690,7 +705,7 @@
          this.formData.nonproductiveTime = "";
          this.formData.auxiliaryProject = "";
          this.refreshTable("page");
          this.collectWorkingHours();
          // this.collectWorkingHours();
        });
      }
    },
@@ -745,7 +760,7 @@
    submitBatchCheckDialog() {
      this.batchCheckDialog = false;
      this.refreshTable("page");
      this.collectWorkingHours();
      // this.collectWorkingHours();
    },
    submitCheck(e) {
      if (!this.formData0.number) {
@@ -773,7 +788,7 @@
        this.$message.success("操作成功");
        this.checkVisible = false;
        this.refreshTable("page");
        this.collectWorkingHours();
        // this.collectWorkingHours();
      });
    },
    getCurrentWeekNumber(now = new Date()) {