|
@@ -911,31 +911,12 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
addDirectFund(){ //添加直接经费
|
|
addDirectFund(){ //添加直接经费
|
|
-<<<<<<< HEAD
|
|
|
|
- let ok=true;
|
|
|
|
- let oldArr={};
|
|
|
|
- Object.assign(oldArr,this.newDirectFundBlock)
|
|
|
|
- this.directFundBlock.forEach((e,i)=>{
|
|
|
|
- if (e.directFundData=='') {
|
|
|
|
- this.$message.error('请先填写直接经费类型')
|
|
|
|
- return ok=false
|
|
|
|
- }else{ //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
- // oldArr.directFundSelects = oldArr.directFundSelects.filter((k)=>{
|
|
|
|
- // console.log(e.directFundSelects);
|
|
|
|
- // return k.value!=e.value
|
|
|
|
- // })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- if(!ok) return false
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-=======
|
|
|
|
|
|
+
|
|
//判断如果已经写满
|
|
//判断如果已经写满
|
|
if(this.directFundBlock.length==this.newDirectFundBlock.directFundSelects.length)return this.$message.warning("已无法继续添加")
|
|
if(this.directFundBlock.length==this.newDirectFundBlock.directFundSelects.length)return this.$message.warning("已无法继续添加")
|
|
let oldArr={};
|
|
let oldArr={};
|
|
Object.assign(oldArr,this.newDirectFundBlock)
|
|
Object.assign(oldArr,this.newDirectFundBlock)
|
|
oldArr.directFundSelects = oldArr.directFundSelects.filter(item=>this.directFundBlock.filter(dItem=>dItem.directFundData==item.value).length==0)
|
|
oldArr.directFundSelects = oldArr.directFundSelects.filter(item=>this.directFundBlock.filter(dItem=>dItem.directFundData==item.value).length==0)
|
|
->>>>>>> 492a1929e977afdc7919d2e817ac75807e373b35
|
|
|
|
this.directFundBlock.push(oldArr)
|
|
this.directFundBlock.push(oldArr)
|
|
for(let k in this.newDirectFundBlock) return this.newDirectFundBlock[k]=''
|
|
for(let k in this.newDirectFundBlock) return this.newDirectFundBlock[k]=''
|
|
},
|
|
},
|