Commit 03fc63e8 authored by liudong1993's avatar liudong1993
parents 3f725e1c 48e15149
......@@ -2186,7 +2186,7 @@
this.Confirm(tipMsg, function () {
if (res.data.data && res.data.data > 0) {
let query = {
offerid: res.data.data,
BatchNum: res.data.data,
blank: "y",
tab: "报价单",
};
......
......@@ -1579,7 +1579,7 @@
this.Confirm(tipMsg, function () {
if (res.data.data && res.data.data > 0) {
let query = {
offerid: res.data.data,
BatchNum: res.data.data,
blank: 'y',
tab: '报价单'
}
......
......@@ -1310,7 +1310,7 @@
this.Confirm(tipMsg, function () {
if (res.data.data && res.data.data > 0) {
let query = {
offerid: res.data.data,
BatchNum: res.data.data,
blank: 'y',
tab: '报价单'
}
......
......@@ -895,79 +895,82 @@ export default {
goUrl(type) {
let Time = [this.getBeforeDate(0, new Date().Format("yyyy-MM-dd")),this.getBeforeDate(0, new Date().Format("yyyy-MM-dd"))]
let query
if(type<5){
if(type==1){
query = {
blank: "y",
}
}else if(type==2){
query = {
EnterTime: Time,
blank: "y",
}
}else if(type==3){
query = {
activation: 1,
blank: "y",
// if(type<5){
// if(type==1){
// query = {
// blank: "y",
// }
// }else if(type==2){
// query = {
// EnterTime: Time,
// blank: "y",
// }
// }else if(type==3){
// query = {
// activation: 1,
// blank: "y",
// }
// }else if(type==4){
// query = {
// activationTime: Time,
// activation: 1,
// blank: "y",
// }
// }
// this.OpenNewPage('/customerTransfer',query)
// }
// if(type>4&&type<9){
// if(type==5){
// query = {
// CStartDate: this.parameters.dateRange[0],
// CEndDate: this.parameters.dateRange[1],
// BranchId: this.parameters.branchId,
// RB_Department_Id:this.parameters.RB_Department_Id,
// EmployeeId:this.parameters.empId,
// isNormal: 1,
// blank: "y",
// }
// }else if(type==6){
// query = {
// CStartDate: this.parameters.dateRange[0],
// CEndDate: this.parameters.dateRange[1],
// RB_Department_Id:this.parameters.RB_Department_Id,
// EmployeeId:this.parameters.empId,
// isNormal: 1,
// blank: "y",
// }
// }else if(type==7){
// query = {
// CStartDate: this.parameters.dateRange[0],
// CEndDate: this.parameters.dateRange[1],
// RB_Department_Id:this.parameters.RB_Department_Id,
// EmployeeId:this.parameters.empId,
// isNormal: 1,
// blank: "y",
// }
// }else if(type==8){
// query = {
// CStartDate: this.parameters.dateRange[0],
// CEndDate: this.parameters.dateRange[1],
// RB_Department_Id:this.parameters.RB_Department_Id,
// EmployeeId:this.parameters.empId,
// discount: 1,
// isNormal: 1,
// blank: "y",
// }
// }
// this.OpenNewPage('/salesVolumeRank',query)
// }
}
}else if(type==4){
query = {
activationTime: Time,
activation: 1,
blank: "y",
}
}
this.$router.push({
name: 'customerTransfer',
query
});
}
if(type>4&&type<9){
if(type==5){
query = {
CStartDate: this.parameters.dateRange[0],
CEndDate: this.parameters.dateRange[1],
BranchId: this.parameters.branchId,
RB_Department_Id:this.parameters.RB_Department_Id,
EmployeeId:this.parameters.empId,
isNormal: 1,
blank: "y",
}
}else if(type==6){
query = {
CStartDate: this.parameters.dateRange[0],
CEndDate: this.parameters.dateRange[1],
RB_Department_Id:this.parameters.RB_Department_Id,
EmployeeId:this.parameters.empId,
isNormal: 1,
blank: "y",
}
}else if(type==7){
query = {
CStartDate: this.parameters.dateRange[0],
CEndDate: this.parameters.dateRange[1],
RB_Department_Id:this.parameters.RB_Department_Id,
EmployeeId:this.parameters.empId,
isNormal: 1,
blank: "y",
}
}else if(type==8){
query = {
CStartDate: this.parameters.dateRange[0],
CEndDate: this.parameters.dateRange[1],
RB_Department_Id:this.parameters.RB_Department_Id,
EmployeeId:this.parameters.empId,
discount: 1,
isNormal: 1,
blank: "y",
}
}
this.$router.push({
name: 'enrollTotal',
query
});
}
this.OpenNewPage('/salesVolumeRank',query)
},
changeDepart(node, instanceId){
this.parameters.RB_Department_Id=node.DepartmentId;
......
......@@ -3,102 +3,50 @@
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane :label="$t('sm.Personalrank')" name="first"></el-tab-pane>
<el-tab-pane :label="$t('sm.derprank')" name="second"></el-tab-pane>
<!--
v-if="authority.indexOf('Sales_Volume_Rank_Show') != -1" -->
<el-tab-pane
:label="$t('sm.companyrank')"
name="third"
v-if="S_CheckAllOrder"
></el-tab-pane>
<el-tab-pane :label="$t('sm.companyrank')" name="third" ></el-tab-pane>
<el-tab-pane :label="$t('sm.salerank')" name="four"></el-tab-pane>
</el-tabs>
<div class="query-box">
<el-form class="_info_box clearfix" label-width="150px">
<el-row style="padding: 15px 0px 0 0">
<el-col :span="4" v-show="activeName != 'four'">
<el-col :span="4" v-show="activeName != 'four' &&(userInfo.RB_Branch_id==0||userInfo.RB_Branch_id==49)">
<el-form-item :label="$t('system.table_company')">
<el-select
filterable
v-model="msg.RB_Branch_Id"
@change="getDepartment"
class
>
<el-option
:value="-1"
:label="$t('pub.unlimitedSel')"
></el-option>
<el-option
v-for="item in CompanyList"
:label="item.BName"
:value="item.Id"
:key="item.Id"
></el-option>
<el-select filterable v-model="msg.RB_Branch_Id" @change="getDepartment" class>
<el-option :value="-1" :label="$t('pub.unlimitedSel')"></el-option>
<el-option v-for="item in CompanyList" :label="item.BName" :value="item.Id" :key="item.Id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span="4"
v-show="activeName != 'third' && activeName != 'four'"
>
<el-col :span="4" v-show="activeName != 'third' && activeName != 'four'">
<el-form-item :label="$t('admin.admin_Department')">
<el-select
filterable
v-model="msg.RB_Department_Id"
@change="getEmployee"
class
>
<el-option
:value="0"
:label="$t('pub.unlimitedSel')"
></el-option>
<el-option
v-for="item in DepartmentList"
:label="item.DepartmentName"
:value="item.DepartmentID"
:key="item.DepartmentID"
></el-option>
<el-select filterable v-model="msg.RB_Department_Id" @change="getEmployee" class>
<el-option :value="0" :label="$t('pub.unlimitedSel')"></el-option>
<el-option v-for="item in DepartmentList" :label="item.DepartmentName" :value="item.DepartmentID"
:key="item.DepartmentID"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" v-show="activeName == 'first'">
<el-form-item :label="$t('salesModule.Personnel')">
<el-select filterable v-model="msg.EnterID" class>
<el-option
:value="0"
:label="$t('pub.unlimitedSel')"
></el-option>
<el-option
v-for="item in EmployeeList"
:label="item.EmName"
:value="item.EmployeeId"
:key="item.EmployeeId"
></el-option>
<el-option :value="0" :label="$t('pub.unlimitedSel')"></el-option>
<el-option v-for="item in EmployeeList" :label="item.EmName" :value="item.EmployeeId"
:key="item.EmployeeId"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('sm.chutuandate')">
<el-date-picker
v-model="msg.tStartDates"
type="daterange"
range-separator="-"
:start-placeholder="$t('hotel.hotel_StartDate')"
:end-placeholder="$t('hotel.hotel_EndDate')"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
></el-date-picker>
<el-form-item :label="$t('fnc.bmriqi')">
<el-date-picker v-model="msg.qStartDates" type="daterange" range-separator="-"
:start-placeholder="$t('hotel.hotel_StartDate')" :end-placeholder="$t('hotel.hotel_EndDate')"
value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('fnc.bmriqi')">
<el-date-picker
v-model="msg.qStartDates"
type="daterange"
range-separator="-"
:start-placeholder="$t('hotel.hotel_StartDate')"
:end-placeholder="$t('hotel.hotel_EndDate')"
value-format="yyyy-MM-dd"
></el-date-picker>
<el-form-item :label="$t('sm.chutuandate')">
<el-date-picker v-model="msg.tStartDates" type="daterange" range-separator="-"
:start-placeholder="$t('hotel.hotel_StartDate')" :end-placeholder="$t('hotel.hotel_EndDate')"
value-format="yyyy-MM-dd" :picker-options="pickerOptions"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
......@@ -111,82 +59,59 @@
</li>
</ul>
</div>
<el-table
v-if="isReady"
ref="singleTable"
:data="tableData"
style="width: 100%">
<el-table-column
type="index"
:label="$t('active.ad_xuhao')"
:width="getLanguage()=='en-US'?'120':'50'"
>
<el-table v-if="isReady" ref="singleTable" :data="tableData" style="width: 100%" v-loading="loading">
<el-table-column type="index" :label="$t('active.ad_xuhao')" :width="getLanguage()=='en-US'?'120':'50'">
</el-table-column>
<el-table-column
property="name"
:label="$t('system.query_airName')">
<el-table-column property="name" :label="$t('system.query_airName')">
</el-table-column>
<el-table-column
property="SumPreferPrice"
:label="$t('objFill.xiaosoue')"
width="" sortable>
<el-table-column property="SumPreferPrice" :label="$t('objFill.xiaosoue')" width="" sortable>
<template slot-scope="scope">
<div class="clickText" @click="goUrl('salesVolumeRankEntryForm',scope.row)">{{scope.row.SumPreferPrice}}</div>
</template>
</el-table-column>
<el-table-column
property="income"
:label="$t('fnc.skjine')"
width="" sortable>
<el-table-column property="income" :label="$t('fnc.skjine')" width="" sortable>
<template slot-scope="scope">
<div class="clickText" @click="goUrl('salesVolumeRankEntryForm',scope.row)">{{scope.row.income}}</div>
</template>
</el-table-column>
<el-table-column
property="notInCome"
:label="$t('fnc.wsjine')"
width="" sortable>
<el-table-column property="notInCome" :label="$t('fnc.wsjine')" width="" sortable>
<template slot-scope="scope">
<div class="clickText" @click="goUrl('salesVolumeRankEntryForm',scope.row)">{{scope.row.notInCome}}</div>
</template>
</el-table-column>
<el-table-column
property="peopleCount"
:label="$t('objFill.v101.SalesModule.zhengchangsks')"
width="" sortable>
<el-table-column property="peopleCount" :label="$t('objFill.v101.SalesModule.zhengchangsks')" width="" sortable>
</el-table-column>
<el-table-column property="CalcheCount" :label="$t('objFill.v101.SalesModule.quxiaosks')" width="" sortable>
</el-table-column>
<el-table-column property="totalGuestNum" :label="$t('objFill.v101.SalesModule.danxiansks')" width="">
</el-table-column>
<el-table-column
property="CalcheCount"
:label="$t('objFill.v101.SalesModule.quxiaosks')"
width="" sortable>
<el-table-column property="avgPrice" :label="$t('objFill.v101.SalesModule.kedanjia')" width="" sortable>
</el-table-column>
<el-table-column
property="totalGuestNum"
:label="$t('objFill.v101.SalesModule.danxiansks')"
width="">
<el-table-column property="XiaoBaoTuanCount" :label="$t('objFill.v101.SalesModule.xiaobaotts')" width="">
</el-table-column>
<el-table-column
property="avgPrice"
:label="$t('objFill.v101.SalesModule.kedanjia')"
width="" sortable>
<el-table-column property="zanBi" :label="$t('objFill.v101.SalesModule.xiaosouezb')" width="">
</el-table-column>
<el-table-column
property="XiaoBaoTuanCount"
:label="$t('objFill.v101.SalesModule.xiaobaotts')"
width="">
<el-table-column property="CustomerCount" label="客户总数" width="">
</el-table-column>
<el-table-column
property="zanBi"
:label="$t('objFill.v101.SalesModule.xiaosouezb')"
width="">
<el-table-column property="TodayAddCustomer" label="今日新增" width="">
</el-table-column>
<el-table-column property="MiniAppCount" label="小程序激活数" width="">
</el-table-column>
<el-table-column property="MiniAppAdd" label="今日激活数" width="">
</el-table-column>
<el-table-column property="OrderCount" label="团队订单数" width="">
</el-table-column>
<el-table-column property="CouponCount" label="优惠卷订单数" width="">
</el-table-column>
<el-table-column property="LXYCount" label="小程序订单数" width="">
</el-table-column>
</el-table>
</div>
</template>
<script>
import Vue from "vue";
import moment from 'moment'
export default {
import Vue from "vue";
import moment from 'moment'
export default {
data() {
return {
S_CheckAllOrder: false,
......@@ -209,8 +134,8 @@ export default {
RB_Branch_Id: -1,
RB_Department_Id: 0,
EnterID: 0,
tStartDates: [],
qStartDates: [],
tStartDates: [], //出发日期
qStartDates: [], //报名日期
GroupBy: "EnterID",
QueryType: 0,
},
......@@ -238,24 +163,59 @@ export default {
CompanyList: [],
DepartmentList: [],
EmployeeList: [],
userInfo: {},
};
},
created() {},
mounted() {
this.settStartDates()
this.GetAuth()
this.initColumns();
created() {
this.userInfo = this.getLocalStorage();
this.getCompanyList();
this.getCompanyMsg.RB_Group_Id = this.getLocalStorage().RB_Group_id;
this.getDepartmentMsg.RB_Group_Id = this.getLocalStorage().RB_Group_id;
this.employeeMsg.employeeMsg = this.getLocalStorage().RB_Group_id;
if (this.$route.query.CStartDate && this.$route.query.CEndDate) {
this.msg.qStartDates.push(this.$route.query.CStartDate.replace(/\//g, '-'));
this.msg.qStartDates.push(this.$route.query.CEndDate.replace(/\//g, '-'));
} else {
this.settStartDates();
}
if (this.$route.query.BranchId) {
this.msg.RB_Branch_Id = Number(this.$route.query.BranchId);
this.getDepartmentMsg.RB_Branch_Id = Number(this.$route.query.BranchId);
this.employeeMsg.RB_Branch_Id = Number(this.$route.query.BranchId);
this.getDepartment();
this.activeName = "third";
}
if (this.msg.RB_Branch_Id == -1) {
if (this.userInfo.RB_Branch_id != 0 && this.userInfo.RB_Branch_id != 49) {
this.msg.RB_Branch_Id = Number(this.userInfo.RB_Branch_id);
this.getDepartmentMsg.RB_Branch_Id = Number(this.userInfo.RB_Branch_id);
this.employeeMsg.RB_Branch_Id = Number(this.userInfo.RB_Branch_id);
this.getDepartment();
this.activeName = "third";
}
}
if (this.$route.query.RB_Department_Id) {
this.msg.RB_Department_Id = Number(this.$route.query.RB_Department_Id);
this.employeeMsg.DepartmentId = Number(this.$route.query.RB_Department_Id);
this.getEmployee();
this.activeName = 'second';
}
if (this.$route.query.EmployeeId) {
this.msg.EnterID = Number(this.$route.query.EmployeeId);
this.activeName = 'first';
}
this.getSearchData();
},
mounted() {
this.GetAuth()
this.initColumns();
this.initData();
this.getCompanyList();
this.initAuthor();
//this.pageSize = this.calcPageSize(40); 此页不需要分页
},
methods: {
goUrl(name,rowData){
if(name=='salesVolumeRankEntryForm') this.customCompFunc(rowData)
goUrl(name, rowData) {
if (name == 'salesVolumeRankEntryForm') this.customCompFunc(rowData)
},
customCompFunc(rowData) {
this.$router.push({
......@@ -268,7 +228,8 @@ export default {
tStartDates: this.msg.tStartDates,
qStartDates: this.msg.qStartDates,
},
});},
});
},
GetAuth() {
var actionCode = this.$AuthCode.S_CheckAllOrder;
this.CheckUserAuth(actionCode, res => {
......@@ -283,40 +244,33 @@ export default {
initData() {
this.loading = true;
let param = {
RB_Branch_Id:
this.msg.RB_Branch_Id == -1 ? null : this.msg.RB_Branch_Id,
RB_Department_Id:
this.msg.RB_Department_Id == 0 ? null : this.msg.RB_Department_Id,
RB_Branch_Id: this.msg.RB_Branch_Id == -1 ? null : this.msg.RB_Branch_Id,
RB_Department_Id: this.msg.RB_Department_Id == 0 ? null : this.msg.RB_Department_Id,
EnterID: this.msg.EnterID == 0 ? null : this.msg.EnterID,
QStartDate:
this.msg.tStartDates && this.msg.tStartDates.length == 2
? this.msg.tStartDates[0]
: null,
QEndDate:
this.msg.tStartDates && this.msg.tStartDates.length == 2
? this.msg.tStartDates[1]
: null,
CStartDate:
this.msg.qStartDates && this.msg.qStartDates.length == 2
? this.msg.qStartDates[0]
: null,
CEndDate:
this.msg.qStartDates && this.msg.qStartDates.length == 2
? this.msg.qStartDates[1]
: null,
QStartDate: this.msg.tStartDates && this.msg.tStartDates.length == 2 ?
this.msg.tStartDates[0] : null,
QEndDate: this.msg.tStartDates && this.msg.tStartDates.length == 2 ?
this.msg.tStartDates[1] : null,
CStartDate: this.msg.qStartDates && this.msg.qStartDates.length == 2 ?
this.msg.qStartDates[0] : null,
CEndDate: this.msg.qStartDates && this.msg.qStartDates.length == 2 ?
this.msg.qStartDates[1] : null,
GroupBy: this.msg.GroupBy,
QueryType: this.msg.QueryType,
};
if (!param.QStartDate) {
param.QStartDate = "2019-01-01";
}
this.tableData = []
this.tableData = [];
this.apipost("sellorder_get_sellvolumerankNew", param, (r) => {
r.data.data.forEach((x) => {
var tempData = r.data.data;
if (tempData && tempData.length > 0) {
tempData.forEach((x) => {
x.incomeVal = parseFloat(x.income);
x.avgPrice = parseFloat(x.avgPrice);
});
this.tableData = r.data.data;
}
this.tableData = tempData;
this.loading = false;
});
},
......@@ -328,8 +282,7 @@ export default {
(res) => {
if (res.data.resultCode == 1) {
this.CompanyList = res.data.data;
} else {
}
} else {}
},
(err) => {}
);
......@@ -379,38 +332,36 @@ export default {
);
},
settStartDates() {
if(this.$route.query.tStartDates){
if (this.$route.query.tStartDates) {
this.msg.tStartDates = this.$route.query.tStartDates
}else{
} else {
let date = moment().format('yyyy-MM-DD')
let start = moment().subtract(1, 'months').format('yyyy-MM-DD')
this.msg.tStartDates = [start, date]
//this.msg.tStartDates = [start, date]
this.msg.qStartDates = [start, date];
}
},
handleClick(tab, event) {
this.msg.EnterID = 0;
getSearchData() {
this.msg.QueryType = 0;
if (this.activeName == "first") this.msg.GroupBy = "EnterID";
else if (this.activeName == "second")
this.msg.GroupBy = "RB_Department_Id";
else if (this.activeName == "third") {
this.msg.GroupBy = "RB_Branch_Id";
this.msg.RB_Department_Id = 0;
//this.msg.RB_Department_Id = 0;
} else {
this.msg.RB_Department_Id = 0;
this.msg.RB_Branch_Id = -1;
//this.msg.RB_Department_Id = 0;
//this.msg.RB_Branch_Id = -1;
this.msg.GroupBy = "EnterID";
this.msg.QueryType = 4;
}
},
handleClick(tab, event) {
this.msg.EnterID = 0;
this.getSearchData();
this.initColumns();
this.initData();
},
handleCurrentChanges(val) {
// this.pageIndex = val;
// this.tableData = this.getTableData().filter(
// (item, index) => index == val - 1
// );
},
sortChange(param) {
//自己写实现
let d = JSON.parse(JSON.stringify(this.tableData));
......@@ -452,29 +403,36 @@ export default {
},
filterMethod(filters) {},
},
};
};
</script>
<style scoped>
.salesVolumeRank-box .query-box {
.salesVolumeRank-box .query-box {
padding: 0 !important;
border-bottom: 0px;
}
.salesVolumeRank-box .el-tabs__nav-wrap::after {
}
.salesVolumeRank-box .el-tabs__nav-wrap::after {
height: 1px;
}
.salesVolumeRank-box .el-date-editor.el-input,
.salesVolumeRank-box .el-date-editor.el-input__inner {
}
.salesVolumeRank-box .el-date-editor.el-input,
.salesVolumeRank-box .el-date-editor.el-input__inner {
width: 100% !important;
}
.salesVolumeRank-box .el-date-editor .el-range-input,
.el-date-editor .el-range-separator {
}
.salesVolumeRank-box .el-date-editor .el-range-input,
.el-date-editor .el-range-separator {
font-size: 12px;
}
/deep/.salesVolumeRank-box .el-table th.el-table__cell{
}
/deep/.salesVolumeRank-box .el-table th.el-table__cell {
background-color: #E6E6E6 !important;
}
.clickText{
}
.clickText {
color: #33B3FF;
cursor: pointer;
}
}
</style>
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