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

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

parent 9b6eff4d
...@@ -2,14 +2,13 @@ ...@@ -2,14 +2,13 @@
.page_EasyReport_set{ .page_EasyReport_set{
position: relative; position: relative;
} }
.page_EasyReport_set button{ .page_EasyReport_set .page_EasyReport_export{
position: absolute; position: absolute;
}
.page_EasyReport_set button.page_EasyReport_export{
right: 0; right: 0;
top: 15px; top: 15px;
} }
.page_EasyReport_set button.page_EasyReport_search{ .page_EasyReport_set button.page_EasyReport_search{
position: absolute;
bottom: 27px; bottom: 27px;
left: 1020px; left: 1020px;
} }
...@@ -43,7 +42,10 @@ ...@@ -43,7 +42,10 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form> </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> <button class="normalBtn page_EasyReport_search" @click="getData">确定</button>
</div> </div>
<div style="margin-bottom:25px;" v-loading='loading'> <div style="margin-bottom:25px;" v-loading='loading'>
...@@ -68,7 +70,7 @@ ...@@ -68,7 +70,7 @@
export default { export default {
data() { data() {
return { return {
year: new Date().getFullYear().toString(), year: '',
monthList: [], monthList: [],
msg: { msg: {
Year: '', Year: '',
...@@ -83,9 +85,10 @@ export default { ...@@ -83,9 +85,10 @@ export default {
pageIndex: 1, pageIndex: 1,
multipleSort: false, multipleSort: false,
loading: false, loading: false,
userId: -2,
columns: [ columns: [
{ {
field: "ID", field: "Sort",
title: "合计", title: "合计",
width: 80, width: 80,
titleAlign: "left", titleAlign: "left",
...@@ -98,7 +101,7 @@ export default { ...@@ -98,7 +101,7 @@ export default {
{ {
field: "ZhaiYao", field: "ZhaiYao",
title: "摘要", title: "摘要",
width: 80, width: 150,
titleAlign: "left", titleAlign: "left",
columnAlign: "left", columnAlign: "left",
isResize: true, isResize: true,
...@@ -318,6 +321,11 @@ export default { ...@@ -318,6 +321,11 @@ export default {
] ]
} }
},created(){ },created(){
if (this.$route.query.year) {
this.year = this.$route.query.year
} else {
this.year = new Date().getFullYear().toString()
}
let arr = ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"] let arr = ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]
for (let i = 0; i < 12; i++) { for (let i = 0; i < 12; i++) {
this.monthList.push({ this.monthList.push({
...@@ -326,9 +334,34 @@ export default { ...@@ -326,9 +334,34 @@ export default {
value: 0, value: 0,
}) })
} }
let userInfo = this.getLocalStorage();
this.userId = userInfo.EmployeeId;
},mounted(){ },mounted(){
this.getData() this.getData()
},methods:{ },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) { filterMethod: function(filters) {
}, },
...@@ -349,26 +382,45 @@ export default { ...@@ -349,26 +382,45 @@ export default {
if (rowIndex === 1 && (columnName === "DiYiJiDu" || columnName === "DiErJiDu" || columnName === "ShangBanNianBao" || columnName === "DiSanJiDu" || columnName === "DiSiJiDu" || columnName === "XiaBanNianBao")) { if (rowIndex === 1 && (columnName === "DiYiJiDu" || columnName === "DiErJiDu" || columnName === "ShangBanNianBao" || columnName === "DiSanJiDu" || columnName === "DiSiJiDu" || columnName === "XiaBanNianBao")) {
return "column-cell-class-name-test"; 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"; return "column-cell-class-name-test-greed";
} }
if (rowData.ID === 14) { if (rowData.ZhaiYao === '社保') {
return "column-cell-class-name-test-gray"; return "column-cell-class-name-test-gray";
} }
if (rowData.ID === 51) { if (rowData.ZhaiYao === '营业利润 (亏损)') {
return "column-cell-class-name-test-pink-t"; return "column-cell-class-name-test-pink-t";
} }
if (rowData.ID === 53) { if (rowData.ZhaiYao === '净利润 (亏损)') {
return "column-cell-class-name-test-t"; return "column-cell-class-name-test-t";
} }
if (rowData.ID === 52) { if (rowData.ZhaiYao === '所得税费用') {
return "column-cell-class-name-test-greed-s"; return "column-cell-class-name-test-greed-s";
} }
}, },
exportExcel: function () { 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 () { getData: function () {
this.msg.sharelist = []
this.loading = true; this.loading = true;
this.monthList.forEach(x=>{ this.monthList.forEach(x=>{
let obj = { let obj = {
...@@ -383,13 +435,13 @@ export default { ...@@ -383,13 +435,13 @@ export default {
this.msg.Year = parseInt(this.year) this.msg.Year = parseInt(this.year)
this.apipost('financestatistics_post_GetEasyReportList', this.msg, res=>{ this.apipost('financestatistics_post_GetEasyReportList', this.msg, res=>{
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let data = res.data.data; let data = res.data.data
data.sharelist.forEach((x, i) => { data.sharelist.forEach((x, i) => {
this.monthList[i].value = x.Money this.monthList[i].value = x.Money
}); })
this.DataList = data.list this.DataList = data.list
this.loading = false this.loading = false
this.msg.sharelist = [] this.$forceUpdate()
return return
for (let i = 0; i<=18; i++) { for (let i = 0; i<=18; i++) {
this.DataList.push({ this.DataList.push({
......
...@@ -494,12 +494,13 @@ tr._item_list td:last-child { ...@@ -494,12 +494,13 @@ tr._item_list td:last-child {
<button class="hollowFixedBtn" @click="openKaiQiZzBox('一键关闭')">一键关闭</button> --> <button class="hollowFixedBtn" @click="openKaiQiZzBox('一键关闭')">一键关闭</button> -->
<button class="normalBtn" @click="resetPageIndex(),getPageList()">{{$t('pub.searchBtn')}}</button> <button class="normalBtn" @click="resetPageIndex(),getPageList()">{{$t('pub.searchBtn')}}</button>
<button class="hollowFixedBtn" @click="method5()">导出</button> <button class="hollowFixedBtn" @click="method5()">导出</button>
<button class="normalBtn " @click="togbu">一键同步</button>
<!--<button class="hollowFixedBtn" @click="exportExcelCurrentPage">导出2</button>--> <!--<button class="hollowFixedBtn" @click="exportExcelCurrentPage">导出2</button>-->
</li> </li>
</ul> </ul>
</div> </div>
<ul class="other_report clearfix"> <ul class="other_report clearfix">
<li>简易报表</li> <li @click="goEasyReport">简易报表</li>
</ul> </ul>
<div class="_fnDm_content" v-loading="loading"> <div class="_fnDm_content" v-loading="loading">
<v-table <v-table
...@@ -1248,6 +1249,23 @@ export default { ...@@ -1248,6 +1249,23 @@ export default {
this.getStartList1(); this.getStartList1();
}, },
methods: { 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() { submitKaiqiZzBox: function() {
// 开关闸提交 // 开关闸提交
if ( 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