yuanyiming 1 year ago
parent
commit
672ad03fb2

+ 26 - 27
src/views/fundManage/newMarkerfundApply.vue

@@ -236,38 +236,37 @@ export default {
                 this.fundList[7].budget=data.Transaction
                 // console.log(this.fundList);
                 // return
-                this.tit=res.data[1][0].intro
-                // this.ty=res.data[0][0].type
-
-
                 this.fundList.forEach(e=>{
                     e.havePaid=0
                 })
+                // console.log(res.data[1][0]);
+                console.log(res.data[1])
 
-
-                res['data'][1].filter(e=>{
-                   if (e.actualuse==null) {
-                        e.actualuse=e.applyfund
-                   }
-                })
-                // // console.log(arr);
-
-                let arr= res['data'][1].filter(e=>{
-                    return e.actualuse!=null
-                })
-                if (arr) {
-                    arr.forEach(item=>{
-                    let JP = JSON.parse(item['actualuse']);
-                        this.fundList[0]['havePaid']+=Number(JP['device']);
-                        this.fundList[1]['havePaid']+=Number(JP['Material']);
-                        this.fundList[2]['havePaid']+=Number(JP['processing']);
-                        this.fundList[3]['havePaid']+=Number(JP['Collaboration']);
-                        this.fundList[4]['havePaid']+=Number(JP['APPRAISAL']);
-                        this.fundList[5]['havePaid']+=Number(JP['entery']);
-                        this.fundList[6]['havePaid']+=Number(JP['activities']);
-                        this.fundList[7]['havePaid']+=Number(JP['Transaction']);
+                if (!res.data[1]) {
+                    this.tit=res.data[1][0].intro
+                    res['data'][1].filter(e=>{
+                        if (e.actualuse==null) {
+                                e.actualuse=e.applyfund
+                        }
+                    })
+                    let arr= res['data'][1].filter(e=>{
+                        return e.actualuse!=null
                     })
+                    if (arr) {
+                        arr.forEach(item=>{
+                        let JP = JSON.parse(item['actualuse']);
+                            this.fundList[0]['havePaid']+=Number(JP['device']);
+                            this.fundList[1]['havePaid']+=Number(JP['Material']);
+                            this.fundList[2]['havePaid']+=Number(JP['processing']);
+                            this.fundList[3]['havePaid']+=Number(JP['Collaboration']);
+                            this.fundList[4]['havePaid']+=Number(JP['APPRAISAL']);
+                            this.fundList[5]['havePaid']+=Number(JP['entery']);
+                            this.fundList[6]['havePaid']+=Number(JP['activities']);
+                            this.fundList[7]['havePaid']+=Number(JP['Transaction']);
+                        })
+                    }
                 }
+                // this.ty=res.data[0][0].type
 
                 if (data.total!='') {   //因为创客空间有金额总和total学生和活动的没有所以要做到统一,把空间的total去掉
                     data.total=0
@@ -276,7 +275,7 @@ export default {
                 for(let k in data){
                     this.allFund+=data[k]*1
                 }
-                // console.log(this.allFund);
+                console.log(this.allFund);
             },err=>{
                 console.log(err);
             })

+ 1 - 1
src/views/projectApply/newStudentProjectApply.vue

@@ -244,7 +244,7 @@
             break;
           }
         }
-        this.wordData['total']=this.wordData.fund.facility*1 + this.wordData.fund.materials*1+this.wordData.fund.process*1+ this.wordData.fund.assist*1+this.wordData.fund.authenticate*1+ this.wordData.fund.match*1+this.wordData.fund.activity*1+this.wordData.fund.affair*1
+        this.wordData['total']=this.wordData.fund.device*1 + this.wordData.fund.Material*1+this.wordData.fund.processing*1+ this.wordData.fund.Collaboration*1+this.wordData.fund.APPRAISAL*1+ this.wordData.fund.entery*1+this.wordData.fund.activities*1+this.wordData.fund.Transaction*1
 
         this.submitHint=true;
       },