|  |  |  | 
|---|
|  |  |  | :name="item.name" | 
|---|
|  |  |  | :gender="item.gender" | 
|---|
|  |  |  | :isReal="item.isReal" | 
|---|
|  |  |  | :totalWorkHours="item.totalWorkHours" | 
|---|
|  |  |  | :totalWorkHours="item.timeoutHours" | 
|---|
|  |  |  | :settlementAmount="item.settlementAmount" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <template #actions v-if="form.auditStatus === EnumTaskSettlementAuditStatus.Wait"> | 
|---|
|  |  |  | <div class="payroll-manage-detail-card-actions"> | 
|---|
|  |  |  | <nut-button type="primary" plain @click="goPayrollChange(item)">修改</nut-button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </PayrollManageDetailCard> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </InfiniteLoading> | 
|---|
|  |  |  | <PageFooter v-if="form."> | 
|---|
|  |  |  | <PageFooter v-if="form.auditStatus === EnumTaskSettlementAuditStatus.Wait"> | 
|---|
|  |  |  | <PageFooterBtn type="primary" @click="auditTaskSettlement(EnumTaskSettlementAuditStatus.Pass)" | 
|---|
|  |  |  | >审核通过</PageFooterBtn | 
|---|
|  |  |  | > | 
|---|
|  |  |  | 
|---|
|  |  |  | auditStatus: 0, | 
|---|
|  |  |  | billingMethod: 0, | 
|---|
|  |  |  | settlementStatus: 0, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | settlementTaskUsers: [] as API.GetSettlementTaskUsersQueryResultItem[], | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const state = reactive({ | 
|---|
|  |  |  | isLoaded: false, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const { | 
|---|
|  |  |  | 
|---|
|  |  |  | return res; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | placeholderData: () => ({} as API.GetSettlementTaskUsersQueryResult), | 
|---|
|  |  |  | onSuccess(res) { | 
|---|
|  |  |  | if (!state.isLoaded) { | 
|---|
|  |  |  | form.settlementTaskUsers = res?.data ?? []; | 
|---|
|  |  |  | state.isLoaded = true; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const { infiniteLoadingProps, invalidateQueries } = useInfiniteLoading( | 
|---|
|  |  |  | 
|---|
|  |  |  | pageModel: { | 
|---|
|  |  |  | rows: 20, | 
|---|
|  |  |  | page: pageParam, | 
|---|
|  |  |  | totalCount: detail.value?.data.length, | 
|---|
|  |  |  | totalCount: form.settlementTaskUsers.length, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | data: paginateList(detail.value?.data, pageParam, 20), | 
|---|
|  |  |  | data: paginateList(form.settlementTaskUsers, pageParam, 20), | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | enabled: computed(() => !!detail.value?.data), | 
|---|
|  |  |  | enabled: computed(() => form.settlementTaskUsers?.length > 0), | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | id: id, | 
|---|
|  |  |  | operatorToken: operatorToken, | 
|---|
|  |  |  | auditStatus: auditStatus, | 
|---|
|  |  |  | rosters: form.settlementTaskUsers.map((item) => ({ | 
|---|
|  |  |  | id: item.id, | 
|---|
|  |  |  | serviceFee: item.serviceFee, | 
|---|
|  |  |  | timeoutHours: item.timeoutHours, | 
|---|
|  |  |  | timeoutFee: item.timeoutFee, | 
|---|
|  |  |  | otherFee: item.otherFee, | 
|---|
|  |  |  | remark: item.remark, | 
|---|
|  |  |  | settlementAmount: item.settlementAmount, | 
|---|
|  |  |  | })), | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | // if(auditStatus===EnumTaskSettlementAuditStatus.Pass){ | 
|---|
|  |  |  | //   params.rosters | 
|---|
|  |  |  | // } | 
|---|
|  |  |  | let res = await taskServices.auditTaskSettlement(params); | 
|---|
|  |  |  | if (res) { | 
|---|
|  |  |  | Message.success('操作成功', { | 
|---|
|  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } catch (error) {} | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function goPayrollChange(item: API.GetSettlementTaskUsersQueryResultItem) { | 
|---|
|  |  |  | Taro.navigateTo({ | 
|---|
|  |  |  | url: `${RouterPath.payrollChange}?orderRosterId=${item.id}&settleId=${id}&operatorToken=${operatorToken}`, | 
|---|
|  |  |  | events: { | 
|---|
|  |  |  | update: function (params: API.EditTaskSettlementOrderRosterCommand) { | 
|---|
|  |  |  | // refetch(); | 
|---|
|  |  |  | form.settlementTaskUsers = form.settlementTaskUsers.map((item) => { | 
|---|
|  |  |  | if (item.id == params.id) { | 
|---|
|  |  |  | item.settlementAmount = params.settlementAmount; | 
|---|
|  |  |  | item.actualSettlementAmount = params.actualSettlementAmount; | 
|---|
|  |  |  | item.receiveAccount = params.receiveAccount; | 
|---|
|  |  |  | item.bank = params.bank; | 
|---|
|  |  |  | item.serviceFee = params.serviceFee; | 
|---|
|  |  |  | item.timeoutHours = params.timeoutHours; | 
|---|
|  |  |  | item.timeoutFee = params.timeoutFee; | 
|---|
|  |  |  | item.otherFee = params.otherFee; | 
|---|
|  |  |  | item.remark = params.remark; | 
|---|
|  |  |  | return item; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return item; | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .payroll-manage-detail-card-actions { | 
|---|
|  |  |  | --nut-button-default-height: 24px; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | text-align: right; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </style> | 
|---|