Commit 7825a47a authored by Mac's avatar Mac

1

parent a80de6f3
...@@ -139,8 +139,13 @@ ...@@ -139,8 +139,13 @@
<div class="page-search items-center"> <div class="page-search items-center">
<div class="p_titleList"> <div class="p_titleList">
<div class="p_title">班级收支明细</div> <div class="p_title">班级收支明细</div>
<q-btn label="导出" color="accent q-px-md" size="sm" <div style="display: flex;align-items: center;position:absolute;right:0;top:0">
style="font-weight:400 !important;position:absolute;right:0;top:0" @click="exportOrder" /> <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;" @click="exportOrder" />
</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col paymentList" v-if="dataList&&dataList.ClassInfo"> <div class="col paymentList" v-if="dataList&&dataList.ClassInfo">
...@@ -524,6 +529,11 @@ ...@@ -524,6 +529,11 @@
} }
}); });
},
goclasslist(){
this.$router.push({
path: 'classManage',
});
} }
} }
} }
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<div class="col-3" v-if='datetype==1'> <div class="col-3" v-if='datetype==1'>
<q-field filled> <q-field filled>
 <template v-slot:control>  <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)"> @change="handleCurrentChanges(1)">
</el-date-picker>     </el-date-picker>    
</template> </template>
...@@ -86,9 +86,12 @@ ...@@ -86,9 +86,12 @@
<div class="col-3" v-if='datetype==2'> <div class="col-3" v-if='datetype==2'>
<q-field filled> <q-field filled>
 <template v-slot:control>  <template v-slot:control>
<el-date-picker v-model="valuemonth" type="month" placeholder="选择月份" value-format="yyyy-MM" <el-date-picker v-model="msg.StartMonth" type="month" placeholder="开始月份" size="small" style="width:47%;" value-format="yyyy-MM" :clearable='false'
@change="handleCurrentChanges(1)"> @change="choicemonth(1)" clear-icon="iconfont icon-guanbi">
</el-date-picker>     </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> </template>
</q-field> </q-field>
</div> </div>
...@@ -102,7 +105,11 @@ ...@@ -102,7 +105,11 @@
<el-table ref="filterTable" :data="tableData" v-loading='loading' <el-table ref="filterTable" :data="tableData" v-loading='loading'
:header-cell-style="{backgroundColor:'#f5f6f7', color: '#a8a8b3'}" border style="width: 100%"> :header-cell-style="{backgroundColor:'#f5f6f7', color: '#a8a8b3'}" border style="width: 100%">
<el-table-column prop="EnterName" label="业务员"></el-table-column> <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="Income" label="实收"></el-table-column>
<el-table-column prop="PlatformTax" label="平台税金"> </el-table-column> <el-table-column prop="PlatformTax" label="平台税金"> </el-table-column>
<el-table-column prop="Refund" label="退款"></el-table-column> <el-table-column prop="Refund" label="退款"></el-table-column>
...@@ -189,7 +196,8 @@ ...@@ -189,7 +196,8 @@
created() { created() {
let userinfo = this.getLocalStorage(); let userinfo = this.getLocalStorage();
var myDate = new Date(); 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() this.valueyear = myDate.getFullYear().toString()
}, },
...@@ -202,21 +210,11 @@ ...@@ -202,21 +210,11 @@
}, },
methods: { methods: {
getList() { getList() {
if (this.valuemonth == null || this.valueyear == null) {
this.$q.notify({ if (this.datetype == 1) {
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) {
this.msg.StartMonth = this.valueyear + '-01'; this.msg.StartMonth = this.valueyear + '-01';
this.msg.EndMonth = this.valueyear + '-12'; this.msg.EndMonth = this.valueyear + '-12';
} }
this.loading = true; this.loading = true;
getSaleAchievementsRankStatistics(this.msg).then(res => { getSaleAchievementsRankStatistics(this.msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
...@@ -294,8 +292,64 @@ ...@@ -294,8 +292,64 @@
this.getList() this.getList()
}, },
txexport() { 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)); 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 @@ ...@@ -193,13 +193,23 @@
if (this.$route.query.OrderId) { if (this.$route.query.OrderId) {
this.msg.OrderId = this.$route.query.OrderId; this.msg.OrderId = this.$route.query.OrderId;
} }
let nowDay = new Date(); let nowDay = new Date();
var year = nowDay.getFullYear(); //年 var year = nowDay.getFullYear(); //年
var month = nowDay.getMonth() + 1; //月 var month = nowDay.getMonth() + 1; //月
var day = nowDay.getDate(); //日 var day = nowDay.getDate(); //日
var currentDay = year + '-' + month + '-' + day; var currentDay = year + '-' + month + '-' + day;
this.msg.StartTime = currentDay 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.getOrderState();
this.getCourseList(); 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