Explorar o código

Merge branch 'feature/youhua' into develop

张田田 hai 10 meses
pai
achega
ee69cd16de

+ 64 - 36
src/components/EditSupplier.vue

@@ -6,6 +6,8 @@ import { supplierMethod, supplierEditMethod } from '@/request/api/care.api';
 import { getDictionaryMethod } from '@/request/api/dictionary.api';
 import { branchMethod } from '@/request/api/system.api';
 import { notification } from 'ant-design-vue';
+import { TreeSelect } from 'ant-design-vue';
+const SHOW_ALL = TreeSelect.SHOW_ALL;
 
 type FormModel = Partial<SupplierModel>;
 
@@ -16,7 +18,31 @@ const emits = defineEmits<{
   submit: [data?: SupplierModel];
 }>();
 
-const { data: branch, loading: branchLoading } = useRequest(branchMethod);
+const model = ref<Record<string, any>>({});
+watchEffect(() => {
+  const data = props.data;
+  const collaborateDepts = data?.collaborateDepts?.map((item: any) => ({value: item.deptId, label: item.deptName})) ?? [];
+  model.value = {
+    collaborateDepts
+  }
+  console.log(model.value, 'model');
+});
+
+const branch = ref<any[]>([]);
+const { loading: branchLoading } = useRequest(branchMethod).onSuccess(({ data }) => {
+  const to = (data?: any[]): any[] => {
+    return Array.isArray(data) ? data.map(item => {
+      return {
+        ...item,
+        value: item.id,
+        key: item.id.toString(),
+        children: to(item.children)
+      }
+    }) : [];
+  }
+  branch.value = to(data);
+  console.log(branch.value, 'branch');
+});
 const { loading, send: load } = useRequest((params) => supplierMethod(1, 10, params), {
   immediate: false,
   initialData: props.data ?? defaultModel,
@@ -61,21 +87,8 @@ const formProps = reactive<VxeFormProps<FormModel>>({
       field: 'collaborateDepts',
       title: '合作机构',
       span: 24,
-      itemRender: {
-        name: 'VxeSelect',
-        props: {
-          placeholder: '请选择',
-          loading: computed(() => branchLoading.value),
-          options: computed(() => branch.value?.map(item => ({
-            value: item.id,
-            label: item.label
-          }))),
-          valueField: 'value',
-          labelField: 'label',
-          multiple: true,
-          collapseTags: true,
-          clearable: true,
-        },
+      slots: {
+        default: 'initiate',
       },
     },
     {
@@ -123,28 +136,29 @@ const formProps = reactive<VxeFormProps<FormModel>>({
     phone: [{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码' }],
   },
 });
+
+function handleSelect(value: string, node: any, extra: any) {
+  const get = (children?: any[]) => {
+    if (!Array.isArray(children)) return;
+    children.forEach(child => {
+      if (!model.value.collaborateDepts.find((item: any) => item.value === child.value)) {
+        model.value.collaborateDepts.push(child)
+      }
+      get(child.children)
+    })
+  }
+  get(node.children)
+}
+
 const formEmits: VxeFormListeners<FormModel> = {
   submit({ data }) {
-    let cooperateDepts: Array<{ deptId: number; deptName: string }> = [];
-    if (branch.value?.length > 0) {
-      branch.value.map((itm: any) => {
-        console.log(itm, 'itm');
-        if (itm.id == data.collaborateDepts) {
-          cooperateDepts.push({ deptId: itm.id, deptName: itm.label });
-        }
-        // if (data.collaborateDepts?.deptIds?.length > 0) {
-        //   data.collaborateDepts.deptIds.forEach((item: string) => {
-        //     console.log(item, 'item');
-        //     console.log(itm.id, 'itm.id');
-        //     if (item == itm.id) {
-        //       cooperateDepts.push({ deptIds: itm.id, deptNames: itm.label });
-        //     }
-        //   });
-        // }
-      });
-    }
-    data.collaborateDepts = cooperateDepts;
-
+    data.collaborateDepts = model.value.collaborateDepts.map((item: any) =>{
+      return {
+        deptId: item.value,
+        deptName: item.label
+      }
+    })
+    console.log(data, '转换之后的新增');
     submit(data).then(() => {
       notification.success({
         message: '操作成功',
@@ -172,11 +186,25 @@ onBeforeMount(async () => {
 <template>
   <div class="form-container">
     <vxe-form v-bind="formProps" v-on="formEmits" :loading="submitting">
+      <template #initiate>
+        <a-tree-select
+          style="width: 100%"
+          :show-checked-strategy="SHOW_ALL"
+          tree-check-strictly
+          :tree-data="branch"
+          tree-checkable
+          allow-clear
+          v-model:value="model.collaborateDepts"
+          placeholder="请选择"
+          @select="handleSelect"
+        />
+      </template>
       <template #active>
         <vxe-button type="reset" content="取消" :disabled="submitting" @click="cancel"></vxe-button>
         <vxe-button type="submit" status="primary" content="确定" :loading="submitting"></vxe-button>
       </template>
     </vxe-form>
+
   </div>
 </template>
 

+ 25 - 93
src/components/Follow.vue

@@ -1,19 +1,13 @@
 <script setup lang="ts">
 import type { TaskModel } from '@/model/follow.model';
-import {
-  FillFollowContentMethod,
-  UploadIFile,
-  FollowContentMethod,
-} from '@/request/api/follow.api';
+import { FillFollowContentMethod, UploadIFile, FollowContentMethod } from '@/request/api/follow.api';
 import { getDictionaryMethod } from '@/request/api/dictionary.api';
 import { useRequest } from 'alova/client';
 import { PlusOutlined } from '@ant-design/icons-vue';
 
 import { notification } from 'ant-design-vue';
 import type { UploadFile } from 'ant-design-vue/es/upload/interface';
-import {
-  VxeUI,
-} from 'vxe-pc-ui';
+import { VxeUI } from 'vxe-pc-ui';
 type FormModel = Partial<TaskModel>;
 
 const props = defineProps<{ data: FormModel }>();
@@ -154,9 +148,7 @@ const handleChildChange = (e: any) => {
         symptom.selectedId = selectedValue;
 
         // 更新已选择的症状列表
-        const existingIndex = selectedSymptomsList.value.findIndex(
-          (item) => item.name === currentParent
-        );
+        const existingIndex = selectedSymptomsList.value.findIndex((item) => item.name === currentParent);
         if (existingIndex > -1) {
           selectedSymptomsList.value[existingIndex].value = selectedValue;
         } else {
@@ -178,7 +170,7 @@ const selectSymptomsData = reactive([
 ]);
 
 const uploadProps = reactive({ showRemoveIcon: true });
-const changeTag = (item) => {
+const changeTag = (item: any) => {
   activeObj.value.fillin.isHaveNewSyndrome = item.id;
 };
 
@@ -253,20 +245,8 @@ const previewImg = ref<string>('');
           >
             <div>{{ content.followupTaskName }}</div>
             <span class="tab-label">{{ content.arrangeTime }}</span>
-            <div
-              :class="
-                content.progress == 1
-                  ? 'text-red-600'
-                  : content.progress == 2
-                    ? 'text-green-900'
-                    : content.progress == 3
-                      ? 'text-blue-900'
-                      : ''
-              "
-            >
-              {{
-                content.progress === '1' ? '未完成' : content.progress === '2' ? '已完成' : '未开始'
-              }}
+            <div :class="content.progress == 1 ? 'text-red-600' : content.progress == 2 ? 'text-green-900' : content.progress == 3 ? 'text-blue-900' : ''">
+              {{ content.progress === '1' ? '未完成' : content.progress === '2' ? '已完成' : '未开始' }}
             </div>
           </div>
         </div>
@@ -280,18 +260,17 @@ const previewImg = ref<string>('');
           <div>预定随访时间:{{ activeObj?.arrangeTime }}</div>
         </div>
         <div class="mb-2 ml-2">
-          您好,您于<span class="text-blue-600">【{{ activeObj?.medicalTime }}】</span>在我院<span
+          您好,您于<span class="text-blue-600">【{{ activeObj?.medicalTime }}】</span>在我院<span class="text-blue-600">【{{ activeObj?.institutionName }}】</span>因为<span
             class="text-blue-600"
-            >【{{ activeObj?.institutionName }}】</span
-          >因为<span class="text-blue-600">【{{ activeObj?.diagnosis }}】</span
+            >【{{ activeObj?.diagnosis }}】</span
           >就诊。接下来我们将对您进行一个随访,请根据目前的实际情况回答。
         </div>
-        <div class="border-1 border-solid border-gray:50 pl-2 pd-10 ml-2">
+        <div
+          class="border-1 border-solid border-gray:50 pl-2 pd-10 ml-2"
+          v-if="(activeObj?.progress === '1' && activeObj?.symptomsData?.length > 0) || (activeObj.progress === '2' && activeObj?.fillin?.symptomsList?.length>0)"
+        >
           <div class="mb-3 border-b-0">
-            1、请问您的症状有没有<span class="text-red-600">好转</span>或者<span
-              class="text-red-600"
-              >恶化</span
-            >?请先点击症状,再选择好转还是恶化。(没有操作的症状默认没有变化)
+            1、请问您的症状有没有<span class="text-red-600">好转</span>或者<span class="text-red-600">恶化</span>?请先点击症状,再选择好转还是恶化。(没有操作的症状默认没有变化)
           </div>
 
           <div class="ml-4" v-if="activeObj.progress === '1'">
@@ -300,22 +279,11 @@ const previewImg = ref<string>('');
               <div v-for="item in activeObj?.symptomsData" :key="item.name" class="symptom-item">
                 <div class="symptom-button" @click="handleParentClick(item.name)">
                   <span>{{ item.name }}</span>
-                  <span v-if="item.selectedValue" class="selected-value"
-                    >: {{ item.selectedValue }}</span
-                  >
+                  <span v-if="item.selectedValue" class="selected-value">: {{ item.selectedValue }}</span>
                 </div>
                 <div v-show="symptomsValue.parent === item.name" class="symptom-options">
-                  <a-radio-group
-                    :model-value="item.selectedId"
-                    @change="handleChildChange"
-                    class="flex flex-wrap"
-                  >
-                    <a-radio
-                      :value="tag.value"
-                      v-for="tag in item.child"
-                      :key="tag.value"
-                      class="mr-4"
-                    >
+                  <a-radio-group :model-value="item.selectedId" @change="handleChildChange" class="flex flex-wrap">
+                    <a-radio :value="tag.value" v-for="tag in item.child" :key="tag.value" class="mr-4">
                       {{ tag.label }}
                     </a-radio>
                   </a-radio-group>
@@ -326,11 +294,7 @@ const previewImg = ref<string>('');
           <!-- 已经评估过 -->
           <div v-else>
             <div class="symptom-container flex flex-wrap">
-              <div
-                v-for="item in activeObj.value?.fillin?.symptomsList"
-                :key="item.name"
-                class="symptom-item"
-              >
+              <div v-for="item in activeObj?.fillin?.symptomsList" :key="item.name" class="symptom-item">
                 <div class="symptom-button">
                   <span>{{ item.name }}</span>
                   <span class="selected-value">: {{ item.type }}</span>
@@ -344,19 +308,9 @@ const previewImg = ref<string>('');
         <div class="border-1 border-solid border-gray:50 pl-2 pd-10 ml-2">
           <div class="mb-3">2、请问有没有出现<span class="text-red-600">新</span>的症状?</div>
           <div class="mb-8 ml-4 flex">
-            <div
-              v-for="symptoms in selectSymptomsData"
-              :key="symptoms.name"
-              class="mr-4"
-              @click="changeTag(symptoms)"
-            >
+            <div v-for="symptoms in selectSymptomsData" :key="symptoms.name" class="mr-4" @click="activeObj?.progress==='1'?changeTag(symptoms):''">
               <div>
-                <div
-                  class="border-solid b-1 w-20 text-center"
-                  :class="
-                    activeObj.fillin.isHaveNewSyndrome === symptoms.id ? 'bg-blue text-#fff' : ''
-                  "
-                >
+                <div class="border-solid b-1 w-20 text-center" :class="activeObj.fillin.isHaveNewSyndrome === symptoms.id ? 'bg-blue text-#fff' : ''">
                   {{ symptoms.name }}
                 </div>
               </div>
@@ -364,25 +318,17 @@ const previewImg = ref<string>('');
           </div>
         </div>
         <!--      第三个-->
-        <div class="border-1 border-solid border-gray:50 pl-2 pd-10 ml-2">
+        <div class="border-1 border-solid border-gray:50 pl-2 pd-10 ml-2" v-if="activeObj.fillin?.isHaveNewSyndrome === 'Y'">
           <div class="mb-3">3、请描述新的症状</div>
           <div class="mb-4 ml-4">
-            <a-input
-              v-model:value="activeObj.fillin.newSyndrome"
-              placeholder="请输入"
-              :auto-size="{ minRows: 2, maxRows: 5 }"
-            />
+            <a-input v-model:value="activeObj.fillin.newSyndrome" placeholder="请输入" :auto-size="{ minRows: 2, maxRows: 5 }" :disabled="activeObj.progress === '2'" />
           </div>
         </div>
         <!--      第四个-->
         <div class="border-1 border-solid border-gray:50 pl-2 pd-10 ml-2">
           <div class="mb-3">4、如果有其他情况,请留言</div>
           <div class="mb-4 ml-4">
-            <a-input
-              v-model:value="activeObj.fillin.otherDesc"
-              placeholder="请输入"
-              :auto-size="{ minRows: 2, maxRows: 5 }"
-            />
+            <a-input v-model:value="activeObj.fillin.otherDesc" placeholder="请输入" :auto-size="{ minRows: 2, maxRows: 5 }" :disabled="activeObj.progress === '2'" />
           </div>
         </div>
         <!--      第五个-->
@@ -393,14 +339,7 @@ const previewImg = ref<string>('');
             <div class="flex">
               <!--            舌面-->
               <div class="flex flex-col items-center mr-4">
-                <a-upload
-                  :showUploadList="uploadProps"
-                  v-model:file-list="upImgList"
-                  list-type="picture-card"
-                  @preview="handlePreview"
-                  :maxCount="1"
-                  :customRequest="customUpload"
-                >
+                <a-upload :showUploadList="uploadProps" v-model:file-list="upImgList" list-type="picture-card" @preview="handlePreview" :maxCount="1" :customRequest="customUpload">
                   <div v-if="upImgList.length < 1">
                     <plus-outlined />
                   </div>
@@ -455,21 +394,14 @@ const previewImg = ref<string>('');
 
         <!--      -->
         <div class="ml-2 mt-1">
-          感谢您的配合,为了更好地了解您的回复情况,我们将会在<span class="text-blue-600">
-            {{ activeObj?.arrangeTime }} </span
+          感谢您的配合,为了更好地了解您的回复情况,我们将会在<span class="text-blue-600"> {{ activeObj?.arrangeTime }} </span
           >再次对您进行随访,届时请点击随访链接参与,再次感谢您!
         </div>
       </div>
     </div>
     <div class="flex items-center justify-center mt-6 mb-6">
       <a-button size="small" class="mr-4" @click="cancelFollowContent">取消</a-button>
-      <a-button
-        type="primary"
-        size="small"
-        @click="subFollowContent"
-        v-show="activeObj.progress === '1'"
-        >提交
-      </a-button>
+      <a-button type="primary" size="small" @click="subFollowContent" v-show="activeObj.progress === '1'">提交 </a-button>
     </div>
   </div>
 </template>

+ 1 - 1
src/components/RoleEdit.vue

@@ -47,7 +47,7 @@ const formProps = reactive<VxeFormProps<FormModel>>({
         name: 'VxeRadioGroup',
         options: [
           { label: '本人', value: '5' },
-          { label: '本系统', value: '1' },
+          { label: '本机构', value: '4' },
         ],
       },
     },

+ 3 - 3
src/model/care.model.ts

@@ -7,9 +7,9 @@ export interface SupplierModel {
   collaborateDeptId?: number; // 合作机构ID
   conditioningProgramTypes?: string[]; // 	可供应的方案类型
   collaborateDepts: {
-    deptIds: string[]; // 合作机构ID
-    deptNames: string[]; // 合作机构名称
-  };
+    deptIds: number; // 合作机构ID
+    deptNames: string; // 合作机构名称
+  }[];
   onlineCPTypes?: string[]; // 居家项目
   offlineCPTypes?: string[]; // 线下项目
 }

+ 1 - 1
src/pages/index/care/institutionService.vue

@@ -212,7 +212,7 @@ function editInstitution(model?: SystemCwModel, index?: number) {
   VxeUI.modal.open({
     title: model?.id ? `修改机构服务` : `新增机构服务`,
     height: 700,
-    width: 1500,
+    width: 1200,
     // position: {
     //   top: Math.min(100, window.innerHeight * 0.1),
     //   left: Math.min(100, window.innerWidth * 0.1),

+ 113 - 27
src/pages/index/care/issueService.vue

@@ -155,7 +155,7 @@ async function getCpRecordDetail(id: string) {
   });
 }
 async function getPatientList(id: string) {
-  console.log(id, '切换');
+  // console.log(id, '切换');
   if (id) {
     getCpDetail(id);
     loadTags(id);
@@ -188,6 +188,7 @@ onMounted(async () => {
   }
   // 获取省份
   await loadProvinces();
+
 });
 // 患者标签
 const tags = ref<PatientTagModel>({ id: '', tags: [] });
@@ -212,6 +213,7 @@ async function selectPatient(item: any) {
   // 清空服务包选择
   selectedPackage.value = '';
   currentSelectedPackage.value = null;
+ 
 }
 
 // 打开调养记录
@@ -271,6 +273,7 @@ const emptyRow = {
   conditioningProgramId: 0,
   days: '',
   frequencyType: '',
+  frequencyTypeing: [],
   frequencyMeasure: '',
   totalMeasure: '',
   totalPrice: '',
@@ -314,6 +317,10 @@ watch(displayTableData, (newValue, oldValue) => {
     isShowDelivery.value = newValue.some((item) => {
       return item.conditioningProgramDetail?.isDelivery === 'Y';
     });
+    newValue.forEach((row: any) => {
+      row.frequencyTypeing = row.frequencyType ? [row.frequencyType] : [];
+    });
+    console.log(newValue, '开过的newValue');
   }
 });
 const totalPrice = computed(() => {
@@ -336,6 +343,7 @@ function onSelectProject({ row }: any) {
     // conditioningProgramId: 0,
     days: '',
     frequencyType: '',
+    frequencyTypeing: [],
     frequencyMeasure: '',
     totalMeasure: '',
     totalPrice: '',
@@ -502,17 +510,46 @@ const filteredProjects = computed(() => {
 });
 // 添加计算数量的函数
 function calculateCount(row: any) {
+  const pricingType = row.conditioningProgramDetail.pricingType;
   const period = Number(row.days) || 0;
   const frequency = Number(row.frequencyMeasure) || 0;
-  let count = 0;
-  count = Math.ceil(period / (Number(row.frequencyType) || 1)) * frequency;
-  row.totalMeasure = count;
-
-  // 取单价
-  const unitPrice = Number(row.conditioningProgramDetail?.cpFixedPricingRule?.unitPrice) || 0;
-  // 计算总价
-  row.totalPrice = (count * unitPrice).toFixed(2);
+  // 一口价
+  if (pricingType === '0') {
+    // 检查是否选择了"不限"
+    if (row.frequencyType === '不限') {
+      row.frequencyMeasure = ''; // 重置 frequencyMeasure
+      row.totalMeasure = 1;
+    } else {
+      const convertDose = Number(row.conditioningProgramDetail.cpFixedPricingRule.convertDose) || 0;
+      const frequencyType = Number(row.frequencyType) || 0;
+      row.totalMeasure = Math.ceil(((period / frequencyType) * frequency) / convertDose);
+    }
+    // 获取单价
+    const unitPrice = Number(row.conditioningProgramDetail?.cpFixedPricingRule?.unitPrice) || 0;
+    // 计算总价
+    row.totalPrice = (row.totalMeasure * unitPrice).toFixed(2);
+  } else if (pricingType === '1') {
+    // 按穴位计价
+    row.totalPrice =
+      row.conditioningProgramDetail?.cpDynamicPricingRule?.reduce((sum: number, item: any) => {
+        return sum + (Number(item.price) || 0);
+      }, 0) || 0;
+  }
 }
+// function calculateCount(row: any) {
+//   const convertDose = Number(row.conditioningProgramDetail.cpFixedPricingRule.convertDose) || 0;
+//   console.log(convertDose, 'convertDose');
+//   const period = Number(row.days) || 0;
+//   const frequency = Number(row.frequencyMeasure) || 0;
+//   let count = 0;
+//   count = Math.ceil(((period / (Number(row.frequencyType) || 1)) * frequency)/convertDose);
+//   row.totalMeasure = count;
+
+//   // 取单价
+//   const unitPrice = Number(row.conditioningProgramDetail?.cpFixedPricingRule?.unitPrice) || 0;
+//   // 计算总价
+//   row.totalPrice = (count * unitPrice).toFixed(2);
+// }
 
 // 添加监听器
 watch(totalPrice, (val) => {
@@ -532,10 +569,25 @@ async function selectCw(item: any) {
   form.conditioningWrapName = item.name;
   form.conditioningWrapId = item.id;
   form.phone = item.phone;
+ 
 }
 function handleCancel() {
   console.log('取消');
 }
+// 添加监听器
+watch(
+  () => formData.items,
+  (newData) => {
+    if (!newData) return;
+    newData.forEach((row) => {
+      if (row?.days || row?.frequencyType || row?.frequencyMeasure) {
+        calculateCount(row);
+      }
+    });
+  },
+  { deep: true }
+);
+
 // 添加电话号码验证函数
 function isValidPhone(phone: string): boolean {
   // 中国大陆手机号码正则表达式
@@ -552,6 +604,7 @@ async function handleSubmit() {
       delete item.id;
     });
   }
+
   form.id = Number(currentPatient.value.id);
   form.patientId = currentPatient.value.patientId;
   form.patientName = currentPatient.value.patientName;
@@ -744,7 +797,6 @@ watch(showProjectPopover, (val) => {
       </div>
       <div v-else style="padding-bottom: 8px; text-align: center; margin-top: 40px">暂无数据</div>
     </div>
-
     <!-- 中间主内容 -->
     <div class="main-panel">
       <!-- 顶部患者信息 -->
@@ -839,12 +891,35 @@ watch(showProjectPopover, (val) => {
             </vxe-column>
             <vxe-column field="frequencyType" title="频率" width="auto">
               <template #default="{ row }">
-                <div style="display: flex; align-items: center">
+                <div v-if="row.conditioningProgramDetail?.name === '健康咨询' || row.conditioningProgramDetail?.name === '健康评估'" class="flex items-center">
+                  <div class="flex items-center mr-4">
+                    <span>每</span>
+                    <a-input v-model:value="row.frequencyType" style="width: 50px" @change="() => calculateCount(row)" :disabled="row.frequencyType === '不限'" />
+                    <span>天</span>
+                    <a-input v-model:value="row.frequencyMeasure" style="width: 50px" @change="() => calculateCount(row)" :disabled="row.frequencyType === '不限'" />
+                    <span>{{ row.conditioningProgramDetail?.cpFixedPricingRule?.convertUnit }}</span>
+                  </div>
+                  <div>
+                    <a-checkbox-group
+                      v-model:value="row.frequencyTypeing"
+                      @change="
+                        (value) => {
+                          row.frequencyTypeing = value.includes('不限') ? ['不限'] : [];
+                          row.frequencyType = value.includes('不限') ? '不限' : '';
+                          calculateCount(row);
+                        }
+                      "
+                    >
+                      <a-checkbox value="不限">不限</a-checkbox>
+                    </a-checkbox-group>
+                  </div>
+                </div>
+                <div class="flex items-center" v-else>
                   <span>每</span>
-                  <a-input v-model:value="row.frequencyType" style="width: 60px" @change="() => calculateCount(row)" :disabled="currentPatient?.status === '0' ? true : false" />
+                  <a-input v-model:value="row.frequencyType" style="width: 50px" @change="() => calculateCount(row)" />
                   <span>天</span>
-                  <a-input v-model:value="row.frequencyMeasure" style="width: 60px" @change="() => calculateCount(row)" :disabled="currentPatient?.status === '0' ? true : false" />
-                  <span>{{ row.conditioningProgramDetail?.cpFixedPricingRule?.pricingUnit }}</span>
+                  <a-input v-model:value="row.frequencyMeasure" style="width: 50px" @change="() => calculateCount(row)" />
+                  <span>{{ row.conditioningProgramDetail?.cpFixedPricingRule?.convertUnit }}</span>
                 </div>
               </template>
             </vxe-column>
@@ -901,7 +976,15 @@ watch(showProjectPopover, (val) => {
             </vxe-column>
             <vxe-column field="remark" title="说明" width="180">
               <template #default="{ row }">
-                <a-input v-model:value="row.remark" style="width: 120px" :disabled="currentPatient?.status === '0' ? true : false" />
+                <!-- <a-input v-model:value="row.remark" style="width: 120px" :disabled="currentPatient?.status === '0' ? true : false" /> -->
+                <a-textarea
+                  v-model:value="row.remark"
+                  style="max-width: 180px; width: 100%; height: 50px"
+                  :rows="2"
+                  show-count
+                  :maxLength="200"
+                  :disabled="currentPatient?.status === '0' ? true : false"
+                />
               </template>
             </vxe-column>
           </vxe-table>
@@ -968,19 +1051,12 @@ watch(showProjectPopover, (val) => {
           <a-button type="primary" style="margin-left: 24px" @click="handleSubmit">确认</a-button>
         </div>
       </div>
+
       <a-result class="area" v-else style="background-color: #fff" status="warning" title="暂无数据" />
     </div>
-
     <!-- 右侧调养记录 -->
     <div class="right-panel">
-      <PatientTagWidget
-        style="min-height: 112px; flex: none"
-        :style="{ height: `${height}px` }"
-        :dataset="tags"
-        editable
-        @refresh="loadTags(currentPatient.patientId)"
-        :data="currentPatient"
-      />
+      <PatientTagWidget style="min-height: 112px; flex: none" :dataset="tags" editable @refresh="loadTags(currentPatient?.patientId)" :data="currentPatient" />
       <!-- <a-button
         type="primary"
         size="small"
@@ -1007,7 +1083,9 @@ watch(showProjectPopover, (val) => {
   display: flex;
   flex-direction: row;
   width: 100vw;
-  min-height: 100vh;
+  /* min-height: 100vh; */
+  height: var(--page-main-container);
+  overflow: hidden;
   background: #fff;
 }
 .left-panel {
@@ -1016,7 +1094,7 @@ watch(showProjectPopover, (val) => {
   border-right: 1px solid #eee;
   padding: 16px 8px 0 16px;
   background: #fafbfc;
-  min-height: 100vh;
+  /* min-height: 100vh; */
   box-sizing: border-box;
 }
 .patient-item {
@@ -1035,6 +1113,7 @@ watch(showProjectPopover, (val) => {
   display: flex;
   flex-direction: column;
   box-sizing: border-box;
+  overflow: auto;
 }
 .patient-info {
   font-size: 14px;
@@ -1077,7 +1156,7 @@ watch(showProjectPopover, (val) => {
   border-left: 1px solid #eee;
   padding: 16px 8px 0 8px;
   background: #fafbfc;
-  min-height: 100vh;
+  /* min-height: 100vh; */
   box-sizing: border-box;
 }
 .record-title {
@@ -1105,4 +1184,11 @@ watch(showProjectPopover, (val) => {
   cursor: pointer;
   margin-right: 10px;
 }
+.scroll-content {
+  /* max-height: 600px;  */
+  overflow-y: auto;
+  /* 可选:让滚动条更美观 */
+  scrollbar-width: thin;
+  scrollbar-color: #aaa #f5f5f5;
+}
 </style>

+ 4 - 3
src/pages/index/care/supplier.vue

@@ -278,9 +278,10 @@ function seeInstitution(model?: SupplierModel, index?: number) {
   });
 }
 function editSupplier(model?: SupplierModel, index?: number) {
-  if (model?.id && model.collaborateDepts && model.collaborateDepts.length>0) {
-    model.collaborateDepts = model?.collaborateDepts?.map((item) => item.deptId) || [];
-  }
+  console.log(model, 'model');
+  // if (model?.id && model.collaborateDepts && model.collaborateDepts.length>0) {
+  //   model.collaborateDepts = model?.collaborateDepts?.map((item) => item.deptIds) || [];
+  // }
   VxeUI.modal.open({
     id: 'supplier-modal',
     title: model?.id ? `修改供应商` : `新增供应商`,

+ 2 - 2
src/pages/index/care/systemService.vue

@@ -192,7 +192,7 @@ function editSystemService(model?: SystemCwModel, index?: number) {
   VxeUI.modal.open({
     id: 'edit-system-service-modal',
     title: model?.id ? `修改系统服务` : `新增系统服务`,
-    height: 750,
+    height: 700,
     width: 1200,
     // position: {
     //   top: Math.min(100, window.innerHeight * 0.1),
@@ -203,7 +203,7 @@ function editSystemService(model?: SystemCwModel, index?: number) {
       default() {
         return h(EditSystemService, <any>{
           data: { ...model, types },
-          onSubmit(data: SystemCwModel) {
+          onSubmitSubmit(data: SystemCwModel) {
             refresh(page.value);
             VxeUI.modal.close(`edit-system-service-modal`);
           },

+ 1 - 1
src/pages/index/follow/plan.vue

@@ -295,7 +295,7 @@ function editPlan(model?: PlanModel, index?: number) {
     <main class="flex-auto overflow-hidden">
       <vxe-grid ref="gridRef" v-bind="gridOptions" v-on="gridEvents" :loading="loading">
         <template #cell="{ row }"
-          >{{ row.progress === 1 ? '已开始' : row.progress === 2 ? '已结束' : '未开始' }}
+          >{{ row.progress === '1' ? '进行中' : row.progress === '2' ? '已结束' : row.progress === '0' ? '未开始' : '' }}
         </template>
         <template #patients="{ row }">
           <div :class="row.isFilter === 'Y' ? '' : 'text-red'">

+ 0 - 2
src/request/api/care.api.ts

@@ -44,12 +44,10 @@ export function getAllSystemCpMethod() {
 export function systemCpEditMethod(data: Partial<SystemItemModel>) {
   console.log(data, '新增和编辑项目1111111111');
   if(data.addType === 'system'){
-    console.log(data, '新增和编辑系统项目');
     return data?.id
       ? request.Post(`/fdhb-pc/conditioningManage/program/updateSystemCp`, { ...data, id: data.id }, { name: 'edit-system-cp' })
     : request.Post(`/fdhb-pc/conditioningManage/program/addSystemCp`, { ...data }, { name: 'edit-system-cp' });
   }else if(data.addType === 'itemsList'){
-    console.log(data, '新增和编辑项目列表');
     return data?.id
       ? request.Post(`/fdhb-pc/conditioningManage/program/updateInstitutionCp`, { ...data, id: data.id }, { name: 'edit-system-cp' })
     : request.Post(`/fdhb-pc/conditioningManage/program/addInstitutionCp`, { ...data }, { name: 'edit-system-cp' });

+ 41 - 19
src/service/AddItems.vue

@@ -13,12 +13,13 @@ import RemoteSelect from '@/libs/v-select-page/RemoteSelect.vue';
 import type { UploadFile } from 'ant-design-vue/es/upload/interface';
 import type { FormInstance } from 'ant-design-vue';
 type SystemModel = Partial<SystemItemModel>;
-const props = defineProps<{ data: SystemModel;}>();
+const props = defineProps<{ data: SystemModel }>();
 const formRef = ref<FormInstance>();
 const typeOptions = ref<{ label: string; value: string }[]>([]);
 
 const supplierOptions = ref<{ label: string; value: string }[]>([]);
-const branchOptions = ref<{ label: string; value: string }[]>([]);
+
+const isRequired = ref<boolean>(true);
 
 const unitOptions = [
   { label: '袋', value: '袋' },
@@ -28,15 +29,22 @@ const unitOptions = [
 ];
 
 // 获取所有的机构
-const { data: branch, loading: branchLoading } = useRequest(branchMethod).onSuccess(({ data }) => {
-  if (data?.length > 0) {
-    branchOptions.value = data.map((item: any) => ({
-      label: item.label,
-      value: item.id,
-    }));
-  }
+const branch = ref<any[]>([]);
+const { loading: branchLoading } = useRequest(branchMethod).onSuccess(({ data }) => {
+  const to = (data?: any[]): any[] => {
+    return Array.isArray(data)
+      ? data.map((item) => {
+          return {
+            ...item,
+            value: item.id,
+            key: item.id.toString(),
+            children: to(item.children),
+          };
+        })
+      : [];
+  };
+  branch.value = to(data);
 });
-
 const form = reactive<SystemModel>({
   conditioningProgramType: '',
   conditioningProgramSupplierId: '',
@@ -62,7 +70,7 @@ const rules = {
   name: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
   conditioningProgramType: [{ required: true, message: '请选择方案类型', trigger: 'change' }],
   pricingType: [{ required: true, message: '请选择计价规则', trigger: 'change' }],
-  conditioningProgramSupplierId: [{ required: true, message: '请选择供应商', trigger: 'change' }],
+  // conditioningProgramSupplierId: [{ required: true, message: '请选择供应商', trigger: 'change' }],
   institutionId: [{ required: true, message: '请选择机构名称', trigger: 'change' }],
   isOffline: [{ required: true, message: '请选择线下项目', trigger: 'change' }],
 };
@@ -92,7 +100,6 @@ function getisOffline(e: any, newOffline: any, newDelivery: any, newType: any) {
         return false;
       }
     });
-    console.log(isShowOnline.value, 'isShowOnline==>');
     if (isShowOnline.value) {
       if (newOffline) {
         onlineArr.value = [newOffline];
@@ -106,10 +113,9 @@ function getisOffline(e: any, newOffline: any, newDelivery: any, newType: any) {
           form.isDelivery = null;
           isShowDelivery.value = false;
         } else {
-        
           isShowDelivery.value = true;
         }
-      }else{
+      } else {
         isShowDelivery.value = false;
       }
       if (newDelivery) {
@@ -121,7 +127,7 @@ function getisOffline(e: any, newOffline: any, newDelivery: any, newType: any) {
         }
       }
     }
-  }else{
+  } else {
     isShowOnline.value = false;
     isShowDelivery.value = false;
     onlineArr.value = [];
@@ -181,9 +187,13 @@ async function getConditioningProgramType() {
 
 onMounted(async () => {
   const deptId = localStorage.getItem('deptId');
-  if (form.addType === 'system' && deptId) {
+  if (props.data.addType === 'system' && deptId) {
     form.institutionId = deptId;
   }
+
+  if (props.data.addType === 'system') {
+    isRequired.value = false;
+  }
   form.addType = props.data.addType;
   if (props.data.id) {
     const res: any = await getConditioningSchemeDetailMethod(props.data);
@@ -264,7 +274,6 @@ watch(
 function bindchange(e: any) {
   form.conditioningProgramSupplierId = '';
   form.isOffline = null;
-
 }
 function onlineChange(value: any) {
   form.isOffline = value[value.length - 1];
@@ -281,6 +290,9 @@ function getConditioningProgramSupplier(value: any) {
   form.isDelivery = null;
   isShowDelivery.value = false;
 }
+function handleSelect(value: string, node: any, extra: any) {
+  form.institutionId = value;
+}
 </script>
 
 <template>
@@ -375,9 +387,19 @@ function getConditioningProgramSupplier(value: any) {
       </a-form-item>
       <!-- 机构名称 -->
       <a-form-item label="机构名称:" v-if="form?.addType === 'itemsList'" required name="institutionId">
-        <a-select v-model:value="form.institutionId" :options="branchOptions" placeholder="请选择" allowClear />
+        <a-tree-select
+          v-model:value="form.institutionId"
+          show-search
+          style="width: 100%"
+          :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
+          placeholder="请选择"
+          allow-clear
+          tree-default-expand-all
+          :tree-data="branch"
+          @select="handleSelect"
+        ></a-tree-select>
       </a-form-item>
-      <a-form-item label="供应商:" required name="conditioningProgramSupplierId">
+      <a-form-item label="供应商:" name="conditioningProgramSupplierId" required>
         <a-select v-model:value="form.conditioningProgramSupplierId" :options="supplierOptions" placeholder="请选择" allowClear @change="getConditioningProgramSupplier" />
       </a-form-item>
       <a-form-item label="线下项目:" name="isOffline" v-if="isShowOnline" required>

+ 56 - 19
src/service/EditSystemService.vue

@@ -4,6 +4,7 @@ import { notification } from 'ant-design-vue';
 import { getDictionaryMethod } from '@/request/api/dictionary.api';
 import { UploadIFile } from '@/request/api/follow.api';
 import type { UploadFile } from 'ant-design-vue/es/upload/interface';
+import { branchMethod } from '@/request/api/system.api';
 import { message } from 'ant-design-vue';
 import {
   pageMedicineMethod,
@@ -28,6 +29,23 @@ const props = defineProps<{ data: FollowModel }>();
 const fileList = ref<UploadFile[]>([]);
 const uploadProps = reactive({ showRemoveIcon: true });
 const emit = defineEmits<{ submit: [data?: SystemCwModel] }>();
+// 获取所有的机构
+const branch = ref<any[]>([]);
+const { loading: branchLoading } = useRequest(branchMethod).onSuccess(({ data }) => {
+  const to = (data?: any[]): any[] => {
+    return Array.isArray(data)
+      ? data.map((item) => {
+          return {
+            ...item,
+            value: item.id,
+            key: item.id.toString(),
+            children: to(item.children),
+          };
+        })
+      : [];
+  };
+  branch.value = to(data);
+});
 const { loading: addSystemCwLoading, send: addSystemCw } = useRequest(addSystemCwMethod, {
   immediate: false,
 }).onSuccess(({ data }) => {
@@ -308,7 +326,6 @@ function detailPreview(row: any) {
   }
 }
 function editPart(row) {
-  if (row.conditioningProgramDetail.id) {
     VxeUI.modal.open({
       title: `编辑部位`,
       height: 700,
@@ -330,9 +347,7 @@ function editPart(row) {
         },
       },
     });
-  } else {
-    message.warning('请先添加服务包');
-  }
+ 
 }
 
 // 添加计算数量的函数
@@ -347,8 +362,9 @@ function calculateCount(row: any) {
       row.frequencyMeasure = ''; // 重置 frequencyMeasure
       row.totalMeasure = 1;
     } else {
+      const convertDose = Number(row.conditioningProgramDetail.cpFixedPricingRule.convertDose) || 0;
       const frequencyType = Number(row.frequencyType) || 0;
-      row.totalMeasure = Math.ceil(period / frequencyType) * frequency;
+      row.totalMeasure = Math.ceil(((period / frequencyType) * frequency)/convertDose);
     }
     // 获取单价
     const unitPrice = Number(row.conditioningProgramDetail?.cpFixedPricingRule?.unitPrice) || 0;
@@ -402,7 +418,7 @@ function confirm() {
       row.frequencyType = row.frequencyTypeing[0];
     }
   });
-  console.log(props.data.types, 'formData.items');
+  // console.log(props.data.types, 'formData.items');
   // 如果所有条件都满足,继续执行后续代码
   if (isValid) {
     // 系统服务包
@@ -522,11 +538,13 @@ onMounted(async () => {
     });
   }
   await getProjectList();
-  console.log(formData.items, 'formData');
+
+
+
 });
 
 const tableData = computed(() => {
-  console.log(formData.items, 'formData.items');
+  console.log(formData, 'formData.items');
   return [...(formData.items ?? []), { ...emptyRow }];
 });
 
@@ -581,22 +599,42 @@ const handlePreview = async (file: UploadFile) => {
   visible.value = true;
 };
 let multiple = ref<boolean>(true);
+function handleSelect(value: string, node: any, extra: any) {
+  // console.log(value, 'value');
+  // console.log(node, 'node');
+  // console.log(extra, 'extra');
+  formData.institutionId = value;
+  formData.institutionName = node.label;
+}
 </script>
 
 <template>
-  <div style="padding: 24px">
-    <div class="flex">
-      <div style="margin-bottom: 16px" class="mr-4" v-if="props.data?.types === 'institution'">
-        <span>机构名称:</span>
-        <a-input style="width: 200px" v-model:value="formData.institutionName" />
+  <div style="padding:0 24px">
+    <div class="flex" style="align-items: center;">
+      <!-- 机构名称 -->
+      <div class="mr-10" v-if="props.data?.types === 'institution'" style="display: flex; align-items: center; margin-bottom: 0;">
+        <span style="white-space: nowrap; margin-right: 8px;">机构名称:</span>
+        <a-tree-select
+          v-model:value="formData.institutionId"
+          show-search
+          style="width: 220px;"
+          :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
+          placeholder="请选择"
+          allow-clear
+          tree-default-expand-all
+          :tree-data="branch"
+          @select="handleSelect"
+        />
       </div>
-      <div style="margin-bottom: 16px" class="mr-6">
-        <span>服务包名称:</span>
+      <!-- 服务包名称 -->
+      <div class="mr-6" style="display: flex; align-items: center; margin-bottom: 0;">
+        <span style="white-space: nowrap; margin-right: 8px;">服务包名称:</span>
         <a-input style="width: 200px" v-model:value="formData.name" />
         <a-button type="primary" @click="addInstitution" class="ml-4" v-if="props.data?.types === 'institution'">引入</a-button>
       </div>
-      <div class="flex" v-if="props.data?.types === 'institution'">
-        <div class="w-35">服务形象照:</div>
+      <!-- 服务形象照 -->
+      <div class="flex" v-if="props.data?.types === 'institution'" style="align-items: center; margin-bottom: 0;">
+        <div class="w-35" style="white-space: nowrap; margin-right: 8px;">服务形象照:</div>
         <a-upload
           :showUploadList="uploadProps"
           v-model:file-list="fileList"
@@ -829,8 +867,7 @@ let multiple = ref<boolean>(true);
 
         <vxe-column field="conditioningProgramDetail.pricingType" title="穴位/经络/部位" width="120">
           <template #default="{ row }">
-            <!-- <a-input v-model:value="row.desc" style="width: 120px" /> -->
-            <a @click="editPart(row)" style="color: #1890ff; cursor: pointer" @submit="editPart(row)" v-if="row?.conditioningProgramDetail?.pricingType === '1'">编辑</a>
+            <a @click="editPart(row)" style="color: #1890ff; cursor: pointer"  v-if="row?.conditioningProgramDetail?.pricingType === '1'">编辑</a>
           </template>
         </vxe-column>
         <vxe-column field="remark" title="说明" width="180">

+ 27 - 15
src/service/HealthEvaluation.vue

@@ -3,50 +3,62 @@ import { message } from 'ant-design-vue';
 import { VxeUI } from 'vxe-pc-ui';
 import type { SystemItemModel } from '@/model/care.model';
 import { useRequest } from 'alova/client';
-import { systemCpEditMethod,getConditioningSchemeDetailMethod,confirmOrgConfirmMethod} from '@/request/api/care.api';
+import { systemCpEditMethod, getConditioningSchemeDetailMethod, confirmOrgConfirmMethod } from '@/request/api/care.api';
+import { ref, watch } from 'vue';
+
 type FollowModel = Partial<SystemItemModel>;
 const props = defineProps<{ data: FollowModel }>();
 
 const emits = defineEmits<{
   submit: [data?: SystemItemModel];
-  change: [data?: SystemItemModel];
 }>();
 
 const { loading: submitting, send: onOkSubmit } = useRequest(systemCpEditMethod, {
   immediate: false,
 }).onSuccess(({ data }) => {
-  console.log(data, 'data');
+  console.log(data, 'data提及爱哦');
   emits('submit');
   message.success('已提交');
   VxeUI.modal.close(`health-consultation-modal`);
 });
 
+const pricingUnit = ref(props.data.cpFixedPricingRule.pricingUnit);
+
 function onCancel() {
   // 关闭弹窗或返回
   VxeUI.modal.close(`health-consultation-modal`);
 }
 function onOk() {
-  console.log(props.data, 'onOk');
-  if(props.data.addType === 'confirm'){
+  if (props.data.addType === 'confirm') {
     // 去确认
     confirmOrgConfirmMethod(props.data).then(() => {
-    VxeUI.modal.close('health-consultation-modal');
-    message.success('提交成功');
-    emits('change');
-  });
-
-  }else{
+      VxeUI.modal.close('health-consultation-modal');
+      message.success('提交成功');
+      emits('change');
+    });
+  } else {
+    console.log(props.data, '提交逻辑');
     // 提交逻辑
     onOkSubmit(props.data);
   }
 }
+
+function validatePricingUnit(value: string) {
+  // Update the local variable
+  pricingUnit.value = value;
+}
+
+// Sync the local variable back to props.data when needed
+watch(pricingUnit, (newValue) => {
+  props.data.cpFixedPricingRule.pricingUnit = newValue;
+});
+
 onMounted(async () => {
   console.log(props.data, 'onMounted');
-  if(props.data.id){
+  if (props.data.id) {
     const res: any = await getConditioningSchemeDetailMethod(props.data);
     Object.assign(props.data, res);
   }
-  
 });
 </script>
 
@@ -58,12 +70,12 @@ onMounted(async () => {
     </div>
     <div style="display: flex; align-items: center; margin-bottom: 24px">
       <span style="width: 80px">单价:</span>
-      <a-input v-model:value="props.data.cpFixedPricingRule.unitPrice" placeholder="请输入" style="width: 180px; margin-right: 8px"  />
+      <a-input v-model:value="props.data.cpFixedPricingRule.unitPrice" placeholder="请输入" style="width: 180px; margin-right: 8px" />
       <span style="margin-right: 8px">元</span>
     </div>
     <div style="display: flex; align-items: center; margin-bottom: 24px">
       <span style="width: 80px">计价单位:</span>
-      <a-input v-model:value="props.data.cpFixedPricingRule.pricingUnit" placeholder="次" style="width: 180px" />
+      <a-input v-model:value="pricingUnit" placeholder="请输入" style="width: 180px" @input="(e) => validatePricingUnit(e.target.value)" />
     </div>
     <div style="margin-bottom: 24px">
       <span style="font-weight: bold">机构:</span>

+ 5 - 1
src/service/ServiceItemsList.vue

@@ -97,7 +97,7 @@ const gridOptions = reactive<VxeGridProps<SystemItemModel>>({
     { field: 'cpFixedPricingRule.unitPrice', title: '单价(元)', slots: { default: 'unitPriceCell' } },
     { field: 'cpFixedPricingRule.pricingUnit', title: '计价单位' },
     { field: 'cpFixedPricingRule.convertDose', title: '计价说明', slots: { default: 'convertDoseCell' } },
-    { field: 'conditioningProgramSupplierId', title: '供应商' },
+    { field: 'conditioningProgramSupplierName', title: '供应商' },
     { field: 'institutionName', title: '机构名称' },
     {
       title: '操作',
@@ -193,6 +193,10 @@ function editConfirmed(model?: SystemItemModel, index?: number) {
               ...model,
               addType,
             },
+            onSubmit(data: SystemItemModel) {
+              refresh(page.value);
+              VxeUI.modal.close(`health-consultation-modal`);
+            },
           });
         },
       },

+ 7 - 0
src/service/ServiceItemsSystem.vue

@@ -224,7 +224,9 @@ function seeItems(model?: SystemItemModel, index?: number) {
 }
 function editItems(model?: SystemItemModel, index?: number) {
   const addType = 'system';
+  console.log(model, 'model');
   if (model?.isErasable === 'N') {
+    console.log(model, '健康咨询和健康评估');
     // 健康咨询 健康评估 x显示
     VxeUI.modal.open({
       title: model?.conditioningProgramType ?? '项目',
@@ -240,6 +242,11 @@ function editItems(model?: SystemItemModel, index?: number) {
               ...model,
               addType,
             },
+            onSubmit(data: SystemItemModel) {
+              console.log(data, 'onChange');
+              refresh(page.value);
+              VxeUI.modal.close(`health-consultation-modal`);
+            },
           });
         },
       },

+ 11 - 0
src/service/ServicePackageList.vue

@@ -21,6 +21,7 @@ onSuccess(({ data: { data } }) => {
 });
 const id = ref<string>('');
 async function handleSelect(model?: SystemCwModel) {
+  console.log(model, '选择引入');
   if (model?.id) {
     id.value = model.id;
     try {
@@ -35,8 +36,18 @@ async function handleSelect(model?: SystemCwModel) {
         });
         props.data.items = [...res.items];
       }
+      props.data.items?.forEach((row: any) => {
+        row.frequencyTypeing = row.frequencyType ? [row.frequencyType] : [];
+      });
       props.data.cwPatientMatchRules = model.cwPatientMatchRules;
       props.data.price = model.price;
+      props.data.name = model.name;
+      props.data.conditioningWrapPatientMatchRule.diagnoseDiseaseNames = model.diagnoseDiseaseNames;
+      props.data.conditioningWrapPatientMatchRule.diagnoseSyndromeNames = model.diagnoseSyndromeNames;
+      props.data.conditioningWrapPatientMatchRule.constitutionGroupNames = model.constitutionGroupNames; 
+      props.data.conditioningWrapPatientMatchRule.sex = model.sex;
+      props.data.conditioningWrapPatientMatchRule.age = model.age;
+      props.data.conditioningWrapPatientMatchRule.willillStateNames = model.willillStateNames;
     } catch (err) {
       console.error('Error fetching data:', err);
     }