From 95b219ec596a10c2a98b485c0977f0c58257a8f4 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期四, 13 七月 2023 18:17:50 +0800
Subject: [PATCH] 主数据联调

---
 Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue |   60 ++++++++++++++++++++++++++----------------------------------
 1 files changed, 26 insertions(+), 34 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue b/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
index 236d931..2d6fc7b 100644
--- a/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
+++ b/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
@@ -237,7 +237,7 @@
           },
           {
             label:"缂栫爜瑙勫垯",
-            prop:"coderuleoidName",
+            prop:"codeRuleOidName",
             labelWidth:128,
             disabled: true,
           },
@@ -307,7 +307,7 @@
             },
             {
               label:"缂栫爜瑙勫垯",
-              prop:"coderuleoidName",
+              prop:"codeRuleOidName",
               labelWidth:128,
               focus:this.CodeFoucus,
               readonly: true,
@@ -333,36 +333,33 @@
     }
   },
   watch:{
-    nodeClickList:{
-      handler(newval,oldval){
-        console.log('newVal',newval,oldval)
-      },
-      deep:true,
-      immediate:true
-    },
-    TreeFlag:{
-      handler(newval,oldval){
-        console.log('鏍戠姸鎬�',newval,oldval)
-      },
-      deep:true,
-      immediate:true
-    }
   },
   created() {
   },
   methods: {
     submits(form,done){
-      TreeEditSave(this.loneTreeNewForm).then(res=>{
-        this.$message.success('淇敼鎴愬姛');
-        this.Editclose()
-        this.$emit('referTreeForm');
-        this.$emit('flushed');
-        done()
-      })
+      if(this.TreeFlag){
+        TreeEditSave(this.loneTreeNewForm).then(res=>{
+          this.$message.success('淇敼鎴愬姛');
+          this.Editclose()
+          this.$emit('referTreeForm');
+          this.$emit('flushed');
+          done()
+        })
+      }else {
+        this.loneTreeNewForm.btmTypeName='';
+        this.loneTreeNewForm.btmTypeId='';
+        TreeEditSave(this.loneTreeNewForm).then(res=>{
+          this.$message.success('淇敼鎴愬姛');
+          this.Editclose()
+          this.$emit('referTreeForm');
+          this.$emit('flushed');
+          done()
+        })
+      }
     },
     error(err) {
-      this.$message.success('璇锋煡鐪嬫帶鍒跺彴');
-      console.log(err)
+      this.$message.success(err);
     },
     //缂栫爜瑙勫垯鏌ヨ
     SelectFindeHandler(){
@@ -396,10 +393,9 @@
       }else {
         this.MasterdialogVisible=false;
         this.masterSelectList=[]
-        this.$set(this.loneTreeNewForm,'coderuleoidName',this.masterName)
-        this.$set(this.loneTreeNewForm,'coderuleoid',this.masterOid)
+        this.$set(this.loneTreeNewForm,'codeRuleOidName',this.masterName)
+        this.$set(this.loneTreeNewForm,'codeRuleOid',this.masterOid)
         this.$emit('MasterHandler',this.loneTreeNewForm)
-        // console.log(this.loneTreeNewForm)
       }
     },
     //缂栫爜澶氶��
@@ -407,7 +403,6 @@
       this.masterSelectList=row;
       this.masterName=row[0].name;
       this.masterOid=row[0].oid;
-      // console.log('oid',this.oid)
     },
     //缂栫爜鎺ュ彛
     MasterdefaultRend(masterParameter){
@@ -437,7 +432,6 @@
         this.$set(this.loneTreeNewForm,'codekeyattrrepeatoidName',this.KeyName)
         this.$set(this.loneTreeNewForm,'codekeyattrrepeatoid',this.KeyOid)
         this.$emit('MasterHandler',this.loneTreeNewForm)
-        console.log(this.loneTreeNewForm)
       }
     },
     //鍏抽敭灞炴�ф煡璇�
@@ -454,8 +448,8 @@
           'conditionMap[name]':this.SelectFInd
         }
         this.KeydefaultRend(masterParameter)
-        this.SelectValue=""
-        this.SelectFInd=""
+        this.SelectValue="";
+        this.SelectFInd="";
       }
     },
     //鍏抽敭灞炴�ф帴鍙�
@@ -516,7 +510,6 @@
       this.simSelectList=row;
       this.simName=row[0].name;
       this.simOid=row[0].oid;
-      console.log('oid',this.oid)
     },
     //鐩镐技椤归」鎺ュ彛
     simdefaultRend(){
@@ -574,7 +567,6 @@
     //涓氬姟绫诲瀷鎺ュ彛
     btmdefaultRend(masterParameter){
       referDataGrid({valueField:'id',isMuti:'false',...masterParameter}).then(res=>{
-        // console.log(res)
         this.BtmData=res.data.data.records
       })
     }

--
Gitblit v1.9.3