Q-ABAB 1 ano atrás
pai
commit
7b71e3a103

+ 6 - 6
src/router/index.js

@@ -199,13 +199,13 @@ const routes = [{
 
             // },
             
-            // { //项目资金管理
-            //     name: 'ProjectManagementFund1',
-            //     path: '/ProjectManagementFund1',
-            //     component: () =>import ('@/views/projectManage/ProjectManagementFund1.vue'),
-            //     meta: { isAuth: true }
+            { //项目资金管理
+                name: 'ProjectManagementFund1',
+                path: '/ProjectManagementFund1',
+                component: () =>import ('@/views/projectManage/ProjectManagementFund1.vue'),
+                meta: { isAuth: true }
 
-            // },
+            },
             { //项目资金管理
                 name: 'ProjectManagementFund2',
                 path: '/ProjectManagementFund2',

+ 2 - 2
src/views/projectManage/ProjectManagement.vue

@@ -342,8 +342,8 @@ import { getNowDate } from '@/components/tool/Date';
           this.$router.push(`/ProjectManagementMain?Id=${tid}&pid=${val}`)
         },
         fundStatus(Id){     //资金情况
-          localStorage.setItem('pid',JSON.stringify(Id))
-          this.$router.push(`/ProjectManagementFund1`)
+          // localStorage.setItem('pid',JSON.stringify(Id))
+          this.$router.push(`/ProjectManagementFund1?pid=${Id}`)
         },
         init(){       //对话框重置
           this.endDialog=false;

+ 15 - 22
src/views/projectManage/ProjectManagementFund1.vue

@@ -199,9 +199,9 @@
         return {
           dialogVisible1:false,
           fundDetail:false,
-          allFund:'',  //总经费
+          allFund:0,  //总经费
           useFund:0,   //已使用
-          remainFund:'',  //剩余多少钱
+          remainFund:0,  //剩余多少钱
           tableData:[],  //经费月支出经费计划
           tableData2:[],  //经费明细
           textarea:'',
@@ -215,39 +215,32 @@
           this.loading = true;
             let param={
               uid:this.$store.state.userInfo.userid,
-              pid:JSON.parse(localStorage.getItem('pid'))
+              pid:this.$route.query['pid']
             }
               this.ajax
                     .get(this.$store.state.api+'/GetProjectDetailMessage',param)
                     .then(res=>{
-                      console.log(res.data);
-
-                      // let GetData=JSON.parse(res.data[0][0])
-                      // console.log(GetData);
-                      // // this.data=GetData
-                      // this.tableData=[GetData[1][0]]
-                      // this.tableData2=GetData[1][1]
-                      // // console.log(this.tableData2);
-                      // this.tableData2.forEach((e)=>{
-                      //   this.useFund=this.useFund+e.fund
-                      // })
-                      // this.allFund=res.data[0][0].money
-                      // this.useFund=this.useFund / 10000
-                      // this.remainFund=this.allFund - this.useFund
-                      // console.log((this.useFund / 10000));
-                      // console.log();
+                      let data = res.data[0][0]
+                      let fund = JSON.parse(data['money'])
+                      this.tableData = fund['tableData']
+                      this.tableData2 = fund['tableData2']
+                      this.allFund = data['fund']
+                      this.tableData2.forEach((e)=>{
+                        this.useFund=this.useFund+e.fund
+                      })
+                      this.useFund=this.useFund / 10000
+                      this.remainFund=this.allFund - this.useFund
                       this.loading = false;
                     },err=>{
                       console.log(err);
                     })
           },
         content(){
-          this.$router.push('/ProjectManagementFund1')
+          this.$router.push(`/ProjectManagementFund1?pid=${this.$route.query['pid']}`)
         },
         remark(){
-          this.$router.push('/ProjectManagementFund2')
+          this.$router.push(`/ProjectManagementFund2?pid=${this.$route.query['pid']}`)
         },
-      
         back(){
           this.$router.push('/ProjectManagement')
         }

+ 3 - 3
src/views/projectManage/ProjectManagementFund2.vue

@@ -86,16 +86,16 @@
         },
         methods:{
           content(){
-            this.$router.push('/ProjectManagementFund1')
+            this.$router.push(`/ProjectManagementFund1?pid=${this.$route.query['pid']}`)
           },
           remark(){
-            this.$router.push('/ProjectManagementFund2')
+            this.$router.push(`/ProjectManagementFund2?pid=${this.$route.query['pid']}`)
           },
           getData(){
             this.loading = true;
             let param={
               uid:this.$store.state.userInfo.userid,
-              cid:JSON.parse(localStorage.getItem('pid'))
+              cid:this.$route.query['pid']
             }
             // console.log(param);
             // return