Merge branch 'master' of http://120.26.58.240:8888/r/flexJobAdminBClient
| | |
| | | "EnumTaskReleaseStatusText": true, |
| | | "EnumTaskReleaseStatusTextForTip": true, |
| | | "EnumTaskSettlementOrderStatus": true, |
| | | "EnumTaskSettlementOrderStatusText": true, |
| | | "EnumTaskSettlementStatus": true, |
| | | "EnumTaskSettlementStatusText": true, |
| | | "EnumTaskStatus": true, |
| | | "EnumTaskStatusText": true, |
| | | "EnumTaskUserArrangeStatus": true, |
| | |
| | | "useRouter": true, |
| | | "useSetReactive": true, |
| | | "useSlots": true, |
| | | "useTaskSelect": true, |
| | | "useTemplateRef": true, |
| | | "useUser": true, |
| | | "useVModel": true, |
| | |
| | | const EnumTaskReleaseStatusText: typeof import('./src/constants/task')['EnumTaskReleaseStatusText'] |
| | | const EnumTaskReleaseStatusTextForTip: typeof import('./src/constants/task')['EnumTaskReleaseStatusTextForTip'] |
| | | const EnumTaskSettlementOrderStatus: typeof import('./src/constants/apiEnum')['EnumTaskSettlementOrderStatus'] |
| | | const EnumTaskSettlementOrderStatusText: typeof import('./src/constants/task')['EnumTaskSettlementOrderStatusText'] |
| | | const EnumTaskSettlementStatus: typeof import('./src/constants/apiEnum')['EnumTaskSettlementStatus'] |
| | | const EnumTaskSettlementStatusText: typeof import('./src/constants/task')['EnumTaskSettlementStatusText'] |
| | | const EnumTaskStatus: typeof import('./src/constants/apiEnum')['EnumTaskStatus'] |
| | | const EnumTaskStatusText: typeof import('./src/constants/task')['EnumTaskStatusText'] |
| | | const EnumTaskUserArrangeStatus: typeof import('./src/constants/apiEnum')['EnumTaskUserArrangeStatus'] |
| | |
| | | const useSetReactive: typeof import('./src/hooks/global/helper')['useSetReactive'] |
| | | const useSign: typeof import('./src/hooks/sign')['useSign'] |
| | | const useSlots: typeof import('vue')['useSlots'] |
| | | const useTaskSelect: typeof import('./src/hooks/settlement')['useTaskSelect'] |
| | | const useTemplateRef: typeof import('vue')['useTemplateRef'] |
| | | const useUser: typeof import('./src/hooks/useUser')['useUser'] |
| | | const useVModel: typeof import('./src/hooks/help')['useVModel'] |
| | |
| | | readonly EnumTaskReleaseStatusText: UnwrapRef<typeof import('./src/constants/task')['EnumTaskReleaseStatusText']> |
| | | readonly EnumTaskReleaseStatusTextForTip: UnwrapRef<typeof import('./src/constants/task')['EnumTaskReleaseStatusTextForTip']> |
| | | readonly EnumTaskSettlementOrderStatus: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumTaskSettlementOrderStatus']> |
| | | readonly EnumTaskSettlementOrderStatusText: UnwrapRef<typeof import('./src/constants/task')['EnumTaskSettlementOrderStatusText']> |
| | | readonly EnumTaskSettlementStatus: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumTaskSettlementStatus']> |
| | | readonly EnumTaskSettlementStatusText: UnwrapRef<typeof import('./src/constants/task')['EnumTaskSettlementStatusText']> |
| | | readonly EnumTaskStatus: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumTaskStatus']> |
| | | readonly EnumTaskStatusText: UnwrapRef<typeof import('./src/constants/task')['EnumTaskStatusText']> |
| | | readonly EnumTaskUserArrangeStatus: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumTaskUserArrangeStatus']> |
| | |
| | | readonly useRouter: UnwrapRef<typeof import('vue-router')['useRouter']> |
| | | readonly useSetReactive: UnwrapRef<typeof import('./src/hooks/global/helper')['useSetReactive']> |
| | | readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']> |
| | | readonly useTaskSelect: UnwrapRef<typeof import('./src/hooks/settlement')['useTaskSelect']> |
| | | readonly useTemplateRef: UnwrapRef<typeof import('vue')['useTemplateRef']> |
| | | readonly useUser: UnwrapRef<typeof import('./src/hooks/useUser')['useUser']> |
| | | readonly useVModel: UnwrapRef<typeof import('./src/hooks/help')['useVModel']> |
| | |
| | | |
| | | export const OSSBaseURL = VITE_OSS_URL; |
| | | |
| | | const _basicPath = '12333/YeXing/'; |
| | | const _basicPath = 'FlexJob/'; |
| | | |
| | | export const OssHRSIE = _basicPath + 'HRSIE/'; |
| | | |
| | |
| | | [EnumTaskUserSubmitCheckReceiveStatus.Success]: '验收通过', |
| | | [EnumTaskUserSubmitCheckReceiveStatus.Fail]: '验收未通过', |
| | | }; |
| | | |
| | | export const EnumTaskSettlementOrderStatusText = { |
| | | [EnumTaskSettlementOrderStatus.Wait]: '待上传', |
| | | [EnumTaskSettlementOrderStatus.Completed]: '已上传', |
| | | }; |
| | | |
| | | export const EnumTaskSettlementStatusText = { |
| | | [EnumTaskSettlementStatus.Wait]: '待结算', |
| | | [EnumTaskSettlementStatus.InProcess]: '结算中', |
| | | [EnumTaskSettlementStatus.Completed]: '已结算', |
| | | }; |
| | |
| | | export * from './menu'; |
| | | export * from './dic'; |
| | | export * from './sign'; |
| | | export * from './settlement'; |
New file |
| | |
| | | import { useQuery, useQueryClient } from '@tanstack/vue-query'; |
| | | import * as taskServices from '@/services/api/task'; |
| | | |
| | | export function useTaskSelect() { |
| | | const queryClient = useQueryClient(); |
| | | |
| | | const { data } = useQuery({ |
| | | queryKey: ['taskServices/getTaskSelect'], |
| | | queryFn: () => { |
| | | return taskServices.getTaskSelect( |
| | | {}, |
| | | { |
| | | showLoading: false, |
| | | } |
| | | ); |
| | | }, |
| | | placeholderData: () => [] as API.SelectOptionGuidGetTaskSelectQueryOption[], |
| | | }); |
| | | |
| | | const taskSelect = computed(() => data.value?.map((x) => x.data)); |
| | | |
| | | return { taskSelect }; |
| | | } |
| | |
| | | 'home:add': any; |
| | | 'taskManage:add': any; |
| | | 'taskManage:edit': any; |
| | | sureTaskSettlementOrder: any; |
| | | checkReceiveTask: any; |
| | | }; |
| | | |
| | |
| | | try { |
| | | const selectionRows = getSelectionRows(); |
| | | if (selectionRows) { |
| | | const hasUnSigned = selectionRows?.some( |
| | | (x) => x.enterpriseSignContractStatus !== EnumTaskUserSignContractStatus.Pass |
| | | ); |
| | | if (hasUnSigned) { |
| | | Message.warnMessage('勾选数据中包含未签约或已解约数据'); |
| | | return; |
| | | } |
| | | stopElectronSign(selectionRows.map((x) => x.id)); |
| | | } |
| | | } catch (error) {} |
| | |
| | | <template> |
| | | <LoadingLayout :loading="isLoading"> |
| | | <AppScrollContainer> |
| | | <AppContainer> |
| | | <ChunkCell title="结算单详情"> |
| | | <ProForm :model="form" ref="formRef" label-width="120px" :is-read="true"> |
| | | <ProFormCol> |
| | |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 label="任务编号:" prop="name"> |
| | | <ProFormText v-model="form.name"> </ProFormText> |
| | | <ProFormItemV2 label="任务编号:" prop="code"> |
| | | <ProFormText v-model="form.code"> </ProFormText> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="8"></ProFormColItem> |
| | | </ProFormCol> |
| | | <ProFormCol> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 label="结算单名称:" prop="name"> |
| | | <ProFormText v-model="form.name"> </ProFormText> |
| | | <ProFormItemV2 label="结算单名称:" prop="settlementOrderName"> |
| | | <ProFormText v-model="form.settlementOrderName"> </ProFormText> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 label="上传时间:" prop="name"> |
| | | <ProFormItemV2 label="上传时间:" prop="settlementOrderTime"> |
| | | <ProFormDatePicker |
| | | v-model="form.name" |
| | | v-model="form.settlementOrderTime" |
| | | type="date" |
| | | format="YYYY-MM-DD HH:mm" |
| | | ></ProFormDatePicker> |
| | |
| | | </ProFormCol> |
| | | <ProFormCol> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 label="结算金额:" prop="money"> |
| | | <ProFormInputNumber v-model="form.money"> </ProFormInputNumber> |
| | | <ProFormItemV2 label="结算金额:" prop="settlementAmount"> |
| | | <ProFormText v-model="form.settlementAmount"> </ProFormText> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 label="实发金额:" prop="money"> |
| | | <ProFormInputNumber v-model="form.money"> </ProFormInputNumber> |
| | | <ProFormItemV2 label="实发金额:" prop="actualSettlementAmount"> |
| | | <ProFormText v-model="form.actualSettlementAmount"> </ProFormText> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | </ProFormCol> |
| | |
| | | </el-steps> |
| | | </div> |
| | | </ChunkCell> --> |
| | | <ChunkCell title="结算名单"> |
| | | <ChunkCell title="结算名单" style="flex: 1"> |
| | | <ProTableQueryFilterBar @on-reset="reset"> |
| | | <template #query> |
| | | <QueryFilterItem> |
| | |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="SettlementListColumns" |
| | | :operationBtns="operationBtns" |
| | | :show-operation-column="false" |
| | | :auto-height="false" |
| | | ref="proTable" |
| | | :tableProps="{ |
| | |
| | | }" |
| | | > |
| | | </ProTableV2> |
| | | <div class="chuck-add-or-edit-actions"> |
| | | <el-button class="chuck-add-or-edit-actions" @click="handleBack">取消</el-button> |
| | | <el-button |
| | | v-if="!isDetail" |
| | | class="chuck-add-or-edit-actions" |
| | | type="primary" |
| | | @click="handleSubmit" |
| | | >确认</el-button |
| | | > |
| | | </div> |
| | | </ChunkCell> |
| | | </AppScrollContainer> |
| | | </AppContainer> |
| | | <EditAccountInfoDialog v-bind="dialogProps"></EditAccountInfoDialog> |
| | | </LoadingLayout> |
| | | </template> |
| | | <script setup lang="ts"> |
| | | import { |
| | | LoadingLayout, |
| | | AppContainer, |
| | | AppScrollContainer, |
| | | ChunkCell, |
| | | ProForm, |
| | |
| | | ProFormColItem, |
| | | ProFormDatePicker, |
| | | ProFormInputNumber, |
| | | ProFormRadio, |
| | | useTable, |
| | | ProTableV2, |
| | | defineOperationBtns, |
| | | SearchInput, |
| | | QueryFilterItem, |
| | | ProTableQueryFilterBar, |
| | | TextOverTooltip, |
| | | useFormDialog, |
| | | } from '@bole-core/components'; |
| | | import { Edit, Upload } from '@element-plus/icons-vue'; |
| | | import { SettlementListColumns } from './constants'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { downloadFileByUrl } from '@bole-core/core'; |
| | | import * as taskServices from '@/services/api/task'; |
| | | import * as taskUserServices from '@/services/api/taskUser'; |
| | | import EditAccountInfoDialog from './components/EditAccountInfoDialog.vue'; |
| | | import { Message } from '@bole-core/core'; |
| | | import { paginateList, setOssFileName, toThousand } from '@/utils'; |
| | | |
| | | defineOptions({ |
| | | name: 'ServiceChargeDetail', |
| | | }); |
| | | |
| | | const { closeViewPush } = useRouteView(); |
| | | const eventContext = useGlobalEventContext(); |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | |
| | | |
| | | const route = useRoute(); |
| | | const id = (route.params.id as string) ?? ''; |
| | | const url = (route.query.url as string) ?? ''; |
| | | |
| | | const isDetail = computed(() => !url); |
| | | |
| | | const form = reactive({ |
| | | name: '', |
| | | money: 0, |
| | | status: 1, |
| | | settlementAmount: '', |
| | | actualSettlementAmount: '', |
| | | code: '', |
| | | settlementOrderName: '', |
| | | settlementOrderTime: '', |
| | | }); |
| | | |
| | | const { isLoading } = useQuery({ |
| | | queryKey: ['taskServices/getTaskInfo', id], |
| | | queryKey: ['taskServices/getSettlementTask', id], |
| | | queryFn: async () => { |
| | | return await taskServices.getTaskInfo( |
| | | return await taskServices.getSettlementTask( |
| | | { id: id }, |
| | | { |
| | | showLoading: false, |
| | | } |
| | | ); |
| | | }, |
| | | placeholderData: () => ({} as API.GetTaskInfoQueryResult), |
| | | placeholderData: () => ({} as API.GetSettlementTaskQueryResult), |
| | | onSuccess(data) { |
| | | form.name = data.name; |
| | | form.settlementAmount = toThousand(data.settlementAmount); |
| | | form.actualSettlementAmount = toThousand(data.actualSettlementAmount); |
| | | form.code = data.code; |
| | | form.settlementOrderName = setOssFileName(data.settlementOrderName); |
| | | form.settlementOrderTime = data.settlementOrderTime ?? ''; |
| | | }, |
| | | enabled: !!id, |
| | | }); |
| | |
| | | } = useTable( |
| | | async ({ pageIndex, pageSize }, extraParamState) => { |
| | | try { |
| | | let params: API.GetOpenTaskInfosQuery = { |
| | | let params: API.APIgetSettlementTaskUsersParams = { |
| | | taskInfoId: id, |
| | | settlementOrderUrl: url, |
| | | }; |
| | | let res = await taskUserServices.getSettlementTaskUsers(params); |
| | | if (extraParamState.keywords) { |
| | | res.data = res.data?.filter((item) => { |
| | | return ( |
| | | item.name.includes(extraParamState.keywords) || |
| | | item.contactPhoneNumber.includes(extraParamState.keywords) || |
| | | item.identity.includes(extraParamState.keywords) |
| | | ); |
| | | }); |
| | | } |
| | | return Promise.resolve({ |
| | | pageModel: { |
| | | rows: pageSize, |
| | | page: pageIndex, |
| | | orderInput: extraParamState.orderInput, |
| | | totalCount: res.data.length, |
| | | }, |
| | | keywords: extraParamState.keywords, |
| | | }; |
| | | |
| | | let res = await taskServices.getOpenTaskInfos(params); |
| | | return res; |
| | | data: paginateList(res.data, pageIndex, pageSize), |
| | | }); |
| | | } catch (error) { |
| | | console.log('error: ', error); |
| | | } |
| | |
| | | keywords: '', |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Desc }], |
| | | }, |
| | | queryKey: ['taskServices/getOpenTaskInfos'], |
| | | columnsRenderProps: {}, |
| | | queryKey: ['taskUserServices/getSettlementTaskUsers'], |
| | | columnsRenderProps: { |
| | | settlementTime: { type: 'date' }, |
| | | settlementAmount: { type: 'money' }, |
| | | actualSettlementAmount: { type: 'money' }, |
| | | }, |
| | | } |
| | | ); |
| | | |
| | |
| | | |
| | | async function handleAddOrEdit() {} |
| | | |
| | | async function handleSubmit() { |
| | | try { |
| | | let params: API.SureTaskSettlementOrderCommand = { |
| | | taskInfoId: id, |
| | | settlementOrderUrl: url, |
| | | taskInfoUsers: |
| | | proTableProps.value.tableData?.length > 0 |
| | | ? proTableProps.value.tableData.map( |
| | | (x) => ({ ...x } as API.SureTaskSettlementOrderCommandUser) |
| | | ) |
| | | : [], |
| | | }; |
| | | let res = await taskServices.sureTaskSettlementOrder(params); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | eventContext.emit('sureTaskSettlementOrder'); |
| | | handleBack(); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | function handleBack() { |
| | | closeViewPush(route, { |
| | | name: 'ServiceChargeManageList', |
| | | }); |
| | | } |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | }); |
| | |
| | | <template #query> |
| | | <QueryFilterItem tip-content="结算单状态"> |
| | | <FieldRadio |
| | | v-model="extraParamState.status" |
| | | :value-enum="[ |
| | | { label: '已安排', value: 1 }, |
| | | { label: '待安排', value: 0 }, |
| | | ]" |
| | | v-model="extraParamState.settlementOrderStatus" |
| | | :value-enum="EnumTaskSettlementOrderStatusText" |
| | | buttonStyle |
| | | showAllBtn |
| | | @change="getList()" |
| | |
| | | </QueryFilterItem> |
| | | <QueryFilterItem tip-content="结算状态"> |
| | | <FieldRadio |
| | | v-model="extraParamState.status" |
| | | :value-enum="[ |
| | | { label: '已安排', value: 1 }, |
| | | { label: '待安排', value: 0 }, |
| | | ]" |
| | | v-model="extraParamState.settlementStatus" |
| | | :value-enum="EnumTaskSettlementStatusText" |
| | | buttonStyle |
| | | showAllBtn |
| | | @change="getList()" |
| | | /> |
| | | </QueryFilterItem> |
| | | <QueryFilterItem> |
| | | <!-- <QueryFilterItem> |
| | | <FieldDatePicker |
| | | v-model="extraParamState.time" |
| | | type="daterange" |
| | |
| | | @change="getList()" |
| | | tooltipContent="创建时间" |
| | | ></FieldDatePicker> |
| | | </QueryFilterItem> |
| | | </QueryFilterItem> --> |
| | | <QueryFilterItem> |
| | | <SearchInput |
| | | v-model="extraParamState.searchWord" |
| | | v-model="extraParamState.keywords" |
| | | style="width: 250px" |
| | | placeholder="任务名称" |
| | | @on-click-search="getList" |
| | |
| | | </template> |
| | | <template #btn> |
| | | <el-button type="primary" link @click="handleDownloadTemplate()">结算单模板</el-button> |
| | | |
| | | <el-button type="primary" @click="openDialog()">上传结算单</el-button> |
| | | <el-button type="primary" @click="handleDownloadTemplate()">导出</el-button> |
| | | <el-button type="primary" @click="handleAdd()">上传结算单</el-button> |
| | | <!-- <el-button type="primary" @click="handleDownloadTemplate()">导出</el-button> --> |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | |
| | | :columns="ServiceChargeManageColumns" |
| | | :operationBtns="operationBtns" |
| | | > |
| | | <template #operationBtn-uploadBtn="{ row }"> |
| | | <BlFileUpload |
| | | v-model:file-url="editForm.settlementUrl" |
| | | ref="uploadRef" |
| | | :showTip="false" |
| | | :show-file-list="false" |
| | | class="pro-table-operation-btn upload-style-btn" |
| | | :on-success="(event) => handleUploadSuccess(event, row)" |
| | | :limitFileSize="null" |
| | | :limit="1" |
| | | accept="xlsx,xls" |
| | | > |
| | | <el-button text type="primary" class="pro-table-operation-btn">上传</el-button> |
| | | </BlFileUpload> |
| | | </template> |
| | | <template #operationBtn-reUploadBtn="{ data, row }"> |
| | | <BlFileUpload |
| | | v-model:file-url="editForm.settlementUrl" |
| | | ref="uploadRef" |
| | | :showTip="false" |
| | | :show-file-list="false" |
| | | class="pro-table-operation-btn upload-style-btn" |
| | | :on-success="(event) => handleUploadSuccess(event, row)" |
| | | :limitFileSize="null" |
| | | :limit="1" |
| | | accept="xlsx,xls" |
| | | > |
| | | <el-button text type="primary" class="pro-table-operation-btn">重新上传</el-button> |
| | | </BlFileUpload> |
| | | </template> |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | <UploadStatementDialog v-bind="dialogProps" /> |
| | |
| | | defineOperationBtns, |
| | | useFormDialog, |
| | | UploadUserFile, |
| | | BlFileUpload, |
| | | } from '@bole-core/components'; |
| | | import { ServiceChargeManageColumns } from './constants'; |
| | | import { downloadFileByUrl } from '@/utils'; |
| | | import { |
| | | EnumTaskSettlementStatusText, |
| | | EnumTaskSettlementOrderStatusText, |
| | | EnumTaskSettlementOrderStatus, |
| | | EnumTaskSettlementStatus, |
| | | } from '@/constants'; |
| | | import { downloadFileByUrl, setOssFileName } from '@/utils'; |
| | | import * as taskServices from '@/services/api/task'; |
| | | import { ModelValueType } from 'element-plus'; |
| | | import UploadStatementDialog from './components/UploadStatementDialog.vue'; |
| | | import SettleDetailDialog from './components/SettleDetailDialog.vue'; |
| | | import { Message } from '@bole-core/core'; |
| | | |
| | | defineOptions({ |
| | | name: 'ServiceChargeManageList', |
| | |
| | | enCode: 'uploadBtn', |
| | | name: '上传', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => openDialog(role), |
| | | }, |
| | | extraProps: { |
| | | hide: () => false, |
| | | hide: (row: API.GetSettlementTasksQueryResultItem) => |
| | | row.settlementOrderStatus !== EnumTaskSettlementOrderStatus.Wait, |
| | | }, |
| | | }, |
| | | { |
| | |
| | | enCode: 'reUploadBtn', |
| | | name: '重新上传', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => openDialog(role), |
| | | }, |
| | | extraProps: { |
| | | hide: () => false, |
| | | hide: (row: API.GetSettlementTasksQueryResultItem) => |
| | | !( |
| | | row.settlementOrderStatus === EnumTaskSettlementOrderStatus.Completed && |
| | | row.settlementStatus === EnumTaskSettlementStatus.Wait |
| | | ), |
| | | }, |
| | | }, |
| | | { |
| | |
| | | name: '结算', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => openSettleDialog(role), |
| | | onClick: (role: API.GetSettlementTasksQueryResultItem) => openSettleDialog(role), |
| | | }, |
| | | extraProps: { |
| | | hide: () => false, |
| | | hide: (role: API.GetSettlementTasksQueryResultItem) => |
| | | !( |
| | | role.settlementOrderStatus === EnumTaskSettlementOrderStatus.Completed && |
| | | role.settlementStatus === EnumTaskSettlementStatus.Wait |
| | | ), |
| | | }, |
| | | }, |
| | | { |
| | |
| | | onClick: (role) => handleRecall(role), |
| | | }, |
| | | extraProps: { |
| | | hide: () => false, |
| | | hide: (role: API.GetSettlementTasksQueryResultItem) => |
| | | role.settlementStatus !== EnumTaskSettlementStatus.InProcess, |
| | | }, |
| | | }, |
| | | { |
| | |
| | | name: '详情', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => goDetail(role), |
| | | onClick: (role: API.GetSettlementTasksQueryResultItem) => goDetail(role.id), |
| | | }, |
| | | extraProps: { |
| | | hide: (role: API.GetSettlementTasksQueryResultItem) => |
| | | role.settlementOrderStatus === EnumTaskSettlementOrderStatus.Wait, |
| | | }, |
| | | }, |
| | | { |
| | |
| | | ]); |
| | | |
| | | const router = useRouter(); |
| | | |
| | | const eventContext = useGlobalEventContext(); |
| | | |
| | | eventContext.addEvent('sureTaskSettlementOrder', () => { |
| | | getList(paginationState.pageIndex); |
| | | }); |
| | | |
| | | const BaseState = { |
| | | loading: true, |
| | |
| | | } = useTable( |
| | | async ({ pageIndex, pageSize }, extraParamState) => { |
| | | try { |
| | | let params: API.GetTaskInfosQuery = { |
| | | let params: API.GetSettlementTasksQuery = { |
| | | pageModel: { |
| | | rows: pageSize, |
| | | page: pageIndex, |
| | | orderInput: extraParamState.orderInput, |
| | | }, |
| | | keywords: extraParamState.keywords, |
| | | settlementOrderStatus: extraParamState.settlementOrderStatus, |
| | | settlementStatus: extraParamState.settlementStatus, |
| | | }; |
| | | |
| | | let res = await taskServices.getTaskInfos(params, { |
| | | let res = await taskServices.getSettlementTasks(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | return res; |
| | |
| | | }, |
| | | { |
| | | defaultExtraParams: { |
| | | searchWord: '', |
| | | status: 0, |
| | | keywords: '', |
| | | settlementOrderStatus: '' as any as EnumTaskSettlementOrderStatus, |
| | | settlementStatus: '' as any as EnumTaskSettlementStatus, |
| | | time: [] as unknown as ModelValueType, |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Desc }], |
| | | }, |
| | | queryKey: ['taskServices/getTaskInfos'], |
| | | columnsRenderProps: {}, |
| | | queryKey: ['taskServices/getSettlementTasks'], |
| | | columnsRenderProps: { |
| | | settlementOrderStatus: { type: 'enum', valueEnum: EnumTaskSettlementOrderStatusText }, |
| | | settlementStatus: { type: 'enum', valueEnum: EnumTaskSettlementStatusText }, |
| | | actualSettlementAmount: { type: 'money' }, |
| | | settlementAmount: { type: 'money' }, |
| | | settlementTime: { type: 'date', format: 'YYYY-MM-DD HH:mm:ss' }, |
| | | settlementOrderTime: { type: 'date', format: 'YYYY-MM-DD HH:mm:ss' }, |
| | | settlementOrderName: { |
| | | formatter: (row: API.GetSettlementTasksQueryResultItem) => |
| | | row.settlementOrderName && setOssFileName(row.settlementOrderName), |
| | | }, |
| | | }, |
| | | } |
| | | ); |
| | | |
| | | const { dialogProps, handleAdd, handleEdit, editForm } = useFormDialog({ |
| | | const { dialogProps, handleAdd, editForm } = useFormDialog({ |
| | | onConfirm: handleAddOrEdit, |
| | | defaultFormParams: { |
| | | code: '', |
| | | id: '', |
| | | name: '', |
| | | settlementUrl: [] as UploadUserFile[], |
| | | }, |
| | | }); |
| | | |
| | | function openDialog(row?) { |
| | | if (row) { |
| | | handleEdit({ |
| | | id: row?.id, |
| | | name: row?.name, |
| | | settlementUrl: [] as UploadUserFile[], |
| | | }); |
| | | } else { |
| | | handleAdd(); |
| | | } |
| | | async function handleAddOrEdit() { |
| | | console.log('editForm: ', editForm); |
| | | goDetail(editForm.id, editForm.settlementUrl[0]?.path); |
| | | } |
| | | |
| | | async function handleAddOrEdit() {} |
| | | |
| | | const { |
| | | dialogProps: dialogSettleProps, |
| | |
| | | defaultFormParams: { |
| | | id: '', |
| | | name: '', |
| | | count: 0, |
| | | code: '', |
| | | settlementUserCount: 0, |
| | | settlementAmount: 0, |
| | | }, |
| | | }); |
| | | |
| | | async function handleSettle() {} |
| | | async function handleSettle() { |
| | | try { |
| | | let params: API.SureTaskSettlementCommand = { |
| | | taskInfoId: settleEditForm.id, |
| | | }; |
| | | let res = await taskServices.sureTaskSettlement(params); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | getList(paginationState.pageIndex); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | function openSettleDialog(row?) { |
| | | function openSettleDialog(row: API.GetSettlementTasksQueryResultItem) { |
| | | handleSettleEdit({ |
| | | id: row.id, |
| | | name: row.name, |
| | | count: row.count, |
| | | code: row.code, |
| | | settlementUserCount: row.settlementUserCount ?? 0, |
| | | settlementAmount: row.settlementAmount ?? 0, |
| | | }); |
| | | } |
| | | |
| | | function handleRecall(row) {} |
| | | async function handleRecall(row: API.GetSettlementTasksQueryResultItem) { |
| | | try { |
| | | Message.tipMessage('确认要撤回吗?'); |
| | | let params: API.RevokeTaskSettlementOrderCommand = { |
| | | taskInfoId: row.id, |
| | | }; |
| | | let res = await taskServices.revokeTaskSettlementOrder(params); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | getList(paginationState.pageIndex); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | function goDetail(row) { |
| | | function handleUploadSuccess( |
| | | response: UploadUserFile & { file: File & { uid: number } }, |
| | | row: API.GetSettlementTasksQueryResultItem |
| | | ) { |
| | | if (response.path) { |
| | | goDetail(row.id, response.path); |
| | | } |
| | | } |
| | | |
| | | function goDetail(id: string, url?: string) { |
| | | router.push({ |
| | | name: 'ServiceChargeDetail', |
| | | params: { |
| | | id: row.id, |
| | | id: id, |
| | | }, |
| | | query: { |
| | | url: url ? url : '', |
| | | }, |
| | | }); |
| | | } |
| | |
| | | } |
| | | |
| | | function handleDownloadTemplate() { |
| | | downloadFileByUrl('', '结算单模板'); |
| | | downloadFileByUrl( |
| | | 'https://parkmanagement.oss-cn-hangzhou.aliyuncs.com/FlexJob/temp/%E7%BB%93%E7%AE%97%E5%8D%95%E6%A8%A1%E6%9D%BF.xlsx', |
| | | '结算单模板' |
| | | ); |
| | | } |
| | | </script> |
| | |
| | | :width="700" |
| | | > |
| | | <ProForm :model="form" ref="dialogForm" label-width="120px" is-read> |
| | | <ProFormItemV2 label="任务单号:" prop="name"> |
| | | <ProFormSelect v-model="form.name" :valueEnum="[]"> </ProFormSelect> |
| | | <ProFormItemV2 label="任务单号:" prop="code"> |
| | | <ProFormSelect v-model="form.code" :valueEnum="[]"> </ProFormSelect> |
| | | </ProFormItemV2> |
| | | <ProFormItemV2 label="任务名称:" prop="name"> |
| | | <ProFormText v-model.trim="form.name"></ProFormText> |
| | | </ProFormItemV2> |
| | | <ProFormItemV2 label="结算人数:" prop="count"> |
| | | <ProFormInputNumber v-model="form.count" unit="人"> </ProFormInputNumber> |
| | | <ProFormItemV2 label="结算人数:" prop="settlementUserCount"> |
| | | <ProFormInputNumber v-model="form.settlementUserCount" unit="人"> </ProFormInputNumber> |
| | | </ProFormItemV2> |
| | | <ProFormItemV2 label="结算金额:" prop="count"> |
| | | <ProFormInputNumber v-model="form.count" unit="元"> </ProFormInputNumber> |
| | | <ProFormItemV2 label="结算金额:" prop="settlementAmount"> |
| | | <ProFormInputNumber v-model="form.settlementAmount" unit="元"> </ProFormInputNumber> |
| | | </ProFormItemV2> |
| | | </ProForm> |
| | | <template #footer> |
| | |
| | | title?: string; |
| | | id: string; |
| | | name: string; |
| | | count: number; |
| | | code: string; |
| | | settlementUserCount: number; |
| | | settlementAmount: number; |
| | | }; |
| | | |
| | | const visible = defineModel({ type: Boolean }); |
| | |
| | | :width="700" |
| | | > |
| | | <ProForm :model="form" ref="dialogForm" label-width="120px"> |
| | | <ProFormItemV2 label="任务单号:" prop="name" :check-rules="[{ message: '请选择任务单号' }]"> |
| | | <ProFormItemV2 label="任务单号:" prop="code" :check-rules="[{ message: '请选择任务单号' }]"> |
| | | <ProFormSelect |
| | | v-model="form.name" |
| | | :valueEnum="[]" |
| | | v-model="form.code" |
| | | :valueEnum="taskSelect" |
| | | placeholder="请选择任务单号" |
| | | enum-value-key="id" |
| | | enum-label-key="code" |
| | | filterable |
| | | clearable |
| | | @change="handleCodeChange" |
| | | > |
| | | </ProFormSelect> |
| | | </ProFormItemV2> |
| | |
| | | style="width: 50%" |
| | | placeholder="请输入任务名称" |
| | | v-model.trim="form.name" |
| | | disabled |
| | | ></ProFormText> |
| | | </ProFormItemV2> |
| | | <ProFormItemV2 |
| | |
| | | v-model:file-url="form.settlementUrl" |
| | | :limit="1" |
| | | :limitFileSize="10" |
| | | accept="jpg/jpeg,png,pdf" |
| | | accept="xlsx,xls" |
| | | ></ProFormUpload> |
| | | </ProFormItemV2> |
| | | </ProForm> |
| | |
| | | ProFormSelect, |
| | | UploadUserFile, |
| | | } from '@bole-core/components'; |
| | | import { Message } from '@bole-core/core'; |
| | | |
| | | defineOptions({ |
| | | name: 'UploadStatementDialog', |
| | |
| | | type Form = { |
| | | title?: string; |
| | | id: string; |
| | | code: string; |
| | | name: string; |
| | | settlementUrl: UploadUserFile[]; |
| | | }; |
| | | |
| | | const { taskSelect } = useTaskSelect(); |
| | | |
| | | const visible = defineModel({ type: Boolean }); |
| | | |
| | |
| | | |
| | | const dialogForm = ref<FormInstance>(); |
| | | |
| | | function handleCodeChange(value: string) { |
| | | if (value) { |
| | | form.value.name = taskSelect.value?.find((item) => item.id === value)?.name ?? ''; |
| | | form.value.id = value; |
| | | } else { |
| | | Message.errorMessage('请选择任务单号'); |
| | | } |
| | | } |
| | | |
| | | function onDialogClose() { |
| | | if (!dialogForm.value) return; |
| | | dialogForm.value.resetFields(); |
| | |
| | | }, |
| | | { |
| | | id: '2', |
| | | enCode: 'name', |
| | | enCode: 'code', |
| | | name: '任务单号', |
| | | }, |
| | | { |
| | | id: '3', |
| | | enCode: 'name', |
| | | name: '发放方式', |
| | | }, |
| | | { |
| | | id: '4', |
| | | enCode: 'name', |
| | | enCode: 'settlementOrderStatus', |
| | | name: '结算单状态', |
| | | }, |
| | | { |
| | | id: '5', |
| | | enCode: 'name', |
| | | id: '4', |
| | | enCode: 'settlementOrderName', |
| | | name: '结算单名称', |
| | | }, |
| | | { |
| | | id: '6', |
| | | enCode: 'name', |
| | | id: '5', |
| | | enCode: 'settlementOrderTime', |
| | | name: '上传时间', |
| | | }, |
| | | { |
| | | id: '7', |
| | | enCode: 'name', |
| | | name: '结算状态', |
| | | }, |
| | | { |
| | | id: '8', |
| | | enCode: 'name', |
| | | id: '6', |
| | | enCode: 'actualSettlementAmount', |
| | | name: '实发金额', |
| | | }, |
| | | { |
| | | id: '9', |
| | | enCode: 'name', |
| | | id: '7', |
| | | enCode: 'settlementAmount', |
| | | name: '结算金额', |
| | | }, |
| | | { |
| | | id: '10', |
| | | enCode: 'name', |
| | | name: '失败金额', |
| | | id: '8', |
| | | enCode: 'settlementStatus', |
| | | name: '结算状态', |
| | | }, |
| | | { |
| | | id: '11', |
| | | enCode: 'name', |
| | | name: '退款金额', |
| | | }, |
| | | { |
| | | id: '12', |
| | | enCode: 'name', |
| | | id: '9', |
| | | enCode: 'settlementTime', |
| | | name: '结算时间', |
| | | }, |
| | | { |
| | | id: '13', |
| | | enCode: 'name', |
| | | id: '10', |
| | | enCode: 'settlementRemark', |
| | | name: '备注', |
| | | }, |
| | | ]); |
| | |
| | | }, |
| | | { |
| | | id: '2', |
| | | enCode: 'name', |
| | | enCode: 'identity', |
| | | name: '身份证号', |
| | | }, |
| | | { |
| | | id: '3', |
| | | enCode: 'name', |
| | | enCode: 'contactPhoneNumber', |
| | | name: '手机号', |
| | | }, |
| | | { |
| | | id: '4', |
| | | enCode: 'name', |
| | | enCode: 'bank', |
| | | name: '所属银行', |
| | | }, |
| | | { |
| | | id: '5', |
| | | enCode: 'name', |
| | | enCode: 'bankBranch', |
| | | name: '所属支行', |
| | | }, |
| | | { |
| | | id: '6', |
| | | enCode: 'name', |
| | | enCode: 'receiveAccount', |
| | | name: '收款帐户', |
| | | }, |
| | | { |
| | | id: '7', |
| | | enCode: 'signNum', |
| | | enCode: 'settlementAmount', |
| | | name: '结算金额', |
| | | }, |
| | | { |
| | | id: '8', |
| | | enCode: 'name', |
| | | enCode: 'actualSettlementAmount', |
| | | name: '实发金额', |
| | | }, |
| | | { |
| | | id: '9', |
| | | enCode: 'name', |
| | | enCode: 'settlementTime', |
| | | name: '结算时间', |
| | | }, |
| | | ]); |