Commit d4ef67b4 authored by zhengke's avatar zhengke

增加打印车资

parent fa38ae36
<style>
.BusExportTitle{
width:800px;
margin:0 auto;
text-align: center;
font-weight: bold;
margin-top:10px;
}
.Bus_Content{
width:800px;
height:auto;
margin:auto;
}
.Bus_detailTable {
width: 100%;
font-size: 12px;
color: #333;
margin: 10px auto;
border-collapse: collapse;
background-color: #fff;
border: 1px solid #d1d1d1;
}
.Bus_detailTable td {
border: 1px solid #d1d1d1;
padding: 3px 10px;
}
.Bus_detailTable th {
background-color: #fff;
border: 1px solid #d1d1d1;
}
.txLeft{
text-align: left;
}
.txRight{
text-align: right;
}
.fontBold{
font-weight:bold;
}
.totalTabal td{
height:33px;
}
</style>
<template>
<div class="Bus_Content">
<div class="BusExportTitle">
{{Year}}{{Month}}月公社车账
</div>
<table class="Bus_detailTable">
<thead>
<tr>
<th>做账主体</th>
<th width="200">团号</th>
<th>单号</th>
<th>车配号</th>
<th>{{msg.CurrName}}</th>
<th>人民币</th>
</tr>
</thead>
<tbody v-for="item in dataList">
<tr v-for="subItem in item.RBobj">
<td class="txLeft">{{subItem.BranchName}}</td>
<td class="txLeft">{{subItem.TCNUM}}</td>
<td class="txRight">{{subItem.FrID}}</td>
<td class="txRight">{{subItem.CarDistribution}}</td>
<td class="txRight">{{subItem.sMoney}}</td>
<td class="txRight">{{subItem.Money}}</td>
</tr>
<tr>
<td colspan="4" class="txRight">{{item.BranchName}}应付总金额</td>
<td class="txRight">{{item.SumOMoney}}</td>
<td class="txRight">{{item.SumMoney}}</td>
</tr>
</tbody>
</table>
<table class="Bus_detailTable totalTabal">
<tr>
<td class="txRight" colspan="4">
<div style="width:275px;text-align:right;float:right;">{{Year}}{{Month}}月应付公社车资:</div>
</td>
<td class="txRight fontBold">{{TotalJan}}</td>
<td class="txRight fontBold">{{TotalCn}}</td>
</tr>
<tr v-for="item in dataList">
<td class="txRight" colspan="4">{{item.BranchName}}应付总金额:</td>
<td class="txRight fontBold">{{item.SumOMoney}}</td>
<td class="txRight fontBold">{{item.SumMoney}}</td>
</tr>
<tr>
<td colspan="2" style="padding-top:30px;border:0px;">总经理:</td>
<td colspan="2" style="padding-top:30px;border:0px;">部门主管:</td>
<td colspan="2" style="padding-top:30px;border:0px;">制表:</td>
</tr>
<tr>
<td colspan="6" style="padding-top:30px;border:0px;">
<div style="style=float:right;margin-right:20%;text-align:right;">制表日期:</div>
</td>
</tr>
</table>
<table class="Bus_detailTable" v-for="item in dataList">
<tr>
<th>做账主体</th>
<th width="200">团号</th>
<th>单号</th>
<th>车配号</th>
<th>{{msg.CurrName}}</th>
<th>人民币</th>
</tr>
<tr v-for="subItem in item.RBobj">
<td class="txLeft">{{subItem.BranchName}}</td>
<td class="txLeft">{{subItem.TCNUM}}</td>
<td class="txRight">{{subItem.FrID}}</td>
<td class="txRight">{{subItem.CarDistribution}}</td>
<td class="txRight">{{subItem.sMoney}}</td>
<td class="txRight">{{subItem.Money}}</td>
</tr>
<tr>
<td colspan="4" class="txRight">{{item.BranchName}}应付总金额</td>
<td class="txRight">{{item.SumOMoney}}</td>
<td class="txRight">{{item.SumMoney}}</td>
</tr>
</table>
</div>
</template>
<script>
export default {
data() {
return {
msg:{
Month:'',
MakeStartDate:'',
MakeEndDate:'',
CurrType:'',
CurrName:'',
},
Year:'',
Month:'',
dataList:[],
TotalJan:'',
TotalCn:'',
}
},
mounted() {
this.msg.Month = this.$route.query.Month;
this.msg.MakeStartDate = this.$route.query.MakeStartDate;
this.msg.MakeEndDate = this.$route.query.MakeEndDate;
this.msg.CurrType = this.$route.query.CurrType;
this.Year = this.msg.Month.split('-')[0];
this.Month = this.msg.Month.split('-')[1];
this.getList();
},
methods: {
getList(){
this.apipost('bus_get_CarfareApportionExport',this.msg, res => {
if(res.data.resultCode == 1) {
console.log(res,'res');
this.dataList = res.data.data.RObj;
this.msg.CurrName = res.data.data.CurrName;
this.TotalJan = res.data.data.TotalStatistics.TSumOMoney;
this.TotalCn = res.data.data.TotalStatistics.TSumMoney
}else{
this.Error(res.data.message);
}
}, err => {})
}
},
}
</script>
...@@ -793,7 +793,7 @@ export default { ...@@ -793,7 +793,7 @@ export default {
}, },
getTitleByRouter(name){ getTitleByRouter(name){
let obj={} let obj={}
routerConfig.routes[9].children[10].children.forEach(x=>{ routerConfig.routes[10].children[10].children.forEach(x=>{
if(x.name==name){ if(x.name==name){
obj.comp=x.component obj.comp=x.component
if(x.meta && x.meta.title) if(x.meta && x.meta.title)
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
} }
.FinaceItem span{ .FinaceItem span{
display: inline-block; display: inline-block;
color:blue; color:#3980C8;
margin-right:10px; margin-right:10px;
padding-right: 10px; padding-right: 10px;
border-right:1px solid #d1d1d1; border-right:1px solid #d1d1d1;
...@@ -49,6 +49,9 @@ ...@@ -49,6 +49,9 @@
color:#CD2929; color:#CD2929;
cursor: pointer; cursor: pointer;
} }
.exportCompany{
width:450px;
}
</style> </style>
<template> <template>
...@@ -56,7 +59,7 @@ ...@@ -56,7 +59,7 @@
<div class="query-box"> <div class="query-box">
<ul> <ul>
<li> <li>
<input type="button" class="normalBtn" value="车资导出"/> <input type="button" class="normalBtn" @click="outerVisible=true" value="车资导出"/>
<input type="button" class="normalBtn" @click="getInfo()" value="新增"/> <input type="button" class="normalBtn" @click="getInfo()" value="新增"/>
</li> </li>
</ul> </ul>
...@@ -266,6 +269,41 @@ ...@@ -266,6 +269,41 @@
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<el-dialog custom-class='exportCompany' title="选择信息" :visible.sync="outerVisible" center>
<el-form label-width="100px">
<el-form-item label="导出月份">
<el-date-picker
v-model="exportInfo.DCDate"
type="month"
value-format="yyyy-MM"
placeholder="选择月">
</el-date-picker>
</el-form-item>
<el-form-item label="制单日期">
<el-date-picker type="date" v-model="exportInfo.StartGroupDate"
:picker-options="pickerBeginDateBefore"
value-format="yyyy-MM-dd" placeholder></el-date-picker>
<el-date-picker type="date" v-model="exportInfo.EndGroupDate"
:picker-options="pickerBeginDateAfter"
value-format="yyyy-MM-dd" placeholder></el-date-picker>
</el-form-item>
<el-form-item label="币种" class='multiple_input countryList'>
<el-select filterable v-model='exportInfo.CurrType' placeholder="请选择币种" class=" _border_b_1">
<el-option v-for='item in coinGetList'
:label='item.Name'
:value='item.ID'
:key='item.ID'>
</el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<button class="normalBtn" type="primary" @click="goToExport('BusExport')">{{$t('pub.saveBtn')}}</button> &nbsp;
<button class="hollowFixedBtn" @click="outerVisible = false,clearDialog()">{{$t('pub.cancelBtn')}}</button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
...@@ -279,6 +317,7 @@ export default { ...@@ -279,6 +317,7 @@ export default {
isReady: false, isReady: false,
multipleSort: false, multipleSort: false,
loading: true, loading: true,
outerVisible:false,
msg: { msg: {
pageSize:20, pageSize:20,
pageIndex:1, pageIndex:1,
...@@ -339,6 +378,25 @@ export default { ...@@ -339,6 +378,25 @@ export default {
TCID:'', TCID:'',
TCNUM:"" TCNUM:""
}, },
//弹窗导出信息
exportInfo:{
DCDate:'',
StartGroupDate:'',
EndGroupDate:'',
CurrType:3
},
pickerBeginDateBefore: {
disabledDate: time => {
let endTime = new Date(this.exportInfo.EndGroupDate)
return endTime.getTime() < time.getTime()
}
},
pickerBeginDateAfter: {
disabledDate: time => {
let startTime = new Date(this.exportInfo.StartGroupDate)
return startTime.getTime() >= time.getTime()
}
}
}; };
}, },
methods: { methods: {
...@@ -503,7 +561,6 @@ export default { ...@@ -503,7 +561,6 @@ export default {
this.apipost('financeinfo_post_GetClientTypeList',{}, res => { this.apipost('financeinfo_post_GetClientTypeList',{}, res => {
if(res.data.resultCode == 1) { if(res.data.resultCode == 1) {
this.ClientTypeList = res.data.data; this.ClientTypeList = res.data.data;
console.log(res.data.data,'ssssssssss');
} }
}, err => {}) }, err => {})
}, },
...@@ -558,7 +615,6 @@ export default { ...@@ -558,7 +615,6 @@ export default {
ClientAccountList.push(obj) ClientAccountList.push(obj)
}) })
this.ClientAccountListS = ClientAccountList; this.ClientAccountListS = ClientAccountList;
console.log(this.ClientAccountListS,'ClientAccountListS');
} }
} }
}, err => {}) }, err => {})
...@@ -692,6 +748,30 @@ export default { ...@@ -692,6 +748,30 @@ export default {
}, err => {}) }, err => {})
}, },
//清空弹窗
clearDialog(){
this.exportInfo.DCDate='',
this.exportInfo.StartGroupDate='',
this.exportInfo.EndGroupDate=''
},
//跳转打印页面
goToExport(path){
if(this.exportInfo.DCDate==''||this.exportInfo.MakeStartDate==''){
this.Error('请选择导出月份或制单日期');
return;
}
let routeData = this.$router.resolve({
name: path,
query: {
Month: this.exportInfo.DCDate,
MakeStartDate:this.exportInfo.StartGroupDate,
MakeEndDate:this.exportInfo.EndGroupDate,
CurrType:this.exportInfo.CurrType,
}
});
window.open(routeData.href, "_blank");
},
}, },
mounted(){ mounted(){
this.getList(); this.getList();
......
...@@ -53,6 +53,11 @@ export default { ...@@ -53,6 +53,11 @@ export default {
name: 'TravelControlTrip', name: 'TravelControlTrip',
component: resolve => require(['@/components/TravelControlTrip'], resolve), component: resolve => require(['@/components/TravelControlTrip'], resolve),
}, },
{
path: '/BusExport',
name: 'BusExport',
component: resolve => require(['@/components/BusExport'], resolve),
},
{ {
path: '/index', path: '/index',
name: 'index', name: 'index',
......
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