Browse Source

优化项目

DESKTOP-0GD05B0\Administrator 2 years ago
parent
commit
eea99f614e

+ 5 - 0
src/components/xiao-chan/combo-grid/XcComboGrid.vue

@@ -12,6 +12,7 @@
             v-model="inputData"
             @focus="inputFocus"
             @click="clickInput"
+            :disabled="props.disabled"
             @blur="inputBlur"
             @keydown.esc="tableConfig.isShow = false"
             @keydown.enter.prevent="keyEnter"
@@ -90,6 +91,10 @@ const props = defineProps({
   placeholder: {
     type: String,
     default: '搜索(拼音、五笔、编码、名称)'
+  },
+  disabled: {
+    type: Boolean,
+    default: false
   }
 })
 

+ 10 - 1
src/components/xiao-chan/select-v3/XcSelectV3.vue

@@ -7,7 +7,9 @@
        @keydown.up.stop.prevent="onKeyboardNavigate('up')"
        @keydown.down.stop.prevent="onKeyboardNavigate('down')"
        @mouseout="mouseOverDiv = false">
-    <div class="box" @click="boxClick">
+    <div class="box"
+         :class="props.disabled ? 'is-disabled' : '' "
+         @click="boxClick">
       <input type="text"
              @focus="getfocus"
              autocomplete="new-pwd"
@@ -467,6 +469,13 @@ onMounted(() => {
   border-radius: 4px;
   background-color: white;
 
+  .is-disabled {
+    cursor: not-allowed;
+    background-color: #f5f7fa;
+    border: 1px solid #e4e7ed;
+    color: #a8abb2;
+  }
+
   .box {
     padding: 0 5px;
     display: flex;

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

@@ -20,6 +20,7 @@
           <xc-combo-grid
               style="width: 240px"
               ref="searchRef"
+              :disabled="isEdit"
               v-model="yiZhuData.orderName"
               :table-header="tableHeader"
               :query-data-func="huoQuXiangMu"
@@ -54,6 +55,7 @@
           一次剂量:
           <el-input-number v-model="yiZhuData.dose"
                            :min="0"
+                           :controls="false"
                            ref="doseRef"
                            id="yz_dose"
                            :precision="dosePrecision()"
@@ -70,8 +72,17 @@
         </div>
         <div>
           领量:
-          {{ yiZhuData.drugQuan }}
-          {{ yiZhuData.miniUnitName }}
+          <span v-if="yiZhuData.serial === '00'">
+            <el-input-number
+                style="width: 60px"
+                v-model="yiZhuData.drugQuan"
+                :min="0"
+                :controls="false"/>
+          </span>
+          <span v-else>
+            {{ yiZhuData.drugQuan }}
+            {{ yiZhuData.miniUnitName }}
+          </span>
         </div>
       </div>
       <div class="yz_input__box">
@@ -310,9 +321,9 @@ const tiShiBiaoTi = ref([])
 
 // 搜索医嘱
 const xuanZhongFeiYong = async (row, laiyuan = 1) => {
-  if (isEdit.value) {
-    return
-  }
+  // if (isEdit.value) {
+  //   return
+  // }
   if (row.serial === '0000' && row.groupNo === '0000') {
     props.openGroupOrderTemplate(row.orderCode);
     return;
@@ -335,7 +346,6 @@ const xuanZhongFeiYong = async (row, laiyuan = 1) => {
   await Sleep(200)
   // 克隆一下数据防止有问题
   yiZhuData.value = clone(row) // clone(row)
-  console.log(row)
   if (tempOrderNo !== null) {
     yiZhuData.value.actOrderNo = tempOrderNo;
     yiZhuData.value.statusFlag = '1'
@@ -409,7 +419,7 @@ const xuanZhongFeiYong = async (row, laiyuan = 1) => {
         if (stringNotBlank(res.prompt)) {
           tiShiBiaoTi.value = res.prompt
         }
-        if (!res.dose) {
+        if (!row.dose) {
           yiZhuData.value.dose = 1
         }
         // 如果是项目就不需要给药方式
@@ -493,7 +503,9 @@ const pinLvRemoteMethod = (val) => {
 
 /*计算领量*/
 const jiSuanLingLiang = (val) => {
-  if (jiLiangValue.value <= 0) return
+  if (jiLiangValue.value <= 0) {
+    return;
+  }
   yiZhuData.value.drugQuan = Math.ceil(val / jiLiangValue.value)
 }
 /* 选择剂量 */
@@ -834,13 +846,11 @@ const dosePrecision = () => {
   if (yiZhuData.value.serial === '00') {
     return 2
   } else {
-    console.log(yiZhuData.value.doseUnitName, yiZhuData.value.miniUnitName)
     if (yiZhuData.value.doseUnitName === yiZhuData.value.miniUnitName) {
       return 0
     }
     return 3
   }
-
 }
 
 let shortcutKeyRegistration = {

+ 0 - 2
src/views/hospitalization/zhu-yuan-yi-sheng/Home.vue

@@ -160,8 +160,6 @@ onMounted(async () => {
   })
   await nextTick()
   winsize.value.main = mainRef.value.clientWidth
-  console.log(mainRef.value.clientHeight)
-  console.log(mainRef.value)
   getJyJcZdTree().then((res) => {
     jyTree.value = res.jy
     jcTree.value = res.jc