Pārlūkot izejas kodu

检验、检查、药品、项目,4项可配配置弹窗,因为thmz项目里0是未开启,所有统一,0未开启,1开启状态。

梁欢 2 mēneši atpakaļ
vecāks
revīzija
b6cf9b2f49

+ 41 - 2
src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/TianJiaJianYan.vue

@@ -91,6 +91,11 @@
       </el-row>
     </el-form>
   </el-dialog>
+   <showDialog
+      v-if="showDialogRef"
+      @select="handlePaymentSelect"
+      @closed="showDialogRef = false"
+   />
 </template>
 
 <script setup>
@@ -117,6 +122,7 @@ import {
 import { getServerDateApi, yaoPinXiangMuPiPeiYiBao } from "@/api/public-api";
 import Sleep from "@/utils/sleep";
 import { BizException, ExceptionEnum } from "@/utils/BizException";
+import ShowDialog from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/showDialog/ShowDialog";
 import JyJcTree from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/jy-jc-tree/JyJcTree.vue";
 import JianChaJianYanTable from "@/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/components/public/JianChaJianYanTable.vue";
 import JcJyTemplate from "@/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/components/public/JcJyTemplate.vue";
@@ -265,12 +271,35 @@ const clickSaveTemplate = async () => {
   tcNameRef.value.focus();
 };
 
+
+let sval = 0;
+const showDialogRef = ref(false);
+let tempData = null;
+const handlePaymentSelect = (type) => {
+  if (type === 'self') {
+    sval = 1;
+  }
+};
+const waitDialogClose = () => {
+  return new Promise((resolve) => {
+    const check = () => {
+      if (!showDialogRef.value) {
+        resolve();
+        return;
+      }
+      setTimeout(check, 100);
+    };
+    check();
+  });
+};
+
 const nodeClick = async val => {
   if (val.code.length < 5) {
     BizException(ExceptionEnum.LOGICAL_ERROR, "无法添加目录");
+    return;
   }
   jyJcRestriction(val);
-  let temp = {
+  const temp = {
     classes: val.classes,
     orderType: "",
     execDept: val.execUnit,
@@ -289,7 +318,17 @@ const nodeClick = async val => {
     minAgeRestriction: val.minAgeRestriction,
     maxAgeRestriction: val.maxAgeRestriction,
   };
-  jyProxy.push(temp);
+
+  if (val.jyDialog === "1") {
+    tempData = temp;
+    showDialogRef.value = true;
+    await waitDialogClose();
+    tempData.ybSelfFlag = sval;
+    jyProxy.push(tempData);
+    tempData = null;
+  } else {
+    jyProxy.push(temp);
+  }
 };
 
 onMounted(() => {

+ 45 - 2
src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/aside/NewApplication.vue

@@ -29,6 +29,11 @@
       />
     </div>
   </div>
+     <showDialog
+        v-if="showDialogRef"
+        @select="handlePaymentSelect"
+        @closed="showDialogRef = false"
+     />
 </template>
 
 <script setup lang="ts">
@@ -46,6 +51,7 @@ import {
   jcProxy,
   jyJcRestriction,
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
+import ShowDialog from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/showDialog/ShowDialog";
 import JcJyTemplate from "@/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/components/public/JcJyTemplate.vue";
 import JianChaJianYanTable from "@/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/components/public/JianChaJianYanTable.vue";
 import { getServerDate } from "@/utils/moment-utils";
@@ -72,8 +78,32 @@ const rowClick = data => {
   }
 };
 
+
+let sval = 0;
+const showDialogRef = ref(false);
+let tempData: AddJcParams | null = null;
+const handlePaymentSelect = (type: string) => {
+  if (type === 'self') {
+    sval = 1; // 自费
+  } else {
+    sval = 0; // 非自费
+  }
+};
+const waitForDialogClose = () => {
+  return new Promise<void>((resolve) => {
+    const checkDialogStatus = () => {
+      // 对话框关闭时结束轮询
+      if (!showDialogRef.value) {
+        resolve();
+        return;
+      }
+      setTimeout(checkDialogStatus, 100);
+    };
+    checkDialogStatus();
+  });
+};
 const nodeClick = async (data: any) => {
-  let temp: AddJcParams = {
+  const temp: AddJcParams = {
     execDept: data.execUnit,
     execDeptName: data.execUnitName,
     orderCode: data.code,
@@ -85,10 +115,23 @@ const nodeClick = async (data: any) => {
     minAgeRestriction: data.minAgeRestriction,
     maxAgeRestriction: data.maxAgeRestriction,
     startTime: await getServerDate(),
+    ybSelfFlag: 0,
     inspectParts: [],
   };
+
   jyJcRestriction(temp);
-  jcProxy.push(temp);
+  if (data.jcDialog === "1") {
+    tempData = temp;
+    showDialogRef.value = true;
+    await waitForDialogClose();
+    if (tempData) {
+      tempData.ybSelfFlag = sval;
+      jcProxy.push(tempData);
+      tempData = null;
+    }
+  } else {
+    jcProxy.push(temp);
+  }
 };
 
 const deleteTemplate = val => {

+ 4 - 4
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-edit/YzEditor.vue

@@ -376,8 +376,6 @@ const searchOrders = val => {
 };
 
 const searchClickFunc = async (row: SearchOrdersType): Promise<void> => {
-    console.log("searchClickFunc");
-    console.log(row);
   // 这个是选择了医嘱模板医嘱,需要打开弹窗
   if (row.serial === "0000" && row.groupNo === "0000") {
     props.openGroupOrderTemplate(row.orderCode);
@@ -447,6 +445,9 @@ const searchClickFunc = async (row: SearchOrdersType): Promise<void> => {
   if (row.showDialog !== undefined) {
     setYzData("showDialog", row.showDialog);
   }
+    if (row.yzDialog !== undefined) {
+      setYzData("yzDialog", row.yzDialog);
+    }
   // 查询一下父医嘱
   fuYiZhuClick();
   // 药品
@@ -792,7 +793,6 @@ const doctorAuth = async (
 
 const setYzData = (name: keyof YzType, value: any): void => {
   // @ts-ignore
-  console.log("setYzData");
   yiZhuData.value[name] = value;
 };
 
@@ -1025,7 +1025,7 @@ const confirmOrdersClick = async () => {
 const yzDialogRef = ref(false);
 const showDialogRef = ref(false);
 const openTheOrderPopUpWindow = () => {
-      if(yiZhuData.value.showDialog == "0" ){
+      if(yiZhuData.value.showDialog == "1" || yiZhuData.value.yzDialog == "1" ){
            showDialogRef.value=true;
           //让CyComboGrid 失焦,否则医嘱名称会2次弹窗
           if (orderCodeRef.value && typeof orderCodeRef.value.blur === 'function') {

+ 12 - 0
src/views/dictionary/orderZdMaintain/components/orderitem/EditorDialog.vue

@@ -136,6 +136,18 @@ defineExpose<UseDialogType.Expose>({
         </el-form-item>
       </el-col>
 
+        <el-col :span="24">
+          <el-form-item label="支付弹窗:">
+            <el-switch
+              v-model="tmpData.yzDialog"
+              active-text="是"
+              inactive-text="否"
+              active-value="1"
+              inactive-value="0"
+            ></el-switch>
+          </el-form-item>
+        </el-col>
+
       <el-col :span="12">
         <el-form-item label="执行科室:">
           <SystemDeptSelect

+ 1 - 0
src/views/dictionary/orderZdMaintain/components/orderitem/OrderIten.vue

@@ -93,6 +93,7 @@ function openAddEditorDialog() {
     discription: "",
     ybComment: "",
     nCode: "",
+    yzDialog: "",
   }).then(res => {
     store.orderItem.push(res);
   });

+ 4 - 0
src/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng.ts

@@ -275,6 +275,7 @@ export interface YzType {
   maxAgeRestriction: string;
   minAgeRestriction: string;
   showDialog: string;
+  yzDialog: string;
 }
 
 export interface SearchOrdersType {
@@ -323,6 +324,7 @@ export interface SearchOrdersType {
   drugFlagName: string;
   infusionFlagName: string;
   showDialog: string;
+  yzDialog: string;
 }
 
 // 医嘱数据
@@ -408,6 +410,7 @@ export const yiZhuData = ref<YzType>({
   maxAgeRestriction: "",
   minAgeRestriction: "",
   showDialog: "",
+  yzDialog: "",
 });
 
 export const yiZhuDataInit = (clearOrderNo: boolean = true): void => {
@@ -493,6 +496,7 @@ export const yiZhuDataInit = (clearOrderNo: boolean = true): void => {
     maxAgeRestriction: "",
     minAgeRestriction: "",
     showDialog: "",
+    yzDialog: "",
   };
 };
 // 保存医嘱数据

+ 1 - 1
src/views/yp-dict/YpZdDict.vue

@@ -772,7 +772,7 @@
               <el-row>
                <el-col :span="4">
                 <el-form-item label="支付弹窗" prop="showDialog">
-                  <el-switch v-model="ypForm.showDialog" active-value="0" inactive-value="1"
+                  <el-switch v-model="ypForm.showDialog" active-value="1" inactive-value="0"
                    active-color="#13ce66" inactive-color="#ff4949" />
                   </el-form-item>
               </el-col>