Переглянути джерело

平衡表、混合表另存为修改

jwyu 5 місяців тому
батько
коміт
82c7db0d61

+ 2 - 8
src/views/datasheet_manage/balanceSheetEdit.vue

@@ -220,12 +220,13 @@
           <el-form-item :label="$t('OnlineExcelPage.table_classification_label')" prop="classify">
             <el-cascader
               v-model="saveOtherForm.classify"
-              :options="classifyOptions"
+              :options="classifyArr"
               :props="{
                 label: 'ExcelClassifyName',
                 value: 'ExcelClassifyId',
                 children: 'Children',
                 emitPath: false,
+                checkStrictly: true,
               }"
               style="width: 80%"
               :placeholder="$t('OnlineExcelPage.select_appropriate_category_lable')"
@@ -276,13 +277,6 @@ export default {
     isView(){
       return this.$route.path==='/viewBalanceSheet'
     },
-    classifyOptions() {
-      let options = this.classifyArr.map((_) => ({
-        ExcelClassifyId: _.ExcelClassifyId,
-        ExcelClassifyName: _.ExcelClassifyName,
-      }));
-      return options;
-    },
     // 当前是否为静态表
     isStaticTable(){
       let flag=false

+ 8 - 7
src/views/datasheet_manage/sheetList.vue

@@ -366,6 +366,7 @@
                 value: 'ExcelClassifyId',
                 children: 'Children',
                 emitPath: false,
+                checkStrictly: true,
               }"
               style="width: 80%"
               :placeholder="$t('OnlineExcelPage.select_appropriate_category_lable')"
@@ -471,11 +472,11 @@ export default {
       return url;
     },
     classifyOptions() {
-      let options = this.treeData.map((_) => ({
-        ExcelClassifyId: _.ExcelClassifyId,
-        ExcelClassifyName: _.ExcelClassifyName,
-      }));
-      return options;
+      // let options = this.treeData.map((_) => ({
+      //   ExcelClassifyId: _.ExcelClassifyId,
+      //   ExcelClassifyName: _.ExcelClassifyName,
+      // }));
+      return this.balanceClassifyOpts;
     },
     saveOtherFormRule(){
       return {
@@ -618,7 +619,7 @@ export default {
   methods: {
     // 获取平衡表分类
     getBalanceClassifyOpts(){
-      sheetInterface.excelClassifyOne({ Source: 5 }).then(res => {
+      sheetInterface.excelClassifyOne({ Source: this.sourceMap[this.$route.path] }).then(res => {
         if (res.Ret !== 200) return
 
         this.balanceClassifyOpts = res.Data.AllNodes || [];
@@ -700,7 +701,7 @@ export default {
         });
       });
       // 更新一下分类把 新增平衡表时要
-      if(this.sourceMap[this.$route.path]===5){
+      if([3,5].includes(this.sourceMap[this.$route.path])){
         this.getBalanceClassifyOpts()
       }
     },