Commit e19241cc authored by 黄奎's avatar 黄奎
parents c61002e3 9caf2d4a
......@@ -80,7 +80,7 @@
"less": "^3.9.0",
"less-loader": "^4.1.0",
"node-notifier": "^5.1.2",
"optimize-css-assets-webpack-plugin": "^5.0.1",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",
"portfinder": "^1.0.13",
"postcss-import": "^11.0.0",
......
......@@ -43,7 +43,8 @@ export default {
pageSize: 20,
ParentId: 0,
OrderStr: "RB_Branch_Id asc",
BName:-1
BName:-1,
RB_Branch_Id:-1
},
total: 0,
currentPage: 1,
......@@ -56,7 +57,8 @@ export default {
loading: true,
CompanyList:[],
dataListTwo: [],
stringPerons:''
stringPerons:'',
userInfo: {}
};
},
methods: {
......@@ -133,7 +135,17 @@ export default {
data.forEach(x => {
x.disabled = false;
});
this.CompanyList = data;
if(this.userInfo.RB_Branch_id!=0){
this.CompanyList = data.filter(x=>{
if(x.BName==this.userInfo.BranchName){
return x
}else
return false
})
}else{
this.CompanyList = data;
}
this.initColums();
} else {
}
......@@ -347,6 +359,10 @@ export default {
},
getList() {
this.loading = true;
if(this.userInfo.RB_Branch_id!=0){
this.msg.RB_Branch_Id=this.userInfo.RB_Branch_id
}
this.apipost(
"sellcommission_GetDetailsList",
this.msg,
......@@ -406,7 +422,7 @@ export default {
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.userInfo = this.getLocalStorage();
this.getList();
this.getCompanyList();
},
......
<style>
.CM_look{
padding:4px!important;
position: relative;
top:1px;
}
.CM_look {
padding: 4px !important;
position: relative;
top: 1px;
}
.TCommission-finance {
font-size: 12px;
text-decoration: underline;
cursor: pointer;
margin-right: 5px;
}
</style>
<template>
<div class="flexOne">
......@@ -13,106 +19,175 @@
<input type="button" class="normalBtn" @click="generateTable" value="生成提成报表"/>
</li>
</ul>
</div> -->
</div>-->
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0">
<tr>
<th>期数</th>
<th>提成总金额</th>
<th v-if="userInfo.RB_Branch_id==0 || userInfo.RB_Branch_id==49">提成总金额</th>
<th>{{$t('admin.admin_czPerson')}}</th>
<th>所属公司提成</th>
<th>财务单据</th>
<th>日期</th>
<th>{{$t('system.table_operation')}}</th>
</tr>
<tr v-for="(item,index) in dataList" :key="index">
<td>{{item.periods}}</td>
<td>{{item.sumPrice}}</td>
<td
v-if="userInfo.RB_Branch_id==0 || userInfo.RB_Branch_id==49"
>{{item.sumPrice.toFixed(2)}}</td>
<td>{{item.createByStr}}</td>
<td>{{item.branchMoney.toFixed(2)}}</td>
<td>
<span
class="TCommission-finance"
v-for="(fno, i) in item.financialsArray"
:key="i"
@click="goUrl2(fno)"
>{{fno}}</span>
</td>
<td>{{item.createStr}}</td>
<td>
<!-- <el-tooltip class="item" effect="dark" content="取消" placement="top">
<el-button type="danger" icon="el-icon-delete" circle></el-button>
</el-tooltip> -->
<el-tooltip class="item" effect="dark" content="查看" placement="top">
<el-button type="primary" class="CM_look" @click="goUrl('CommissionDetail',item.id)" icon="iconfont icon-chakan" circle></el-button>
<el-button
type="primary"
class="CM_look"
@click="goUrl('CommissionDetail',item.id)"
icon="iconfont icon-chakan"
title="查看"
circle
></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="制单" placement="top">
<el-button
type="primary"
class="CM_look"
@click="generalFinancacls"
icon="el-icon-plus"
title="制单"
circle
></el-button>
</el-tooltip>
</td>
</tr>
</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>
<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>
</template>
<script>
export default {
data() {
return {
msg: {
PageIndex: 1,
PageSize: 20
},
loading:false,
//数据源
dataList:[],
total:0,
currentPage: 1,
}
},
mounted() {
export default {
data() {
return {
msg: {
PageIndex: 1,
PageSize: 20
},
loading: false,
//数据源
dataList: [],
total: 0,
currentPage: 1,
userInfo: {}
};
},
mounted() {
this.getList();
this.userInfo = this.getLocalStorage();
},
methods: {
handleCurrentChange(val) {
this.msg.PageIndex = val;
this.getList();
},
methods: {
handleCurrentChange(val) {
this.msg.PageIndex = val;
this.getList();
},
goUrl(path,id) {
this.$router.push({
path: path,
query: {
ParentId:id,
blank: 'y',
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
goUrl(path, id) {
this.$router.push({
path: path,
query: {
ParentId: id,
blank: "y",
tab: "报价详情"
}
this.apipost(
"sellcommission_SetGenerateCommission",msg,
res => {
if(res.data.resultCode==1){
this.getList();
this.Success('报表生成成功')
}else{
this.Error(res.data.message);
});
},
//获取数据
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;
this.dataList.forEach(x => {
if (x.financials && x.financials.length > 0) {
x.financialsArray = x.financials.split(",");
}
},
null
);
});
} else {
this.Error(res.data.message);
}
},
null
);
},
goUrl2(id) {
this.$router.push({
path: "/FinancialDocumentsDetail",
query: {
id,
blank: "y",
tab: id + "单据详情"
}
});
},
//生成提成报表
generateTable() {
let msg = {
UserId: 0
};
this.apipost(
"sellcommission_SetGenerateCommission",
msg,
res => {
if (res.data.resultCode == 1) {
this.getList();
this.Success("报表生成成功");
} else {
this.Error(res.data.message);
}
},
null
);
},
generalFinancacls(){
let query = {
blank: "y",
tab: "新增付款单据",
Type:2,
IsUploadPic:1
}
if(this.userInfo.RB_Branch_id==0) {
query.id=28
query.Name="总部销售提成单"
}else{
query.id=30
query.Name="分公司销售提成单"
}
this.$router.push({
path: "/addFinancialDocuments",
query
});
}
}
};
</script>
......@@ -113,8 +113,8 @@
</div>
</div>
<div v-if="shareMsg.shareType==4" class="myDocumentShareDiv">
<div style="height:200px;">
<div style="height:400px;padding:20px;font-size:15px;">
分享到整个集团
</div>
</div>
<div v-if='shareMsg.shareType==1' class="myDocumentShareDiv">
......@@ -778,16 +778,7 @@
},
//按照集团分享
shareGroup(){
this.shareMsg.shareType=4
this.$confirm('是否分享到集团?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.saveShareDocument();
this.outerVisible3=false;
}).catch(() => {
});
this.shareMsg.shareType=4;
},
shareDeparment(){
this.shareMsg.shareType=1
......
......@@ -235,8 +235,8 @@
</div>
</div>
<div v-if="shareMsg.shareType==4" class="myDocumentShareDiv">
<div style="height:200px;">
<div style="height:400px;padding:20px;font-size:15px;">
分享到整个集团
</div>
</div>
<div slot="footer" class="dialog-footer">
......@@ -869,16 +869,7 @@
},
//按照集团分享
shareGroup(){
this.shareMsg.shareType=4
this.$confirm('是否分享到集团?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.saveShareDocument();
this.outerVisible3=false;
}).catch(() => {
});
this.shareMsg.shareType=4;
},
shareDeparment(){
this.shareMsg.shareType=1
......
This diff is collapsed.
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