Commit 9d82cd32 authored by 华国豪's avatar 华国豪 🙄

‘简易报表、团队收支一键同步,@@@@’

parent 9b6eff4d
......@@ -2,14 +2,13 @@
.page_EasyReport_set{
position: relative;
}
.page_EasyReport_set button{
.page_EasyReport_set .page_EasyReport_export{
position: absolute;
}
.page_EasyReport_set button.page_EasyReport_export{
right: 0;
top: 15px;
}
.page_EasyReport_set button.page_EasyReport_search{
position: absolute;
bottom: 27px;
left: 1020px;
}
......@@ -43,7 +42,10 @@
</el-col>
</el-row>
</el-form>
<button class="normalBtn page_EasyReport_export" @click="exportExcel">导出EXCEL</button>
<div class="page_EasyReport_export">
<button class="normalBtn " @click="exportExcel">导出EXCEL</button>
<button class="normalBtn " @click="togbu">一键同步</button>
</div>
<button class="normalBtn page_EasyReport_search" @click="getData">确定</button>
</div>
<div style="margin-bottom:25px;" v-loading='loading'>
......@@ -68,7 +70,7 @@
export default {
data() {
return {
year: new Date().getFullYear().toString(),
year: '',
monthList: [],
msg: {
Year: '',
......@@ -83,9 +85,10 @@ export default {
pageIndex: 1,
multipleSort: false,
loading: false,
userId: -2,
columns: [
{
field: "ID",
field: "Sort",
title: "合计",
width: 80,
titleAlign: "left",
......@@ -98,7 +101,7 @@ export default {
{
field: "ZhaiYao",
title: "摘要",
width: 80,
width: 150,
titleAlign: "left",
columnAlign: "left",
isResize: true,
......@@ -318,6 +321,11 @@ export default {
]
}
},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({
......@@ -326,9 +334,34 @@ export default {
value: 0,
})
}
let userInfo = this.getLocalStorage();
this.userId = userInfo.EmployeeId;
},mounted(){
this.getData()
},methods:{
togbu: function () {
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.loading = false
this.$message.error(res.data.message)
}
})
},
filterMethod: function(filters) {
},
......@@ -349,26 +382,45 @@ export default {
if (rowIndex === 1 && (columnName === "DiYiJiDu" || columnName === "DiErJiDu" || columnName === "ShangBanNianBao" || columnName === "DiSanJiDu" || columnName === "DiSiJiDu" || columnName === "XiaBanNianBao")) {
return "column-cell-class-name-test";
}
if (rowData.ID === 9 || rowData.ID === 10 || rowData.ID === 11 || rowData.ID === 41 || rowData.ID === 44 || rowData.ID === 48 || rowData.ID === 49) {
if (rowData.ZhaiYao === '营业总毛利' || rowData.ZhaiYao === '歐洲與南亞損失分攤' || rowData.ZhaiYao === '营业税金及附加' || rowData.ZhaiYao === '管销费用' || rowData.ZhaiYao === '财务费用' || rowData.ZhaiYao === '营业外收入' || rowData.ZhaiYao === '其他营业支出') {
return "column-cell-class-name-test-greed";
}
if (rowData.ID === 14) {
if (rowData.ZhaiYao === '社保') {
return "column-cell-class-name-test-gray";
}
if (rowData.ID === 51) {
if (rowData.ZhaiYao === '营业利润 (亏损)') {
return "column-cell-class-name-test-pink-t";
}
if (rowData.ID === 53) {
if (rowData.ZhaiYao === '净利润 (亏损)') {
return "column-cell-class-name-test-t";
}
if (rowData.ID === 52) {
if (rowData.ZhaiYao === '所得税费用') {
return "column-cell-class-name-test-greed-s";
}
},
exportExcel: function () {
let msg = {
EmployeeId: this.userId,
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.GetLocalFile(
"financestatistics_post_OutToExcelEasyReportList",
msg,
"简易报表.xls"
);
},
getData: function () {
this.msg.sharelist = []
this.loading = true;
this.monthList.forEach(x=>{
let obj = {
......@@ -383,13 +435,13 @@ export default {
this.msg.Year = parseInt(this.year)
this.apipost('financestatistics_post_GetEasyReportList', this.msg, res=>{
if (res.data.resultCode == 1) {
let data = res.data.data;
let data = res.data.data
data.sharelist.forEach((x, i) => {
this.monthList[i].value = x.Money
});
})
this.DataList = data.list
this.loading = false
this.msg.sharelist = []
this.$forceUpdate()
return
for (let i = 0; i<=18; i++) {
this.DataList.push({
......
......@@ -494,12 +494,13 @@ tr._item_list td:last-child {
<button class="hollowFixedBtn" @click="openKaiQiZzBox('一键关闭')">一键关闭</button> -->
<button class="normalBtn" @click="resetPageIndex(),getPageList()">{{$t('pub.searchBtn')}}</button>
<button class="hollowFixedBtn" @click="method5()">导出</button>
<button class="normalBtn " @click="togbu">一键同步</button>
<!--<button class="hollowFixedBtn" @click="exportExcelCurrentPage">导出2</button>-->
</li>
</ul>
</div>
<ul class="other_report clearfix">
<li>简易报表</li>
<li @click="goEasyReport">简易报表</li>
</ul>
<div class="_fnDm_content" v-loading="loading">
<v-table
......@@ -1248,6 +1249,23 @@ export default {
this.getStartList1();
},
methods: {
goEasyReport: function () {
let year = this.productionDate[0] ? this.productionDate[0].substring(0,4) : ''
this.$router.push({
path: "/EasyReport",
query: { year: year, blank: "y" }
});
},
togbu: function () {
this.apipost('financestatistics_post_InsertFinanceStatistics', {}, res=>{
if (res.data.resultCode == 1) {
this.$message.success(res.data.message)
} else {
this.loading = false
this.$message.error(res.data.message)
}
})
},
submitKaiqiZzBox: function() {
// 开关闸提交
if (
......
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