wyq 3 rokov pred
rodič
commit
5895c64bfc
1 zmenil súbory, kde vykonal 15 pridanie a 3 odobranie
  1. 15 3
      src/components/common/LtModal.vue

+ 15 - 3
src/components/common/LtModal.vue

@@ -83,6 +83,7 @@
                         :label="searchType == 2 ? `${item.uniqueName}(${item.name})` : item.name"
                         :value="searchType == 2 ? `${item.uniqueName}` : item"
                         :title="searchType == 2 ? `${item.uniqueName}(${item.name})` : item.name"
+                        @click.native="handleChoose(searchType == 2 ? `${item.uniqueName}` : item.name)"
                       ></el-option>
                     </el-select>
                   </el-form-item>
@@ -247,6 +248,13 @@ export default {
       row.index = rowIndex;
     },
     btn(row) {
+      const { hisName, hisDetailName } = this.form;
+      if (hisName !== '' && hisDetailName === '') {
+        this.ty = 1;
+      }else if(hisName !== '' && hisDetailName !== ''){
+        this.ty = 2;
+      }
+      this.searchType = this.ty;
       if (this.getIndex == row.index) {
         this.getIndex = 6;
         this.form.searchText = '';
@@ -261,6 +269,10 @@ export default {
         this.form.source = row.source;
       }
     },
+    handleChoose(val) {
+      this.form.searchTextPre = val;
+      this.form.searchText = val;
+    },
     // 搜索列表
     searchTerms(query) {
       if (!query) {
@@ -363,7 +375,6 @@ export default {
         type: type ? type : this.type,
         inputStr: name ? name :this.form.hisName
       };
-      console.log(params)
       api.getTermMatching(params).then(res => {
         this.showDrop = false;
         if (res.data.code === '0') {
@@ -387,6 +398,7 @@ export default {
             hisCode
           } = this.form;
           // 当标准术语是套餐时,细项必须为空
+          console.log(this.searchType)
           if (this.searchType === 1 && hisDetailName !== '') {
             this.warning('医院术语与标准术语类型不匹配,请修改');
             return;
@@ -412,7 +424,7 @@ export default {
             hisCode: hisCode,
             source: source ? source : 1
           };
-          this.showSaveDialog(params);
+          // this.showSaveDialog(params);
         } else {
           console.log('error submit!!');
           return false;
@@ -642,7 +654,7 @@ export default {
 .rightBox {
   width: 380px;
   float: left;
-  min-height: 248px;
+  height: 248px;
   font-size: 14px;
 }
 .midBox {