yuanyiming %!s(int64=2) %!d(string=hai) anos
pai
achega
f5fa7ba48b

+ 41 - 21
src/views/fundManage/makerfund.vue

@@ -9,7 +9,7 @@
     <div class="selectInp">
       <div class="manageSelects">
         <div class="selectsBlock">
-        <div class="selectLabel">活动筛选</div>
+        <div class="selectLabel">名称筛选</div>
         <el-select v-model="selectInp.filter" @change="getData" placeholder="我的活动">
           <el-option label="所有活动" value=""></el-option>
           <el-option
@@ -102,16 +102,30 @@
         </el-table-column>
 
         <el-table-column
-          prop="title"
-          label="活动名称"
+          label="项目(活动)名称"
           align="center"
           >
+          <template #default="scope">
+            <div>
+              <span>
+                <span v-if="scope.row.ptit">{{ scope.row.ptit }}</span>
+                <span v-if="scope.row.atit">{{ scope.row.atit }}</span>
+              </span>
+            </div>
+          </template>
         </el-table-column>
         <el-table-column
-          prop="pro_leader"
           align="center"
           label="负责人"
           >
+          <template #default="scope">
+            <div>
+              <span>
+                <span v-if="scope.row.ppl">{{ scope.row.ppl }}</span>
+                <span v-if="scope.row.apl">{{ scope.row.apl }}</span>
+              </span>
+            </div>
+          </template>
         </el-table-column>
         <el-table-column
           align="center"
@@ -120,8 +134,9 @@
           >
           <template #default="scope">
             <div>
-              <span v-if="scope.row.type==0">活动创客</span>
-              <span v-if="scope.row.type==1">个人创客</span>
+              <span v-if="scope.row.type==0">空间创客</span>
+              <span v-if="scope.row.type==1">学生创客</span>
+              <span v-if="scope.row.type==2">活动创客</span>
             </div>
           </template>
         </el-table-column>
@@ -182,7 +197,7 @@
           >
           <template #default="scope">
               <div class="operations">
-                <el-button type="primary" size="mini" @click="details(scope.row.fid,scope.row.title,scope.row.acId)">查看详情</el-button>
+                <el-button type="primary" size="mini" @click="details(scope.row.fid,scope.row.atit,scope.row.ptit,scope.row.paid)">查看详情</el-button>
 
                 <el-button type="primary" v-if="scope.row.state==0" size="mini" @click="Audit(scope.row,0)">提交</el-button>
                 <el-button type="primary"  v-if="scope.row.state==1" class="disa" size="mini">已提交</el-button>
@@ -366,9 +381,9 @@
           input:'',
           value:'',
           options:[
-            {value:1,label:'个人创客'},
-            {value:0,label:'活动创客'},
-
+            {value:0,label:'空间创客'},
+            {value:1,label:'学生创客'},
+            {value:2,label:'活动创客'},
           ],
           status:'',
           table:{   // 分页数据
@@ -379,12 +394,16 @@
           filterSelects:[],        
           departmentSelect:[],
           typeSelects:[
+            {
+              value:0,
+              label:'空间创客'
+            },
             {
               value:1,
-              label:'个人创客'
+              label:'学生创客'
             },
             {
-              value:0,
+              value:2,
               label:'活动创客'
             },
           ],
@@ -501,12 +520,12 @@
               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=>{
                   let data=res.data;
-                  // console.log(data);
+                  console.log(data);
 
                   let AllFund=0
                   if (data[0].length==0 && data[4][0]['total'] != 0) {
@@ -546,17 +565,18 @@
                   console.log(err);
                 })
         },
-       
-        apply(){              //创客资金申请跳转界面
-          this.$router.push('/newMarkerfundApply')
-        },
+
         init(){         
           this.dialogVisible=false
           this.createFromDialog=false
         },
-        details(Id,tit,aid){       //跳转详情页面
-          // return console.log(Id,tit,aid);
-          this.$router.push(`/makerfundDetails?Id=${Id}&tit=${tit}&aid=${aid}`)
+        details(Id,at,pt,paid){       //跳转详情页面
+          // return console.log(Id,at,pt,paid);
+          if (at!=null){
+              this.$router.push(`/makerfundDetails?Id=${Id}&tit=${at}&paid=${paid}`)
+          }else{
+            this.$router.push(`/makerfundDetails?Id=${Id}&tit=${pt}&paid=${paid}`)
+          }
         }
       },
       mounted(){

+ 67 - 27
src/views/fundManage/makerfundDetails.vue

@@ -28,7 +28,13 @@
     <table border="1" cellspacing="0" class="table">
        
         <tr>
-            <td colspan="2">经济支出类别</td><td>预算</td><td>已支付</td><td>本次申请</td><td>实际使用</td><td>余额</td><td colspan="3">备注</td>
+            <th colspan="2">经济支出类别</th>
+            <th>预算</th>
+            <th>已支付</th>
+            <th style="position: relative;">本次申请<br><div style="position: absolute;left: 50%;transform: translate(-50%);bottom: 1px;">{{ create_at }}</div></th>
+            <th style="position: relative;">实际使用<br><div style="position: absolute;left: 50%;transform: translate(-50%);bottom: 1px;">{{ endTime }}</div></th>
+            <th>余额</th>
+            <th colspan="3">备注</th>
         </tr>
         <tr v-for="(item,index) in fundList" :key="index">
             <td colspan="2">{{ item.fundName }}</td>
@@ -142,7 +148,7 @@ export default {
             projectName:'',      //所选名称
             downLoadExcelDig:false,//下载Excel对话框
             submitDataDig:false,//提交对话框
-            allFund:'',//总经费
+            allFund:0,//总经费
             fundList:[   //table遍历数据
                 {fundName:'小型仪器设备费',budget:'',havePaid:0,thisApply:'',actualuse:'',remark:'项目开展所需的小型专用仪器设备、工具、配件购置或租赁费用。'},
                 {fundName:'材料费',budget:'',havePaid:0,thisApply:'',actualuse:'',remark:'项目开展需消耗的各种原材料、辅助材料等低值易耗品的采购费用。'},
@@ -158,6 +164,8 @@ export default {
             tit:'',//活动名称
             ty:'',//活动类型
             state:0,
+            endTime:'',
+            create_at:''
         }
     },
     methods:{
@@ -176,20 +184,28 @@ export default {
             let param={
                 uid:this.$store.state.userInfo.userid,
                 fid:this.$route.query['Id'],
-                aid:this.$route.query['aid'],
+                aid:this.$route.query['paid'],
             }
             this.ajax
             .get(this.$store.state.api+'/selectActivityFundDetail',param)
             .then(res=>{
-                console.log(res.data);
-                let data=res.data[0][0]
-                // console.log(data);
-                let applyfund=JSON.parse(data['applyfund'])
-                let fund=JSON.parse(data['fund'])
+                //  console.log(res.data);
+                let data=res.data
+                console.log(data);
+                let applyfund=JSON.parse(data[0][0]['applyfund'])
+                let fund=''
+                // console.log(data[0][0]['applyfund']);
+                if (data[0][0]['af']!=null) {
+                    fund=JSON.parse(data[0][0]['af'])
+                }else{
+                    fund=JSON.parse(data[0][0]['pf'])
+                }
+            //    return  console.log(111);
+
                 // let usedFund=JSON.parse(data['usedFund'])
-                let actualuse=JSON.parse(data['actualuse'])
-                this.tit=data.title;
-                this.ty=data.type;
+                let actualuse=JSON.parse(data[0][0]['actualuse'])
+                // this.tit=data.title;
+                // this.ty=data.type;
 
                 let arr= res['data'][1].filter(e=>{
                     return e.actualuse!=null
@@ -214,6 +230,15 @@ export default {
                 
 
 
+                // 本次申请
+                this.fundList[0].thisApply=applyfund.device
+                this.fundList[1].thisApply=applyfund.Material
+                this.fundList[2].thisApply=applyfund.processing
+                this.fundList[3].thisApply=applyfund.Collaboration
+                this.fundList[4].thisApply=applyfund.APPRAISAL
+                this.fundList[5].thisApply=applyfund.entery
+                this.fundList[6].thisApply=applyfund.activities 
+                this.fundList[7].thisApply=applyfund.Transaction
                 
                 // console.log(applyfund);
 
@@ -238,15 +263,7 @@ export default {
                 //     this.fundList[7].havePaid=usedFund.Transaction
                 // }
 
-                // 本次申请
-                this.fundList[0].thisApply=applyfund.device
-                this.fundList[1].thisApply=applyfund.Material
-                this.fundList[2].thisApply=applyfund.processing
-                this.fundList[3].thisApply=applyfund.Collaboration
-                this.fundList[4].thisApply=applyfund.APPRAISAL
-                this.fundList[5].thisApply=applyfund.entery
-                this.fundList[6].thisApply=applyfund.activities 
-                this.fundList[7].thisApply=applyfund.Transaction
+
 
                 // 实际使用
                 if (data['actualuse']!=null) {
@@ -266,11 +283,17 @@ export default {
                 //     })
                 // }
 
+                // return
 
 
-                this.intro=data.intro
-                this.state=data.state
-                this.allFund=data.money
+                this.intro=data[0][0].intro
+                this.state=data[0][0].state
+                this.create_at=data[0][0].createTime
+                console.log(this.create_at);
+                this.endTime=data[0][0].endTime
+
+
+                
 
 
             },err=>{
@@ -280,7 +303,7 @@ export default {
          
 
         download(){
-            if(!this.projectName) return this.$message.error('请选择项目名称')
+            // if(!this.projectName) return this.$message.error('请选择项目名称')
             this.downLoadExcelDig=true
         },
         downLoadExcel(){   //生成表单
@@ -289,6 +312,12 @@ export default {
         },
         submitData(){
             if(!this.projectName) return this.$message.error('请选择项目名称')
+            this.allFund=0
+            this.fundList.forEach(e=>{
+                this.allFund+=e.budget*1
+            })
+            console.log(this.allFund);
+
             let arr=[this.fundList[0].actualuse,this.fundList[1].actualuse,this.fundList[2].actualuse,this.fundList[3].actualuse,this.fundList[4].actualuse,this.fundList[5].actualuse,this.fundList[6].actualuse,this.fundList[7].actualuse]
             let arr2=[this.fundList[0].havePaid,this.fundList[1].havePaid,this.fundList[2].havePaid,this.fundList[3].havePaid,this.fundList[4].havePaid,this.fundList[5].havePaid,this.fundList[6].havePaid,this.fundList[7].havePaid]
             
@@ -359,8 +388,10 @@ export default {
     mounted(){
         this.getData()
         this.projectName=this.$route.query['tit']
-        // console.log(this.$route.query['aid']);
+        // console.log(this.$route.query['Id']);
         // console.log(this.$route.query['tit']);
+        // console.log(this.$route.query['paid']);
+
     }
 }
 </script>
@@ -387,7 +418,7 @@ export default {
         border: none;
         border-top: solid 1px black;
         // border-right:  solid 1px black;
-        width: 80%;
+        width: 90%;
         margin: auto;
         margin-top: 30px;
         .textLeft{
@@ -398,6 +429,15 @@ export default {
             font-size: 16px;
           }
         }
+        tr th{
+            height: 70px;
+            border: none;
+            border-bottom: solid 1px black;
+            border-right: solid 1px black;
+            &:nth-child(1){
+                border-left:  solid 1px black;
+              }
+        }
         tr td{
             border: none;
             border-bottom: solid 1px black;
@@ -405,7 +445,7 @@ export default {
           height: 50px;
           text-align: center;
           line-height: 30px;
-          width: 9%;
+          width: 80px;
            
           &:nth-child(1){
                 border-left:  solid 1px black;

+ 75 - 21
src/views/fundManage/newMarkerfundApply.vue

@@ -10,15 +10,21 @@
     <hr>
     <!-- 项目名称、类型开始 -->
     <div class="Apply1">
-        <div class="inpInterval">活动名称</div>
-        <el-select v-model="projectName"  style="width: 30%;" placeholder="请选择">
+        <!-- <div class="inpInterval">活动名称</div> -->
+        <div class="inpInterval">创客项目</div>
+        <!-- <el-select v-model="projectName"  style="width: 30%;" placeholder="请选择">
             <el-option
             v-for="item in projectFilter"
             :key="item.id"
             :label="item.title"
             :value="item.id">
             </el-option>
-        </el-select>
+        </el-select> -->
+        <el-cascader
+        v-model="value"
+        :options="options"
+        :props="{ expandTrigger: 'hover' }"
+        @change="handleChange"></el-cascader>
     </div>
 
     <div class="tabTit">
@@ -100,7 +106,7 @@
     </el-dialog>
     <!-- 下载文档结束-->
 
-    <!-- 提交文档开始 -->
+    <!-- 提交开始 -->
     <el-dialog
       title="提交"
       :visible.sync="submitDataDig"
@@ -114,7 +120,7 @@
         <el-button @click="submitDataDig = false" class="AllDialogBtn">取消</el-button>
       </span>
     </el-dialog>
-    <!-- 提交文档结束-->
+    <!-- 提交结束-->
 
 
   </div>
@@ -135,7 +141,7 @@ export default {
             projectName:'',      //所选名称
             downLoadExcelDig:false,//下载Excel对话框
             submitDataDig:false,//提交对话框
-            allFund:'',//总经费
+            allFund:0,//总经费
             fundList:[
                 {fundName:'小型仪器设备费',budget:'',havePaid:0,thisApply:'',remark:'项目开展所需的小型专用仪器设备、工具、配件购置或租赁费用。'},
                 {fundName:'材料费',budget:'',havePaid:0,thisApply:'',remark:'项目开展需消耗的各种原材料、辅助材料等低值易耗品的采购费用。'},
@@ -148,19 +154,44 @@ export default {
             ],
             intro:'',   //事由
             tit:'',
-            ty:''
+            ty:'',
+            value: [],
+            options: [{
+                value: '5f7a66d5-c206-11ed-a4cd-509a4c5b67cf',
+                label: '创客空间',
+                    children: []
+                }, {
+                value: '5e21b204-c206-11ed-a4cd-509a4c5b67cf',
+                label: '学生创客',
+                    children: []
+                }, {
+                value: '2',
+                label: '活动创客',
+                    children: []
+                }
+            ]
+      
         }
     },
     methods:{
+        handleChange(value) {
+            // console.log(value);
+        },
         getData(){         //获取活动经费的项目名称
             let param={
                 uid:this.$store.state.userInfo.userid,
-                type:0
+                // type:0
             }
             this.ajax
                 .get(this.$store.state.api+'/SelectMakerFundSelects',param)
                 .then(res=>{
-                    let data=res.data[0]
+                    // return console.log(res);
+                    let data=res.data
+                    // console.log(data);
+                    this.options[0].children=data[0]
+                    this.options[1].children=data[1]
+                    this.options[2].children=data[2]
+
                     // console.log(data);
                     this.projectFilter=data
                    
@@ -170,6 +201,7 @@ export default {
         },
          
         getFundData(){
+            // return console.log(this.value);
             // console.log(this.projectName);
             //total:总经费     
             //小型仪器设备费:device        deviceRemarks
@@ -182,16 +214,19 @@ export default {
             //知识产权事务费:Transaction   TransactionRemarks
             let param={
                 uid:this.$store.state.userInfo.userid,
-                aid:this.projectName,
+                // aid:this.projectName,
+                tid:this.value[0],   //分类id   
+                paid:this.value[1]    //项目和活动id
             }
             this.ajax
             .get(this.$store.state.api+'/selectMarkerFundData',param)
             .then(res=>{
-                console.log(res.data);
-                let data=JSON.parse(res.data[0][0]['fund']);
-                // let usedFund=JSON.parse(res.data[0][0]['usedFund']);
+                console.log(res.data)
+                this.allFund=0
+                let data=JSON.parse(res.data[0][0]['money']);
                 // console.log(data);
-                this.fundList[0].budget=data.device
+  
+                this.fundList[0].budget=data.device*1
                 this.fundList[1].budget=data.Material
                 this.fundList[2].budget=data.processing 
                 this.fundList[3].budget=data.Collaboration 
@@ -199,8 +234,10 @@ export default {
                 this.fundList[5].budget=data.entery 
                 this.fundList[6].budget=data.activities 
                 this.fundList[7].budget=data.Transaction
-                this.tit=res.data[0][0].title
-                this.ty=res.data[0][0].type
+                // console.log(this.fundList);
+                // return
+                this.tit=res.data[1][0].intro
+                // this.ty=res.data[0][0].type
 
 
                 this.fundList.forEach(e=>{
@@ -213,7 +250,7 @@ export default {
                         e.actualuse=e.applyfund
                    }
                 })
-                // console.log(arr);
+                // // console.log(arr);
 
                 let arr= res['data'][1].filter(e=>{
                     return e.actualuse!=null
@@ -232,7 +269,14 @@ export default {
                     })
                 }
 
-                this.allFund=res.data[0][0]['money']
+                if (data.total!='') {   //因为创客空间有金额总和total学生和活动的没有所以要做到统一,把空间的total去掉
+                    data.total=0
+                }
+
+                for(let k in data){
+                    this.allFund+=data[k]*1
+                }
+                // console.log(this.allFund);
             },err=>{
                 console.log(err);
             })
@@ -250,7 +294,7 @@ export default {
             this.downLoadExcelDig=false
         },
         submitData(){
-            if(!this.projectName) return this.$message.error('请选择活动名称')
+            if(!this.value) return this.$message.error('请选择活动名称')
             let data= this.fundList.filter(e=>{
                 return e.thisApply==''
             })
@@ -269,12 +313,22 @@ export default {
             this.submitDataDig=true
         },
         submitAll(){           //提交创客资金申请
+             let type=0
+        //   return  console.log(this.value[1]);
+            if (this.value[0]=='5f7a66d5-c206-11ed-a4cd-509a4c5b67cf') {
+                type=0
+            }else if(this.value[0]=='5e21b204-c206-11ed-a4cd-509a4c5b67cf'){
+                type=1
+            }else{
+                type=2
+            }
            getFundNo("ZJ").then((result)=>{
                 let param={
                     uid:this.$store.state.userInfo.userid,
-                    aid:this.projectName,
+                    aid:this.value[1],
                     fNo:result, //项目编号
                     intro:this.intro,
+                    ty:type,
                     f:JSON.stringify({
                         device:this.fundList[0].thisApply,
                         Material:this.fundList[1].thisApply,
@@ -304,7 +358,7 @@ export default {
         },
     },
     watch:{
-        projectName:{
+        value:{
             handler(){
                 immediate:true
                 this.getFundData()

+ 3 - 2
src/views/home.vue

@@ -61,8 +61,9 @@
                 // {label:"个人创客申请",power:false,goto:"/newNomMarkerActivity"},
             ]},
             {id:2,label:"事后汇总",power:false,goto:"/makerfund",icon:"iconfont icon-zijinguanli",group:[
-              {label:"创客活动资金申请",power:false,goto:"/newMarkerfundApply"},
-              {label:"个人创客资金申请",power:false,goto:"/newNomMarkerFundApply"}
+            {label:"创客资金申请",power:false,goto:"/newMarkerfundApply"},
+              // {label:"创客活动资金申请",power:false,goto:"/newMarkerfundApply"},
+              // {label:"个人创客资金申请",power:false,goto:"/newNomMarkerFundApply"}
             ]},
             // {id:3,label:"资金使用管理",goto:"/makerfund",icon:"iconfont icon-zijinguanli",group:[]},
             {id:4,label:"项目管理",power:true,goto:"/ProjectManagement",icon:"el-icon-receiving",group:[]},

+ 8 - 8
src/views/projectApply/components/studentProjectWord.vue

@@ -382,7 +382,7 @@
                   style="width: 100%;"
                   resize="none"
                   placeholder="小型仪器设备费"
-                  v-model="wordData.fund.facility">
+                  v-model="wordData.fund.device">
                 </el-input>
             </td><td colspan="2">
               项目开展所需的小型专用仪器设备、工具、配件购置或租赁费用。
@@ -396,7 +396,7 @@
                   style="width: 100%;"
                   resize="none"
                   placeholder="材料费"
-                  v-model="wordData.fund.materials">
+                  v-model="wordData.fund.Material">
                 </el-input>
             </td><td colspan="2">
               项目开展需消耗的各种原材料、辅助材料等低值易耗品的采购费用。
@@ -410,7 +410,7 @@
                   style="width: 100%;"
                   resize="none"
                   placeholder="测试化验加工费"
-                  v-model="wordData.fund.process">
+                  v-model="wordData.fund.processing">
                 </el-input>
             </td><td colspan="2">
               项目开展过程中支付给外单位的检验、测试、化验、计算、分析及加工费等费用。
@@ -424,7 +424,7 @@
                   style="width: 100%;"
                   resize="none"
                   placeholder="项目协作费"
-                  v-model="wordData.fund.assist">
+                  v-model="wordData.fund.Collaboration">
                 </el-input>
             </td><td colspan="2">
               按合同规定支付给协作单位的费用
@@ -442,7 +442,7 @@
                   style="width: 100%;"
                   resize="none"
                   placeholder="项目成果鉴定费"
-                  v-model="wordData.fund.authenticate">
+                  v-model="wordData.fund.APPRAISAL">
                 </el-input>
             </td><td colspan="2">
               学术会务费、评审费、鉴定费、成果集制作费等费用。
@@ -456,7 +456,7 @@
                   style="width: 100%;"
                   resize="none"
                   placeholder="参展参赛费"
-                  v-model="wordData.fund.match">
+                  v-model="wordData.fund.entery">
                 </el-input>
             </td><td colspan="2">
               参加创客展会、竞赛等所需的报名费、展位费、布展费、宣传推广费及差旅费等费用。
@@ -470,7 +470,7 @@
                   style="width: 100%;"
                   resize="none"
                   placeholder="创客交流活动费"
-                  v-model="wordData.fund.activity">
+                  v-model="wordData.fund.activities">
                 </el-input>
             </td><td colspan="2">
               创客交流活动中支付给校外专家的指导费、咨询费、授课费等费用。
@@ -484,7 +484,7 @@
                   style="width: 100%;"
                   resize="none"
                   placeholder="知识产权事务费"
-                  v-model="wordData.fund.affair">
+                  v-model="wordData.fund.Transaction">
                 </el-input>
             </td><td colspan="2">
               论文版面费、专利及其他知识产权事务等费用。

+ 23 - 10
src/views/projectApply/newStudentProjectApply.vue

@@ -85,21 +85,21 @@
           },
           total:'',
           fund:{
-            facility:'',
-            materials:'',
-            process:'',
-            assist:'',
-            authenticate:'',
-            match:'',
-            activity:'',
-            affair:''
+                device:"",
+                Material:"",
+                processing:"",
+                Collaboration:"",
+                APPRAISAL:"",
+                entery:"",
+                activities:"",
+                Transaction:"",
           }
         }
       };
     },
     computed:{
       reversedMessage: function () {
-        return (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)
+        return (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)
       }
     },
     methods:{
@@ -223,7 +223,20 @@
                 }
             break;
             case 'fund':
-                let mon=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
+            // device:"",
+            //     Material:"",
+            //     processing:"",
+            //     Collaboration:"",
+            //     APPRAISAL:"",
+            //     entery:"",
+            //     activities:"",
+            //     Transaction:"",
+                // let mon=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.match*1+this.wordData.fund.activity*1+this.wordData.fund.affair*1
+                let mon=0
+                for(let k in this.wordData.fund){
+                  mon+=this.wordData.fund[k]*1
+                }
+                console.log(mon);
                 if(mon==0){
                   document.querySelector('#fund').scrollIntoView({ behavior: "smooth" });
                   return this.$message.error('请输入经费')