Commit 2a553c79 authored by 华国豪's avatar 华国豪 🙄

新增地接op分房

parent 0c623ea4
......@@ -1271,7 +1271,9 @@ export default {
this.detailList.CostTypeId = this.orderObj.CostType?this.orderObj.CostType: '';
this.detailList.UnitPrice = this.orderObj.Money?this.orderObj.Money:0;
this.detailList.Number = this.orderObj.CostType ? 1 : 0
this.Description = this.orderObj.laRemark?this.orderObj.laRemark:'';
if (!JSON.parse(sessionStorage.getItem("saveGuestInfo"))){
this.Description = this.orderObj.laRemark?this.orderObj.laRemark:'';
}
}
if(data.VorcherInos){
data.VorcherInos.forEach(x=>{
......@@ -1370,7 +1372,7 @@ export default {
})
})
this.companyList = data;
this.companyList = data;
}
}
console.log('this.companyList', this.companyList)
......
......@@ -1394,7 +1394,9 @@ export default {
this.msg.Obj = this.orderObj.Obj?this.orderObj.Obj:'';
this.msg.SourceID = this.orderObj.SourceID?this.orderObj.SourceID:0;
this.msg.CallType=this.orderObj.CallType?this.orderObj.CallType:0;
this.Description = this.orderObj.laRemark?this.orderObj.laRemark:'';
if (!JSON.parse(sessionStorage.getItem("saveGuestInfo"))){
this.Description = this.orderObj.laRemark?this.orderObj.laRemark:'';
}
}
if(data.VorcherInos){
data.VorcherInos.forEach(x=>{
......
......@@ -15,11 +15,17 @@
:texts="texts"
show-text>
</el-rate>
<template v-else-if="item.SurveyType === 2">
<el-radio v-for="(r, i) in item.SurveyOptionsList" v-model="item.lable" :label="r.ID" disabled="disabled" :key="i">{{r.OptionsName}}</el-radio>
<template v-else-if="item.SurveyType === 2">
<template v-for="(r, i) in item.SurveyOptionsList" v-if="r.IsCheck!=='0'">
<span>{{r.OptionsName}}</span>
</template>
<!-- <el-radio v-for="(r, i) in item.SurveyOptionsList" v-model="item.lable" :label="r.ID" disabled="disabled" :key="i"></el-radio> -->
</template>
<template v-else-if="item.SurveyType === 3">
<el-checkbox v-for="(r, i) in item.SurveyOptionsList" v-model="item.ckeckList" :label="r.ID" disabled="disabled" :key="i">{{r.OptionsName}}</el-checkbox >
<template v-for="(r, i) in item.SurveyOptionsList" v-if="r.IsCheck!=='0'">
<span>{{r.OptionsName}}</span>
</template>
<!-- <el-checkbox v-for="(r, i) in item.SurveyOptionsList" v-model="item.ckeckList" :label="r.ID" disabled="disabled" :key="i">{{r.OptionsName}}</el-checkbox > -->
</template>
<template v-else-if="item.SurveyType === 4">
<span>{{item.TextContent}}</span>
......
<style>
.PassengerList2 .PT_teamTable.PT_teamTable {
width: 500px;
border-collapse: collapse;
}
.PT_teamTable td,
.PT_teamTable th {
border: 1px solid #dcdcdc;
padding: 5px;
height: 30px;
}
.PT_teamTable tr th {
background: #eee;
height: 30px;
border: 1px solid #dcdcdc;
}
.PT_teamTable tr td{background: #fff;}
.travelpassengerlist{font-size: 12px; background: #dcdcdc;}
.travelpassengerlist tr th {
height: 30px;
}
.travelpassengerlist tr td{background: #fff; text-align: center;}
/*拒签人员*/
.travelpassengerlist .redTr td{
color: #E95252;
}
.leader2Btn {
color: #fff;
padding: 0 15px;
height: 30px;
background: #e95252;
border: 1px solid #e95252;
cursor: pointer;
border-radius: 15px;
}
.PassengerList2 input.houseno{
border: none;
border-bottom: 1px solid #dcdcdc;
transition: all linear .5s;
}
.PassengerList2 input.houseno:focus{
border-bottom: 1px solid #e95252;
}
</style>
<template>
<div class="flexOne PassengerList PassengerList2">
<div class="query-box">
<ul>
<li>
<table class="PT_teamTable">
<tr>
<th width="140">团号</th>
<th>团名</th>
<th width="60">人数</th>
<th width="120">出发日期</th>
</tr>
<tr v-for="item in QueryMsg.TeamInfoData">
<td><a @click="goUrlTravelControl('团控列表','TravelControlList',item.TCID,item.TCNUM)" style="cursor:pointer;color:blue;">{{item.TCNUM}}</a></td>
<td>{{item.Title}}</td>
<td>{{item.Inventory}}</td>
<td>{{item.StartDate}} {{item.WeekStr}}</td>
</tr>
</table>
</li>
<li>
<input type="button" class="normalBtn" value="导出报表" @click="exportExcel()">
</li>
</ul>
</div>
<table
style="margin-bottom: 50px;"
class="travelpassengerlist"
border="0"
cellspacing="1"
cellpadding="0"
v-loading="QueryMsg.loading"
>
<tr>
<th width="50">房间数</th>
<th width="50">房号</th>
<th width="130">酒店及房型</th>
<th width="130">旅客姓名</th>
<th width="110">英文姓</th>
<th width="145">英文名</th>
<th width="45">性别</th>
<th width="155">出生日期</th>
<th width="120">年龄类型</th>
<th width="80">出生地</th>
<th width="155">护照号</th>
<th width="80">签发地</th>
<th width="155">签发日期</th>
<th width="155">护照有效期</th>
<th width="175">客户手机</th>
<th width="240">身份证</th>
<th width="100">单价</th>
<th width="180">业务员</th>
<th width="60">方式</th>
<th width="100">舱位</th>
<th width="120">签证类型</th>
</tr>
<tr>
<td v-show="QueryMsg.dataList.Length==0" colspan="22" align="center">暂无数据</td>
</tr>
<!-- <template v-for="(item, index) in QueryMsg.dataList"> -->
<tr v-for="(subItem, subIndex) in dataList" :class="{'redTr':subItem.VisaState==1}">
<td>{{subIndex+1}}</td>
<td width="80">
<el-select v-model="subItem.HouseNo" placeholder="请选择" @change="sortNumberN(subItem, subIndex)">
<el-option
:disabled="subItem.SingleRoomType!=subItem.HouseType"
v-for="(hs, hsIndex) in numberList"
:key="hs"
:label="hs"
:value="hs">
</el-option>
</el-select>
</td>
<td>
<el-select v-model="subItem.HouseType" placeholder="请选择" @change="changeRmType(subItem, subIndex)">
<el-option
:disabled="subItem.SingleRoomType!=subItem.HouseType"
v-for="(hs, hsIndex) in HouseTypeList"
:key="hsIndex"
:label="hs.HouseName"
:value="hs.HouseType">
</el-option>
</el-select>
</td>
<td>{{subItem.GuestName}}</td>
<td>{{subItem.ESurName}}</td>
<td>{{subItem.EName}}</td>
<td>{{getSexStr(subItem)}}</td>
<td>{{subItem.Birthday}}</td>
<td>{{subItem.PeopleType}}</td>
<td>{{subItem.BirthdayAddress}}</td>
<td>{{subItem.PassportNo}}</td>
<td>{{subItem.PassportAddress}}</td>
<td>{{subItem.PassportIssued}}</td>
<td>{{subItem.PassportExpiry}}</td>
<td>{{subItem.MobilePhone}}</td>
<td>{{subItem.IdCard}}</td>
<td>{{subItem.UnitPrice}}</td>
<td>{{subItem.CreateByStr}}</td>
<td>{{subItem.GroupTypeStr}}</td>
<td align="center">经济舱
<br>(Y)
</td>
<td>{{subItem.VisaTypeStr}} {{subItem.VisaTypeStr==1?'拒签':"正常"}}</td>
</tr>
<!-- </template> -->
<tr>
<td style="text-align:right" colspan="22"><input type="button" value="保存" class="leader2Btn" @click="saveOPSetGuestHouse"></td>
</tr>
</table>
</div>
</template>
<script>
export default {
data() {
return {
//请求数据
msg: {
PageIndex: 1,
PageSize: 100,
TCID: 0,
OrderId: 0,
currentPage: 1
},
IsHaveLeader:1,//1-有领队,0-无领队
IsLeaderGuide:0,//1-领兼导,0-领队
TCID: 0,
QueryMsg: {
loading: true,
//返回数据
dataList: [],
TCID: 0,
OrderId: 0,
//团期数据
TeamInfoData: []
},
houseList: [],
HouseTypeList: [],
numberList: [],
dataList: [],
};
},
methods: {
// 修改类型
changeRmType: function (obj, index){
let list = this.dataList;
for(let i = 0; i < list.length; i++) {
if (obj.HouseNo === list[i].HouseNo) {
list[i].HouseType = obj.HouseType
list[i].SingleRoomType = obj.HouseType
}
}
list = list.sort(this.compare)
this.dataList = list;
},
compare:function (obj1, obj2) {
var val1 = Number(obj1.HouseNo);
var val2 = Number(obj2.HouseNo);
if (val1 < val2) {
return -1;
} else if (val1 > val2) {
return 1;
} else {
return 0;
}
},
// 修改房号
sortNumberN: function (obj, index){
let list = this.dataList;
// 选择房号后循环数据把房号相同的数据房型修改成一样的
for(let i = 0 ; i < list.length; i++) {
if (obj.HouseNo === list[i].HouseNo && obj.Id !== list[i].Id) {
obj.HouseType = list[i].HouseType
list[index].SingleRoomType = list[i].HouseType
}
}
list = list.sort(this.compare)
this.dataList = list;
},
//保存分房
saveOPSetGuestHouse: function (){
this.apipost(
"travel_get_OPSetGuestHouse",
this.dataList,
res => {
if (res.data.resultCode == 1) {
this.$message.success('操作成功')
this.getList()
}else{
this.$message.error('操作失败')
}
},
err => {}
);
},
goUrlTravelControl(name, path, id, tcmun) {
this.$router.push({
name: path,
query: {
id: id,
tcmun: tcmun,
blank: "y",
tab: name
}
});
},
//获取性别字符串
getSexStr(item) {
var str = "";
if (item.Sex == 1) {
str = "男";
} else {
str = "女";
}
return str;
},
//获取房间类型
getHouseTypeStr(HouseType) {
var str = "";
if (HouseType == 1) {
str = "自然单间";
} else if (HouseType == 2) {
str = "标准双人间";
} else if (HouseType == 3) {
str = "大床房";
}
else if (HouseType == 4) {
str = "三人间";
}
else if (HouseType== 5) {
str = "拼凑双人间";
}
else {
str = "未分配";
}
return str;
},
getHouseTypeList: function (){
this.apipost(
"travel_get_GetHouseType",
this.msg,
res => {
this.QueryMsg.loading = false;
if (res.data.resultCode == 1) {
this.HouseTypeList = res.data.data;
}
},
err => {}
);
},
setDataList: function (list){
var Diningmap = {},
Diningdest = [];
for(var i = 0; i < list.length; i++){
var ai = list[i];
if(!Diningmap[ai.HouseNo]){
Diningdest.push({
HouseType: ai.HouseType,
HouseNo: ai.HouseNo,
data: [ai]
});
Diningmap[ai.HouseNo] = ai;
}else{
for(var j = 0; j < Diningdest.length; j++){
var dj = Diningdest[j];
if(dj.HouseType == ai.HouseType && dj.HouseNo == ai.HouseNo){
dj.data.push(ai);
break;
}
}
}
}
this.QueryMsg.dataList = Diningdest;
},
//获取数据
getList() {
this.QueryMsg.loading = true;
this.apipost(
"travel_get_GetTravelGuestPageList_V2",
this.msg,
res => {
this.QueryMsg.loading = false;
if (res.data.resultCode == 1) {
let list = res.data.data.pageData.result;
this.dataList = list
// this.setDataList(list)
this.IsHaveLeader=res.data.data.pageData.IsHaveLeader;
this.IsLeaderGuide=res.data.data.pageData.IsLeaderGuide;
this.houseList = res.data.data.pageData.houseList;
}
},
err => {}
);
},
exportExcel() {
//导出报表
let msg = {
TCID: this.msg.TCID
};
var fileName = "旅客名单.xls";
if (this.QueryMsg.TeamInfoData != null) {
fileName =
"【" + this.QueryMsg.TeamInfoData[0].TCNUM + "】旅客名单.xls";
}
this.GetLocalFile("travel_get_GetTravelGuestExport", msg, fileName);
},
//获取团期信息
getTeamInfo() {
var qmsg = {
TCID: this.TCID
};
this.apipost(
"travel_get_GetTravelPriceReportInfo",
qmsg,
res => {
if (res.data.resultCode == 1) {
this.QueryMsg.TeamInfoData = res.data.data;
}
},
err => {}
);
}
},
mounted() {
let numberList = []
for(let i = 0; i < 99; i++) {
numberList.push(`${i+1}`)
}
this.numberList = numberList
this.TCID = this.$route.query.id;
this.msg.TCID = this.TCID;
this.msg.OrderId = this.$route.query.OrderId;
this.getTeamInfo();
this.getList();
this.getHouseTypeList();
}
};
</script>
\ No newline at end of file
......@@ -271,7 +271,7 @@
</div>
</td>
<td>
<div class="fz16 fbold linkspan" @click="goUrlT('TravelPassengerList',item.TCID,'旅客名单')">
<div class="fz16 fbold linkspan" @click="goUrlT('TravelPassengerList2',item.TCID,'旅客名单')">
<span style="color: #4BCA81;" v-if="item.HouseResult==1"></span>
<span class="colorE95252" v-else>{{item.HouseResult=='-1'?"x":"O"}}</span>
</div>
......
......@@ -980,54 +980,49 @@ export default {
return
}
// type 1 零件地 自动生成 2 领队人头费 跳转
let BType = 3,
AccountId = 1,
IsRelevanceTravel = 1,
TemplateId = 71,
RB_Branch_Id = userinfo.RB_Branch_id,
OrderSource = 6;
if (obj.Type == 2) {
let id = [72, 73];
let TCIDARR = [obj.TCIDs];
let orderObj = {
OrderID: 0,
OrderSource: 6,
Obj: {},
SourceID: 0,
CostType: 180,
TCIDList: TCIDARR,
Money: inputPrice,
TCNUMS: ''
};
let fullPath = `/ChoiceAddFinancialDocuments?Type=${1}&templateID=${JSON.stringify(id)}&companyID=${userinfo.RB_Branch_id}&orderObj=${JSON.stringify(orderObj)}&blank=y&tab=领队报账`;
let dom = document.querySelector("#blankLink");
dom.href = `http://${window.location.host}/#${fullPath}`;
dom.click();
} else {
// 自动生成
let msg = {
TemplateId: 71,
RB_Branch_Id: userinfo.RB_Branch_id,
IsPublic: 0,
BType: 4,
AccountId: 14,
CostTypeID: 180,
WBMoney: obj.price,
Remark: "",
TCID: obj.TCIDs,
IsRelevanceTravel: 1,
OrderID: 0,
vorcherInos: [{FrIdStr:''}],
Description: "",
RemitterName: obj.LeaderOrGuidName,
TradeDate: new Date().Format("yyyy-MM-dd"),
OrderSource: 6,
}
this.apipost('Financial_post_SetFinanceInfoCommonForIn', msg, res=>{
if (res.data.resultCode == 1) {
obj.FrId.push(res.data.data)
this.listCost[index] = obj
this.$forceUpdate()
this.$message.success("制单成功")
} else {
this.$message.error(res.data.message)
}
}, null)
BType = 1;
AccountId = 7;
IsRelevanceTravel = 0;
TemplateId = obj.OutBranchId === 0 ? 72 : 73;
RB_Branch_Id = obj.OutBranchId;
OrderSource = 8;
}
// 自动生成
let msg = {
TemplateId: 71,
RB_Branch_Id: RB_Branch_Id,
IsPublic: 0,
BType: BType,
AccountId: AccountId,
CostTypeID: 180,
WBMoney: obj.price,
Remark: "",
TCID: obj.TCIDs,
IsRelevanceTravel: IsRelevanceTravel,
OrderID: 0,
vorcherInos: [{FrIdStr:''}],
Description: "",
RemitterName: obj.LeaderOrGuidName,
TradeDate: new Date().Format("yyyy-MM-dd"),
OrderSource: OrderSource,
}
this.apipost('Financial_post_SetFinanceInfoCommonForIn', msg, res=>{
if (res.data.resultCode == 1) {
obj.FrId.push(res.data.data)
this.listCost[index] = obj
this.$forceUpdate()
this.$message.success("制单成功")
} else {
this.$message.error(res.data.message)
}
}, null)
},
goZhiDan: function(obj) {
let id = [59];
......@@ -1277,7 +1272,7 @@ export default {
DiningID: ai.DiningID,
data: [ai]
});
Diningmap[ai.PlanDateStr] = ai;
Diningmap[ai.UseTimeStr] = ai;
}else{
for(var j = 0; j < Diningdest.length; j++){
var dj = Diningdest[j];
......@@ -1306,7 +1301,7 @@ export default {
TicketID: ai.TicketID,
data: [ai]
});
Scenicmap[ai.PlanDateStr] = ai;
Scenicmap[ai.UseTimeStr] = ai;
}else{
for(var j = 0; j < Scenicdest.length; j++){
var dj = Scenicdest[j];
......
......@@ -1816,6 +1816,14 @@ export default {
title: '旅客名单'
},
},
{
path: '/TravelPassengerList2', //旅客名单
name: 'TravelPassengerList2',
component: resolve => require(['@/components/TravelManager/TravelList/TravelPassengerList2'], resolve),
meta: {
title: '旅客名单'
},
},
{
path: '/RegistrationList',
name: 'RegistrationList',
......
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