Commit 21056b02 authored by liudong1993's avatar liudong1993

1 冲抵单据功能

parent 3bfb8125
...@@ -14,6 +14,13 @@ ...@@ -14,6 +14,13 @@
text-align: center!important; text-align: center!important;
padding:6px 0!important; padding:6px 0!important;
} }
.cd_btn {
cursor: pointer;
color: #2AAEF2;
}
.cd_btn:hover {
color: aqua;
}
</style> </style>
<template> <template>
<div class="m_TicketingModule"> <div class="m_TicketingModule">
...@@ -57,6 +64,10 @@ ...@@ -57,6 +64,10 @@
</div> </div>
</div> </div>
<div v-show="tableShow1" class="sanjiao-box _padding_20_15"> <div v-show="tableShow1" class="sanjiao-box _padding_20_15">
<div v-if="IsFinancePermission">
<span class="cd_btn" @click="sureAccount()">对账确认 &nbsp;&nbsp;</span>
<span class="cd_btn" @click="advanceToExcel()">导出Excel</span>
</div>
<table border="1" class="czBillModule _border_color_b Receipt_table" bordercolor="#c94052" style="border-collapse:collapse;width: 100%;" v-loading='loading'> <table border="1" class="czBillModule _border_color_b Receipt_table" bordercolor="#c94052" style="border-collapse:collapse;width: 100%;" v-loading='loading'>
<tr> <tr>
<th>单号</th> <th>单号</th>
...@@ -67,16 +78,21 @@ ...@@ -67,16 +78,21 @@
<th>汇率</th> <th>汇率</th>
<th>状态</th> <th>状态</th>
<th>金额</th> <th>金额</th>
</tr> </tr>
<tr class="_color_b" v-for="(item,index) in czTableList" :key="index"> <tr class="_color_b" v-for="(item,index) in czTableList" :key="index">
<td class="hover_text" @click="goDetail(item.FrID)" ><span>{{item.FrID}}</span></td> <td class="hover_text">
<el-checkbox v-if="item.ClientTypeCateId !=1 && IsFinancePermission" v-model="item.checked" style="margin-right:2px ;"></el-checkbox>
<span @click="goDetail(item.FrID)" >{{item.FrID}}</span>
</td>
<td>{{item.BranchName}}</td> <td>{{item.BranchName}}</td>
<td>{{item.CostTypeName}}</td> <td>{{item.CostTypeName}}</td>
<td>{{item.CurrencyName}}</td> <td>{{item.CurrencyName}}</td>
<td>{{item.WBMoney}}</td> <td>{{item.WBMoney}}</td>
<td>{{item.Rate}}</td> <td>{{item.Rate}}</td>
<td>{{item.StatusStr}}</td> <td>
<span v-if="item.ClientTypeCateId ==1 && IsFinancePermission" style="color:#FF9600">已对账</span>
<span v-else>{{item.StatusStr}}</span>
</td>
<td> <td>
{{item.Money}} {{item.Money}}
<span v-if="item.OtherType&&item.OtherType==65" <span v-if="item.OtherType&&item.OtherType==65"
...@@ -233,6 +249,7 @@ export default { ...@@ -233,6 +249,7 @@ export default {
LeaderState:false, LeaderState:false,
ECommerceGoodsModel:{}, ECommerceGoodsModel:{},
ReceiptModel:{}, ReceiptModel:{},
IsFinancePermission:false,
} }
},watch:{ },watch:{
...@@ -242,10 +259,44 @@ export default { ...@@ -242,10 +259,44 @@ export default {
},mounted(){ },mounted(){
this.getDataDes(); this.getDataDes();
// 查询财务权限
let userInfo = this.getLocalStorage();
if (userInfo.ActionMenuCode.indexOf('F_AccountantFinanceMerge') != -1) {
this.IsFinancePermission = true;
}
}, },
methods:{ methods:{
sureAccount(){
// 确认单据对账
let flag = false;
let financeIds ='';
this.czTableList.forEach(x => {
if (x.checked) {
flag=true
financeIds += x.FrID + ','
}
})
if (!flag) {
this.$message.error("请选择财务单据!")
return
}
this.apipost("Financial_post_SetAdvanceMatchChecked", {FinanceIds: financeIds}, res => {
if (res.data.resultCode == 1) {
this.$message.success(res.data.message);
this.getczTableList();
}
});
},
advanceToExcel(){
let userInfo = this.getLocalStorage();
let msg={
pageIndex:1,
pageSize:1000,
ReFinanceId:this.FrID,
EmployeeId:userInfo.EmployeeId
};
this.GetLocalFile("Financial_get_DownLoadAdvanceMatchFinance", msg,this.FrID + "预付款冲抵导出.xls");
},
getDataDes(){ getDataDes(){
this.apipost('Financial_post_GetDetail', {ID:this.FrID,Type:1}, res => { this.apipost('Financial_post_GetDetail', {ID:this.FrID,Type:1}, res => {
this.loading = false this.loading = false
...@@ -289,7 +340,7 @@ export default { ...@@ -289,7 +340,7 @@ export default {
pageSize:1000, pageSize:1000,
ReFinanceId:this.FrID ReFinanceId:this.FrID
}; };
this.cdtotal=0; this.cdtotal=0; this.ybtotal =0;
this.apipost('Financial_get_GetAdvanceMatchFinancePageList', msg, res => { this.apipost('Financial_get_GetAdvanceMatchFinancePageList', msg, res => {
this.loading = false this.loading = false
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
...@@ -306,7 +357,7 @@ export default { ...@@ -306,7 +357,7 @@ export default {
}); });
this.cdtotal=this.cdtotal.toFixed(2); this.cdtotal=this.cdtotal.toFixed(2);
this.ybtotal=this.ybtotal.toFixed(2);
} }
else{ else{
this.Error(res.data.message) this.Error(res.data.message)
......
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