| | |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 label="服务费金额:"> |
| | | {{ |
| | | taskInfo.billingMethod === EnumBillingMethod.Face |
| | | ? EnumBillingMethodText[taskInfo.billingMethod] |
| | | : `${taskInfo.serviceFee}${EnumBillingMethodUnitText[taskInfo.billingMethod]}` |
| | | }} |
| | | {{ OrderUtils.getServiceFeeText(taskInfo.serviceFee, taskInfo.billingMethod) }} |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | </ProFormCol> |
| | |
| | | import * as taskServices from '@/services/api/task'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { CheckReceiveTaskDetailColumns } from './constants'; |
| | | import { OrderUtils } from '@/utils'; |
| | | import { EnumBillingMethodUnitText, EnumBillingMethod, EnumBillingMethodText } from '@/constants'; |
| | | import dayjs from 'dayjs'; |
| | | import CheckManageDialog from './components/CheckManageDialog.vue'; |
| | |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'exportBtn', |
| | | name: '验收', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => openDialog(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetCheckReceiveTaskQueryResultItem) => |
| | | row.checkReceiveStatus === EnumTaskCheckReceiveStatus.Completed || |
| | | state.checkReceiveMethod === EnumTaskCheckReceiveMethod.CheckIn, |
| | | }, |
| | | }, |
| | | // { |
| | | // data: { |
| | | // enCode: 'exportBtn', |
| | | // name: '验收', |
| | | // }, |
| | | // emits: { |
| | | // onClick: (role) => openDialog(role), |
| | | // }, |
| | | // extraProps: { |
| | | // hide: (row: API.GetCheckReceiveTaskQueryResultItem) => |
| | | // row.checkReceiveStatus === EnumTaskCheckReceiveStatus.Completed || |
| | | // state.checkReceiveMethod === EnumTaskCheckReceiveMethod.CheckIn, |
| | | // }, |
| | | // }, |
| | | { |
| | | data: { |
| | | enCode: 'detailBtn', |
| | |
| | | |
| | | const BaseState = { |
| | | loading: true, |
| | | checkReceiveMethod: '' as any as EnumTaskCheckReceiveMethod, |
| | | checkReceiveMethods: [] as any as EnumTaskCheckReceiveMethod[], |
| | | }; |
| | | |
| | | const state = reactive({ ...BaseState }); |
| | |
| | | let res = await taskCheckReceiveServices.getCheckReceiveTask(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | state.checkReceiveMethod = res.objectData?.checkReceiveMethod; |
| | | state.checkReceiveMethods = res.objectData?.checkReceiveMethods; |
| | | return res; |
| | | } catch (error) {} |
| | | }, |
| | |
| | | ); |
| | | |
| | | function openDialog(row: API.GetCheckReceiveTaskQueryResultItem, isDetail = false) { |
| | | if (state.checkReceiveMethod === EnumTaskCheckReceiveMethod.CheckIn) { |
| | | handleManualEdit({ |
| | | id: row.id, |
| | | }); |
| | | } else { |
| | | handleEdit({ |
| | | id: row.id, |
| | | isDetail, |
| | | }); |
| | | } |
| | | // if (state.checkReceiveMethod === EnumTaskCheckReceiveMethod.CheckIn) { |
| | | // handleManualEdit({ |
| | | // id: row.id, |
| | | // }); |
| | | // } else { |
| | | // } |
| | | handleEdit({ |
| | | id: row.id, |
| | | checkReceiveMethods: state.checkReceiveMethods, |
| | | isDetail, |
| | | }); |
| | | } |
| | | |
| | | const { dialogProps, handleEdit } = useFormDialog({ |
| | | defaultFormParams: { |
| | | id: '', |
| | | checkReceiveMethods: [] as any as EnumTaskCheckReceiveMethod[], |
| | | isDetail: false, |
| | | }, |
| | | }); |