feat: 在证书审核弹窗中增加短信通知功能并调整发票发送状态字段

This commit is contained in:
Wei_佳 2025-11-27 12:26:42 +08:00
parent fd07c81d4b
commit dc218e3d0e
3 changed files with 26 additions and 1 deletions

View File

@ -68,4 +68,5 @@ export default {
request.post(`/valuations/${data.valuation_id || data.id}/reject`, { admin_notes: data.admin_notes }),
updateValuationNotes: (data = {}) =>
request.put(`/valuations/${data.valuation_id || data.id}/admin-notes`, { admin_notes: data.admin_notes }),
sendSmsReport: (data = {}) => request.post('/sms/send-report', data),
}

View File

@ -296,6 +296,7 @@ async function handleInvoiceConfirm(formData) {
subject: formData.email, // subject email
body: formData.content, // content -> body
file_url: formData.attachments, // attachments -> file_url
status:'success'
}
let res = await api.sendInvoice(payload)

View File

@ -15,6 +15,7 @@ import {
import { getToken } from '@/utils/auth/token'
import { generateReport } from '@/utils/report'
import api from '@/api'
const props = defineProps({
visible: {
@ -188,6 +189,25 @@ const handlePreview = (file) => {
// true NUpload 使
return true
}
//
const handleSmsNotify = async () => {
try {
const phone = props.certificateData?.detailData?.user_phone
if (!phone) {
message.error('缺少手机号,无法发送短信')
return
}
message.loading('正在发送短信...')
await api.sendSmsReport({
phone: phone
})
message.success('短信发送成功')
} catch (error) {
console.error(error)
message.error('短信发送失败')
}
}
</script>
<template>
@ -255,7 +275,10 @@ const handlePreview = (file) => {
<div class="modal-footer">
<NButton @click="handleClose">取消</NButton>
<NButton v-if="isUploadMode" type="primary" @click="handleConfirm">
上传并通知
上传
</NButton>
<NButton v-if="isUploadMode" type="primary" @click="handleSmsNotify">
短信通知
</NButton>
<NButton v-else type="primary" @click="handleConfirm">
确定