Bladeren bron

优化医嘱录入

DESKTOP-MINPJAU\Administrator 3 jaren geleden
bovenliggende
commit
804a066453

+ 5 - 0
src/App.vue

@@ -101,6 +101,11 @@ ul, li {
   cursor: pointer;
 }
 
+
+.xc_box {
+  box-shadow: 0 4px 8px rgb(0 0 0 / 20%), 0 6px 20px rgb(0 0 0 / 19%);
+}
+
 #app {
   font-family: Avenir, Helvetica, Arial, sans-serif;
   -webkit-font-smoothing: antialiased;

+ 14 - 16
src/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru.js

@@ -173,20 +173,18 @@ export function expensesForGettingADoctorSOrder(patNo, times) {
     })
 }
 
+export function singleDataCheck(data) {
+    return request({
+        url: url + '/singleDataCheck',
+        method: 'post',
+        data: data
+    })
+}
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+export function saveTheDoctorSOrder(data) {
+    return request({
+        url: url + '/saveTheDoctorSOrder',
+        method: 'post',
+        data: data
+    })
+}

+ 4 - 0
src/components/xc/select/XcSelect.vue

@@ -2,6 +2,7 @@
   <el-select v-model="modelObj"
              :clearable="props.clearable"
              :remote="props.remote"
+             :id="props.id"
              :remote-method="xcMethod"
              :style="{width: props.width + 'px'}"
              ref="xcselect" filterable
@@ -52,6 +53,9 @@ const props = defineProps({
   clearable: {
     type: Boolean,
     default: false
+  },
+  id: {
+    type: String
   }
 })
 

+ 35 - 44
src/components/xc/table-v3/XcTableV3.vue

@@ -12,6 +12,7 @@
              @focus="getfocus"
              autocomplete="new-pwd"
              @blur="blur"
+             :id="props.id"
              @mousedown.stop
              @click="setUpSearchPlaceholders"
              :placeholder="placeholder"
@@ -31,9 +32,13 @@
            ref="containerRef"
            :style="{minWidth : `${selectRef?.clientWidth}` + 'px'}"
            v-show="showOptions">
-        <div :style="{ height: emptyHeight + 'px' }"/>
+        <div v-show="props.data.length === 0" class="empty_data">
+          暂无数据
+        </div>
+        <div :style="{ height: emptyHeight + 'px' }" v-show="props.data.length > 0"/>
         <div :style="{ transform: `translateY(${translateY})`}"
-             style="width: 100%;">
+             style="width: 100%;"
+             v-show="props.data.length > 0">
           <table style="width: 100%;">
             <thead>
             <tr style="line-height: 33px">
@@ -58,6 +63,7 @@
             </tbody>
           </table>
         </div>
+
       </div>
     </transition>
   </div>
@@ -342,10 +348,13 @@ watch(() => props.data, async () => {
   await nextTick()
   enableScrollBar()
   containerRef.value.scrollTop = 0
-  dataFilling()
+  if (judgingCodeIsEmpty()) {
+    dataFilling()
+  }
 }, {deep: true, immediate: true})
 
-watch(() => props.modelValue[props.code], () => {
+watch(() => props.modelValue[props.code], async () => {
+  await nextTick()
   dataFilling()
   if (judgingCodeIsEmpty()) {
     placeholder = '请选择'
@@ -372,8 +381,8 @@ const enableScrollBar = () => {
 
 // 点击li 选中数据
 const clickToSelect = (val) => {
-  props.modelValue[props.code] = val[props.code]
-  props.modelValue[props.name] = val[props.name]
+  props.modelValue[props.code] = val.code
+  props.modelValue[props.name] = val.name
   inputData = val[props.name]
   closePopup()
 }
@@ -384,7 +393,6 @@ const selectedStyle = {
   color: '#fff'
 }
 
-
 // 远程搜索
 const performASearch = functionDebounce(() => {
   if (inputData) {
@@ -392,11 +400,18 @@ const performASearch = functionDebounce(() => {
   }
 }, 200)
 
+const focus = () => {
+  getfocus()
+}
+
+defineExpose({focus})
+
 
 let tableHeader = $ref([])
 
 onMounted(() => {
   nextTick(() => {
+
     selectInputRef.value.addEventListener('input', () => {
       performASearch()
       showOptions = true
@@ -406,6 +421,9 @@ onMounted(() => {
     useSlots().default().forEach((item) => {
       tableHeader.push(item.props)
     })
+  } else {
+    tableHeader.push({label: '编码', prop: 'code'})
+    tableHeader.push({label: '名称', prop: 'name'})
   }
 })
 
@@ -418,6 +436,14 @@ onMounted(() => {
   box-shadow: 0 0 0 1px #409eff inset !important;
 }
 
+.empty_data {
+  display: flex;
+  width: 100%;
+  justify-content: center;
+  align-items: center;
+  background-color: white;
+  color: #000;
+}
 
 .xc-select-v3 {
   box-shadow: 0 0 0 1px #a8abb2 inset;
@@ -460,8 +486,10 @@ onMounted(() => {
     overflow: auto;
     display: flex;
     //direction: rtl;
+    z-index: 9999;
     top: 26px;
     box-shadow: 0 0 12px rgba(0, 0, 0, .12);
+    background-color: white;
 
     min-height: 34px;
     max-height: 275px;
@@ -486,43 +514,6 @@ onMounted(() => {
       -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
       background: #535353;
     }
-
-
-    ul {
-      list-style: none;
-      margin: 0;
-      width: 100%;
-      height: 100%;
-      padding: 0;
-      direction: ltr;
-      background-color: white;
-
-      .hover {
-        background-color: #686a6c;
-        color: white;
-      }
-
-
-      .item {
-        font-size: var(--el-font-size-base);
-        padding: 0 32px 0 20px;
-        position: relative;
-        white-space: nowrap;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        height: 34px;
-        line-height: 34px;
-        box-sizing: border-box;
-        cursor: pointer;
-        width: 100%;
-
-        &:hover {
-          background-color: #fac44d;
-          color: white;
-        }
-
-      }
-    }
   }
 }
 

+ 165 - 0
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/BaoCunXinXi.vue

@@ -0,0 +1,165 @@
+<template>
+
+  <div :style="style" class="main xc_box 小手指">
+    <div ref="div" class="header">
+      <div style="flex: 1">上传提示</div>
+      <div class="circle_close " @click="close">
+        <el-icon :size="21">
+          <CircleClose/>
+        </el-icon>
+      </div>
+    </div>
+
+    <div class="box">
+
+      <div v-for="(value, key) in tips"
+           class="message"
+           :class="currentKey === key ? 'current_selected' : '' "
+           @click="clickToModify(key)">
+        <div class="name">
+          {{ value?.data?.orderName }}
+        </div>
+
+        <div v-if="value?.error" class="error">
+          <div>
+            错误信息:
+          </div>
+          <div v-for="(item,index) in value?.error">
+            {{ index + 1 }}、 {{ item }}
+          </div>
+        </div>
+
+        <div v-if="value?.warning" class="warning">
+          <div>
+            警告信息:
+          </div>
+          <div v-for="(item,index) in value?.warning">
+            {{ index + 1 }}、 {{ item }}
+          </div>
+        </div>
+      </div>
+    </div>
+
+  </div>
+
+
+</template>
+
+<script setup name='BaoCunXinXi' lang="ts">
+import {useDraggable} from '@vueuse/core'
+import {delCallback, setCallback} from "@/utils/websocket";
+import {$ref} from "vue/macros";
+// import {onMounted, onUnmounted, ref} from "vue";
+
+const props = defineProps({
+  data: Object
+})
+
+const div = ref(null)
+
+const {x, y, style} = useDraggable(div, {
+  initialValue: {x: 77, y: 494},
+});
+
+let tips: Object = $ref({})
+
+const close = () => {
+  console.log('关闭')
+}
+
+let currentKey: string = $ref('')
+const clickToModify = (key) => {
+  currentKey = key
+}
+
+onMounted(() => {
+  setCallback('updatedOrder', async (data) => {
+    tips = data
+  })
+})
+
+
+onUnmounted(() => {
+  delCallback('updatedOrder')
+})
+
+
+</script>
+
+<style scoped lang="scss">
+
+.main {
+  position: fixed;
+  width: 350px;
+  z-index: 20;
+  background-color: white;
+  border-radius: 5px;
+
+
+  .header {
+    border-bottom: 1px solid #000;
+    width: 100%;
+    line-height: 35px;
+    text-align: center;
+    display: flex;
+    position: relative;
+
+    .circle_close {
+      position: absolute;
+      display: flex;
+      right: 0;
+      justify-content: center;
+      align-items: center;
+      width: 35px;
+      height: 100%;
+    }
+  }
+
+  .box {
+    margin: 5px;
+    padding: 4px;
+    max-height: 300px;
+    overflow: auto;
+
+    .current_selected {
+      border: 1px solid #0a84fd !important;
+
+      .name {
+        background-color: #0a84fd !important;
+      }
+
+    }
+
+    .message {
+      border: 1px dashed #000;
+      padding: 5px;
+      border-radius: 4px;
+      margin: 5px 0;
+
+      .name {
+        padding: 5px;
+        border-radius: 5px;
+        background-color: #2c3e50;
+        color: white;
+      }
+
+      .error {
+        margin: 5px 0;
+        padding: 4px;
+        border-radius: 5px;
+        background-color: #f89b9b;
+      }
+
+      .warning {
+        margin: 5px 0;
+        padding: 4px;
+        border-radius: 5px;
+        background-color: #f5e1b8;
+      }
+
+    }
+  }
+}
+
+
+</style>

+ 6 - 2
src/utils/websocket.js

@@ -1,8 +1,7 @@
-import {ElMessageBox, ElNotification} from 'element-plus'
+import {ElMessageBox} from 'element-plus'
 import Cookies from 'js-cookie'
 import router from '@/router'
 import store from '@/store'
-import {endLoading} from './loading'
 
 const socketUrl = import.meta.env.VITE_SOCKET_URL
 
@@ -26,6 +25,11 @@ export function setCallback(messageName, callback) {
     console.log(`websocket 监听通道 ${messageName},已监听 ${globalCallback.get(messageName).length} 个`)
 }
 
+export function delCallback(messageName) {
+    globalCallback.delete(messageName)
+    console.log(`websocket 监听通道关闭 ${messageName}`)
+}
+
 
 function sendAMessage(name, data) {
     if (globalCallback.has(name)) {

+ 281 - 77
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/TianJiaYiZhu.vue

@@ -1,11 +1,21 @@
 <template>
+  <!-- 上传信息提示 -->
+  <bao-cun-xin-xi/>
+
   <!-- 这里是获取模板的 -->
   <huo-qu-mu-ban v-if="muBanDuiHuaKuang" @close="muBanDuiHuaKuang = false"
                  @muBanShuJu="muBanShuJu"></huo-qu-mu-ban>
   <bao-cun-mu-ban ref="baoCunMuBanRef"></bao-cun-mu-ban>
-  <template v-for="(item, index) in tiShiBiaoTi" :key="index">
-    <el-alert :title="item.title" :type="item.type" effect="dark"></el-alert>
-  </template>
+  <div class="prompt" v-if="tiShiBiaoTi?.length > 0">
+    <div style="margin-right: 5px">
+      提示信息:
+    </div>
+    <div v-for="(item, index) in tiShiBiaoTi" :key="index" class="item">
+      <div>
+        {{ item }}
+      </div>
+    </div>
+  </div>
   <el-button icon="ArrowLeft" style="font-size: 14px" text type="primary" @click="router.go(-1)">返回</el-button>
   <el-button type="primary" @click="muBanDuiHuaKuang = true">获取模板</el-button>
   <el-button :disabled="yiZhuList.length === 0" type="primary" @click="baoCunMuBanClick">保存模板</el-button>
@@ -43,22 +53,32 @@
       </el-col>
       <el-col :span="span">
         <el-form-item class="bi_tian" label="频率:" prop="frequCode">
-          <XcSelectV2
-              style="width: 120px"
-              v-model="yiZhuData"
-              :data="yaoPinPingLvData"
-              value="frequCode"
-              label="frequCodeName"
-              :remote-method="pinLvRemoteMethod"
-              ref="pingLv"
-          />
+          <xc-table-v3 style="width: 120px"
+                       v-model="yiZhuData"
+                       @keydown.enter="enterToJumpInput('frequCode')"
+                       :data="yaoPinPingLvData"
+                       code="frequCode"
+                       name="frequCodeName"
+                       :remote-method="pinLvRemoteMethod"
+                       id="yz_frequCode"
+                       ref="pingLv"/>
         </el-form-item>
       </el-col>
       <el-col :span="span">
         <el-form-item class="bi_tian" label="一次剂量:" prop="dose">
-          <el-input-number v-model="yiZhuData.dose" :min="0" :precision="2" style="width: 110px"
-                           @change="jiSuanLingLiang"></el-input-number>
-          <XcSelect v-model="yiZhuData" :data="yaoPinJiLiangData" :name="['doseUnit', 'doseUnitName']" :width="80"
+          <el-input-number v-model="yiZhuData.dose"
+                           :min="0"
+                           ref="doseRef"
+                           id="yz_dose"
+                           @keydown.enter="enterToJumpInput('dose')"
+                           :precision="2"
+                           style="width: 110px"
+                           @change="jiSuanLingLiang"/>
+          <XcSelect v-model="yiZhuData"
+                    id="yz_doseUnit"
+                    @keydown.enter="enterToJumpInput('doseUnit')"
+                    :data="yaoPinJiLiangData"
+                    :name="['doseUnit', 'doseUnitName']" :width="80"
                     @change="xuanZheJiLiang">
             <XcOption label="value"></XcOption>
             <XcOption label="name"></XcOption>
@@ -70,15 +90,15 @@
       </el-col>
       <el-col :span="span">
         <el-form-item class="bi_tian" label="给药方式:" prop="supplyCode">
-          <XcSelectV2
+          <xc-table-v3
               style="width: 120px"
               v-model="yiZhuData"
               :data="geiYaoFangShiData"
-              value="supplyCode"
-              label="supplyCodeName"
+              id="yz_supplyCode"
+              code="supplyCode"
+              name="supplyCodeName"
               :remote-method="geiYaoFangShiRemoteMethod"
-              clearable
-          />
+              clearable/>
         </el-form-item>
       </el-col>
       <el-col :span="span">
@@ -91,6 +111,7 @@
           <el-date-picker
               v-model="yiZhuData.startTime"
               :disabled-date="disabledDate"
+              id="yz_startTime"
               format="YYYY-MM-DD HH:mm:ss"
               type="datetime"
               value-format="YYYY-MM-DD HH:mm:ss"
@@ -101,6 +122,7 @@
         <el-form-item class="bi_tian" label="停止时间:" prop="endTime">
           <el-date-picker
               v-model="yiZhuData.endTime"
+              id="yz_endTime"
               :disabled="yiZhuData.frequCode === 'ONCE'"
               :disabled-date="disabledDate"
               format="YYYY-MM-DD HH:mm:ss"
@@ -116,19 +138,22 @@
       </el-col>
       <el-col :span="span">
         <el-form-item class="bi_tian" label="执行科室:" prop="execUnit">
-          <XcSelectV2
+          <xc-table-v3
               style="width: 120px"
               v-model="yiZhuData"
               :data="zhiXingKeShiData"
-              value="execUnit"
-              label="execUnitName"
-              :remote-method="metZhiXingKeShi"
-          />
+              id="yz_execUnit"
+              code="execUnit"
+              name="execUnitName"
+              :remote-method="metZhiXingKeShi"/>
         </el-form-item>
       </el-col>
       <el-col :span="span">
         <el-form-item label="父医嘱:" prop="orderName">
-          <el-select v-model="yiZhuData.parentNo" :disabled="yiZhuData.serial === '00'" clearable
+          <el-select v-model="yiZhuData.parentNo"
+                     :disabled="yiZhuData.serial === '00'"
+                     id="yz_parentNo"
+                     clearable
                      @clear="yiZhuData.parentNo = null" @focus="fuYiZhuClick">
             <el-option v-for="item in fuYiZhuData" :key="item.code" :label="item.name" :value="item.code">
               <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
@@ -145,12 +170,16 @@
       </el-col>
       <el-col :span="span">
         <el-form-item label="医生嘱托:">
-          <el-input v-model="yiZhuData.instruction" clearable maxlength="50" show-word-limit type="textarea"></el-input>
+          <el-input v-model="yiZhuData.instruction"
+                    id="yz_instruction"
+                    clearable maxlength="50" show-word-limit type="textarea"></el-input>
         </el-form-item>
       </el-col>
       <el-col :span="span">
         <el-form-item label="服用时间">
-          <el-select v-model="yiZhuData.kfFlag" clearable style="width: 80px" @clear="yiZhuData.kfFlag = null">
+          <el-select v-model="yiZhuData.kfFlag"
+                     id="yz_kfFlag"
+                     clearable style="width: 80px" @clear="yiZhuData.kfFlag = null">
             <el-option key="1" label="饭前" value="1"></el-option>
             <el-option key="2" label="饭后" value="2"></el-option>
           </el-select>
@@ -158,7 +187,10 @@
       </el-col>
       <el-col :span="span">
         <el-form-item label="费用标志:">
-          <el-select v-model="yiZhuData.selfBuy" clearable style="width: 120px" @clear="yiZhuData.selfBuy = null">
+          <el-select v-model="yiZhuData.selfBuy"
+                     id="yz_selfBuy"
+                     clearable style="width: 120px"
+                     @clear="yiZhuData.selfBuy = null">
             <el-option key="1" label="自备" value="1"></el-option>
             <el-option key="2" label="嘱托" value="2"></el-option>
             <el-option key="3" label="基数药" value="3"></el-option>
@@ -167,21 +199,25 @@
       </el-col>
       <el-col :span="span">
         <el-form-item label="医保自费:">
-          <el-switch v-model="yiZhuData.ybSelfFlag" active-color="#13ce66" active-text="自费" active-value="1"
+          <el-switch v-model="yiZhuData.ybSelfFlag"
+                     id="yz_ybSelfFlag"
+                     active-color="#13ce66" active-text="自费" active-value="1"
                      inactive-color="#ff4949" inactive-text="记账" inactive-value="0">
           </el-switch>
         </el-form-item>
       </el-col>
       <el-col :span="span">
         <el-form-item label="是否紧急:">
-          <el-switch v-model="yiZhuData.emergencyFlag" active-color="#13ce66" active-text="是" active-value="1"
+          <el-switch v-model="yiZhuData.emergencyFlag"
+                     id="yz_emergencyFlag"
+                     active-color="#13ce66" active-text="是" active-value="1"
                      inactive-color="#ff4949" inactive-text="否" inactive-value="0">
           </el-switch>
         </el-form-item>
       </el-col>
       <el-col v-if="yiZhuData.orderCode === zkCode" :span="span">
         <el-form-item label="转科:" class="bi_tian">
-          <el-select v-model="yiZhuData.zkObj" filterable>
+          <el-select v-model="yiZhuData.zkObj" filterable id="yz_zkObj">
             <el-option v-for="(item, index) in zkList" :key="item.value" :label="item.wardName + '|' + item.smallName"
                        :value="item.value">
               <span>{{ item.wardName }}</span>
@@ -193,7 +229,9 @@
       </el-col>
       <el-col v-if="yiZhuData.kjywFlag !== 0" :span="span">
         <el-form-item label="用药方式:">
-          <el-select v-model="yiZhuData.yyfs" style="width: 120px" @change="kangJunYaoYongYaoFangShiGaiBian">
+          <el-select v-model="yiZhuData.yyfs"
+                     id="yz_yyfs"
+                     style="width: 120px" @change="kangJunYaoYongYaoFangShiGaiBian">
             <el-option v-for="item in kangJunYaoWuYongYaoFangShi" :key="item.code" :label="item.name"
                        :value="item.code">
               <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
@@ -207,6 +245,7 @@
         <el-form-item v-if="yiZhuData.kjywFlag !== 0" label="切口等级:">
           <el-select
               v-model="yiZhuData.ssqk"
+              id="yz_ssqk"
               :disabled="yiZhuData.yyfs !== 1 && yiZhuData.yyfs !== 2 && yiZhuData.yyfs !== null"
               clearable
               style="width: 120px"
@@ -223,6 +262,7 @@
       <el-col :span="span">
         <el-form-item v-if="yiZhuData.kjywFlag !== 0" label="用药时间:">
           <el-select
+              id="yz_yysj"
               v-model="yiZhuData.yysj"
               :disabled="yiZhuData.yyfs !== 1 && yiZhuData.yyfs !== 2 && yiZhuData.yyfs !== null"
               clearable
@@ -314,14 +354,14 @@
                        @close="synopsisDialog.dialog = false"/>
 </template>
 
-<script name="TianJiaYiZhu" setup>
+<script name="TianJiaYiZhu" setup="props,context">
 import {
   huoQuFeiYongXinXi,
   huoQuGeiYaoFangShi,
   huoQuZhiXinKeShi,
   huoQuZhuYuanPinLv,
-  jiaoYan,
-  shangChuanYiZhu
+  jiaoYan, saveTheDoctorSOrder,
+  shangChuanYiZhu, singleDataCheck
 } from '@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru'
 import {
   cuoWuXinXi,
@@ -334,7 +374,7 @@ import {
 import store from '../../../../store'
 import {listIsBlank, listNotBlank, stringIsBlank, stringNotBlank} from '@/utils/blank-utils'
 import {kangJunYaoWuQieKou, kangJunYaoWuYongYaoFangShi, kangJunYaoWuYongYaoShiJian} from '@/data'
-import {ElMessage, ElMessageBox} from 'element-plus'
+import {ElMessage, ElMessageBox, ElNotification} from 'element-plus'
 import {clone} from '@/utils/clone'
 import HuoQuMuBan from '../../../../components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/HuoQuMuBan.vue'
 import {uuid} from '@/utils/getUuid'
@@ -349,7 +389,9 @@ import Sleep from '@/utils/sleep'
 import {logoutShortcut, xcHotKey} from '@/utils/xckeydown'
 import {BizException, ExceptionEnum} from '@/utils/BizException'
 import {setScrollTop} from "@/utils/el-table-scroll";
-import XcSelectV2 from "@/components/xc/select-v2/XcSelectV2.vue";
+import XcTableV3 from "@/components/xc/table-v3/XcTableV3.vue";
+import sleep from "@/utils/sleep";
+import BaoCunXinXi from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/BaoCunXinXi.vue";
 
 const windowSize = computed(() => {
   return store.state.app.windowSize
@@ -414,7 +456,7 @@ const yiZhuData = ref({
   zkObj: '',
   zkWardCode: '',
   zkDeptCode: '',
-})
+});
 /*提示信息*/
 const tiShiBiaoTi = ref([])
 
@@ -448,21 +490,14 @@ const xuanZhongFeiYong = async (row) => {
         .then((res) => {
           yiZhuData.value.drugFlag = row.drugFlag ? row.drugFlag : row.orderType
           // 判断是否 是皮试的药 如果是就只能有这些 给药方式
-          if (res.data.psFlag === 1) {
-            geiYaoFangShiData.value = res.piShi
-            tiShiBiaoTi.value.push({title: '该药品为皮试药品给药方式只能是皮试类型', type: 'warning'})
-            yiZhuData.value.psFlag = true
-          } else {
-            yiZhuData.value.psFlag = false
-          }
+          geiYaoFangShiData.value = res.piShi
+          // 是否是 抗菌药物
           yiZhuData.value.kjywFlag = res.data.kjywFlag
-          if (yiZhuData.value.kjywFlag === 1) {
-            tiShiBiaoTi.value.push({title: '该药品为抗菌药物,请填写抗菌药物医嘱附注信息录入。', type: 'error'})
-          }
-          if (res.data.selfFlagYb === 1) {
-            tiShiBiaoTi.value.push({title: '该药品医保自费药品,如符合条件请填写记账,不是请填写自费。'})
-          }
+          // 提示信息
+          tiShiBiaoTi.value = res.prompt
+          // 最小单位名称
           yiZhuData.value.miniUnitName = res.data.miniUnitName
+          // 加载药品计量
           yaoPinJiLiangData.value = res.yaoPingJiLiang
           // 加载 剂量单位
           if (stringNotBlank(yiZhuData.value.doseUnit)) {
@@ -482,16 +517,21 @@ const xuanZhongFeiYong = async (row) => {
           if (stringIsBlank(row.frequCode)) {
             if (stringNotBlank(res.data.frequCode)) {
               yiZhuData.value.frequCode = res.data.frequCode
+              yiZhuData.value.frequCodeName = res.data.frequCodeName
             } else {
               yiZhuData.value.frequCode = 'ONCE'
+              yiZhuData.value.frequCodeName = '一次'
             }
           }
-          // 加载给药方式
+          // 加载给药方式 如果已经有了就没事了
           if (stringIsBlank(yiZhuData.value.supplyCode)) {
             if (stringNotBlank(res.data.supplyCode)) {
               yiZhuData.value.supplyCode = res.data.supplyCode
+              yiZhuData.value.supplyCodeName = res.data.supplyCodeName
             }
           }
+
+
         })
         .catch(async () => {
           await Sleep(500)
@@ -503,8 +543,9 @@ const xuanZhongFeiYong = async (row) => {
         .then((res) => {
           yiZhuData.value.drugFlag = row.drugFlag ? row.drugFlag : row.orderType
           yiZhuData.value.frequCode = 'ONCE'
-          if (stringNotBlank(res.paiChiYiZhu)) {
-            tiShiBiaoTi.value.push({title: res.paiChiYiZhu, type: 'error'})
+          yiZhuData.value.frequCodeName = '一次'
+          if (stringNotBlank(res.prompt)) {
+            tiShiBiaoTi.value = res.prompt
           }
           if (!res.dose) {
             yiZhuData.value.dose = 1
@@ -528,6 +569,7 @@ const xuanZhongFeiYong = async (row) => {
   if (stringIsBlank(row.execUnit)) {
     if (stringNotBlank(huanZheXinXi.value.smallDept)) {
       yiZhuData.value.execUnit = huanZheXinXi.value.smallDept
+      yiZhuData.value.execUnitName = huanZheXinXi.value.smallDeptName
     }
   }
   if (stringIsBlank(row.id)) {
@@ -535,10 +577,10 @@ const xuanZhongFeiYong = async (row) => {
   }
   if (!yiZhuData.value.frequCode) {
     yiZhuData.value.frequCode = 'ONCE'
+    yiZhuData.value.frequCodeName = '一次'
   }
   try {
     pingLv.focus()
-
   } catch (e) {
     console.log(e)
   }
@@ -556,6 +598,7 @@ const yaoPinPingLvData = ref([])
 const pinLvRemoteMethod = (val) => {
   huoQuZhuYuanPinLv(val).then((res) => {
     yaoPinPingLvData.value = res
+    console.log(res)
   })
 }
 /* 选择剂量 */
@@ -576,8 +619,6 @@ const jiSuanLingLiang = (val) => {
 /* 给药方式 */
 const geiYaoFangShiData = ref([])
 const geiYaoFangShiRemoteMethod = (val) => {
-  /*如果是皮试的那么就不可以用别的给药方式*/
-  if (yiZhuData.value.psFlag) return
   huoQuGeiYaoFangShi(val).then((res) => {
     geiYaoFangShiData.value = res
   })
@@ -609,6 +650,7 @@ const metZhiXingKeShi = (val) => {
 /* 这里是添加信息 */
 const yiZhuList = ref([])
 const tianJiaYiZhuWeiYiBiaoShi = ref([])
+let errorElNotification = null
 const tianJiaYiZhu = () => {
   if (stringIsBlank(yiZhuData.value.orderCode)) {
     return ElMessage.error('请先选择数据')
@@ -628,28 +670,42 @@ const tianJiaYiZhu = () => {
     }
   }
 
-  const list = []
-  list.push(yiZhuData.value)
   let data = {
     inpatientNo: huanZheXinXi.value.inpatientNo,
     admissTimes: huanZheXinXi.value.admissTimes,
-    list: list,
+    list: [yiZhuData.value],
   }
-  shangChuanYiZhu(data)
-      .then((res) => {
-        let index = tianJiaYiZhuWeiYiBiaoShi.value.findIndex(item => item.id === yiZhuData.value.id)
-        if (index > -1) {
-          yiZhuList.value.splice(index, 1)
-          tianJiaYiZhuWeiYiBiaoShi.value.splice(index, 1)
-          ElMessage.error('重复添加,老记录已删除。')
-        }
-        tianJiaYiZhuWeiYiBiaoShi.value.push(yiZhuData.value.id)
-        yiZhuList.value.push(clone(yiZhuData.value))
-        qingKong()
-      })
-      .catch((e) => {
-        cuoWuXinXi.value = e
+  singleDataCheck(data).then((res) => {
+    if (res.warning) {
+      tiShiBiaoTi.value = res.warning
+    }
+    if (res.error) {
+      if (errorElNotification !== null) {
+        errorElNotification.close()
+      }
+      errorElNotification = ElNotification({
+        title: '错误信息提示',
+        message: res.error,
+        type: 'error',
+        duration: 0,
+        showClose: false
       })
+    } else {
+      if (errorElNotification !== null) {
+        errorElNotification.close()
+      }
+
+      let index = tianJiaYiZhuWeiYiBiaoShi.value.findIndex(item => item.id === yiZhuData.value.id)
+      if (index > -1) {
+        yiZhuList.value.splice(index, 1)
+        tianJiaYiZhuWeiYiBiaoShi.value.splice(index, 1)
+        ElMessage.error('重复添加,老记录已删除。')
+      }
+      tianJiaYiZhuWeiYiBiaoShi.value.push(yiZhuData.value.id)
+      yiZhuList.value.push(res.data)
+      qingKong()
+    }
+  })
 }
 
 /**
@@ -700,6 +756,18 @@ const baoCunYiZhuClick = () => {
   if (listIsBlank(yiZhuList.value)) {
     return ElMessage.error('请先选择数据')
   }
+  let data = {
+    inpatientNo: '0409327',
+    admissTimes: 1,
+    list: yiZhuList.value,
+  }
+  saveTheDoctorSOrder(data).then((res) => {
+    console.log(res)
+  })
+  console.log(data)
+
+  return
+
   if (youWuXuanZheHuanZhe()) return
   let yiBaoBianMaTiShi = []
   yiZhuList.value.forEach((item) => {
@@ -726,7 +794,6 @@ const baoCunYiZhuClick = () => {
 
 function baoCunYiZhu() {
   let list = yiZhuList.value.filter((item) => {
-
     return item.serial !== '00'
   })
   let data = {
@@ -1074,6 +1141,33 @@ let shortcutKeyRegistration = {
   },
 }
 
+// 回车按下 跳转到下一个 input
+let inputList = [
+  'frequCode', 'dose', 'doseUnit', 'supplyCode',
+  'startTime', 'endTime', 'execUnit', 'parentNo', 'instruction',
+  'kfFlag', 'selfBuy', 'ybSelfFlag', 'emergencyFlag', 'zkObj',
+  'yyfs', 'ssqk', 'yysj'
+]
+const enterToJumpInput = async (val) => {
+  let index = -1
+  for (let i = 0; i < inputList.length; i++) {
+    let item = inputList[i]
+    if (val === item) {
+      index = i + 1
+    }
+    if (index === i) {
+      let id = 'yz_' + item
+      const el = document.getElementById(id)
+      await sleep(200)
+      el.focus()
+    }
+
+  }
+
+  // el.focus()
+  // console.log(el)
+}
+
 onMounted(() => {
   xcHotKey(shortcutKeyRegistration)
   yiZhuList.value = clone(fuZhiYiZhu.value)
@@ -1094,14 +1188,118 @@ onMounted(() => {
       {
         value: huanZheXinXi.value.smallDept,
         label: huanZheXinXi.value.smallDeptName,
+        code: huanZheXinXi.value.smallDept,
+        name: huanZheXinXi.value.smallDeptName,
       },
     ]
   }
   fuZhiYiZhu.value = []
+  yiZhuList.value = [
+    {
+      "actOrderNo": 14796,
+      "orderCode": "01212",
+      "frequCode": "ONCE",
+      "frequCodeName": "一次",
+      "drugFlag": "i",
+      "supplyCode": null,
+      "supplyCodeName": null,
+      "drugQuan": 1,
+      "instruction": " ",
+      "drugSpecification": "5% 500ml /袋",
+      "miniUnit": "14",
+      "miniUnitName": "袋",
+      "selfBuy": "0",
+      "drugVolume": 500,
+      "drugVolUnit": "06",
+      "dose": 500,
+      "doseUnit": "06",
+      "doseUnitName": "ml",
+      "orderName": "5%葡萄糖注射液(湖南科伦)",
+      "discription": "70.00元 次(自费项目)",
+      "delFlag": "0",
+      "serial": "01",
+      "execUnit": "8000007",
+      "execUnitName": "七病室",
+      "newActOrderNo": 0,
+      "currentPage": 0,
+      "pageSize": 0,
+      "total": 0,
+      "isChildren": false,
+      "id": "14796",
+      "drugFlagName": "大输液",
+      "actOrderNoStr": "14796",
+      "selfBuyName": "未知",
+      "startTime": "2022-10-13 10:41:11",
+      "orderTime": "2022-10-13 10:41:11",
+      "tableIndex": 0
+    },
+    {
+      "actOrderNo": 14798,
+      "orderCode": "01192",
+      "frequCode": "QD",
+      "frequCodeName": "一次/日",
+      "drugFlag": "i",
+      "supplyCode": "025",
+      "supplyCodeName": "接瓶续滴",
+      "drugQuan": 1,
+      "drugSpecification": "0.9% 100ml /袋",
+      "miniUnit": "14",
+      "miniUnitName": "袋",
+      "drugWeightUnit": " ",
+      "selfBuy": "0",
+      "drugVolume": 100,
+      "drugVolUnit": "06",
+      "dose": 100,
+      "doseUnit": "06",
+      "doseUnitName": "ml",
+      "orderName": "氯化钠注射液(湖南科伦)",
+      "discription": "400.00元 每个部位(自费项目)",
+      "delFlag": "0",
+      "serial": "01",
+      "execUnit": "8000007",
+      "execUnitName": "七病室",
+      "newActOrderNo": 0,
+      "currentPage": 0,
+      "pageSize": 0,
+      "total": 0,
+      "isChildren": false,
+      "id": "14798",
+      "drugFlagName": "大输液",
+      "actOrderNoStr": "14798",
+      "selfBuyName": "未知",
+      "startTime": "2022-10-13 10:41:11",
+      "orderTime": "2022-10-13 10:41:11",
+      "tableIndex": 1
+    }
+  ]
 })
 </script>
 
-<style scoped>
+<style scoped lang="scss">
+
+.prompt {
+  display: flex;
+  justify-content: start;
+  background-color: #909399;
+  color: white;
+  align-items: center;
+  border-radius: 5px;
+  padding: 5px;
+  margin: 5px;
+
+  .item {
+    display: flex;
+    margin-right: 3px;
+
+    div {
+      background-color: #f56c6c;
+      border-radius: 5px;
+      padding: 3px;
+    }
+  }
+
+}
+
 .el-popover {
   height: 240px;
   overflow: auto;
@@ -1110,4 +1308,10 @@ onMounted(() => {
 :deep(.el-textarea.is-disabled .el-textarea__inner) {
   color: #0a84fd;
 }
+
+
+</style>
+
+<style lang="scss">
+
 </style>

+ 94 - 93
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YiZhuLuRu.vue

@@ -1,6 +1,6 @@
 <template>
-  <el-container>
-    <el-header style="flex-wrap: wrap;height: 60px">
+  <div>
+    <div style="width: 100%;">
       <el-date-picker
           v-model="dateRange"
           :shortcuts="shortcuts"
@@ -56,93 +56,91 @@
       <el-button type="warning" :disabled="stringIsBlank(huanZheXinXi.inpatientNo)" @click="jumpToMedicalRecord"> 病案首页
       </el-button>
       <el-button type="primary" @click="openElectronicMedicalRecord"> 电子病历</el-button>
-    </el-header>
-    <el-main>
-      <xc-table :data="yiZhuPage"
-                row-key="id"
-                @currentChange="handleCurrentChange"
-                @sizeChange="handleSizeChange"
-                :height="250"
-                @rowContextmenu="clickToViewTheDoctorSOrderFee"
-                @selectionChange="huoQuXuanZhongDeShuJu"
-                ref="tableRef">
-        <el-table-column fixed="left" type="selection"></el-table-column>
-        <el-table-column fixed="left" label="医嘱号" prop="actOrderNo"
-                         width="120" show-overflow-tooltip>
-          <template #default="scope">
-            <el-tag :type="getYiZhuFlag(scope.row.statusFlag)" effect="dark">
-              {{ scope.row.actOrderNo }}
-            </el-tag>
-            <span v-html="getFeeInfor(scope.row.actOrderNo)">
+    </div>
+
+    <xc-table :data="yiZhuPage"
+              row-key="id"
+              @currentChange="handleCurrentChange"
+              @sizeChange="handleSizeChange"
+              :height="250"
+              @rowContextmenu="clickToViewTheDoctorSOrderFee"
+              @selectionChange="huoQuXuanZhongDeShuJu"
+              ref="tableRef">
+      <el-table-column fixed="left" type="selection"></el-table-column>
+      <el-table-column fixed="left" label="医嘱号" prop="actOrderNo"
+                       width="120" show-overflow-tooltip>
+        <template #default="scope">
+          <el-tag :type="getYiZhuFlag(scope.row.statusFlag)" effect="dark">
+            {{ scope.row.actOrderNo }}
+          </el-tag>
+          <span v-html="getFeeInfor(scope.row.actOrderNo)">
                         </span>
-          </template>
-        </el-table-column>
-        <el-table-column fixed="left" width="20">
-          <template #default="scope">
-            {{ scope.row.orderGroup }}
-          </template>
-        </el-table-column>
-        <el-table-column fixed="left" label="医嘱名称" show-overflow-tooltip width="135">
-          <template #default="scope">
-            {{ scope.row.orderName }}
-          </template>
-        </el-table-column>
-        <el-table-column label="剂量" prop="doseUnitName">
-          <template #default="scope">
-            <span>{{ scope.row.dose }} {{ scope.row.doseUnitName }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="频率" prop="frequCodeName"></el-table-column>
-        <el-table-column label="给药方式" prop="supplyCodeName" show-overflow-tooltip></el-table-column>
-        <el-table-column label="医嘱时间" prop="orderTime" show-overflow-tooltip></el-table-column>
-        <el-table-column label="开始时间" prop="startTime" show-overflow-tooltip></el-table-column>
-        <el-table-column label="录入人" prop="physicianName"></el-table-column>
-        <el-table-column label="确认时间" prop="confirmTime" show-overflow-tooltip></el-table-column>
-        <el-table-column label="确认人" prop="signerName"></el-table-column>
-        <el-table-column label="结束时间" prop="endTime" show-overflow-tooltip></el-table-column>
-        <el-table-column label="停止人" prop="modifierName" show-overflow-tooltip></el-table-column>
-        <el-table-column label="紧急" prop="emergencyFlag">
-          <template #default="scope">
-            <span v-if="scope.row.emergencyFlag === '1'">是</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="医保自费" prop="ybSelfFlag">
-          <template #default="scope">
-            <span v-if="scope.row.ybSelfFlag === '1'">是</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="医生" prop="physicianName"></el-table-column>
-        <el-table-column label="费用标志" prop="selfBuyName"></el-table-column>
-        <el-table-column label="执行科室" prop="execUnitName"></el-table-column>
-        <el-table-column label="领量" prop="drugQuanName">
-          <template #default="scope">
-            <span>{{ scope.row.drugQuan }} {{ scope.row.drugQuanName }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="类别" prop="drugFlagName">
-          <template #default="scope">
-            <span>{{ scope.row.drugFlag }} {{ scope.row.drugFlagName }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="药房" prop="groupNoName"></el-table-column>
-        <el-table-column label="序号" prop="serialName"></el-table-column>
-        <el-table-column fixed="right" width="220">
-          <template #header>
-            <el-button size="small" @click="clearSelection" type="warning">清空选择</el-button>
-          </template>
-          <template #default="scope">
-            <el-button text :disabled="scope.row.statusFlag === '5'"
-                       @click.stop="dianJiYiZhuChaoZuo(scope.row, 1,'无')">
-              <span v-if="scope.row.emergencyFlag === '1'">取消</span>
-              <span v-else>紧急</span>
-            </el-button>
-            <el-button text @click.stop="dianJiYiZhuChaoZuo(scope.row, 2, '撤销医嘱')" type="warning"> 撤销</el-button>
-            <el-button text @click.stop="dianJiYiZhuChaoZuo(scope.row, 3, '停止医嘱')" type="danger"> 停止</el-button>
-          </template>
-        </el-table-column>
-      </xc-table>
-    </el-main>
-
+        </template>
+      </el-table-column>
+      <el-table-column fixed="left" width="20">
+        <template #default="scope">
+          {{ scope.row.orderGroup }}
+        </template>
+      </el-table-column>
+      <el-table-column fixed="left" label="医嘱名称" show-overflow-tooltip width="135">
+        <template #default="scope">
+          {{ scope.row.orderName }}
+        </template>
+      </el-table-column>
+      <el-table-column label="剂量" prop="doseUnitName">
+        <template #default="scope">
+          <span>{{ scope.row.dose }} {{ scope.row.doseUnitName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="频率" prop="frequCodeName"></el-table-column>
+      <el-table-column label="给药方式" prop="supplyCodeName" show-overflow-tooltip></el-table-column>
+      <el-table-column label="医嘱时间" prop="orderTime" show-overflow-tooltip></el-table-column>
+      <el-table-column label="开始时间" prop="startTime" show-overflow-tooltip></el-table-column>
+      <el-table-column label="录入人" prop="physicianName"></el-table-column>
+      <el-table-column label="确认时间" prop="confirmTime" show-overflow-tooltip></el-table-column>
+      <el-table-column label="确认人" prop="signerName"></el-table-column>
+      <el-table-column label="结束时间" prop="endTime" show-overflow-tooltip></el-table-column>
+      <el-table-column label="停止人" prop="modifierName" show-overflow-tooltip></el-table-column>
+      <el-table-column label="紧急" prop="emergencyFlag">
+        <template #default="scope">
+          <span v-if="scope.row.emergencyFlag === '1'">是</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="医保自费" prop="ybSelfFlag">
+        <template #default="scope">
+          <span v-if="scope.row.ybSelfFlag === '1'">是</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="医生" prop="physicianName"></el-table-column>
+      <el-table-column label="费用标志" prop="selfBuyName"></el-table-column>
+      <el-table-column label="执行科室" prop="execUnitName"></el-table-column>
+      <el-table-column label="领量" prop="drugQuanName">
+        <template #default="scope">
+          <span>{{ scope.row.drugQuan }} {{ scope.row.drugQuanName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="类别" prop="drugFlagName">
+        <template #default="scope">
+          <span>{{ scope.row.drugFlag }} {{ scope.row.drugFlagName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="药房" prop="groupNoName"></el-table-column>
+      <el-table-column label="序号" prop="serialName"></el-table-column>
+      <el-table-column fixed="right" width="220">
+        <template #header>
+          <el-button size="small" @click="clearSelection" type="warning">清空选择</el-button>
+        </template>
+        <template #default="scope">
+          <el-button text :disabled="scope.row.statusFlag === '5'"
+                     @click.stop="dianJiYiZhuChaoZuo(scope.row, 1,'无')">
+            <span v-if="scope.row.emergencyFlag === '1'">取消</span>
+            <span v-else>紧急</span>
+          </el-button>
+          <el-button text @click.stop="dianJiYiZhuChaoZuo(scope.row, 2, '撤销医嘱')" type="warning"> 撤销</el-button>
+          <el-button text @click.stop="dianJiYiZhuChaoZuo(scope.row, 3, '停止医嘱')" type="danger"> 停止</el-button>
+        </template>
+      </el-table-column>
+    </xc-table>
 
     <el-dialog v-model="yiZhuChaoZuoDialog" :close-on-click-modal="false" :close-on-press-escape="false"
                :show-close="false" :title="yiZhuChaoZuoBiaoTi" top="25%" width="30%">
@@ -166,7 +164,10 @@
                         v-if="chargeDetails.dialog"
                         :sum="chargeDetails.sum"
                         @close="chargeDetails.dialog = false"/>
-  </el-container>
+
+  </div>
+
+
 </template>
 
 <script name="YiZhuLuRuZhuJian" setup>
@@ -429,7 +430,6 @@ const getFeeInfor = (actOrderNo) => {
     } else {
       problem = '有' + problem
     }
-
     return `<br>金额:${doctorSOrderFee.totalCost[actOrderNo].sum} 元,
     ${doctorSOrderFee.totalCost[actOrderNo].amount}条,
     <br/>${problem}`
@@ -440,7 +440,7 @@ const getFeeInfor = (actOrderNo) => {
 
 onMounted(async () => {
   await sleep(200)
-  // addYiZhuClick()
+  addYiZhuClick()
   zkList.value = await getTheTransferList()
 })
 
@@ -449,7 +449,6 @@ watch(
     () => huanZheXinXi.value,
     () => {
       expensesForGettingADoctorSOrder(huanZheXinXi.value.inpatientNo, huanZheXinXi.value.admissTimes).then((res) => {
-        // console.log(res)
         doctorSOrderFee = res
       })
 
@@ -514,7 +513,9 @@ const jumpToMedicalRecord = () => {
 }
 </script>
 
-<style scoped>
+<style scoped lang="scss">
+
+
 :deep(.el-table .children-row) {
   background: rgba(145, 247, 145, 0.93);
 }

+ 0 - 1
src/views/settings/Test.vue

@@ -46,7 +46,6 @@ const 填充数据 = () => {
     name: 'name ' + i,
   }))
 }
-填充数据()
 
 </script>