hbchen 1 vuosi sitten
vanhempi
commit
00aec3b213

+ 6 - 3
src/views/dataEntry_manage/thirdBase/components/batchAddEdbDia.vue

@@ -117,14 +117,17 @@ import { steelInterface } from "@/api/modules/thirdBaseApi";
             steelInterface.edbAdd({List:this.edbForm.edbDataList}).then(res=>{
                 if (res.Ret !== 200) return;
                 this.isAddLoading = true;
-                console.log(this.edbForm.edbDataList);
+                // console.log(this.edbForm.edbDataList);
                 let edbItem = this.edbForm.edbDataList.find(it => it.IndexCode.toUpperCase() == res.Data.IndexCode.toUpperCase())
-                if(!edbItem) return 
+                if(!edbItem){
+                  edbItem=this.edbForm.edbDataList[0]
+                }
                 let edbIndexCurrent = edbItem?edbItem.edbIndex:0
                 let selectClassifyNodes=this.$refs['classifyCascader'+edbIndexCurrent][0].getCheckedNodes()[0].path
                 this.emitParams={
                   code: res.Data.UniqueCode,
                   id: res.Data.BaseFromMysteelChemicalIndexId,
+                  indexCode:res.Data.IndexCode,
                   selectClassifyNodes
                 }
                 this.getAddBack=true
@@ -154,7 +157,7 @@ import { steelInterface } from "@/api/modules/thirdBaseApi";
       cancelHandle() {
         this.isAddLoading = false;
         this.edbForm={edbDataList:[{edbIndex:1,IndexCode:'',BaseFromMysteelChemicalClassifyId:''}]}
-        this.$refs.edbFormDataListRef.resetFields();
+        this.$refs.edbFormDataListRef && this.$refs.edbFormDataListRef.resetFields();
         this.$emit("update:isOpenDialog", false);
         if(this.getAddBack){
           this.$emit("successCallback", this.emitParams);

+ 3 - 2
src/views/dataEntry_manage/thirdBase/steelChemicalbase.vue

@@ -660,8 +660,9 @@ export default {
     },
 
     /* 添加后回调 */
-    addSuccessCallback({ code, id,selectClassifyNodes}) {
-      this.getClassify({ code, id,selectClassifyNodes});
+    addSuccessCallback({ code, id,selectClassifyNodes,indexCode }) {
+      indexCode && (this.index_code = indexCode)
+      this.getClassify({ code, id,selectClassifyNodes });
     },
 
     // 对[# ;]转义