| | |
| | | </QueryFilterItem> |
| | | </template> |
| | | <template #btn> |
| | | <el-button @click="goAddOrEdit()" type="primary">发布</el-button> |
| | | <!-- <el-button @click="goAddOrEdit()" type="primary">发布</el-button> --> |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | |
| | | 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'; |
| | |
| | | defineOptions({ |
| | | name: 'TaskManageList', |
| | | }); |
| | | |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | // editBtn: { |
| | | // emits: { |
| | | // onClick: (role) => goAddOrEdit(role), |
| | | // }, |
| | | // extraProps: { |
| | | // hide: (row: API.GetTaskInfosQueryResultItem) => row.status === EnumTaskStatus.Complete, |
| | | // }, |
| | | // }, |
| | | detailBtn: { |
| | | emits: { |
| | | onClick: (row: API.GetTaskInfosQueryResultItem) => goDetail(row), |
| | | }, |
| | | }, |
| | | // publishBtn: { |
| | | // emits: { |
| | | // onClick: (row: API.GetTaskInfosQueryResultItem) => |
| | | // setTaskInfoReleaseStatus(row, EnumTaskReleaseStatus.InProcess), |
| | | // }, |
| | | // extraProps: { |
| | | // hide: (row: API.GetTaskInfosQueryResultItem) => |
| | | // row.releaseStatus === EnumTaskReleaseStatus.InProcess, |
| | | // }, |
| | | // }, |
| | | // unPublishBtn: { |
| | | // emits: { |
| | | // onClick: (row: API.GetTaskInfosQueryResultItem) => |
| | | // setTaskInfoReleaseStatus(row, EnumTaskReleaseStatus.Stopped), |
| | | // }, |
| | | // extraProps: { |
| | | // hide: (row: API.GetTaskInfosQueryResultItem) => |
| | | // row.releaseStatus === EnumTaskReleaseStatus.Stopped, |
| | | // }, |
| | | // }, |
| | | }; |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | // { |
| | |
| | | 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' }, |
| | |
| | | params: { |
| | | id: row?.id ?? '', |
| | | }, |
| | | query: { |
| | | supplierEnterpriseId: row?.supplierEnterpriseId, |
| | | }, |
| | | }); |
| | | } |
| | | function goDetail(row: API.GetTaskInfosQueryResultItem) { |