Commit ae9ffdaf authored by liudong1993's avatar liudong1993

1

parent 1f3d539c
......@@ -118,22 +118,30 @@
<el-button class="hollowFixedBtn" @click="outerVisible2=true">导入账单数据</el-button>
<el-button class="hollowFixedBtn" @click="downloadExcel()" :loading="loadingDC">导出Excel</el-button>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<el-button class="hollowFixedBtn" @click="UpdateGS()">高速折扣</el-button>
<el-button class="hollowFixedBtn" @click="SureUpdate()" :loading="UpdateLoad">执行更新</el-button>
</li>
</ul>
<div>差额合计:{{TotalMoney}}</div>
<div>
差额合计:{{TotalMoney}} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
高速优惠:<span v-for="(qitem,index3) in DiscontList" :key="index3">{{qitem.Expressway}}:{{qitem.DiscountMoney}}&nbsp;&nbsp;</span>
</div>
</div>
<div class="cm_content _scrollbar">
<table class="po_content singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0" cellpadding="0" v-loading="loading">
<tr>
<th>期数</th>
<th>出发时间</th>
<th>高速路</th>
<th>出发地</th>
<!-- <th>到达时间</th> -->
<th>到达地</th>
<th>预估金额</th>
<th>账单金额</th>
<th>差额</th>
<th>账单差额</th>
<th>高速优惠</th>
<th>合计补差</th>
<th>车辆信息</th>
<th>关联订单</th>
<th>操作</th>
......@@ -141,12 +149,15 @@
<tr v-for="(item,index) in DataList" :key="index">
<td>{{item.Month}}</td>
<td>{{item.SDate}}</td>
<td>{{item.Expressway}}</td>
<td>{{item.DepartAddress}}</td>
<!-- <td>{{item.EDate}}</td> -->
<td>{{item.ArriveAddress}}</td>
<td>{{item.PredictMoney}}</td>
<td>{{item.BillMoney}}</td>
<td>{{item.DiffMoney}}<span style="color: red;">{{(item.FinanceId>0?'(已更新)':'')}}</span></td>
<td>{{item.DiffMoney}}</td>
<td>{{item.DiscountMoney}}</td>
<td>{{item.DiffMoney+item.DiscountMoney}}<span style="color: red;">{{(item.FinanceId>0?'(已更新)':'')}}</span></td>
<td>{{item.CarNum}}</td>
<td>
<div v-for="(qitem,index2) in item.OrderList" :key="index2">
......@@ -196,6 +207,21 @@
<el-button type="primary" @click="BindOrder()">确 定</el-button>
</div>
</el-dialog>
<el-dialog custom-class='w400' title="高速折扣" :visible.sync="dialogGS">
<el-form>
<template v-for="(gitem,gindex) in GSList">
<el-form-item :label="gitem.Expressway" label-width="80px">
<el-input v-model="gitem.DiscountMoney" autocomplete="off" placeholder="请输入折扣金额"></el-input>
</el-form-item>
</template>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogGS = false">取 消</el-button>
<el-button type="primary" @click="BindGSDiscountMoney()" :loading="loadingDC2">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
......@@ -205,6 +231,7 @@ export default {
outerVisible:false,
outerVisible2:false,
loadingDC:false,
loadingDC2:false,
DataList:[],
loading:false,
importFileUrl2: "",
......@@ -212,10 +239,13 @@ export default {
TotalMoney:0,
dialogFormVisible:false,
dialogGS:false,
BindId:0,
BindOrderId:'',
BindContent:'',
UpdateLoad:false,
UpdateLoad:false,
DiscontList:[],
GSList:[]
}
},created(){
let userInfo = this.getLocalStorage();
......@@ -249,13 +279,11 @@ export default {
GetETCData(){
this.apipost('Financial_post_GetNewCarETCPPDataList',{},res=>{
if(res.data.resultCode==1){
this.DataList = res.data.data;
this.TotalMoney = 0;
this.DataList.forEach((item) => {
this.TotalMoney += item.DiffMoney;
});
this.DataList = res.data.data.ETCList;
this.TotalMoney =res.data.data.TotalDiff;
this.DiscontList =res.data.data.DiscontList;
}else{
this.Error('查询失败');
}
},err=>{})
},
......@@ -322,6 +350,30 @@ export default {
this.loadingDC = false;
});
},
UpdateGS(){
if(this.DiscontList.length<=0){this.Error('未查询到高速路数据');return;}
this.GSList= JSON.parse(JSON.stringify(this.DiscontList));
this.dialogGS=true;
},
BindGSDiscountMoney(){
if(this.GSList.length<=0){ this.$message.error('未查询到高速路数据'); return;}
this.loadingDC2=true;
this.apipost('Financial_post_SetETCGSUpdate',this.GSList,res=>{
if(res.data.resultCode==1){
this.loadingDC2=false;
this.dialogGS = false;
this.$message({
message: '高速路折扣更新成功',
type: 'success'
});
this.GetETCData();
}else{
this.loadingDC2=false;
this.dialogGS = false;
this.$message.error('更新失败,请联系管理员');
}
},err=>{})
},
},
}
......
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