Commit 432e927d authored by Mac's avatar Mac
parents 33e91b19 c39b56ca
...@@ -104,22 +104,7 @@ export function getFileExt(filename) { ...@@ -104,22 +104,7 @@ export function getFileExt(filename) {
*/ */
export function EduDownLoad(cmd, msg, fileName) { export function EduDownLoad(cmd, msg, fileName) {
return request({
url: cmd,
method: 'post',
data: msg,
headers:{
responseType: 'arraybuffer'
}
}).then(res => {
let blob = new Blob([res.data], {
type: "application/vnd.ms-excel;charset=utf-8"
})
let url = URL.createObjectURL(blob);
let link = document.createElement('a');
link.href = url;
link.setAttribute("download", fileName);
document.body.appendChild(link);
link.click();
})
} }
\ No newline at end of file
<style> <style>
.paymentDetail .p_title { .paymentDetail .p_title {
font-weight: bold; font-weight: bold;
color: #000000; color: #000000;
font-size: 14px; font-size: 14px;
margin-bottom: 20px; margin-bottom: 20px;
} }
.paymentDetail .paymentList { .paymentDetail .paymentList {
height: 170px; height: 170px;
border-radius: 3px; border-radius: 3px;
box-shadow: 0 0 5px #d1d1d1; box-shadow: 0 0 5px #d1d1d1;
margin-right: 10px; margin-right: 10px;
padding: 12px; padding: 12px;
} }
.paymentDetail .paymentList:last-child { .paymentDetail .paymentList:last-child {
margin-right: 0; margin-right: 0;
} }
.paymentDetail .pay_topList { .paymentDetail .pay_topList {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 10px; margin-bottom: 10px;
} }
.paymentDetail .pay_Title { .paymentDetail .pay_Title {
margin-left: 5px; margin-left: 5px;
color: #111111; color: #111111;
font-size: 13px; font-size: 13px;
font-weight: bold; font-weight: bold;
} }
.paymentDetail .pay_ListMent { .paymentDetail .pay_ListMent {
display: flex; display: flex;
font-size: 12px; font-size: 12px;
margin-bottom: 6px; margin-bottom: 6px;
} }
.paymentDetail .pay_ListOne { .paymentDetail .pay_ListOne {
width: 50px; width: 50px;
color: #999999; color: #999999;
text-align: left; text-align: left;
} }
.paymentDetail .pay_Inner { .paymentDetail .pay_Inner {
margin-left: 10px; margin-left: 10px;
color: #111111; color: #111111;
font-weight: bold; font-weight: bold;
} }
.paymentDetail .orangeStyle { .paymentDetail .orangeStyle {
color: #F28C1D; color: #F28C1D;
} }
.paymentDetail .pay_ListTwo { .paymentDetail .pay_ListTwo {
width: 25px; width: 25px;
color: #999999; color: #999999;
text-align: left; text-align: left;
} }
.paymentDetail .pay_InorOut { .paymentDetail .pay_InorOut {
margin-top: 20px; margin-top: 20px;
} }
.paymentDetail .Pay_Line { .paymentDetail .Pay_Line {
width: 3px; width: 3px;
height: 11px; height: 11px;
margin-right: 10px; margin-right: 10px;
background-color: #3FC4FF; background-color: #3FC4FF;
display: inline-block; display: inline-block;
} }
.paymentDetail .pay_TopTitle { .paymentDetail .pay_TopTitle {
font-weight: bold; font-weight: bold;
color: #000000; color: #000000;
font-size: 13px; font-size: 13px;
} }
.paymentDetail .payTable { .paymentDetail .payTable {
width: 100%; width: 100%;
border-collapse: collapse; border-collapse: collapse;
} }
.paymentDetail .payTable tr th { .paymentDetail .payTable tr th {
background: #fff; background: #fff;
height: 40px; height: 40px;
font-size: 12px; font-size: 12px;
font-weight: bold; font-weight: bold;
color: #2D2D2D; color: #2D2D2D;
background: #DDDEE0; background: #DDDEE0;
} }
.paymentDetail .payTable tr { .paymentDetail .payTable tr {
background: #fff; background: #fff;
text-align: center; text-align: center;
height: 40px; height: 40px;
} }
.paymentDetail .payTable tr td { .paymentDetail .payTable tr td {
font-size: 13px; font-size: 13px;
text-align: center; text-align: center;
color: #2D2D2D; color: #2D2D2D;
padding: 10px 0; padding: 10px 0;
font-weight: bold; font-weight: bold;
border-bottom: 1px solid #E5E5E5; border-bottom: 1px solid #E5E5E5;
} }
.paymentDetail .finince_Order { .paymentDetail .finince_Order {
color: #2961FE; color: #2961FE;
text-decoration: underline; text-decoration: underline;
cursor: pointer; cursor: pointer;
font-weight: bold; font-weight: bold;
} }
.paymentDetail .finice_pass { .paymentDetail .finice_pass {
display: inline-block; display: inline-block;
width: 50px; width: 50px;
height: 25px; height: 25px;
...@@ -121,406 +121,409 @@ ...@@ -121,406 +121,409 @@
background: #ccf3eb; background: #ccf3eb;
color: #02C499; color: #02C499;
border-radius: 2px; border-radius: 2px;
} }
.paymentDetail .financeYing { .paymentDetail .financeYing {
width: 110px; width: 110px;
text-align: left; text-align: left;
margin: auto; margin: auto;
} }
.p_titleList { .p_titleList {
position: relative; position: relative;
} }
</style> </style>
<template> <template>
<div class="page-body paymentDetail"> <div class="page-body paymentDetail">
<div class="page-search items-center"> <div class="page-search items-center">
<div class="p_titleList"> <div class="p_titleList">
<div class="p_title">班级收支明细</div> <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" /> <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">
<img src="../../assets/images/myimg/bjqk.png" alt="" />
<span class="pay_Title">班级情况</span>
</div>
<div class="pay_ListMent">
<div class="pay_ListOne">班级名称</div>
<div class="pay_Inner">{{dataList.ClassInfo.ClassName}}</div>
</div>
<div class="pay_ListMent">
<div class="pay_ListOne">课程名称</div>
<div class="pay_Inner">{{dataList.ClassInfo.CourseName}}</div>
</div>
<div class="pay_ListMent">
<div class="pay_ListOne">开课时间</div>
<div class="pay_Inner">{{dataList.ClassInfo.OpenTime}}</div>
</div>
<div class="pay_ListMent">
<div class="pay_ListOne">带课老师</div>
<div class="pay_Inner">{{dataList.ClassInfo.TeacherName}}</div>
</div>
</div> </div>
<div class="row"> <div class="col paymentList">
<div class="col paymentList" v-if="dataList&&dataList.ClassInfo"> <div class="pay_topList">
<div class="pay_topList"> <img src="../../assets/images/myimg/bjsr.png" alt="" />
<img src="../../assets/images/myimg/bjqk.png" alt="" /> <span class="pay_Title">班级收入</span>
<span class="pay_Title">班级情况</span> </div>
</div> <div class="pay_ListMent">
<div class="pay_ListMent"> <div class="pay_ListTwo">应收</div>
<div class="pay_ListOne">班级名称</div> <div class="pay_Inner">¥{{dataList.IncomeReceive}}</div>
<div class="pay_Inner">{{dataList.ClassInfo.ClassName}}</div> </div>
</div> <div class="pay_ListMent">
<div class="pay_ListMent"> <div class="pay_ListTwo">实收</div>
<div class="pay_ListOne">课程名称</div> <div class="pay_Inner orangeStyle">¥{{dataList.IncomeActual}}</div>
<div class="pay_Inner">{{dataList.ClassInfo.CourseName}}</div> </div>
</div> <div class="pay_ListMent">
<div class="pay_ListMent"> <div class="pay_ListTwo">待收</div>
<div class="pay_ListOne">开课时间</div> <div class="pay_Inner orangeStyle">¥{{getShiShou(dataList.IncomeReceive,dataList.IncomeActual)}}</div>
<div class="pay_Inner">{{dataList.ClassInfo.OpenTime}}</div> </div>
</div> <div class="pay_ListMent">
<div class="pay_ListMent"> <div class="pay_ListTwo"></div>
<div class="pay_ListOne">带课老师</div> <div class="pay_Inner">应收=订单应收总额,实收=订单 实收总额</div>
<div class="pay_Inner">{{dataList.ClassInfo.TeacherName}}</div> </div>
</div>
</div>
<div class="col paymentList">
<div class="pay_topList">
<img src="../../assets/images/myimg/bjsr.png" alt="" />
<span class="pay_Title">班级收入</span>
</div>
<div class="pay_ListMent">
<div class="pay_ListTwo">应收</div>
<div class="pay_Inner">¥{{dataList.IncomeReceive}}</div>
</div>
<div class="pay_ListMent">
<div class="pay_ListTwo">实收</div>
<div class="pay_Inner orangeStyle">¥{{dataList.IncomeActual}}</div>
</div>
<div class="pay_ListMent">
<div class="pay_ListTwo">待收</div>
<div class="pay_Inner orangeStyle">¥{{getShiShou(dataList.IncomeReceive,dataList.IncomeActual)}}</div>
</div>
<div class="pay_ListMent">
<div class="pay_ListTwo"></div>
<div class="pay_Inner">应收=订单应收总额,实收=订单 实收总额</div>
</div>
</div>
<div class="col paymentList">
<div class="pay_topList">
<img src="../../assets/images/myimg/qt.png" alt="" />
<span class="pay_Title">其他</span>
</div>
<div class="pay_ListMent">
<div class="pay_ListTwo">应收</div>
<div class="pay_Inner">¥{{dataList.OtherIncomeReceive}}</div>
</div>
<div class="pay_ListMent">
<div class="pay_ListTwo">实收</div>
<div class="pay_Inner orangeStyle">¥{{dataList.OtherIncomeActual}}</div>
</div>
<div class="pay_ListMent">
<div class="pay_ListTwo">待收</div>
<div class="pay_Inner orangeStyle">¥{{getShiShou(dataList.OtherIncomeReceive,dataList.OtherIncomeActual)}}
</div>
</div>
<div class="pay_ListMent">
<div class="pay_ListTwo"></div>
<div class="pay_Inner">此处不进入"利润"计算,单纯只统计除班级费外的其他总收入</div>
</div>
</div>
<div class="col paymentList">
<div class="pay_topList">
<img src="../../assets/images/myimg/zc.png" alt="" />
<span class="pay_Title">支出</span>
</div>
<div class="pay_ListMent">
<div class="pay_ListTwo">应付</div>
<div class="pay_Inner">¥{{dataList.PayReceive}}</div>
</div>
<div class="pay_ListMent">
<div class="pay_ListTwo">实付</div>
<div class="pay_Inner orangeStyle">¥{{dataList.PayActual}}</div>
</div>
<div class="pay_ListMent">
<div class="pay_ListTwo">待付</div>
<div class="pay_Inner orangeStyle ">¥{{getShiShou(dataList.PayReceive,dataList.PayActual)}}</div>
</div>
<div class="pay_ListMent">
<div class="pay_ListTwo"></div>
<div class="pay_Inner">成本单据总额(含退款)+销售提成+ 课时费</div>
</div>
</div>
<div class="col paymentList">
<div class="pay_topList">
<img src="../../assets/images/myimg/lr.png" alt="" />
<span class="pay_Title">利润</span>
</div>
<div class="pay_ListMent">
<div class="pay_ListOne">实际利润</div>
<div class="pay_Inner">¥{{dataList.ProfitActual}}</div>
</div>
<div class="pay_ListMent">
<div class="pay_ListOne">当前利润</div>
<div class="pay_Inner orangeStyle">¥{{dataList.ProfitNow}}</div>
</div>
<div class="pay_ListMent">
<div class="pay_ListOne"></div>
<div class="pay_Inner">实收-(应付/实付)+其他收入-总支出</div>
</div>
</div>
<div class="col paymentList">
<div class="pay_topList">
<img src="../../assets/images/myimg/tc.png" alt="" />
<span class="pay_Title">提成</span>
</div>
<div class="pay_ListMent">
<div class="pay_ListOne">销售提成</div>
<div class="pay_Inner">¥{{dataList.SaleCommission}}</div>
</div>
<div class="pay_ListMent">
<div class="pay_ListOne">老师提成</div>
<div class="pay_Inner">¥{{dataList.TeacherProfitNow}}</div>
</div>
<div class="pay_ListMent">
<div class="pay_ListOne">绩效提成</div>
<div class="pay_Inner orangeStyle ">¥{{dataList.MeritsProfit}}</div>
</div>
</div>
</div> </div>
<div class="pay_InorOut"> <div class="col paymentList">
<div class="pay_TopTitle" style="display:flex;justify-content: space-between;align-items:center;"> <div class="pay_topList">
<div><span class="Pay_Line"></span>收入</div> <img src="../../assets/images/myimg/qt.png" alt="" />
<q-btn label="新增收款" color="accent q-px-md" size="sm" style="font-weight:400 !important;" @click="goShoukuan(1)" /> <span class="pay_Title">其他</span>
</div> </div>
<div class="pay_TopTitle" style="margin:15px 0 15px 20px;font-size:12px;"> <div class="pay_ListMent">
<span class="Pay_Line" style="background-color:#02C499;"></span>学费收入 <div class="pay_ListTwo">应收</div>
<div class="pay_Inner">¥{{dataList.OtherIncomeReceive}}</div>
</div>
<div class="pay_ListMent">
<div class="pay_ListTwo">实收</div>
<div class="pay_Inner orangeStyle">¥{{dataList.OtherIncomeActual}}</div>
</div>
<div class="pay_ListMent">
<div class="pay_ListTwo">待收</div>
<div class="pay_Inner orangeStyle">¥{{getShiShou(dataList.OtherIncomeReceive,dataList.OtherIncomeActual)}}
</div> </div>
<table class="payTable"> </div>
<tr> <div class="pay_ListMent">
<th width="180">单号</th> <div class="pay_ListTwo"></div>
<th width="200">费用类型</th> <div class="pay_Inner">此处不进入"利润"计算,单纯只统计除班级费外的其他总收入</div>
<th width="500">交易明细</th> </div>
<th width="300">金额</th> </div>
<th width="200">交易日期</th> <div class="col paymentList">
<th width="250">制单人员</th> <div class="pay_topList">
<th width='180'>审核状态</th> <img src="../../assets/images/myimg/zc.png" alt="" />
<th width="200">当前审核人</th> <span class="pay_Title">支出</span>
</tr> </div>
<tr v-if="dataList && dataList.FiniceReciveList==0"> <div class="pay_ListMent">
<td :colspan="8" align="center">暂无数据</td> <div class="pay_ListTwo">应付</div>
</tr> <div class="pay_Inner">¥{{dataList.PayReceive}}</div>
<tr v-for="(item,index) in dataList.FiniceReciveList" :key="index"> </div>
<td> <div class="pay_ListMent">
<span class="finince_Order" @click="goOrderDetail('FinancialDocumentsDetail',item)">{{item.FrID}}</span> <div class="pay_ListTwo">实付</div>
</td> <div class="pay_Inner orangeStyle">¥{{dataList.PayActual}}</div>
<td><span v-for="subItem in item.CostTypeList" :key="subItem.subCode">{{subItem}}</span></td> </div>
<td style="text-align:left;"> <div class="pay_ListMent">
<div v-for="childItem in item.TradeWayList"> <div class="pay_ListTwo">待付</div>
支付方式:{{childItem.Alias}}<span class="TB_Rate"> 币种:{{childItem.CurrencyName}}</span> <div class="pay_Inner orangeStyle ">¥{{getShiShou(dataList.PayReceive,dataList.PayActual)}}</div>
<span class="Team_Coins orangeStyle">{{childItem.OriginalMoney}}*{{childItem.Rate}}</span> </div>
<span class="TB_Rate" style="margin-left:10px;">汇率:{{childItem.Rate}}</span> <div class="pay_ListMent">
</div> <div class="pay_ListTwo"></div>
</td> <div class="pay_Inner">成本单据总额(含退款)+销售提成+ 课时费</div>
<td> </div>
<div class="financeYing"> </div>
应收:{{item.Money}}<br /> <div class="col paymentList">
实收:{{item.PayMoney}} <div class="pay_topList">
</div> <img src="../../assets/images/myimg/lr.png" alt="" />
</td> <span class="pay_Title">利润</span>
<td>{{item.TradeDate}}</td> </div>
<td> <div class="pay_ListMent">
<div>{{item.RB_CreateByName}}</div> <div class="pay_ListOne">实际利润</div>
<div>{{item.CreateDate}}</div> <div class="pay_Inner">¥{{dataList.ProfitActual}}</div>
</td> </div>
<td> <div class="pay_ListMent">
<div class="finice_pass">{{item.StatusStr}}</div> <div class="pay_ListOne">当前利润</div>
</td> <div class="pay_Inner orangeStyle">¥{{dataList.ProfitNow}}</div>
<td> </div>
<div v-for="AuditItem in item.AuditList"> <div class="pay_ListMent">
{{AuditItem.AuditEmName}} <div class="pay_ListOne"></div>
<span class="TB_Rate">{{AuditItem.AuditDate}}</span> <div class="pay_Inner">实收-(应付/实付)+其他收入-总支出</div>
</div> </div>
</td> </div>
</tr> <div class="col paymentList">
</table> <div class="pay_topList">
<div class="pay_TopTitle" style="margin:30px 0 15px 20px;font-size:12px;"> <img src="../../assets/images/myimg/tc.png" alt="" />
<span class="Pay_Line" style="background-color:#02C499;"></span>其他收入 <span class="pay_Title">提成</span>
</div> </div>
<table class="payTable"> <div class="pay_ListMent">
<tr> <div class="pay_ListOne">销售提成</div>
<th width="180">单号</th> <div class="pay_Inner">¥{{dataList.SaleCommission}}</div>
<th width="200">费用类型</th> </div>
<th width="500">交易明细</th> <div class="pay_ListMent">
<th width="300">金额</th> <div class="pay_ListOne">老师提成</div>
<th width="200">交易日期</th> <div class="pay_Inner">¥{{dataList.TeacherProfitNow}}</div>
<th width="250">制单人员</th> </div>
<th width='180'>审核状态</th> <div class="pay_ListMent">
<th width="200">当前审核人</th> <div class="pay_ListOne">绩效提成</div>
</tr> <div class="pay_Inner orangeStyle ">¥{{dataList.MeritsProfit}}</div>
<tr v-if="dataList && dataList.OtherFiniceReciveList==0"> </div>
<td :colspan="8" align="center">暂无数据</td> </div>
</tr> </div>
<tr v-for="(item,index) in dataList.OtherFiniceReciveList" :key="index"> <div class="pay_InorOut">
<td> <div class="pay_TopTitle" style="display:flex;justify-content: space-between;align-items:center;">
<span class="finince_Order">{{item.FrID}}</span> <div><span class="Pay_Line"></span>收入</div>
</td> <q-btn label="新增收款" color="accent q-px-md" size="sm" style="font-weight:400 !important;"
<td><span v-for="subItem in item.CostTypeList" :key="subItem.subCode">{{subItem}}</span></td> @click="goShoukuan(1)" />
<td style="text-align:left;">
<div v-for="childItem in item.TradeWayList">
支付方式:{{childItem.Alias}}<span class="TB_Rate"> 币种:{{childItem.CurrencyName}}</span>
<span class="Team_Coins orangeStyle">{{childItem.OriginalMoney}}*{{childItem.Rate}}</span>
<span class="TB_Rate" style="margin-left:10px;">汇率:{{childItem.Rate}}</span>
</div>
</td>
<td>
<div class="financeYing">
应收:{{item.Money}}<br />
实收:{{item.PayMoney}}
</div>
</td>
<td>{{item.TradeDate}}</td>
<td>
<div>{{item.RB_CreateByName}}</div>
<div>{{item.CreateDate}}</div>
</td>
<td>
<div class="finice_pass">{{item.StatusStr}}</div>
</td>
<td>
<div v-for="AuditItem in item.AuditList">
{{AuditItem.AuditEmName}}
<span class="TB_Rate">{{AuditItem.AuditDate}}</span>
</div>
</td>
</tr>
</table>
<div class="pay_TopTitle" style="margin-top:30px;display:flex;justify-content: space-between;align-items:center;">
<div><span class="Pay_Line" style="background:#F72E52;"></span>支出</div>
<q-btn label="新增付款" color="accent q-px-md" size="sm" style="font-weight:400 !important;" @click="goShoukuan(2)" />
</div>
<div class="pay_TopTitle" style="margin:15px 0 15px 20px;font-size:12px;">
<span class="Pay_Line" style="background-color:#F28C1D;"></span>其他支出
</div>
<table class="payTable">
<tr>
<th width="180">单号</th>
<th width="200">费用类型</th>
<th width="500">交易明细</th>
<th width="300">金额</th>
<th width="200">交易日期</th>
<th width="250">制单人员</th>
<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" @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;">
<div v-for="childItem in item.TradeWayList">
支付方式:{{childItem.Alias}}<span class="TB_Rate">币种:{{childItem.CurrencyName}}</span>
<span class="Team_Coins orangeStyle">-{{childItem.OriginalMoney}}*{{childItem.Rate}}</span>
<span class="TB_Rate" style="margin-left:10px;">汇率:{{childItem.Rate}}</span>
</div>
</td>
<td>
<div class="financeYing">
应付:{{item.Money}}<br />
实付:{{item.PayMoney}}
</div>
</td>
<td>{{item.TradeDate}}</td>
<td>
<div>{{item.RB_CreateByName}}</div>
<div>{{item.CreateDate}}</div>
</td>
<td>
<div class="finice_pass">{{item.StatusStr}}</div>
</td>
<td>
<div v-for="AuditItem in item.AuditList">
{{AuditItem.AuditEmName}}
<span class="TB_Rate">{{AuditItem.AuditDate}}</span>
</div>
</td>
</tr>
</table>
</div> </div>
<div class="pay_TopTitle" style="margin:15px 0 15px 20px;font-size:12px;">
<span class="Pay_Line" style="background-color:#02C499;"></span>学费收入
</div>
<table class="payTable">
<tr>
<th width="180">单号</th>
<th width="200">费用类型</th>
<th width="500">交易明细</th>
<th width="300">金额</th>
<th width="200">交易日期</th>
<th width="250">制单人员</th>
<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('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;">
<div v-for="childItem in item.TradeWayList">
支付方式:{{childItem.Alias}}<span class="TB_Rate"> 币种:{{childItem.CurrencyName}}</span>
<span class="Team_Coins orangeStyle">{{childItem.OriginalMoney}}*{{childItem.Rate}}</span>
<span class="TB_Rate" style="margin-left:10px;">汇率:{{childItem.Rate}}</span>
</div>
</td>
<td>
<div class="financeYing">
应收:{{item.Money}}<br />
实收:{{item.PayMoney}}
</div>
</td>
<td>{{item.TradeDate}}</td>
<td>
<div>{{item.RB_CreateByName}}</div>
<div>{{item.CreateDate}}</div>
</td>
<td>
<div class="finice_pass">{{item.StatusStr}}</div>
</td>
<td>
<div v-for="AuditItem in item.AuditList">
{{AuditItem.AuditEmName}}
<span class="TB_Rate">{{AuditItem.AuditDate}}</span>
</div>
</td>
</tr>
</table>
<div class="pay_TopTitle" style="margin:30px 0 15px 20px;font-size:12px;">
<span class="Pay_Line" style="background-color:#02C499;"></span>其他收入
</div>
<table class="payTable">
<tr>
<th width="180">单号</th>
<th width="200">费用类型</th>
<th width="500">交易明细</th>
<th width="300">金额</th>
<th width="200">交易日期</th>
<th width="250">制单人员</th>
<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>
</td>
<td><span v-for="subItem in item.CostTypeList" :key="subItem.subCode">{{subItem}}</span></td>
<td style="text-align:left;">
<div v-for="childItem in item.TradeWayList">
支付方式:{{childItem.Alias}}<span class="TB_Rate"> 币种:{{childItem.CurrencyName}}</span>
<span class="Team_Coins orangeStyle">{{childItem.OriginalMoney}}*{{childItem.Rate}}</span>
<span class="TB_Rate" style="margin-left:10px;">汇率:{{childItem.Rate}}</span>
</div>
</td>
<td>
<div class="financeYing">
应收:{{item.Money}}<br />
实收:{{item.PayMoney}}
</div>
</td>
<td>{{item.TradeDate}}</td>
<td>
<div>{{item.RB_CreateByName}}</div>
<div>{{item.CreateDate}}</div>
</td>
<td>
<div class="finice_pass">{{item.StatusStr}}</div>
</td>
<td>
<div v-for="AuditItem in item.AuditList">
{{AuditItem.AuditEmName}}
<span class="TB_Rate">{{AuditItem.AuditDate}}</span>
</div>
</td>
</tr>
</table>
<div class="pay_TopTitle"
style="margin-top:30px;display:flex;justify-content: space-between;align-items:center;">
<div><span class="Pay_Line" style="background:#F72E52;"></span>支出</div>
<q-btn label="新增付款" color="accent q-px-md" size="sm" style="font-weight:400 !important;"
@click="goShoukuan(2)" />
</div>
<div class="pay_TopTitle" style="margin:15px 0 15px 20px;font-size:12px;">
<span class="Pay_Line" style="background-color:#F28C1D;"></span>其他支出
</div>
<table class="payTable">
<tr>
<th width="180">单号</th>
<th width="200">费用类型</th>
<th width="500">交易明细</th>
<th width="300">金额</th>
<th width="200">交易日期</th>
<th width="250">制单人员</th>
<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" @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;">
<div v-for="childItem in item.TradeWayList">
支付方式:{{childItem.Alias}}<span class="TB_Rate">币种:{{childItem.CurrencyName}}</span>
<span class="Team_Coins orangeStyle">-{{childItem.OriginalMoney}}*{{childItem.Rate}}</span>
<span class="TB_Rate" style="margin-left:10px;">汇率:{{childItem.Rate}}</span>
</div>
</td>
<td>
<div class="financeYing">
应付:{{item.Money}}<br />
实付:{{item.PayMoney}}
</div>
</td>
<td>{{item.TradeDate}}</td>
<td>
<div>{{item.RB_CreateByName}}</div>
<div>{{item.CreateDate}}</div>
</td>
<td>
<div class="finice_pass">{{item.StatusStr}}</div>
</td>
<td>
<div v-for="AuditItem in item.AuditList">
{{AuditItem.AuditEmName}}
<span class="TB_Rate">{{AuditItem.AuditDate}}</span>
</div>
</td>
</tr>
</table>
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { import {
GetClassBalanceSheet, GetClassBalanceSheet,
GetClassBalanceSheetToExcel } from '../../api/finance/index';
} from '../../api/finance/index';
import { export default {
EduDownLoad,
} from '../../api/common/common';
export default {
props: {}, props: {},
components: {}, components: {},
data() { data() {
return { return {
dataList: [], //数据 dataList: [], //数据
msg: { msg: {
ClassId: 0, ClassId: 0,
School_Id: 0 School_Id: 0
}, },
} }
}, },
created() {}, created() {},
mounted() { mounted() {
if (this.$route.query.ClassId && this.$route.query.School_Id) { if (this.$route.query.ClassId && this.$route.query.School_Id) {
this.msg.ClassId = this.$route.query.ClassId; this.msg.ClassId = this.$route.query.ClassId;
this.msg.School_Id = this.$route.query.School_Id; this.msg.School_Id = this.$route.query.School_Id;
} }
this.getData(); this.getData();
}, },
methods: { methods: {
getData() { getData() {
GetClassBalanceSheet(this.msg).then(res => { GetClassBalanceSheet(this.msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.dataList = res.Data; this.dataList = res.Data;
} }
}) })
}, },
//减法 得实收 //减法 得实收
getShiShou(num1, num2) { getShiShou(num1, num2) {
if (num1 && num2) { if (num1 && num2) {
return parseInt(num1) - parseInt(num2); return parseInt(num1) - parseInt(num2);
} else { } else {
return 0; return 0;
}
},
//跳转到订单详情
goOrderDetail(path, item) {
this.$router.push({
path: '/financial/financalDocument/' + path,
query: {
"id": item.FrID,
blank: 'y',
tab: '单据详情'
}
})
},
//导出单据
exportOrder() {
var msg = JSON.parse(JSON.stringify(this.msg));
EduDownLoad("/Finance/GetClassBalanceSheetToExcel", msg, "收支明细.xls")
},
//跳转到收款单
goShoukuan(type) {
let TCIDARR = []
TCIDARR.push(this.msg.ClassId)
let orderObj = {
OrderID: 0,
OrderSource: 17,
Obj: {},
SourceID: 0,
TCIDList: TCIDARR
}
this.$router.push({
path: '/financial/financalDocument/ChoiceAddFinancialDocuments',
query: {
"Type": type,
"companyID": this.msg.School_Id,
"path": "",
'blank': 'y',
'orderObj': JSON.stringify(orderObj),
'tradeWay': '',
}
});
} }
},
//跳转到订单详情
goOrderDetail(path, item) {
this.$router.push({
path: '/financial/financalDocument/' + path,
query: {
"id": item.FrID,
blank: 'y',
tab: '单据详情'
}
})
},
//导出单据
exportOrder() {
var msg = JSON.parse(JSON.stringify(this.msg));
this.GetEduDownLoad("/Finance/GetClassBalanceSheetToExcel", msg, "收支明细.xls")
},
//跳转到收款单
goShoukuan(type) {
let TCIDARR = []
TCIDARR.push(this.msg.ClassId)
let orderObj = {
OrderID: 0,
OrderSource: 17,
Obj: {},
SourceID: 0,
TCIDList: TCIDARR
}
this.$router.push({
path: '/financial/financalDocument/ChoiceAddFinancialDocuments',
query: {
"Type": type,
"companyID": this.msg.School_Id,
"path": "",
'blank': 'y',
'orderObj': JSON.stringify(orderObj),
'tradeWay': '',
}
});
}
} }
} }
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass'); @import url('~assets/css/table.sass');
......
<template> <template>
<div class="rewardDetailed page-body"> <div class="rewardDetailed page-body">
<div class="page-search row items-center"> <div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3"> <div class="col-3">
<q-select @input="getList" standout="bg-primary text-white" option-value="TId" option-label="TeacherName" <q-select @input="getList" standout="bg-primary text-white" option-value="TId" option-label="TeacherName"
v-model="msg.TeacherId" :options="TeacherList" emit-value map-options label="关联老师" /> v-model="msg.TeacherId" :options="TeacherList" emit-value map-options label="关联老师" />
</div> </div>
<div class="col-3"> <div class="col-3">
<q-select @input="getList" standout="bg-primary text-white" option-value="Id" option-label="Name" <q-select @input="getList" standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="msg.Type" :options="TypeList" emit-value map-options label="上课类型" /> v-model="msg.Type" :options="TypeList" emit-value map-options label="上课类型" />
</div> </div>
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table"
separator="vertical" :data="data.List" :columns="columns" row-key="name"> separator="vertical" :data="data.List" :columns="columns" row-key="name">
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title">教师课时费明细</div> <div class="col-2 q-table__title">教师课时费明细</div>
<q-space /> <q-space />
<div class="page-option"> <div class="page-option">
<q-btn color="accent" size="sm" label="导出" /> <q-btn color="accent" size="sm" label="导出" @click="Export" />
</div> </div>
</template> </template>
<template v-slot:body-cell-Type="props"> <template v-slot:body-cell-Type="props">
<q-td :props="props"> <q-td :props="props">
<span >{{props.row.Type==1?'带班':'代课'}}</span> <span>{{props.row.Type==1?'带班':'代课'}}</span>
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
</template> </template>
</q-table> </q-table>
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table" style="margin-top: 30px" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table"
separator="vertical" :data="data.Statistics" :columns="columnsZ" row-key="name"> style="margin-top: 30px" separator="vertical" :data="data.Statistics" :columns="columnsZ" row-key="name">
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title">教师课时费汇总</div> <div class="col-2 q-table__title">教师课时费汇总</div>
<q-space /> <q-space />
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</template> </template>
<template v-slot:body-cell-Type="props"> <template v-slot:body-cell-Type="props">
<q-td :props="props"> <q-td :props="props">
<span >{{props.row.Type==1?'带班':'代课'}}</span> <span>{{props.row.Type==1?'带班':'代课'}}</span>
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
...@@ -54,21 +54,21 @@ ...@@ -54,21 +54,21 @@
<script> <script>
import { import {
getTeachingBonusDetailList,//明细详情 getTeachingBonusDetailList, //明细详情
} from '../../api/course/class' } from '../../api/course/class'
import { import {
getTeacherDropDownList, getTeacherDropDownList,
} from '../../api/school/index'; } from '../../api/school/index';
export default { export default {
name: "rewardDetailed", name: "rewardDetailed",
data(){ data() {
return{ return {
columns: [{ columns: [{
name: 'Date', name: 'Date',
label: '日期', label: '日期',
field: 'Date', field: 'Date',
align: 'left' align: 'left'
}, },
{ {
name: 'TeacherName', name: 'TeacherName',
field: 'TeacherName', field: 'TeacherName',
...@@ -115,8 +115,7 @@ ...@@ -115,8 +115,7 @@
}, },
], ],
columnsZ:[ columnsZ: [{
{
name: 'TeacherName', name: 'TeacherName',
label: '教师姓名', label: '教师姓名',
field: 'TeacherName', field: 'TeacherName',
...@@ -153,29 +152,39 @@ ...@@ -153,29 +152,39 @@
data: [], data: [],
loading: true, loading: true,
msg: { msg: {
rowsPerPage:999, rowsPerPage: 999,
BonusId:0, BonusId: 0,
TeacherId:0, TeacherId: 0,
Type:0 Type: 0
}, },
TeacherList: [], //关联教师下拉数据 TeacherList: [], //关联教师下拉数据
TypeList:[ TypeList: [{
{Id:0,Name:'不限'}, Id: 0,
{Id:1,Name:'带班'}, Name: '不限'
{Id:2,Name:'代课'}, },
{
Id: 1,
Name: '带班'
},
{
Id: 2,
Name: '代课'
},
] ]
} }
}, },
created() { created() {
if(this.$route.query){ if (this.$route.query) {
this.msg.BonusId =this.$route.query.Id; this.msg.BonusId = this.$route.query.Id;
this.msg.TeacherId =Number(this.$route.query.TeacherId); this.msg.TeacherId = Number(this.$route.query.TeacherId);
} }
this.getList(); this.getList();
this.GetTeacherList() this.GetTeacherList()
}, },
methods:{ methods: {
Export() {
this.GetEduDownLoad("/TeachingRewards/GetTeachingBonusDetailToExcel", this.msg, "课时奖励.xls");
},
//获取教师下拉 //获取教师下拉
GetTeacherList() { GetTeacherList() {
getTeacherDropDownList({}).then(res => { getTeacherDropDownList({}).then(res => {
...@@ -185,11 +194,10 @@ ...@@ -185,11 +194,10 @@
TId: 0, TId: 0,
TeacherName: "不限" TeacherName: "不限"
}) })
} }
}) })
}, },
getList(){ getList() {
this.loading = true; this.loading = true;
getTeachingBonusDetailList(this.msg).then(res => { getTeachingBonusDetailList(this.msg).then(res => {
this.loading = false this.loading = false
...@@ -198,11 +206,12 @@ ...@@ -198,11 +206,12 @@
this.loading = false this.loading = false
}) })
}, },
goreturn(){ goreturn() {
this.$router.go(-1) this.$router.go(-1)
}, },
} }
} }
</script> </script>
<style scoped> <style scoped>
......
...@@ -2,21 +2,21 @@ import md5 from 'js-md5' ...@@ -2,21 +2,21 @@ import md5 from 'js-md5'
import co from 'co' import co from 'co'
import MsgBus from '../utils/msgBus' import MsgBus from '../utils/msgBus'
export default{ export default {
data:{ data: {
loginUser: {}, loginUser: {},
apiurl: '' apiurl: ''
}, },
install(Vue, options){ install(Vue, options) {
Vue.prototype.MsgBus = MsgBus; Vue.prototype.MsgBus = MsgBus;
//消息成功提示 //消息成功提示
Vue.prototype.Success = function (msg) { Vue.prototype.Success = function (msg) {
this.$message({ this.$message({
message: msg, message: msg,
duration: 2000, duration: 2000,
type: "success" type: "success"
}); });
}, },
//错误提示 //错误提示
Vue.prototype.Error = function (msg) { Vue.prototype.Error = function (msg) {
this.$message({ this.$message({
...@@ -45,10 +45,10 @@ export default{ ...@@ -45,10 +45,10 @@ export default{
//Confirm //Confirm
Vue.prototype.Confirm = function (msg, callback) { Vue.prototype.Confirm = function (msg, callback) {
this.$confirm(msg, "提示", { this.$confirm(msg, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}) })
.then(() => { .then(() => {
if (typeof callback === 'function') { if (typeof callback === 'function') {
callback(); callback();
...@@ -68,168 +68,168 @@ export default{ ...@@ -68,168 +68,168 @@ export default{
} }
return pwd; return pwd;
}, },
//ERP本地缓存 //ERP本地缓存
Vue.prototype.md5 = md5; Vue.prototype.md5 = md5;
Vue.prototype.getLocalStorage = function () { Vue.prototype.getLocalStorage = function () {
var localStorageData = window.localStorage["loginUserInfo"]; var localStorageData = window.localStorage["loginUserInfo"];
if (localStorageData !== undefined && localStorageData != 'undefined') { if (localStorageData !== undefined && localStorageData != 'undefined') {
return JSON.parse(localStorageData).data; return JSON.parse(localStorageData).data;
} else { } else {
return null; return null;
} }
}, },
//域名管理对象 //域名管理对象
Vue.prototype.domainManager = function () { Vue.prototype.domainManager = function () {
let domainUrl = ''; let domainUrl = '';
let mallUrl = ""; //商城API let mallUrl = ""; //商城API
let locationName = window.location.hostname; let locationName = window.location.hostname;
// domainUrl = "http://127.0.0.1"; // domainUrl = "http://127.0.0.1";
domainUrl = "http://192.168.1.13:8083"; domainUrl = "http://192.168.1.13:8083";
// domainUrl = "http://192.168.1.48:8015"; // domainUrl = "http://192.168.1.48:8015";
//domainUrl = "http://192.168.1.21:8069"; //domainUrl = "http://192.168.1.21:8069";
let javaUrldo = ""; let javaUrldo = "";
javaUrldo = locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://efficient.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.2.215:9000"; javaUrldo = locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://efficient.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.2.215:9000";
//商城API //商城API
mallUrl = "http://192.168.1.21:8014"; mallUrl = "http://192.168.1.21:8014";
if (locationName.indexOf('testerp.oytour') !== -1) { if (locationName.indexOf('testerp.oytour') !== -1) {
domainUrl = "http://testapi.oytour.com"; domainUrl = "http://testapi.oytour.com";
mallUrl = "https://mallapi.oytour.com"; mallUrl = "https://mallapi.oytour.com";
} else if (locationName.indexOf('oytour') !== -1) { } else if (locationName.indexOf('oytour') !== -1) {
domainUrl = "http://reborn.oytour.com"; domainUrl = "http://reborn.oytour.com";
mallUrl = "https://mallapi.oytour.com"; mallUrl = "https://mallapi.oytour.com";
} }
var obj = { var obj = {
//主地址 //主地址
DomainUrl: domainUrl, DomainUrl: domainUrl,
//常用提交数据URL //常用提交数据URL
PostUrl: domainUrl + "/api/common/post", PostUrl: domainUrl + "/api/common/post",
//上传文件URL //上传文件URL
UploadFileUrl: domainUrl + '/api/File/post', UploadFileUrl: domainUrl + '/api/File/post',
//本站模板文件下载地址 //本站模板文件下载地址
LocalTemplateFileDownLoadUrl: domainUrl, LocalTemplateFileDownLoadUrl: domainUrl,
//酒店接口 //酒店接口
HotelApi: "http://reborn.oytour.com/api/common/post", HotelApi: "http://reborn.oytour.com/api/common/post",
//阿里服务器地址 //阿里服务器地址
AliUrl: "https://reborndev.oss-cn-hangzhou.aliyuncs.com", AliUrl: "https://reborndev.oss-cn-hangzhou.aliyuncs.com",
//本站文件流下载地址 //本站文件流下载地址
LocalFileStreamDownLoadUrl: domainUrl + "/api/file/GetFileFromWebApi", LocalFileStreamDownLoadUrl: domainUrl + "/api/file/GetFileFromWebApi",
//PDF文件预览地址 //PDF文件预览地址
PDFViewUrl: domainUrl + "/plug/pdf/web/viewer.html?file=", PDFViewUrl: domainUrl + "/plug/pdf/web/viewer.html?file=",
//SocketUrl //SocketUrl
WebSocketUrl: "ws://192.168.1.110:8080?account=", WebSocketUrl: "ws://192.168.1.110:8080?account=",
//google地图图片地址 //google地图图片地址
GoogleMapImageUrl: "http://imgfile.oytour.com", GoogleMapImageUrl: "http://imgfile.oytour.com",
//上传站点 //上传站点
UploadUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://upload.oytour.com" : "http://192.168.1.214:8120", UploadUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://upload.oytour.com" : "http://192.168.1.214:8120",
//文件站点 //文件站点
ViittoFileUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://imgfile.oytour.com" : 'http://192.168.1.214:8130', ViittoFileUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://imgfile.oytour.com" : 'http://192.168.1.214:8130',
javaUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://efficient.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.2.17:8087", javaUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://efficient.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.2.17:8087",
javaUrlNew: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://property.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.2.17:8087", javaUrlNew: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://property.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.2.17:8087",
//Java接口本站文件流下载地址 //Java接口本站文件流下载地址
JavaLocalFileStreamDownLoadUrl: javaUrldo, JavaLocalFileStreamDownLoadUrl: javaUrldo,
mallUrl: mallUrl, mallUrl: mallUrl,
}; };
return obj; return obj;
}, },
//下载文件 //ERP系统文件下载
Vue.prototype.GetLocalFile = function (cmd, msg, fileName, successCall) { Vue.prototype.GetLocalFile = function (cmd, msg, fileName, successCall) {
var apiurl = this.domainManager().LocalFileStreamDownLoadUrl; var apiurl = this.domainManager().LocalFileStreamDownLoadUrl;
var timestamp = (new Date()).valueOf(); var timestamp = (new Date()).valueOf();
var token = ""; var token = "";
var key = ""; var key = "";
var tokenData={}; var tokenData = {};
var localStorage = window.localStorage["loginUserInfo"]; var localStorage = window.localStorage["loginUserInfo"];
if (localStorage !== undefined && localStorage != 'undefined') { if (localStorage !== undefined && localStorage != 'undefined') {
tokenData = JSON.parse(localStorage); tokenData = JSON.parse(localStorage);
} }
token = tokenData.data.ErpToken; token = tokenData.data.ErpToken;
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase(); var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`); var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var postData = { var postData = {
"msg": msg, "msg": msg,
"cmd": cmd, "cmd": cmd,
"timestamp": timestamp, "timestamp": timestamp,
"token": token, "token": token,
"sign": md5Str, "sign": md5Str,
"groupId":tokenData.data.Group_Id, "groupId": tokenData.data.Group_Id,
"requestFrom":6 "requestFrom": 6
} }
this.$http.post(apiurl, postData, { this.$http.post(apiurl, postData, {
responseType: 'arraybuffer' responseType: 'arraybuffer'
}).then((res) => { }).then((res) => {
let blob = new Blob([res.data], { let blob = new Blob([res.data], {
type: "application/vnd.ms-excel" type: "application/vnd.ms-excel"
}) })
let url = URL.createObjectURL(blob); let url = URL.createObjectURL(blob);
let link = document.createElement('a'); let link = document.createElement('a');
link.href = url; link.href = url;
link.setAttribute("download", fileName); link.setAttribute("download", fileName);
document.body.appendChild(link); document.body.appendChild(link);
link.click(); link.click();
successCall(res); successCall(res);
}).catch(function (res) {}); }).catch(function (res) {});
}, },
//HTTP提交数据 //HTTP提交数据
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall, isOnline) { Vue.prototype.apipost = function (cmd, msg, successCall, faildCall, isOnline) {
if (msg == null || msg == "") { if (msg == null || msg == "") {
msg = {} msg = {}
} }
var token = ""; var token = "";
var key = ""; var key = "";
var tokenData={}; var tokenData = {};
var localStorage = window.localStorage["loginUserInfo"]; var localStorage = window.localStorage["loginUserInfo"];
if (localStorage !== undefined && localStorage != 'undefined') { if (localStorage !== undefined && localStorage != 'undefined') {
tokenData = JSON.parse(localStorage); tokenData = JSON.parse(localStorage);
} }
token = tokenData.data.ErpToken; token = tokenData.data.ErpToken;
var timestamp = (new Date()).valueOf(); var timestamp = (new Date()).valueOf();
var apiurl = this.domainManager().PostUrl; var apiurl = this.domainManager().PostUrl;
this.apiurl = apiurl; this.apiurl = apiurl;
var branchId = tokenData.data.School_Id; var branchId = tokenData.data.School_Id;
var departmentId = 1; var departmentId = 1;
var departmentName = 1; var departmentName = 1;
var groupName = tokenData.data.GroupName; var groupName = tokenData.data.GroupName;
var branchName = tokenData.data.SchoolName; var branchName = tokenData.data.SchoolName;
var uName = tokenData.data.AccountName; var uName = tokenData.data.AccountName;
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase(); var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`); var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var postData = { var postData = {
"msg": msg, "msg": msg,
"cmd": cmd, "cmd": cmd,
"timestamp": timestamp, "timestamp": timestamp,
"token": token, "token": token,
"sign": md5Str, "sign": md5Str,
"branchId":branchId, //公司id "branchId": branchId, //公司id
"departmentId":departmentId, //部门id "departmentId": departmentId, //部门id
"groupName":groupName, //集团名称 "groupName": groupName, //集团名称
"branchName":branchName, //公司名称 "branchName": branchName, //公司名称
"departmentName":departmentName, //部门名称 "departmentName": departmentName, //部门名称
"uName":uName //用户名称 "uName": uName //用户名称
}
this.$http.post(apiurl, postData, {
headers: {
'Content-Type': 'application/json',
'Referer-Viitto': this.$route.path
} }
}) this.$http.post(apiurl, postData, {
.then(res => { headers: {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) { 'Content-Type': 'application/json',
this.$router.push({ 'Referer-Viitto': this.$route.path
path: '/login' }
}); })
} else if (res.resultCode == 10005) { .then(res => {
this.$router.go(-1); if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
} else { this.$router.push({
successCall(res); path: '/login'
} });
}, faildCall) } else if (res.resultCode == 10005) {
}, this.$router.go(-1);
Vue.prototype.uploadFile = function (path, files, successCall) { } else {
successCall(res);
}
}, faildCall)
},
Vue.prototype.uploadFile = function (path, files, successCall) {
if (files && files.length > 0) { if (files && files.length > 0) {
let nameList = new Array() let nameList = new Array()
for (let index = 0; index < files.length; index++) { for (let index = 0; index < files.length; index++) {
...@@ -285,6 +285,7 @@ export default{ ...@@ -285,6 +285,7 @@ export default{
} }
item[filed] = value; item[filed] = value;
}, },
//验证只能输入2位小数【负数:isMinus传true】 //验证只能输入2位小数【负数:isMinus传true】
Vue.prototype.checkPrice = function (item, filed, isMinus) { Vue.prototype.checkPrice = function (item, filed, isMinus) {
var value = "" + item[filed]; //转字符串 var value = "" + item[filed]; //转字符串
...@@ -392,5 +393,26 @@ export default{ ...@@ -392,5 +393,26 @@ export default{
window.open(url); window.open(url);
} }
//教育文件下载
Vue.prototype.GetEduDownLoad = function (cmd, msg, fileName, successCall) {
var apiurl = process.env.API + cmd;
var postData = {
Msg: msg
};
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) {});
}
} }
} }
...@@ -476,45 +476,3 @@ export function getLocalStorage(){ ...@@ -476,45 +476,3 @@ export function getLocalStorage(){
return null; return null;
} }
} }
export function apipost(cmd, msg, successCall, faildCall, isOnline){
var timestamp = (new Date()).valueOf();
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var token = "";
var key = "";
if (this.getLocalStorage() != null) {
token = this.getLocalStorage().Token;
key = this.getLocalStorage().SecretKey;
}
var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var postData = {
"msg": msg,
"cmd": cmd,
"timestamp": timestamp,
"token": token,
"sign": md5Str,
"languageId": tempLanguage
}
// return reuest({
// method:'post',
// })
this.$http.post(apiurl, postData, {
headers: {
'Content-Type': 'application/json',
'Referer-Viitto': this.$route.path
}
})
.then(res => {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
} else if (res.resultCode == 10005) {
} else {
successCall(res);
}
}, faildCall)
}
\ No newline at end of file
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