Commit 637e1f3a authored by 黄奎's avatar 黄奎

页面修改

parent 1910bf7b
<style> <style>
.CM_look { .CM_look {
padding: 4px !important; padding: 4px !important;
position: relative; position: relative;
top: 1px; top: 1px;
} }
.TCommission-finance {
font-size: 12px; .TCommission-finance {
text-decoration: underline; font-size: 12px;
cursor: pointer; text-decoration: underline;
margin-right: 5px; cursor: pointer;
} margin-right: 5px;
}
</style> </style>
<template> <template>
<div class="flexOne"> <div class="flexOne">
<!-- <div class="query-box">
<ul>
<li>
<input type="button" class="normalBtn" @click="generateTable" value="生成提成报表"/>
</li>
</ul>
</div>-->
<table v-loading="loading" class="singeRowTable" border="0" cellspacing="0" cellpadding="0"> <table v-loading="loading" class="singeRowTable" border="0" cellspacing="0" cellpadding="0">
<tr> <tr>
<th>期数</th> <th>期数</th>
...@@ -32,179 +27,155 @@ ...@@ -32,179 +27,155 @@
</tr> </tr>
<tr v-for="(item,index) in dataList" :key="index"> <tr v-for="(item,index) in dataList" :key="index">
<td>{{item.periods}}</td> <td>{{item.periods}}</td>
<td <td v-if="userInfo.RB_Branch_id==0 || userInfo.RB_Branch_id==49">{{item.sumPrice.toFixed(2)}}</td>
v-if="userInfo.RB_Branch_id==0 || userInfo.RB_Branch_id==49"
>{{item.sumPrice.toFixed(2)}}</td>
<td>{{item.createByStr}}</td> <td>{{item.createByStr}}</td>
<td>{{item.branchMoney.toFixed(2)}}</td> <td>{{item.branchMoney.toFixed(2)}}</td>
<td> <td>
<span <span class="TCommission-finance" v-for="(fno, i) in item.financialsArray" :key="i"
class="TCommission-finance" @click="goUrl2(fno)">{{fno}}</span>
v-for="(fno, i) in item.financialsArray"
:key="i"
@click="goUrl2(fno)"
>{{fno}}</span>
</td> </td>
<td>{{item.createStr}}</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 <el-button type="primary" class="CM_look" @click="goUrl('CommissionDetail',item.id)"
type="primary" icon="iconfont icon-chakan" title="查看" circle></el-button>
class="CM_look"
@click="goUrl('CommissionDetail',item.id)"
icon="iconfont icon-chakan"
title="查看"
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 v-if="btnShow" <el-button v-if="btnShow" type="primary" class="CM_look" @click="generalFinancacls(item)"
type="primary" icon="el-icon-plus" title="制单" circle></el-button>
class="CM_look"
@click="generalFinancacls(item)"
icon="el-icon-plus"
title="制单"
circle
></el-button>
</el-tooltip> </el-tooltip>
</td> </td>
</tr> </tr>
</table> </table>
<!-- 分页 --> <!-- 分页 -->
<el-pagination <el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
background layout="total,prev, pager, next, jumper" :page-size="msg.PageSize" :total="total"></el-pagination>
@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 {
msg: { msg: {
PageIndex: 1, PageIndex: 1,
PageSize: 20 PageSize: 20
}, },
loading: false, loading: false,
//数据源 //数据源
dataList: [], dataList: [],
total: 0, total: 0,
currentPage: 1, currentPage: 1,
userInfo: {}, userInfo: {},
btnShow:false, btnShow: false,
}; };
},
mounted() {
this.getList();
this.userInfo = this.getLocalStorage();
let userInfo = this.getLocalStorage();
let ActionMenuCode=userInfo.ActionMenuCode;
if(ActionMenuCode.indexOf('CommissionVoucher')!=-1){
this.btnShow=true;
}
},
methods: {
handleCurrentChange(val) {
this.msg.PageIndex = val;
this.getList();
}, },
goUrl(path, id) { mounted() {
this.$router.push({ this.getList();
path: path, this.userInfo = this.getLocalStorage();
query: { let userInfo = this.getLocalStorage();
ParentId: id, let ActionMenuCode = userInfo.ActionMenuCode;
blank: "y", if (ActionMenuCode.indexOf('CommissionVoucher') != -1) {
tab: "报价详情" this.btnShow = true;
} }
});
}, },
//获取数据 methods: {
getList() { handleCurrentChange(val) {
this.loading = true; this.msg.PageIndex = val;
this.apipost( this.getList();
"sellcommission_GetPageList", },
this.msg, goUrl(path, id) {
res => { this.$router.push({
this.loading = false; path: path,
if (res.data.resultCode == 1) { query: {
this.dataList = res.data.data.pageData; ParentId: id,
this.total = res.data.data.count; blank: "y",
this.dataList.forEach(x => { tab: "报价详情"
if (x.financials && x.financials.length > 0) {
x.financialsArray = x.financials.split(",");
}
});
} else {
this.Error(res.data.message);
} }
}, });
null },
); //获取数据
}, getList() {
goUrl2(id) { this.loading = true;
this.$router.push({ this.apipost(
path: "/FinancialDocumentsDetail", "sellcommission_GetPageList",
query: { this.msg,
id, 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(",");
}
});
} 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(item) {
if (item.financialsArray && item.financialsArray.length > 0) {
this.Error("请不要多次制单!")
return;
}
let obj = {
CostType: 16,
Money: item.branchMoney,
CurrencyId: 1,
XSTC: 1,
}
let query = {
blank: "y", blank: "y",
tab: id + "单据详情" tab: "新增付款单据",
Type: 2,
IsUploadPic: 1,
orderObj: JSON.stringify(obj)
} }
}); if (this.userInfo.RB_Branch_id == 0) {
}, query.id = 28
//生成提成报表 query.Name = "总部销售提成单"
generateTable() { } else {
let msg = { query.id = 30
UserId: 0 query.Name = "分公司销售提成单"
}; }
this.apipost( this.$router.push({
"sellcommission_SetGenerateCommission", path: "/addFinancialDocuments",
msg, query
res => { });
if (res.data.resultCode == 1) {
this.getList();
this.Success("报表生成成功");
} else {
this.Error(res.data.message);
}
},
null
);
},
generalFinancacls(item){
if(item.financialsArray&&item.financialsArray.length>0){
this.Error("请不要多次制单!")
return;
}
let obj = {
CostType: 16,
Money: item.branchMoney,
CurrencyId: 1,
XSTC: 1,
}
let query = {
blank: "y",
tab: "新增付款单据",
Type:2,
IsUploadPic:1,
orderObj: JSON.stringify(obj)
}
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>
</script> \ No newline at end of file
...@@ -286,12 +286,6 @@ export default { ...@@ -286,12 +286,6 @@ export default {
isResize: true, isResize: true,
width: 80, width: 80,
componentName: "commission-table-beizhu" componentName: "commission-table-beizhu"
// formatter: function(rowData, rowIndex, pagingIndex, field) {
// return `<span v-if="${rowData.EmployeeId==0 && oPComissionPeriods.FRID>0}">
// <span>${rowData.EmployeeId}</span>
// 单据号:${oPComissionPeriods.FRID}</span>`;
// }
}; };
let opera = { let opera = {
title: "操作", title: "操作",
......
...@@ -286,12 +286,6 @@ export default { ...@@ -286,12 +286,6 @@ export default {
isResize: true, isResize: true,
width: 80, width: 80,
componentName: "commission-table-beizhu" componentName: "commission-table-beizhu"
// formatter: function(rowData, rowIndex, pagingIndex, field) {
// return `<span v-if="${rowData.EmployeeId==0 && oPComissionPeriods.FRID>0}">
// <span>${rowData.EmployeeId}</span>
// 单据号:${oPComissionPeriods.FRID}</span>`;
// }
}; };
let opera = { let opera = {
title: "操作", title: "操作",
......
...@@ -1009,7 +1009,6 @@ ...@@ -1009,7 +1009,6 @@
}, },
resetForm(formName) { //弹出框取消 初始化谈框内表单 resetForm(formName) { //弹出框取消 初始化谈框内表单
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
// this.addMsg1.EmployeeId='0'
}, },
addData() { //新增数据 addData() { //新增数据
if (this.addMsg.ManagerIdArr.length > 0) { if (this.addMsg.ManagerIdArr.length > 0) {
......
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