Commit e060410f authored by zhengke's avatar zhengke

修改

parent ad56bdb7
import request from '../../utils/request'
/**
* 获取收支明细数据
*
......
......@@ -128,12 +128,18 @@
text-align: left;
margin: auto;
}
.p_titleList{
position: relative;;
}
</style>
<template>
<div class="page-body paymentDetail">
<div class="page-search items-center">
<div class="p_titleList">
<div class="p_title">班级收支明细</div>
<q-btn label="导出" color="accent q-px-md" size="sm" style="font-weight:400 !important;position:absolute;right:0;top:0"
@click="exportOrder" />
</div>
<div class="row">
<div class="col paymentList" v-if="dataList&&dataList.ClassInfo">
<div class="pay_topList">
......@@ -280,9 +286,12 @@
<th width='180'>审核状态</th>
<th width="200">当前审核人</th>
</tr>
<tr v-if="dataList && dataList.FiniceReciveList==0">
<td :colspan="8" align="center">暂无数据</td>
</tr>
<tr v-for="(item,index) in dataList.FiniceReciveList" :key="index">
<td>
<span class="finince_Order" @click="goOrderDetail(item)">{{item.FrID}}</span>
<span class="finince_Order" @click="goOrderDetail('FinancialDocumentsDetail',item)">{{item.FrID}}</span>
</td>
<td><span v-for="subItem in item.CostTypeList" :key="subItem.subCode">{{subItem}}</span></td>
<td style="text-align:left;">
......@@ -328,6 +337,9 @@
<th width='180'>审核状态</th>
<th width="200">当前审核人</th>
</tr>
<tr v-if="dataList && dataList.OtherFiniceReciveList==0">
<td :colspan="8" align="center">暂无数据</td>
</tr>
<tr v-for="(item,index) in dataList.OtherFiniceReciveList" :key="index">
<td>
<span class="finince_Order">{{item.FrID}}</span>
......@@ -379,9 +391,12 @@
<th width='180'>审核状态</th>
<th width="200">当前审核人</th>
</tr>
<tr v-if="dataList && dataList.OtherFinicePayList==0">
<td :colspan="8" align="center">暂无数据</td>
</tr>
<tr v-for="(item,index) in dataList.OtherFinicePayList" :key="index">
<td>
<span class="finince_Order">{{item.FrID}}</span>
<span class="finince_Order" @click="goOrderDetail('FinancialDocumentsDetail',item)">{{item.FrID}}</span>
</td>
<td><span v-for="subItem in item.CostTypeList" :key="subItem.subCode">{{subItem}}</span></td>
<td style="text-align:left;">
......@@ -419,7 +434,8 @@
</template>
<script>
import {
GetClassBalanceSheet
GetClassBalanceSheet,
GetClassBalanceSheetToExcel
} from '../../api/finance/index';
export default {
......@@ -455,14 +471,24 @@
return parseInt(num1) - parseInt(num2);
},
//跳转到订单详情
goOrderDetail(item){
goOrderDetail(path,item) {
this.$router.push({
path:'classorder',
query:{
OrderID:item.OrderID,
blank:'y'
path: '/financial/financalDocument/' + path,
query: {
"id": item.FrID,
blank: 'y',
tab: '单据详情'
}
})
},
//导出单据
exportOrder(){
var msg = JSON.parse(JSON.stringify(this.msg));
this.GetLocalFile(
"/api/Finance/GetClassBalanceSheetToExcel",
msg,
"收支明细.xls"
);
}
}
}
......
......@@ -1140,8 +1140,8 @@
},
},
mounted() {
this.userId = this.getLocalStorage().EmployeeId
this.msg.BranchId = this.getLocalStorage().RB_Branch_id.toString()
this.userId = this.getLocalStorage().Id
this.msg.BranchId = this.getLocalStorage().School_Id.toString()
this.getList(this.ID)
}
}
......
......@@ -518,3 +518,41 @@ export function apipost(cmd, msg, successCall, faildCall, isOnline){
}
}, faildCall)
}
//文件下载
export function GetLocalFile(cmd, msg, fileName, newCmd, successCall){
var apiurl = this.domainManager().DomainUrl + cmd;
var postData = this.GetPostData(cmd, msg, newCmd);
this.$http.post(apiurl, postData, {
responseType: 'arraybuffer'
}).then((res) => {
let blob = new Blob([res.data], {
type: "application/vnd.ms-excel"
})
let url = URL.createObjectURL(blob);
let link = document.createElement('a');
link.href = url;
link.setAttribute("download", fileName);
document.body.appendChild(link);
link.click();
successCall(res);
}).catch(function (res) {});
}
// export function GetLocalFile = function (cmd, msg, fileName, newCmd, successCall) {
// var apiurl = this.domainManager().DomainUrl + cmd;
// var postData = this.GetPostData(cmd, msg, newCmd);
// this.$http.post(apiurl, postData, {
// responseType: 'arraybuffer'
// }).then((res) => {
// let blob = new Blob([res.data], {
// type: "application/vnd.ms-excel"
// })
// let url = URL.createObjectURL(blob);
// let link = document.createElement('a');
// link.href = url;
// link.setAttribute("download", fileName);
// document.body.appendChild(link);
// link.click();
// successCall(res);
// }).catch(function (res) {});
// }
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