yuanyiming %!s(int64=2) %!d(string=hai) anos
pai
achega
bd1f129001
Modificáronse 2 ficheiros con 99 adicións e 46 borrados
  1. 35 14
      src/views/fundManage/makerfund.vue
  2. 64 32
      src/views/fundManage/newMarkerfundDetails.vue

+ 35 - 14
src/views/fundManage/makerfund.vue

@@ -112,16 +112,21 @@
           </template>
         </el-table-column>
         <el-table-column
-          prop="money"
+          prop="applyfund"
           align="center"
           label="申请经费(元)"
           >
         </el-table-column>
         <el-table-column
-          prop="applyfund"
+          prop="actualuse"
           align="center"
           label="实际使用(元)"
           >
+          <template #default="scope">
+            <div>
+              <span>{{ scope.row.actualuse==null?0:scope.row.actualuse }}</span>
+            </div>
+          </template>
         </el-table-column>
         <el-table-column
           prop="name"
@@ -158,7 +163,7 @@
           >
           <template #default="scope">
               <div class="operations">
-                <el-button type="primary" size="mini" @click="details(scope.row.fid,scope.row.title)">查看详情</el-button>
+                <el-button type="primary" size="mini" @click="details(scope.row.fid,scope.row.title,scope.row.acId)">查看详情</el-button>
 
                 <el-button type="primary" v-show="scope.row.state==0" size="mini" @click="Audit(scope.row,0)">审核</el-button>
                 <el-button type="primary"  v-show="scope.row.state==1" class="disa" size="mini">已审核</el-button>
@@ -448,28 +453,44 @@
               page:this.table.currentPage,
               lim:this.table.packageSize
             }
-            console.log(param);
+            // console.log(param);
             this.ajax
                 .get(this.$store.state.api+'/selectAllFundApply',param)
                 .then(res=>{
-                  // console.log(res);
                   let data=res.data;
-                  let  usedFund=0
-
                   console.log(data);
+
+                  let AllFund=0
                   if (data[0].length==0 && data[4][0]['total'] != 0) {
                     this.table.currentPage=1
                     this.getData()
                   }
+                  // console.log(data[0][0]['applyfund']);
+                  // data[0][0]['applyfund'].fo
                   data[0].forEach(e => {
                     e.applyfund=JSON.parse(e.applyfund)
-
                     for(let i in e.applyfund){
-                      usedFund+=e.applyfund[i]*1
+                      AllFund+=e.applyfund[i]*1
                     }
-                    // console.log(usedFund);
-                    e.applyfund=usedFund
+                    e.applyfund=AllFund
+                    AllFund=0
                   });
+
+                  
+                  data[0].forEach(e => {
+                    e.actualuse=JSON.parse(e.actualuse)
+                    for(let i in e.actualuse){
+                      AllFund+=e.actualuse[i]*1
+                    }
+                    e.actualuse=AllFund
+                    AllFund=0
+                  });
+
+
+
+
+                  console.log(data[0]);
+
                   
                   this.tableData=data[0];
                   this.filterSelects=data[1];
@@ -489,9 +510,9 @@
           this.dialogVisible=false
           this.createFromDialog=false
         },
-        details(Id,tit){       //跳转详情页面
-          // return console.log(Id,ax);
-          this.$router.push(`/newMarkerfundDetails?Id=${Id}&tit=${tit}`)
+        details(Id,tit,aid){       //跳转详情页面
+          // return console.log(Id,tit,aid);
+          this.$router.push(`/newMarkerfundDetails?Id=${Id}&tit=${tit}&aid=${aid}`)
         }
       },
       mounted(){

+ 64 - 32
src/views/fundManage/newMarkerfundDetails.vue

@@ -141,16 +141,16 @@ export default {
             submitDataDig:false,//提交对话框
             allFund:'',//总经费
             fundList:[   //table遍历数据
-                {fundName:'小型仪器设备费',budget:'',havePaid:'0',thisApply:'',actualuse:'',remark:'项目开展所需的小型专用仪器设备、工具、配件购置或租赁费用。'},
-                {fundName:'材料费',budget:'',havePaid:'0',thisApply:'',actualuse:'',remark:'项目开展需消耗的各种原材料、辅助材料等低值易耗品的采购费用。'},
-                {fundName:'测试化验加工费',budget:'',havePaid:'0',thisApply:'',actualuse:'',remark:'项目开展过程中支付给外单位的检验、测试、化验、计算、分析及加工费等费用。'},
-                {fundName:'项目协作费',budget:'',havePaid:'0',thisApply:'',actualuse:'',remark:'按合同规定支付给协作单位的费用'},
-                {fundName:'项目成功鉴定费',budget:'',havePaid:'0',thisApply:'',actualuse:'',remark:'学术会务费、评审费、鉴定费、成果集制作费等费用。'},
-                {fundName:'参展参赛费',budget:'',havePaid:'0',thisApply:'',actualuse:'',remark:'参加创客展会、竞赛等所需的报名费、展位费、布展费、宣传推广费及差旅费等费用。'},
-                {fundName:'创客交流活动费',budget:'',havePaid:'0',thisApply:'',actualuse:'',remark:'创客交流活动中支付给校外专家的指导费、咨询费、授课费等费用。'},
-                {fundName:'知识产权事务费',budget:'',havePaid:'0',thisApply:'',actualuse:'',remark:'论文版面费、专利及其他知识产权事务等费用。'},
+                {fundName:'小型仪器设备费',budget:'',havePaid:0,thisApply:'',actualuse:'',remark:'项目开展所需的小型专用仪器设备、工具、配件购置或租赁费用。'},
+                {fundName:'材料费',budget:'',havePaid:0,thisApply:'',actualuse:'',remark:'项目开展需消耗的各种原材料、辅助材料等低值易耗品的采购费用。'},
+                {fundName:'测试化验加工费',budget:'',havePaid:0,thisApply:'',actualuse:'',remark:'项目开展过程中支付给外单位的检验、测试、化验、计算、分析及加工费等费用。'},
+                {fundName:'项目协作费',budget:'',havePaid:0,thisApply:'',actualuse:'',remark:'按合同规定支付给协作单位的费用'},
+                {fundName:'项目成功鉴定费',budget:'',havePaid:0,thisApply:'',actualuse:'',remark:'学术会务费、评审费、鉴定费、成果集制作费等费用。'},
+                {fundName:'参展参赛费',budget:'',havePaid:0,thisApply:'',actualuse:'',remark:'参加创客展会、竞赛等所需的报名费、展位费、布展费、宣传推广费及差旅费等费用。'},
+                {fundName:'创客交流活动费',budget:'',havePaid:0,thisApply:'',actualuse:'',remark:'创客交流活动中支付给校外专家的指导费、咨询费、授课费等费用。'},
+                {fundName:'知识产权事务费',budget:'',havePaid:0,thisApply:'',actualuse:'',remark:'论文版面费、专利及其他知识产权事务等费用。'},
             ],
-            haveFund:{}, //已支付经费
+            haveFund:'', //已支付经费
             intro:'',   //事由
             state:0,
         }
@@ -171,16 +171,42 @@ export default {
             let param={
                 uid:this.$store.state.userInfo.userid,
                 fid:this.$route.query['Id'],
+                aid:this.$route.query['aid'],
             }
             this.ajax
             .get(this.$store.state.api+'/selectActivityFundDetail',param)
             .then(res=>{
+                console.log(res.data[1]);
                 let data=res.data[0][0]
-                // return console.log(data);
+                // console.log(data);
                 let applyfund=JSON.parse(data['applyfund'])
                 let fund=JSON.parse(data['fund'])
-                let actualuse=JSON.parse(data['actualuse'])
                 let usedFund=JSON.parse(data['usedFund'])
+
+                let arr= res['data'][1].filter(e=>{
+                    return e.actualuse!=null
+                })
+                console.log(arr);
+
+                let isUse = arr;
+                if (arr) {
+                    // console.log(111);
+                    isUse.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']);
+                    })
+                }
+                
+
+
+                
                 // console.log(applyfund);
                 this.fundList[0].budget=fund.device
                 this.fundList[1].budget=fund.Material
@@ -211,16 +237,16 @@ export default {
                 this.fundList[6].thisApply=applyfund.activities 
                 this.fundList[7].thisApply=applyfund.Transaction
 
-                if (data['actualuse']!=null) {
-                    this.fundList[0].actualuse=actualuse.device
-                    this.fundList[1].actualuse=actualuse.Material
-                    this.fundList[2].actualuse=actualuse.processing
-                    this.fundList[3].actualuse=actualuse.Collaboration
-                    this.fundList[4].actualuse=actualuse.APPRAISAL
-                    this.fundList[5].actualuse=actualuse.entery
-                    this.fundList[6].actualuse=actualuse.activities
-                    this.fundList[7].actualuse=actualuse.Transaction
-                }
+                // if (data['actualuse']!=null) {
+                //     this.fundList[0].actualuse=actualuse.device
+                //     this.fundList[1].actualuse=actualuse.Material
+                //     this.fundList[2].actualuse=actualuse.processing
+                //     this.fundList[3].actualuse=actualuse.Collaboration
+                //     this.fundList[4].actualuse=actualuse.APPRAISAL
+                //     this.fundList[5].actualuse=actualuse.entery
+                //     this.fundList[6].actualuse=actualuse.activities
+                //     this.fundList[7].actualuse=actualuse.Transaction
+                // }
                 
 
                 this.intro=data.intro
@@ -260,6 +286,21 @@ export default {
         },
         submitAll(){           //提交创客资金申请
         //    getFundNo("ZJ").then((result)=>{
+
+            // let arr={
+            //     device:(this.fundList[0].actualuse+this.haveFund.device*1),
+            //     Material:this.fundList[1].actualuse+this.haveFund.Material*1,
+            //     processing:this.fundList[2].actualuse+this.haveFund.processing*1,
+            //     Collaboration:this.fundList[3].actualuse+this.haveFund.Collaboration*1,
+            //     APPRAISAL:this.fundList[4].actualuse+this.haveFund.APPRAISAL*1,
+            //     entery:this.fundList[5].actualuse+this.haveFund.entery*1,
+            //     activities:this.fundList[6].actualuse+this.haveFund.activities*1,
+            //     Transaction:this.fundList[7].actualuse+this.haveFund.Transaction*1,
+            // }
+            
+            //  console.log(arr);
+
+
                 let param={
                     uid:this.$store.state.userInfo.userid,
                     // fNo:result, //项目编号
@@ -275,17 +316,8 @@ export default {
                         activities:this.fundList[6].actualuse,
                         Transaction:this.fundList[7].actualuse,
                     }),
-                    uf:JSON.stringify({
-                        device:this.fundList[0].actualuse,
-                        Material:this.fundList[1].actualuse,
-                        processing:this.fundList[2].actualuse,
-                        Collaboration:this.fundList[3].actualuse,
-                        APPRAISAL:this.fundList[4].actualuse,
-                        entery:this.fundList[5].actualuse,
-                        activities:this.fundList[6].actualuse,
-                        Transaction:this.fundList[7].actualuse,
-                    }),
                 }
+                // return console.log(param);
                 this.ajax
                 .post(this.$store.state.api+'/updateActivityFundDetail',param)
                 .then(res=>{
@@ -307,7 +339,7 @@ export default {
     mounted(){
         this.getData()
         this.projectName=this.$route.query['tit']
-        // console.log(this.$route.query['Id']);
+        // console.log(this.$route.query['aid']);
         // console.log(this.$route.query['tit']);
     }
 }