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