|
@@ -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;
|