| | |
| | | </ProForm> |
| | | </el-card> |
| | | |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="CheckReceiveTaskDetailColumns" |
| | | :operationBtns="operationBtns" |
| | | > |
| | | <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | <CheckManageDialog v-bind="dialogProps" /> |
| | |
| | | AppContainer, |
| | | useTable, |
| | | useFormDialog, |
| | | defineOperationBtns, |
| | | ProForm, |
| | | ProFormCol, |
| | | ProFormColItem, |
| | | ProFormItemV2, |
| | | ProTableQueryFilterBar, |
| | | } from '@bole-core/components'; |
| | | import * as taskCheckReceiveServices from '@/services/api/taskCheckReceive'; |
| | | 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'; |
| | | import ManualCheckManageDialog from './components/ManualCheckManageDialog.vue'; |
| | |
| | | name: 'CheckReceiveTaskDetail', |
| | | }); |
| | | |
| | | 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: 'detailBtn', |
| | | name: '详情', |
| | | }, |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | detailBtn: { |
| | | emits: { |
| | | onClick: (role) => openDialog(role, true), |
| | | }, |
| | | }, |
| | | ]); |
| | | exportBtn: { |
| | | emits: { |
| | | onClick: (role) => openDialog(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetCheckReceiveTaskQueryResultItem) => |
| | | !( |
| | | row.checkReceiveStatus === EnumTaskCheckReceiveStatus.WaitCheckReceive && |
| | | row.checkReceiveMethods.includes(EnumTaskCheckReceiveMethod.Submit) && |
| | | !taskInfo.value?.isInternal |
| | | ), |
| | | }, |
| | | }, |
| | | }; |
| | | |
| | | const { checkSubModuleItemShow, column, operationBtns } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const route = useRoute(); |
| | | const id = (route.params.id as string) ?? ''; |
| | |
| | | const BaseState = { |
| | | loading: true, |
| | | checkReceiveMethods: [] as any as EnumTaskCheckReceiveMethod[], |
| | | |
| | | isInternal: false, |
| | | }; |
| | | |
| | | const state = reactive({ ...BaseState }); |
| | |
| | | showLoading: !state.loading, |
| | | }); |
| | | state.checkReceiveMethods = res.objectData?.checkReceiveMethods; |
| | | state.isInternal = res.objectData?.isInternal; |
| | | return res; |
| | | } catch (error) {} |
| | | }, |
| | |
| | | handleEdit({ |
| | | id: row.id, |
| | | checkReceiveMethods: state.checkReceiveMethods, |
| | | isInternal: state.isInternal, |
| | | isDetail, |
| | | }); |
| | | } |
| | |
| | | defaultFormParams: { |
| | | id: '', |
| | | checkReceiveMethods: [] as any as EnumTaskCheckReceiveMethod[], |
| | | isInternal: false, |
| | | isDetail: false, |
| | | }, |
| | | }); |