yyb
14 小时以前 38dab4b5476d02d686b16d2571ef039200112775
src/views/productionManagement/workOrderManagement/index.vue
@@ -31,7 +31,13 @@
                       :status="toProgressPercentage(row?.completionStatus) >= 100 ? 'success' : ''" />
        </template>
        <template #todayReportState="{ row }">
          {{ formatTodayReportState(row?.todayReportState) }}
          <el-tag :type="todayReportStateTagType(row?.todayReportState)"
                  size="small">
            {{ formatTodayReportState(row?.todayReportState) }}
          </el-tag>
        </template>
        <template #totalReportDurationMinutes="{ row }">
          {{ formatDurationHours(row?.totalReportDurationMinutes) }}
        </template>
      </PIMTable>
    </div>
@@ -197,6 +203,13 @@
      width: "80",
    },
    {
      label: "今日报工状态",
      prop: "todayReportState",
      dataType: "slot",
      slot: "todayReportState",
      width: "110",
    },
    {
      label: "工单编号",
      prop: "workOrderNo",
      width: "140",
@@ -241,16 +254,16 @@
      width: "140",
    },
    {
      label: "今日报工状态",
      prop: "todayReportState",
      dataType: "slot",
      slot: "todayReportState",
      width: "140",
    },
    {
      label: "计划工时(小时)",
      prop: "salaryQuota",
      width: "140",
    },
    {
      label: "系统核算时间(小时)",
      prop: "totalReportDurationMinutes",
      dataType: "slot",
      slot: "totalReportDurationMinutes",
      width: "160",
    },
    {
      label: "计划开始时间",
@@ -449,6 +462,18 @@
    if (state === 2) return "已开始";
    if (state === 3) return "已结束";
    return "-";
  };
  const formatDurationHours = val => {
    const minutes = Number(val);
    if (!Number.isFinite(minutes) || minutes < 0) return "-";
    return (minutes / 60).toFixed(2);
  };
  const todayReportStateTagType = val => {
    const state = Number(val);
    if (state === 1) return "info";
    if (state === 2) return "warning";
    if (state === 3) return "success";
    return "info";
  };
  // 查询列表
@@ -752,6 +777,7 @@
    text-align: center;
    margin-top: 20px;
  }
</style>
<style  lang="scss">