zhengyiming
6 天以前 0ef755133054cb0edc9455803c7b7bd23f563aa8
src/views/EmploymentManage/TaskManageList.vue
@@ -81,6 +81,7 @@
import { format } from '@/utils';
import { ModelValueType } from 'element-plus';
import { Message } from '@bole-core/core';
import dayjs from 'dayjs';
defineOptions({
  name: 'TaskManageList',
@@ -228,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 '进行中';
          }
        },
      },
    },
  }
);