|
@@ -351,13 +351,14 @@
|
|
|
<script>
|
|
|
|
|
|
export default {
|
|
|
- props:['wordData','total'],
|
|
|
+ props:['wordData','total','allFund','changeFund'],
|
|
|
data() {
|
|
|
return {
|
|
|
- allFund:0,
|
|
|
+ // allFund:0,
|
|
|
myselfFund:0,
|
|
|
DepartmentData:[],
|
|
|
ProjectData:[],
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -395,9 +396,6 @@
|
|
|
for(let i in this.wordData['fund'])this.wordData['fund'][i]='';
|
|
|
return this.$message.error("请先选择关联项目");
|
|
|
}
|
|
|
- // if(this.myselfFund>this.total){
|
|
|
- // this.allFund+=this.myselfFund - this.total;
|
|
|
- // }
|
|
|
if(this.total>this.allFund){
|
|
|
this.wordData['fund'][index]=0;
|
|
|
return this.$message.error("活动总经费不能超过项目剩余总预算")
|
|
@@ -426,7 +424,8 @@
|
|
|
let isUse = 0;
|
|
|
let myFund = 0;
|
|
|
result['data'][1].forEach(item=>isUse+=Number(item['money']))
|
|
|
- this.allFund = total - isUse;
|
|
|
+ this.changeFund(total-isUse)
|
|
|
+ // this.allFund = total - isUse;
|
|
|
if(this.wordData['acId']){
|
|
|
result['data'][1].forEach(item=>item['acId']==this.wordData['acId']?myFund+=Number(item['money']):"");
|
|
|
this.myselfFund = myFund;
|