|
@@ -46,7 +46,7 @@
|
|
|
<div class="howMoneyFlex">
|
|
|
<div class="howMoney">
|
|
|
<div class="inpInterval">直接经费</div>
|
|
|
- <el-select v-model="item.directFundData" placeholder="请选择">
|
|
|
+ <el-select v-model="item.directFundData" @change="directFundDataSelectChange(item.directFundData)" placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in item.directFundSelects"
|
|
|
:key="item.value"
|
|
@@ -63,9 +63,13 @@
|
|
|
<div class="inpInterval twoStyle">已支付</div>
|
|
|
<el-input v-model="item.usedFund" type="number" class="inputNumber howMoneyInp" placeholder="金额"></el-input>
|
|
|
</div>
|
|
|
+ <div class="howMoney">
|
|
|
+ <div class="inpInterval twoStyle">本次申请</div>
|
|
|
+ <el-input v-model="item.apply" type="number" class="inputNumber howMoneyInp" placeholder="金额"></el-input>
|
|
|
+ </div>
|
|
|
<div class="howMoney">
|
|
|
<div class="inpInterval twoStyle">余额</div>
|
|
|
- <el-input disabled :value="item.budget - item.usedFund" type="number" class="inputNumber howMoneyInp" placeholder="金额"></el-input>
|
|
|
+ <el-input disabled :value="item.budget - item.usedFund -item.apply" type="number" class="inputNumber howMoneyInp" placeholder="金额"></el-input>
|
|
|
</div>
|
|
|
<el-button v-show="index!=0" type="primary" style="font-size: 16px;height: 40px;line-height: 0;" @click="delDerData(index)">删除</el-button>
|
|
|
</div>
|
|
@@ -110,11 +114,14 @@
|
|
|
<div class="howMoney">
|
|
|
<div class="inpInterval twoStyle">已支付</div>
|
|
|
<el-input v-model="item.usedFund" type="number" class="inputNumber howMoneyInp" placeholder="金额"></el-input>
|
|
|
-
|
|
|
+ </div>
|
|
|
+ <div class="howMoney">
|
|
|
+ <div class="inpInterval twoStyle">本次申请</div>
|
|
|
+ <el-input v-model="item.apply" type="number" class="inputNumber howMoneyInp" placeholder="金额"></el-input>
|
|
|
</div>
|
|
|
<div class="howMoney">
|
|
|
<div class="inpInterval twoStyle">余额</div>
|
|
|
- <el-input disabled :value="item.budget - item.usedFund" type="number" class="inputNumber howMoneyInp" placeholder="金额"></el-input>
|
|
|
+ <el-input disabled :value="item.budget - item.usedFund -item.apply" type="number" class="inputNumber howMoneyInp" placeholder="金额"></el-input>
|
|
|
</div>
|
|
|
<el-button v-show="i!=0" type="primary" style="font-size: 16px;height: 40px;line-height: 0;" @click="delInDerData(i)">删除</el-button>
|
|
|
</div>
|
|
@@ -140,9 +147,9 @@
|
|
|
</div>
|
|
|
|
|
|
|
|
|
-
|
|
|
- <div class="moneyBlock"> <!-- 其他经费 -->
|
|
|
- <div class="howMoneyFlex">
|
|
|
+<!-- 其他经费 -->
|
|
|
+ <div class="moneyBlock">
|
|
|
+ <!-- <div class="howMoneyFlex">
|
|
|
<div class="howMoney">
|
|
|
<div class="inpInterval" >其他</div>
|
|
|
<el-input v-model="residue.elseReason" placeholder="请输入内容"></el-input>
|
|
@@ -159,7 +166,7 @@
|
|
|
<div class="inpInterval twoStyle">余额</div>
|
|
|
<el-input disabled :value="residue.budget - residue.usedFund" type="number" class="inputNumber howMoneyInp" placeholder="金额"></el-input>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div class="howMoney">
|
|
|
<div class="inpInterval" style="position: relative;top:-20px">备注</div>
|
|
|
<el-input
|
|
@@ -283,10 +290,10 @@
|
|
|
<tr>
|
|
|
<td>02</td>
|
|
|
<td style="text-align: left;">(一)直接费用</td>
|
|
|
- <td>0</td>
|
|
|
- <td>0</td>
|
|
|
- <td>0</td>
|
|
|
- <td>0</td>
|
|
|
+ <td>{{ IndirectFunding.budget }}</td>
|
|
|
+ <td>{{ IndirectFunding.expended }}</td>
|
|
|
+ <td>{{IndirectFunding.application}}</td>
|
|
|
+ <td>{{ IndirectFunding.surplus }}</td>
|
|
|
<td style="width: 20%;"></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
@@ -489,6 +496,7 @@ export default {
|
|
|
],
|
|
|
budget:'', //预算
|
|
|
usedFund:'', //已使用
|
|
|
+ apply:'', //本次申请
|
|
|
reason:'' //理由
|
|
|
}
|
|
|
],
|
|
@@ -518,6 +526,7 @@ export default {
|
|
|
],
|
|
|
budget:'', //预算
|
|
|
usedFund:'', //已使用
|
|
|
+ apply:'', //本次申请
|
|
|
reason:'' //理由
|
|
|
},
|
|
|
|
|
@@ -550,6 +559,7 @@ export default {
|
|
|
],
|
|
|
budget:'', //预算
|
|
|
usedFund:'', //已使用
|
|
|
+ apply:'', //本次申请
|
|
|
reason:'' //理由
|
|
|
}
|
|
|
],
|
|
@@ -579,6 +589,7 @@ export default {
|
|
|
],
|
|
|
budget:'', //预算
|
|
|
usedFund:'', //已使用
|
|
|
+ apply:'', //本次申请
|
|
|
reason:'' //理由
|
|
|
},
|
|
|
|
|
@@ -633,6 +644,25 @@ export default {
|
|
|
qt:0,
|
|
|
reason:''
|
|
|
},
|
|
|
+ DirectFunding:{ //直接经费汇总
|
|
|
+ budget:0, //预算
|
|
|
+ expended:0, //已支付
|
|
|
+ application:0, //本次申请
|
|
|
+ surplus:0, //余额
|
|
|
+ },
|
|
|
+ IndirectFunding:{//简介经费汇总
|
|
|
+ budget:0, //预算
|
|
|
+ expended:0, //已支付
|
|
|
+ application:0, //本次申请
|
|
|
+ surplus:0, //余额
|
|
|
+ },
|
|
|
+ Expenditure:{//经费支出汇总
|
|
|
+ budget:0, //预算
|
|
|
+ expended:0, //已支付
|
|
|
+ application:0, //本次申请
|
|
|
+ surplus:0, //余额
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
@@ -704,10 +734,25 @@ export default {
|
|
|
break;
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
+ // this.DirectFunding.budget = this.
|
|
|
+ //直接费用全部预算
|
|
|
+ for(let i in this.directData)this.IndirectFunding['budget']+=this.directData[i];
|
|
|
+ //直接费用全部已支出
|
|
|
+ for(let a in this.usedDirectData)this.IndirectFunding['expended']+=this.usedDirectData[a];
|
|
|
+ //直接费用本次申请
|
|
|
+ //直接费用余额
|
|
|
+ this.IndirectFunding['surplus'] = this.IndirectFunding['budget']-this.IndirectFunding['expended']-this.IndirectFunding['application']
|
|
|
+
|
|
|
+ //间接费用
|
|
|
+ //直接费用全部预算
|
|
|
+ for(let i in this.indirectData)this.Expenditure['budget']+=this.directData[i];
|
|
|
+ //直接费用全部已支出
|
|
|
+ for(let a in this.usedInDirectData)this.Expenditure['expended']+=this.usedDirectData[a];
|
|
|
+ //直接费用本次申请
|
|
|
+ //直接费用余额
|
|
|
+ this.Expenditure['surplus'] = this.Expenditure['budget']-this.Expenditure['expended']-this.Expenditure['application']
|
|
|
},
|
|
|
createFrom(){ // 显示表单对话框
|
|
|
- this.createFromDialog=true;
|
|
|
this.directData={ //直接经费预算
|
|
|
facility:0,
|
|
|
cl:0,
|
|
@@ -744,9 +789,22 @@ export default {
|
|
|
reason4:''
|
|
|
},
|
|
|
this.AllEquipment();
|
|
|
+ this.createFromDialog=true;
|
|
|
},
|
|
|
submitCreateFrom(){ //生成表单
|
|
|
-
|
|
|
+ //直接经费预算
|
|
|
+ console.log("====直接经费预算==========")
|
|
|
+ console.log(this.directData);
|
|
|
+ console.log("====直接经费已支出==========")
|
|
|
+ console.log(this.usedDirectData);
|
|
|
+ console.log("====直接经费事由==========")
|
|
|
+ console.log(this.directDataReason)
|
|
|
+ console.log("====间接经费预算==========")
|
|
|
+ console.log(this.indirectData);
|
|
|
+ console.log("====间接经费已支出==========")
|
|
|
+ console.log(this.usedInDirectData)
|
|
|
+ console.log("====间接经费事由==========")
|
|
|
+ console.log(this.indirectDataReason)
|
|
|
},
|
|
|
ProgressFormat(value){ //进度条
|
|
|
return value ==100?'100%':`${value}%`
|
|
@@ -837,8 +895,11 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
addDirectFund(){ //添加直接经费
|
|
|
+ //判断如果已经写满
|
|
|
+ if(this.directFundBlock.length==this.newDirectFundBlock.directFundSelects.length)return this.$message.warning("已无法继续添加")
|
|
|
let oldArr={};
|
|
|
Object.assign(oldArr,this.newDirectFundBlock)
|
|
|
+ oldArr.directFundSelects = oldArr.directFundSelects.filter(item=>this.directFundBlock.filter(dItem=>dItem.directFundData==item.value).length==0)
|
|
|
this.directFundBlock.push(oldArr)
|
|
|
for(let k in this.newDirectFundBlock) return this.newDirectFundBlock[k]=''
|
|
|
},
|
|
@@ -854,6 +915,48 @@ export default {
|
|
|
this.submitHint=false;
|
|
|
this.createFromDialog=false;
|
|
|
},
|
|
|
+ directFundDataSelectChange(value){
|
|
|
+ //直接经费全部下拉框
|
|
|
+ let directFundBlockSelect = [
|
|
|
+ {
|
|
|
+ value:1,
|
|
|
+ label:'小型仪器设备费'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value:2,
|
|
|
+ label:'材料费'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value:3,
|
|
|
+ label:'测试化验加工费'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value:4,
|
|
|
+ label:'项目协作费'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value:5,
|
|
|
+ label:'其他支出'
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ let oneself=[];
|
|
|
+ this.directFundBlock.forEach(item=>{
|
|
|
+ //获取他本身自己的下拉框
|
|
|
+ oneself.push(directFundBlockSelect.filter(sItem=>sItem.value==item.directFundData)[0])
|
|
|
+ console.log(oneself)
|
|
|
+ //获取未选择的
|
|
|
+ directFundBlockSelect = directFundBlockSelect.filter(sItem=>sItem.value!=item.directFundData)
|
|
|
+ })
|
|
|
+ //再遍历一遍
|
|
|
+ this.directFundBlock.forEach((item,index)=>{
|
|
|
+ let oneSelect = [];
|
|
|
+ directFundBlockSelect.forEach(item=>oneSelect.push(item));
|
|
|
+ if(oneself[index]!=undefined)oneSelect.push(oneself[index])
|
|
|
+ item.directFundSelects = oneSelect;
|
|
|
+ })
|
|
|
+ //遍历所有的直接经费
|
|
|
+
|
|
|
+ }
|
|
|
},
|
|
|
mounted(){
|
|
|
this.getData()
|