Просмотр исходного кода

Merge branch 'feature/bug-190' of ssh://121.43.162.141:10022/six.fe/health.admin into release/2.0.1

# Conflicts:
#	src/pages/index/care/issueService.vue
张田田 9 месяцев назад
Родитель
Сommit
1b213799e3
1 измененных файлов с 20 добавлено и 25 удалено
  1. 20 25
      src/pages/index/care/issueService.vue

+ 20 - 25
src/pages/index/care/issueService.vue

@@ -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 {
@@ -159,7 +159,6 @@ function getPatientRecord(id: any) {
 // const report=ref({})
 // const report=ref({})
 async function getCpRecordDetail(id: string) {
 async function getCpRecordDetail(id: string) {
   await getCpDetailMethod({ id }).then((res) => {
   await getCpDetailMethod({ id }).then((res) => {
-    console.log(res,"获取调养记录");
     formData.items = res?.items ?? [];
     formData.items = res?.items ?? [];
     // form = res;
     // form = res;
     form.conditioningWrapName = res?.conditioningWrapName;
     form.conditioningWrapName = res?.conditioningWrapName;
@@ -203,7 +202,7 @@ onMounted(async () => {
     // 获取患者列表
     // 获取患者列表
     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) {
     // 获取调养记录
     // 获取调养记录
@@ -222,7 +221,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 [];
@@ -234,19 +233,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',
@@ -258,9 +256,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;
@@ -625,7 +623,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;
@@ -653,7 +651,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 || '');
@@ -711,8 +709,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);
@@ -730,7 +727,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);
 }
 }
@@ -741,7 +738,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 = '';
   }
   }
 }
 }
 
 
@@ -919,10 +916,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"
@@ -931,7 +925,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>
@@ -967,7 +962,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>
@@ -1149,7 +1144,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>