瀏覽代碼

根据药品帐页配置开启弹窗

梁欢 2 月之前
父節點
當前提交
b3cec4d839

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

@@ -254,12 +254,12 @@
       @closed="yzDialogRef = false"
     />
       <!--  选择医嘱后弹窗  -->
-<!--      <showDialog
+      <showDialog
         v-if="showDialogRef"
         :yz-data="yiZhuData"
         @select="handlePaymentSelect"
         @closed="showDialogRef = false"
-      />-->
+      />
   </div>
 </template>
 
@@ -376,6 +376,8 @@ 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);
@@ -436,13 +438,15 @@ const searchClickFunc = async (row: SearchOrdersType): Promise<void> => {
     .setValue("maxAgeRestriction")
     .setValue("minAgeRestriction")
     .setDefaultValueByName("newOrderFlag", 1)
-    .setDefaultValueByName("statusFlag", "1");
+    .setDefaultValueByName("statusFlag", "1")
 
   let now = await getServerDate();
 
   setYzData("orderTime", now);
   setYzData("startTime", now);
-
+  if (row.showDialog !== undefined) {
+    setYzData("showDialog", row.showDialog);
+  }
   // 查询一下父医嘱
   fuYiZhuClick();
   // 药品
@@ -473,9 +477,7 @@ const rowClickFillData = async (data: YzType) => {
   }
   // 先清空一遍
   qingKong();
-
   yiZhuData.value = data;
-
   if (data.serial !== "00") {
     await drugDefaultValue(false, data);
   } else {
@@ -790,6 +792,7 @@ const doctorAuth = async (
 
 const setYzData = (name: keyof YzType, value: any): void => {
   // @ts-ignore
+  console.log("setYzData");
   yiZhuData.value[name] = value;
 };
 
@@ -1022,17 +1025,19 @@ const confirmOrdersClick = async () => {
 const yzDialogRef = ref(false);
 const showDialogRef = ref(false);
 const openTheOrderPopUpWindow = () => {
-  // showDialogRef.value=true;
-      //让CyComboGrid 失焦,否则医嘱名称会2次弹窗
-     /*if (orderCodeRef.value && typeof orderCodeRef.value.blur === 'function') {
-       orderCodeRef.value.blur();
-     } else {
-       const comboGridEl = orderCodeRef.value?.$el;
-       if (comboGridEl) {
-         const inputEl = comboGridEl.querySelector('input'); // 找到内部输入框
-         if (inputEl) inputEl.blur();
-       }
-    }*/
+      if(yiZhuData.value.showDialog == "0" ){
+           showDialogRef.value=true;
+          //让CyComboGrid 失焦,否则医嘱名称会2次弹窗
+          if (orderCodeRef.value && typeof orderCodeRef.value.blur === 'function') {
+           orderCodeRef.value.blur();
+         } else {
+           const comboGridEl = orderCodeRef.value?.$el;
+           if (comboGridEl) {
+             const inputEl = comboGridEl.querySelector('input'); // 找到内部输入框
+             if (inputEl) inputEl.blur();
+           }
+        }
+    }
     //如果下面也会弹窗的话,那么我们就要下面就要做判断了,因为我没有碰到所以我暂时就没写了
   if (!isEdit.value) {
     if (yiZhuData.value.statusFlag !== "1") {
@@ -1260,14 +1265,14 @@ defineExpose({
 });
 
 // showDialog
-/*const handlePaymentSelect = (type) => {
+ const handlePaymentSelect = (type) => {
   if (type === 'self') {
     // 选择自费时,勾选复选框
     yiZhuData.value.ybSelfFlag = "1";
   }else{
      yiZhuData.value.ybSelfFlag = "0";
   }
-};*/
+};
 </script>
 
 <style scoped lang="scss">

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

@@ -274,6 +274,7 @@ export interface YzType {
   genderRestriction: string;
   maxAgeRestriction: string;
   minAgeRestriction: string;
+  showDialog: string;
 }
 
 export interface SearchOrdersType {
@@ -321,6 +322,7 @@ export interface SearchOrdersType {
   dcode: string;
   drugFlagName: string;
   infusionFlagName: string;
+  showDialog: string;
 }
 
 // 医嘱数据
@@ -405,6 +407,7 @@ export const yiZhuData = ref<YzType>({
   genderRestriction: "",
   maxAgeRestriction: "",
   minAgeRestriction: "",
+  showDialog: "",
 });
 
 export const yiZhuDataInit = (clearOrderNo: boolean = true): void => {
@@ -489,6 +492,7 @@ export const yiZhuDataInit = (clearOrderNo: boolean = true): void => {
     genderRestriction: "",
     maxAgeRestriction: "",
     minAgeRestriction: "",
+    showDialog: "",
   };
 };
 // 保存医嘱数据
@@ -754,6 +758,7 @@ export const tempYzData = computed<YzType[]>(() => {
 // 获取医嘱的下标
 export const getYzIndex = (key: string | number) => {
   return XEUtils.findLastIndexOf(tempYzData.value, item => {
+    console.log(key);
     return item.id == key;
   });
 };

+ 11 - 0
src/views/yp-dict/YpZdDict.vue

@@ -768,6 +768,16 @@
                 </el-col>
               </el-row>
             </el-collapse-item>
+            <el-collapse-item title="第四部分" name="4" disabled>
+              <el-row>
+               <el-col :span="4">
+                <el-form-item label="支付弹窗" prop="showDialog">
+                  <el-switch v-model="ypForm.showDialog" active-value="0" inactive-value="1"
+                   active-color="#13ce66" inactive-color="#ff4949" />
+                  </el-form-item>
+              </el-col>
+              </el-row>
+            </el-collapse-item>
           </el-collapse>
         </el-form>
       </div>
@@ -887,6 +897,7 @@ let ypForm = ref({
     drugControlCode: '', // 药管平台码
     nationalCode: '', // 国家医保编码
     groupNo: '', //药库编码
+    showDialog: '', // 0开启,1不开启
 })
 
 // watch(() => props.ypDetail, () => {