diff --git a/apps/web-antd/src/components/public-account-lock/LockPayPanel.vue b/apps/web-antd/src/components/public-account-lock/LockPayPanel.vue index 7b0b7677..3db8ca3c 100644 --- a/apps/web-antd/src/components/public-account-lock/LockPayPanel.vue +++ b/apps/web-antd/src/components/public-account-lock/LockPayPanel.vue @@ -7,37 +7,43 @@ import { onMounted, ref } from 'vue'; import { Button } from 'ant-design-vue'; import DailyUploadForm from '#/views/finance/public-account-pay/components/daily-upload-form.vue'; +import { buildDailyUploadFormData } from '#/views/finance/public-account-pay/utils/daily-upload'; const props = defineProps<{ - dailyId: number; - storeName?: string; - platformAmount?: string; billDateTxt?: string; + dailyId: number; + platformAmount?: string; + storeName?: string; unlockMode?: string; }>(); const emit = defineEmits<{ back: []; - waiting: [payload?: { - bill_status?: number; - contact_phones?: { name?: string; phone: string }[]; - }]; + waiting: [ + payload?: { + bill_status?: number; + contact_phones?: { name?: string; phone: string }[]; + }, + ]; }>(); const formRef = ref>(); const submitting = ref(false); -const unlockHint = props.unlockMode === 'voucher' - ? '提交成功后立刻解锁,接诊和开方可继续。' - : '提交后仍锁定,需平台管理员确认到账后才会解锁。'; +const unlockHint = + props.unlockMode === 'voucher' + ? '提交成功后立刻解锁,接诊和开方可继续。' + : '提交后仍锁定,需平台管理员确认到账后才会解锁。'; onMounted(() => { - formRef.value?.load({ - id: props.dailyId, - store_name: props.storeName, - platform_amount: props.platformAmount, - bill_date_txt: props.billDateTxt, - }); + formRef.value?.load( + buildDailyUploadFormData({ + id: props.dailyId, + store_name: props.storeName, + platform_amount: props.platformAmount, + bill_date_txt: props.billDateTxt, + }), + ); }); /** 可无附件直接声明已支付;若已选文件一并提交 */ @@ -51,9 +57,9 @@ async function onDeclarePaid() { } function onFormSuccess(payload: { - unlocked: boolean; bill_status?: number; contact_phones?: { name?: string; phone: string }[]; + unlocked: boolean; }) { if (!payload.unlocked) { emit('waiting', payload); @@ -73,7 +79,9 @@ function onFormSuccess(payload: { @success="onFormSuccess" />
- +