Explorar el Código

changeAndJoin 逻辑判断库存字段 kc 不足显示红色

cc12458 hace 1 año
padre
commit
a611770c75
Se han modificado 2 ficheros con 6 adiciones y 2 borrados
  1. 1 1
      src/components/ChineseMedicine.vue
  2. 5 1
      src/views/diagnosis/Prescribing.vue

+ 1 - 1
src/components/ChineseMedicine.vue

@@ -2488,7 +2488,7 @@ export default {
                   };
                   /* 修正 */ item1.usage = item1.useage = getUsage(item1.usage);
 
-                  item1.color = "#000";
+                  item1.color = item.kc > 0 ? "#000" : 'red';
                 }
 
                 this.$set(

+ 5 - 1
src/views/diagnosis/Prescribing.vue

@@ -4089,7 +4089,11 @@ export default {
               }
 
               if (item instanceof Object && item.oldYpid == item1.matid) {
-                hasDrugs.push(item);
+                if (item.kc > 0) hasDrugs.push(item);
+                else {
+                  item.color = 'red';
+                  noDrugs.push(item);
+                }
               }
             });
           });