Commit a806541f authored by youjie's avatar youjie

no message

parent 9262e8df
<template>
<div style="height: 100%;">
<div class="query-box">
<el-form class="_info_box clearfix" label-width="90px">
<el-row style="padding: 15px 0px 0 0">
<el-col :span="4">
<el-form-item :label="$t('system.table_company')">
<el-select
filterable
v-model="msg.OutBranchId"
@change="getChange"
clearable
>
<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">
<el-form-item :label="$t('fnc.bweibi')">
<el-select :disabled="coinGetShow" filterable v-model="msg.StandardCurrencyId" class @change="getChange">
<el-option :value="-1" :label="$t('pub.unlimitedSel')"></el-option>
<el-option
v-for="item in coinGetList"
:label="item.Name"
:value="item.ID"
:key="item.ID"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="线路">
<el-select filterable v-model="msg.LineId" @change="getStatement"
clearable>
<el-option
:value="0"
:label="$t('pub.unlimitedSel')"
></el-option>
<el-option
v-for="item in LineList"
:label="item.LineName"
:value="item.LineID"
:key="item.LineName"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="日期">
<el-date-picker
size="small"
v-model="dateTime"
type="monthrange"
value-format="yyyy-MM"
align="right"
range-separator="至"
start-placeholder="开始月份"
end-placeholder="结束月份"
:picker-options="pickerOptions"
@change="getDateTime"
:clearable="false">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="4" v-if="msg.Type==2">
<el-form-item label="数据类别:">
<el-select v-model="msg.DataType" filterable class="w150" @change="getStatement">
<el-option value="-1" :label="$t('pub.unlimitedSel')"></el-option>
<el-option value="1" label="团队营收"></el-option>
<el-option value="3" label="单办签证"></el-option>
<el-option value="15" label="手配费收入"></el-option>
<el-option value="16" label="单项机票"></el-option>
<el-option value="17" label="单项酒店"></el-option>
<el-option value="18" label="单项包车"></el-option>
<el-option value="19" label="单项门票"></el-option>
<el-option value="20" label="开票收入"></el-option>
<el-option value="21" label="日本手配费收入"></el-option>
<el-option value="22" label="车行收入"></el-option>
<el-option value="23" label="欧洲单团分润收入"></el-option>
<el-option value="24" label="欧洲损失分摊"></el-option>
<el-option value="25" label="CRM直客部外丟團"></el-option>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="2" v-if="msg.Type!=3">
<el-form-item label="季度汇总">
<el-checkbox v-model="msg.LossType" true-label="1" false-label="0" @change="getStatement"></el-checkbox>
</el-form-item>
</el-col> -->
</el-row>
</el-form>
<ul class="clearfix">
<li class="hight_query">
<button class="hollowFixedBtn" @click="getStatement">
{{ $t("pub.searchBtn") }}
</button>
<button class="normalBtn" @click="exportExcel">
导出
</button>
</li>
</ul>
</div>
<div v-loading="loading" style="height: 78%;overflow: auto;display: flex;flex-direction: row;flex-wrap: wrap;">
<IncomeChange :msgData="msg" :StatisticalData="StatisticalData"></IncomeChange>
<IncomeShare :msgData="msg" :StatisticalData="StatisticalData"></IncomeShare>
<WoolRateChange :msgData="msg" :StatisticalData="StatisticalData"></WoolRateChange>
<ActualRateChange :msgData="msg" :StatisticalData="StatisticalData"></ActualRateChange>
<ChangeProportion :msgData="msg" :StatisticalData="StatisticalData"></ChangeProportion>
</div>
</div>
</template>
<script>
import IncomeChange from "./components/Echart/IncomeChange.vue";
import IncomeShare from "./components/Echart/IncomeShare.vue";
import WoolRateChange from "./components/Echart/WoolRateChange.vue";
import ActualRateChange from "./components/Echart/ActualRateChange.vue";
import ChangeProportion from "./components/Echart/ChangeProportion.vue";
export default {
components: {IncomeChange,IncomeShare,WoolRateChange,ActualRateChange,ChangeProportion},
data() {
return {
coinGetShow: false,
loading: false,
activeName: 1,
msg:{
startDate: '',
endDate: '',
OutBranchId: -1,
StandardCurrencyId:0,
LineId: 0,
Type: '0',
DataType:'-1',
LossType:'0'
},
dateTime: [],
CompanyList: [],
getCompanyMsg: {
// 公司
RB_Group_Id: "0",
Status: "0",
},
LineList: [],
coinGetList: [],
pickerOptions: {
shortcuts: [{
text: '本月',
onClick(picker) {
picker.$emit('pick', [new Date(), new Date()]);
}
}, {
text: '今年至今',
onClick(picker) {
const end = new Date();
const start = new Date(new Date().getFullYear(), 0);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近六个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setMonth(start.getMonth() - 6);
picker.$emit('pick', [start, end]);
}
}]
},
StatisticalData: {} ,//T统计数据
}
},
mounted() {
this.getCompanyMsg.RB_Group_Id = this.getLocalStorage().RB_Group_id
const end = new Date();
const start = new Date();
start.setMonth(start.getMonth() - 6);
this.dateTime = [this.$commonUtils.getFormatDateM(start),this.$commonUtils.getFormatDateM(end)]
this.msg.startDate = this.dateTime[0]
this.msg.endDate = this.dateTime[1]
this.financeinfo_post_GetList()
this.getQueryData()
this.getStatement()
},
methods: {
getChange(val){
if(this.msg.OutBranchId == -1){
this.coinGetShow = false
this.msg.StandardCurrencyId = val>-1?val:this.coinGetList[0].ID
}else{
this.coinGetShow = true
this.msg.StandardCurrencyId = -1
}
this.getStatement();
},
financeinfo_post_GetList(){ // 获取币种
this.apipost('financeinfo_post_GetAllStandardCurrencyList',{}, res => {
if(res.data.resultCode == 1) {
this.coinGetList = res.data.data;
if(this.msg.OutBranchId == -1){
this.coinGetShow = false
this.msg.StandardCurrencyId = this.coinGetList[0].ID
this.msg.StandardCurrencyId=this.$route.query.StandardCurrencyId?Number(this.$route.query.StandardCurrencyId):this.msg.StandardCurrencyId;
}else{
this.coinGetShow = true
this.msg.StandardCurrencyId = -1
}
this.getStatement();
}
})
},
getStatement(){
this.loading = true
this.apipost(
"financestatistics_post_GetDataAnalysisStat",
this.msg,
res => {
if (res.data.resultCode == 1) {
this.StatisticalData = res.data.data
} else {
this.Error(res.data.message);
}
this.loading = false;
},
err => {
this.loading = false
}
);
},
handleClick(e){
this.activeName = e._props.name
this.msg.Type = e._props.name
this.getStatement()
},
getDateTime(){
if(this.dateTime&&this.dateTime.length>0){
this.msg.startDate = this.dateTime[0]
this.msg.endDate = this.dateTime[1]
}else{
const end = new Date();
const start = new Date();
start.setMonth(start.getMonth() - 6);
this.dateTime = [this.$commonUtils.getFormatDateM(start),this.$commonUtils.getFormatDateM(end)]
this.msg.startDate = start
this.msg.endDate = end
}
this.getStatement()
},
exportExcel(){//导出报表
let msg = {
EmployeeId: this.getLocalStorage().EmployeeId,
...this.msg
}
this.GetLocalFile("financestatistics_post_GetDataAnalysisStatToExcel", msg, '数据统计'+ this.$commonUtils.getCurrentDate() + ".xls");
},
getQueryData() {
//获取公司列表
this.apipost(
"admin_get_BranchGetList",
this.getCompanyMsg,
(res) => {
if (res.data.resultCode == 1) {
this.CompanyList = res.data.data;
} else {
}
},
(err) => {}
);
this.apipost(
"line_post_GetList", {
LineDirection: 2
},
res => {
if (res.data.resultCode == 1) {
this.LineList = res.data.data;
}
}
);
},
}
}
</script>
<style>
.titleBox{
padding: 10px 10px 0 10px;
display: flex;
}
.echartsBox{
flex: 1;
min-width: 458px;
margin: 5px;
background: #fff;
}
.allMyEchartBox{
height: 270px;
}
</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