Merge branch 'master' of http://120.26.58.240:8888/r/flexJobAdminBClient
| | |
| | | serviceFee: { |
| | | type: 'money', |
| | | formatter: (row) => { |
| | | return `${row.serviceFee}${EnumBillingMethodUnitText[row.billingMethod]}`; |
| | | return row.billingMethod === EnumBillingMethod.Face |
| | | ? '' |
| | | : `${row.serviceFee}${EnumBillingMethodUnitText[row.billingMethod]}`; |
| | | }, |
| | | }, |
| | | settlementCycle: { type: 'enum', valueEnum: EnumSettlementCycleText }, |
| | |
| | | <template> |
| | | <LoadingLayout :loading="state.loading"> |
| | | <LoadingLayout v-loading="state.loading"> |
| | | <AppContainer> |
| | | <el-card class="query-filter-bar-wrapper" shadow="never"> |
| | | <ProForm :model="taskInfo" is-read> |
| | |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 label="服务费金额:"> |
| | | {{ `${taskInfo.serviceFee}${EnumBillingMethodUnitText[taskInfo.billingMethod]}` }} |
| | | {{ |
| | | taskInfo.billingMethod === EnumBillingMethod.Face |
| | | ? EnumBillingMethodText[taskInfo.billingMethod] |
| | | : `${taskInfo.serviceFee}${EnumBillingMethodUnitText[taskInfo.billingMethod]}` |
| | | }} |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | </ProFormCol> |
| | |
| | | import * as taskServices from '@/services/api/task'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { CheckReceiveTaskDetailColumns } from './constants'; |
| | | import { EnumBillingMethodUnitText } from '@/constants'; |
| | | import { EnumBillingMethodUnitText, EnumBillingMethod, EnumBillingMethodText } from '@/constants'; |
| | | import dayjs from 'dayjs'; |
| | | import CheckManageDialog from './components/CheckManageDialog.vue'; |
| | | import ManualCheckManageDialog from './components/ManualCheckManageDialog.vue'; |
| | |
| | | serviceFee: { |
| | | type: 'money', |
| | | formatter: (row) => { |
| | | return `${row.serviceFee}${EnumBillingMethodUnitText[row.billingMethod]}`; |
| | | return row.billingMethod === EnumBillingMethod.Face |
| | | ? '' |
| | | : `${row.serviceFee}${EnumBillingMethodUnitText[row.billingMethod]}`; |
| | | }, |
| | | }, |
| | | applyBeginTime: { type: 'date', format: 'YYYY-MM-DD' }, |
| | |
| | | if (!form.billingMethod) { |
| | | callback(new Error('请选择服务费类型')); |
| | | } |
| | | if (!form.serviceFee) { |
| | | if (!form.serviceFee && form.billingMethod !== EnumBillingMethod.Face) { |
| | | callback(new Error('请输入服务费')); |
| | | } |
| | | callback(); |
| | |
| | | > |
| | | <template #extra> |
| | | <ProFormInputNumber |
| | | v-if="form.billingMethod !== EnumBillingMethod.Face" |
| | | :controls="false" |
| | | v-model="form.serviceFee" |
| | | placeholder="请输入" |
| | |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | :disabled-date="disabledDate" |
| | | @change="handleTimeChange" |
| | | ></ProFormDatePicker> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | |
| | | } |
| | | |
| | | function disabledapplyDate(time: Date) { |
| | | return dayjs(time).isBefore(form.time[0], 'day') || dayjs(time).isAfter(form.time[1], 'day'); |
| | | return dayjs(time).isAfter(dayjs(form.time[1]), 'day') || dayjs(time).isBefore(dayjs(), 'day'); |
| | | } |
| | | |
| | | const feeCannotEdit = computed(() => { |
| | | return dayjs(form.time[0]).isBefore(dayjs(), 'day'); |
| | | return dayjs().isAfter(form.time[0], 'second') && isEdit; |
| | | }); |
| | | |
| | | const eventContext = useGlobalEventContext(); |
| | |
| | | form.settlementDate = null as number; |
| | | } |
| | | |
| | | function handleTimeChange() { |
| | | form.applyTime = [] as unknown as ModelValueType; |
| | | } |
| | | |
| | | function handleBack() { |
| | | closeViewPush(route, { |
| | | name: 'TaskManageList', |
| | |
| | | <el-button @click="handleBatchUnSign()" type="primary">批量解约</el-button> |
| | | <el-button @click="handleSendShotMessage()" type="primary">短信发送</el-button> |
| | | <el-button @click="handleBatchSign()" type="primary">批量签约</el-button> |
| | | <el-button @click="handleEnterpriseBatchSign()" type="primary">批量企业签约</el-button> |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | |
| | | import SignDialog from './components/SignDialog.vue'; |
| | | import * as enterpriseEmployeeServices from '@/services/api/enterpriseEmployee'; |
| | | import { ModelValueType } from 'element-plus'; |
| | | import _ from 'lodash'; |
| | | |
| | | defineOptions({ |
| | | name: 'FlexJobManageList', |
| | |
| | | } |
| | | } |
| | | |
| | | const handleEnterpriseBatchSign = _.debounce( |
| | | () => { |
| | | const selectionRows = getSelectionRows(); |
| | | if (selectionRows) { |
| | | const hasSigned = selectionRows?.some( |
| | | (x) => |
| | | !( |
| | | x.userSignContractStatus === EnumTaskUserSignContractStatus.Pass && |
| | | x.enterpriseSignContractStatus === EnumTaskUserSignContractStatus.Wait |
| | | ) |
| | | ); |
| | | if (hasSigned) { |
| | | Message.warnMessage('勾选人员中包含已企业签约、未录用人员或未签约完成人员'); |
| | | return; |
| | | } |
| | | const ids = selectionRows.map((x) => x.id); |
| | | handleBatchEnterpriseSign(ids); |
| | | } |
| | | }, |
| | | 1000, |
| | | { leading: true, trailing: false } |
| | | ); |
| | | |
| | | async function handleBatchEnterpriseSign(ids: string[]) { |
| | | try { |
| | | state.loading = true; |
| | | let res = await enterpriseEmployeeServices.batchEnterpriseSignContract({ ids: ids }); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | getList(paginationState.pageIndex); |
| | | if (res?.errors?.length > 0) { |
| | | Message.tipMessage('存在签约失败的灵工信息数据,是否导出?').then(() => { |
| | | XLSXUtils.exportToXLSX({ |
| | | workbookDataList: res.errors, |
| | | fileName: '签约失败灵工信息', |
| | | workbookHeaderMap: { |
| | | name: '姓名', |
| | | contactPhoneNumber: '手机号', |
| | | identity: '身份证号', |
| | | errorMessages: '错误信息', |
| | | }, |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | } catch (error) { |
| | | } finally { |
| | | state.loading = false; |
| | | } |
| | | } |
| | | |
| | | async function signContract() { |
| | | try { |
| | | let params: API.InviteElectronSignCommand = { |
| | |
| | | bank: '所属银行', |
| | | bankBranch: '所属支行', |
| | | receiveAccount: '收款账户', |
| | | totalWorkHours: '累计工时(小时)', |
| | | settlementAmount: '结算金额', |
| | | actualSettlementAmount: '实发金额', |
| | | errorMessage: '错误信息', |
| | |
| | | :columns="UserManageColumns" |
| | | :operationBtns="operationBtns" |
| | | > |
| | | <template #status="{ row }"> |
| | | <FieldSwitch |
| | | v-model="row.status" |
| | | active-text="启用" |
| | | :active-value="EnumUserStatus.Normal" |
| | | inactive-text="禁用" |
| | | :inactive-value="EnumUserStatus.Disabled" |
| | | :before-change="() => setUserInfoStatus(row)" |
| | | /> |
| | | </template> |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | <AddOrEditUserDialog v-bind="dialogProps" /> |
| | |
| | | useTable, |
| | | useFormDialog, |
| | | defineOperationBtns, |
| | | FieldSwitch, |
| | | } from '@bole-core/components'; |
| | | import * as userServices from '@/services/api/user'; |
| | | import { UserManageColumns } from './constants'; |
| | | import { EnumUserStatusText } from '@/constants'; |
| | | import { EnumUserStatus, EnumUserStatusText } from '@/constants'; |
| | | import { ModelValueType } from 'element-plus'; |
| | | import { Message } from '@bole-core/core'; |
| | | import AddOrEditUserDialog from './components/AddOrEditUserDialog.vue'; |
| | |
| | | formatter: (role: API.GetOperationUserInfosQueryResultItem) => |
| | | role.roles?.length > 0 ? role.roles.map((x) => x.name).join(',') : '', |
| | | }, |
| | | status: { type: 'enum', valueEnum: EnumUserStatusText }, |
| | | // status: { type: 'enum', valueEnum: EnumUserStatusText }, |
| | | }, |
| | | } |
| | | ); |
| | |
| | | }); |
| | | } |
| | | |
| | | async function setUserInfoStatus(row: API.GetOperationUserInfosQueryResultItem) { |
| | | try { |
| | | await Message.tipMessage( |
| | | `确认要${row.status === EnumUserStatus.Normal ? '禁用' : '启用'}该用户吗?` |
| | | ); |
| | | const res = await userServices.setUserInfoStatus({ |
| | | ids: [row.id], |
| | | status: |
| | | row.status === EnumUserStatus.Normal ? EnumUserStatus.Disabled : EnumUserStatus.Normal, |
| | | }); |
| | | if (res) { |
| | | getList(paginationState.pageIndex); |
| | | Message.successMessage(`操作成功`); |
| | | return !!res; |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function resetPassword() { |
| | | try { |
| | | let params: API.ResetUserPasswordsCommand = { |