|
@@ -250,7 +250,7 @@ function openRecord(item: any) {
|
|
|
destroyOnClose: true,
|
|
destroyOnClose: true,
|
|
|
slots: {
|
|
slots: {
|
|
|
default() {
|
|
default() {
|
|
|
- return h(ServicePackageDetail, <any>{
|
|
|
|
|
|
|
+ return h(ServicePackageDetail, {
|
|
|
data: { ...item, types, status },
|
|
data: { ...item, types, status },
|
|
|
onSubmit(data: any) {
|
|
onSubmit(data: any) {
|
|
|
selectedPackage.value = data.conditioningWrapId;
|
|
selectedPackage.value = data.conditioningWrapId;
|
|
@@ -258,7 +258,7 @@ function openRecord(item: any) {
|
|
|
form.conditioningWrapName = data.conditioningWrapName;
|
|
form.conditioningWrapName = data.conditioningWrapName;
|
|
|
form.conditioningWrapId = data.conditioningWrapId;
|
|
form.conditioningWrapId = data.conditioningWrapId;
|
|
|
},
|
|
},
|
|
|
- });
|
|
|
|
|
|
|
+ } as any);
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
@@ -335,6 +335,10 @@ const projectSearch = ref('');
|
|
|
const showProjectPopover = ref(false);
|
|
const showProjectPopover = ref(false);
|
|
|
|
|
|
|
|
const displayTableData = computed(() => {
|
|
const displayTableData = computed(() => {
|
|
|
|
|
+ // 已开状态不展示新增空白行
|
|
|
|
|
+ if (currentPatient?.value?.status === '0') {
|
|
|
|
|
+ return formData.items ?? [];
|
|
|
|
|
+ }
|
|
|
return [...(formData.items ?? []), { ...emptyRow }];
|
|
return [...(formData.items ?? []), { ...emptyRow }];
|
|
|
});
|
|
});
|
|
|
const isShowDelivery = ref<boolean>(false);
|
|
const isShowDelivery = ref<boolean>(false);
|
|
@@ -361,6 +365,10 @@ const totalPrice = computed(() => {
|
|
|
}, 0);
|
|
}, 0);
|
|
|
});
|
|
});
|
|
|
function onSelectProject({ row }: any) {
|
|
function onSelectProject({ row }: any) {
|
|
|
|
|
+ if (currentPatient?.value?.status === '0') {
|
|
|
|
|
+ notification.warning({ message: '已开状态不可新增项目' });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
if ((formData.items ?? []).some((item) => item.conditioningProgramDetail?.name === row.name)) {
|
|
if ((formData.items ?? []).some((item) => item.conditioningProgramDetail?.name === row.name)) {
|
|
|
notification.warning({ message: '不能重复添加该项目' });
|
|
notification.warning({ message: '不能重复添加该项目' });
|
|
|
return;
|
|
return;
|
|
@@ -408,6 +416,10 @@ function onSelectProject({ row }: any) {
|
|
|
projectSearch.value = '';
|
|
projectSearch.value = '';
|
|
|
}
|
|
}
|
|
|
function removeTableRow(idx: number) {
|
|
function removeTableRow(idx: number) {
|
|
|
|
|
+ if (currentPatient?.value?.status === '0') {
|
|
|
|
|
+ notification.warning({ message: '已开状态不可删除项目' });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
if (idx < (formData.items ?? []).length) {
|
|
if (idx < (formData.items ?? []).length) {
|
|
|
formData.items?.splice(idx, 1);
|
|
formData.items?.splice(idx, 1);
|
|
|
}
|
|
}
|
|
@@ -480,16 +492,31 @@ function editPart(row) {
|
|
|
storage: true,
|
|
storage: true,
|
|
|
slots: {
|
|
slots: {
|
|
|
default() {
|
|
default() {
|
|
|
- return h(AcupointEdit, <any>{
|
|
|
|
|
|
|
+ return h(AcupointEdit, {
|
|
|
data: row,
|
|
data: row,
|
|
|
onSubmit(data: any) {
|
|
onSubmit(data: any) {
|
|
|
VxeUI.modal.close(`edit-part-modal`);
|
|
VxeUI.modal.close(`edit-part-modal`);
|
|
|
},
|
|
},
|
|
|
- });
|
|
|
|
|
|
|
+ } as any);
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+// 已开状态下显示穴位/经络/部位的只读文本
|
|
|
|
|
+function getAcupointText(row: any): string {
|
|
|
|
|
+ const meridians: string[] = Array.isArray(row?.acuMeridianNames)
|
|
|
|
|
+ ? row.acuMeridianNames
|
|
|
|
|
+ : Array.isArray(row?.cwcpAcuMeridians)
|
|
|
|
|
+ ? row.cwcpAcuMeridians.map((it: any) => it?.name).filter(Boolean)
|
|
|
|
|
+ : [];
|
|
|
|
|
+ const points: string[] = Array.isArray(row?.acuPointNames)
|
|
|
|
|
+ ? row.acuPointNames
|
|
|
|
|
+ : Array.isArray(row?.cwcpAcuPoints)
|
|
|
|
|
+ ? row.cwcpAcuPoints.map((it: any) => it?.name).filter(Boolean)
|
|
|
|
|
+ : [];
|
|
|
|
|
+ const parts = [...meridians, ...points].filter(Boolean);
|
|
|
|
|
+ return parts.length ? parts.join('、') : '-';
|
|
|
|
|
+}
|
|
|
const allProjects = ref<
|
|
const allProjects = ref<
|
|
|
Array<{
|
|
Array<{
|
|
|
name: string;
|
|
name: string;
|
|
@@ -990,17 +1017,17 @@ function openPatientHealthRecord(row: { id: string }, showType: 'analysis' | 'sc
|
|
|
<vxe-table :data="displayTableData" border style="margin-top: 8px" max-height="380px">
|
|
<vxe-table :data="displayTableData" border style="margin-top: 8px" max-height="380px">
|
|
|
<vxe-column width="60" title="">
|
|
<vxe-column width="60" title="">
|
|
|
<template #default="{ rowIndex }">
|
|
<template #default="{ rowIndex }">
|
|
|
- <a-button type="text" danger @click="removeTableRow(rowIndex)" :disabled="rowIndex === displayTableData.length - 1">
|
|
|
|
|
|
|
+ <a-button type="text" danger @click="removeTableRow(rowIndex)" :disabled="currentPatient?.status === '0' || rowIndex === displayTableData.length - 1">
|
|
|
<MinusCircleOutlined />
|
|
<MinusCircleOutlined />
|
|
|
</a-button>
|
|
</a-button>
|
|
|
</template>
|
|
</template>
|
|
|
</vxe-column>
|
|
</vxe-column>
|
|
|
<vxe-column field="conditioningProgramDetail.name" title="项目名称" width="180">
|
|
<vxe-column field="conditioningProgramDetail.name" title="项目名称" width="180">
|
|
|
<template #default="{ row, rowIndex }">
|
|
<template #default="{ row, rowIndex }">
|
|
|
- <template v-if="rowIndex === displayTableData.length - 1">
|
|
|
|
|
|
|
+ <template v-if="currentPatient?.status !== '0' && rowIndex === displayTableData.length - 1">
|
|
|
<a-popover
|
|
<a-popover
|
|
|
v-model:open="showProjectPopover"
|
|
v-model:open="showProjectPopover"
|
|
|
- trigger="click"
|
|
|
|
|
|
|
+ :trigger="currentPatient?.status === '0' ? 'none' : 'click'"
|
|
|
placement="bottomLeft"
|
|
placement="bottomLeft"
|
|
|
:overlayStyle="{ width: '350px', padding: 0 }"
|
|
:overlayStyle="{ width: '350px', padding: 0 }"
|
|
|
@openChange="projectSearchFocus"
|
|
@openChange="projectSearchFocus"
|
|
@@ -1034,7 +1061,7 @@ function openPatientHealthRecord(row: { id: string }, showType: 'analysis' | 'sc
|
|
|
<vxe-column field="days" title="周期" width="120">
|
|
<vxe-column field="days" title="周期" width="120">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
<div style="display: flex; align-items: center">
|
|
<div style="display: flex; align-items: center">
|
|
|
- <a-input v-model:value="row.days" @change="() => calculateCount(row)" />
|
|
|
|
|
|
|
+ <a-input v-model:value="row.days" @change="() => calculateCount(row)" :disabled="currentPatient?.status === '0'" />
|
|
|
<span>天</span>
|
|
<span>天</span>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -1044,9 +1071,9 @@ function openPatientHealthRecord(row: { id: string }, showType: 'analysis' | 'sc
|
|
|
<div v-if="row.conditioningProgramDetail?.name === '健康咨询' || row.conditioningProgramDetail?.name === '健康评估'" class="flex items-center">
|
|
<div v-if="row.conditioningProgramDetail?.name === '健康咨询' || row.conditioningProgramDetail?.name === '健康评估'" class="flex items-center">
|
|
|
<div class="flex items-center mr-4">
|
|
<div class="flex items-center mr-4">
|
|
|
<span>每</span>
|
|
<span>每</span>
|
|
|
- <a-input v-model:value="row.frequencyType" style="width: 50px" @change="() => calculateCount(row)" :disabled="row.frequencyType === '不限'" />
|
|
|
|
|
|
|
+ <a-input v-model:value="row.frequencyType" style="width: 50px" @change="() => calculateCount(row)" :disabled="currentPatient?.status === '0' || row.frequencyType === '不限'" />
|
|
|
<span>天</span>
|
|
<span>天</span>
|
|
|
- <a-input v-model:value="row.frequencyMeasure" style="width: 50px" @change="() => calculateCount(row)" :disabled="row.frequencyType === '不限'" />
|
|
|
|
|
|
|
+ <a-input v-model:value="row.frequencyMeasure" style="width: 50px" @change="() => calculateCount(row)" :disabled="currentPatient?.status === '0' || row.frequencyType === '不限'" />
|
|
|
<span>{{ row.conditioningProgramDetail?.cpFixedPricingRule?.convertUnit ? row.conditioningProgramDetail?.cpFixedPricingRule?.convertUnit : '次' }}</span>
|
|
<span>{{ row.conditioningProgramDetail?.cpFixedPricingRule?.convertUnit ? row.conditioningProgramDetail?.cpFixedPricingRule?.convertUnit : '次' }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
@@ -1059,6 +1086,7 @@ function openPatientHealthRecord(row: { id: string }, showType: 'analysis' | 'sc
|
|
|
calculateCount(row);
|
|
calculateCount(row);
|
|
|
}
|
|
}
|
|
|
"
|
|
"
|
|
|
|
|
+ :disabled="currentPatient?.status === '0'"
|
|
|
>
|
|
>
|
|
|
<a-checkbox value="不限">不限</a-checkbox>
|
|
<a-checkbox value="不限">不限</a-checkbox>
|
|
|
</a-checkbox-group>
|
|
</a-checkbox-group>
|
|
@@ -1066,9 +1094,9 @@ function openPatientHealthRecord(row: { id: string }, showType: 'analysis' | 'sc
|
|
|
</div>
|
|
</div>
|
|
|
<div class="flex items-center" v-else>
|
|
<div class="flex items-center" v-else>
|
|
|
<span>每</span>
|
|
<span>每</span>
|
|
|
- <a-input v-model:value="row.frequencyType" style="width: 50px" @change="() => calculateCount(row)" />
|
|
|
|
|
|
|
+ <a-input v-model:value="row.frequencyType" style="width: 50px" @change="() => calculateCount(row)" :disabled="currentPatient?.status === '0'" />
|
|
|
<span>天</span>
|
|
<span>天</span>
|
|
|
- <a-input v-model:value="row.frequencyMeasure" style="width: 50px" @change="() => calculateCount(row)" />
|
|
|
|
|
|
|
+ <a-input v-model:value="row.frequencyMeasure" style="width: 50px" @change="() => calculateCount(row)" :disabled="currentPatient?.status === '0'" />
|
|
|
<span>{{ row.conditioningProgramDetail?.cpFixedPricingRule?.convertUnit ? row.conditioningProgramDetail?.cpFixedPricingRule?.convertUnit : '次' }}</span>
|
|
<span>{{ row.conditioningProgramDetail?.cpFixedPricingRule?.convertUnit ? row.conditioningProgramDetail?.cpFixedPricingRule?.convertUnit : '次' }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -1102,7 +1130,7 @@ function openPatientHealthRecord(row: { id: string }, showType: 'analysis' | 'sc
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
<div style="display: flex; align-items: center">
|
|
<div style="display: flex; align-items: center">
|
|
|
<span>调养开始第</span>
|
|
<span>调养开始第</span>
|
|
|
- <a-input v-model:value="row.initialDay" style="width: 80px" />
|
|
|
|
|
|
|
+ <a-input v-model:value="row.initialDay" style="width: 80px" :disabled="currentPatient?.status === '0'" />
|
|
|
<span>天</span>
|
|
<span>天</span>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -1118,10 +1146,11 @@ function openPatientHealthRecord(row: { id: string }, showType: 'analysis' | 'sc
|
|
|
|
|
|
|
|
<vxe-column field="conditioningProgramDetail.pricingType" title="穴位/经络/部位" width="160">
|
|
<vxe-column field="conditioningProgramDetail.pricingType" title="穴位/经络/部位" width="160">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
- <!-- <a-input v-model:value="row.desc" style="width: 120px" :disabled="currentPatient?.status === '0' ? true : false" /> -->
|
|
|
|
|
- <span>
|
|
|
|
|
- <a @click="editPart(row)" style="color: #1890ff; cursor: pointer" v-if="row.conditioningProgramDetail.pricingType === '1'">编辑</a>
|
|
|
|
|
- </span>
|
|
|
|
|
|
|
+ <a
|
|
|
|
|
+ v-if="row.conditioningProgramDetail.pricingType === '1' && currentPatient?.status !== '0'"
|
|
|
|
|
+ @click="editPart(row)"
|
|
|
|
|
+ :style="{ color: '#1890ff', cursor: 'pointer' }"
|
|
|
|
|
+ >编辑</a>
|
|
|
</template>
|
|
</template>
|
|
|
</vxe-column>
|
|
</vxe-column>
|
|
|
<vxe-column field="remark" title="说明" width="180">
|
|
<vxe-column field="remark" title="说明" width="180">
|