| | |
| | | </nut-form> |
| | | <div class="payroll-form-footer"> |
| | | <nut-button @click="handleCancel">取消</nut-button> |
| | | <nut-button type="primary" @click="dialogVisible = false">确认</nut-button> |
| | | <nut-button type="primary" @click="recordForm">确认</nut-button> |
| | | </div> |
| | | </div> |
| | | </nut-popup> |
| | |
| | | handleCancel, |
| | | openDialog, |
| | | handleConfirm, |
| | | recordForm, |
| | | onTimeoutHoursChange, |
| | | } = useSettlementAmount({ |
| | | taskInfoUserId: id, |
| | |
| | | </nut-form> |
| | | <div class="payroll-form-footer"> |
| | | <nut-button @click="handleCancel">取消</nut-button> |
| | | <nut-button type="primary" @click="dialogVisible = false">确认</nut-button> |
| | | <nut-button type="primary" @click="recordForm">确认</nut-button> |
| | | </div> |
| | | </div> |
| | | </nut-popup> |
| | |
| | | handleCancel, |
| | | openDialog, |
| | | handleConfirm, |
| | | recordForm, |
| | | onTimeoutHoursChange, |
| | | } = useSettlementAmount({ |
| | | taskInfoUserId: id, |
| | |
| | | }: UseSettlementAmountOptions) { |
| | | const dialogVisible = ref(false); |
| | | |
| | | const preForm = reactive({ |
| | | /**是否记录过 */ |
| | | isRecord: false, |
| | | serviceFee: 0, |
| | | timeoutHours: 0, |
| | | timeoutFee: 0, |
| | | otherFee: 0, |
| | | remark: '', |
| | | timeoutServiceFee: 0, |
| | | }); |
| | | |
| | | const form = reactive({ |
| | | serviceFee: 0, |
| | | timeoutHours: 0, |
| | |
| | | let res = await calcTaskCheckReceive(checkInTime); |
| | | if (res) { |
| | | dialogVisible.value = true; |
| | | form.serviceFee = res.serviceFee ?? 0; |
| | | form.timeoutHours = res.timeoutHours ?? 0; |
| | | form.otherFee = 0; |
| | | form.timeoutFee = 0; |
| | | form.remark = ''; |
| | | form.timeoutServiceFee = unref(timeoutServiceFee) ?? 0; |
| | | if (preForm.isRecord) { |
| | | form.serviceFee = preForm.serviceFee; |
| | | form.timeoutHours = preForm.timeoutHours; |
| | | form.otherFee = preForm.otherFee; |
| | | form.timeoutFee = preForm.timeoutFee; |
| | | form.remark = preForm.remark; |
| | | form.timeoutServiceFee = preForm.timeoutServiceFee; |
| | | } else { |
| | | form.serviceFee = res.serviceFee ?? 0; |
| | | form.timeoutHours = res.timeoutHours ?? 0; |
| | | form.otherFee = 0; |
| | | form.timeoutFee = 0; |
| | | form.remark = ''; |
| | | form.timeoutServiceFee = unref(timeoutServiceFee) ?? 0; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | function handleCancel() { |
| | | dialogVisible.value = false; |
| | | } |
| | | |
| | | function recordForm() { |
| | | preForm.serviceFee = form.serviceFee; |
| | | preForm.timeoutHours = form.timeoutHours; |
| | | preForm.otherFee = form.otherFee; |
| | | preForm.timeoutFee = form.timeoutFee; |
| | | preForm.remark = form.remark; |
| | | preForm.timeoutServiceFee = form.timeoutServiceFee; |
| | | preForm.isRecord = true; |
| | | dialogVisible.value = false; |
| | | } |
| | | |
| | |
| | | openDialog, |
| | | handleConfirm, |
| | | onTimeoutHoursChange, |
| | | recordForm, |
| | | }; |
| | | } |