zhengyiming
6 天以前 0ef755133054cb0edc9455803c7b7bd23f563aa8
src/views/EmploymentManage/TaskManageList.vue
@@ -81,7 +81,7 @@
import { format } from '@/utils';
import { ModelValueType } from 'element-plus';
import { Message } from '@bole-core/core';
import { create } from 'lodash';
import dayjs from 'dayjs';
defineOptions({
  name: 'TaskManageList',
@@ -95,6 +95,9 @@
    },
    emits: {
      onClick: (role) => goAddOrEdit(role),
    },
    extraProps: {
      hide: (row: API.GetTaskInfosQueryResultItem) => row.status === EnumTaskStatus.Complete,
    },
  },
  {
@@ -226,6 +229,23 @@
          return `${row.serviceFee}${EnumBillingMethodUnitText[row.billingMethod]}`;
        },
      },
      applyBeginTime: { type: 'date', format: 'YYYY-MM-DD' },
      applyEndTime: { type: 'date', format: 'YYYY-MM-DD' },
      //@ts-ignore
      applyStatus: {
        formatter: (row: API.GetTaskInfosQueryResultItem) => {
          const applyBeginTime = dayjs(row.applyBeginTime);
          const applyEndTime = dayjs(row.applyEndTime);
          const now = dayjs();
          if (applyEndTime.isBefore(now)) {
            return '已结束';
          } else if (applyBeginTime.isAfter(now)) {
            return '待开始';
          } else {
            return '进行中';
          }
        },
      },
    },
  }
);