Kaynağa Gözat

优化中医调养

张田田 10 ay önce
ebeveyn
işleme
7a03b34bd4

+ 5 - 11
src/pages/index/care/institutionService.vue

@@ -70,12 +70,6 @@ const searchFormProps = reactive<VxeFormProps<SystemCwQuery>>({
         },
       },
     },
-    // {
-    //   field: 'institutionName',
-    //   title: '机构名称',
-    //   span: 24,
-    //   itemRender: { name: 'VxeInput', props: { placeholder: '请输入' } },
-    // },
   ],
 });
 const searchFormEmits: VxeFormListeners<SystemCwQuery> = {
@@ -174,7 +168,7 @@ function seeInstitutionDetail(model: SystemCwModel, index: number) {
   VxeUI.modal.open({
     title: model?.id ? `机构服务详情` : `新增机构服务`,
     height: 700,
-    width: 850,
+    width: 1000,
     escClosable: true,
     destroyOnClose: true,
     id: `servicePackageDetail-modal`,
@@ -218,10 +212,10 @@ function editInstitution(model?: SystemCwModel, index?: number) {
     title: model?.id ? `修改机构服务` : `新增机构服务`,
     height: 700,
     width: 1500,
-    position: {
-      top: Math.min(100, window.innerHeight * 0.1),
-      left: Math.min(100, window.innerWidth * 0.1),
-    },
+    // position: {
+    //   top: Math.min(100, window.innerHeight * 0.1),
+    //   left: Math.min(100, window.innerWidth * 0.1),
+    // },
     escClosable: true,
     destroyOnClose: true,
     id: `edit-system-service-modal`,

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

@@ -174,7 +174,7 @@ function seeInstitution(model?: SystemCwModel, index?: number) {
     id: 'servicePackageDetail-modal',
     title: '系统服务',
     height: 700,
-    width: 900,
+    width: 1000,
     escClosable: true,
     destroyOnClose: true,
     slots: {
@@ -191,11 +191,11 @@ function editSystemService(model?: SystemCwModel, index?: number) {
   VxeUI.modal.open({
     id: 'edit-system-service-modal',
     title: model?.id ? `修改系统服务` : `新增系统服务`,
-    height: 800,
+    height: 750,
     width: 1200,
-    position: {
-      top: Math.min(100, window.innerHeight * 0.1),
-    },
+    // position: {
+    //   top: Math.min(100, window.innerHeight * 0.1),
+    // },
     escClosable: true,
     destroyOnClose: true,
     slots: {

+ 1 - 1
src/request/api/care.api.ts

@@ -276,7 +276,7 @@ export function addConditioningSchemeMethod(data: Partial<OpenConditioningScheme
 
 // 根据调理包id获取调理包详情
 export function getConditioningRecordDetailMethod(data: Partial<SystemCwModel>) {
-  console.log(data.id, '获取调理包详情',data.type);
+  console.log('获取调理包详情',data);
   if(data.type === 'institution'){
     // 机构调理包详情
     return request.Post(`/fdhb-pc/conditioningManage/wrap/getCwDetailById/${data.id}`, {

+ 6 - 13
src/service/EditSystemService.vue

@@ -6,14 +6,12 @@ import { UploadIFile } from '@/request/api/follow.api';
 import type { UploadFile } from 'ant-design-vue/es/upload/interface';
 import { message } from 'ant-design-vue';
 import {
-  pageConfirmedCpMethod,
   pageMedicineMethod,
   pageDiagnoseTypeMethod,
   addSystemCwMethod,
   addOrgCwMethod,
   getConditioningRecordDetailMethod,
   getAllSystemCpMethod,
-  getAllOrgCwMethod,
   getCpContentListMethod,
 } from '@/request/api/care.api';
 import RemoteSelect from '@/libs/v-select-page/RemoteSelect.vue';
@@ -23,7 +21,7 @@ import type { SystemCwModel } from '@/model/care.model';
 import AcupointEdit from '@/service/AcupointEdit.vue';
 import ServiceDetail from '@/service/ServiceDetail.vue';
 import ServicePackageList from '@/service/ServicePackageList.vue';
-import { MinusCircleOutlined, PlusCircleOutlined, EyeOutlined, PlusOutlined } from '@ant-design/icons-vue';
+import { MinusCircleOutlined, EyeOutlined, PlusOutlined } from '@ant-design/icons-vue';
 import { VxeUI } from 'vxe-pc-ui';
 type FollowModel = Partial<SystemCwModel>;
 const props = defineProps<{ data: FollowModel }>();
@@ -348,9 +346,7 @@ function calculateCount(row: any) {
   // 检查是否选择了"不限"
   if (row.frequencyType === '不限') {
     frequencyType.value = [row.frequencyType];
-    // row.frequencyType = ''; // 重置 frequencyType
     row.frequencyMeasure = ''; // 重置 frequencyMeasure
-    // row.totalMeasure = Math.ceil(period / 1) * 1; // 使用默认值进行计算
     row.totalMeasure = 1;
   } else {
     const frequencyType = Number(row.frequencyType) || 0;
@@ -578,9 +574,6 @@ const handlePreview = async (file: UploadFile) => {
   visible.value = true;
 };
 let multiple = ref<boolean>(true);
-let constitutionGroupNames = ref<string[]>([]);
-let sex = ref<string>('');
-let age = ref<string>('');
 </script>
 
 <template>
@@ -767,7 +760,7 @@ let age = ref<string>('');
                       calculateCount(row);
                     }
                   "
-                  v-model:value="frequencyType"
+                  v-model:value="row.frequencyType"
                 >
                   <a-checkbox value="不限">不限</a-checkbox>
                 </a-checkbox-group>
@@ -812,7 +805,7 @@ let age = ref<string>('');
           <template #default="{ row }">
             <div style="display: flex; align-items: center">
               <span>调养开始第</span>
-              <a-input v-model:value="row.initialDay" style="width: 80px" />
+              <a-input v-model:value="row.initialDay" style="width: 60px" />
               <span>天</span>
             </div>
           </template>
@@ -826,7 +819,7 @@ let age = ref<string>('');
           </template>
         </vxe-column>
 
-        <vxe-column field="conditioningProgramDetail.pricingType" title="穴位/经络/部位" width="160">
+        <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>
@@ -848,11 +841,11 @@ let age = ref<string>('');
       }"
       :src="previewImg"
     />
-    <div style="display: flex; justify-content: flex-end; margin-top: 16px">
+    <div style="display: flex; justify-content: flex-end;">
       <span style="font-weight: bold">合计:{{ formData.price }}元</span>
     </div>
 
-    <div style="display: flex; justify-content: center; margin-top: 32px">
+    <div style="display: flex; justify-content: center;">
       <a-button style="margin-right: 24px" @click="cancel">取消</a-button>
       <a-button type="primary" @click="confirm">确认</a-button>
     </div>

+ 6 - 2
src/service/ServicePackageDetail.vue

@@ -55,13 +55,17 @@ onMounted(async () => {
         <vxe-column field="days" title="周期" align="center" :disabled="true" />
         <vxe-column field="frequencyType" title="频率" width="auto">
           <template #default="{ row }">
-            <div style="display: flex; align-items: center">
+            <div v-if="row.frequencyType === '不限'">
+             不限
+            </div>
+            <div style="display: flex; align-items: center" v-else>
               <span>每</span>
               <a-input v-model:value="row.frequencyType" style="width: 60px" @change="() => calculateCount(row)" :disabled="true" />
               <span>天</span>
               <a-input v-model:value="row.frequencyMeasure" style="width: 60px" @change="() => calculateCount(row)" :disabled="true" />
               <span>{{ row.conditioningProgramDetail?.cpFixedPricingRule?.pricingUnit }}</span>
             </div>
+           
           </template>
         </vxe-column>
         <vxe-column field="conditioningProgramDetail.conditioningProgramType" title="方案类型" align="center" />
@@ -77,7 +81,7 @@ onMounted(async () => {
 
     <!-- 合计 -->
     <div class="total-row">
-      合计:<b>{{ tableData?.price || tableData?.cost }}元</b>
+      合计:<b>{{ tableData?.price || tableData?.cost || 0 }}元</b>
     </div>
 
     <!-- 配送信息 -->

+ 4 - 14
src/service/ServicePackageList.vue

@@ -29,22 +29,12 @@ async function handleSelect(model?: SystemCwModel, index?: number) {
         id: model.id,
       };
       const res: any = await getConditioningRecordDetailMethod(params);
-      // emit('update:data', {
-      //   ...props.data,
-      //   items: res.items,
-      //   name: model.name,
-      //   cwPatientMatchRules: model.cwPatientMatchRules,
-      //   price: model.price
-      // });
-      // id.value = model.id;
       if (res && res.items && res.items.length > 0) {
-       res.items.forEach((item: any) => {
-          delete item.conditioningProgramDetail.id
+        res.items.forEach((item: any) => {
+          delete item.conditioningProgramDetail.id;
         });
         props.data.items = [...res.items];
       }
-      // props.data.name = model.name;
-     
       props.data.cwPatientMatchRules = model.cwPatientMatchRules;
       props.data.price = model.price;
     } catch (err) {
@@ -54,7 +44,7 @@ async function handleSelect(model?: SystemCwModel, index?: number) {
   // 这里写你的选择逻辑
   VxeUI.modal.open({
     title: '引入项目',
-    width: 700,
+    width: 920,
     height: 700,
     escClosable: true,
     destroyOnClose: true,
@@ -77,7 +67,7 @@ async function handleSelect(model?: SystemCwModel, index?: number) {
 </script>
 
 <template>
-  <div style="width: 90vw; max-width: 1000px; margin: 40px auto; background: #fff; padding: 32px; border-radius: 6px; box-shadow: 0 2px 8px #0001">
+  <div style=" background: #fff; padding: 32px; border-radius: 6px; box-shadow: 0 2px 8px #0001">
     <vxe-table :data="tableData" border>
       <vxe-column field="name" title="服务包名称" />
       <vxe-column field="diagnoseDiseaseNames" title="专病" />