| | |
| | | <template> |
| | | <LoadingLayout :loading="state.loading"> |
| | | <LoadingLayout v-loading="state.loading"> |
| | | <AppContainer> |
| | | <el-card class="query-filter-bar-wrapper" shadow="never"> |
| | | <ProForm :model="taskInfo" is-read> |
| | |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 label="服务费金额:"> |
| | | {{ `${taskInfo.serviceFee}${EnumBillingMethodUnitText[taskInfo.billingMethod]}` }} |
| | | {{ |
| | | taskInfo.billingMethod === EnumBillingMethod.Face |
| | | ? EnumBillingMethodText[taskInfo.billingMethod] |
| | | : `${taskInfo.serviceFee}${EnumBillingMethodUnitText[taskInfo.billingMethod]}` |
| | | }} |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | </ProFormCol> |
| | |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | <CheckManageDialog v-bind="dialogProps" /> |
| | | <ManualCheckManageDialog v-bind="dialogManualProps" /> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | |
| | | import * as taskServices from '@/services/api/task'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { CheckReceiveTaskDetailColumns } from './constants'; |
| | | import { EnumBillingMethodUnitText } from '@/constants'; |
| | | import { EnumBillingMethodUnitText, EnumBillingMethod, EnumBillingMethodText } from '@/constants'; |
| | | import dayjs from 'dayjs'; |
| | | import CheckManageDialog from './components/CheckManageDialog.vue'; |
| | | import ManualCheckManageDialog from './components/ManualCheckManageDialog.vue'; |
| | | |
| | | defineOptions({ |
| | | name: 'CheckReceiveTaskDetail', |
| | |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetCheckReceiveTaskQueryResultItem) => |
| | | row.checkReceiveStatus !== EnumTaskCheckReceiveStatus.WaitCheckReceive, |
| | | row.checkReceiveStatus === EnumTaskCheckReceiveStatus.Completed || |
| | | state.checkReceiveMethod === EnumTaskCheckReceiveMethod.CheckIn, |
| | | }, |
| | | }, |
| | | { |
| | |
| | | |
| | | const BaseState = { |
| | | loading: true, |
| | | checkReceiveMethod: '' as any as EnumTaskCheckReceiveMethod, |
| | | }; |
| | | |
| | | const state = reactive({ ...BaseState }); |
| | |
| | | let res = await taskCheckReceiveServices.getCheckReceiveTask(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | state.checkReceiveMethod = res.objectData?.checkReceiveMethod; |
| | | return res; |
| | | } catch (error) {} |
| | | }, |
| | |
| | | ); |
| | | |
| | | function openDialog(row: API.GetCheckReceiveTaskQueryResultItem, isDetail = false) { |
| | | handleEdit({ |
| | | id: row.id, |
| | | isDetail, |
| | | }); |
| | | if (state.checkReceiveMethod === EnumTaskCheckReceiveMethod.CheckIn) { |
| | | handleManualEdit({ |
| | | id: row.id, |
| | | }); |
| | | } else { |
| | | handleEdit({ |
| | | id: row.id, |
| | | isDetail, |
| | | }); |
| | | } |
| | | } |
| | | |
| | | const { dialogProps, handleEdit } = useFormDialog({ |
| | |
| | | isDetail: false, |
| | | }, |
| | | }); |
| | | |
| | | const { dialogProps: dialogManualProps, handleEdit: handleManualEdit } = useFormDialog({ |
| | | defaultFormParams: { |
| | | id: '', |
| | | }, |
| | | }); |
| | | </script> |