feat(sign): 补齐医护端与患者端签署流程
This commit is contained in:
@@ -15,6 +15,7 @@ import type { SigningTaskRecord } from '@/api/workbench/types'
|
||||
const props = defineProps<{
|
||||
visible: boolean
|
||||
task: SigningTaskRecord | null
|
||||
isMock: boolean
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -38,7 +39,7 @@ watch(
|
||||
|
||||
const masked = props.task?.smsMobileMasked?.trim() ?? ''
|
||||
registeredMasked.value = masked
|
||||
inputValue.value = masked
|
||||
inputValue.value = props.isMock ? masked : ''
|
||||
error.value = ''
|
||||
},
|
||||
)
|
||||
@@ -54,8 +55,11 @@ function submit() {
|
||||
}
|
||||
|
||||
if (unchanged.value) {
|
||||
// 登记号码本来就是脱敏的,前端拿不到完整值 —— 直接交给后端按任务解析
|
||||
emit('send', null)
|
||||
if (props.isMock) {
|
||||
emit('send', null)
|
||||
return
|
||||
}
|
||||
error.value = '请填写完整手机号;登记号码仅展示脱敏值,不能直接用于投递'
|
||||
return
|
||||
}
|
||||
|
||||
@@ -108,7 +112,8 @@ function submit() {
|
||||
|
||||
<p v-if="error" class="field-error">{{ error }}</p>
|
||||
<p v-else class="field-hint">
|
||||
不改号码即发送到登记号码;发送后任务进入「等待患者签署」,链接 48 小时内有效。
|
||||
{{ isMock ? '演示模式可保留登记号码;' : '真实模式需输入完整手机号;' }}
|
||||
短信投递排队后,任务进入「等待患者签署」。
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -44,7 +44,11 @@ import { useAppStore } from '@/stores/app'
|
||||
import { useLoginStore } from '@/stores/login'
|
||||
import type { SigningFieldProgress, SigningSignatureRequest } from '@/utils/signing-document'
|
||||
import { PRIMARY_SIGNATURE_FIELD_ID } from '@/utils/signing-fields'
|
||||
import { formatSigningMethodTitle, readSigningMethod, toggleSigningMethod } from '@/utils/signing-method'
|
||||
import {
|
||||
formatSigningMethodTitle,
|
||||
readSigningMethod,
|
||||
toggleSigningMethod,
|
||||
} from '@/utils/signing-method'
|
||||
import { downloadSigningPdf } from '@/utils/signing-pdf'
|
||||
|
||||
import OnlineSigningDialog from './components/OnlineSigningDialog.vue'
|
||||
@@ -833,7 +837,7 @@ async function handleTaskAction(action: SigningTaskAction, targetMethod?: Signin
|
||||
...signingApiOptions.value,
|
||||
expectedRowVersion: task.rowVersion,
|
||||
}),
|
||||
'短信已重新发送',
|
||||
'短信投递已重新排队',
|
||||
)
|
||||
return
|
||||
}
|
||||
@@ -1036,7 +1040,7 @@ async function handleSmsSent(mobile: string | null) {
|
||||
smsSendVisible.value = false
|
||||
await refreshTask(
|
||||
updated,
|
||||
`签署短信已发送${updated?.smsMobileMasked ? `至 ${updated.smsMobileMasked}` : ''},等待患者签署`,
|
||||
`签署短信投递已排队${updated?.smsMobileMasked ? `至 ${updated.smsMobileMasked}` : ''},等待患者签署`,
|
||||
)
|
||||
} catch {
|
||||
ElMessage.error('发送签署短信失败,请稍后重试')
|
||||
@@ -1180,6 +1184,7 @@ onMounted(() => {
|
||||
<SmsSendDialog
|
||||
:visible="smsSendVisible"
|
||||
:task="selectedTask"
|
||||
:is-mock="isSigningMockEnabled"
|
||||
@close="smsSendVisible = false"
|
||||
@send="handleSmsSent"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user