Browse Source

项目两位小数点,药品三位小数点。

DESKTOP-0GD05B0\Administrator 2 years ago
parent
commit
9f1992d36a
1 changed files with 19 additions and 3 deletions
  1. 19 3
      src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-edit/YzEditor.vue

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

@@ -56,7 +56,7 @@
                            :min="0"
                            ref="doseRef"
                            id="yz_dose"
-                           :precision="yiZhuData.doseUnitName === yiZhuData.miniUnitName ? 0 : 2"
+                           :precision="dosePrecision()"
                            style="width: 110px"
                            @change="jiSuanLingLiang"/>
           <XcSelect v-model="yiZhuData"
@@ -310,10 +310,13 @@ const tiShiBiaoTi = ref([])
 
 // 搜索医嘱
 const xuanZhongFeiYong = async (row, laiyuan = 1) => {
-  if (row.serial === '0000' && row.groupNo === '0000') {
-    props.openGroupOrderTemplate(row.orderCode)
+  if (isEdit.value) {
     return
   }
+  if (row.serial === '0000' && row.groupNo === '0000') {
+    props.openGroupOrderTemplate(row.orderCode);
+    return;
+  }
   if (row.serial === '00' && isCydy()) {
     qingKong()
     return BizException(ExceptionEnum.LOGICAL_ERROR, '出院带药不能开项目')
@@ -827,6 +830,19 @@ const openSearch = () => {
   searchRef.value.focus()
 }
 
+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 = {
   ctrl: {s: toAddAnOrder, f: openSearch},
   alt: {a: addOrderNo}