wupengfei
2025-11-07 48f06e862f95eebb8978defd25d184316a7f6fd1
src/views/EmploymentManage/TaskManageList.vue
@@ -43,7 +43,7 @@
          </QueryFilterItem>
        </template>
        <template #btn>
          <el-button @click="goAddOrEdit()" type="primary">发布</el-button>
          <!-- <el-button @click="goAddOrEdit()" type="primary">发布</el-button> -->
        </template>
      </ProTableQueryFilterBar>
      <ProTableV2
@@ -78,7 +78,7 @@
import { EnumTaskStatusText, EnumTaskReleaseStatusText } from '@/constants';
import { useGlobalEventContext } from '@/hooks';
import * as taskServices from '@/services/api/task';
import { format } from '@/utils';
import { format, OrderUtils } from '@/utils';
import { ModelValueType } from 'element-plus';
import { Message } from '@bole-core/core';
import dayjs from 'dayjs';
@@ -88,18 +88,18 @@
});
const operationBtns = defineOperationBtns([
  {
    data: {
      enCode: 'editBtn',
      name: '编辑',
    },
    emits: {
      onClick: (role) => goAddOrEdit(role),
    },
    extraProps: {
      hide: (row: API.GetTaskInfosQueryResultItem) => row.status === EnumTaskStatus.Complete,
    },
  },
  // {
  //   data: {
  //     enCode: 'editBtn',
  //     name: '编辑',
  //   },
  //   emits: {
  //     onClick: (role) => goAddOrEdit(role),
  //   },
  //   extraProps: {
  //     hide: (row: API.GetTaskInfosQueryResultItem) => row.status === EnumTaskStatus.Complete,
  //   },
  // },
  {
    data: {
      enCode: 'detailBtn',
@@ -109,47 +109,47 @@
      onClick: (row: API.GetTaskInfosQueryResultItem) => goDetail(row),
    },
  },
  {
    data: {
      enCode: 'publishBtn',
      name: '发布',
    },
    emits: {
      onClick: (row: API.GetTaskInfosQueryResultItem) =>
        setTaskInfoReleaseStatus(row, EnumTaskReleaseStatus.InProcess),
    },
    extraProps: {
      hide: (row: API.GetTaskInfosQueryResultItem) =>
        row.releaseStatus === EnumTaskReleaseStatus.InProcess,
    },
  },
  {
    data: {
      enCode: 'unPublishBtn',
      name: '停止发布',
    },
    emits: {
      onClick: (row: API.GetTaskInfosQueryResultItem) =>
        setTaskInfoReleaseStatus(row, EnumTaskReleaseStatus.Stopped),
    },
    extraProps: {
      hide: (row: API.GetTaskInfosQueryResultItem) =>
        row.releaseStatus === EnumTaskReleaseStatus.Stopped,
    },
  },
  {
    data: {
      enCode: 'arrangeBtn',
      name: '安排',
    },
    emits: {
      onClick: (row: API.GetTaskInfosQueryResultItem) => handleArrange(row),
    },
    extraProps: {
      hide: (row: API.GetTaskInfosQueryResultItem) =>
        row.releaseStatus === EnumTaskReleaseStatus.Stopped,
    },
  },
  // {
  //   data: {
  //     enCode: 'publishBtn',
  //     name: '发布',
  //   },
  //   emits: {
  //     onClick: (row: API.GetTaskInfosQueryResultItem) =>
  //       setTaskInfoReleaseStatus(row, EnumTaskReleaseStatus.InProcess),
  //   },
  //   extraProps: {
  //     hide: (row: API.GetTaskInfosQueryResultItem) =>
  //       row.releaseStatus === EnumTaskReleaseStatus.InProcess,
  //   },
  // },
  // {
  //   data: {
  //     enCode: 'unPublishBtn',
  //     name: '停止发布',
  //   },
  //   emits: {
  //     onClick: (row: API.GetTaskInfosQueryResultItem) =>
  //       setTaskInfoReleaseStatus(row, EnumTaskReleaseStatus.Stopped),
  //   },
  //   extraProps: {
  //     hide: (row: API.GetTaskInfosQueryResultItem) =>
  //       row.releaseStatus === EnumTaskReleaseStatus.Stopped,
  //   },
  // },
  // {
  //   data: {
  //     enCode: 'arrangeBtn',
  //     name: '安排',
  //   },
  //   emits: {
  //     onClick: (row: API.GetTaskInfosQueryResultItem) => handleArrange(row),
  //   },
  //   extraProps: {
  //     hide: (row: API.GetTaskInfosQueryResultItem) =>
  //       row.releaseStatus === EnumTaskReleaseStatus.Stopped,
  //   },
  // },
]);
const router = useRouter();
@@ -225,10 +225,8 @@
      endTime: { type: 'date', format: 'YYYY-MM-DD' },
      serviceFee: {
        type: 'money',
        formatter: (row) => {
          return row.billingMethod === EnumBillingMethod.Face
            ? ''
            : `${row.serviceFee}${EnumBillingMethodUnitText[row.billingMethod]}`;
        formatter: (row: API.GetTaskInfosQueryResultItem) => {
          return OrderUtils.getServiceFeeText(row.serviceFee, row.billingMethod);
        },
      },
      applyBeginTime: { type: 'date', format: 'YYYY-MM-DD' },
@@ -284,6 +282,9 @@
    params: {
      id: row?.id ?? '',
    },
    query: {
      supplierEnterpriseId: row?.supplierEnterpriseId,
    },
  });
}
function goDetail(row: API.GetTaskInfosQueryResultItem) {