|
@@ -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')
|
|
|
}
|