Commit 5f38f11c authored by youjie's avatar youjie

no message

parent 1d636210
var commonUtils = { var commonUtils = {
//json数组求和 //json数组求和
CaluJsonArraySum: function (arr, filed, num) { CaluJsonArraySum: function (arr, filed, num,type) {
var sum = 0; var sum = 0;
arr.forEach(item => { arr.forEach(item => {
if(type){
sum += Number(item);
}else{
if (item.hasOwnProperty(filed)) { if (item.hasOwnProperty(filed)) {
sum += Number(item[filed]); sum += Number(item[filed]);
} }
}
}); });
return sum.toFixed(num); return sum.toFixed(num);
}, },
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<li> <li>
<em>部门</em> <em>部门</em>
<el-select filterable v-model='msg.RB_Department_Id' <el-select filterable v-model='msg.RB_Department_Id'
@change='getEmployee();handleCurrentChange(1)'> @change='getEmployee();handleCurrentChange(1)' :disabled="disabled">
<el-option label="不限" :value="-1"></el-option> <el-option label="不限" :value="-1"></el-option>
<el-option v-for='item in departmentList' <el-option v-for='item in departmentList'
:label='item.DepartmentName' :label='item.DepartmentName'
......
...@@ -120,8 +120,8 @@ ...@@ -120,8 +120,8 @@
<!-- <p>总提成:<span>{{CommissionInfor.TotalCMoney}}</span></p> --> <!-- <p>总提成:<span>{{CommissionInfor.TotalCMoney}}</span></p> -->
<p>总订单数:<span>{{CommissionInfor.SalesOrderNum+CommissionInfor.JapanOrderNum+CommissionInfor.EuropeOrderNum+GNOrderNum}}</span></p> <p>总订单数:<span>{{CommissionInfor.SalesOrderNum+CommissionInfor.JapanOrderNum+CommissionInfor.EuropeOrderNum+GNOrderNum}}</span></p>
<p>总人头数:<span>{{CommissionInfor.PeopleNum+CommissionInfor.EuropePNum+CommissionInfor.SalesPeopleNum+CommissionInfor.JapanPeopleNum+CommissionInfor.EuropePeopleNum+GNEopleNum}}</span></p> <p>总人头数:<span>{{CommissionInfor.PeopleNum+CommissionInfor.EuropePNum+CommissionInfor.SalesPeopleNum+CommissionInfor.JapanPeopleNum+CommissionInfor.EuropePeopleNum+GNEopleNum}}</span></p>
<p>总预期奖金:<span>{{CommissionInfor.PeopleMoney+CommissionInfor.EuropeMoney}}</span></p> <p>总预期奖金:<span>{{CommissionJJ}}</span></p>
<p>总预期提成:<span>{{CommissionInfor.SalesCommission+CommissionInfor.JapanCommission+CommissionInfor.EuropeCommission+GNCommission}}</span></p> <p>总预期提成:<span>{{CommissionTC}}</span></p>
</template> </template>
</div> </div>
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
"> ">
<span style="font-size: 16px;font-weight: bold;">公司所有国内出发线路(单团.散拚)</span> <span style="font-size: 16px;font-weight: bold;">公司所有国内出发线路(单团.散拚)</span>
<div> <div>
<detailsButtom :type="1" :obj="commissionMsg"/> <detailsButtom :type="1" :obj="commissionMsg" :Month="Month"/>
</div> </div>
</div> </div>
<div class="groupTourOrder"> <div class="groupTourOrder">
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
<div style="display: flex;"> <div style="display: flex;">
<div class="CommissionLadder Line" style="margin: 0 10px 0 0;"> <div class="CommissionLadder Line" style="margin: 0 10px 0 0;">
<div class="title"> <div class="title">
<span>日本小包团、落地团以及单项提成</span> <span>日本及其他线小包团、落地团以及单项提成</span>
</div> </div>
<p>当月个人毛利润</p> <p>当月个人毛利润</p>
<div class="CommissionInfor"> <div class="CommissionInfor">
...@@ -247,7 +247,7 @@ ...@@ -247,7 +247,7 @@
<div style="display: flex;justify-content: space-between;"> <div style="display: flex;justify-content: space-between;">
<span>年终奖(不含门票、包车、国内游)</span> <span>年终奖(不含门票、包车、国内游)</span>
<div> <div>
<detailsButtom :type="3" :obj="commissionMsg"/> <detailsButtom :type="3" :obj="commissionMsg" :Month="Month"/>
</div> </div>
</div> </div>
<p style="padding: 0 0 10px 0;text-align: left;"><span style="font-size: 13px;color: red;">注:年终奖励从每年3月起始</span></p> <p style="padding: 0 0 10px 0;text-align: left;"><span style="font-size: 13px;color: red;">注:年终奖励从每年3月起始</span></p>
...@@ -266,7 +266,7 @@ ...@@ -266,7 +266,7 @@
<div style="display: flex;justify-content: space-between;"> <div style="display: flex;justify-content: space-between;">
<span style="font-weight: bold;font-size: 16px;">国内提成</span> <span style="font-weight: bold;font-size: 16px;">国内提成</span>
<div> <div>
<detailsButtom :type="2" :obj="commissionMsg"/> <detailsButtom :type="2" :obj="commissionMsg" :Month="Month"/>
</div> </div>
</div> </div>
<p style="padding: 0 0 10px 0;text-align: left;"><span style="font-size: 13px;color: red;">注:国内提成需结团后方可发放提成,以实际结团为准,此处只提供参考</span></p> <p style="padding: 0 0 10px 0;text-align: left;"><span style="font-size: 13px;color: red;">注:国内提成需结团后方可发放提成,以实际结团为准,此处只提供参考</span></p>
...@@ -410,8 +410,10 @@ ...@@ -410,8 +410,10 @@
data() { data() {
return { return {
detailsInfor:{ detailsInfor:{
type:0
}, },
CommissionJJ:0,
CommissionTC:0,
GNOrderNum:0, GNOrderNum:0,
GNEopleNum:0, GNEopleNum:0,
GNCommission:0, GNCommission:0,
...@@ -611,6 +613,13 @@ ...@@ -611,6 +613,13 @@
this.GNEopleNum+=Number(item.PeopleNum) this.GNEopleNum+=Number(item.PeopleNum)
this.GNCommission+=Number(item.Commission) this.GNCommission+=Number(item.Commission)
}) })
setTimeout(()=>{
let arr1 =[this.CommissionInfor.PeopleMoney,this.CommissionInfor.EuropeMoney]
let arr2 =[this.CommissionInfor.SalesCommission,this.CommissionInfor.JapanCommission,this.CommissionInfor.EuropeCommission,this.GNCommission]
this.CommissionJJ = this.CalculatePrice(arr1)
this.CommissionTC = this.CalculatePrice(arr2)
},500)
} }
}) })
}, },
...@@ -635,7 +644,17 @@ ...@@ -635,7 +644,17 @@
err => {this.loading = false} err => {this.loading = false}
) )
} },
//计算总成本
CalculatePrice(arr1) {
var CoastPrice = this.$commonUtils.CaluJsonArraySum(
arr1,
"CostPrice",
2,
1
);
return CoastPrice
},
} }
}; };
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<script> <script>
export default { export default {
props:['type','obj'], props:['type','obj','Month'],
data() { data() {
return { return {
...@@ -34,16 +34,30 @@ ...@@ -34,16 +34,30 @@
}, },
methods: { methods: {
goDetails(){ goDetails(){
let nowdays = new Date()
let Year = new Date().getFullYear()
let LastMonthTime = new Date().getMonth()
let MonthTime = new Date().getMonth() + 1
let userInfo = this.getLocalStorage(); let userInfo = this.getLocalStorage();
let name let name
if(this.type!=4){ if(this.type!=3){
let DepartSTime
let DepartETime
if(this.Month==1){
DepartSTime = Year+'-'+(MonthTime>10?MonthTime:'0'+MonthTime)+'-01'
DepartETime = this.getBeforeDate(0,this.getBeforeDate(0,new Date().Format("yyyy-MM-dd")))
}else{
DepartSTime = Year+'-'+(LastMonthTime>10?LastMonthTime:'0'+LastMonthTime)+'-01'
var MonthDayNum = new Date(Year, LastMonthTime, 0).getDate();
DepartETime = Year+'-'+(LastMonthTime>10?LastMonthTime:'0'+LastMonthTime)+'-'+(MonthDayNum>10?MonthDayNum:'0'+MonthDayNum)
}
name = 'erpMyCustomerOrder' name = 'erpMyCustomerOrder'
this.$router.push({ this.$router.push({
name: name, name: name,
query: { query: {
Q_IsCollect: "2", Q_IsCollect: "1",
DepartSTime: this.obj.DepartSTime, DepartSTime: DepartSTime,
DepartETime: this.obj.DepartETime, DepartETime: DepartETime,
CommissionType: String(this.type), CommissionType: String(this.type),
blank: 'y' blank: 'y'
} }
......
...@@ -71,12 +71,13 @@ ...@@ -71,12 +71,13 @@
<div class="progress-box"> <div class="progress-box">
<div v-for="(item,index) in commissionratioList.CommissionRateList" :key="index" <div v-for="(item,index) in commissionratioList.CommissionRateList" :key="index"
class="relative-position"> class="relative-position">
<!-- :text-color="(commissionratioList.type==2&&commissionratioList.CommissionRate>=item.Rate)||
(commissionratioList.type!=2&&commissionratioList.AvgLureNum>=item.StartValue)?'#fff':'#666666'" -->
<el-progress :text-inside="true" :stroke-width="20" <el-progress :text-inside="true" :stroke-width="20"
:percentage="setItemProgress(item)" :percentage="setItemProgress(item)"
:status="setItemStatus(item)" :status="setItemStatus(item)"
:format="setItemText(item)" :format="setItemText(item)"
:text-color="(commissionratioList.type==2&&commissionratioList.CommissionRate>=item.Rate)||
(commissionratioList.type!=2&&commissionratioList.AvgLureNum>=item.StartValue)?'#fff':'#666666'"
:color="(commissionratioList.type==2&&commissionratioList.CommissionRate>=item.Rate)|| :color="(commissionratioList.type==2&&commissionratioList.CommissionRate>=item.Rate)||
(commissionratioList.type!=2&&commissionratioList.AvgLureNum>=item.StartValue)?customColor[0]:customColor[1]"> (commissionratioList.type!=2&&commissionratioList.AvgLureNum>=item.StartValue)?customColor[0]:customColor[1]">
</el-progress> </el-progress>
...@@ -165,6 +166,14 @@ ...@@ -165,6 +166,14 @@
let length = this.commissionratioList.CommissionRateList.length let length = this.commissionratioList.CommissionRateList.length
let EndValue = this.commissionratioList.CommissionRateList[length-2].EndValue let EndValue = this.commissionratioList.CommissionRateList[length-2].EndValue
let Rate = this.commissionratioList.CommissionRateList[length-1].Rate let Rate = this.commissionratioList.CommissionRateList[length-1].Rate
if(this.commissionratioList.type==2){
if(this.commissionratioList.CommissionProfit
&&this.commissionratioList.CommissionProfit>=data.StartValue&&this.commissionratioList.CommissionProfit<=data.EndValue){
return this.commissionratioList.CommissionProfit>25000?(this.commissionratioList.CommissionProfit/data.StartValue)*100:(this.commissionratioList.CommissionProfit/data.EndValue)*100
}else{
return 100
}
}else{
if(this.commissionratioList.type==1 if(this.commissionratioList.type==1
&&this.commissionratioList.AvgLureNum>=data.StartValue &&this.commissionratioList.AvgLureNum>=data.StartValue
&&this.commissionratioList.AvgLureNum<=data.EndValue){ &&this.commissionratioList.AvgLureNum<=data.EndValue){
...@@ -174,8 +183,6 @@ ...@@ -174,8 +183,6 @@
}else{ }else{
return 100 return 100
} }
if(this.commissionratioList.type==2){
return 100
} }
// return 100 // return 100
}, },
......
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