Commit 20bfce7d authored by 黄媛媛's avatar 黄媛媛

update

parent 3612b3a6
<style>
</style>
<template>
<div class="AirTicketApp">
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr>
<th v-for="(item,index) in ColNameList" :key="index">{{item}}</th>
</tr>
<tr v-for="(item,index) in Rlist" :key="index">
<td>{{item.BranchName}}</td>
<td v-for="(cl,index) in item.CList" :key="index">{{cl.LossRatio}}
<el-button @click="Edit(item,cl)" style="padding:4px;margin-left:10px" type="primary" icon="el-icon-edit" circle></el-button>
</td>
</tr>
</table>
<el-dialog
title="修改"
:visible.sync="dialogVisible"
width="300px">
<div>
<el-form ref="form" :model="changeMsg" label-width="80px">
<el-form-item label="公司">
<span>{{changeMsg.BranchName}}</span>
</el-form-item>
<el-form-item label="比例" prop="LossRatio">
<el-input @keyup.native="checkInteger(changeMsg,'LossRatio')" v-model="changeMsg.Ratio"></el-input>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button type="danger" size="small" @click="Ok">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
data(){
return{
loading:false,
ColNameList:[],
Rlist:[],
dialogVisible:false,
changeMsg:{
Ratio:0,
},
rules:{
Ratio: [{ required: true, message: "请输入比例", trigger: "blur" }],
},
}
},created(){
},methods:{
Ok(){
if(this.changeMsg.Ratio>=0 && this.changeMsg.Ratio<=100){
this.apipost('ticket_post_SetAirTicketBranchRatio',this.changeMsg, res => {
if(res.data.resultCode == 1) {
this.getList();
this.dialogVisible=false;
} else {
this.$message.error(res.data.message);
}
this.loading = false;
}, err => {})
}else{
this.Error("请输入正确的比例")
}
},
Edit(item,cl){
this.dialogVisible=true;
this.changeMsg.BranchName=item.BranchName;
this.changeMsg.Ratio=cl.LossRatio;
this.changeMsg.BranchId=cl.BranchId;
this.changeMsg.LossType=cl.LossTypeCode;
this.changeMsg.AirLossId=cl.LossConfigId;
},
getList(){
this.loading = true;
this.apipost('ticket_post_SetAirTicketLossManagement',{}, res => {
console.log(res)
this.loading = false;
if(res.data.resultCode == 1) {
this.ColNameList=res.data.data.ColNameList;
this.Rlist=res.data.data.Rlist;
} else {
this.$message.error(res.data.message);
}
this.loading = false;
}, err => {})
},
},mounted(){
this.getList();
}
}
</script>
<style>
</style>
<template>
<div class="AirTicketApp">
<div class="Header">
<el-col :span="8" style="margin:10px 0">
<el-date-picker
v-model="value1"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-col>
<button style="margin-top:15px" class="normalBtn" @click="getList">查询</button>
<button style="margin-top:15px" class="hollowFixedBtn" @click="Export">导出</button>
</div>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr>
<th v-if="index==0" v-for="(item,index) in ColNameList" :key="index">{{item}}</th>
<th v-if="index!=0 && index!=ColNameList.length" colspan="2" v-for="(item,index) in ColNameList" :key="index">{{item}}</th>
<th v-if="index==ColNameList.length" v-for="(item,index) in ColNameList" :key="index">{{item}}</th>
</tr>
<tr v-for="(item,index) in Rlist" :key="index">
<td>{{item.BranchName}}</td>
<td v-for="(cl,index) in item.LossTL" :key="index">{{cl}}</td>
<td>{{item.TotalMoney}}</td>
</tr>
</table>
</div>
</template>
<script>
export default {
data(){
return{
loading:false,
ColNameList:[],
Rlist:[],
value1:"",
msg:{
StartTime:"",
EndTime:"",
},
userInfo:{},
}
},created(){
this.userInfo = this.getLocalStorage();
},methods:{
Export(){
let msg=this.msg;
msg.EmployeeId = this.userInfo.EmployeeId;
var fileName = "机票损失分摊.xls";
this.GetLocalFile("financestatistics_post_OutToExcelGetCompamyAirTicketRatioList", msg, fileName);
},
getList(){
if(this.value1){
this.msg.StartTime=this.value1[0];
this.msg.EndTime=this.value1[1];
}else{
this.msg.StartTime="";
this.msg.EndTime="";
}
this.loading = true;
this.apipost('financestatistics_post_GetCompamyAirTicketRatioList',this.msg, res => {
this.loading = false;
if(res.data.resultCode == 1) {
this.ColNameList=res.data.data.ColNameList;
this.Rlist=res.data.data.Rlist;
} else {
this.$message.error(res.data.message);
}
this.loading = false;
}, err => {})
},
},mounted(){
this.getList();
}
}
</script>
......@@ -2548,7 +2548,15 @@ export default {
meta: {
title: '线控配置'
},
}, { //财务 资金调拨 新增
},
{ //财务 机票分摊比例
path: '/AirTicketApp',
name: 'AirTicketApp',
component: resolve => require(['@/components/FinancialModule/AirTicketApp'], resolve),
meta: {
title: '机票分摊比例'
},
},{ //财务 资金调拨 新增
path: '/addCapitalAllocation',
name: 'addCapitalAllocation',
component: resolve => require(['@/components/FinancialModule/addCapitalAllocation'], resolve),
......@@ -2945,6 +2953,14 @@ export default {
title: '年度排名统计'
},
},
{ //财务 报表 机票损失分摊
path: '/AirTicketLoss',
name: 'AirTicketLoss',
component: resolve => require(['@/components/FinancialModule/ReportForm/AirTicketLoss'], resolve),
meta: {
title: '机票损失分摊'
},
},
{ //财务 报表 团队人数统计
path: '/NumberStatistics',
name: 'NumberStatistics',
......
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