Commit dfb0ab7e authored by 沈良进's avatar 沈良进
parents f0ba3f9c ba53bdd3
...@@ -5,12 +5,18 @@ var commonUtils = { ...@@ -5,12 +5,18 @@ var commonUtils = {
arr.forEach(item => { arr.forEach(item => {
if (item.hasOwnProperty(filed)) { if (item.hasOwnProperty(filed)) {
sum += Number(item[filed]); sum += Number(item[filed]);
}else{
sum += Number(item);
} }
}); });
return sum.toFixed(num); return sum.toFixed(num);
}, },
CaluJsonArraySum2: function (arr, num) {
var sum = 0;
arr.forEach(item => {
sum += Number(item);
});
return sum.toFixed(num);
},
//截取阿里返回文件路径 //截取阿里返回文件路径
GetALiFileUrl: function (str) { GetALiFileUrl: function (str) {
var newStr = str; var newStr = str;
......
...@@ -1084,7 +1084,7 @@ ...@@ -1084,7 +1084,7 @@
let numToCAN = 0 let numToCAN = 0
let numToCE = 0 let numToCE = 0
let numToMEN = 0 let numToMEN = 0
let states = true
this.msg.detailList.forEach((x, index) => { this.msg.detailList.forEach((x, index) => {
let obj = x let obj = x
if (x.CostTypeName.indexOf('房') != -1 || if (x.CostTypeName.indexOf('房') != -1 ||
...@@ -1105,8 +1105,20 @@ ...@@ -1105,8 +1105,20 @@
y.show = true, numToMEN += Number(obj.Number), y.Num = numToMEN y.show = true, numToMEN += Number(obj.Number), y.Num = numToMEN
} }
}) })
states = false
} }
}) })
if(states){
this.msg.detailList.forEach((x, index) => {
this.HandFeeDetail && this.HandFeeDetail.DetailList.forEach((y, indexs) => {
let obj = x
if ( y.Type == 3) {
y.show = true, numToCE += Number(obj.Number), y.Num = numToCE
states = false
}
})
})
}
} else { } else {
this.HandFeeDetail && this.HandFeeDetail.DetailList.forEach((y, indexs) => { this.HandFeeDetail && this.HandFeeDetail.DetailList.forEach((y, indexs) => {
y.show = false y.show = false
...@@ -1369,6 +1381,10 @@ ...@@ -1369,6 +1381,10 @@
this.msg.HandFeeList.push(JSON.parse(JSON.stringify(obj))) this.msg.HandFeeList.push(JSON.parse(JSON.stringify(obj)))
} }
}) })
if(this.msg.HandFeeList.length==0){
this.Error('暂无可配置的手配费项,请关闭手配费')
return
}
} }
if (z) { if (z) {
this.msg.Status = 0; this.msg.Status = 0;
......
...@@ -587,7 +587,6 @@ ...@@ -587,7 +587,6 @@
// 年终奖 // 年终奖
this.AnnualBonus.AvfOrderNum = this.CommissionInfor.BonusNum?this.CommissionInfor.BonusNum:0 this.AnnualBonus.AvfOrderNum = this.CommissionInfor.BonusNum?this.CommissionInfor.BonusNum:0
this.AnnualBonus.Commission = this.CommissionInfor.BonusPeriods?this.CommissionInfor.BonusPeriods:0 this.AnnualBonus.Commission = this.CommissionInfor.BonusPeriods?this.CommissionInfor.BonusPeriods:0
console.log(this.CommissionInfor,'----')
}else { }else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -642,9 +641,8 @@ ...@@ -642,9 +641,8 @@
}, },
//计算总成本 //计算总成本
CalculatePrice(arr1,num) { CalculatePrice(arr1,num) {
var CoastPrice = this.$commonUtils.CaluJsonArraySum( var CoastPrice = this.$commonUtils.CaluJsonArraySum2(
arr1, arr1,
"",
num num
); );
return CoastPrice return CoastPrice
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment