Commit 57c51b0f authored by 黄奎's avatar 黄奎
parents ca065f13 15a97205
......@@ -26,6 +26,64 @@
@on-custom-comp="customCompFunc"
></v-table>
<div style="height:20px;"> </div>
<el-dialog
:title="`设置:${setform.CreateByStr}`"
:visible.sync="setopVisible"
width="30%">
<div>
<el-form ref="setform" :model="setform" label-width="80px">
<el-form-item label="类型">
<el-select v-model="setform.Type" placeholder="请选择">
<el-option label="奖励" :value="1"></el-option>
<el-option label="扣除" :value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="金额" >
<el-input style="width:220px" @keyup.native="checkPrice(setform,'Money')" v-model="setform.Money"></el-input>
</el-form-item>
<el-form-item label="描述">
<el-input type="textarea" v-model="setform.Description"></el-input>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="mini" @click="setopVisible = false">取 消</el-button>
<el-button size="mini" type="danger" @click=" SetOPOK">确 定</el-button>
</span>
</el-dialog>
<el-dialog
title="查看详情"
:visible.sync="opdatails"
width="30%">
<div>
<p style="text-align:center;margin-bottom:15px">{{detailsMsg.CreateByStr}}</p>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr>
<th>类型</th>
<th>金额</th>
<th>描述</th>
</tr>
<tr v-for="(item,index) in detailsMsg.detailList" :key="index">
<td>
<span v-if="item.Type==1">奖励</span>
<span v-if="item.Type==2">扣除</span>
</td>
<td>{{item.Money}}</td>
<td>
{{item.Description}}
</td>
</tr>
<tr>
<td v-show="detailsMsg.detailList.length==0" colspan="3" align="center">暂无数据</td>
</tr>
</table>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="mini" @click="opdatails = false">取 消</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
......@@ -57,10 +115,49 @@ export default {
loading: true,
CompanyList:[],
dataListTwo: [],
stringPerons:''
stringPerons:'',
setopVisible:false,
setform:{
CreateByStr:'',
},
opdatails:false,
detailsMsg:{
detailList:[],
},
btnShow:true,
};
},
methods: {
SetOPOK(){
if(!this.setform.Type){
this.Error("请选择类型!");
return;
}
if(!this.setform.Money || this.setform.Money==0){
this.Error("请填写金额!");
return;
}
if(!this.setform.Description || this.setform.Description==''){
this.Error("请填写描述!");
return;
}
this.apipost(
"sellcommission_SetOPCommissionRewards",
this.setform,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.setopVisible=false;
this.getList();
} else {
this.Error(res.data.message);
}
},
null
);
},
exportExcel(){
const defaultCellStyle = {'!cols': [{wpx: 60}, {wpx: 200}, {wpx: 60}, {wpx: 150},{wpx:60}]};
const wopts = { bookType:'xlsx', bookSST:false, type:'binary', defaultCellStyle: defaultCellStyle, showGridLines: true};
......@@ -73,6 +170,9 @@ export default {
'员工':x.CreateByStr,
'应发提成':x.CommissionMoney.toFixed(2),
'收客数':x.PeopleCount,
'奖励金额':x.JLMoney,
'扣除金额':x.KCMoney,
'最终提成':x.LastMoney,
'所属期数':x.Periods
}
data.push(obj)
......@@ -116,6 +216,20 @@ export default {
if (params.type === "see") {
this.getInfo(params.data)
}
else if (params.type === "setop") {
// 设置OP提成
this.setopVisible=true;
this.setform.PeriodsId=this.msg.PeriodsId;
this.setform.EmployeeId=params.data.EmployeeId;
this.setform.CreateByStr=params.data.CreateByStr;
}
else{
this.opdatails=true;
this.detailsMsg.CreateByStr=params.data.CreateByStr;
this.detailsMsg.detailList=params.data.OtherList;
}
},
getCompanyList() {
//获取公司列表
......@@ -200,6 +314,34 @@ export default {
return `<span>${rowData.CommissionMoney.toFixed(2)}</span>`
}
};
let JLMoney = {
field: "JLMoney",
title: "奖励金额",
titleAlign: "left",
columnAlign: "left",
isResize: true,
width: 70,
type: "text"
};
let KCMoney = {
field: "KCMoney",
title: "扣除金额",
titleAlign: "left",
columnAlign: "left",
isResize: true,
width: 70,
type: "text"
};
let LastMoney = {
field: "LastMoney",
title: "最终提成",
titleAlign: "left",
columnAlign: "left",
isResize: true,
width: 80,
type: "text"
};
// let otherMoney = {
// field: "otherMoney",
// title: "额外奖励",
......@@ -268,7 +410,7 @@ export default {
titleAlign: "left",
columnAlign: "left",
isResize: true,
width: 80,
width: 70,
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>`
......@@ -291,7 +433,7 @@ export default {
title: "操作",
titleAlign: "left",
columnAlign: "left",
width: 80,
width: 110,
isResize: false,
componentName: "commission-table-operation"
};
......@@ -300,6 +442,9 @@ export default {
this.columns.push(department);
this.columns.push(userName);
this.columns.push(commissionMoney);
this.columns.push(JLMoney);
this.columns.push(KCMoney);
this.columns.push(LastMoney);
// this.columns.push(otherMoney);
// this.columns.push(backMoney);
// this.columns.push(sumMoney);
......@@ -351,6 +496,7 @@ export default {
this.total = res.data.data.count;
this.dataList.forEach(x=>{
x.sumMoney=x.CommissionMoney
x.btnShow=this.btnShow;
})
this.dataListTwo = JSON.parse(JSON.stringify(this.dataList))
} else {
......@@ -395,6 +541,7 @@ export default {
}
},
mounted() {
this.msg.pageSize = 10000; //不分页
this.msg.PeriodsId = this.$route.query.PeriodsId?this.$route.query.PeriodsId:0;
let dt=new Date()
......@@ -404,9 +551,19 @@ export default {
this.getCompanyList();
},
created(){
let userInfo = this.getLocalStorage();
let ActionMenuCode=userInfo.ActionMenuCode;
if(ActionMenuCode.indexOf('P_OPCommissionSend')!=-1){
this.btnShow=true;
}
Vue.component('commission-table-operation',{
template:`<div style='width:80px;height:40px;background:#fff;text-align:center;position: relative;left:-5px;padding-top: 6px;padding-top:6px;'><el-button type="primary" size='mini' icon="el-icon-view" circle @click="see(rowData,index)"></el-button></div>`,
template:`<div style='width:80px;height:40px;background:#fff;text-align:center;position: relative;left:-5px;padding-top: 6px;padding-top:6px;'>
<el-button type="primary" size='mini' icon="el-icon-view" circle @click="see(rowData,index)"></el-button>
<el-button v-show="rowData.btnShow" type="danger" size='mini' style="font-size:10px" class="iconfont icon-nav-xitongguanli" circle @click="SetOP(rowData,index)"></el-button>
<el-button type="danger" size='mini' style="font-size:10px" class="iconfont icon-nav-hangzheng" circle @click="SeeDetails(rowData,index)"></el-button>
</div>`,
props:{
rowData:{
type:Object
},
......@@ -421,7 +578,15 @@ export default {
see(){
let params = {type:'see',data:this.rowData};
this.$emit('on-custom-comp',params);
}
},
SetOP(){
let params = {type:'setop',data:this.rowData};
this.$emit('on-custom-comp',params);
},
SeeDetails(){
let params = {type:'SeeDetails',data:this.rowData};
this.$emit('on-custom-comp',params);
},
}
})
}
......
......@@ -38,7 +38,7 @@
</li>
<li style="float:right;color:red;font-weight:700">{{tips}}</li>
</ul>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<table style="margin-bottom:30px" class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr>
<th>公司名称</th>
<th style="width:20%">线路名称</th>
......@@ -117,9 +117,7 @@
<el-option v-for="item in LineTeamList" :label='item.LtName' :value='item.LtID' :key='item.LtID'></el-option>
</el-select>
</el-form-item> -->
<el-form-item label="描述">
<el-input class="w220" v-model="form.Description"></el-input>
</el-form-item>
<el-form-item label="线控" prop="XKEmployeeIdList">
<el-select class="multiple_input" filterable multiple collapse-tags v-model="form.XKEmployeeIdList" >
<el-option v-for="item in EmployeeList" :label="item.EmName"
......@@ -158,6 +156,9 @@
<el-form-item v-show="stateShow" label="分助理金额">
<el-input class="w220" @keyup.native="checkInteger(form,'FInternMoney')" v-model="form.FInternMoney"></el-input>
</el-form-item>
<el-form-item label="描述">
<el-input class="w220" v-model="form.Description"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
......@@ -315,24 +316,24 @@ export default {
// this.form.EmployeeIdList.push(-1)
// }
// 公司选择成都
if(this.departmentMsg.RB_Branch_Id!=0){
if(this.form.EmployeeIdList.length==0){
this.Error("请选择分负责OP!")
return;
}
// if(this.departmentMsg.RB_Branch_Id!=0){
// if(this.form.EmployeeIdList.length==0){
// this.Error("请选择分负责OP!")
// return;
// }
// if(this.form.FZLEmployeeIdList.length==0){
// this.Error("请选择分助理!")
// return;
// }
if(this.form.FManagerMoney==0){
this.Error("请填写分负责人金额!")
return;
}
if(this.form.FInternMoney==0){
this.Error("请填写分助理金额!")
return;
}
}
// if(this.form.FManagerMoney==0){
// this.Error("请填写分负责人金额!")
// return;
// }
// if(this.form.FInternMoney==0){
// this.Error("请填写分助理金额!")
// return;
// }
// }
this.$refs[formName].validate((valid) => {
if (valid) {
this.apipost(
......
......@@ -41,6 +41,7 @@
<th>部门</th>
<th>姓名</th>
<th>团号</th>
<th>团队ID</th>
<th>提成金额</th>
<th>收客人数</th>
<th>期数</th>
......@@ -51,6 +52,7 @@
<td>{{item.DepartmentName}}</td>
<td>{{item.CreateByStr}}</td>
<td>{{item.TCNUM}}</td>
<td>{{item.TCID}}</td>
<td>{{item.CommissionMoney}}</td>
<td>{{item.PeopleCount}}</td>
<td>{{item.Periods}}</td>
......@@ -151,7 +153,6 @@
this.loading=true;
this.apipost('sellcommission_GetOPCommissionSingleDetailsList', this.msg, res => {
this.loading=false;
// console.log("res",res)
if(res.data.resultCode == 1) {
this.DataList = res.data.data.pageData;
this.total=res.data.data.count;
......
......@@ -136,7 +136,7 @@
this.apipost("sellorder_post_GetTravelSetLossMoneyInfo",msg,res => {
if (res.data.resultCode == 1) {
this.dataList = res.data.data;
this.dataList.OpSetLossPeople = this.SetShouSunGuestNum
// this.dataList.OpSetLossPeople = this.SetShouSunGuestNum
this.getTotalSun(this.dataList);
} else {
this.Error(res.data.message);
......
......@@ -1413,12 +1413,11 @@ export default {
document.addEventListener(visibilityChangeEvent, onVisibilityChange);
// console.log('initIM',this.firstMenuList.indexOf('IM'))
if(!localStorage.menu){
//this.$store.dispatch("connect");
let aaa=0
this.$store.dispatch("connect");
}else{
this.firstMenuList=JSON.parse(localStorage.menu)
if(this.firstMenuList.indexOf('IM')!=-1){
//this.$store.dispatch("connect");
this.$store.dispatch("connect");
}
}
this.userInfo = this.getLocalStorage();
......
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