Commit 67f5e3b8 authored by 黄奎's avatar 黄奎

页面修改

parent d44147ed
<style>
@import url('../../assets/css/domestic/SettlementOrder.css');
.page_SettlementOrder td._hover span{
@import url('../../assets/css/domestic/SettlementOrder.css');
.page_SettlementOrder td._hover span {
border-bottom: 1px solid #333;
cursor: pointer;
}
.page_SettlementOrder td._hover:hover span{
}
.page_SettlementOrder td._hover:hover span {
border-bottom: 1px dotted #333;
}
.sett_popover{
}
.sett_popover {
max-height: 300px;
overflow: auto;
}
.page_FinancialOrder {
}
.page_FinancialOrder {
padding: 25px 0;
}
.page_FinancialOrder>p{
}
.page_FinancialOrder>p {
margin-bottom: 10px;
padding-left: 10px;
border-left: 3px solid #E95252;
font-size: 16px;
color: #000000;
}
._VorcherInos_img{
}
._VorcherInos_img {
width: 45px;
height: 45px;
cursor: pointer;
}
._show_img_box{position: fixed; background: rgba(0,0,0,.6); left: 0; top:0; width: 100%; height: 100%; z-index: 999; text-align: center;overflow: auto}
.page_FinancialOrder .icon-excel{
}
._show_img_box {
position: fixed;
background: rgba(0, 0, 0, .6);
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 999;
text-align: center;
overflow: auto
}
.page_FinancialOrder .icon-excel {
font-size: 30px;
text-align: center;
color: #41D2A1;
}
.page_FinancialOrder .allMoney{
}
.page_FinancialOrder .allMoney {
text-align: right !important;
font-size: 16px;
font-weight: bold;
}
.page_FinancialOrder ._color_red{
}
.page_FinancialOrder ._color_red {
color: #e95252;
}
.page_FinancialOrder ._color_green{
}
.page_FinancialOrder ._color_green {
color: #2BBB7E;
}
.page_FinancialOrder ._bg_color_red{
}
.page_FinancialOrder ._bg_color_red {
background-color: #e95252;
}
.page_FinancialOrder ._bg_color_green{
}
.page_FinancialOrder ._bg_color_green {
background-color: #2BBB7E;
}
.page_FinancialOrder ._shouzhi{
}
.page_FinancialOrder ._shouzhi {
width: 15px;
height: 15px;
display: inline-block;
border-radius: 50%;
}
._jump_page{
}
._jump_page {
cursor: pointer;
text-decoration: underline;
}
._jump_page:hover{
}
._jump_page:hover {
color: #c94052;
}
}
</style>
<template>
<div class="flexOne page_SettlementOrder page_FinancialOrder">
<p>{{Name}}</p>
<div class="_content">
<table class="_content_tab singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0" cellpadding="0" v-loading = 'loading'>
<table class="_content_tab singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0" cellpadding="0"
v-loading='loading'>
<tr>
<th>财务单号</th>
<th>交易日期</th>
......@@ -81,57 +109,57 @@
<th>状态</th>
</tr>
<template v-for="(item,index) in dataList">
<tr v-if="type&&item.Type==type&&(item.Status==2||(item.Status==1&&item.TradeDate))">
<tr :key="index" v-if="type&&item.Type==type&&(item.Status==2||(item.Status==1&&item.TradeDate))">
<td><span class="_jump_page" @click="goUrl('FinancialDocumentsDetail',item.FrID)">{{item.FrID}}</span></td>
<td>{{item.TradeDate}}</td>
<td>{{item.Type==1?'收入':'支出'}}</td>
<td>
<span v-for="(son,sIndex) in item.DetailList">{{son.CostTypeName}}</span>
<span v-for="(son,sIndex) in item.DetailList" :key="sIndex">{{son.CostTypeName}}</span>
</td>
<td>{{item.TicketNum}}</td>
<td width="600">
<span v-for="(son,sIndex) in item.DetailList">{{son.Remark}}</span>
<span v-for="(son,sIndex) in item.DetailList" :key="sIndex">{{son.Remark}}</span>
</td>
<td>{{item.Money}}</td>
<td>
<span> {{ item.EmName }} </span><br/>
<span> {{ item.EmName }} </span><br />
<span> {{ item.CreateDate }} </span>
</td>
<td>
<template v-for="(son,sIndex) in item.VorcherInos">
<template v-if="son.Type==1||son.Type==2">
<i class="iconfont icon-excel" @click="showUpLoadFile(son)"></i>
<i class="iconfont icon-excel" @click="showUpLoadFile(son)" :key="sIndex"></i>
</template>
<template v-if="son.Type==3">
<img class="_VorcherInos_img" @click="showImg(item.VorcherInos)" :src="son.Content" alt="">
<img class="_VorcherInos_img" @click="showImg(item.VorcherInos)" :src="son.Content" alt="" :key="sIndex" />
</template>
</template>
</td>
<td>{{item.StatusStr}}</td>
</tr>
<tr v-else>
<tr :key="index" v-else>
<td><span class="_jump_page" @click="goUrl('FinancialDocumentsDetail',item.FrID)">{{item.FrID}}</span></td>
<td>{{item.TradeDate}}</td>
<td>{{item.Type==1?'收入':'支出'}}</td>
<td>
<span v-for="(son,sIndex) in item.DetailList">{{son.CostTypeName}}</span>
<span v-for="(son,sIndex) in item.DetailList" :key="sIndex">{{son.CostTypeName}}</span>
</td>
<td>{{item.TicketNum}}</td>
<td width="600">
<span v-for="(son,sIndex) in item.DetailList">{{son.Remark}}</span>
<span v-for="(son,sIndex) in item.DetailList" :key="sIndex">{{son.Remark}}</span>
</td>
<td>{{item.Money}}</td>
<td>
<span> {{ item.EmName }} </span><br/>
<span> {{ item.EmName }} </span><br />
<span> {{ item.CreateDate }} </span>
</td>
<td>
<template v-for="(son,sIndex) in item.VorcherInos">
<template v-if="son.Type==1||son.Type==2">
<i class="iconfont icon-excel" @click="showUpLoadFile(son)"></i>
<i class="iconfont icon-excel" @click="showUpLoadFile(son)" :key="sIndex"></i>
</template>
<template v-if="son.Type==3">
<img class="_VorcherInos_img" @click="showImg(item.VorcherInos)" :src="son.Content" alt="">
<img :key="sIndex" class="_VorcherInos_img" @click="showImg(item.VorcherInos)" :src="son.Content" alt="" />
</template>
</template>
</td>
......@@ -144,7 +172,6 @@
</tr>
</table>
<div v-if='picIsShow' class="viewBigPicLayer" @click="picIsShow=false,picObj=[]">
<!-- <i class="el-icon-circle-close-outline clolseViewBigPicLayer" @click="picIsShow=false,picObj=[]"></i> -->
<el-carousel height="600px" :interval="5000" trigger="click">
<el-carousel-item v-for="(item,index) in picObj" :key="index">
<div class="inlineDiv ownScrollbarStyle"><img :src="item" /></div>
......@@ -156,83 +183,89 @@
</template>
<script>
export default {
data(){
return{
dataList:[],
loading:true,
picIsShow:false,
picObj:[],
Money:0,
Name:'',
type:null,
export default {
data() {
return {
dataList: [],
loading: true,
picIsShow: false,
picObj: [],
Money: 0,
Name: '',
type: null,
}
},
created(){
if(this.$route.query.type){
created() {
if (this.$route.query.type) {
this.type = this.$route.query.type;
}
if(this.$route.query.OrderSource==4){
if (this.$route.query.OrderSource == 4) {
this.Name = '机票款';
}else if(this.$route.query.OrderSource==10){
} else if (this.$route.query.OrderSource == 10) {
this.Name = '签证款';
}else if(this.$route.query.OrderSource==9){
} else if (this.$route.query.OrderSource == 9) {
this.Name = '国内票务款';
}
},
mounted(){
mounted() {
this.getList();
},
methods:{
goUrl(path,id){
methods: {
goUrl(path, id) {
this.$router.push({
path: '/' + path,
query: {id:id,blank:'y',tab:id+'单据详情'}
query: {
id: id,
blank: 'y',
tab: id + '单据详情'
}
})
},
showUpLoadFile(i){ // 预览上传文件
if(i.Content.substring(i.Content.lastIndexOf('.')+1,i.Content.length).toUpperCase()=='PDF'){
showUpLoadFile(i) { // 预览上传文件
if (i.Content.substring(i.Content.lastIndexOf('.') + 1, i.Content.length).toUpperCase() == 'PDF') {
this.previewPDF(i.Content)
}else{
window.open("https://view.officeapps.live.com/op/view.aspx?src="+i.Content)
} else {
window.open("https://view.officeapps.live.com/op/view.aspx?src=" + i.Content)
}
},
showImg(obj){
obj.forEach(x=>{
if(x.Type==3){
showImg(obj) {
obj.forEach(x => {
if (x.Type == 3) {
this.picObj.push(x.Content)
}
})
this.picIsShow= true;
this.picIsShow = true;
},
getList(){
getList() {
this.loading = true;
let msg = {
OrderResource:this.$route.query.OrderSource,
SourceID:this.$route.query.SourceID,
OrderResource: this.$route.query.OrderSource,
SourceID: this.$route.query.SourceID,
}
this.apipost('Financial_post_GetTicketFinanceList',msg,r=>{
if(r.data.resultCode==1){
if(this.total>0){
this.noData =false;
}else{
this.noData =true;
this.apipost('Financial_post_GetTicketFinanceList', msg, r => {
if (r.data.resultCode == 1) {
if (this.total > 0) {
this.noData = false;
} else {
this.noData = true;
}
this.dataList = r.data.data;
let Money = 0;
this.dataList.forEach(x=>{
if((this.type&&this.type == x.Type&&(x.Status==2||(x.Status==1&&x.TradeDate)))||this.type==null){
this.dataList.forEach(x => {
if ((this.type && this.type == x.Type && (x.Status == 2 || (x.Status == 1 && x.TradeDate))) ||
this.type == null) {
Money = x.Money + Money;
}
})
this.Money = Money;
this.loading =false;
}else{
this.loading = false;
} else {
this.$message.error(r.data.message);
this.loading =false;
this.loading = false;
}
},null)
}, null)
},
}
}
}
</script>
<style>
@import url('../../assets/css/domestic/SettlementOrder.css');
.page_SettlementOrder td._hover span{
@import url('../../assets/css/domestic/SettlementOrder.css');
.page_SettlementOrder td._hover span {
border-bottom: 1px solid #333;
cursor: pointer;
}
.page_SettlementOrder td._hover:hover span{
}
.page_SettlementOrder td._hover:hover span {
border-bottom: 1px dotted #333;
}
.sett_popover{
}
.sett_popover {
max-height: 300px;
overflow: auto;
}
.page_FinancialOrder {
}
.page_FinancialOrder {
padding: 25px 0;
}
.page_FinancialOrder>p{
}
.page_FinancialOrder>p {
margin-bottom: 10px;
padding-left: 10px;
border-left: 3px solid #E95252;
font-size: 16px;
color: #000000;
}
._VorcherInos_img{
}
._VorcherInos_img {
width: 45px;
height: 45px;
cursor: pointer;
}
._show_img_box{position: fixed; background: rgba(0,0,0,.6); left: 0; top:0; width: 100%; height: 100%; z-index: 999; text-align: center;overflow: auto}
.page_FinancialOrder .icon-excel{
}
._show_img_box {
position: fixed;
background: rgba(0, 0, 0, .6);
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 999;
text-align: center;
overflow: auto
}
.page_FinancialOrder .icon-excel {
font-size: 30px;
text-align: center;
color: #41D2A1;
}
.page_FinancialOrder .allMoney{
}
.page_FinancialOrder .allMoney {
text-align: right !important;
font-size: 16px;
font-weight: bold;
}
.page_FinancialOrder ._color_red{
}
.page_FinancialOrder ._color_red {
color: #e95252;
}
.page_FinancialOrder ._color_green{
}
.page_FinancialOrder ._color_green {
color: #2BBB7E;
}
.page_FinancialOrder ._bg_color_red{
}
.page_FinancialOrder ._bg_color_red {
background-color: #e95252;
}
.page_FinancialOrder ._bg_color_green{
}
.page_FinancialOrder ._bg_color_green {
background-color: #2BBB7E;
}
.page_FinancialOrder ._shouzhi{
}
.page_FinancialOrder ._shouzhi {
width: 15px;
height: 15px;
display: inline-block;
border-radius: 50%;
}
.page_SettlementOrder p._flex_{
}
.page_SettlementOrder p._flex_ {
display: flex;
justify-content: space-between;
align-items: center;
}
._jump_page{
}
._jump_page {
cursor: pointer;
text-decoration: underline;
}
._jump_page:hover{
}
._jump_page:hover {
color: #c94052;
}
}
</style>
<template>
<div class="flexOne page_SettlementOrder page_FinancialOrder">
<p class="_flex_"><span>{{Name}}</span><button type="button" class="normalBtn" @click="downMuban()">导出</button></p>
<div class="_content">
<table class="_content_tab singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0" cellpadding="0" v-loading = 'loading'>
<table class="_content_tab singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0" cellpadding="0"
v-loading='loading'>
<tr>
<th>财务单号</th>
<th>单据类型</th>
......@@ -84,49 +113,49 @@
<th>状态</th>
</tr>
<template v-for="(item,index) in dataList">
<tr v-if="type&&item.Type==type&&(item.Status==2||(item.Status==1&&item.TradeDate))">
<tr :key="index" v-if="type&&item.Type==type&&(item.Status==2||(item.Status==1&&item.TradeDate))">
<td><span class="_jump_page" @click="goUrl('FinancialDocumentsDetail',item.FrID)">{{item.FrID}}</span></td>
<td>{{item.Type==1?'收入':'支出'}}</td>
<td>
<span v-for="(son,sIndex) in item.DetailList">{{son.CostTypeName}}</span>
<span v-for="(son,sIndex) in item.DetailList" :key="sIndex">{{son.CostTypeName}}</span>
</td>
<td>{{item.TradeDate}}</td>
<td>{{item.Money}}</td>
<td>
<span> {{ item.EmName }} </span><br/>
<span> {{ item.EmName }} </span><br />
<span> {{ item.CreateDate }} </span>
</td>
<td>
<template v-for="(son,sIndex) in item.VorcherInos">
<template v-if="son.Type==1||son.Type==2">
<i class="iconfont icon-excel" @click="showUpLoadFile(son)"></i>
<i class="iconfont icon-excel" @click="showUpLoadFile(son)" :key="sIndex"></i>
</template>
<template v-if="son.Type==3">
<img class="_VorcherInos_img" @click="showImg(item.VorcherInos)" :src="son.Content" alt="">
<img class="_VorcherInos_img" @click="showImg(item.VorcherInos)" :src="son.Content" alt="" :key="sIndex" />
</template>
</template>
</td>
<td>{{item.StatusStr}}</td>
</tr>
<tr v-else>
<tr v-else :key="index">
<td><span class="_jump_page" @click="goUrl('FinancialDocumentsDetail',item.FrID)">{{item.FrID}}</span></td>
<td>{{item.Type==1?'收入':'支出'}}</td>
<td>
<span v-for="(son,sIndex) in item.DetailList">{{son.CostTypeName}}</span>
<span v-for="(son,sIndex) in item.DetailList" :key="sIndex">{{son.CostTypeName}}</span>
</td>
<td>{{item.TradeDate}}</td>
<td>{{item.Money}}</td>
<td>
<span> {{ item.EmName }} </span><br/>
<span> {{ item.EmName }} </span><br />
<span> {{ item.CreateDate }} </span>
</td>
<td>
<template v-for="(son,sIndex) in item.VorcherInos">
<template v-if="son.Type==1||son.Type==2">
<i class="iconfont icon-excel" @click="showUpLoadFile(son)"></i>
<i class="iconfont icon-excel" @click="showUpLoadFile(son)" :key="sIndex"></i>
</template>
<template v-if="son.Type==3">
<img class="_VorcherInos_img" @click="showImg(item.VorcherInos)" :src="son.Content" alt="">
<img class="_VorcherInos_img" @click="showImg(item.VorcherInos)" :src="son.Content" alt="" :key="sIndex" />
</template>
</template>
</td>
......@@ -138,11 +167,7 @@
<td :colspan="9" class="allMoney PingFangSC" :class="Money>0?'_color_red':'_color_green'">{{Money}}</td>
</tr>
</table>
<!-- <div v-if='picIsShow' class="_show_img_box" @click="picIsShow=false,picObj=''">
<img :src="picObj" style="margin-top: 80px;"/>
</div> -->
<div v-if='picIsShow' class="viewBigPicLayer" @click="picIsShow=false,picObj=[]">
<!-- <i class="el-icon-circle-close-outline clolseViewBigPicLayer" @click="picIsShow=false,picObj=[]"></i> -->
<el-carousel height="600px" :interval="5000" trigger="click">
<el-carousel-item v-for="(item,index) in picObj" :key="index">
<div class="inlineDiv ownScrollbarStyle"><img :src="item" /></div>
......@@ -152,96 +177,101 @@
</div>
</div>
</template>
<script>
export default {
data(){
return{
dataList:[],
loading:true,
picIsShow:false,
picObj:[],
Money:0,
Name:'',
type:null,
export default {
data() {
return {
dataList: [],
loading: true,
picIsShow: false,
picObj: [],
Money: 0,
Name: '',
type: null,
}
},
created(){
if(this.$route.query.type){
created() {
if (this.$route.query.type) {
this.type = this.$route.query.type;
}
if(this.$route.query.OrderSource==4){
if (this.$route.query.OrderSource == 4) {
this.Name = '机票款';
}else if(this.$route.query.OrderSource==10){
} else if (this.$route.query.OrderSource == 10) {
this.Name = '签证款';
}else if(this.$route.query.OrderSource==9){
this.Name = '国内票务期数:'+this.$route.query.term;
} else if (this.$route.query.OrderSource == 9) {
this.Name = '国内票务期数:' + this.$route.query.term;
}
},
mounted(){
mounted() {
this.getList();
},
methods:{
goUrl(path,id){
methods: {
goUrl(path, id) {
this.$router.push({
path: '/' + path,
query: {id:id,blank:'y',tab:id+'单据详情'}
query: {
id: id,
blank: 'y',
tab: id + '单据详情'
}
})
},
downMuban(){
downMuban() {
let msg = {
OrderResource:this.$route.query.OrderSource,
SourceID:this.$route.query.SourceID,
Type:this.$route.query.type
OrderResource: this.$route.query.OrderSource,
SourceID: this.$route.query.SourceID,
Type: this.$route.query.type
}
this.GetLocalFile("Financial_post_OutToExcelDomesticTicketFinanceList", msg,"期数"+this.$route.query.term+ ".xls");
this.GetLocalFile("Financial_post_OutToExcelDomesticTicketFinanceList", msg, "期数" + this.$route.query.term +
".xls");
},
showUpLoadFile(i){ // 预览上传文件
if(i.Content.substring(i.Content.lastIndexOf('.')+1,i.Content.length).toUpperCase()=='PDF'){
showUpLoadFile(i) { // 预览上传文件
if (i.Content.substring(i.Content.lastIndexOf('.') + 1, i.Content.length).toUpperCase() == 'PDF') {
this.previewPDF(i.Content)
}else{
window.open("https://view.officeapps.live.com/op/view.aspx?src="+i.Content)
} else {
window.open("https://view.officeapps.live.com/op/view.aspx?src=" + i.Content)
}
},
showImg(obj){
obj.forEach(x=>{
if(x.Type==3){
showImg(obj) {
obj.forEach(x => {
if (x.Type == 3) {
this.picObj.push(x.Content)
}
})
this.picIsShow= true;
this.picIsShow = true;
},
getList(){
getList() {
this.loading = true;
let msg = {
OrderResource:this.$route.query.OrderSource,
SourceID:this.$route.query.SourceID,
Type:this.$route.query.type,
Term:this.$route.query.term,
OrderResource: this.$route.query.OrderSource,
SourceID: this.$route.query.SourceID,
Type: this.$route.query.type,
Term: this.$route.query.term,
}
this.apipost('Financial_post_GetDomesticTicketFinanceList',msg,r=>{
if(r.data.resultCode==1){
this.apipost('Financial_post_GetDomesticTicketFinanceList', msg, r => {
if (r.data.resultCode == 1) {
this.total = r.data.data.count;
if(this.total>0){
this.noData =false;
}else{
this.noData =true;
if (this.total > 0) {
this.noData = false;
} else {
this.noData = true;
}
this.dataList = r.data.data;
let Money = 0;
this.dataList.forEach(x=>{
if((this.type&&this.type == x.Type&&(x.Status==2||(x.Status==1&&x.TradeDate)))||this.type==null){
this.dataList.forEach(x => {
if ((this.type && this.type == x.Type && (x.Status == 2 || (x.Status == 1 && x.TradeDate))) ||
this.type == null) {
Money = x.Money + Money;
}
})
this.Money = Money;
this.loading =false;
}else{
this.loading = false;
} else {
this.$message.error(r.data.message);
this.loading =false;
this.loading = false;
}
},null)
}, null)
},
}
}
}
</script>
\ No newline at end of file
......@@ -64,14 +64,13 @@
export default {
data() {
return {
Year: new Date().getFullYear(),
Month: new Date().getMonth() + 1,
date: new Date().getDate(),
IsInter:-1,//月统计[0-国内,1-国际]
IsInter: -1, //月统计[0-国内,1-国际]
YearS: new Date().getFullYear(),
MonthS: '',
IsInters:-1,//年统计[0-国内,1-国际]
IsInters: -1, //年统计[0-国内,1-国际]
clientHeight: '',
yearList: [],
MonthList: [],
......@@ -266,7 +265,7 @@
let msg = {
Year: this.YearS,
Month: '',
IsInter:this.IsInters
IsInter: this.IsInters
}
this.apipost('Domestic_Ticket_post_GetProfitList', msg, r => {
if (r.data.resultCode == 1) {
......
......@@ -146,7 +146,7 @@
<th>航班</th>
<th>航段</th>
</tr>
<tr v-for="(i,d) in item.FlightList">
<tr v-for="(i,d) in item.FlightList" :key="d">
<td>{{i.AirlineName}}</td>
<td>{{i.FlightNo}}</td>
<td>{{i.Leg}}</td>
......@@ -337,4 +337,5 @@
},
}
}
</script>
......@@ -5,26 +5,10 @@
<div class='flexOne page_OrderToday'>
<div class='query-box'>
<ul>
<!-- <li>
<span>
<em>期数</em>
<el-date-picker
class="w210"
v-model="msg.Term"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</span>
</li> -->
<li>
<span>
<em>制单日期</em>
<el-date-picker
class="h34"
v-model="transactionDate"
@change="timeAdd()"
type="daterange"
<el-date-picker class="h34" v-model="transactionDate" @change="timeAdd()" type="daterange"
value-format="yyyy-MM-dd">
</el-date-picker>
</span>
......@@ -32,12 +16,9 @@
<li>
<span>
<em>航空公司</em>
<el-select filterable @change="flight_post_GetAirportNameList(msg.AirlineId,1)" v-model='msg.AirlineId' >
<el-select filterable @change="flight_post_GetAirportNameList(msg.AirlineId,1)" v-model='msg.AirlineId'>
<el-option label='不限' value=''></el-option>
<el-option v-for='item in airlineList'
:label='item.AlName'
:value='item.AirLineId'
:key='item.AirLineId'>
<el-option v-for='item in airlineList' :label='item.AlName' :value='item.AirLineId' :key='item.AirLineId'>
</el-option>
</el-select>
</span>
......@@ -46,9 +27,7 @@
<span>
<em>航班号</em>
<el-select filterable v-model='msg.FlightNo'>
<el-option v-for='item in AirportNameList'
:label='item.Flight_number'
:value='item.Flight_number'
<el-option v-for='item in AirportNameList' :label='item.Flight_number' :value='item.Flight_number'
:key='item.Flight_number'>
</el-option>
</el-select>
......@@ -65,9 +44,9 @@
</span>
</li>
<li>
<input type="button" class="hollowFixedBtn" value="结算" @click="goUrl('SettlementOrder')"/>
<input type="button" class="hollowFixedBtn" value="查询" @click="resetPageIndex(),getList(1)"/>
<input type="button" class="normalBtn" value="新增" @click="addShow=true,text='新增',initAddMsg()"/>
<input type="button" class="hollowFixedBtn" value="结算" @click="goUrl('SettlementOrder')" />
<input type="button" class="hollowFixedBtn" value="查询" @click="resetPageIndex(),getList(1)" />
<input type="button" class="normalBtn" value="新增" @click="addShow=true,text='新增',initAddMsg()" />
</li>
</ul>
</div>
......@@ -93,14 +72,12 @@
<th>操作人</th>
<th>操作</th>
</tr>
<tr v-for="(item,index) in DataList.list">
<td>{{item.ID}}</td>
<tr v-for="(item,index) in DataList.list" :key="index">
<td >{{item.ID}}</td>
<td class="_hover">
<el-popover
placement="bottom"
width="220"
trigger="click">
<table class="add_table singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0" cellpadding="0">
<el-popover placement="bottom" width="220" trigger="click">
<table class="add_table singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0"
cellpadding="0">
<tr>
<th width="70"></th>
<th>数量</th>
......@@ -122,11 +99,9 @@
</el-popover>
</td>
<td class="_hover">
<el-popover
placement="bottom"
width="220"
trigger="click">
<table class="add_table singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0" cellpadding="0">
<el-popover placement="bottom" width="220" trigger="click">
<table class="add_table singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0"
cellpadding="0">
<tr>
<th width="70"></th>
<th>单价(含税)</th>
......@@ -148,11 +123,9 @@
</el-popover>
</td>
<td class="_hover">
<el-popover
placement="bottom"
width="220"
trigger="click">
<table class="add_table singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0" cellpadding="0">
<el-popover placement="bottom" width="220" trigger="click">
<table class="add_table singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0"
cellpadding="0">
<tr>
<th width="70"></th>
<th>成本单价</th>
......@@ -177,32 +150,33 @@
<td>{{item.ClientName}}</td>
<td>{{item.TravelTime}}</td>
<td colspan="3" class="_hover">
<el-popover
placement="bottom"
width="450"
trigger="click">
<table class="add_table singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0" cellpadding="0">
<el-popover placement="bottom" width="450" trigger="click">
<table class="add_table singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0"
cellpadding="0">
<tr>
<th>航空公司</th>
<th>航班</th>
<th>航段</th>
</tr>
<tr v-for="(i,d) in item.FlightList">
<tr v-for="(i,d) in item.FlightList" :key="d">
<td>{{i.AirlineName}}</td>
<td>{{i.FlightNo}}</td>
<td>{{i.Leg}}</td>
</tr>
</table>
<span slot="reference">{{item.FlightList[0].AirlineName+' — '+item.FlightList[0].FlightNo+' — '+item.FlightList[0].Leg}}</span>
<span
slot="reference">{{item.FlightList[0].AirlineName+' — '+item.FlightList[0].FlightNo+' — '+item.FlightList[0].Leg}}</span>
</el-popover>
</td>
<td>{{item.EmName}}</td>
<td>
<el-tooltip class="item" effect="dark" content="修改" placement="top">
<el-button type="primary" class="iconfont icon-xiugai" @click="editCurency(item.ID),addShow=true,text='修改'" circle></el-button>
<el-button type="primary" class="iconfont icon-xiugai"
@click="editCurency(item.ID),addShow=true,text='修改'" circle></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<el-button type="danger" class="iconfont icon-shanchu" @click="financeinfoRemove(item.ID)" circle></el-button>
<el-button type="danger" class="iconfont icon-shanchu" @click="financeinfoRemove(item.ID)" circle>
</el-button>
</el-tooltip>
</td>
</tr>
......@@ -212,13 +186,8 @@
{{$t('system.content_noData')}}
</div>
<div>
<el-pagination
background
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
layout="total,prev, pager, next, jumper"
:page-size=msg.pageSize
:total=total>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
layout="total,prev, pager, next, jumper" :page-size=msg.pageSize :total=total>
</el-pagination>
</div>
</div>
......@@ -229,54 +198,37 @@
</el-col>
<el-col :span="4" class="_add_saveBtn">
<button type="button" class="normalBtn" @click="submitForm('addMsg')">{{$t('pub.saveBtn')}}</button>
<button class="hollowFixedBtn" type="button" @click="initAddMsg(),resetForm('addMsg'),addShow=false">{{$t('pub.cancelBtn')}}</button>
<button class="hollowFixedBtn" type="button"
@click="initAddMsg(),resetForm('addMsg'),addShow=false">{{$t('pub.cancelBtn')}}</button>
</el-col>
</el-row>
<el-form class="_info_box clearfix" :model="addMsg" ref="addMsg" :rules="rules" label-width="110px">
<el-row>
<!-- <el-col :span="6" :gutter="35" >
<el-form-item label="期数" prop="TermDate">
<el-date-picker
v-model="addMsg.TermDate"
type="date"
:default-value="addMsg.OutTicketDate"
value-format="yyyy-MM-dd"
:disabled="text=='修改'?true:false"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col> -->
<el-col :span="6" :gutter="35" >
<el-col :span="6" :gutter="35">
<el-form-item label="出票日期" prop="OutTicketDate">
<el-date-picker
v-model="addMsg.OutTicketDate"
type="date"
:default-value="addMsg.OutTicketDate"
value-format="yyyy-MM-dd"
placeholder="选择日期">
<el-date-picker v-model="addMsg.OutTicketDate" type="date" :default-value="addMsg.OutTicketDate"
value-format="yyyy-MM-dd" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6" :gutter="35" >
<el-col :span="6" :gutter="35">
<el-form-item label="客户名称" prop="ClientName">
<el-input v-model="addMsg.ClientName" class="" ></el-input>
<el-input v-model="addMsg.ClientName" class=""></el-input>
</el-form-item>
</el-col>
<el-col :span="6" :gutter="35" >
<el-col :span="6" :gutter="35">
<el-form-item label="行程日期" prop="TravelTime">
<el-input v-model="addMsg.TravelTime" class="" ></el-input>
<el-input v-model="addMsg.TravelTime" class=""></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row v-for="(list,index) in addMsg.FlightList" :key="index">
<el-col :span="6" :gutter="35">
<el-form-item label="航空公司">
<el-select filterable v-model='list.AirlineId' @change="flight_post_GetAirportNameList(list.AirlineId,2,index)">
<el-select filterable v-model='list.AirlineId'
@change="flight_post_GetAirportNameList(list.AirlineId,2,index)">
<el-option label='不限' value='-1'></el-option>
<el-option v-for='i in list.airlineList'
:label='i.AlName'
:value='i.AirLineId'
:key='i.AirLineId'>
<el-option v-for='i in list.airlineList' :label='i.AlName' :value='i.AirLineId' :key='i.AirLineId'>
</el-option>
</el-select>
</el-form-item>
......@@ -284,9 +236,7 @@
<el-col :span="6" :gutter="35">
<el-form-item label="航班号">
<el-select filterable v-model='list.FlightNo'>
<el-option v-for='i in list.AirportNameList'
:label='i.Flight_number'
:value='i.Flight_number'
<el-option v-for='i in list.AirportNameList' :label='i.Flight_number' :value='i.Flight_number'
:key='i.Flight_number'>
</el-option>
</el-select>
......@@ -294,7 +244,7 @@
</el-col>
<el-col :span="6" :gutter="35">
<el-form-item label="航段">
<el-input v-model="list.Leg" class="" ></el-input>
<el-input v-model="list.Leg" class=""></el-input>
</el-form-item>
</el-col>
<el-col :span="6" :gutter="35" v-if="index==0">
......@@ -305,7 +255,7 @@
</el-col>
</el-row>
<el-row>
<el-col :span="18" :gutter="110" >
<el-col :span="18" :gutter="110">
<div class="add_table_box">
<table class="add_table singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0" cellpadding="0">
<tr>
......@@ -318,11 +268,14 @@
<th>利润</th>
</tr>
<template v-for="(p,pi) in addMsg.PriceList">
<tr v-if="p.Type==1">
<tr v-if="p.Type==1" :key="pi">
<td>成人</td>
<td><input onkeypress='return( /[\d]/.test(String.fromCharCode(event.keyCode)))' type="number" v-model="p.Number" size="mini" @change="calculation(1,pi)" placeholder="0"/></td>
<td><input @keydown="handleInput2" type="number" v-model="p.Price" size="mini" @change="calculation(1,pi)" placeholder="¥0.00"/></td>
<td><input @keydown="handleInput2" type="number" v-model="p.Cost" size="mini" @change="calculation(1,pi)" placeholder="¥0.00"/></td>
<td><input onkeypress='return( /[\d]/.test(String.fromCharCode(event.keyCode)))' type="number"
v-model="p.Number" size="mini" @change="calculation(1,pi)" placeholder="0" /></td>
<td><input @keydown="handleInput2" type="number" v-model="p.Price" size="mini"
@change="calculation(1,pi)" placeholder="¥0.00" /></td>
<td><input @keydown="handleInput2" type="number" v-model="p.Cost" size="mini"
@change="calculation(1,pi)" placeholder="¥0.00" /></td>
<td>{{p.allCost}}</td>
<td>{{p.cAllCost}}</td>
<td :class="p.profit>=0?'_zhengshu':'_fushu'">{{p.profit}}
......@@ -332,11 +285,14 @@
</p>
</td>
</tr>
<tr v-if="p.Type==2">
<tr v-if="p.Type==2" :key="pi">
<td>儿童</td>
<td><input onkeypress='return( /[\d]/.test(String.fromCharCode(event.keyCode)))' type="number" v-model="p.Number" size="mini" @change="calculation(2,pi)" placeholder="0"/></td>
<td><input @keydown="handleInput2" type="number" v-model="p.Price" size="mini" @change="calculation(2,pi)" placeholder="¥0.00"/></td>
<td><input @keydown="handleInput2" type="number" v-model="p.Cost" size="mini" @change="calculation(2,pi)" placeholder="¥0.00"/></td>
<td><input onkeypress='return( /[\d]/.test(String.fromCharCode(event.keyCode)))' type="number"
v-model="p.Number" size="mini" @change="calculation(2,pi)" placeholder="0" /></td>
<td><input @keydown="handleInput2" type="number" v-model="p.Price" size="mini"
@change="calculation(2,pi)" placeholder="¥0.00" /></td>
<td><input @keydown="handleInput2" type="number" v-model="p.Cost" size="mini"
@change="calculation(2,pi)" placeholder="¥0.00" /></td>
<td>{{p.allCost}}</td>
<td>{{p.cAllCost}}</td>
<td :class="p.profit>=0?'_zhengshu':'_fushu'">{{p.profit}}
......@@ -346,11 +302,14 @@
</p>
</td>
</tr>
<tr v-if="p.Type==3">
<tr v-if="p.Type==3" :key="pi">
<td>婴儿</td>
<td><input onkeypress='return( /[\d]/.test(String.fromCharCode(event.keyCode)))' type="number" v-model="p.Number" size="mini" @change="calculation(3,pi)" placeholder="0"/></td>
<td><input @keydown="handleInput2" type="number" v-model="p.Price" size="mini" @change="calculation(3,pi)" placeholder="¥0.00"/></td>
<td><input @keydown="handleInput2" type="number" v-model="p.Cost" size="mini" @change="calculation(3,pi)" placeholder="¥0.00"/></td>
<td><input onkeypress='return( /[\d]/.test(String.fromCharCode(event.keyCode)))' type="number"
v-model="p.Number" size="mini" @change="calculation(3,pi)" placeholder="0" /></td>
<td><input @keydown="handleInput2" type="number" v-model="p.Price" size="mini"
@change="calculation(3,pi)" placeholder="¥0.00" /></td>
<td><input @keydown="handleInput2" type="number" v-model="p.Cost" size="mini"
@change="calculation(3,pi)" placeholder="¥0.00" /></td>
<td>{{p.allCost}}</td>
<td>{{p.cAllCost}}</td>
<td :class="p.profit>=0?'_zhengshu':'_fushu'">{{p.profit}}
......@@ -370,164 +329,172 @@
<el-dialog title="结算订单" :visible.sync="dialogFormVisible" custom-class="orderTodayJsBox">
<el-form label-width="80px">
<el-form-item label="结算期数">
<el-date-picker
v-model="TermDate"
type="date"
:default-value="addMsg.OutTicketDate"
value-format="yyyy-MM-dd"
<el-date-picker v-model="TermDate" type="date" :default-value="addMsg.OutTicketDate" value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="mini" @click="dialogFormVisible = false">取 消</el-button>
<el-button size="mini" type="primary" class="otCancleBtn" @click="dialogFormVisible = false,jiesuan()">确 定</el-button>
<el-button size="mini" type="primary" class="otCancleBtn" @click="dialogFormVisible = false,jiesuan()">确 定
</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
data(){
return{
msg:{
pageIndex:1,
pageSize:15,
OrderID:'',
AirlineId:'',
FlightNo:'',
ClientName:'',
ParentId:0,
Term:'',
sDate:'',
eDate:''
},
addMsg:{
TermDate:'',
ID:0,
OutTicketDate:new Date().Format("yyyy-MM-dd"),
TravelTime:'',
ClientName:'',
AirlineId:'',
FlightNo:'',
Leg:'',
PriceList:[
{
ID:0,
Number:'',
Cost:'',
Price:'',
Type:1, //1-成人2-儿童3-婴儿
allCost:'',
cAllCost:'',
profit:''
export default {
data() {
return {
msg: {
pageIndex: 1,
pageSize: 15,
OrderID: '',
AirlineId: '',
FlightNo: '',
ClientName: '',
ParentId: 0,
Term: '',
sDate: '',
eDate: ''
},
addMsg: {
TermDate: '',
ID: 0,
OutTicketDate: new Date().Format("yyyy-MM-dd"),
TravelTime: '',
ClientName: '',
AirlineId: '',
FlightNo: '',
Leg: '',
PriceList: [{
ID: 0,
Number: '',
Cost: '',
Price: '',
Type: 1, //1-成人2-儿童3-婴儿
allCost: '',
cAllCost: '',
profit: ''
},
{
ID:0,
Number:'',
Cost:'',
Price:'',
Type:2, //1-成人2-儿童3-婴儿
allCost:'',
cAllCost:'',
profit:''
ID: 0,
Number: '',
Cost: '',
Price: '',
Type: 2, //1-成人2-儿童3-婴儿
allCost: '',
cAllCost: '',
profit: ''
},
{
ID:0,
Number:'',
Cost:'',
Price:'',
Type:3, //1-成人2-儿童3-婴儿
allCost:'',
cAllCost:'',
profit:''
ID: 0,
Number: '',
Cost: '',
Price: '',
Type: 3, //1-成人2-儿童3-婴儿
allCost: '',
cAllCost: '',
profit: ''
}
],
Num:0,
FlightList:[
{
ID:0,
AirlineId:'-1',
FlightNo:'',
Leg:'',
airlineList:[],
AirportNameList:[],
}
],
},
FlightList:{
ID:0,
AirlineId:'-1',
FlightNo:'',
Leg:'',
airlineList:[],
AirportNameList:[],
},
transactionDate:[],
airlineList:[],
AirportNameList:[],
DataList:[],
total:0,
currentPage:1,
loading:true,
text:'',
addShow:false,
noData:false,
cCostPrice:0,
cUnitPrice:0,
eCostPrice:0,
eUnitPrice:0,
yCostPrice:0,
yUnitPrice:0,
cLirun:0,
eLirun:0,
yLirun:0,
dialogFormVisible:false,
Num: 0,
FlightList: [{
ID: 0,
AirlineId: '-1',
FlightNo: '',
Leg: '',
airlineList: [],
AirportNameList: [],
}],
},
FlightList: {
ID: 0,
AirlineId: '-1',
FlightNo: '',
Leg: '',
airlineList: [],
AirportNameList: [],
},
transactionDate: [],
airlineList: [],
AirportNameList: [],
DataList: [],
total: 0,
currentPage: 1,
loading: true,
text: '',
addShow: false,
noData: false,
cCostPrice: 0,
cUnitPrice: 0,
eCostPrice: 0,
eUnitPrice: 0,
yCostPrice: 0,
yUnitPrice: 0,
cLirun: 0,
eLirun: 0,
yLirun: 0,
dialogFormVisible: false,
formLabelWidth: '120px',
goPath:'',
TermDate:'',
rules: {//表单必填验证
ClientName: [
{ required: true, message: '请填写客户名称', trigger: 'blur' }
],
TravelTime: [
{ required: true, message: '请填写行程日期', trigger: 'blur' }
],
AirlineId: [
{ required: true, message: '请选择航空公司', trigger: 'change' }
],
Leg: [
{ required: true, message: '请输入航段', trigger: 'blur' }
],
FlightNo: [
{ required: true, message: '请输选择航班', trigger: 'change' }
],
OutTicketDate: [
{ required: true, message: '请输选出票日期', trigger: 'change' }
]
}
}
},mounted(){
goPath: '',
TermDate: '',
rules: { //表单必填验证
ClientName: [{
required: true,
message: '请填写客户名称',
trigger: 'blur'
}],
TravelTime: [{
required: true,
message: '请填写行程日期',
trigger: 'blur'
}],
AirlineId: [{
required: true,
message: '请选择航空公司',
trigger: 'change'
}],
Leg: [{
required: true,
message: '请输入航段',
trigger: 'blur'
}],
FlightNo: [{
required: true,
message: '请输选择航班',
trigger: 'change'
}],
OutTicketDate: [{
required: true,
message: '请输选出票日期',
trigger: 'change'
}]
}
}
},
mounted() {
this.getList();
this.getAirlineList();
},methods:{
deleteAir(i,pi,t){
if(pi>=0){
},
methods: {
deleteAir(i, pi, t) {
if (pi >= 0) {
let count = 0;
this.addMsg.PriceList.forEach(x=>{
if(x.Type === t){
this.addMsg.PriceList.forEach(x => {
if (x.Type === t) {
count = count + 1
}
})
if(count==1) return
this.addMsg.PriceList.splice(pi,1);
}else{
if(pi) return
this.addMsg.FlightList.splice(i,1);
if (count == 1) return
this.addMsg.PriceList.splice(pi, 1);
} else {
if (pi) return
this.addMsg.FlightList.splice(i, 1);
}
},
timeAdd(){ // 日期格式
if(!this.transactionDate){
timeAdd() { // 日期格式
if (!this.transactionDate) {
this.msg.sDate = '';
this.msg.eDate = '';
return
......@@ -535,108 +502,122 @@ export default {
this.msg.sDate = this.transactionDate[0];
this.msg.eDate = this.transactionDate[1];
},
compare(property){
return function(a,b){
compare(property) {
return function (a, b) {
var value1 = a[property];
var value2 = b[property];
return value1 - value2;
}
},
addAir(t){
if(t!=0){
addAir(t) {
if (t != 0) {
let msg = {
ID:0,
Number:'',
Cost:'',
Price:'',
Type:t,
allCost:'',
cAllCost:'',
profit:''
ID: 0,
Number: '',
Cost: '',
Price: '',
Type: t,
allCost: '',
cAllCost: '',
profit: ''
}
this.addMsg.PriceList.push(msg);
this.addMsg.PriceList.sort(this.compare('Type'))
}else{
} else {
this.addMsg.FlightList.push(JSON.parse(JSON.stringify(this.FlightList)));
}
},
jiesuan(){
if(!this.TermDate){
return this.$message.error('请选择结算日期') ;
jiesuan() {
if (!this.TermDate) {
return this.$message.error('请选择结算日期');
}
this.apipost('Domestic_Ticket_post_CheckBiLL', {
TermDate: this.TermDate,
sDate: this.msg.sDate,
eDate: this.msg.eDate
}, r => {
if (r.data.resultCode == 1) {
this.$router.push({
name: this.goPath,
query: {
'Term': this.TermDate,
'blank': 'y'
}
this.apipost('Domestic_Ticket_post_CheckBiLL',{TermDate:this.TermDate,sDate:this.msg.sDate,eDate:this.msg.eDate},r=>{
if(r.data.resultCode==1){
this.$router.push({name:this.goPath,query:{'Term':this.TermDate,'blank':'y'}});
});
this.getList();
}else{
} else {
this.$message.error(r.data.message);
}
},null)
}, null)
},
flight_post_GetAirportNameList(id,t,i,num){
if(!num){
if(t===1){
this.msg.FlightNo='';
}else{
this.addMsg.FlightList[i].FlightNo='';
flight_post_GetAirportNameList(id, t, i, num) {
if (!num) {
if (t === 1) {
this.msg.FlightNo = '';
} else {
this.addMsg.FlightList[i].FlightNo = '';
}
if(!id) return
if(t===1){
this.msg.FlightNo='';
}else{
this.addMsg.FlightList[i].FlightNo='';
if (!id) return
if (t === 1) {
this.msg.FlightNo = '';
} else {
this.addMsg.FlightList[i].FlightNo = '';
}
}
this.apipost('flight_post_GetAirportNameList',{airlineID:id},r=>{
if(r.data.resultCode==1){
if(t===1){
this.apipost('flight_post_GetAirportNameList', {
airlineID: id
}, r => {
if (r.data.resultCode == 1) {
if (t === 1) {
this.AirportNameList = r.data.data;
}else{
} else {
this.addMsg.FlightList[i].AirportNameList = r.data.data;
}
}
},null)
}, null)
},
goUrl(path){
goUrl(path) {
this.dialogFormVisible = true;
this.goPath = path;
return
},
Domestic_Ticket_post_Set(){ // 保存
this.apipost('Domestic_Ticket_post_Set',this.addMsg,res=>{
if(res.data.resultCode==1){
Domestic_Ticket_post_Set() { // 保存
this.apipost('Domestic_Ticket_post_Set', this.addMsg, res => {
if (res.data.resultCode == 1) {
this.$message.success(res.data.message);
this.getList();
this.initAddMsg();
this.addShow = false;
}else{
} else {
this.$message.error(res.data.message);
}
},null)
}, null)
},
handleInput2(e) { // input验证
e.target.value = (e.target.value.match(/^\d*(\.?\d{0,1})/g)[0]) || null
},
calculation(t,i){ //计算
let AdultNumber = this.addMsg.PriceList[i].Number?parseFloat(this.addMsg.PriceList[i].Number):0;
let AdultPrice = this.addMsg.PriceList[i].Price?parseFloat(this.addMsg.PriceList[i].Price):0;
let AdultCost = this.addMsg.PriceList[i].Cost?parseFloat(this.addMsg.PriceList[i].Cost):0;
this.addMsg.PriceList[i].allCost = AdultNumber*AdultPrice;
this.addMsg.PriceList[i].cAllCost = AdultNumber*AdultCost;
this.addMsg.PriceList[i].profit = this.addMsg.PriceList[i].allCost - this.addMsg.PriceList[i].cAllCost ;
calculation(t, i) { //计算
let AdultNumber = this.addMsg.PriceList[i].Number ? parseFloat(this.addMsg.PriceList[i].Number) : 0;
let AdultPrice = this.addMsg.PriceList[i].Price ? parseFloat(this.addMsg.PriceList[i].Price) : 0;
let AdultCost = this.addMsg.PriceList[i].Cost ? parseFloat(this.addMsg.PriceList[i].Cost) : 0;
this.addMsg.PriceList[i].allCost = AdultNumber * AdultPrice;
this.addMsg.PriceList[i].cAllCost = AdultNumber * AdultCost;
this.addMsg.PriceList[i].profit = this.addMsg.PriceList[i].allCost - this.addMsg.PriceList[i].cAllCost;
this.$forceUpdate();
},
deletInstitutions(id){ //删除
this.apipost("Domestic_Ticket_post_Remove",{ID:id},res => {
if(res.data.resultCode == 1) {
deletInstitutions(id) { //删除
this.apipost("Domestic_Ticket_post_Remove", {
ID: id
}, res => {
if (res.data.resultCode == 1) {
this.$message.success(res.data.message);
this.getList();
} else {
this.tips(res.data.message,'error');
this.tips(res.data.message, 'error');
}
},err => {});
}, err => {});
},
financeinfoRemove(id){//删除 提示
financeinfoRemove(id) { //删除 提示
this.$confirm('是否删除?删除后后不可恢复!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
......@@ -650,213 +631,209 @@ export default {
});
});
},
getAirlineList(n) {//获取航空公司*
this.apipost("airline_post_GetList",{},res => {
if(n){
this.addMsg.FlightList.forEach((x,index)=>{
getAirlineList(n) { //获取航空公司*
this.apipost("airline_post_GetList", {}, res => {
if (n) {
this.addMsg.FlightList.forEach((x, index) => {
x.airlineList = res.data.data;
this.$forceUpdate();
this.flight_post_GetAirportNameList(x.AirlineId,2,index,66);
this.flight_post_GetAirportNameList(x.AirlineId, 2, index, 66);
})
}else{
} else {
this.airlineList = res.data.data;
this.addMsg.FlightList[0].airlineList = res.data.data;
this.FlightList.airlineList = res.data.data;
}
},err => {});
}, err => {});
},
editCurency(id){ // 修改根据ID 获取信息
this.apipost('Domestic_Ticket_post_Get',{ID:id}, res => {
if(res.data.resultCode == 1) {
editCurency(id) { // 修改根据ID 获取信息
this.apipost('Domestic_Ticket_post_Get', {
ID: id
}, res => {
if (res.data.resultCode == 1) {
let data = res.data.data;
this.UnitPrice = data.TotalPrice;
this.CostPrice = data.TotalCost;
this.allPeople = parseInt(data.AdultNumber)+parseInt(data.ChirdNumber)+parseInt(data.BabyNumber);
this.allPeople = parseInt(data.AdultNumber) + parseInt(data.ChirdNumber) + parseInt(data.BabyNumber);
this.addMsg = data;
this.addMsg.PriceList.forEach((x,index)=>{
this.calculation(1,index)
this.addMsg.PriceList.forEach((x, index) => {
this.calculation(1, index)
})
this.getAirlineList(2);
} else {
this.tips(res.data.message,'error');
this.tips(res.data.message, 'error');
}
}, err => {})
},
initAddMsg(){ // 取消修改、新增
this.addMsg ={
TermDate:'',
ID:this.addMsg.ID,
OutTicketDate:new Date().toLocaleDateString().replace('/','-').replace('/','-'),
TravelTime:'',
ClientName:'',
AirlineId:'',
FlightNo:'',
Leg:'',
PriceList:[
{
ID:0,
Number:'',
Cost:'',
Price:'',
Type:1, //1-成人2-儿童3-婴儿
allCost:'',
cAllCost:'',
profit:''
initAddMsg() { // 取消修改、新增
this.addMsg = {
TermDate: '',
ID: this.addMsg.ID,
OutTicketDate: new Date().toLocaleDateString().replace('/', '-').replace('/', '-'),
TravelTime: '',
ClientName: '',
AirlineId: '',
FlightNo: '',
Leg: '',
PriceList: [{
ID: 0,
Number: '',
Cost: '',
Price: '',
Type: 1, //1-成人2-儿童3-婴儿
allCost: '',
cAllCost: '',
profit: ''
},
{
ID:0,
Number:'',
Cost:'',
Price:'',
Type:2, //1-成人2-儿童3-婴儿
allCost:'',
cAllCost:'',
profit:''
ID: 0,
Number: '',
Cost: '',
Price: '',
Type: 2, //1-成人2-儿童3-婴儿
allCost: '',
cAllCost: '',
profit: ''
},
{
ID:0,
Number:'',
Cost:'',
Price:'',
Type:3, //1-成人2-儿童3-婴儿
allCost:'',
cAllCost:'',
profit:''
ID: 0,
Number: '',
Cost: '',
Price: '',
Type: 3, //1-成人2-儿童3-婴儿
allCost: '',
cAllCost: '',
profit: ''
}
],
Num:0,
Term:'',
FlightList:[
{
ID:0,
AirlineId:'-1',
FlightNo:'',
Leg:'',
airlineList:this.addMsg.FlightList[0].airlineList,
AirportNameList:[]
}
]
Num: 0,
Term: '',
FlightList: [{
ID: 0,
AirlineId: '-1',
FlightNo: '',
Leg: '',
airlineList: this.addMsg.FlightList[0].airlineList,
AirportNameList: []
}]
};
this.cCostPrice=0;
this.cUnitPrice=0;
this.eCostPrice=0;
this.eUnitPrice=0;
this.yCostPrice=0;
this.yUnitPrice=0;
this.cCostPrice = 0;
this.cUnitPrice = 0;
this.eCostPrice = 0;
this.eUnitPrice = 0;
this.yCostPrice = 0;
this.yUnitPrice = 0;
this.$forceUpdate();
},
getList(t){ //获取列表
if(this.msg.OrderID==''){
this.msg.OrderID=0;
getList(t) { //获取列表
if (this.msg.OrderID == '') {
this.msg.OrderID = 0;
}
if(this.msg.AirlineId==''){
this.msg.AirlineId=0;
if (this.msg.AirlineId == '') {
this.msg.AirlineId = 0;
}
this.loading = true
this.apipost('Domestic_Ticket_post_GetPageList',this.msg,res=>{
if(res.data.resultCode==1){
this.apipost('Domestic_Ticket_post_GetPageList', this.msg, res => {
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
let data = res.data.data.pageData;
if(this.total>0){
this.noData =false;
}else{
this.noData =true;
if (this.total > 0) {
this.noData = false;
} else {
this.noData = true;
}
this.DataList = data;
this.loading = false;
if(!t){
this.msg.OrderID='';
this.msg.AirlineId='';
}else{
if(this.msg.OrderID==0){
this.msg.OrderID='';
if (!t) {
this.msg.OrderID = '';
this.msg.AirlineId = '';
} else {
if (this.msg.OrderID == 0) {
this.msg.OrderID = '';
}
if(this.msg.AirlineId==0){
this.msg.AirlineId='';
if (this.msg.AirlineId == 0) {
this.msg.AirlineId = '';
}
}
}else{
} else {
this.$message.error(res.data.message)
this.loading = false;
if(!t){
this.msg.OrderID='';
this.msg.AirlineId='';
}else{
if(this.msg.OrderID==0){
this.msg.OrderID='';
if (!t) {
this.msg.OrderID = '';
this.msg.AirlineId = '';
} else {
if (this.msg.OrderID == 0) {
this.msg.OrderID = '';
}
if(this.msg.AirlineId==0){
this.msg.AirlineId='';
if (this.msg.AirlineId == 0) {
this.msg.AirlineId = '';
}
}
}
},err=>{})
}, err => {})
},
initAddMsg(){//初始化添加、修改数据
initAddMsg() { //初始化添加、修改数据
let newMsg = {
TermDate:'',
OrderID:0,
OutTicketDate:new Date().Format("yyyy-MM-dd"),
TravelTime:'',
ClientName:'',
AirlineId:'',
FlightNo:'',
Leg:'',
PriceList:[
{
ID:0,
Number:'',
Cost:'',
Price:'',
Type:1, //1-成人2-儿童3-婴儿
allCost:'',
cAllCost:'',
profit:''
TermDate: '',
OrderID: 0,
OutTicketDate: new Date().Format("yyyy-MM-dd"),
TravelTime: '',
ClientName: '',
AirlineId: '',
FlightNo: '',
Leg: '',
PriceList: [{
ID: 0,
Number: '',
Cost: '',
Price: '',
Type: 1, //1-成人2-儿童3-婴儿
allCost: '',
cAllCost: '',
profit: ''
},
{
ID:0,
Number:'',
Cost:'',
Price:'',
Type:2, //1-成人2-儿童3-婴儿
allCost:'',
cAllCost:'',
profit:''
ID: 0,
Number: '',
Cost: '',
Price: '',
Type: 2, //1-成人2-儿童3-婴儿
allCost: '',
cAllCost: '',
profit: ''
},
{
ID:0,
Number:'',
Cost:'',
Price:'',
Type:3, //1-成人2-儿童3-婴儿
allCost:'',
cAllCost:'',
profit:''
ID: 0,
Number: '',
Cost: '',
Price: '',
Type: 3, //1-成人2-儿童3-婴儿
allCost: '',
cAllCost: '',
profit: ''
}
],
Term:'',
FlightList:[
{
ID:0,
AirlineId:'-1',
FlightNo:'',
Leg:'',
airlineList:this.addMsg.FlightList[0].airlineList,
AirportNameList:[]
}
],
}
this.cCostPrice=0;
this.cUnitPrice=0;
this.eCostPrice=0;
this.eUnitPrice=0;
this.yCostPrice=0;
this.yUnitPrice=0;
Term: '',
FlightList: [{
ID: 0,
AirlineId: '-1',
FlightNo: '',
Leg: '',
airlineList: this.addMsg.FlightList[0].airlineList,
AirportNameList: []
}],
}
this.cCostPrice = 0;
this.cUnitPrice = 0;
this.eCostPrice = 0;
this.eUnitPrice = 0;
this.yCostPrice = 0;
this.yUnitPrice = 0;
this.addMsg = newMsg;
this.$forceUpdate();
},
submitForm(addMsg) {//提交创建、修改表单
submitForm(addMsg) { //提交创建、修改表单
this.$refs[addMsg].validate((valid) => {
if (valid) {
this.Domestic_Ticket_post_Set()
......@@ -865,22 +842,22 @@ export default {
}
});
},
resetPageIndex() {//查询初始化页码
resetPageIndex() { //查询初始化页码
this.msg.pageIndex = 1;
this.currentPage = 1
},
handleCurrentChange(val) {//翻页功能按钮
handleCurrentChange(val) { //翻页功能按钮
this.msg.pageIndex = val;
this.getList();
},
tips(msg,type) {
tips(msg, type) {
this.$message({
message: msg,
duration:2000,
duration: 2000,
type: type
});
},
closeChangeMachie(done){
closeChangeMachie(done) {
done();
this.resetForm('addMsg');
},
......@@ -889,7 +866,5 @@ export default {
this.$refs[formName].resetFields();
},
}
}
}
</script>
\ No newline at end of file
......@@ -75,7 +75,7 @@
<th>操作人</th>
<th>操作</th>
</tr>
<tr v-for="(item,index) in dataList">
<tr v-for="(item,index) in dataList" :key="index">
<td>{{item.IsInter==0?"国内机票":"国际机票"}}</td>
<td>{{item.Term}}</td>
<td>¥{{item.Money}}</td>
......@@ -91,7 +91,6 @@
<span>{{item.PayMoney}}</span>
</td>
<td :class="Math.abs(item.Money-item.InCome)>0?'_color_red':''">
<!-- ¥{{Math.abs(item.Money-item.InCome)}} -->
<span v-if="item.Money > item.InCome">{{(item.Money- item.InCome).toFixed(2)}}</span>
<span v-else>0</span>
</td>
......
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