|
@@ -273,34 +273,7 @@
|
|
submit(){
|
|
submit(){
|
|
this.deptBudgetList.compId=localStorage.getItem('ws-pf_compId')
|
|
this.deptBudgetList.compId=localStorage.getItem('ws-pf_compId')
|
|
this.deptBudgetList.agent=localStorage.getItem('ws-pf_staffName')
|
|
this.deptBudgetList.agent=localStorage.getItem('ws-pf_staffName')
|
|
- if(this.deptBudgetList.purpose=='合同费用'&&this.deptBudgetList.type=='非粮款'||this.deptBudgetList.purpose=='库点费用'){
|
|
|
|
- for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
|
|
|
|
- if(!this.feeDetailsDistributions[i].distributionMoney){
|
|
|
|
- this.$message({
|
|
|
|
- message: '分配金额不能为空!',
|
|
|
|
- type: 'warning',
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if(this.feeDetailsDistributions[i].distributionMoney<0){
|
|
|
|
- this.$message({
|
|
|
|
- message: '分配金额应大于0!',
|
|
|
|
- type: 'warning',
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if((String(this.feeDetailsDistributions[i].distributionMoney).indexOf('.') != -1 &&
|
|
|
|
- String(this.feeDetailsDistributions[i].distributionMoney).length -
|
|
|
|
- (String(this.feeDetailsDistributions[i].distributionMoney).indexOf('.') + 1) >
|
|
|
|
- 2)){
|
|
|
|
- this.$message({
|
|
|
|
- message: '分配金额最多保留两位小数!',
|
|
|
|
- type: 'warning',
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
this.deptBudgetList.totalDistribution=this.amount
|
|
this.deptBudgetList.totalDistribution=this.amount
|
|
if(this.deptBudgetList.purpose=='合同费用'){
|
|
if(this.deptBudgetList.purpose=='合同费用'){
|
|
this.deptBudgetList.expensesPurpose=1
|
|
this.deptBudgetList.expensesPurpose=1
|
|
@@ -336,25 +309,6 @@
|
|
})
|
|
})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
-
|
|
|
|
- if(this.deptBudgetList.expensesPurpose==1&&this.deptBudgetList.costType==3&&this.mode=='全部分配'||this.deptBudgetList.expensesPurpose==3&&this.mode=='全部分配'){
|
|
|
|
- if(this.amount!=this.deptBudgetList.amountMoney){
|
|
|
|
- this.$message({
|
|
|
|
- message: '请款金额与分配金额不相等!',
|
|
|
|
- type: 'warning',
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if(this.deptBudgetList.expensesPurpose==1&&this.deptBudgetList.costType==3&&this.mode=='部分分配'||this.deptBudgetList.expensesPurpose==3&&this.mode=='部分分配'){
|
|
|
|
- if(this.amount>this.deptBudgetList.amountMoney){
|
|
|
|
- this.$message({
|
|
|
|
- message: '分配金额不可超过请款金额!',
|
|
|
|
- type: 'warning',
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
if(!this.deptBudgetList.expenseName){
|
|
if(!this.deptBudgetList.expenseName){
|
|
this.$message({
|
|
this.$message({
|
|
message: '费用名称不能为空!',
|
|
message: '费用名称不能为空!',
|