| | |
| | | |
| | | /** 企业钱包代进件单状态 */ |
| | | export enum EnumEnterpriseWalletExpandindirectOrderStatus { |
| | | /**未进件 */ |
| | | Wait = 1, |
| | | /**审批中 */ |
| | | PROCESSING = 10, |
| | | /**已生效 */ |
| | | /**已进件 */ |
| | | VALID = 20, |
| | | /**审批不通过 */ |
| | | INVALID = 30, |
| | |
| | | |
| | | /** 企业钱包签约状态 */ |
| | | export enum EnumEnterpriseWalletSignStatus { |
| | | /**未签约 */ |
| | | Wait = 1, |
| | | /**申请中 */ |
| | | Apply = 10, |
| | | /**已签约 */ |
| | |
| | | ); |
| | | } |
| | | |
| | | /** 发送邀请签约短信 POST /api/user/enterpriseEmployee/sendInviteElectronSignSms */ |
| | | export async function sendInviteElectronSignSms( |
| | | body: API.SendInviteElectronSignSmsCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/user/enterpriseEmployee/sendInviteElectronSignSms', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 灵工解约 POST /api/user/enterpriseEmployee/stopElectronSign */ |
| | | export async function stopElectronSign( |
| | | body: API.StopElectronSignCommand, |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 查询结算名单分页列表数据 POST /api/flexjob/taskUser/getSettlementTaskUsers */ |
| | | /** 查询结算名单分页列表数据 GET /api/flexjob/taskUser/getSettlementTaskUsers */ |
| | | export async function getSettlementTaskUsers( |
| | | body: API.GetSettlementTaskUsersQuery, |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetSettlementTaskUsersParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.GetSettlementTaskUsersQueryResult>( |
| | | '/api/flexjob/taskUser/getSettlementTaskUsers', |
| | | { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | } |
| | | ); |
| | |
| | | id?: string; |
| | | } |
| | | |
| | | interface APIgetSettlementTaskUsersParams { |
| | | /** 任务Id */ |
| | | taskInfoId?: string; |
| | | /** 结算单地址 */ |
| | | settlementOrderUrl?: string; |
| | | } |
| | | |
| | | interface APIgetTaskEnterpriseParams { |
| | | /** 企业Id */ |
| | | id?: string; |
| | |
| | | } |
| | | |
| | | enum EnumEnterpriseWalletExpandindirectOrderStatus { |
| | | /**未进件 */ |
| | | Wait = 1, |
| | | /**审批中 */ |
| | | PROCESSING = 10, |
| | | /**已生效 */ |
| | | /**已进件 */ |
| | | VALID = 20, |
| | | /**审批不通过 */ |
| | | INVALID = 30, |
| | |
| | | } |
| | | |
| | | enum EnumEnterpriseWalletSignStatus { |
| | | /**未签约 */ |
| | | Wait = 1, |
| | | /**申请中 */ |
| | | Apply = 10, |
| | | /**已签约 */ |
| | |
| | | /** 钱包Id */ |
| | | id?: string; |
| | | access?: EnumEnterpriseWalletAccess; |
| | | /** 账号 */ |
| | | account?: string; |
| | | /** 商户Id */ |
| | | merchantId?: string; |
| | | /** 协议号 */ |
| | | code?: string; |
| | | /** 通道协议号 */ |
| | |
| | | /** 协议失效时间 */ |
| | | invalidTime?: string; |
| | | signStatus?: EnumEnterpriseWalletSignStatus; |
| | | expandindirectOrderStatus?: EnumEnterpriseWalletExpandindirectOrderStatus; |
| | | } |
| | | |
| | | interface GetEnterpriseWalletTransactionQueryResult { |
| | |
| | | settlementUserCount?: number; |
| | | } |
| | | |
| | | interface GetSettlementTaskUsersQuery { |
| | | /** 任务Id */ |
| | | taskInfoId?: string; |
| | | /** 关键字 */ |
| | | keywords?: string; |
| | | /** 结算单地址 */ |
| | | settlementOrderUrl?: string; |
| | | pageModel?: PagedListQueryPageModel; |
| | | } |
| | | |
| | | interface GetSettlementTaskUsersQueryResult { |
| | | /** 结算名单 */ |
| | | data?: GetSettlementTaskUsersQueryResultItem[]; |
| | | /** 错误信息 */ |
| | | errors?: GetSettlementTaskUsersQueryResultError[]; |
| | | pageModel?: PagedListQueryResultPageModel; |
| | | /** 数据 */ |
| | | data?: GetSettlementTaskUsersQueryResultItem[]; |
| | | } |
| | | |
| | | interface GetSettlementTaskUsersQueryResultError { |
| | |
| | | /** 企业Id */ |
| | | enterpriseId?: string; |
| | | access?: EnumEnterpriseWalletAccess; |
| | | /** 账号 */ |
| | | account?: string; |
| | | /** 商户Id */ |
| | | merchantId?: string; |
| | | } |
| | | |
| | | interface OpenEnterpriseWalletCommandResult { |
| | |
| | | data?: GetDictionaryDataSelectQueryResultOption; |
| | | } |
| | | |
| | | interface SendInviteElectronSignSmsCommand { |
| | | /** Id */ |
| | | ids?: string[]; |
| | | } |
| | | |
| | | interface SendLoginOrRegisterVerifyCodeCommand { |
| | | /** 手机号码 */ |
| | | phoneNumber: string; |
| | |
| | | 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) {} |
| | |
| | | import * as taskUserServices from '@/services/api/taskUser'; |
| | | import EditAccountInfoDialog from './components/EditAccountInfoDialog.vue'; |
| | | import { Message } from '@bole-core/core'; |
| | | import { paginateList } from '@/utils'; |
| | | |
| | | defineOptions({ |
| | | name: 'ServiceChargeDetail', |
| | |
| | | } = useTable( |
| | | async ({ pageIndex, pageSize }, extraParamState) => { |
| | | try { |
| | | let params: API.GetSettlementTaskUsersQuery = { |
| | | 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, |
| | | }, |
| | | taskInfoId: id, |
| | | // settlementOrderUrl:form. |
| | | keywords: extraParamState.keywords, |
| | | }; |
| | | |
| | | let res = await taskUserServices.getSettlementTaskUsers(params); |
| | | return res; |
| | | data: paginateList(res.data, pageIndex, pageSize), |
| | | }); |
| | | } catch (error) { |
| | | console.log('error: ', error); |
| | | } |
| | |
| | | keywords: '', |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Desc }], |
| | | }, |
| | | queryKey: ['taskUserServices/getOpenTaskInfos'], |
| | | queryKey: ['taskUserServices/getSettlementTaskUsers'], |
| | | columnsRenderProps: {}, |
| | | } |
| | | ); |
| | |
| | | </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="handleAdd()">上传结算单</el-button> |
| | | <el-button type="primary" @click="handleDownloadTemplate()">导出</el-button> |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | |
| | | :columns="ServiceChargeManageColumns" |
| | | :operationBtns="operationBtns" |
| | | > |
| | | <template #operationBtn-uploadBtn="{ data, row }"> |
| | | <template #operationBtn-uploadBtn="{ row }"> |
| | | <BlFileUpload |
| | | v-model:file-url="row.listFiles" |
| | | multiple |
| | | v-if="row.settlementOrderStatus === EnumTaskSettlementOrderStatus.Wait" |
| | | 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-if=" |
| | | row.settlementOrderStatus === EnumTaskSettlementOrderStatus.Completed && |
| | | row.settlementStatus === EnumTaskSettlementStatus.Wait |
| | | " |
| | | 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> |
| | |
| | | BlFileUpload, |
| | | } from '@bole-core/components'; |
| | | import { ServiceChargeManageColumns } from './constants'; |
| | | import { EnumTaskSettlementStatusText, EnumTaskSettlementOrderStatusText } from '@/constants'; |
| | | import { |
| | | EnumTaskSettlementStatusText, |
| | | EnumTaskSettlementOrderStatusText, |
| | | EnumTaskSettlementOrderStatus, |
| | | EnumTaskSettlementStatus, |
| | | } from '@/constants'; |
| | | import { downloadFileByUrl } from '@/utils'; |
| | | import * as taskServices from '@/services/api/task'; |
| | | import { ModelValueType } from 'element-plus'; |
| | |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | // { |
| | | // data: { |
| | | // enCode: 'uploadBtn', |
| | | // name: '上传', |
| | | // }, |
| | | // emits: { |
| | | // onClick: (role) => openDialog(role), |
| | | // }, |
| | | // extraProps: { |
| | | // hide: () => false, |
| | | // }, |
| | | // }, |
| | | // { |
| | | // data: { |
| | | // enCode: 'reUploadBtn', |
| | | // name: '重新上传', |
| | | // }, |
| | | // emits: { |
| | | // onClick: (role) => openDialog(role), |
| | | // }, |
| | | // extraProps: { |
| | | // hide: () => false, |
| | | // }, |
| | | // }, |
| | | { |
| | | data: { |
| | | enCode: 'settleBtn', |
| | |
| | | name: '详情', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => goDetail(role), |
| | | onClick: (role: API.GetSettlementTasksQueryResultItem) => goDetail(role.id), |
| | | }, |
| | | }, |
| | | { |
| | |
| | | } |
| | | ); |
| | | |
| | | const { dialogProps, handleAdd, handleEdit, editForm } = useFormDialog({ |
| | | const { dialogProps, handleAdd, editForm } = useFormDialog({ |
| | | onConfirm: handleAddOrEdit, |
| | | defaultFormParams: { |
| | | code: '', |
| | | id: '', |
| | | name: '', |
| | | settlementUrl: [] as UploadUserFile[], |
| | | }, |
| | | }); |
| | | |
| | | function openDialog(row?: API.GetSettlementTasksQueryResultItem) { |
| | | if (row) { |
| | | handleEdit({ |
| | | id: row?.id, |
| | | name: row?.name, |
| | | settlementUrl: [] as UploadUserFile[], |
| | | }); |
| | | } else { |
| | | handleAdd(); |
| | | } |
| | | async function handleAddOrEdit() { |
| | | goDetail(editForm.id, editForm.settlementUrl[0]?.url); |
| | | } |
| | | |
| | | async function handleAddOrEdit() {} |
| | | |
| | | const { |
| | | dialogProps: dialogSettleProps, |
| | |
| | | row: API.GetSettlementTasksQueryResultItem |
| | | ) { |
| | | if (response.url) { |
| | | goDetail(row, response.url); |
| | | goDetail(row.id, response.url); |
| | | } |
| | | } |
| | | |
| | | function goDetail(row: API.GetSettlementTasksQueryResultItem, url?: string) { |
| | | function goDetail(id: string, url?: string) { |
| | | router.push({ |
| | | name: 'ServiceChargeDetail', |
| | | query: { |
| | | id: row.id, |
| | | id: id, |
| | | url: url ? url : '', |
| | | }, |
| | | }); |
| | |
| | | :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" |
| | | v-model="form.code" |
| | | :valueEnum="[]" |
| | | placeholder="请选择任务单号" |
| | | filterable |
| | | clearable |
| | | @change="handleCodeChange" |
| | | > |
| | | </ProFormSelect> |
| | | </ProFormItemV2> |
| | |
| | | style="width: 50%" |
| | | placeholder="请输入任务名称" |
| | | v-model.trim="form.name" |
| | | disabled |
| | | ></ProFormText> |
| | | </ProFormItemV2> |
| | | <ProFormItemV2 |
| | |
| | | type Form = { |
| | | title?: string; |
| | | id: string; |
| | | code: string; |
| | | name: string; |
| | | settlementUrl: UploadUserFile[]; |
| | | }; |
| | |
| | | |
| | | const dialogForm = ref<FormInstance>(); |
| | | |
| | | function handleCodeChange() {} |
| | | |
| | | function onDialogClose() { |
| | | if (!dialogForm.value) return; |
| | | dialogForm.value.resetFields(); |