Commit a4c72007 authored by zhengke's avatar zhengke

绑定数据

parent c86358dc
...@@ -376,7 +376,7 @@ ...@@ -376,7 +376,7 @@
CreateBy:'', CreateBy:'',
OrderId:0 OrderId:0
}, },
userId:0 userId:0,
}; };
}, },
methods: { methods: {
......
...@@ -12,10 +12,14 @@ ...@@ -12,10 +12,14 @@
<template> <template>
<div> <div>
<ul class="ComDetail_nav clearfix"> <!-- <ul class="ComDetail_nav clearfix">
<li :class="active==1?'_active':''" @click="active=1,commonName='姓名'">按人排序</li> <li :class="active==1?'_active':''" @click="active=1,commonName='姓名'">按人排序</li>
<li :class="active==2?'_active':''" @click="active=2,commonName='公司名'">按公司排序</li> <li :class="active==2?'_active':''" @click="active=2,commonName='公司名'">按公司排序</li>
</ul> </ul> -->
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="按人排序" name="first"></el-tab-pane>
<el-tab-pane label="按公司排序" name="second"></el-tab-pane>
</el-tabs>
<table border="0" cellspacing="0" cellpadding="0" class="singeRowTable"> <table border="0" cellspacing="0" cellpadding="0" class="singeRowTable">
<tr> <tr>
<th width="300">{{commonName}}</th> <th width="300">{{commonName}}</th>
...@@ -24,30 +28,99 @@ ...@@ -24,30 +28,99 @@
<th width="500">备注</th> <th width="500">备注</th>
<th>操作</th> <th>操作</th>
</tr> </tr>
<tr> <tr v-for="item in dataList">
<td>张三疯</td> <td>{{item.createByStr}}</td>
<td>20000</td> <td>{{item.commissionMoney}}</td>
<td>第三期</td> <td>{{item.periods}}</td>
<td>我是备注我是备注</td> <!-- <td>{{item.ruleName}}</td> -->
<td></td>
<td> <td>
<span class="CD_orderNum">89757</span> <input type="button" @click="getInfo(item)" class="normalBtn" value="详情"/>
</td> </td>
</tr> </tr>
</table> </table>
<!-- 分页 -->
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
layout="total,prev, pager, next, jumper" :page-size='msg.pageSize' :total='total'>
</el-pagination>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data(){ data(){
return{ return{
active:1, activeName: "first",
commonName:'姓名' commonName:'姓名',
loading:false,
msg:{
pageIndex: 1,
pageSize: 20,
ParentId:0,
OrderStr:'UserId'
},
total:0,
currentPage: 1,
dataList:[]
} }
},methods:{ },methods:{
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
getList(){
this.loading = true;
this.apipost(
"sellcommission_GetDetailsList",
this.msg,
res => {
this.loading = false;
if(res.data.resultCode==1){
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
console.log(this.dataList,'dataList');
}else{
this.Error(res.data.message);
}
},
null
);
},
//切换排序
handleClick(tab, event) {
if (this.activeName == "first") {
// this.commonName='姓名'
this.msg.OrderStr = 'UserId'
}else {
// this.commonName='公司名'
this.msg.OrderStr = 'RB_Branch_Id'
}
this.getList();
},
//跳转
getInfo(item){
var dateStr = item.periods;
var year = dateStr.substring(0,4);
var month = dateStr.substring(4,6);
},mounted(){ var nextMonthFirstDay=new Date(year,month,1);
var oneDay=1000*60*60*24;
var entDay = new Date(nextMonthFirstDay-oneDay).Format("yyyy-MM-dd");
var startDay = year + '-' + month + '-' + '01';
var userId = item.userId;
this.$router.push({
path: 'enrollTotal',
query: {
EmployeeId:userId,
starTime:startDay,
endTime:entDay,
}
});
}
},mounted(){
this.msg.ParentId = this.$route.query.ParentId;
this.getList();
} }
} }
</script> </script>
......
...@@ -10,37 +10,37 @@ ...@@ -10,37 +10,37 @@
<div class="query-box"> <div class="query-box">
<ul> <ul>
<li> <li>
<input type="button" class="normalBtn" value="生成提成报表"/> <input type="button" class="normalBtn" @click="generateTable" value="生成提成报表"/>
</li> </li>
</ul> </ul>
</div> </div>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0"> <table class="singeRowTable" border="0" cellspacing="0" cellpadding="0">
<tr> <tr>
<th>期数</th> <th>期数</th>
<th>总价</th> <th>提成总金额</th>
<th>操作人</th> <th>操作人</th>
<th>日期</th> <th>日期</th>
<th>操作</th> <th>操作</th>
</tr> </tr>
<tr> <tr v-for="item in dataList">
<td>第一期</td> <td>{{item.periods}}</td>
<td>8888</td> <td>{{item.sumPrice}}</td>
<td>张三疯</td> <td>{{item.createByStr}}</td>
<td>2019-2-1</td> <td>{{item.createStr}}</td>
<td> <td>
<el-tooltip class="item" effect="dark" content="取消" placement="top"> <!-- <el-tooltip class="item" effect="dark" content="取消" placement="top">
<el-button type="danger" icon="el-icon-delete" circle></el-button> <el-button type="danger" icon="el-icon-delete" circle></el-button>
</el-tooltip> </el-tooltip> -->
<el-tooltip class="item" effect="dark" content="查看" placement="top"> <el-tooltip class="item" effect="dark" content="查看" placement="top">
<el-button type="primary" class="CM_look" @click="goUrl('CommissionDetail')" icon="iconfont icon-chakan" circle></el-button> <el-button type="primary" class="CM_look" @click="goUrl('CommissionDetail',item.id)" icon="iconfont icon-chakan" circle></el-button>
</el-tooltip> </el-tooltip>
</td> </td>
</tr> </tr>
</table> </table>
<!-- 分页 --> <!-- 分页 -->
<!-- <el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage" <el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
layout="total,prev, pager, next, jumper" :page-size=msg.pageSize :total=total> layout="total,prev, pager, next, jumper" :page-size='msg.PageSize' :total='total'>
</el-pagination> --> </el-pagination>
</div> </div>
</template> </template>
...@@ -48,23 +48,71 @@ ...@@ -48,23 +48,71 @@
export default { export default {
data() { data() {
return { return {
msg: {
PageIndex: 1,
PageSize: 20
},
loading:false,
//数据源
dataList:[],
total:0,
currentPage: 1,
} }
}, },
mounted() { mounted() {
this.getList();
}, },
methods: { methods: {
goUrl(path) { handleCurrentChange(val) {
this.msg.PageIndex = val;
this.getList();
},
goUrl(path,id) {
this.$router.push({ this.$router.push({
path: path, path: path,
query: { query: {
ParentId:id,
blank: 'y', blank: 'y',
tab: '报价详情' tab: '报价详情'
} }
}); });
}, },
//获取数据
getList() {
this.loading = true;
this.apipost(
"sellcommission_GetPageList",
this.msg,
res => {
this.loading = false;
if(res.data.resultCode==1){
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
}else{
this.Error(res.data.message);
}
},
null
);
},
//生成提成报表
generateTable(){
let msg = {
UserId: 0
}
this.apipost(
"sellcommission_SetGenerateCommission",msg,
res => {
if(res.data.resultCode==1){
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
}else{
this.Error(res.data.message);
}
},
null
);
}
} }
} }
</script> </script>
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