Commit 7825a47a authored by Mac's avatar Mac

1

parent a80de6f3
......@@ -139,8 +139,13 @@
<div class="page-search items-center">
<div class="p_titleList">
<div class="p_title">班级收支明细</div>
<div style="display: flex;align-items: center;position:absolute;right:0;top:0">
<q-btn label="返回班级列表" color="accent q-px-md" size="sm"
style="font-weight:400 !important;margin-right: 15px;" @click="goclasslist" />
<q-btn label="导出" color="accent q-px-md" size="sm"
style="font-weight:400 !important;position:absolute;right:0;top:0" @click="exportOrder" />
style="font-weight:400 !important;" @click="exportOrder" />
</div>
</div>
<div class="row">
<div class="col paymentList" v-if="dataList&&dataList.ClassInfo">
......@@ -524,6 +529,11 @@
}
});
},
goclasslist(){
this.$router.push({
path: 'classManage',
});
}
}
}
......
......@@ -77,7 +77,7 @@
<div class="col-3" v-if='datetype==1'>
<q-field filled>
 <template v-slot:control>
<el-date-picker v-model="valueyear" type="year" placeholder="选择年份" value-format="yyyy"
<el-date-picker v-model="valueyear" type="year" placeholder="选择年份" value-format="yyyy" :clearable='false'
@change="handleCurrentChanges(1)">
</el-date-picker>    
</template>
......@@ -86,9 +86,12 @@
<div class="col-3" v-if='datetype==2'>
<q-field filled>
 <template v-slot:control>
<el-date-picker v-model="valuemonth" type="month" placeholder="选择月份" value-format="yyyy-MM"
@change="handleCurrentChanges(1)">
</el-date-picker>    
<el-date-picker v-model="msg.StartMonth" type="month" placeholder="开始月份" size="small" style="width:47%;" value-format="yyyy-MM" :clearable='false'
@change="choicemonth(1)" clear-icon="iconfont icon-guanbi">
</el-date-picker>
<el-date-picker v-model="msg.EndMonth" type="month" placeholder="结束月份" size="small" style="width:47%;" value-format="yyyy-MM" :clearable='false'
@change="choicemonth(2)" clear-icon="iconfont icon-guanbi">
</el-date-picker>
</template>
</q-field>
</div>
......@@ -102,7 +105,11 @@
<el-table ref="filterTable" :data="tableData" v-loading='loading'
:header-cell-style="{backgroundColor:'#f5f6f7', color: '#a8a8b3'}" border style="width: 100%">
<el-table-column prop="EnterName" label="业务员"></el-table-column>
<el-table-column prop="PreferPrice" label="应收"> </el-table-column>
<el-table-column prop="PreferPrice" label="应收">
<template slot-scope="scope">
<span style="cursor: pointer;text-decoration: underline;" @click='gobaoming(scope.row)'>{{scope.row.PreferPrice}}</span>
</template>
</el-table-column>
<el-table-column prop="Income" label="实收"></el-table-column>
<el-table-column prop="PlatformTax" label="平台税金"> </el-table-column>
<el-table-column prop="Refund" label="退款"></el-table-column>
......@@ -189,7 +196,8 @@
created() {
let userinfo = this.getLocalStorage();
var myDate = new Date();
this.valuemonth = myDate.getFullYear() + "-" + (myDate.getMonth() + 1)
this.msg.StartMonth = myDate.getFullYear() + "-" + (myDate.getMonth() + 1)
this.msg.EndMonth = myDate.getFullYear() + "-" + (myDate.getMonth() + 1)
this.valueyear = myDate.getFullYear().toString()
},
......@@ -202,18 +210,8 @@
},
methods: {
getList() {
if (this.valuemonth == null || this.valueyear == null) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择日期`
})
return
}
if (this.datetype == 2) {
this.msg.StartMonth = this.valuemonth;
this.msg.EndMonth = this.valuemonth;
} else if (this.datetype == 1) {
if (this.datetype == 1) {
this.msg.StartMonth = this.valueyear + '-01';
this.msg.EndMonth = this.valueyear + '-12';
}
......@@ -294,8 +292,64 @@
this.getList()
},
txexport() {
let text = '';
if (this.datetype == 2) {
if(new Date(this.msg.StartMonth).getTime() == new Date(this.msg.EndMonth).getTime()){
text = this.msg.StartMonth+'销售业绩排名.xls'
}else{
text = this.msg.StartMonth+'-'+ this.msg.EndMonth +'销售业绩排名.xls'
}
} else if (this.datetype == 1) {
text = this.valueyear+'年销售业绩排名.xls'
}
var msg = JSON.parse(JSON.stringify(this.msg));
EduDownLoad("/finance/GetSaleAchievementsRankStatisticsToExcel", msg, "销售业绩排名.xls")
EduDownLoad("/finance/GetSaleAchievementsRankStatisticsToExcel", msg, text)
},
choicemonth(val){
let StartMonth = JSON.parse(JSON.stringify(this.msg.StartMonth))
let EndMonth = JSON.parse(JSON.stringify(this.msg.EndMonth))
if(val==1){//判断选择的时候开始时间大于结束时间的处理
if(new Date(StartMonth).getTime() > new Date(EndMonth).getTime()){
this.msg.EndMonth = this.msg.StartMonth
}
}else{
if(new Date(this.msg.StartMonth).getTime() > new Date(this.msg.EndMonth).getTime()){
this.msg.StartMonth = this.msg.EndMonth
}
}
let diff = this.dateMinus(this.msg.StartMonth,this.msg.EndMonth)
if(diff >11){
this.$q.notify({
type: 'negative',
position: "top",
message: `月份不能超过12个月`
})
if(val==1){//如果超哥12过月的处理
this.msg.StartMonth = this.msg.EndMonth
}else{
this.msg.EndMonth = this.msg.StartMonth
}
return
}
setTimeout(()=>{
this.handleCurrentChanges(1)
},10)
},
//两个日期相差几个月
dateMinus(d1, d2) {
var m1 = parseInt(d1.split("-")[1].replace(/^0+/, "")) + parseInt(d1.split("-")[0]) * 12;
var m2 = parseInt(d2.split("-")[1].replace(/^0+/, "")) + parseInt(d2.split("-")[0]) * 12;
var diff = m2 - m1;
return diff;
},
gobaoming(row){//跳转到报名列表
this.OpenNewUrl('/sale/orderStatistics' , {
EnterID:row.EnterID,
StartTime:this.msg.StartMonth,
EndTime:this.msg.EndMonth,
});
}
......
......@@ -193,13 +193,23 @@
if (this.$route.query.OrderId) {
this.msg.OrderId = this.$route.query.OrderId;
}
let nowDay = new Date();
var year = nowDay.getFullYear(); //年
var month = nowDay.getMonth() + 1; //月
var day = nowDay.getDate(); //日
var currentDay = year + '-' + month + '-' + day;
this.msg.StartTime = currentDay
if (this.$route.query.StartTime) {
this.msg.StartTime = this.$route.query.StartTime+'-01';
}
if (this.$route.query.EndTime) {
this.msg.EndTime = this.$route.query.EndTime+'-01';
}
console.log( this.msg.StartTime, this.msg.EndTime)
if (this.$route.query.EnterID) {
this.msg.EnterID = Number(this.$route.query.EnterID) ;
}
this.getOrderState();
this.getCourseList();
},
......
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