Commit c37e0ee5 authored by 罗超's avatar 罗超

修改提成展现方式

parent 9ba32ef4
...@@ -54,7 +54,8 @@ export default { ...@@ -54,7 +54,8 @@ export default {
isReady: false, isReady: false,
multipleSort: false, multipleSort: false,
loading: true, loading: true,
CompanyList:[] CompanyList:[],
stringPerons:''
}; };
}, },
methods: { methods: {
...@@ -69,6 +70,9 @@ export default { ...@@ -69,6 +70,9 @@ export default {
'部门':x.departmentName, '部门':x.departmentName,
'员工':x.createByStr, '员工':x.createByStr,
'提成金额':x.commissionMoney.toFixed(2), '提成金额':x.commissionMoney.toFixed(2),
'额外奖励':x.otherMoney.toFixed(2),
'额外扣除':x.backMoney.toFixed(2),
'应发提成':x.sumMoney.toFixed(2),
'所属期数':x.periods '所属期数':x.periods
} }
data.push(obj) data.push(obj)
...@@ -170,7 +174,43 @@ export default { ...@@ -170,7 +174,43 @@ export default {
width: 80, width: 80,
orderBy: "", orderBy: "",
formatter: function(rowData, rowIndex, pagingIndex, field) { formatter: function(rowData, rowIndex, pagingIndex, field) {
return `<span style='color:red'>${rowData.commissionMoney.toFixed(2)}</span>` return `<span>${rowData.commissionMoney.toFixed(2)}</span>`
}
};
let otherMoney = {
field: "otherMoney",
title: "额外奖励",
titleAlign: "left",
columnAlign: "left",
isResize: true,
width: 80,
orderBy: "",
formatter: function(rowData, rowIndex, pagingIndex, field) {
return `<span>${rowData.otherMoney.toFixed(2)}</span>`
}
};
let backMoney = {
field: "backMoney",
title: "额外扣除",
titleAlign: "left",
columnAlign: "left",
isResize: true,
width: 80,
orderBy: "",
formatter: function(rowData, rowIndex, pagingIndex, field) {
return `<span>${rowData.backMoney.toFixed(2)}</span>`
}
};
let sumMoney = {
title: "应发提成",
field: "sumMoney",
titleAlign: "left",
columnAlign: "left",
isResize: true,
width: 80,
orderBy: "",
formatter: function(rowData, rowIndex, pagingIndex, field) {
return `<span style='color:red'>${(rowData.otherMoney+rowData.commissionMoney-rowData.backMoney).toFixed(2)}</span>`
} }
}; };
let peopleCount = { let peopleCount = {
...@@ -205,7 +245,13 @@ export default { ...@@ -205,7 +245,13 @@ export default {
titleAlign: "left", titleAlign: "left",
columnAlign: "left", columnAlign: "left",
isResize: true, isResize: true,
width: 80 width: 80,
formatter: function(rowData, rowIndex, pagingIndex, field) {
if(rowData.periods!=that.stringPerons)
return `<div style='height:40px;line-height:40px;color:#f1f1f1;background: red;margin: 0 -10px;padding-left: 10px;'>${rowData.periods}</div>`
else
return rowData.periods
}
}; };
let remark = { let remark = {
field: "remark", field: "remark",
...@@ -231,6 +277,9 @@ export default { ...@@ -231,6 +277,9 @@ export default {
this.columns.push(department); this.columns.push(department);
this.columns.push(userName); this.columns.push(userName);
this.columns.push(commissionMoney); this.columns.push(commissionMoney);
this.columns.push(otherMoney);
this.columns.push(backMoney);
this.columns.push(sumMoney);
this.columns.push(peopleCount); this.columns.push(peopleCount);
this.columns.push(visaPeopleCount); this.columns.push(visaPeopleCount);
this.columns.push(periods); this.columns.push(periods);
...@@ -239,23 +288,29 @@ export default { ...@@ -239,23 +288,29 @@ export default {
this.isReady = true; this.isReady = true;
}, },
sortChange(param) { sortChange(param) {
// if (param.Royalty != "") { console.log(param)
// this.msg.OrderBy = `Royalty ${param.Royalty}`; if(param.sumMoney==''){
// } else if (param.Initialbalance != "") { if(param.BName!=''){
// this.msg.OrderBy = `Initialbalance ${param.Initialbalance}`; this.msg.OrderStr='RB_Branch_Id '+param.bName
// } }
if(param.commissionMoney!=''){
// this.getList(); this.msg.OrderStr='CommissionMoney '+param.commissionMoney
if(param.BName!=''){ }
this.msg.OrderStr='RB_Branch_Id '+param.bName if(param.peopleCount!=''){
} this.msg.OrderStr='PeopleCount '+param.peopleCount
if(param.commissionMoney!=''){ }
this.msg.OrderStr='CommissionMoney '+param.commissionMoney if(param.backMoney!=''){
} this.msg.OrderStr='BackMoney '+param.backMoney
if(param.peopleCount!=''){ }
this.msg.OrderStr='PeopleCount '+param.peopleCount if(param.otherMoney!=''){
this.msg.OrderStr='OtherMoney '+param.otherMoney
}
//this.tableData = this.orderBy(d, ["incomeVal"], param.income).results;
this.getList();
}else{
let d=JSON.parse(JSON.stringify(this.dataList))
this.dataList = this.orderBy(d, ["sumMoney"], param.sumMoney).results;
} }
this.getList();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
...@@ -271,7 +326,9 @@ export default { ...@@ -271,7 +326,9 @@ export default {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData; this.dataList = res.data.data.pageData;
this.total = res.data.data.count; this.total = res.data.data.count;
console.log(this.dataList, "dataList"); this.dataList.forEach(x=>{
x.sumMoney=x.commissionMoney+x.otherMoney-x.backMoney
})
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -317,6 +374,9 @@ export default { ...@@ -317,6 +374,9 @@ export default {
mounted() { mounted() {
this.msg.pageSize = 10000; //不分页 this.msg.pageSize = 10000; //不分页
this.msg.ParentId = this.$route.query.ParentId; this.msg.ParentId = this.$route.query.ParentId;
let dt=new Date()
this.stringPerons=(dt.getMonth()==0?(dt.getFullYear()-1):dt.getFullYear())+''+(dt.getMonth().toString().length<2?'0':'')+(dt.getMonth()==0?12:dt.getMonth());
console.log(this.stringPerons)
this.getList(); this.getList();
this.getCompanyList(); this.getCompanyList();
}, },
...@@ -348,4 +408,8 @@ export default { ...@@ -348,4 +408,8 @@ export default {
<style> <style>
.commissionDetails-box .el-button.is-circle{padding: 5px !important;} .commissionDetails-box .el-button.is-circle{padding: 5px !important;}
.commissionDetails-box .v-table-body-cell span {
display: block;
width: 100%;
}
</style> </style>
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