zhengyiming
3 天以前 c848d51eb43c87463fc8ce0b8e4996bb3f80894c
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,
    },
  },
  {
@@ -223,7 +226,26 @@
      serviceFee: {
        type: 'money',
        formatter: (row) => {
          return `${row.serviceFee}${EnumBillingMethodUnitText[row.billingMethod]}`;
          return row.billingMethod === EnumBillingMethod.Face
            ? ''
            : `${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 '进行中';
          }
        },
      },
    },