|
@@ -90,12 +90,12 @@ const address = ref({
|
|
|
const lifeCwData = ref([]);
|
|
const lifeCwData = ref([]);
|
|
|
// 获取可用的服务包
|
|
// 获取可用的服务包
|
|
|
const suggestCwData = ref<string[]>([]);
|
|
const suggestCwData = ref<string[]>([]);
|
|
|
-async function loadAvailableCw(patientId: string,patientConditioningRecordId:string) {
|
|
|
|
|
- const res: any = await getAvailableCwMethod(patientId,patientConditioningRecordId);
|
|
|
|
|
|
|
+async function loadAvailableCw(patientId: string, patientConditioningRecordId: string) {
|
|
|
|
|
+ const res: any = await getAvailableCwMethod(patientId, patientConditioningRecordId);
|
|
|
if (res.length > 0) {
|
|
if (res.length > 0) {
|
|
|
lifeCwData.value = res;
|
|
lifeCwData.value = res;
|
|
|
// 筛选出可推荐的
|
|
// 筛选出可推荐的
|
|
|
- suggestCwData.value = lifeCwData.value.filter((item: any) => item.isSuggest==='Y');
|
|
|
|
|
|
|
+ suggestCwData.value = lifeCwData.value.filter((item: any) => item.isSuggest === 'Y');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
export interface PatientModel {
|
|
export interface PatientModel {
|
|
@@ -170,9 +170,9 @@ async function getCpRecordDetail(id: string) {
|
|
|
form.detailAddress = res?.detailAddress;
|
|
form.detailAddress = res?.detailAddress;
|
|
|
form.phone = res?.phone;
|
|
form.phone = res?.phone;
|
|
|
form.healthAnalysisReport = res.healthAnalysisReport;
|
|
form.healthAnalysisReport = res.healthAnalysisReport;
|
|
|
- selectedProvince.value=res.provinceCode;
|
|
|
|
|
- selectedCity.value=res.cityCode;
|
|
|
|
|
- selectedArea.value=res.areaCode
|
|
|
|
|
|
|
+ selectedProvince.value = res.provinceCode;
|
|
|
|
|
+ selectedCity.value = res.cityCode;
|
|
|
|
|
+ selectedArea.value = res.areaCode;
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
function getPatientList(id: string) {
|
|
function getPatientList(id: string) {
|
|
@@ -196,13 +196,12 @@ onMounted(async () => {
|
|
|
} else {
|
|
} else {
|
|
|
currentPatient.value = res[0];
|
|
currentPatient.value = res[0];
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
if (currentPatient.value?.patientId) {
|
|
if (currentPatient.value?.patientId) {
|
|
|
// 获取患者列表
|
|
// 获取患者列表
|
|
|
await getPatientList(currentPatient.value?.patientId || '');
|
|
await getPatientList(currentPatient.value?.patientId || '');
|
|
|
// 获取服务包选择列表
|
|
// 获取服务包选择列表
|
|
|
- await loadAvailableCw(currentPatient.value?.patientId || '',currentPatient.value?.id || '');
|
|
|
|
|
|
|
+ await loadAvailableCw(currentPatient.value?.patientId || '', currentPatient.value?.id || '');
|
|
|
}
|
|
}
|
|
|
if (currentPatient.value?.id) {
|
|
if (currentPatient.value?.id) {
|
|
|
// 获取调养记录
|
|
// 获取调养记录
|
|
@@ -221,7 +220,7 @@ function loadTags(patientId: string) {
|
|
|
|
|
|
|
|
// 展示的患者数据
|
|
// 展示的患者数据
|
|
|
const filteredPatients: any = computed(() => {
|
|
const filteredPatients: any = computed(() => {
|
|
|
- if(patients.value.length > 0){
|
|
|
|
|
|
|
+ if (patients.value.length > 0) {
|
|
|
return patients.value.filter((p: any) => (p.patientName || '').includes(searchName.value));
|
|
return patients.value.filter((p: any) => (p.patientName || '').includes(searchName.value));
|
|
|
}
|
|
}
|
|
|
return [];
|
|
return [];
|
|
@@ -233,19 +232,18 @@ async function selectPatient(item: any) {
|
|
|
currentPatient.value = item;
|
|
currentPatient.value = item;
|
|
|
// 获取患者信息
|
|
// 获取患者信息
|
|
|
await getPatientList(item.patientId);
|
|
await getPatientList(item.patientId);
|
|
|
- await loadAvailableCw(item.patientId || '',item.id || '');
|
|
|
|
|
|
|
+ await loadAvailableCw(item.patientId || '', item.id || '');
|
|
|
// 获取患者调养记录
|
|
// 获取患者调养记录
|
|
|
await getCpRecordDetail(item.id);
|
|
await getCpRecordDetail(item.id);
|
|
|
// 清空服务包选择
|
|
// 清空服务包选择
|
|
|
selectedPackage.value = '';
|
|
selectedPackage.value = '';
|
|
|
currentSelectedPackage.value = null;
|
|
currentSelectedPackage.value = null;
|
|
|
- btnType.value=''
|
|
|
|
|
-
|
|
|
|
|
|
|
+ btnType.value = '';
|
|
|
}
|
|
}
|
|
|
const btnType = ref('');
|
|
const btnType = ref('');
|
|
|
// 打开调养记录
|
|
// 打开调养记录
|
|
|
function openRecord(item: any) {
|
|
function openRecord(item: any) {
|
|
|
- const status=currentPatient.value.status;
|
|
|
|
|
|
|
+ const status = currentPatient.value.status;
|
|
|
const types = 'record';
|
|
const types = 'record';
|
|
|
VxeUI.modal.open({
|
|
VxeUI.modal.open({
|
|
|
id: 'servicePackageDetail-modal',
|
|
id: 'servicePackageDetail-modal',
|
|
@@ -257,9 +255,9 @@ function openRecord(item: any) {
|
|
|
slots: {
|
|
slots: {
|
|
|
default() {
|
|
default() {
|
|
|
return h(ServicePackageDetail, <any>{
|
|
return h(ServicePackageDetail, <any>{
|
|
|
- data: { ...item, types ,status},
|
|
|
|
|
|
|
+ data: { ...item, types, status },
|
|
|
onSubmit(data: any) {
|
|
onSubmit(data: any) {
|
|
|
- selectedPackage.value=data.conditioningWrapId;
|
|
|
|
|
|
|
+ selectedPackage.value = data.conditioningWrapId;
|
|
|
formData.items = data?.items ?? [];
|
|
formData.items = data?.items ?? [];
|
|
|
form.conditioningWrapName = data.conditioningWrapName;
|
|
form.conditioningWrapName = data.conditioningWrapName;
|
|
|
form.conditioningWrapId = data.conditioningWrapId;
|
|
form.conditioningWrapId = data.conditioningWrapId;
|
|
@@ -624,7 +622,7 @@ async function handleSubmit() {
|
|
|
delete item.id;
|
|
delete item.id;
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ form.isDelivery = isShowDelivery.value ? 'Y' : 'N';
|
|
|
form.id = Number(currentPatient.value.id);
|
|
form.id = Number(currentPatient.value.id);
|
|
|
form.patientId = currentPatient.value.patientId;
|
|
form.patientId = currentPatient.value.patientId;
|
|
|
form.patientName = currentPatient.value.patientName;
|
|
form.patientName = currentPatient.value.patientName;
|
|
@@ -652,7 +650,7 @@ async function handleSubmit() {
|
|
|
// 获取患者列表
|
|
// 获取患者列表
|
|
|
await getPatientList(currentPatient.value?.patientId || '');
|
|
await getPatientList(currentPatient.value?.patientId || '');
|
|
|
// 获取服务包选择列表
|
|
// 获取服务包选择列表
|
|
|
- await loadAvailableCw(currentPatient.value?.patientId || '',currentPatient.value?.id || '');
|
|
|
|
|
|
|
+ await loadAvailableCw(currentPatient.value?.patientId || '', currentPatient.value?.id || '');
|
|
|
|
|
|
|
|
// 获取调养记录
|
|
// 获取调养记录
|
|
|
await getCpRecordDetail(currentPatient.value?.id || '');
|
|
await getCpRecordDetail(currentPatient.value?.id || '');
|
|
@@ -710,8 +708,7 @@ function handleProvinceChange(value: string) {
|
|
|
selectedArea.value = '';
|
|
selectedArea.value = '';
|
|
|
form.cityCode = '';
|
|
form.cityCode = '';
|
|
|
form.areaCode = '';
|
|
form.areaCode = '';
|
|
|
- form.detailAddress=''
|
|
|
|
|
-
|
|
|
|
|
|
|
+ form.detailAddress = '';
|
|
|
}
|
|
}
|
|
|
selectedProvince.value = value;
|
|
selectedProvince.value = value;
|
|
|
const selectedProvinceOption = provinceOptions.value.find((p) => p.value === value);
|
|
const selectedProvinceOption = provinceOptions.value.find((p) => p.value === value);
|
|
@@ -729,7 +726,7 @@ function handleCityChange(value: string) {
|
|
|
if (btnType.value === '转方案') {
|
|
if (btnType.value === '转方案') {
|
|
|
selectedArea.value = '';
|
|
selectedArea.value = '';
|
|
|
form.areaCode = '';
|
|
form.areaCode = '';
|
|
|
- form.detailAddress=''
|
|
|
|
|
|
|
+ form.detailAddress = '';
|
|
|
}
|
|
}
|
|
|
loadAreas(selectedCityOption?.name, value);
|
|
loadAreas(selectedCityOption?.name, value);
|
|
|
}
|
|
}
|
|
@@ -740,7 +737,7 @@ function handleAreaChange(value: string) {
|
|
|
form.areaName = selectedAreaOption?.label || '';
|
|
form.areaName = selectedAreaOption?.label || '';
|
|
|
form.areaCode = selectedAreaOption?.value || '';
|
|
form.areaCode = selectedAreaOption?.value || '';
|
|
|
if (btnType.value === '转方案') {
|
|
if (btnType.value === '转方案') {
|
|
|
- form.detailAddress=''
|
|
|
|
|
|
|
+ form.detailAddress = '';
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -918,10 +915,7 @@ function openPatientHealthRecord(row: { id: string }, showType: 'analysis' | 'sc
|
|
|
<!-- 左侧患者列表 -->
|
|
<!-- 左侧患者列表 -->
|
|
|
<div class="left-panel">
|
|
<div class="left-panel">
|
|
|
<a-input v-model:value="searchName" placeholder="输入姓名搜索" style="margin-bottom: 12px" />
|
|
<a-input v-model:value="searchName" placeholder="输入姓名搜索" style="margin-bottom: 12px" />
|
|
|
- <div
|
|
|
|
|
- v-if="filteredPatients.length > 0"
|
|
|
|
|
- class="patient-list"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <div v-if="filteredPatients.length > 0" class="patient-list">
|
|
|
<div
|
|
<div
|
|
|
class="patient-item"
|
|
class="patient-item"
|
|
|
v-for="item in filteredPatients"
|
|
v-for="item in filteredPatients"
|
|
@@ -930,7 +924,8 @@ function openPatientHealthRecord(row: { id: string }, showType: 'analysis' | 'sc
|
|
|
:class="{ active: currentPatient?.id === item.id }"
|
|
:class="{ active: currentPatient?.id === item.id }"
|
|
|
style="cursor: pointer"
|
|
style="cursor: pointer"
|
|
|
>
|
|
>
|
|
|
- <span>{{ item.patientName }}</span><span v-if="item.patientAge">{{ item.patientAge }}岁</span>
|
|
|
|
|
|
|
+ <span>{{ item.patientName }}</span
|
|
|
|
|
+ ><span v-if="item.patientAge">{{ item.patientAge }}岁</span>
|
|
|
<span v-if="item.status === '0'" style="color: #aaa">(已开)</span>
|
|
<span v-if="item.status === '0'" style="color: #aaa">(已开)</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -966,7 +961,7 @@ function openPatientHealthRecord(row: { id: string }, showType: 'analysis' | 'sc
|
|
|
<span>{{ form.conditioningWrapName }}</span>
|
|
<span>{{ form.conditioningWrapName }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else>
|
|
<template v-else>
|
|
|
- <a-select v-model:value="selectedPackage" style="width: 180px" placeholder="请选择服务包" >
|
|
|
|
|
|
|
+ <a-select v-model:value="selectedPackage" style="width: 180px" placeholder="请选择服务包">
|
|
|
<a-select-option v-for="item in lifeCwData" :key="item.id" :value="item.id" @click="selectCw(item)">
|
|
<a-select-option v-for="item in lifeCwData" :key="item.id" :value="item.id" @click="selectCw(item)">
|
|
|
{{ item.name }}
|
|
{{ item.name }}
|
|
|
</a-select-option>
|
|
</a-select-option>
|
|
@@ -1148,7 +1143,7 @@ function openPatientHealthRecord(row: { id: string }, showType: 'analysis' | 'sc
|
|
|
</div>
|
|
</div>
|
|
|
<!-- 配送信息 -->
|
|
<!-- 配送信息 -->
|
|
|
<div class="delivery-row" v-if="isShowDelivery">
|
|
<div class="delivery-row" v-if="isShowDelivery">
|
|
|
- <div v-if="(btnType !== '转方案' && currentPatient?.status === '0')">
|
|
|
|
|
|
|
+ <div v-if="btnType !== '转方案' && currentPatient?.status === '0'">
|
|
|
<a-checkbox v-model:checked="deliveryChecked" disabled>配送</a-checkbox>
|
|
<a-checkbox v-model:checked="deliveryChecked" disabled>配送</a-checkbox>
|
|
|
<span>地址:</span>
|
|
<span>地址:</span>
|
|
|
<span>{{ form.provinceName }}{{ form.cityName }}{{ form.areaName }}{{ form.detailAddress }}</span>
|
|
<span>{{ form.provinceName }}{{ form.cityName }}{{ form.areaName }}{{ form.detailAddress }}</span>
|