| | |
| | | <template> |
| | | <LoadingLayout :loading="isLoading"> |
| | | <AppContainer> |
| | | <AppScrollContainer> |
| | | <ChunkCell title="结算单详情"> |
| | | <ProForm :model="form" ref="formRef" label-width="120px" :is-read="true"> |
| | | <ProFormCol> |
| | |
| | | :auto-height="false" |
| | | ref="proTable" |
| | | :tableProps="{ |
| | | maxHeight: '250px', |
| | | maxHeight: '400px', |
| | | }" |
| | | > |
| | | </ProTableV2> |
| | | <div class="chuck-add-or-edit-actions"> |
| | | <el-button class="chuck-add-or-edit-actions" @click="handleBack">取消</el-button> |
| | | <el-button |
| | | v-if="isSettlement" |
| | | v-if=" |
| | | isSettlement && |
| | | (!form.auditStatus || form.auditStatus !== EnumTaskSettlementAuditStatus.Pass) |
| | | " |
| | | class="chuck-add-or-edit-actions" |
| | | type="primary" |
| | | @click="handleSubmit()" |
| | | >结算</el-button |
| | | >结算申请</el-button |
| | | > |
| | | <el-button |
| | | v-if="isSettlement && form.auditStatus === EnumTaskSettlementAuditStatus.Pass" |
| | | class="chuck-add-or-edit-actions" |
| | | type="primary" |
| | | @click="handleSubmit()" |
| | | >提交结算</el-button |
| | | > |
| | | </div> |
| | | </ChunkCell> |
| | | </AppContainer> |
| | | </AppScrollContainer> |
| | | <EditAccountInfoDialog v-bind="dialogProps"></EditAccountInfoDialog> |
| | | <SettleDetailDialog v-bind="dialogSettleProps" /> |
| | | </LoadingLayout> |
| | |
| | | import { |
| | | LoadingLayout, |
| | | AppContainer, |
| | | AppScrollContainer, |
| | | ChunkCell, |
| | | ProForm, |
| | | ProFormItemV2, |
| | |
| | | import EditAccountInfoDialog from './components/EditAccountInfoDialog.vue'; |
| | | import SettleDetailDialog from './components/SettleDetailDialog.vue'; |
| | | import { Message } from '@bole-core/core'; |
| | | import { SettlementReceiveStatusText } from '@/constants'; |
| | | import { SettlementReceiveStatusText, EnumTaskSettlementAuditStatus } from '@/constants'; |
| | | import { |
| | | downloadFile, |
| | | downloadFileByUrl, |
| | |
| | | const route = useRoute(); |
| | | const id = (route.params.id as string) ?? ''; |
| | | const settlement = (route.query.settlement as string) ?? ''; |
| | | // const settlementAccess = route.query.settlementAccess ?? ''; |
| | | const isSettlement = computed(() => !!settlement); |
| | | |
| | | const form = reactive({ |
| | |
| | | settlementTaskUsers: [] as API.GetSettlementTaskUsersQueryResultItem[], |
| | | |
| | | settlementUrl: [] as UploadUserFile[], |
| | | |
| | | settlementAccess: '' as any as EnumEnterpriseWalletAccess, |
| | | isSettlement: isSettlement.value, |
| | | |
| | | auditStatus: '' as any as EnumTaskSettlementAuditStatus, |
| | | |
| | | timeoutServiceFee: 0, |
| | | }); |
| | | |
| | | const BaseState = { |
| | |
| | | const state = reactive({ ...BaseState }); |
| | | |
| | | const { isLoading, refetch } = useQuery({ |
| | | queryKey: ['taskUserServices/getSettlementTaskUsers', id], |
| | | queryKey: ['taskUserServices/getSettlementTaskUsers', id, toRef(form, 'isSettlement')], |
| | | queryFn: async () => { |
| | | return await taskUserServices.getSettlementTaskUsers( |
| | | { id: id }, |
| | | { |
| | | showLoading: false, |
| | | } |
| | | ); |
| | | let params: API.APIgetSettlementTaskUsersParams = { |
| | | id: id, |
| | | }; |
| | | // if (form.settlementAccess) { |
| | | // params.settlementAccess = Number(form.settlementAccess); |
| | | // } |
| | | if (form.isSettlement) { |
| | | params.isImport = true; |
| | | } |
| | | return await taskUserServices.getSettlementTaskUsers(params, { |
| | | showLoading: false, |
| | | }); |
| | | }, |
| | | placeholderData: () => ({} as API.GetSettlementTaskUsersQueryResult), |
| | | onSuccess(res) { |
| | |
| | | form.settlementAmount = res?.detail?.settlementAmount ?? 0; |
| | | form.actualSettlementAmount = res?.detail?.actualSettlementAmount ?? 0; |
| | | form.code = res?.detail?.code; |
| | | form.settlementAccess = res?.detail?.settlementAccess; |
| | | form.auditStatus = res?.detail?.auditStatus; |
| | | form.timeoutServiceFee = res?.detail?.timeoutServiceFee ?? 0; |
| | | // form.settlementOrderName = setOssFileName(res?.detail?.settlementOrderName); |
| | | // form.settlementOrderTime = res?.detail?.settlementOrderTime ?? ''; |
| | | } |
| | |
| | | settlementAmount: { type: 'money' }, |
| | | actualSettlementAmount: { type: 'money' }, |
| | | settlementReceiveStatus: { type: 'enum', valueEnum: SettlementReceiveStatusText }, |
| | | serviceFee: { type: 'money' }, |
| | | timeoutHours: { |
| | | formatter: (row: API.GetSettlementTaskUsersQueryResultItem) => |
| | | row.timeoutHours ? `${row.timeoutHours}小时` : '', |
| | | }, |
| | | timeoutFee: { type: 'money' }, |
| | | otherFee: { type: 'money' }, |
| | | }, |
| | | } |
| | | ); |
| | |
| | | actualSettlementAmount: null as number, |
| | | receiveAccount: '', |
| | | bank: '', |
| | | bankBranch: '', |
| | | // totalWorkHours: null as number, |
| | | settlementAccess: form.settlementAccess, |
| | | // bankBranch: '', |
| | | timeoutServiceFee: 0, |
| | | serviceFee: null as number, |
| | | timeoutHours: null as number, |
| | | timeoutFee: null as number, |
| | | otherFee: null as number, |
| | | remark: '', |
| | | }, |
| | | }); |
| | | |
| | |
| | | actualSettlementAmount: row?.actualSettlementAmount ?? null, |
| | | receiveAccount: row?.receiveAccount ?? '', |
| | | bank: row?.bank ?? '', |
| | | bankBranch: row?.bankBranch ?? '', |
| | | // totalWorkHours: row?.totalWorkHours ?? null, |
| | | settlementAccess: form.settlementAccess, |
| | | // bankBranch: row?.bankBranch ?? '', |
| | | timeoutServiceFee: form.timeoutServiceFee, |
| | | serviceFee: row?.serviceFee ?? 0, |
| | | timeoutHours: row?.timeoutHours ?? null, |
| | | timeoutFee: row?.timeoutFee ?? null, |
| | | otherFee: row?.otherFee ?? null, |
| | | remark: row?.remark ?? '', |
| | | }); |
| | | } |
| | | } |
| | | |
| | | async function handleAddOrEdit() { |
| | | try { |
| | | const settlementAmount = |
| | | (editForm.timeoutFee ?? 0) + (editForm.serviceFee ?? 0) + (editForm.otherFee ?? 0); |
| | | let params: API.EditTaskSettlementOrderRosterCommand = { |
| | | id: editForm.id, |
| | | settlementAmount: editForm.settlementAmount, |
| | | settlementAmount: settlementAmount, |
| | | actualSettlementAmount: editForm.actualSettlementAmount, |
| | | receiveAccount: editForm.receiveAccount, |
| | | bank: editForm.bank, |
| | | bankBranch: editForm.bankBranch, |
| | | // totalWorkHours: editForm.totalWorkHours, |
| | | // bankBranch: editForm.bankBranch, |
| | | serviceFee: editForm.serviceFee, |
| | | timeoutHours: editForm.timeoutHours, |
| | | timeoutFee: editForm.timeoutFee, |
| | | otherFee: editForm.otherFee, |
| | | remark: editForm.remark, |
| | | }; |
| | | let res = await taskServices.editTaskSettlementOrderRoster(params); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | form.isSettlement = false; |
| | | refetch(); |
| | | getList(paginationState.pageIndex); |
| | | } |
| | |
| | | let res = await taskServices.importTaskSettlementOrderRosters(params); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | form.isSettlement = false; |
| | | refetch(); |
| | | getList(paginationState.pageIndex); |
| | | if (res?.errors?.length > 0) { |
| | |
| | | workbookHeaderMap: { |
| | | name: '姓名', |
| | | identity: '身份证号', |
| | | taskName: '任务名称', |
| | | contactPhoneNumber: '手机号', |
| | | bank: '所属银行', |
| | | bankBranch: '所属支行', |
| | | receiveAccount: '收款账户', |
| | | settlementAmount: '结算金额', |
| | | actualSettlementAmount: '实发金额', |
| | | receiveAccount: '收款账户', |
| | | bank: '所属银行', |
| | | bankBranch: '开户支行名称', |
| | | errorMessage: '错误信息', |
| | | }, |
| | | }); |
| | |
| | | code: form.code, |
| | | settlementUserCount: form.settlementTaskUsers.length, |
| | | actualSettlementAmount: form.actualSettlementAmount, |
| | | settlementAccess: form.settlementAccess, |
| | | }); |
| | | } |
| | | |
| | |
| | | code: '', |
| | | settlementUserCount: 0, |
| | | actualSettlementAmount: 0, |
| | | settlementAccess: '' as any as EnumEnterpriseWalletAccess, |
| | | }, |
| | | }); |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .chuck-add-or-edit-actions { |
| | | margin-bottom: 20px; |
| | | } |
| | | </style> |
| | | <style lang="scss"> |
| | | .text-over-tooltip-content { |