Commit c37e0ee5 authored by 罗超's avatar 罗超

修改提成展现方式

parent 9ba32ef4
......@@ -54,7 +54,8 @@ export default {
isReady: false,
multipleSort: false,
loading: true,
CompanyList:[]
CompanyList:[],
stringPerons:''
};
},
methods: {
......@@ -69,6 +70,9 @@ export default {
'部门':x.departmentName,
'员工':x.createByStr,
'提成金额':x.commissionMoney.toFixed(2),
'额外奖励':x.otherMoney.toFixed(2),
'额外扣除':x.backMoney.toFixed(2),
'应发提成':x.sumMoney.toFixed(2),
'所属期数':x.periods
}
data.push(obj)
......@@ -170,7 +174,43 @@ export default {
width: 80,
orderBy: "",
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 = {
......@@ -205,7 +245,13 @@ export default {
titleAlign: "left",
columnAlign: "left",
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 = {
field: "remark",
......@@ -231,6 +277,9 @@ export default {
this.columns.push(department);
this.columns.push(userName);
this.columns.push(commissionMoney);
this.columns.push(otherMoney);
this.columns.push(backMoney);
this.columns.push(sumMoney);
this.columns.push(peopleCount);
this.columns.push(visaPeopleCount);
this.columns.push(periods);
......@@ -239,23 +288,29 @@ export default {
this.isReady = true;
},
sortChange(param) {
// if (param.Royalty != "") {
// this.msg.OrderBy = `Royalty ${param.Royalty}`;
// } else if (param.Initialbalance != "") {
// this.msg.OrderBy = `Initialbalance ${param.Initialbalance}`;
// }
// this.getList();
if(param.BName!=''){
this.msg.OrderStr='RB_Branch_Id '+param.bName
}
if(param.commissionMoney!=''){
this.msg.OrderStr='CommissionMoney '+param.commissionMoney
}
if(param.peopleCount!=''){
this.msg.OrderStr='PeopleCount '+param.peopleCount
console.log(param)
if(param.sumMoney==''){
if(param.BName!=''){
this.msg.OrderStr='RB_Branch_Id '+param.bName
}
if(param.commissionMoney!=''){
this.msg.OrderStr='CommissionMoney '+param.commissionMoney
}
if(param.peopleCount!=''){
this.msg.OrderStr='PeopleCount '+param.peopleCount
}
if(param.backMoney!=''){
this.msg.OrderStr='BackMoney '+param.backMoney
}
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) {
this.msg.pageIndex = val;
......@@ -271,7 +326,9 @@ export default {
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
console.log(this.dataList, "dataList");
this.dataList.forEach(x=>{
x.sumMoney=x.commissionMoney+x.otherMoney-x.backMoney
})
} else {
this.Error(res.data.message);
}
......@@ -317,6 +374,9 @@ export default {
mounted() {
this.msg.pageSize = 10000; //不分页
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.getCompanyList();
},
......@@ -348,4 +408,8 @@ export default {
<style>
.commissionDetails-box .el-button.is-circle{padding: 5px !important;}
.commissionDetails-box .v-table-body-cell span {
display: block;
width: 100%;
}
</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