Commit ec0f891c authored by 黄奎's avatar 黄奎

页面修改

parent 5e4300bf
<style> <style>
.baseSet_Title { .baseSet_Title {
width: 120px !important; width: 120px !important;
padding: 18px 0 0 16px; padding: 18px 0 0 16px;
text-align: right; text-align: right;
} }
.ReturnperiodsList .border-bottom {
/* border-bottom: 1px dashed #EEE; */ .ReturnperiodsList .border-bottom {
padding-bottom: 5px; /* border-bottom: 1px dashed #EEE; */
margin-bottom: 5px; padding-bottom: 5px;
} margin-bottom: 5px;
.ReturnperiodsList .text-bottom{ }
height: 32px;line-height: 32px; margin-bottom: 10px;
} .ReturnperiodsList .text-bottom {
.ReturnperiodsList ._icon_btn i.icon-sousuo { height: 32px;
line-height: 32px;
margin-bottom: 10px;
}
.ReturnperiodsList ._icon_btn i.icon-sousuo {
background-color: #47BF8C; background-color: #47BF8C;
} }
.ReturnperiodsList ._icon_btn .icon-add{
.ReturnperiodsList ._icon_btn .icon-add {
background-color: #47BF8C; background-color: #47BF8C;
} }
.ReturnperiodsList ._icon_btn i {
.ReturnperiodsList ._icon_btn i {
width: 26px; width: 26px;
height: 26px; height: 26px;
display: inline-block; display: inline-block;
...@@ -30,256 +37,227 @@ ...@@ -30,256 +37,227 @@
cursor: pointer; cursor: pointer;
outline: none; outline: none;
} }
.ReturnperiodsList .el-table td,.el-table th{
.ReturnperiodsList .el-table td,
.el-table th {
padding: 5px 0; padding: 5px 0;
} }
</style>
<template>
<div class="page-body ReturnperiodsList">
</style> <div class="page-search row items-center">
<template> <div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="page-body ReturnperiodsList"> <div style="display:flex;justify-content: space-between;width: 100%;align-items: center;">
<div class="page-search row items-center"> <div class="block" style="display:flex">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <span style="margin-right: 5px;">月份筛选</span>
<!-- <div style="margin-right: 20px;" v-if='iscMaker==true'> <el-date-picker v-model="msg.Month" value-format="yyyy-MM" type="month" placeholder="选择月"
<div class="block"> @change="handleCurrentChanges(1)">
<span style="margin-right: 5px;">校区</span> </el-date-picker>
<el-select v-model="msg.SchoolId" filterable @change="handleCurrentChanges(1)"> </div>
<el-option value="-1" label="不限"></el-option> <div>
<el-option v-for='item in CompanyList' :label='item.SName' :value='item.SId' :key='item.SId'></el-option> <q-btn v-if='isgenerate==true' :loading="loading1"  color="primary"  size="11px"  label="生成返佣"
</el-select>  @click="scCommission"  style="height:28px" />
</div> <div style="font-size: 11px;color: #666;">*默认生成上月返佣</div>
</div> -->
<div style="display:flex;justify-content: space-between;width: 100%;align-items: center;" >
<div class="block" style="display:flex">
<span style="margin-right: 5px;">月份筛选</span>
<el-date-picker
v-model="msg.Month"
value-format="yyyy-MM"
type="month"
placeholder="选择月"
@change="handleCurrentChanges(1)"
>
</el-date-picker>
</div>
<div>
<q-btn v-if='isgenerate==true' :loading="loading1" color="primary" size="11px" label="生成返佣" @click="scCommission" style="height:28px"/>
<div style="font-size: 11px;color: #666;">*默认生成上月返佣</div>
</div>
</div>
</div>
</div> </div>
<template >
<el-table
ref="filterTable"
:data="tableData"
v-loading = 'loading'
:header-cell-style="{backgroundColor:'#f5f6f7', color: '#a8a8b3'}"
border
style="width: 100%">
<!-- <el-table-column prop="Id" label="ID" ></el-table-column> -->
<el-table-column prop="BatchName" label="周期" ></el-table-column>
<el-table-column prop="TotalMoney" label="累计金额" > </el-table-column>
<el-table-column prop="TotalEmployee" label="个人直客累计金额" > </el-table-column>
<el-table-column prop="TotalCustomer" label="同业录入累计金额" > </el-table-column>
<el-table-column prop="TotalInternal" label="内部介绍累计金额" > </el-table-column>
<el-table-column prop="TotalTrans" label="学员转介绍累计金额" > </el-table-column>
<el-table-column prop="CreateByName" label="创建人" > </el-table-column>
<el-table-column prop="CreateDate" label="创建时间" > </el-table-column>
<el-table-column prop="FinanceIds" 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" v-if="scope.row.FinanceIds==''||scope.row.FinanceIds==null" content="生成财务单据" placement="top">
<i class="iconfont icon-add"
@click="setCommissionFinanace(scope.row.Id)"></i>
</el-tooltip>
<!-- <el-tooltip class="item" effect="dark" content="制单" placement="top" v-if='iscMaker==true'>
<i class="iconfont icon-add" v-if='iscMaker==true'
@click="generalFinancacls(scope.row)"></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> </div>
</div>
</template>
</div> </div>
</template> <template>
<script> <el-table ref="filterTable" :data="tableData" v-loading='loading'
import { :header-cell-style="{backgroundColor:'#f5f6f7', color: '#a8a8b3'}" border style="width: 100%">
getSchoolDropdown <el-table-column prop="BatchName" label="周期"></el-table-column>
} from '../../../api/school/index' <el-table-column prop="TotalMoney" label="累计金额"> </el-table-column>
<el-table-column prop="TotalEmployee" label="个人直客累计金额"> </el-table-column>
import{ <el-table-column prop="TotalCustomer" label="同业录入累计金额"> </el-table-column>
SetCommissionPeriodsFinanace, <el-table-column prop="TotalInternal" label="内部介绍累计金额"> </el-table-column>
getCommissionPeriodsPageList, <el-table-column prop="TotalTrans" label="学员转介绍累计金额"> </el-table-column>
setSellCommissionRule, <el-table-column prop="CreateByName" label="创建人"> </el-table-column>
setUserReturnCommission, <el-table-column prop="CreateDate" label="创建时间"> </el-table-column>
getSellAchievementsSendEmployeeList, <el-table-column label="财务单据">
setSellAchievementsSendEmployee <template slot-scope="scope">
} from '../../../api/finance/index' {{scope.row.FinanceIds}}
export default { </template>
meta: { </el-table-column>
title: "返佣期数列表" <el-table-column label="操作">
}, <template slot-scope="scope">
props: {}, <div class="_icon_btn">
components: {}, <el-tooltip class="item" effect="dark" content="查看" placement="top">
data() { <i class="iconfont icon-sousuo" @click="goUrl(scope.row.Id)"></i>
return { </el-tooltip>
loading: false, <el-tooltip class="item" effect="dark" v-if="scope.row.FinanceIds==''||scope.row.FinanceIds==null"
loading1: false, content="生成财务单据" placement="top">
value2:'', <i class="iconfont icon-add" @click="setCommissionFinanace(scope.row.Id)"></i>
//列表数据参数 </el-tooltip>
msg: { </div>
PageIndex: 1, </template>
PageSize: 15, </el-table-column>
SchoolId:'-1', </el-table>
Month:'', <div style="margin-top: 10px;text-align: center;">
CommissionType:1, <el-pagination background @current-change="handleCurrentChanges" layout="total,prev, pager, next, jumper"
}, :current-page.sync="msg.PageIndex" :page-size="msg.PageSize" :total='total'>
msgFinance: { </el-pagination>
BatchId: 0, </div>
SchoolId: '-1', </template>
Status: '-2', </div>
OrderSourceType: '-1', </template>
OrderSourceId: 0, <script>
Q_SelectNormal: '2' import {
}, getSchoolDropdown
pageCount: 0, } from '../../../api/school/index'
persistent: false,
listData:{}, import {
tableData:[], SetCommissionPeriodsFinanace,
total:0, getCommissionPeriodsPageList,
CompanyList:[], setSellCommissionRule,
isgenerate:false,//是否有生成的权限 setUserReturnCommission,
iscMaker:false,//是否有制单的权限 getSellAchievementsSendEmployeeList,
SendEmployeeList:[],//可发放提成的用户列表 setSellAchievementsSendEmployee
costmode:false, } from '../../../api/finance/index'
multipleSelection:[], export default {
totalAmount:0,//选中的金额总额 meta: {
CheckID:0, title: "返佣期数列表"
},
props: {},
components: {},
data() {
return {
loading: false,
loading1: false,
value2: '',
//列表数据参数
msg: {
PageIndex: 1,
PageSize: 15,
SchoolId: '-1',
Month: '',
CommissionType: 1,
},
msgFinance: {
BatchId: 0,
SchoolId: '-1',
Status: '-2',
OrderSourceType: '-1',
OrderSourceId: 0,
Q_SelectNormal: '2'
},
pageCount: 0,
persistent: false,
listData: {},
tableData: [],
total: 0,
CompanyList: [],
isgenerate: false, //是否有生成的权限
iscMaker: false, //是否有制单的权限
SendEmployeeList: [], //可发放提成的用户列表
costmode: false,
multipleSelection: [],
totalAmount: 0, //选中的金额总额
CheckID: 0,
}
},
created() {
let userinfo = this.getLocalStorage();
userinfo.ActionMenuList.map(x => { //判断权限
if (x.FunctionCode == "SAGenerate_Commission") { //判断是否有生成的权限
this.isgenerate = true;
} }
}, if (x.FunctionCode == "SACommission_maker") { //判断是否有制单的权限
created() { this.iscMaker = true;
let userinfo = this.getLocalStorage(); }
userinfo.ActionMenuList.map(x=>{//判断权限 })
if(x.FunctionCode == "SAGenerate_Commission"){//判断是否有生成的权限 var myDate = new Date();
this.isgenerate = true; myDate.setMonth(myDate.getMonth() - 1);
},
mounted() {
this.getList(); //获取提成周期列表
},
methods: {
getList() {
this.loading = true;
getCommissionPeriodsPageList(this.msg).then(res => {
if (res.Code == 1) {
console.log("res",res);
this.loading = false;
var tempArray= res.Data.PageData;
if(tempArray&&tempArray.length>0)
{
tempArray.foreach(item=>{
console.log("item",item);
})
}
this.tableData =tempArray;
this.total = res.Data.Count
} }
if(x.FunctionCode == "SACommission_maker"){//判断是否有制单的权限 })
this.iscMaker = true; },
setCommissionFinanace(id) {
this.loading = true;
this.msgFinance.BatchId = id;
SetCommissionPeriodsFinanace(this.msgFinance).then(res => {
if (res.Code == 1) {
this.getList()
} }
this.loading1 = false;
}).catch(err => {
this.loading1 = false;
}) })
var myDate=new Date();
myDate.setMonth(myDate.getMonth()-1);
// this.msg.Month = myDate.getFullYear() + "-" + (myDate.getMonth()+1)
}, },
mounted() { scCommission() { //生成提成
this.getList();//获取提成周期列表 if (this.loading1 == false) {
// this.getBranchList() this.loading1 = true;
setUserReturnCommission({
type: 1
}).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '生成提成成功',
position: 'top'
})
this.getList()
}
this.loading1 = false;
}).catch(err => {
this.loading1 = false;
})
}
}, },
methods: { getBranchList() { //获取校区
getList(){ getSchoolDropdown({}).then(res => {
this.loading = true; this.CompanyList = res.Data;
getCommissionPeriodsPageList(this.msg).then(res => { }).catch(() => {
if (res.Code == 1) {
this.loading = false;
this.tableData = res.Data.PageData
this.total = res.Data.Count
}
})
},
setCommissionFinanace(id){ })
this.loading = true; },
this.msgFinance.BatchId=id; goUrl(id) {
SetCommissionPeriodsFinanace(this.msgFinance).then(res => { this.$router.push({
if (res.Code == 1) { path: '/financial/returnPassbook/ReturnUserList',
this.getList() query: {
} "id": id,
this.loading1= false; "CommissionType": 1,
}).catch(err=>{ blank: 'y',
this.loading1= false;
})
},
scCommission(){//生成提成
if(this.loading1 == false){
this.loading1= true;
setUserReturnCommission({type:1}).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '生成提成成功',
position: 'top'
})
this.getList()
}
this.loading1= false;
}).catch(err=>{
this.loading1= false;
})
} }
}, })
getBranchList(){//获取校区 },
getSchoolDropdown({}).then(res => { goUrl(id) {
this.CompanyList = res.Data; this.$router.push({
}).catch(() => { path: '/financial/returnPassbook/ReturnUserList',
query: {
}) "id": id,
}, "CommissionType": 1,
goUrl(id ) { blank: 'y',
this.$router.push({ }
path: '/financial/returnPassbook/ReturnUserList', })
query: { },
"id": id, handleCurrentChanges(val) {
"CommissionType": 1, this.msg.PageIndex = val;
blank: 'y', this.getList()
}
})
},
goUrl(id ) {
this.$router.push({
path: '/financial/returnPassbook/ReturnUserList',
query: {
"id": id,
"CommissionType": 1,
blank: 'y',
}
})
},
handleCurrentChanges(val){
this.msg.PageIndex= val;
this.getList()
},
}, },
} },
}
</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
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