Commit 056008a1 authored by 黄奎's avatar 黄奎

页面修改

parent ce2180ce
...@@ -4,20 +4,27 @@ ...@@ -4,20 +4,27 @@
padding: 18px 0 0 16px; padding: 18px 0 0 16px;
text-align: right; text-align: right;
} }
.salesCommission .border-bottom { .salesCommission .border-bottom {
/* border-bottom: 1px dashed #EEE; */ /* border-bottom: 1px dashed #EEE; */
padding-bottom: 5px; padding-bottom: 5px;
margin-bottom: 5px; margin-bottom: 5px;
} }
.salesCommission .text-bottom{
height: 32px;line-height: 32px; margin-bottom: 10px; .salesCommission .text-bottom {
height: 32px;
line-height: 32px;
margin-bottom: 10px;
} }
.salesCommission ._icon_btn i.icon-sousuo { .salesCommission ._icon_btn i.icon-sousuo {
background-color: #47BF8C; background-color: #47BF8C;
} }
.salesCommission ._icon_btn .icon-add{
.salesCommission ._icon_btn .icon-add {
background-color: #47BF8C; background-color: #47BF8C;
} }
.salesCommission ._icon_btn i { .salesCommission ._icon_btn i {
width: 26px; width: 26px;
height: 26px; height: 26px;
...@@ -30,14 +37,13 @@ ...@@ -30,14 +37,13 @@
cursor: pointer; cursor: pointer;
outline: none; outline: none;
} }
.salesCommission .el-table td,.el-table th{
.salesCommission .el-table td,
.el-table th {
padding: 5px 0; padding: 5px 0;
} }
</style>
<template>
</style>
<template>
<div class="page-body salesCommission"> <div class="page-body salesCommission">
<div class="page-search row items-center"> <div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
...@@ -53,87 +59,68 @@ ...@@ -53,87 +59,68 @@
<div v-if='isgenerate==true'> <div v-if='isgenerate==true'>
<div class="block" style="display:flex"> <div class="block" style="display:flex">
<span style="margin-right: 5px;">选择月份</span> <span style="margin-right: 5px;">选择月份</span>
<el-date-picker <el-date-picker v-model="value2" type="month" placeholder="选择月">
v-model="value2"
type="month"
placeholder="选择月">
</el-date-picker> </el-date-picker>
<q-btn :loading="loading1" color="primary" size="11px" label="生成提成" @click="scCommission" style="margin-left:10px"/> <q-btn :loading="loading1"  color="primary"  size="11px"  label="生成提成"  @click="scCommission"
 style="margin-left:10px" />
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<template > <template>
<el-table <el-table ref="filterTable" :data="tableData" v-loading='loading'
ref="filterTable" :header-cell-style="{backgroundColor:'#f5f6f7', color: '#a8a8b3'}" border style="width: 100%">
:data="tableData" <el-table-column prop="Periods" label="周期"></el-table-column>
v-loading = 'loading' <el-table-column prop="SumPrice" label="提成总金额"> </el-table-column>
:header-cell-style="{backgroundColor:'#f5f6f7', color: '#a8a8b3'}" <el-table-column prop="SchooldCommission" label="校区提成总金额">
border
style="width: 100%">
<!-- <el-table-column prop="Id" label="ID" ></el-table-column> -->
<el-table-column prop="Periods" label="周期" ></el-table-column>
<el-table-column prop="SumPrice" label="提成总金额" > </el-table-column>
<el-table-column prop="SchooldCommission" label="校区提成总金额" >
<template slot-scope="scope"> <template slot-scope="scope">
<div style="display: flex;flex-wrap: wrap;" v-if='scope.row.SchooldCommission>=0'> <div style="display: flex;flex-wrap: wrap;" v-if='scope.row.SchooldCommission>=0'>
{{scope.row.SchooldCommission>=0?scope.row.SchooldCommission:'-'}} {{scope.row.SchooldCommission>=0?scope.row.SchooldCommission:'-'}}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="FrIdList" label="财务单据" > <el-table-column prop="FrIdList" label="财务单据">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="display: flex;flex-wrap: wrap;" v-if='scope.row.FrIdList.length>0'> <div style="display: flex;flex-wrap: wrap;" v-if='scope.row.FrIdList.length>0'>
<span v-for="(x,y) in scope.row.FrIdList" @click="gocaiwuxiangq(x)" style="cursor: pointer;text-decoration: underline;margin-right: 5px; color: #409EFF;">{{x}}</span> <span v-for="(x,y) in scope.row.FrIdList" :key="y" @click="gocaiwuxiangq(x)"
style="cursor: pointer;text-decoration: underline;margin-right: 5px; color: #409EFF;">{{x}}</span>
</div> </div>
<div v-else></div> <div v-else></div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="CreateByName" label="创建人" > </el-table-column> <el-table-column prop="CreateByName" label="创建人"> </el-table-column>
<el-table-column prop="CreateTime" label="创建时间" > </el-table-column> <el-table-column prop="CreateTime" label="创建时间"> </el-table-column>
<el-table-column label="操作" > <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="_icon_btn"> <div class="_icon_btn">
<el-tooltip class="item" effect="dark" content="查看" placement="top"> <el-tooltip class="item" effect="dark" content="查看" placement="top">
<i class="iconfont icon-sousuo" <i class="iconfont icon-sousuo" @click="goUrl(scope.row.Id)"></i>
@click="goUrl(scope.row.Id)"></i>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" content="制单" placement="top" v-if='iscMaker==true'> <el-tooltip class="item" effect="dark" content="制单" placement="top" v-if='iscMaker==true'>
<i class="iconfont icon-add" v-if='iscMaker==true' <i class="iconfont icon-add" v-if='iscMaker==true' @click="generalFinancacls(scope.row)"></i>
@click="generalFinancacls(scope.row)"></i>
</el-tooltip> </el-tooltip>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="margin-top: 10px;text-align: center;"> <div style="margin-top: 10px;text-align: center;">
<el-pagination background @current-change="handleCurrentChanges" layout="total,prev, pager, next, jumper" :current-page.sync="msg.PageIndex" <el-pagination background @current-change="handleCurrentChanges" layout="total,prev, pager, next, jumper"
:page-size="msg.PageSize" :total='total'> :current-page.sync="msg.PageIndex" :page-size="msg.PageSize" :total='total'>
</el-pagination> </el-pagination>
</div> </div>
</template> </template>
<el-dialog title="设置发放用户" width="700px" <el-dialog title="设置发放用户" width="700px" :visible.sync="costmode" center>
:visible.sync="costmode" center > <el-table :data="SendEmployeeList" border @selection-change="handleSelectionChange" style="width: 100%">
<el-table
:data="SendEmployeeList"
border
@selection-change="handleSelectionChange"
style="width: 100%">
<el-table-column type="selection" width="55" :selectable="checkSelectable"></el-table-column> <el-table-column type="selection" width="55" :selectable="checkSelectable"></el-table-column>
<el-table-column prop="UserName" label="用户" > </el-table-column> <el-table-column prop="UserName" label="用户"> </el-table-column>
<el-table-column prop="StudentCount" label="客人数量" > </el-table-column> <el-table-column prop="StudentCount" label="客人数量"> </el-table-column>
<el-table-column prop="CurrentPeriodMoney" label="应发提成金额" > </el-table-column> <el-table-column prop="CurrentPeriodMoney" label="应发提成金额"> </el-table-column>
<el-table-column prop="IsGiveOut" label="是否已发放" > <el-table-column prop="IsGiveOut" label="是否已发放">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if='scope.row.IsGiveOut==1'>已发放</span> <span v-if='scope.row.IsGiveOut==1'>已发放</span>
<span v-if='scope.row.IsGiveOut==2'>未发放</span> <span v-if='scope.row.IsGiveOut==2'>未发放</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="margin-top: 10px;">金额总额:{{totalAmount}}</div> <div style="margin-top: 10px;">金额总额:{{totalAmount}}</div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -141,17 +128,16 @@ ...@@ -141,17 +128,16 @@
<el-button class="normalBtn" type="primary" @click="preservetransaction()">确定</el-button> <el-button class="normalBtn" type="primary" @click="preservetransaction()">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { import {
getSchoolDropdown getSchoolDropdown
} from '../../../api/school/index' } from '../../../api/school/index'
import { import {
GetClassTypePageList, GetClassTypePageList,
} from '../../../api/system/index'; } from '../../../api/system/index';
import{ import {
getSellAchievementsPeriodsPageList, getSellAchievementsPeriodsPageList,
setSellCommissionRule, setSellCommissionRule,
setAchievementsCommissionInfo, setAchievementsCommissionInfo,
...@@ -168,49 +154,48 @@ ...@@ -168,49 +154,48 @@
return { return {
loading: false, loading: false,
loading1: false, loading1: false,
value2:'', value2: '',
//列表数据参数 //列表数据参数
msg: { msg: {
PageIndex: 1, PageIndex: 1,
PageSize: 15, PageSize: 15,
SchoolId:'-1' SchoolId: '-1'
}, },
pageCount: 0, pageCount: 0,
persistent: false, persistent: false,
listData:{}, listData: {},
tableData:[], tableData: [],
total:0, total: 0,
CompanyList:[], CompanyList: [],
isgenerate:false,//是否有生成的权限 isgenerate: false, //是否有生成的权限
iscMaker:false,//是否有制单的权限 iscMaker: false, //是否有制单的权限
SendEmployeeList:[],//可发放提成的用户列表 SendEmployeeList: [], //可发放提成的用户列表
costmode:false, costmode: false,
multipleSelection:[], multipleSelection: [],
totalAmount:0,//选中的金额总额 totalAmount: 0, //选中的金额总额
CheckID:0, CheckID: 0,
} }
}, },
created() { created() {
let userinfo = this.getLocalStorage(); let userinfo = this.getLocalStorage();
userinfo.ActionMenuList.map(x=>{//判断权限 userinfo.ActionMenuList.map(x => { //判断权限
if(x.FunctionCode == "SAGenerate_Commission"){//判断是否有生成的权限 if (x.FunctionCode == "SAGenerate_Commission") { //判断是否有生成的权限
this.isgenerate = true; this.isgenerate = true;
} }
if(x.FunctionCode == "SACommission_maker"){//判断是否有制单的权限 if (x.FunctionCode == "SACommission_maker") { //判断是否有制单的权限
this.iscMaker = true; this.iscMaker = true;
} }
}) })
var myDate=new Date(); var myDate = new Date();
myDate.setMonth(myDate.getMonth()-1); myDate.setMonth(myDate.getMonth() - 1);
this.value2 = myDate.getFullYear() + "-" + (myDate.getMonth()+1) this.value2 = myDate.getFullYear() + "-" + (myDate.getMonth() + 1)
}, },
mounted() { mounted() {
this.getList();//获取提成周期列表 this.getList(); //获取提成周期列表
this.getBranchList() this.getBranchList()
}, },
methods: { methods: {
getList(){ getList() {
this.loading = true; this.loading = true;
getSellAchievementsPeriodsPageList(this.msg).then(res => { getSellAchievementsPeriodsPageList(this.msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
...@@ -220,10 +205,12 @@ ...@@ -220,10 +205,12 @@
} }
}) })
}, },
scCommission(){//生成提成 scCommission() { //生成提成
if(this.loading1 == false){ if (this.loading1 == false) {
this.loading1= true; this.loading1 = true;
setAchievementsCommissionInfo({Month:this.value2}).then(res => { setAchievementsCommissionInfo({
Month: this.value2
}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.$q.notify({ this.$q.notify({
icon: 'iconfont icon-chenggong', icon: 'iconfont icon-chenggong',
...@@ -234,20 +221,19 @@ ...@@ -234,20 +221,19 @@
}) })
this.getList() this.getList()
} }
this.loading1= false; this.loading1 = false;
}).catch(err=>{ }).catch(err => {
this.loading1= false; this.loading1 = false;
}) })
} }
}, },
getBranchList(){//获取校区 getBranchList() { //获取校区
getSchoolDropdown({}).then(res => { getSchoolDropdown({}).then(res => {
this.CompanyList = res.Data; this.CompanyList = res.Data;
}).catch(() => { }).catch(() => {
}) })
}, },
goUrl(id ) { goUrl(id) {
this.$router.push({ this.$router.push({
path: '/financial/market/employeeCommission', path: '/financial/market/employeeCommission',
query: { query: {
...@@ -256,54 +242,52 @@ ...@@ -256,54 +242,52 @@
} }
}) })
}, },
gocaiwuxiangq(id){ gocaiwuxiangq(id) {
this.OpenNewUrl("/financial/financalDocument/FinancialDocumentsDetail", { this.OpenNewUrl("/financial/financalDocument/FinancialDocumentsDetail", {
id: id id: id
}); });
}, },
generalFinancacls(item) { generalFinancacls(item) {
this.CheckID = item.Id this.CheckID = item.Id
if(this.msg.SchoolId == -1){ if (this.msg.SchoolId == -1) {
if(item.SumPrice>0){ if (item.SumPrice > 0) {
this.tishi(item.SumPrice,item.Id) this.tishi(item.SumPrice, item.Id)
}else{ } else {
this.$message.error('提成总金额为0') this.$message.error('提成总金额为0')
} }
}else{ } else {
if(item.SchooldCommission>0){ if (item.SchooldCommission > 0) {
this.goaddFinancial(item.SchooldCommission,item.Id,'') this.goaddFinancial(item.SchooldCommission, item.Id, '')
}else{ } else {
this.$message.error('校区提成总金额为0') this.$message.error('校区提成总金额为0')
} }
} }
}, },
goaddFinancial(Money,Id,EmpIds){ goaddFinancial(Money, Id, EmpIds) {
let School_Id = 0; let School_Id = 0;
let obj = { let obj = {
CostType: 316, CostType: 316,
Money: Money, Money: Money,
CurrencyId: 21, CurrencyId: 21,
XSTC: 1, XSTC: 1,
School_Id:this.msg.SchoolId == -1?0:this.msg.SchoolId, School_Id: this.msg.SchoolId == -1 ? 0 : this.msg.SchoolId,
OtherType:50,//业绩提成 OtherType: 50, //业绩提成
ReFinanceId:Id, ReFinanceId: Id,
ReFinanceId2:this.msg.SchoolId, ReFinanceId2: this.msg.SchoolId,
EduCommissionEmp:EmpIds EduCommissionEmp: EmpIds
} }
let query = { let query = {
blank: "y", blank: "y",
tab: "新增付款单据", tab: "新增付款单据",
Type: 2, Type: 2,
IsUploadPic: 1, IsUploadPic: 1,
Name:'销售提成单', Name: '销售提成单',
id:143, id: 143,
orderObj: JSON.stringify(obj) orderObj: JSON.stringify(obj)
} }
this.OpenNewUrl("/financial/financalDocument/addFinancialDocuments", query) this.OpenNewUrl("/financial/financalDocument/addFinancialDocuments", query)
}, },
tishi(Money,Id){ tishi(Money, Id) {
let that = this let that = this
this.$q.dialog({ this.$q.dialog({
title: "销售制单", title: "销售制单",
...@@ -322,32 +306,33 @@ ...@@ -322,32 +306,33 @@
this.getcomSendEmployeeList(Id) this.getcomSendEmployeeList(Id)
}); });
}, },
getcomSendEmployeeList(Id){//获取可发放提成的用户 getcomSendEmployeeList(Id) { //获取可发放提成的用户
getSellAchievementsSendEmployeeList({PeriodId:Id}).then(res => { getSellAchievementsSendEmployeeList({
PeriodId: Id
}).then(res => {
this.SendEmployeeList = res.Data; this.SendEmployeeList = res.Data;
this.costmode = true this.costmode = true
}).catch(() => { }).catch(() => {
}) })
}, },
handleCurrentChanges(val){ handleCurrentChanges(val) {
this.msg.PageIndex= val; this.msg.PageIndex = val;
this.getList() this.getList()
}, },
checkSelectable(row){ checkSelectable(row) {
return row.IsGiveOut==2 return row.IsGiveOut == 2
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
let zong = 0 let zong = 0
this.multipleSelection.forEach(x=>{ this.multipleSelection.forEach(x => {
zong = this.accAdd(zong,x.CurrentPeriodMoney) zong = this.accAdd(zong, x.CurrentPeriodMoney)
}) })
this.totalAmount = zong this.totalAmount = zong
}, },
preservetransaction(){ preservetransaction() {
let that = this let that = this
if( this.multipleSelection.length == 0){ if (this.multipleSelection.length == 0) {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
...@@ -371,26 +356,24 @@ ...@@ -371,26 +356,24 @@
}).onOk(() => { }).onOk(() => {
let EmpIds = ''; let EmpIds = '';
let data = [] let data = []
this.multipleSelection.forEach(x=>{ this.multipleSelection.forEach(x => {
data.push(x.UserId) data.push(x.UserId)
}) })
EmpIds = data.join(',') EmpIds = data.join(',')
setSellAchievementsSendEmployee({PeriodId:this.CheckID,EmpIds:EmpIds}).then(res => { setSellAchievementsSendEmployee({
this.goaddFinancial(this.totalAmount,this.CheckID,EmpIds) PeriodId: this.CheckID,
EmpIds: EmpIds
}).then(res => {
this.goaddFinancial(this.totalAmount, this.CheckID, EmpIds)
this.$message.success('设置成功'); this.$message.success('设置成功');
}).catch(() => { }).catch(() => {
}) })
}); });
} }
}, },
} }
</script>
</script> <style lang="sass">
<style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style>
</style> \ No newline at end of file
\ No newline at end of file
...@@ -2,12 +2,62 @@ ...@@ -2,12 +2,62 @@
</style> </style>
<template> <template>
<div class="page-body empBonus">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div>
<div class="block" style="display:flex">
<span style="margin-right: 5px;">选择月份</span>
<el-date-picker v-model="value2" type="month" placeholder="选择月">
</el-date-picker>
<q-btn :loading="loading1"  color="primary"  size="11px"  label="生成提成"  @click="createBonus"
 style="margin-left:10px" />
</div>
</div>
</div>
</div>
<template>
<el-table ref="filterTable" :data="dataList" v-loading='loading'
:header-cell-style="{backgroundColor:'#f5f6f7', color: '#a8a8b3'}" border style="width: 100%">
<el-table-column prop="Periods" label="周期"></el-table-column>
<el-table-column prop="Name" label="名称"></el-table-column>
<el-table-column prop="SumPrice" label="人头奖励总金额"> </el-table-column>
<el-table-column prop="FrIdList" label="财务单据">
<template slot-scope="scope">
</template>
</el-table-column>
<el-table-column prop="CreateByName" label="创建人"> </el-table-column>
<el-table-column prop="CreateTime" label="创建时间"> </el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<div class="_icon_btn">
<el-tooltip class="item" effect="dark" content="查看" placement="top">
<i class="iconfont icon-sousuo" @click="goUrl(scope.row.Id)"></i>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="制单" placement="top" >
<i class="iconfont icon-add" ></i>
</el-tooltip>
</div>
</template>
</el-table-column>
</el-table>
<div style="margin-top: 10px;text-align: center;">
<el-pagination background @current-change="handleCurrentChanges" layout="total,prev, pager, next, jumper"
:current-page.sync="msg.PageIndex" :page-size="msg.PageSize" :total='total'>
</el-pagination>
</div>
</template>
</div>
</template> </template>
<script> <script>
import { import {
getSchoolDropdown CreateEmpBonus,
} from '../../../api/school/index' queryPersonnelPeriodPage
} from '../../../api/finance/index'
export default { export default {
meta: { meta: {
...@@ -15,7 +65,7 @@ ...@@ -15,7 +65,7 @@
}, },
props: {}, props: {},
components: { components: {
selectTree
}, },
data() { data() {
return { return {
...@@ -25,16 +75,32 @@ ...@@ -25,16 +75,32 @@
PageIndex: 1, PageIndex: 1,
PageSize: 10, PageSize: 10,
}, },
pageCount: 0,
total: 0,
dataList: {},
value2: "",
} }
}, },
created() { created() {
let userinfo = this.getLocalStorage(); let userinfo = this.getLocalStorage();
}, },
mounted() { mounted() {
this.getList();
}, },
methods: { methods: {
//生成提成
createBonus() {
console.log("value2", this.value2);
},
//获取分页列表
getList() {
queryPersonnelPeriodPage(this.msg).then(res => {
console.log("res", res);
this.dataList = res.Data.PageData
this.pageCount = res.Data.PageCount;
this.total = res.Data.Count;
});
}
}, },
} }
</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