Commit 5f38f11c authored by youjie's avatar youjie

no message

parent 1d636210
var commonUtils = {
//json数组求和
CaluJsonArraySum: function (arr, filed, num) {
CaluJsonArraySum: function (arr, filed, num,type) {
var sum = 0;
arr.forEach(item => {
if (item.hasOwnProperty(filed)) {
sum += Number(item[filed]);
if(type){
sum += Number(item);
}else{
if (item.hasOwnProperty(filed)) {
sum += Number(item[filed]);
}
}
});
return sum.toFixed(num);
......@@ -25,7 +29,7 @@ var commonUtils = {
el_IsdecimalTrr: /^\d+(\.\d{0,8})?$/, //验证只能输入8位小数
el_IsdecimalAll: /^[0-9]+([.]{1}[0-9]+){0,1}$/, //验证不限小数的
// /^((0\d{2,3}-\d{7,8})|(1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}))$/
el_ISphone: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/, //最新验证输入手机号 包括电话号码
el_ISphone: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/, //最新验证输入手机号 包括电话号码
el_IsFax: /^[+]{0,1}(\d){1,3}[ ]?([-]?((\d)|[ ]){1,12})+$/, //验证传真号
el_IsInventer: /^(\-|\+?)\d+(\.\d+)?$/, //可以输入带正负号整数
el_IsIDnumber: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/, //验证身份证号
......
......@@ -72,7 +72,7 @@
<li>
<em>部门</em>
<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 v-for='item in departmentList'
:label='item.DepartmentName'
......
......@@ -120,8 +120,8 @@
<!-- <p>总提成:<span>{{CommissionInfor.TotalCMoney}}</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.PeopleMoney+CommissionInfor.EuropeMoney}}</span></p>
<p>总预期提成:<span>{{CommissionInfor.SalesCommission+CommissionInfor.JapanCommission+CommissionInfor.EuropeCommission+GNCommission}}</span></p>
<p>总预期奖金:<span>{{CommissionJJ}}</span></p>
<p>总预期提成:<span>{{CommissionTC}}</span></p>
</template>
</div>
<div style="display: flex;align-items: center;">
......@@ -146,7 +146,7 @@
">
<span style="font-size: 16px;font-weight: bold;">公司所有国内出发线路(单团.散拚)</span>
<div>
<detailsButtom :type="1" :obj="commissionMsg"/>
<detailsButtom :type="1" :obj="commissionMsg" :Month="Month"/>
</div>
</div>
<div class="groupTourOrder">
......@@ -161,7 +161,7 @@
<div style="display: flex;">
<div class="CommissionLadder Line" style="margin: 0 10px 0 0;">
<div class="title">
<span>日本小包团、落地团以及单项提成</span>
<span>日本及其他线小包团、落地团以及单项提成</span>
</div>
<p>当月个人毛利润</p>
<div class="CommissionInfor">
......@@ -247,7 +247,7 @@
<div style="display: flex;justify-content: space-between;">
<span>年终奖(不含门票、包车、国内游)</span>
<div>
<detailsButtom :type="3" :obj="commissionMsg"/>
<detailsButtom :type="3" :obj="commissionMsg" :Month="Month"/>
</div>
</div>
<p style="padding: 0 0 10px 0;text-align: left;"><span style="font-size: 13px;color: red;">注:年终奖励从每年3月起始</span></p>
......@@ -266,7 +266,7 @@
<div style="display: flex;justify-content: space-between;">
<span style="font-weight: bold;font-size: 16px;">国内提成</span>
<div>
<detailsButtom :type="2" :obj="commissionMsg"/>
<detailsButtom :type="2" :obj="commissionMsg" :Month="Month"/>
</div>
</div>
<p style="padding: 0 0 10px 0;text-align: left;"><span style="font-size: 13px;color: red;">注:国内提成需结团后方可发放提成,以实际结团为准,此处只提供参考</span></p>
......@@ -410,8 +410,10 @@
data() {
return {
detailsInfor:{
type:0
},
CommissionJJ:0,
CommissionTC:0,
GNOrderNum:0,
GNEopleNum:0,
GNCommission:0,
......@@ -611,6 +613,13 @@
this.GNEopleNum+=Number(item.PeopleNum)
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 @@
err => {this.loading = false}
)
}
},
//计算总成本
CalculatePrice(arr1) {
var CoastPrice = this.$commonUtils.CaluJsonArraySum(
arr1,
"CostPrice",
2,
1
);
return CoastPrice
},
}
};
......
......@@ -11,7 +11,7 @@
<script>
export default {
props:['type','obj'],
props:['type','obj','Month'],
data() {
return {
......@@ -34,16 +34,30 @@
},
methods: {
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 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'
this.$router.push({
name: name,
query: {
Q_IsCollect: "2",
DepartSTime: this.obj.DepartSTime,
DepartETime: this.obj.DepartETime,
Q_IsCollect: "1",
DepartSTime: DepartSTime,
DepartETime: DepartETime,
CommissionType: String(this.type),
blank: 'y'
}
......
......@@ -71,12 +71,13 @@
<div class="progress-box">
<div v-for="(item,index) in commissionratioList.CommissionRateList" :key="index"
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"
:percentage="setItemProgress(item)"
:status="setItemStatus(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)||
(commissionratioList.type!=2&&commissionratioList.AvgLureNum>=item.StartValue)?customColor[0]:customColor[1]">
</el-progress>
......@@ -165,17 +166,23 @@
let length = this.commissionratioList.CommissionRateList.length
let EndValue = this.commissionratioList.CommissionRateList[length-2].EndValue
let Rate = this.commissionratioList.CommissionRateList[length-1].Rate
if(this.commissionratioList.type==1
&&this.commissionratioList.AvgLureNum>=data.StartValue
&&this.commissionratioList.AvgLureNum<=data.EndValue){
return (this.commissionratioList.AvgLureNum/data.EndValue)*100
}else if(this.commissionratioList.type==3&&this.commissionratioList.AvgLureNum){
return (this.commissionratioList.AvgLureNum/data.StartValue)*100
}else{
return 100
}
if(this.commissionratioList.type==2){
return 100
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
&&this.commissionratioList.AvgLureNum>=data.StartValue
&&this.commissionratioList.AvgLureNum<=data.EndValue){
return (this.commissionratioList.AvgLureNum/data.EndValue)*100
}else if(this.commissionratioList.type==3&&this.commissionratioList.AvgLureNum){
return (this.commissionratioList.AvgLureNum/data.StartValue)*100
}else{
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