| | |
| | | </QueryFilterItem> |
| | | </template> |
| | | <template #btn v-if="isSettlement"> |
| | | <BlFileUpload |
| | | <!-- <BlFileUpload |
| | | v-model:file-url="form.settlementUrl" |
| | | ref="uploadRef" |
| | | :showTip="false" |
| | |
| | | accept="xlsx,xls" |
| | | > |
| | | <el-button text type="primary" class="pro-table-operation-btn">导入</el-button> |
| | | </BlFileUpload> |
| | | </BlFileUpload> --> |
| | | <el-button type="primary" link @click="handleExport()">导出</el-button> |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | |
| | | </ProTableV2> |
| | | <div class="chuck-add-or-edit-actions"> |
| | | <el-button class="chuck-add-or-edit-actions" @click="handleBack">取消</el-button> |
| | | <el-button |
| | | <!-- <el-button |
| | | v-if=" |
| | | isSettlement && |
| | | (!form.auditStatus || form.auditStatus !== EnumTaskSettlementAuditStatus.Pass) |
| | |
| | | type="primary" |
| | | @click="handleSubmit()" |
| | | >结算申请</el-button |
| | | > |
| | | > --> |
| | | <el-button |
| | | v-if="isSettlement && form.auditStatus === EnumTaskSettlementAuditStatus.Pass" |
| | | v-if="isSettlement" |
| | | class="chuck-add-or-edit-actions" |
| | | type="primary" |
| | | @click="handleSubmit()" |
| | |
| | | </AppScrollContainer> |
| | | <EditAccountInfoDialog v-bind="dialogProps"></EditAccountInfoDialog> |
| | | <SettleDetailDialog v-bind="dialogSettleProps" /> |
| | | <ResettleEditDialog v-bind="dialogResettleProps" /> |
| | | </LoadingLayout> |
| | | </template> |
| | | <script setup lang="ts"> |
| | |
| | | import * as taskUserServices from '@/services/api/taskUser'; |
| | | import EditAccountInfoDialog from './components/EditAccountInfoDialog.vue'; |
| | | import SettleDetailDialog from './components/SettleDetailDialog.vue'; |
| | | import ResettleEditDialog from './components/ResettleEditDialog.vue'; |
| | | import { Message } from '@bole-core/core'; |
| | | import { SettlementReceiveStatusText, EnumTaskSettlementAuditStatus } from '@/constants'; |
| | | import { |
| | |
| | | onClick: (role) => openDialog(role), |
| | | }, |
| | | extraProps: { |
| | | hide: () => !isSettlement.value, |
| | | hide: (row: API.GetSettlementTaskUsersQueryResultItem) => |
| | | !( |
| | | form.settlementStatus === EnumTaskSettlementStatus.Fail || |
| | | form.settlementStatus === EnumTaskSettlementStatus.Part |
| | | ), |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'editBtn', |
| | | name: '重新结算', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => againSureTaskSettlementOrderRoster(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetSettlementTaskUsersQueryResultItem) => |
| | | row.settlementReceiveStatus !== SettlementReceiveStatus.Refunded, |
| | | }, |
| | | }, |
| | | ]); |
| | |
| | | auditStatus: '' as any as EnumTaskSettlementAuditStatus, |
| | | |
| | | timeoutServiceFee: 0, |
| | | |
| | | settlementStatus: '' as any as EnumTaskSettlementStatus, |
| | | }); |
| | | |
| | | const BaseState = { |
| | |
| | | form.settlementAccess = res?.detail?.settlementAccess; |
| | | form.auditStatus = res?.detail?.auditStatus; |
| | | form.timeoutServiceFee = res?.detail?.timeoutServiceFee ?? 0; |
| | | form.settlementStatus = res?.detail?.settlementStatus; |
| | | // form.settlementOrderName = setOssFileName(res?.detail?.settlementOrderName); |
| | | // form.settlementOrderTime = res?.detail?.settlementOrderTime ?? ''; |
| | | } |
| | |
| | | |
| | | function openDialog(row?: API.GetSettlementTaskUsersQueryResultItem) { |
| | | if (row) { |
| | | handleEdit({ |
| | | id: row?.id, |
| | | settlementAmount: row?.settlementAmount ?? null, |
| | | actualSettlementAmount: row?.actualSettlementAmount ?? null, |
| | | receiveAccount: row?.receiveAccount ?? '', |
| | | bank: row?.bank ?? '', |
| | | // 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 ?? '', |
| | | }); |
| | | if (isSettlement) { |
| | | handleEdit({ |
| | | id: row?.id, |
| | | settlementAmount: row?.settlementAmount ?? null, |
| | | actualSettlementAmount: row?.actualSettlementAmount ?? null, |
| | | receiveAccount: row?.receiveAccount ?? '', |
| | | bank: row?.bank ?? '', |
| | | // 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 ?? '', |
| | | }); |
| | | } else { |
| | | handleResettleEdit({ |
| | | id: row?.id, |
| | | name: row?.name ?? '', |
| | | bank: row?.bank ?? '', |
| | | bankBranch: row?.bankBranch ?? '', |
| | | receiveAccount: row?.receiveAccount ?? '', |
| | | remark: row?.remark ?? '', |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | { leading: true, trailing: false } |
| | | ); |
| | | |
| | | const { |
| | | dialogProps: dialogResettleProps, |
| | | handleEdit: handleResettleEdit, |
| | | editForm: resettleEditForm, |
| | | } = useFormDialog({ |
| | | onConfirm: handleResettle, |
| | | defaultFormParams: { |
| | | id: '', |
| | | name: '', |
| | | bank: '', |
| | | bankBranch: '', |
| | | receiveAccount: '', |
| | | remark: '', |
| | | }, |
| | | }); |
| | | |
| | | async function handleResettle() { |
| | | try { |
| | | let params: API.EditTaskSettlementOrderRosterCommand = { |
| | | id: id, |
| | | bank: resettleEditForm.bank, |
| | | bankBranch: resettleEditForm.bankBranch, |
| | | receiveAccount: resettleEditForm.receiveAccount, |
| | | remark: resettleEditForm.remark, |
| | | settlementAmount: 0, |
| | | actualSettlementAmount: 0, |
| | | }; |
| | | let res = await taskServices.editTaskSettlementOrderRoster(params); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | refetch(); |
| | | getList(paginationState.pageIndex); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function againSureTaskSettlementOrderRoster(row: API.GetSettlementTaskUsersQueryResultItem) { |
| | | try { |
| | | let params: API.AgainSureTaskSettlementOrderRosterCommand = { |
| | | id: row.id, |
| | | }; |
| | | let res = await taskServices.againSureTaskSettlementOrderRoster(params); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | refetch(); |
| | | getList(paginationState.pageIndex); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | function handleBack() { |
| | | closeViewPush(route, { |
| | | name: 'ServiceChargeManageList', |