Commit 4588089a authored by 黄奎's avatar 黄奎

新增,新页面打开方法

parent c73080f9
......@@ -2,30 +2,24 @@
</style>
<template>
<div>
<div>
<div style="border: none; display: flex; margin-bottom: 20px">
<ul style="overflow: initial!important;display: flex; width: 100%">
<li style="display: flex">
<span style="width: 60px; line-height: 34px">
<em>{{$t('salesModule.keyWords')}}</em>
</span>
<el-input v-model="qMsg.CustomerName" :placeholder="$t('salesModule.InputPhone')"></el-input>
<el-input v-model="qMsg.CustomerName" :placeholder="$t('salesModule.InputPhone')"
@keyup.native="reSearchPage()"></el-input>
</li>
<li>
<input
type="button"
class="hollowFixedBtn"
:value="$t('pub.searchBtn')"
@click="resetPageIndex(),getCustomerList()"
>
<input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')" @click="reSearchPage()">
</li>
<li>
<el-button style="margin-left:10px;" size="small " type="primary" @click="sureData" round>确认选择</el-button>
</li>
</ul>
</div>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>选择同行</span>
<el-button style="float: right; padding: 3px 0" type="text" @click="sureData">确认选择</el-button>
</div>
<div class="chooseCustomerInfo">
<el-table :data="dataList" style="width:100%" border v-loading='loading'
@selection-change="handleSelectionChange">
......@@ -56,7 +50,7 @@
layout="total,prev, pager, next, jumper" :page-size="qMsg.pageSize" :total="qMsg.total">
</el-pagination>
</div>
</el-card></div>
</div>
</template>
<script>
export default {
......@@ -95,7 +89,10 @@
this.qMsg.pageIndex = val;
this.getCustomerList();
},
resetPageIndex() {this.qMsg.pageIndex = 1;},
reSearchPage() {
this.qMsg.pageIndex = 1;
this.getCustomerList();
},
// 获取合作伙伴列表
getCustomerList() {
this.loading = true;
......@@ -116,7 +113,6 @@
}
);
},
},
};
......
......@@ -200,7 +200,7 @@
<el-row>
<el-col :span="24">
<el-form-item label="业务名称" prop="GTeamName">
<el-input v-model="editForm.GTeamName"></el-input>
<el-input v-model="editForm.GTeamName" maxlength="300"></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -213,7 +213,7 @@
<el-col :span="12">
<!--添加修改航班-->
<ul class="_add_hangban clearfix">
<li :class="addMsg.TicketType == 1 ? '_allWidth' : ''">
<li>
<span class="_add_go_label">{{ $t("Airticket.Air_go") }}</span>
<div class="_add_go" v-for="(item, index) in addMsg.flightList" :key="index">
<template v-if="item.TicketType == 1">
......@@ -249,7 +249,7 @@
<p>
<span>{{ $t("pub.addBtn") }}</span>
<span class="_add_btn" @click="addFlight()">{{
$t("pub.sureBtn")
$t("pub.saveBtn")
}}</span>
</p>
<span class="_add_hbh">
......@@ -321,7 +321,7 @@
<p>
<span>{{ $t("pub.addBtn") }}</span>
<span class="_add_btn" @click="addFlightReturn()">{{
$t("pub.sureBtn")
$t("pub.saveBtn")
}}</span>
</p>
<span class="_add_hbh">
......@@ -442,7 +442,8 @@
<el-col :span="24">
<el-form-item label="合作伙伴">
<template v-for="(subItem,subIndex) in friendList">
<el-tag :key="subIndex+10000" style="margin-right:10px;" closable @close="deleteCustomer(subIndex)">
<el-tag :key="subIndex+10000" style="margin-right:10px;" closable
@close="deleteCustomer(subItem,subIndex)">
{{subItem.CustomerName}}</el-tag>
</template>
<el-button @click="showCustomer">选择</el-button>
......@@ -476,11 +477,18 @@
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-col :span="8">
&nbsp;
</el-col>
<el-col :span="8">
<el-button @click="closeForm()">关闭</el-button>&nbsp;
<el-button @click="submit" type="primary" :loading="saveLoading">
保存
</el-button>
</el-col>
<el-col :span="8">
&nbsp;
</el-col>
</el-row>
</div>
</el-form>
......@@ -538,12 +546,11 @@
friendList: [],
//新增修改航班信息
addMsg: {
TicketType: 2,
flightList: [],
},
AirportNameList: [],
BackAirportNameList: [],
airlineList: [],
AirportNameList: [], //去程航班列表
BackAirportNameList: [], //回程航班列表
airlineList: [], //航空公司列表
editForm: {
GTeamName: "", // 业务名称
StartDate: "", // 出发时间
......@@ -596,7 +603,6 @@
};
},
created() {
this.customers = []
this.initAirlines();
},
mounted() {
......@@ -605,9 +611,33 @@
}
},
methods: {
closeForm() {
//关闭弹窗并刷新页面
this.$emit("success");
},
//删除客户
deleteCustomer(index) {
this.friendList.splice(index, 1);
deleteCustomer(item, index) {
var that = this;
var tipMsg = "确认要删除此合作伙伴?"
that.Confirm(tipMsg, function () {
if (item.TPartnerId && item.TPartnerId > 0) {
that.apipost(
"travelteam_DeleteTravelTeamPartner", {
TPartnerId: item.TPartnerId
},
(res) => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
} else {
that.Error(res.data.message);
}
}
);
} else {
that.Success("删除合作伙伴成功!");
}
that.friendList.splice(index, 1);
})
},
//显示客户
showCustomer() {
......@@ -617,10 +647,14 @@
refreshPage(selectArray) {
if (selectArray && selectArray.length > 0) {
selectArray.forEach(item => {
this.friendList.push({
CustomerId: item.CustomerId,
CustomerName: item.CustomerName
})
let existsObj = this.friendList.find(qitem => qitem.CustomerId == item.CustomerId);
//不存在就添加
if (!existsObj) {
this.friendList.push({
CustomerId: item.CustomerId,
CustomerName: item.CustomerName
})
}
});
}
this.isShowCustomerDialog = false;
......@@ -633,21 +667,16 @@
},
(res) => {
if (res.data.resultCode == 1) {
this.editForm = res.data.data;
const {
TravelTeamFlightList,
TravelTeamPartnerList
} =
res.data.data;
TravelTeamFlightList.forEach((item) => {
item.IsTransfer = item.IsTransfer || 0;
item.TicketType = Math.random() > 0.5 ? 1 : 2;
});
this.addMsg.flightList = TravelTeamFlightList;
console.log("this.addMsg",this.addMsg);
this.friendList = TravelTeamPartnerList;
var tempObj = res.data.data;
this.editForm = tempObj;
if (tempObj.TravelTeamFlightList && tempObj.TravelTeamFlightList.length > 0) {
this.addMsg.flightList = tempObj.TravelTeamFlightList;
}
if (tempObj.TravelTeamPartnerList && tempObj.TravelTeamPartnerList.length > 0) {
this.friendList = tempObj.TravelTeamPartnerList;
}
} else {
this.$message.error(res.data.message);
this.Error(res.data.message);
}
}
);
......@@ -703,6 +732,7 @@
newList.TicketDepartureTime = x.DepartureTime;
newList.TicketArrivalTime = x.ArrivalTime;
newList.ID = this.addGoFlight.ID;
newList.TicketType = 1;
this.addMsg.flightList.push(newList);
}
});
......@@ -727,6 +757,7 @@
newList.TicketDepartureTime = x.DepartureTime;
newList.TicketArrivalTime = x.ArrivalTime;
newList.ID = this.returnTripData.ID;
newList.TicketType = 2;
this.addMsg.flightList.push(newList);
}
});
......
......@@ -128,16 +128,11 @@
<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown" class="travelControlDropDown">
<el-dropdown-item>
财务入账
<el-dropdown-item @click.native="goToOrderList(item)">
报名清单
</el-dropdown-item>
<el-dropdown-item>
财务审核
</el-dropdown-item>
<el-dropdown-item>
包机结算
</el-dropdown-item>
<el-dropdown-item>
<el-dropdown-item @click.native="DeleteTravelTeam(item)">
删除
</el-dropdown-item>
</el-dropdown-menu>
......@@ -157,7 +152,7 @@
</div>
</div>
<el-dialog class="app-attachment-dialog" width="900" :title="dialogTitle" :visible.sync="isShowEditTeamDialog"
:close-on-click-modal="false" >
:close-on-click-modal="false">
<editTeamInfo v-if="isShowEditTeamDialog" :Q_GTeamId="GTeamId" @success="refreshPage"></editTeamInfo>
</el-dialog>
</div>
......@@ -226,7 +221,26 @@
},
},
methods: {
//删除包机团
DeleteTravelTeam(item) {
var that = this;
var tipMsg = "确认要删除【" + item.GTeamName + "】包机团?"
that.Confirm(tipMsg, function () {
that.apipost(
"travelteam_DelTeavelTeam", {
GTeamId: item.GTeamId
},
(res) => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.refreshPage();
} else {
that.Error(res.data.message);
}
}
);
})
},
//新增修改包机团
editTeam(item) {
if (item) {
......@@ -292,6 +306,12 @@
}
);
},
//跳转到报名清单
goToOrderList(item) {
this.OpenNewPage('/RegistrationList', {
id: item.TCID
});
}
},
mounted() {
this.getTravelTeamList();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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