|
@@ -568,20 +568,20 @@ weight: 4000}]],
|
|
|
this.deptBudgetList.totalDistribution=this.amount
|
|
|
if(this.deptBudgetList.purpose=='合同费用'&&this.deptBudgetList.type=='非粮款'||this.deptBudgetList.purpose=='库点费用'){
|
|
|
for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
|
|
|
- if(!this.feeDetailsDistributions[i].distributionMoney){
|
|
|
+ if(!this.feeDetailsDistributions[i].distributionMoney&&this.feeDetailsDistributions[i].distributionMoney!=0){
|
|
|
this.$message({
|
|
|
message: '分配金额不能为空!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if(this.feeDetailsDistributions[i].distributionMoney<0){
|
|
|
- this.$message({
|
|
|
- message: '分配金额应大于0!',
|
|
|
- type: 'warning',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
+ // if(this.feeDetailsDistributions[i].distributionMoney<0){
|
|
|
+ // this.$message({
|
|
|
+ // message: '分配金额应大于0!',
|
|
|
+ // type: 'warning',
|
|
|
+ // })
|
|
|
+ // return
|
|
|
+ // }
|
|
|
if(!this.feeDetailsDistributions[i].orderId){
|
|
|
this.$message({
|
|
|
message: '货源不能为空!',
|
|
@@ -624,7 +624,7 @@ weight: 4000}]],
|
|
|
this.deptBudgetList.expenseAllocationInfoList=this.feeDetailsDistributions
|
|
|
}
|
|
|
if(this.deptBudgetList.expensesPurpose==1||this.deptBudgetList.expensesPurpose==2){
|
|
|
- var data=[]
|
|
|
+ var data=[]
|
|
|
for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
|
|
|
if(data.length==0){
|
|
|
data.push(this.feeDetailsDistributions[i])
|
|
@@ -647,27 +647,27 @@ weight: 4000}]],
|
|
|
}
|
|
|
}
|
|
|
if(this.deptBudgetList.expensesPurpose==3){
|
|
|
- var data=[]
|
|
|
- for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
|
|
|
- if(data.length==0){
|
|
|
- data.push(this.feeDetailsDistributions[i])
|
|
|
- }else{
|
|
|
- var repetition=data.filter((item,index)=>{
|
|
|
- return this.feeDetailsDistributions[i].warehouseName==item.warehouseName&&this.feeDetailsDistributions[i].receiptDocDate==item.receiptDocDate
|
|
|
- && this.feeDetailsDistributions[i].goodsSource == item.goodsSource
|
|
|
- })
|
|
|
- if(repetition.length==0){
|
|
|
- data.push(this.feeDetailsDistributions[i])
|
|
|
- }else{
|
|
|
- this.$message({
|
|
|
- message: '货源重复!',
|
|
|
- type: 'warning',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
+ // var data=[]
|
|
|
+ // for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
|
|
|
+ // if(data.length==0){
|
|
|
+ // data.push(this.feeDetailsDistributions[i])
|
|
|
+ // }else{
|
|
|
+ // var repetition=data.filter((item,index)=>{
|
|
|
+ // return this.feeDetailsDistributions[i].warehouseName==item.warehouseName&&this.feeDetailsDistributions[i].receiptDocDate==item.receiptDocDate
|
|
|
+ // && this.feeDetailsDistributions[i].goodsSource == item.goodsSource
|
|
|
+ // })
|
|
|
+ // if(repetition.length==0){
|
|
|
+ // data.push(this.feeDetailsDistributions[i])
|
|
|
+ // }else{
|
|
|
+ // this.$message({
|
|
|
+ // message: '货源重复!',
|
|
|
+ // type: 'warning',
|
|
|
+ // })
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
- }
|
|
|
+ // }
|
|
|
}
|
|
|
this.deptBudgetList.expensesType=2
|
|
|
if(!this.deptBudgetList.contractNo&&this.deptBudgetList.expensesPurpose==1){
|
|
@@ -710,12 +710,13 @@ weight: 4000}]],
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if(this.deptBudgetList.expenseName.length<1||this.deptBudgetList.expenseName.length>15){
|
|
|
- this.$message({
|
|
|
- message: '费用名称输入错误!',
|
|
|
- type: 'warning',
|
|
|
- })
|
|
|
- }
|
|
|
+ // if(this.deptBudgetList.expenseName.length<1||this.deptBudgetList.expenseName.length>15){
|
|
|
+ // this.$message({
|
|
|
+ // message: '费用名称输入错误!',
|
|
|
+ // type: 'warning',
|
|
|
+ // })
|
|
|
+ // return
|
|
|
+ // }
|
|
|
if(!this.deptBudgetList.amountMoney){
|
|
|
this.$message({
|
|
|
message: '金额不能为空!',
|