Qukatie před 1 rokem
rodič
revize
14895857d9

+ 8 - 0
src/api/iosBasicData/accountsDetails.js

@@ -21,6 +21,14 @@ export const getTreelist= (data) => {
     data:data
   })
 }
+export const initialization = (data) => {
+  return request({
+    url: '/api/blade-los/fingenlegcalc/initialization',
+    method: 'get',
+    params:data
+  })
+}
+
 export const accountsDetailsList = (current, size, params) => {
   return request({
     url: '/api/blade-los/accounts/accountsDetailsList',

+ 7 - 1
src/api/iosBasicData/fingenlegcalc.js

@@ -21,7 +21,13 @@ export const getTreelist= (data) => {
     data:data
   })
 }
-
+export const initialization = (data) => {
+  return request({
+    url: '/api/blade-los/fingenlegcalc/initialization',
+    method: 'get',
+    params:data
+  })
+}
 export const fingenlegcalcList = (current, size, params) => {
   return request({
     url: '/api/blade-los/fingenlegcalc/list',

+ 22 - 11
src/views/iosBasicData/accountsDetails/index.vue

@@ -4,11 +4,12 @@
       <avue-form :option="optionForm" v-model="query" class="form-mb">
         <tempalte slot="button" slot-scope="{ row }">
           <span style="display: flex;justify-content: end;">
-            <el-button icon="el-icon-arrow-down" size="small" @click="searchShow = true,showHight()" v-if="!searchShow">展
+            <el-button icon="el-icon-arrow-down" size="small" @click="searchShow = true, showHight()" v-if="!searchShow">展
               开</el-button>
-            <el-button icon="el-icon-arrow-up" size="small" @click="searchShow = false,showHight()" v-if="searchShow">收 缩</el-button>
-            <el-button type="primary" size="small" plain @click="inItial">初始入账
-            </el-button>
+            <el-button icon="el-icon-arrow-up" size="small" @click="searchShow = false, showHight()" v-if="searchShow">收
+              缩</el-button>
+            <!-- <el-button type="primary" size="small" plain @click="inItial">初始入账
+            </el-button> -->
             <el-button type="success" size="small" plain @click="outExport">导出
             </el-button>
           </span>
@@ -60,7 +61,7 @@ import {
   getList,
   getAllList,
   getTreelist,
-  fingenlegInitialization
+  initialization
 } from "@/api/iosBasicData/accountsDetails";
 import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
 import { dateFormat } from "@/util/date";
@@ -475,17 +476,27 @@ export default {
     },
     //初始入账
     inItial() {
+      const loading = this.$loading({
+        lock: true,
+        text: '加载中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(255,255,255,0.7)'
+      });
       this.$confirm('是否继续初始入账?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        fingenlegInitialization()
-        // this.$message({
-        //   type: 'success',
-        //   message: '初始入账成功!'
-        // });
-      })
+        initialization().then(res => {
+          this.$message({
+            type: 'success',
+            message: '初始入账成功!'
+          });
+          this.getTreelist()
+        })
+      }).finally(() => {
+        loading.close();
+      });
 
     },
     //重置特殊值

+ 16 - 5
src/views/iosBasicData/fingenleg/index.vue

@@ -350,11 +350,22 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        fingenlegInitialization()
-        // this.$message({
-        //   type: 'success',
-        //   message: '初始入账成功!'
-        // });
+        const loading = this.$loading({
+          lock: true,
+          text: '加载中',
+          spinner: 'el-icon-loading',
+          background: 'rgba(255,255,255,0.7)'
+        });
+        fingenlegInitialization().then(res => {
+          this.$message({
+            type: 'success',
+            message: '初始入账成功!'
+          });
+          this.getTreelist()
+        }).finally(() => {
+          loading.close();
+        });
+
       })
 
     },

+ 17 - 7
src/views/iosBasicData/fingenlegcalc/index.vue

@@ -32,7 +32,7 @@
         </span>
       </div>
     </basic-container>
-    <basic-container v-show="treeData.length > 0"  >
+    <basic-container v-show="treeData.length > 0">
       <el-row>
         <el-col :span="4">
           <avue-tree ref="tree" :class="searchShow ? 'treeStyle' : 'bigTreeStyle'" :option="treeOption" :data="treeData"
@@ -54,7 +54,7 @@ import {
   getList,
   getAllList,
   getTreelist,
-  fingenlegInitialization
+  initialization
 } from "@/api/iosBasicData/fingenlegcalc";
 import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
 import { dateFormat } from "@/util/date";
@@ -450,11 +450,21 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        fingenlegInitialization()
-        // this.$message({
-        //   type: 'success',
-        //   message: '初始入账成功!'
-        // });
+        const loading = this.$loading({
+          lock: true,
+          text: '加载中',
+          spinner: 'el-icon-loading',
+          background: 'rgba(255,255,255,0.7)'
+        });
+        initialization().then(res => {
+          this.$message({
+            type: 'success',
+            message: '初始入账成功!'
+          });
+          this.getTreelist()
+        }).finally(() => {
+          loading.close();
+        });
       })
 
     },