|
|
@@ -84,6 +84,7 @@
|
|
|
:package-item="templatePackageItem"
|
|
|
:dept-id="deptId"
|
|
|
:task-type-id="templateTaskTypeId"
|
|
|
+ :has-task-type-template="templateHasTaskTypeTemplate"
|
|
|
:sign-date="templateSignDate"
|
|
|
:submitting="signSubmitting"
|
|
|
@confirm="submitTemplateSign"
|
|
|
@@ -175,6 +176,7 @@ const templateVisible = ref(false)
|
|
|
const templateTarget = ref<VisitTarget>()
|
|
|
const templatePackageItem = ref<SharePackageItem>()
|
|
|
const templateTaskTypeId = ref('')
|
|
|
+const templateHasTaskTypeTemplate = ref(false)
|
|
|
const templateSignDate = ref('')
|
|
|
|
|
|
const deptId = computed(() => userStore.currentUserInfo?.deptId || '')
|
|
|
@@ -401,9 +403,10 @@ const confirmPackageSelection = async (event: PackagePickerConfirmEvent) => {
|
|
|
|
|
|
const taskTypeId = TASK_TYPE_MAP[target.type]
|
|
|
const hasTaskTypeTemplate = userStore.currentUserInfo?.hasTaskTypeTemplate || []
|
|
|
+ const hasTemplate = hasTaskTypeTemplate.includes(taskTypeId)
|
|
|
|
|
|
- if (hasTaskTypeTemplate.includes(taskTypeId)) {
|
|
|
- openTemplateForm(target, packageItem, taskTypeId)
|
|
|
+ if (hasTemplate || target.type === 'hospital') {
|
|
|
+ openTemplateForm(target, packageItem, taskTypeId, hasTemplate)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
@@ -413,11 +416,13 @@ const confirmPackageSelection = async (event: PackagePickerConfirmEvent) => {
|
|
|
const openTemplateForm = (
|
|
|
target: VisitTarget,
|
|
|
packageItem: SharePackageItem,
|
|
|
- taskTypeId: string
|
|
|
+ taskTypeId: string,
|
|
|
+ hasTaskTypeTemplate: boolean
|
|
|
) => {
|
|
|
templateTarget.value = target
|
|
|
templatePackageItem.value = packageItem
|
|
|
templateTaskTypeId.value = taskTypeId
|
|
|
+ templateHasTaskTypeTemplate.value = hasTaskTypeTemplate
|
|
|
templateSignDate.value = dayjs().format('YYYY-MM-DD HH:mm:ss')
|
|
|
templateVisible.value = true
|
|
|
}
|
|
|
@@ -494,6 +499,7 @@ watch(
|
|
|
templateTarget.value = undefined
|
|
|
templatePackageItem.value = undefined
|
|
|
templateTaskTypeId.value = ''
|
|
|
+ templateHasTaskTypeTemplate.value = false
|
|
|
templateSignDate.value = ''
|
|
|
packageLoading.value = false
|
|
|
packageList.value = []
|