|  |  |  | 
|---|
|  |  |  | </ProTableV2> | 
|---|
|  |  |  | </AppContainer> | 
|---|
|  |  |  | <CheckManageDialog v-bind="dialogProps" /> | 
|---|
|  |  |  | <ManualCheckManageDialog v-bind="dialogManualProps" /> | 
|---|
|  |  |  | </LoadingLayout> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | import { EnumBillingMethodUnitText } 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> | 
|---|