Commit a00b3a7d authored by 罗超's avatar 罗超

1

parent 4293c384
<style>
@import "css/cssReset.css";
.page_EasyReport_set {
position: relative;
padding: 15px
}
.page_EasyReport_set .page_EasyReport_export {
position: absolute;
right: 0;
top: 15px;
}
.page_EasyReport_set button.page_EasyReport_search {
position: absolute;
bottom: 27px;
left: 1020px;
}
.page_EasyReport_form {
width: 1000px;
float: left;
}
.page_EasyReport_form .el-date-editor.el-input,
.page_EasyReport_form .el-date-editor.el-input__inner {
width: 100% !important;
}
.easyUpdateTime {
position: absolute;
top: 55px;
right: 0;
}
.column-cell-class-name-test-lan-s .v-table-body-cell {
background-color: #9cf;
}
</style>
<template>
<div class="page_EasyReport My_table_tell page-body" v-loading="AALloading">
<div class="page_EasyReport_set clearfix">
<el-form class="clearfix page_EasyReport_form" label-width="110px">
<el-row style="padding:15px 0 0 0;">
<el-col :span="6">
<el-form-item label="订单编号:">
<el-input v-model="msg.OrderId" placeholder="请输入内容" filterable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="合同编号:">
<el-input v-model="msg.ContractNo" placeholder="请输入内容" filterable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="学生姓名:">
<el-input v-model="msg.StudentName" placeholder="请输入内容" filterable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="班级名称:">
<el-input v-model="msg.ClassName" placeholder="请输入内容" filterable></el-input>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="课程名称:">
<el-input v-model="msg.CourseName" placeholder="请输入内容" filterable></el-input>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="业务员:">
<el-select v-model="msg.CreateBy" filterable >
<el-option label="不限" :value="-1"></el-option>
<el-option v-for="item in EmployeeList" :label="item.EmployeeName" :key="item.Id" :value="item.Id">
{{item.EmployeeName}}</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="财务单据id:">
<el-select v-model="msg.FinanceId" filterable >
<el-option label="不限" :value="-1"></el-option>
<!-- <el-option v-for="item in ClassName" :label="item.SName" :key="item.SId" :value="item.SId">
{{item.SName}}</el-option> -->
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="账户类型:">
<el-select filterable v-model='msg.AccountType'>
<el-option value="" label="不限"></el-option>
<el-option v-for='item in AccList' :label='item.Name' :value='item.ID' :key='item.ID'>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="交易方式:">
<el-select v-model="msg.TradeWay" filterable @change="getAccountList(msg.AccountType,msg.TradeWay)">
<el-option label="不限" :value="-1"></el-option>
<el-option v-for='item in BranchAccountList' :label='item.Name' :value='item.ID' :key='item.ID'>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="账号id:">
<el-select v-model="msg.AccountId" filterable >
<el-option label="不限" :value="-1"></el-option>
<el-option v-for='item in accountList' :label='item.Name' :value='item.ID' :key='item.ID'></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<button class="normalBtn page_EasyReport_search" @click="getData(2)">查询</button>
</el-col>
</el-row>
</el-form>
<div class="page_EasyReport_export">
<button class="normalBtn " @click="exportExcel">导出EXCEL</button>
</div>
<button class="normalBtn page_EasyReport_search" v-if="userId==1" @click="getData(1)">保存损失</button>
<p class="easyUpdateTime" v-if="UpdateStaus==1">正在更新,更新开始时间 {{UpdateStartTime}}</p>
<p class="easyUpdateTime" v-if="UpdateStaus==2">上次更新时间 {{UpdateStartTime}}<br />每日8点、12点、19点、22点数据更新~</p>
</div>
<div style="margin-bottom:25px;" v-loading='loading'>
<v-table is-horizontal-resize column-width-drag :show-vertical-border="true" rowKeyFieldName="rowkey" style="width:100%" :columns="columns"
:table-data="DataList" :filter-method="filterMethod" :column-cell-class-name="columnCellClass"
@on-custom-comp="customCompFunc" @sort-change="sortChange" :row-click="rowClick" :row-dblclick="rowDbClick">
</v-table>
<!-- <v-table :border-x="true" is-horizontal-resize column-width-drag
:border-y="true" :columns="columns" :scroll-width="1600" :table-data="DataList" rowKeyFieldName="rowkey" /> -->
</div>
</div>
</template>
<script>
import {
getSchoolDropdown, //获取校区列表
} from '../../api/school/index';
import { queryEmployee } from '../../api/users/user';//获取业务员
import {getOrderCompleteStatisticsPageList} from "../../api/report/index"
import Vue from "vue";
//一月
Vue.component("YiYueJump", {
// 团队跳转
template: `
<div class="gourl_span">
<span style="cursor: pointer" v-if="rowData.CostIds" @click="goUrl('JumpReport',1,rowData.Year,rowData.BranchId,rowData.CostIds)">{{rowData.YiYue}}</span>
<span style="cursor: pointer" v-else>{{rowData.YiYue}}</span>
</div>`,
props: {
rowData: {
type: Object
},
field: {
type: String
},
index: {
type: Number
}
},
methods: {
goUrl(path, month, year, BranchId, ids) {
this.$router.push({
path: "/financial/" + path,
query: {
year: year,
month: month,
BranchId: BranchId,
CostIds: ids,
blank: "y"
}
});
}
}
});
//二月
Vue.component("ErYueJump", {
// 团队跳转
template: `
<div class="gourl_span">
<span style="cursor: pointer" v-if="rowData.CostIds" @click="goUrl('JumpReport',2,rowData.Year,rowData.BranchId,rowData.CostIds)">{{rowData.ErYue}}</span>
<span style="cursor: pointer" v-else>{{rowData.ErYue}}</span>
</div>`,
props: {
rowData: {
type: Object
},
field: {
type: String
},
index: {
type: Number
}
},
methods: {
goUrl(path, month, year, BranchId, ids) {
this.$router.push({
path: "/financial/" + path,
query: {
year: year,
month: month,
BranchId: BranchId,
CostIds: ids,
blank: "y"
}
});
}
}
});
//三月
Vue.component("SanYueJump", {
// 团队跳转
template: ` <div class="gourl_span">
<span style="cursor: pointer" v-if="rowData.CostIds" @click="goUrl('JumpReport',3,rowData.Year,rowData.BranchId,rowData.CostIds)">{{rowData.SanYue}}</span>
<span style="cursor: pointer" v-else>{{rowData.SanYue}}</span>
</div>`,
props: {
rowData: {
type: Object
},
field: {
type: String
},
index: {
type: Number
}
},
methods: {
goUrl(path, month, year, BranchId, ids) {
this.$router.push({
path: "/financial/" + path,
query: {
year: year,
month: month,
BranchId: BranchId,
CostIds: ids,
blank: "y"
}
});
}
}
});
//四月
Vue.component("SiYueJump", {
// 团队跳转
template: ` <div class="gourl_span">
<span style="cursor: pointer" v-if="rowData.CostIds" @click="goUrl('JumpReport',4,rowData.Year,rowData.BranchId,rowData.CostIds)">{{rowData.SiYue}}</span>
<span style="cursor: pointer" v-else>{{rowData.SiYue}}</span>
</div>`,
props: {
rowData: {
type: Object
},
field: {
type: String
},
index: {
type: Number
}
},
methods: {
goUrl(path, month, year, BranchId, ids) {
this.$router.push({
path: "/financial/" + path,
query: {
year: year,
month: month,
BranchId: BranchId,
CostIds: ids,
blank: "y"
}
});
}
}
});
//五月
Vue.component("WuYueJump", {
// 团队跳转
template: ` <div class="gourl_span">
<span style="cursor: pointer" v-if="rowData.CostIds" @click="goUrl('JumpReport',5,rowData.Year,rowData.BranchId,rowData.CostIds)">{{rowData.WuYue}}</span>
<span style="cursor: pointer" v-else>{{rowData.WuYue}}</span>
</div>`,
props: {
rowData: {
type: Object
},
field: {
type: String
},
index: {
type: Number
}
},
methods: {
goUrl(path, month, year, BranchId, ids) {
this.$router.push({
path: "/financial/" + path,
query: {
year: year,
month: month,
BranchId: BranchId,
CostIds: ids,
blank: "y"
}
});
}
}
});
//六月
Vue.component("LiuYueJump", {
// 团队跳转
template: ` <div class="gourl_span">
<span style="cursor: pointer;" v-if="rowData.CostIds" @click="goUrl('JumpReport',6,rowData.Year,rowData.BranchId,rowData.CostIds)">{{rowData.LiuYue}}</span>
<span style="cursor: pointer" v-else>{{rowData.LiuYue}}</span>
</div>`,
props: {
rowData: {
type: Object
},
field: {
type: String
},
index: {
type: Number
}
},
methods: {
goUrl(path, month, year, BranchId, ids) {
this.$router.push({
path: "/financial/" + path,
query: {
year: year,
month: month,
BranchId: BranchId,
CostIds: ids,
blank: "y"
}
});
}
}
});
//七月
Vue.component("QiYueJump", {
// 团队跳转
template: ` <div class="gourl_span">
<span style="cursor: pointer" v-if="rowData.CostIds" @click="goUrl('JumpReport',7,rowData.Year,rowData.BranchId,rowData.CostIds)">{{rowData.QiYue}}</span>
<span style="cursor: pointer" v-else>{{rowData.QiYue}}</span>
</div>`,
props: {
rowData: {
type: Object
},
field: {
type: String
},
index: {
type: Number
}
},
methods: {
goUrl(path, month, year, BranchId, ids) {
this.$router.push({
path: "/financial/" + path,
query: {
year: year,
month: month,
BranchId: BranchId,
CostIds: ids,
blank: "y"
}
});
}
}
});
//八月
Vue.component("BaYueJump", {
// 团队跳转
template: ` <div class="gourl_span">
<span style="cursor: pointer" v-if="rowData.CostIds" @click="goUrl('JumpReport',8,rowData.Year,rowData.BranchId,rowData.CostIds)">{{rowData.BaYue}}</span>
<span style="cursor: pointer" v-else>{{rowData.BaYue}}</span>
</div>`,
props: {
rowData: {
type: Object
},
field: {
type: String
},
index: {
type: Number
}
},
methods: {
goUrl(path, month, year, BranchId, ids) {
this.$router.push({
path: "/financial/" + path,
query: {
year: year,
month: month,
BranchId: BranchId,
CostIds: ids,
blank: "y"
}
});
}
}
});
//九月
Vue.component("JiuYueJump", {
// 团队跳转
template: ` <div class="gourl_span">
<span style="cursor: pointer" v-if="rowData.CostIds" @click="goUrl('JumpReport',9,rowData.Year,rowData.BranchId,rowData.CostIds)">{{rowData.JiuYue}}</span>
<span style="cursor: pointer" v-else>{{rowData.JiuYue}}</span>
</div>`,
props: {
rowData: {
type: Object
},
field: {
type: String
},
index: {
type: Number
}
},
methods: {
goUrl(path, month, year, BranchId, ids) {
this.$router.push({
path: "/financial/" + path,
query: {
year: year,
month: month,
BranchId: BranchId,
CostIds: ids,
blank: "y"
}
});
}
}
});
//十月
Vue.component("ShiYueJump", {
// 团队跳转
template: ` <div class="gourl_span">
<span style="cursor: pointer" v-if="rowData.CostIds" @click="goUrl('JumpReport',10,rowData.Year,rowData.BranchId,rowData.CostIds)">{{rowData.ShiYue}}</span>
<span style="cursor: pointer" v-else>{{rowData.ShiYue}}</span>
</div>`,
props: {
rowData: {
type: Object
},
field: {
type: String
},
index: {
type: Number
}
},
methods: {
goUrl(path, month, year, BranchId, ids) {
this.$router.push({
path: "/financial/" + path,
query: {
year: year,
month: month,
BranchId: BranchId,
CostIds: ids,
blank: "y"
}
});
}
}
});
//十一月
Vue.component("ShiYiYueJump", {
// 团队跳转
template: ` <div class="gourl_span">
<span style="cursor: pointer" v-if="rowData.CostIds" @click="goUrl('JumpReport',11,rowData.Year,rowData.BranchId,rowData.CostIds)">{{rowData.ShiYiYue}}</span>
<span style="cursor: pointer" v-else>{{rowData.ShiYiYue}}</span>
</div>`,
props: {
rowData: {
type: Object
},
field: {
type: String
},
index: {
type: Number
}
},
methods: {
goUrl(path, month, year, BranchId, ids) {
this.$router.push({
path: "/financial/" + path,
query: {
year: year,
month: month,
BranchId: BranchId,
CostIds: ids,
blank: "y"
}
});
}
}
});
//十二月
Vue.component("ShiErYueJump", {
// 团队跳转
template: ` <div class="gourl_span">
<span style="cursor: pointer" v-if="rowData.CostIds" @click="goUrl('JumpReport',12,rowData.Year,rowData.BranchId,rowData.CostIds)">{{rowData.ShiEr}}</span>
<span style="cursor: pointer" v-else>{{rowData.ShiEr}}</span>
</div>`,
props: {
rowData: {
type: Object
},
field: {
type: String
},
index: {
type: Number
}
},
methods: {
goUrl(path, month, year, BranchId, ids) {
this.$router.push({
path: "/financial/" + path,
query: {
year: year,
month: month,
BranchId: BranchId,
CostIds: ids,
blank: "y"
}
});
}
}
});
import {
getEasyReportList,
outToExcelEasyReportList
} from '../../api/finance/index'
import {
EduDownLoad,
} from '../../api/common/common';
export default {
data() {
return {
msg: {
pageIndex:1,
pageSize:10,
OrderId:0,// 订单编号
ContractNo:"",//合同编号
StudentName:"",//学生姓名
ClassName:"",//班级名称
CourseName:"",//课程名称
CreateBy:0,//业务员
FinanceId:0,//财务单据id
TradeWay:0,//交易方式
AccountId:0,//账号id
AccountType:"",//账户类型
},
data: [],
DataList: [],
UpdateStaus: 0,
UpdateStartTime: '',
UpdateEndTime: '',
BranchList: [],
MonthIndex: 0,
loading: false,
AALloading: false,
userId: -2,
/* columns: [{
field: "Sort",
title: "合计",
width: 80,
titleAlign: "left",
columnAlign: "left",
isResize: true,
result: [],
type: "select",
isFrozen: false
},
{
field: "ZhaiYao",
title: "订单号",
width: 150,
titleAlign: "left",
columnAlign: "left",
isResize: true,
result: [],
type: "select",
isFrozen: false,
},
{
field: "YiYue",
title: "一月",
start: "01-01",
end: "01-31",
month: 1,
width: 80,
titleAlign: "left",
columnAlign: "right",
isResize: true,
result: [],
type: "select",
isFrozen: false,
// componentName: "YiYueJump"
},
{
field: "ErYue",
title: "二月",
start: "02-01",
end: "02",
month: 2,
width: 80,
titleAlign: "left",
columnAlign: "right",
isResize: true,
result: [],
type: "select",
isFrozen: false,
// componentName: "ErYueJump"
},
{
field: "SanYue",
title: "三月",
start: "03-01",
end: "03-31",
month: 3,
width: 80,
titleAlign: "left",
columnAlign: "right",
isResize: true,
result: [],
type: "select",
isFrozen: false,
// componentName: "SanYueJump"
},
{
field: "DiYiJiDu",
title: "第一季度",
start: "01-01",
end: "03-31",
width: 80,
titleAlign: "left",
columnAlign: "right",
isResize: true,
result: [],
type: "select",
isFrozen: false
},
{
field: "SiYue",
title: "四月",
start: "04-01",
end: "04-30",
month: 4,
width: 80,
titleAlign: "left",
columnAlign: "right",
isResize: true,
result: [],
type: "select",
isFrozen: false,
// componentName: "SiYueJump"
},
{
field: "WuYue",
title: "五月",
start: "05-01",
end: "05-31",
month: 5,
width: 80,
titleAlign: "left",
columnAlign: "right",
isResize: true,
result: [],
type: "select",
isFrozen: false,
// componentName: "WuYueJump"
},
{
field: "LiuYue",
title: "六月",
start: "06-01",
end: "06-30",
month: 6,
width: 80,
titleAlign: "left",
columnAlign: "right",
isResize: true,
result: [],
type: "select",
isFrozen: false,
// componentName: "LiuYueJump"
},
{
field: "DiErJiDu",
title: "第二季度",
start: "04-01",
end: "06-30",
width: 80,
titleAlign: "left",
columnAlign: "right",
isResize: true,
result: [],
type: "select",
isFrozen: false
},
{
field: "ShangBanNianBao",
title: "上半年报",
start: "01-01",
end: "06-30",
width: 80,
titleAlign: "left",
columnAlign: "right",
isResize: true,
result: [],
type: "select",
isFrozen: false
},
{
field: "QiYue",
title: "七月",
start: "07-01",
end: "07-31",
month: 7,
width: 80,
titleAlign: "left",
columnAlign: "right",
isResize: true,
result: [],
type: "select",
isFrozen: false,
// componentName: "QiYueJump"
},
{
field: "BaYue",
title: "八月",
start: "08-01",
end: "08-31",
month: 8,
width: 80,
titleAlign: "left",
columnAlign: "right",
isResize: true,
result: [],
type: "select",
isFrozen: false,
// componentName: "BaYueJump"
},
{
field: "JiuYue",
title: "九月",
start: "09-01",
end: "09-30",
month: 9,
width: 80,
titleAlign: "left",
columnAlign: "right",
isResize: true,
result: [],
type: "select",
isFrozen: false,
// componentName: "JiuYueJump"
},
{
field: "DiSanJiDu",
title: "第三季度",
start: "06-01",
end: "09-30",
width: 80,
titleAlign: "left",
columnAlign: "right",
isResize: true,
result: [],
type: "select",
isFrozen: false
},
{
field: "ShiYue",
title: "十月",
start: "10-01",
end: "10-31",
month: 10,
width: 80,
titleAlign: "left",
columnAlign: "right",
isResize: true,
result: [],
type: "select",
isFrozen: false,
// componentName: "ShiYueJump"
},
{
field: "ShiYiYue",
title: "十一月",
start: "11-01",
end: "11-30",
month: 11,
width: 80,
titleAlign: "left",
columnAlign: "right",
isResize: true,
result: [],
type: "select",
isFrozen: false,
// componentName: "ShiYiYueJump"
},
{
field: "ShiErYue",
title: "十二月",
start: "12-01",
end: "12-31",
month: 12,
width: 80,
titleAlign: "left",
columnAlign: "right",
isResize: true,
result: [],
type: "select",
isFrozen: false,
// componentName: "ShiErYueJump"
},
{
field: "DiSiJiDu",
title: "第四季度",
start: "10-01",
end: "12-31",
width: 80,
titleAlign: "left",
columnAlign: "right",
isResize: true,
result: [],
type: "select",
isFrozen: false
},
{
field: "XiaBanNianBao",
title: "下半年报",
start: "10-01",
end: "12-31",
width: 80,
titleAlign: "left",
columnAlign: "right",
isResize: true,
result: [],
type: "select",
isFrozen: false
},
{
field: "ZongJi",
title: "总计",
start: "01-01",
end: "12-31",
width: 80,
titleAlign: "left",
columnAlign: "right",
isResize: true,
result: [],
type: "select",
isFrozen: false
},
],*/
columns:[
// {
// title:"订单完成情况一览表",
// width:1000,
// key:"a",
// align:"center",
// children:[
// {
// title: "合同信息",
// width: 1000,
// key:"a",
// children:[
{
field: "OrderId",
title: "合同信息",
width: 80,
key:"a1",
},
{
field: "CreateTime",
title: "签订时间",
width: 80,
key:"a2",
},
{
field: "ContractNo",
title: "合同编号",
width: 80,
key:"a3",
},
{
field: "CourseName",
title: "产品名称",
width: 80,
key:"a4",
},
{
field: "ClassName",
title: "班级",
width: 80,
key:"a5",
},
{
field: "StudentName",
title: "学员名称",
width: 80,
key:"a6",
},
{
field: "TotalCourseFee",
title: "报名费",
width: 80,
key:"a7",
},
{
field: "TotalClassHours",
title: "课时",
width: 80,
key:"a8",
},
{
field: "TotalUnitPrice",
title: "单价",
width: 80,
key:"a9",
},
{
field: "Money",
title: "金额",
width: 80,
key:"a10",
},
{
field: "TotalBookFee",
title: "教材费",
width: 80,
key:"a11",
},
{
field: "TotalClassFee",
title: "课件费",
width: 80,
key:"a12",
},
{
field: "TotalMoney",
title: "合同总金额",
width: 80,
key:"a13",
},
// ]
// },
// {
// title: "收款信息(实收金额)",
// width: 400,
// key:"b",
// children:[
{
field: "",
title: "收款日期",
width: 80,
key:"b1",
},
{
field: "",
title: "收款金额",
width: 80,
key:"1-13",
},
{
field: "",
title: "收款方式",
width: 80,
key:"b2",
},
{
field: "",
title: "收款账户",
width: 80,
key:"b3",
},
// ]
// },
{
field: "PreferPrice",
title: "应收金额",
width: 80,
key:"c",
},
// {
// title: "合同有效金额",
// width: 400,
// key:"d",
// children:[
{
field: "EffectiveClassHours",
title:"有效课时",
width: 80,
key:"d1",
},
{
field: "Income",
title: "有效金额",
width: 80,
key:"d2",
},
// ]
// },
// {
// title: "消耗情况",
// width: 400,
// key:"e",
// children:[
{
field: "UseBookFee",
title: "教材费",
width: 80,
key:"e1",
},
{
field: "UseCoursewareFee",
title: "课件费",
width: 80,
key:"e2",
},
{
field: "Progress",
title: "上课进度",
width: 80,
key:"e3",
},
{
field: "UseClassHours",
title: "已上课时",
width: 80,
key:"e4",
},
{
field: "Unit_Price",
title: "单价",
width: 80,
key:"e5",
},
{
field: "UseCourseFee",
title: "已上课金额",
width: 80,
key:"e6",
},
// ]
// },
// {
// title: "剩余情况",
// width: 160,
// key:"f",
// children:[
{
field: "AdjustPrice",
title: "协调金额",
width: 80,
key:"f1",
},
{
field: "SurplusCourseHours",
title: "剩余课时",
width: 80,
key:"f2",
},
{
field: "SurplusMoney",
title: "剩余金额",
width: 80,
key:"f3",
},
// ]
// }
// ]
// }
],
EmployeeList:[],//业务员列表
AccList:[],//账户类型列表
BranchAccountList:[],//交易方式列表
accountList:[],//账号id列表
}
},
created() {
// if (this.$route.query.year) {
// this.year = this.$route.query.year
// } else {
// this.year = new Date().getFullYear().toString()
// }
// let arr = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"]
// for (let i = 0; i < 12; i++) {
// this.monthList.push({
// id: i + 1,
// name: arr[i],
// value: 0,
// })
// }
let userInfo = this.getLocalStorage();
this.userId = userInfo.EmployeeId;
},
mounted() {
this.getData(2);
this.getCompanyList();
this.getEmployee(0);
this.AccountType_post_GetList();
this.Financial_post_GetBranchAccountList();
},
methods: {
goUrl(path, startDate, endDate, BranchId, tab) {
this.$router.push({
name: path,
query: {
"startDate": startDate,
"endDate": endDate,
BranchId: BranchId,
blank: 'y',
tab: tab
}
})
},
GoUrlFan(path, month, year, BranchId, ids) {
this.$router.push({
path: "/financial/" + path,
query: {
year: year,
month: month,
BranchId: BranchId,
CostIds: ids,
blank: "y"
}
});
},
rowDbClick(rowIndex, rowData, column) {
},
rowClick(rowIndex, rowData, column) {
var that = this;
let startDate = that.year + "-" + column.start;
let endDate = "";
let BranchId = that.msg.BranchId;
let month = column.month;
if (column.field == "ErYue") {
endDate = that.getFirstAndLastMonthDay(that.year, "02");
} else {
endDate = that.year + "-" + column.end
}
if (rowIndex < 8) {
// 联运收入
// if(rowData.ZhaiYao=="联运收入"){
// that.goUrl("CombinedRevenueReport",startDate,endDate,BranchId,"联运收入")
// }
// // 跳转到应收团款查询
// else if(rowData.ZhaiYao=="营业总收入"){
// that.goUrl("RecPayQueryTeam",startDate,endDate,BranchId,"应收团款查询")
// }
// else if(rowData.ZhaiYao=="营业总成本"){
// that.goUrl("RecPayQueryTeamV2",startDate,endDate,BranchId,"应付团款查询")
// }
that.$router.push({
path: "/financial/TeamRevenueReport",
query: {
StartTime: startDate,
EndTime: endDate,
BranchId: BranchId,
blank: "y"
}
});
} else {
if (rowData.ZhaiYao == "员工提成") {
if (Number(this.year) == 2019) {
if (column.title == "十月" || column.title == "十一月" || column.title == "十二月") {
let CostIds = "";
CostIds = rowData.CostIds.replace('112,', '');
CostIds = CostIds.replace('16,', '');
that.GoUrlFan('JumpReport', month, rowData.Year, rowData.BranchId, CostIds)
} else {
that.GoUrlFan('JumpReport', month, rowData.Year, rowData.BranchId, rowData.CostIds)
}
} else if (Number(this.year) > 2019) {
let CostIds = "";
CostIds = rowData.CostIds.replace('112,', '');
CostIds = CostIds.replace('16,', '');
that.GoUrlFan('JumpReport', month, rowData.Year, rowData.BranchId, CostIds)
} else {
that.GoUrlFan('JumpReport', month, rowData.Year, rowData.BranchId, rowData.CostIds)
}
} else if (rowData.ZhaiYao == "歐洲與南亞損失分攤") {
that.goUrl("AirTicketLoss", startDate, endDate, BranchId, "机票分摊")
} else if (rowData.ZhaiYao == "营业外收入" || rowData.ZhaiYao == "其他营业支出" || rowData.ZhaiYao == "应收应付款") {
if (that.msg.BranchId == 1218) {
this.$router.push({
path: "/JumpReport",
query: {
year: rowData.Year,
month: month,
BranchId: rowData.BranchId,
CostIds: rowData.CostIds,
"IsJapanNonbusinessIncome": 1,
blank: "y"
}
});
}
//网络印象
if (that.msg.BranchId == 1224) {
this.$router.push({
path: "/fxOrderProfitLossList",
query: {
year: rowData.Year,
month: month,
BranchId: rowData.BranchId,
CostIds: rowData.CostIds,
"IsJapanNonbusinessIncome": 1,
blank: "y"
}
});
} else {
that.GoUrlFan('JumpReport', month, rowData.Year, rowData.BranchId, rowData.CostIds)
}
} else {
that.GoUrlFan('JumpReport', month, rowData.Year, rowData.BranchId, rowData.CostIds)
}
}
},
getFirstAndLastMonthDay(year, month) {
var firstdate = year + '-' + month + '-01';
var day = new Date(year, month, 0);
var lastdate = year + '-' + month + '-' + day.getDate(); //获取当月最后一天日期
return lastdate;
},
togbu: function () {
this.AALloading = true
let msg = {
Year: this.year,
sharelist: [],
}
this.monthList.forEach(x => {
let obj = {
ID: 0,
Money: x.value,
Month: x.id,
Year: this.year
}
msg.sharelist.push(obj)
})
this.apipost('financestatistics_post_InsertBatchSimple', msg, res => {
if (res.data.resultCode == 1) {
this.$message.success(res.data.message)
} else {
this.AALloading = false
this.$message.error(res.data.message)
}
})
},
filterMethod: function (filters) {
},
sortChange: function (param) {
},
customCompFunc: function (param) {},
columnCellClass: function (rowIndex, columnName, rowData) {
if (rowData.YiYue < 0 && columnName == "YiYue") {
return "column-cell-class-name-test-red"
}
if (rowData.ErYue < 0 && columnName == "ErYue") {
return "column-cell-class-name-test-red"
}
if (rowData.SanYue < 0 && columnName == "SanYue") {
return "column-cell-class-name-test-red"
}
if (rowData.DiYiJiDu < 0 && columnName == "DiYiJiDu") {
return "column-cell-class-name-test-red"
}
if (rowData.SiYue < 0 && columnName == "SiYue") {
return "column-cell-class-name-test-red"
}
if (rowData.WuYue < 0 && columnName == "WuYue") {
return "column-cell-class-name-test-red"
}
if (rowData.LiuYue < 0 && columnName == "LiuYue") {
return "column-cell-class-name-test-red"
}
if (rowData.DiErJiDu < 0 && columnName == "DiErJiDu") {
return "column-cell-class-name-test-red"
}
if (rowData.ShangBanNianBao < 0 && columnName == "ShangBanNianBao") {
return "column-cell-class-name-test-red"
}
if (rowData.QiYue < 0 && columnName == "QiYue") {
return "column-cell-class-name-test-red"
}
if (rowData.BaYue < 0 && columnName == "BaYue") {
return "column-cell-class-name-test-red"
}
if (rowData.JiuYue < 0 && columnName == "JiuYue") {
return "column-cell-class-name-test-red"
}
if (rowData.ShiYue < 0 && columnName == "ShiYue") {
return "column-cell-class-name-test-red"
}
if (rowData.ShiYiYue < 0 && columnName == "ShiYiYue") {
return "column-cell-class-name-test-red"
}
if (rowData.ShiErYue < 0 && columnName == "ShiErYue") {
return "column-cell-class-name-test-red"
}
if (rowData.DiSiJiDu < 0 && columnName == "DiSiJiDu") {
return "column-cell-class-name-test-red"
}
if (rowData.XiaBanNianBao < 0 && columnName == "XiaBanNianBao") {
return "column-cell-class-name-test-red"
}
if (rowData.ZongJi < 0 && columnName == "ZongJi") {
return "column-cell-class-name-test-red"
}
if (rowData.ZhaiYao == '以下项均不计入计算') {
if (rowData.YiYue == 0) {
rowData.YiYue = '';
}
if (rowData.ErYue == 0) {
rowData.ErYue = '';
}
if (rowData.SanYue == 0) {
rowData.SanYue = '';
}
if (rowData.DiYiJiDu == 0) {
rowData.DiYiJiDu = '';
}
if (rowData.SiYue == 0) {
rowData.SiYue = '';
}
if (rowData.WuYue == 0) {
rowData.WuYue = '';
}
if (rowData.LiuYue == 0) {
rowData.LiuYue = '';
}
if (rowData.DiErJiDu == 0) {
rowData.DiErJiDu = '';
}
if (rowData.ShangBanNianBao == 0) {
rowData.ShangBanNianBao = '';
}
if (rowData.QiYue == 0) {
rowData.QiYue = '';
}
if (rowData.BaYue == 0) {
rowData.BaYue = '';
}
if (rowData.JiuYue == 0) {
rowData.JiuYue = '';
}
if (rowData.DiSanJiDu == 0) {
rowData.DiSanJiDu = '';
}
if (rowData.ShiYue == 0) {
rowData.ShiYue = '';
}
if (rowData.ShiYiYue == 0) {
rowData.ShiYiYue = '';
}
if (rowData.ShiErYue == 0) {
rowData.ShiErYue = '';
}
if (rowData.DiSiJiDu == 0) {
rowData.DiSiJiDu = '';
}
if (rowData.XiaBanNianBao == 0) {
rowData.XiaBanNianBao = '';
}
if (rowData.ZongJi == 0) {
rowData.ZongJi = '';
}
}
// 设置列class
if (columnName === "ZongJi") {
return "column-cell-class-name-test-pink";
}
if (columnName === "DiYiJiDu" || columnName === "DiErJiDu" || columnName === "ShangBanNianBao" ||
columnName === "DiSanJiDu" || columnName === "DiSiJiDu" || columnName === "XiaBanNianBao") {
return "column-cell-class-name-test";
}
if (rowIndex === 1 && (columnName === "DiYiJiDu" || columnName === "DiErJiDu" || columnName ===
"ShangBanNianBao" || columnName === "DiSanJiDu" || columnName === "DiSiJiDu" || columnName ===
"XiaBanNianBao")) {
return "column-cell-class-name-test";
}
if (rowData.ZhaiYao === '营业总毛利' || rowData.ZhaiYao === '歐洲與南亞損失分攤' || rowData.ZhaiYao === '营业税金及附加' || rowData
.ZhaiYao === '管销费用' || rowData.ZhaiYao === '财务费用' || rowData.ZhaiYao === '营业外收入' || rowData.ZhaiYao ===
'其他营业支出') {
return "column-cell-class-name-test-greed";
}
if (rowData.ZhaiYao === '社保') {
return "column-cell-class-name-test-gray";
}
if (rowData.ZhaiYao === '营业利润 (亏损)') {
return "column-cell-class-name-test-pink-t";
}
if (rowData.ZhaiYao === '净利润 (亏损)') {
return "column-cell-class-name-test-t";
}
if (rowData.ZhaiYao === '所得税费用') {
return "column-cell-class-name-test-greed-s";
}
if (rowData.ZhaiYao == '以下项均不计入计算') {
return "column-cell-class-name-test-lan-s"
}
},
exportExcel: function () {
let msg = {
EmployeeId: this.userId,
Year: this.year,
sharelist: [],
BranchId: this.msg.BranchId,
}
this.monthList.forEach(x => {
let obj = {
ID: 0,
Money: x.value,
Month: x.id,
Year: this.year
}
msg.sharelist.push(obj)
})
EduDownLoad("/finance/OutToExcelEasyReportList", msg, "简易报表.xls")
},
// getData: function (type) {
// this.msg.sharelist = []
// this.loading = true;
// if (type == 1) {
// this.monthList.forEach(x => {
// let obj = {
// ID: 0,
// Money: x.value,
// Month: x.id,
// Year: this.year
// }
// this.msg.sharelist.push(obj)
// })
// }
// this.msg.Year = parseInt(this.year)
// getEasyReportList(this.msg)
// .then(res => {
// this.loading = false;
// if (res.Code == 1) {
// let data = res.Data
// let tichengList = [];
// this.DataList = [];
// data.list.forEach(item => {
// if (item.ZhaiYao != "销售提成" && item.ZhaiYao != "原始提成") {
// this.DataList.push(item)
// } else {
// tichengList.push(item);
// }
// })
// this.UpdateStaus = data.Status;
// this.UpdateStartTime = data.UpdateStartTime;
// this.UpdateEndTime = data.UpdateEndTime;
// this.loading = false
// this.$forceUpdate()
// return
// for (let i = 0; i <= 18; i++) {
// this.DataList.push({
// ID: i + 1,
// ZhaiYao: parseInt(Math.random(1000) * 1000 + 1),
// YiYue: parseInt(Math.random(1000) * 1000 + 1),
// ErYue: parseInt(Math.random(1000) * 1000 + 1),
// SanYue: parseInt(Math.random(1000) * 1000 + 1),
// DiYiJiDu: parseInt(Math.random(1000) * 1000 + 1),
// SiYue: parseInt(Math.random(1000) * 1000 + 1),
// WuYue: parseInt(Math.random(1000) * 1000 + 1),
// LiuYue: parseInt(Math.random(1000) * 1000 + 1),
// DiErJiDu: parseInt(Math.random(1000) * 1000 + 1),
// ShangBanNianBao: parseInt(Math.random(1000) * 1000 + 1),
// QiYue: parseInt(Math.random(1000) * 1000 + 1),
// BaYue: parseInt(Math.random(1000) * 1000 + 1),
// JiuYue: parseInt(Math.random(1000) * 1000 + 1),
// DiSanJiDu: parseInt(Math.random(1000) * 1000 + 1),
// ShiYue: parseInt(Math.random(1000) * 1000 + 1),
// ShiYiYue: parseInt(Math.random(1000) * 1000 + 1),
// ShiErYue: parseInt(Math.random(1000) * 1000 + 1),
// DiSiJiDu: parseInt(Math.random(1000) * 1000 + 1),
// XiaBanNianBao: parseInt(Math.random(1000) * 1000 + 1),
// ZongJi: parseInt(Math.random(1000) * 1000 + 1),
// })
// }
// } else {
// this.loading = false
// this.$message.error(res.Message)
// }
// })
// .catch(() => {
// this.loading = false;
// });
// },
//初始化学校
getData(){
getOrderCompleteStatisticsPageList(this.msg).then((res)=>{
// let data=[]
// res.Data.PageData.map((item)=>{
// console.log(item)
// // let obj={
// // OrderId:item.
// // }
// })
this.DataList=res.Data.PageData
})
},
getCompanyList() {
let userInfo = this.getLocalStorage();
var RB_Group_id = userInfo.RB_Group_id;
let msg = {
Status: 0,
is_show: 0,
RB_Group_Id: RB_Group_id
};
getSchoolDropdown({}).then(res => {
if (res.Code == 1) {
var tempArray = res.Data;
this.BranchList = tempArray;
}
})
},
//获取业务员
getEmployee(id) {
var qMsg = {
Dept_Id: 0
}
qMsg.Dept_Id=id;
queryEmployee(qMsg).then(res => {
if(res.Code==1){
this.EmployeeList = res.Data;
}
}).catch(() => {
})
},
//获取账户类型下拉
AccountType_post_GetList() {
this.apipost('AccountType_post_GetList', this.queryAccMsg, res => {
if (res.data.resultCode == 1) {
this.AccList = res.data.data;
} else {
this.$message.error(res.data.message);
}
}, err => {})
},
//获取交易方式列表
Financial_post_GetBranchAccountList() {
this.apipost('Financial_post_GetBranchAccountList', {}, res => {
if (res.data.resultCode == 1) {
this.BranchAccountList = res.data.data;
}
}, err => {})
},
//账户id
getAccountList(i, t) {
let accountList = [];
if (t == 1) { // 银行
this.apipost('bankaccount_post_GetList', {
TypeId: i
}, res => {
if (res.data.resultCode == 1) {
let data = res.data.data;
data.forEach(x => {
let obj = {
ID: x.ID,
Name: x.Alias,
Nom: 0,
}
accountList.push(obj)
})
this.accountList = accountList;
}
}, err => {})
}
if (t == 2) { //平台账户
let msg = {
BackId: 0,
TypeId: i,
BranchId: -1,
Alias: ''
}
this.apipost('BankAccount_post_GetPlatformList', msg, res => {
if (res.data.resultCode == 1) {
let data = res.data.data;
data.forEach(x => {
let obj = {
ID: x.ID,
Name: x.Alias,
Nom: x.PlatformNo
}
accountList.push(obj)
})
this.accountList = accountList;
}
}, err => {})
}
if (t == 3) { //现金账户
let msg = {
TypeId: i,
BranchId: -1,
Alias: ''
}
this.apipost('BankAccount_post_GetCashAccountList', msg, res => {
if (res.data.resultCode == 1) {
let data = res.data.data;
data.forEach(x => {
let obj = {
ID: x.ID,
Name: x.Alias,
Nom: 0
}
accountList.push(obj)
})
this.accountList = accountList
}
}, err => {})
}
if (t == 4) { //资金池账户
let msg = {
TypeId: i,
BranchId: -1,
Alias: ''
}
this.apipost('BankAccount_post_GetCashPoolList', msg, res => {
if (res.data.resultCode == 1) {
let data = res.data.data;
data.forEach(x => {
let obj = {
ID: x.ID,
Name: x.Alias,
Nom: 0
}
accountList.push(obj)
})
this.accountList = accountList
}
}, err => {})
}
},
}
}
</script>
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