<style> .page_EasyReport_set{ position: relative; } .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; } /* .My_table_tell .v-table-body-cell{ display: block!important; line-height: 30px!important; } */ </style> <template> <div class="page_EasyReport My_table_tell" 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="$t('objFill.nianfen')"> <!-- <el-date-picker v-model="year" type="year" @change="getData(2)" value-format="yyyy" :placeholder="$t('objFill.xuanzhenian')"> </el-date-picker> --> <YearLimit :clearable="false" :dateTime="year" @change="getTime"></YearLimit> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('scen.sc_cp')"> <el-select class="w150" :disabled="BranchStatus" v-model="msg.BranchId" filterable :placeholder="$t('pub.pleaseSel')" @change="getChange"> <el-option :label="$t('pub.unlimitedSel')" :value="-1"></el-option> <el-option v-for="item in BranchList" :label="item.BName" :key="item.Id" :value="item.Id">{{item.BName}}</el-option> </el-select> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('fnc.bweibi')"> <el-select class="w150" :disabled="coinGetShow" v-model="msg.StandardCurrencyId" filterable :placeholder="$t('pub.pleaseSel')" @change="getChange"> <el-option :label="$t('pub.unlimitedSel')" :value="-1"></el-option> <el-option v-for="item in coinGetList" :label="item.Name" :key="item.ID" :value="item.ID">{{item.Name}}</el-option> </el-select> </el-form-item> </el-col> <el-col :span="6"> <el-button class="normalBtn page_EasyReport_search" style="left: 900px;" @click="getData(2)">{{$t('pub.searchBtn')}}</el-button> </el-col> </el-row> <!-- <el-row > <el-col :span="6" v-for="(month, index) in monthList" :key="index"> <el-form-item :label="`${month.name}:`"> <el-input v-model="month.value" @change="MonthIndex = month.id" type="number"></el-input> </el-form-item> </el-col> </el-row> --> </el-form> <div class="page_EasyReport_export"> <button class="normalBtn " @click="exportExcel">{{$t('objFill.v101.FinancialModule.daochuexcel')}}</button> <button v-if="isShowTaxesShareBtn" class="normalBtn " @click="TaxesShare">{{$t('objFill.yingyeesjft')}}</button> <!-- <button class="normalBtn " @click="togbu">一键同步</button> --> </div> <button class="normalBtn page_EasyReport_search" v-if="userId==1" @click="getData(1)">{{$t('objFill.baochunshunshi')}}</button> <p class="easyUpdateTime" v-if="UpdateStaus==1">{{$t('objFill.zhengzaigxkssj')}} {{UpdateStartTime}}</p> <p class="easyUpdateTime" v-if="UpdateStaus==2">{{$t('objFill.shangcgxsj')}} {{UpdateStartTime}}<br/>{{$t('objFill.meirisjgx')}}</p> </div> <div style="margin-bottom:25px;" v-loading='loading'> <v-table is-horizontal-resize column-width-drag :show-vertical-border="true" style="width:100%" :columns="columns" :table-data="DataList" :filter-method="filterMethod" :row-height="30" :column-cell-class-name="columnCellClass" @on-custom-comp="customCompFunc" @sort-change="sortChange" :row-click="rowClick" :row-dblclick="rowDbClick" > </v-table> </div> <el-dialog :title="$t('objFill.yingyeesjft')" :visible.sync="IsShowTaxesShare" center > <div class="page_EasyReport_set clearfix"> <el-form class="clearfix " label-width="110px"> <el-row style="padding:15px 0 0 0;"> <el-col > <el-form-item :label="$t('objFill.nianfen')"> <el-date-picker v-model="year" type="year" @change="getTaxesShareData(2)" value-format="yyyy" :disabled="true" :placeholder="$t('objFill.xuanzhenian')"> </el-date-picker> </el-form-item> </el-col> <el-col :span="4"> <button class="normalBtn page_EasyReport_search" style="left: 688px;" @click="saveData(2)" >{{$t('pub.saveBtn')}}</button> </el-col> </el-row> <el-row > <el-col :span="5" > <el-form-item :label="$t('objFill.yuefens')[0]+':'"> <el-input v-model="msgTaxesShare.Month1" @keyup.native="checkPrice(msgTaxesShare,'Month1')" :disabled="TaxesShareMonth<1"></el-input> </el-form-item> </el-col> <el-col :span="5" > <el-form-item :label="$t('objFill.yuefens')[1]+':'"> <el-input v-model="msgTaxesShare.Month2" @keyup.native="checkPrice(msgTaxesShare,'Month2')" :disabled="TaxesShareMonth<2"></el-input> </el-form-item></el-col> <el-col :span="5" > <el-form-item :label="$t('objFill.yuefens')[2]+':'"> <el-input v-model="msgTaxesShare.Month3" @keyup.native="checkPrice(msgTaxesShare,'Month3')" :disabled="TaxesShareMonth<3"></el-input> </el-form-item></el-col> <el-col :span="5" > <el-form-item :label="$t('objFill.yuefens')[3]+':'"> <el-input v-model="msgTaxesShare.Month4" @keyup.native="checkPrice(msgTaxesShare,'Month4')" :disabled="TaxesShareMonth<4"></el-input> </el-form-item></el-col> <el-col :span="5" > <el-form-item :label="$t('objFill.yuefens')[4]+':'"> <el-input v-model="msgTaxesShare.Month5" @keyup.native="checkPrice(msgTaxesShare,'Month5')":disabled="TaxesShareMonth<5"></el-input> </el-form-item></el-col> <el-col :span="5" > <el-form-item :label="$t('objFill.yuefens')[5]+':'"> <el-input v-model="msgTaxesShare.Month6" @keyup.native="checkPrice(msgTaxesShare,'Month6')" :disabled="TaxesShareMonth<6"></el-input> </el-form-item></el-col> <el-col :span="5" > <el-form-item :label="$t('objFill.yuefens')[6]+':'"> <el-input v-model="msgTaxesShare.Month7" @keyup.native="checkPrice(msgTaxesShare,'Month7')" :disabled="TaxesShareMonth<7"></el-input> </el-form-item></el-col> <el-col :span="5" > <el-form-item :label="$t('objFill.yuefens')[7]+':'"> <el-input v-model="msgTaxesShare.Month8" @keyup.native="checkPrice(msgTaxesShare,'Month8')":disabled="TaxesShareMonth<8"></el-input> </el-form-item></el-col> <el-col :span="5" > <el-form-item :label="$t('objFill.yuefens')[8]+':'"> <el-input v-model="msgTaxesShare.Month9" @keyup.native="checkPrice(msgTaxesShare,'Month9')" :disabled="TaxesShareMonth<9"></el-input> </el-form-item></el-col> <el-col :span="5" > <el-form-item :label="$t('objFill.yuefens')[9]+':'"> <el-input v-model="msgTaxesShare.Month10" @keyup.native="checkPrice(msgTaxesShare,'Month10')" :disabled="TaxesShareMonth<10"></el-input> </el-form-item></el-col> <el-col :span="5" > <el-form-item :label="$t('objFill.yuefens')[10]+':'"> <el-input v-model="msgTaxesShare.Month11" @keyup.native="checkPrice(msgTaxesShare,'Month11')" :disabled="TaxesShareMonth<11"></el-input> </el-form-item></el-col> <el-col :span="5" > <el-form-item :label="$t('objFill.yuefens')[11]+':'"> <el-input v-model="msgTaxesShare.Month12" @keyup.native="checkPrice(msgTaxesShare,'Month12')" :disabled="TaxesShareMonth<12"></el-input> </el-form-item> </el-col> </el-row> </el-form> <!-- <div class="page_EasyReport_export"> <button class="normalBtn " @click="getData" >{{$t('pub.saveBtn')}}</button> </div> --> </div> </el-dialog> </div> </template> <script> import YearLimit from '../../public/YearLimit.vue'; 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)">{{moneyFormatN(rowData.YiYue)}}</span> <span style="cursor: pointer" v-else>{{moneyFormatN(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: "/" + 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)">{{moneyFormatN(rowData.ErYue)}}</span> <span style="cursor: pointer" v-else>{{moneyFormatN(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: "/" + 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)">{{moneyFormatN(rowData.SanYue)}}</span> <span style="cursor: pointer" v-else>{{moneyFormatN(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: "/" + 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)">{{moneyFormatN(rowData.SiYue)}}</span> <span style="cursor: pointer" v-else>{{moneyFormatN(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: "/" + 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)">{{moneyFormatN(rowData.WuYue)}}</span> <span style="cursor: pointer" v-else>{{moneyFormatN(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: "/" + 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)">{{moneyFormatN(rowData.LiuYue)}}</span> <span style="cursor: pointer" v-else>{{moneyFormatN(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: "/" + 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)">{{moneyFormatN(rowData.QiYue)}}</span> <span style="cursor: pointer" v-else>{{moneyFormatN(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: "/" + 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)">{{moneyFormatN(rowData.BaYue)}}</span> <span style="cursor: pointer" v-else>{{moneyFormatN(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: "/" + 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)">{{moneyFormatN(rowData.JiuYue)}}</span> <span style="cursor: pointer" v-else>{{moneyFormatN(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: "/" + 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)">{{moneyFormatN(rowData.ShiYue)}}</span> <span style="cursor: pointer" v-else>{{moneyFormatN(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: "/" + 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)">{{moneyFormatN(rowData.ShiYiYue)}}</span> <span style="cursor: pointer" v-else>{{moneyFormatN(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: "/" + 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)">{{moneyFormatN(rowData.ShiEr)}}</span> <span style="cursor: pointer" v-else>{{moneyFormatN(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: "/" + path, query: { year:year, month:month, BranchId:BranchId, CostIds:ids, blank: "y" } }); } } }); export default { components: {YearLimit}, data() { return { IsShowTaxesShare:false, year: '', monthList: [], msg: { Year: '', Month: 0, Money: '', sharelist: [], BranchId: -1, StandardCurrencyId: -1 }, msgTaxesShare: { Year: '', Month1: 0, Month2: 0, Month3: 0, Month4: 0, Month5: 0, Month6: 0, Month7: 0, Month8: 0, Month9: 0, Month10: 0, Month11: 0, Month12: 0, }, TaxesShareMonth: 12, data: [], DataList: [], UpdateStaus:0, UpdateStartTime:'', UpdateEndTime:'', BranchList: [], MonthIndex: 0, pageSize: 18, pageIndex: 1, multipleSort: false, loading: false, AALloading: false, userId: -2, columns: [ { field: "Sort", title: this.$t('fnc.a_heji'), width: 80, titleAlign: "left", columnAlign: "left", isResize: true, result: [], type: "select", isFrozen: false }, { field: "ZhaiYao", title: this.$t('fnc.a_zhaiyao'), width: 150, titleAlign: "left", columnAlign: "left", isResize: true, result: [], type: "select", isFrozen: false, }, { field: "YiYue", formatter: this.moneyFormatBB, title: this.$t('objFill.yuefens')[0], 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", formatter: this.moneyFormatBB, title: this.$t('objFill.yuefens')[1], start:"02-01", end:"02", month:2, width: 80, titleAlign: "left", columnAlign: "right", isResize: true, result: [], type: "select", isFrozen: false, // componentName: "ErYueJump" }, { field: "SanYue", formatter: this.moneyFormatBB, title: this.$t('objFill.yuefens')[2], 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", formatter: this.moneyFormatBB, title: this.$t('objFill.jidus')[0], start:"01-01", end:"03-31", width: 80, titleAlign: "left", columnAlign: "right", isResize: true, result: [], type: "select", isFrozen: false }, { field: "SiYue", formatter: this.moneyFormatBB, title: this.$t('objFill.yuefens')[3], 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", formatter: this.moneyFormatBB, title: this.$t('objFill.yuefens')[4], 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", formatter: this.moneyFormatBB, title: this.$t('objFill.yuefens')[5], 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", formatter: this.moneyFormatBB, title: this.$t('objFill.jidus')[1], start:"04-01", end:"06-30", width: 80, titleAlign: "left", columnAlign: "right", isResize: true, result: [], type: "select", isFrozen: false }, { field: "ShangBanNianBao", formatter: this.moneyFormatBB, title: this.$t('objFill.jidus')[2], start:"01-01", end:"06-30", width: 80, titleAlign: "left", columnAlign: "right", isResize: true, result: [], type: "select", isFrozen: false }, { field: "QiYue", formatter: this.moneyFormatBB, title: this.$t('objFill.yuefens')[6], 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", formatter: this.moneyFormatBB, title: this.$t('objFill.yuefens')[7], 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", formatter: this.moneyFormatBB, title: this.$t('objFill.yuefens')[8], 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", formatter: this.moneyFormatBB, title: this.$t('objFill.jidus')[3], start:"06-01", end:"09-30", width: 80, titleAlign: "left", columnAlign: "right", isResize: true, result: [], type: "select", isFrozen: false }, { field: "ShiYue", formatter: this.moneyFormatBB, title: this.$t('objFill.yuefens')[9], 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", formatter: this.moneyFormatBB, title: this.$t('objFill.yuefens')[10], 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", formatter: this.moneyFormatBB, title: this.$t('objFill.yuefens')[11], 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", formatter: this.moneyFormatBB, title: this.$t('objFill.jidus')[4], start:"10-01", end:"12-31", width: 80, titleAlign: "left", columnAlign: "right", isResize: true, result: [], type: "select", isFrozen: false }, { field: "XiaBanNianBao", formatter: this.moneyFormatBB, title: this.$t('objFill.jidus')[5], start:"10-01", end:"12-31", width: 80, titleAlign: "left", columnAlign: "right", isResize: true, result: [], type: "select", isFrozen: false }, { field: "ZongJi", formatter: this.moneyFormatBB, title: this.$t('ground.zongji'), start:"01-01", end:"12-31", width: 80, titleAlign: "left", columnAlign: "right", isResize: true, result: [], type: "select", isFrozen: false }, ], BranchStatus:true, coinGetList: [], coinGetShow: false, isShowTaxesShareBtn: false, } }, created(){ var nowTime=new Date(); if (this.$route.query.year) { this.year = this.$route.query.year } else { this.year = nowTime.getFullYear().toString() } if(this.year==nowTime.getFullYear().toString()){ this.TaxesShareMonth=nowTime.getMonth(); } let arr = [this.$t('objFill.yuefens')[0],this.$t('objFill.yuefens')[1],this.$t('objFill.yuefens')[2],this.$t('objFill.yuefens')[3],this.$t('objFill.yuefens')[4],this.$t('objFill.yuefens')[5],this.$t('objFill.yuefens')[6],this.$t('objFill.yuefens')[7],this.$t('objFill.yuefens')[8],this.$t('objFill.yuefens')[9],this.$t('objFill.yuefens')[10],this.$t('objFill.yuefens')[11]] for (let i = 0; i < 12; i++) { this.monthList.push({ id: i + 1, name: arr[i], value: 0, }) } let userInfo = this.getLocalStorage(); let ActionMenuCode = userInfo.ActionMenuCode; if (ActionMenuCode.indexOf('TaxesShare') != -1) { this.isShowTaxesShareBtn = true; } this.userId = userInfo.EmployeeId; }, mounted(){ this.financeinfo_post_GetList() this.getCompanyList() }, methods:{ getTime(Date){ this.msg.Year=Date this.year=Date this.getData(2) }, getTaxesShareData: function (type) { this.msg.sharelist = [] this.loading = true; this.msg.Year = parseInt(this.year) this.apipost('financestatistics_post_GetTaxesShareList', this.msg, res=>{ if (res.data.resultCode == 1) { let data = res.data.data this.msgTaxesShare.Month1=data.Month1; this.msgTaxesShare.Month2=data.Month2; this.msgTaxesShare.Month3=data.Month3; this.msgTaxesShare.Month4=data.Month4; this.msgTaxesShare.Month5=data.Month5; this.msgTaxesShare.Month6=data.Month6; this.msgTaxesShare.Month7=data.Month7; this.msgTaxesShare.Month8=data.Month8; this.msgTaxesShare.Month9=data.Month9; this.msgTaxesShare.Month10=data.Month10; this.msgTaxesShare.Month11=data.Month11; this.msgTaxesShare.Month12=data.Month12; this.loading = false this.$forceUpdate() return } else { this.loading = false this.$message.error(res.data.message) } }, null) }, saveData: function () { this.msgTaxesShare.Year = parseInt(this.year) this.apipost('financestatistics_post_SetTaxesShareList', this.msgTaxesShare, res=>{ if (res.data.resultCode == 1) { this.loading = false this.$message.Success(this.$t('objFill.chaozuochenggong')) this.IsShowTaxesShare=false } else { this.loading = false this.IsShowTaxesShare=false this.$message.error(res.data.message) } }, null) }, TaxesShare(){ // 添加出纳按钮点击事件 this.IsShowTaxesShare=true; this.getTaxesShareData(); }, getChange(val){ if(this.msg.BranchId == -1){ this.coinGetShow = false this.msg.StandardCurrencyId = val>-1?val:this.coinGetList[0].ID }else{ this.coinGetShow = true this.msg.StandardCurrencyId = -1 } this.getData(2) }, financeinfo_post_GetList(){ // 获取币种 this.apipost('financeinfo_post_GetAllStandardCurrencyList',{}, res => { if(res.data.resultCode == 1) { if(this.msg.BranchId==-1){ this.coinGetList = res.data.data; this.msg.StandardCurrencyId = this.coinGetList[0].ID }else{ this.coinGetShow = true this.msg.StandardCurrencyId = -1 } this.getData(2) } }) }, 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,StandardCurrencyId) { this.$router.push({ path: "/" + path, query: { year:year, month:month, BranchId:BranchId, CostIds:ids, StandardCurrencyId:StandardCurrencyId, 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 StandardCurrencyId=that.msg.StandardCurrencyId; let month=column.month; if(column.field=="ErYue"){ endDate=that.getFirstAndLastMonthDay(that.year,"02"); }else{ endDate=that.year+"-"+column.end } if((rowIndex<20 || rowData.ZhaiYao=="团内承担燃油费") && rowData.ZhaiYao !="旅游意外保险"){ // if(BranchId == 1245){ // that.$router.push({ name: "TeamRevenueReport",query:{"StartTime":startDate,"EndTime":endDate,BranchId:BranchId,OutBranchId:BranchId,StandardCurrencyId,blank:'y',tab:"营收报表"} }) // } if(rowData.ZhaiYao=="联运收入"){ that.goUrl("CombinedRevenueReport",startDate,endDate,BranchId,"联运收入") } // 跳转到应收团款查询 else if(rowData.ZhaiYao=="营业总收入"){ that.$router.push({ name: "TeamRevenueReport",query:{"StartTime":startDate,"EndTime":endDate,BranchId:BranchId,OutBranchId:BranchId,StandardCurrencyId,DataType:-1,blank:'y',tab:"营收报表"} }) // that.goUrl("RecPayQueryTeam",startDate,endDate,BranchId,"应收团款查询") } else if(rowData.ZhaiYao=="营业总成本"){ that.$router.push({ name: "TeamRevenueReport",query:{"StartTime":startDate,"EndTime":endDate,BranchId:BranchId,OutBranchId:BranchId,StandardCurrencyId,DataType:-1,blank:'y',tab:"营收报表"} }) // that.goUrl("RecPayQueryTeamV2",startDate,endDate,BranchId,"应付团款查询") } else{ that.$router.push({ name: "TeamRevenueReport",query:{"StartTime":startDate,"EndTime":endDate,BranchId:BranchId,OutBranchId:BranchId,StandardCurrencyId,DataType:-1,blank:'y',tab:"营收报表"} }) } }else{ if(rowData.ZhaiYao=="员工提成"){ if(Number(this.year)==2019){ if(column.title==this.$t('objFill.yuefens')[9] || column.title==this.$t('objFill.yuefens')[10] || column.title==this.$t('objFill.yuefens')[11]){ 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, StandardCurrencyId,) } else{ that.GoUrlFan('JumpReport',month,rowData.Year,rowData.BranchId,rowData.CostIds, StandardCurrencyId,) } } 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, StandardCurrencyId:StandardCurrencyId, "IsJapanNonbusinessIncome":1, blank: "y" } }); }else{ that.GoUrlFan('JumpReport',month,rowData.Year,rowData.BranchId,rowData.CostIds,StandardCurrencyId) } }else if(rowData.ZhaiYao=="电商收入" ||rowData.ZhaiYao=="电商支出"||rowData.ZhaiYao=="电商手续费"){ //网络印象 if(that.msg.BranchId==1224 || that.msg.BranchId==-1 ){ this.$router.push({ path: "/fxOrderProfitLossList", query: { year:rowData.Year, month:month, BranchId:rowData.BranchId, CostIds:rowData.CostIds, "IsJapanNonbusinessIncome":1, blank: "y" } }); } }else if(rowData.ZhaiYao=="预收款(团费)"||rowData.ZhaiYao=="预收款(抵用)"){ // if(column.title=="一月" || column.title=="二月" || column.title=="三月"|| // column.title=="四月" || column.title=="五月" || column.title=="六月" || // column.title=="第一季度" || column.title=="第二季度" || column.title=="上半年报"){ // let QStartDate // let QEndDate // let month2 // var MonthDayNum // if(column.title=="第一季度"){ // QStartDate = `${rowData.Year}-01-01` // month2 = `03` // } else if(column.title=="第二季度"){ // QStartDate = `${rowData.Year}-04-01` // month2 = `06` // } else if(column.title=="上半年报"){ // QStartDate = `${rowData.Year}-01-01` // month2 = `06` // }else{ // QStartDate = `${rowData.Year}-${month>10?month:'0'+month}-01` // month2 = `${month>10?month:'0'+month}` // } // MonthDayNum = new Date(rowData.Year, month2, 0).getDate(); //计算当月的天数 // QEndDate = `${rowData.Year}-${month2}-${MonthDayNum}` // that.goUrl("prestoreList",QStartDate,QEndDate,"客户预存查询") // }else{ that.GoUrlFan('JumpReport',month,rowData.Year,rowData.BranchId,rowData.CostIds,StandardCurrencyId) //} } else if(rowData.ZhaiYao =='车辆折旧' || rowData.ZhaiYao =='营业税金及附加' || rowData.ZhaiYao =='净利润(亏损)' || rowData.ZhaiYao =='营业利润(亏损)'|| rowData.ZhaiYao =='管销费用'){ //不跳转 } else{ that.GoUrlFan('JumpReport',month,rowData.Year,rowData.BranchId,rowData.CostIds,StandardCurrencyId) } } }, 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 === '其他营业支出' || rowData.ZhaiYao === '电商利润' || rowData.ZhaiYao === 'GL8利润' ) { 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.msg } this.monthList.forEach(x=>{ let obj = { ID: 0, Money: x.value, Month: x.id, Year: this.year } msg.sharelist.push(obj) }) this.GetLocalFile( "financestatistics_post_OutToExcelEasyReportList", msg, this.$t('objFill.v101.FinancialModule.jianyibb')+".xls" ); }, getData(type) { if(this.loading) return 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) var nowTime=new Date(); if(this.year==nowTime.getFullYear().toString()){ this.TaxesShareMonth=nowTime.getMonth(); }else{ this.TaxesShareMonth=12; } this.apipost('financestatistics_post_GetEasyReportList', this.msg, res=>{ if (res.data.resultCode == 1) { let BranchStatus=res.data.data.IsBranchButton; if(BranchStatus==-1){ this.BranchStatus=false; }else{ this.BranchStatus=true; this.msg.BranchId=BranchStatus; //春花可以查询 日本+和服公司 if(BranchStatus==1218||BranchStatus==1255){ this.BranchStatus=false; this.msg.StandardCurrencyId=-1; this.BranchList = this.BranchList.filter(x=>{ if(x.Id==1218 || x.Id==1255){return x;} else{return;} }); } } let data = res.data.data data.sharelist.forEach((x, i) => { this.monthList[i].value = x.Money }) 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 } else { this.loading = false this.$message.error(res.data.message) } }, null) }, //初始化公司 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 }; this.apipost("admin_get_BranchGetList", msg, res => { if (res.data.resultCode == 1) { this.BranchList = res.data.data; } }, err => {}) }, moneyFormatBB(rowData, rowIndex, pagingIndex, field) { if (field === "YiYue") return this.moneyFormatN(rowData.YiYue); if (field === "ErYue") return this.moneyFormatN(rowData.ErYue); if (field === "SanYue") return this.moneyFormatN(rowData.SanYue); if (field === "SiYue") return this.moneyFormatN(rowData.SiYue); if (field === "WuYue") return this.moneyFormatN(rowData.WuYue); if (field === "LiuYue") return this.moneyFormatN(rowData.LiuYue); if (field === "QiYue") return this.moneyFormatN(rowData.QiYue); if (field === "BaYue") return this.moneyFormatN(rowData.BaYue); if (field === "JiuYue") return this.moneyFormatN(rowData.JiuYue); if (field === "ShiYue") return this.moneyFormatN(rowData.ShiYue); if (field === "ShiYiYue") return this.moneyFormatN(rowData.ShiYiYue); if (field === "ShiErYue") return this.moneyFormatN(rowData.ShiErYue); if (field === "DiErJiDu") return this.moneyFormatN(rowData.DiErJiDu); if (field === "DiSanJiDu") return this.moneyFormatN(rowData.DiSanJiDu); if (field === "DiSiJiDu") return this.moneyFormatN(rowData.DiSiJiDu); if (field === "DiYiJiDu") return this.moneyFormatN(rowData.DiYiJiDu); if (field === "ShangBanNianBao") return this.moneyFormatN(rowData.ShangBanNianBao); if (field === "XiaBanNianBao") return this.moneyFormatN(rowData.XiaBanNianBao); if (field === "ZongJi") return this.moneyFormatN(rowData.ZongJi); }, } } </script>