Przeglądaj źródła

Merge branch 'dragTerm1025' into test

1178232204@qq.com 3 lat temu
rodzic
commit
819b0cf60c
1 zmienionych plików z 10 dodań i 2 usunięć
  1. 10 2
      src/components/knowledgeExtra/AddNewRule.vue

+ 10 - 2
src/components/knowledgeExtra/AddNewRule.vue

@@ -662,6 +662,7 @@ export default {
       let dragType = false;
       let dragType = false;
       let isDel = false;
       let isDel = false;
       let screenArr;
       let screenArr;
+      let type
       //药品开单合理判断
       //药品开单合理判断
       if (dragDel.length > 0) {
       if (dragDel.length > 0) {
         dragType = true;
         dragType = true;
@@ -669,7 +670,12 @@ export default {
         const arr = this.form.klRuleByIdSub.filter((item, i) => {
         const arr = this.form.klRuleByIdSub.filter((item, i) => {
           return item.groupId == groupId;
           return item.groupId == groupId;
         });
         });
-        if (this.dragArr && arr.length == 3 && key != 0) {
+        if (key == 1 && arr[2]) {
+          type = arr[2].subLenCode == "" ? false : true;
+        } else if (key == 2) {
+          type = arr[1].subLenCode == "" ? false : true;
+        }
+        if (this.dragArr && arr.length == 3 && key != 0 && type) {
           //获取互斥项code
           //获取互斥项code
           const list = obj.subMenuList.filter((it) => {
           const list = obj.subMenuList.filter((it) => {
             return it.code == this.dragVal && it.remark.split("|")[0] == 3;
             return it.code == this.dragVal && it.remark.split("|")[0] == 3;
@@ -816,7 +822,9 @@ export default {
             this.dragVal = len[1].subLenCode;
             this.dragVal = len[1].subLenCode;
             const subobj = this.baseTypeList.find((it) => it.type == 1);
             const subobj = this.baseTypeList.find((it) => it.type == 1);
             const list = subobj.subMenuList.filter((it) => {
             const list = subobj.subMenuList.filter((it) => {
-              return it.code == len[1].subLenCode && it.remark.split("|")[0] == 3;
+              return (
+                it.code == len[1].subLenCode && it.remark.split("|")[0] == 3
+              );
             });
             });
             // //获取互斥项code
             // //获取互斥项code
             const dragArr = list[0].remark.split("|")[1].split(",");
             const dragArr = list[0].remark.split("|")[1].split(",");