Commit 8b181f14 authored by 黄奎's avatar 黄奎

新增酒店房型维护

parent 470f560a
...@@ -31,8 +31,6 @@ ...@@ -31,8 +31,6 @@
</span> </span>
</li> </li>
<li><span><em>{{$t('sm.Date')}}</em> <li><span><em>{{$t('sm.Date')}}</em>
<!-- <el-date-picker v-model='msg.StartDate' class='w135' value-format="yyyy-MM-dd" type="date"
:picker-options="pickerBeginDateBefore"></el-date-picker> -->
<DateLimit :clearable="false" :StartGroupDate="msg.StartDate" :EndGroupDate="msg.EndDate" <DateLimit :clearable="false" :StartGroupDate="msg.StartDate" :EndGroupDate="msg.EndDate"
@change="(date)=> msg.StartDate = date"></DateLimit> @change="(date)=> msg.StartDate = date"></DateLimit>
- -
...@@ -40,14 +38,13 @@ ...@@ -40,14 +38,13 @@
:picker-options="pickerBeginDateAfter"></el-date-picker> :picker-options="pickerBeginDateAfter"></el-date-picker>
</span> </span>
</li> </li>
<li> <li>
<span> <span>
<em>{{$t('salesModule.DJNum')}}</em> <em>{{$t('salesModule.DJNum')}}</em>
<el-input v-model='msg.CombinationNum'></el-input> <el-input v-model='msg.CombinationNum'></el-input>
</span> </span>
</li> </li>
<li> <!-- <li>
<span> <span>
<em>{{$t('hotel.hotel')}}</em> <em>{{$t('hotel.hotel')}}</em>
<el-select v-model="msg.HotelId" :placeholder="$t('pub.pleaseSel')" filterable> <el-select v-model="msg.HotelId" :placeholder="$t('pub.pleaseSel')" filterable>
...@@ -55,7 +52,7 @@ ...@@ -55,7 +52,7 @@
<el-option v-for="item in HotelList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option> <el-option v-for="item in HotelList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select> </el-select>
</span> </span>
</li> </li> -->
<li> <li>
<span> <span>
<em>{{$t('scen.sc_cp')}}</em> <em>{{$t('scen.sc_cp')}}</em>
...@@ -74,80 +71,98 @@ ...@@ -74,80 +71,98 @@
</div> </div>
<div style="width: 100%; overflow-x: auto;padding-bottom: 10px; " class="ownScrollbarStyle"> <div style="width: 100%; overflow-x: auto;padding-bottom: 10px; " class="ownScrollbarStyle">
<div style="font-size:12px;padding:2px 4px 3px 4px; color:red">{{$t('ground.zymcdcsjbcgygy')}}</div> <div style="font-size:12px;padding:2px 4px 3px 4px; color:red">{{$t('ground.zymcdcsjbcgygy')}}</div>
<table border="0" cellspacing="1" cellpadding="0" class="roomQueryTalbe" v-loading='loading'> <!-- 使用 el-table 替换原生 table,设置 height 实现固定表头 -->
<tr> <el-table :data="flattenedRows" v-loading="loading" stripe border :height="tableHeight"
<th width="120">{{$t('active.ad_xuhao')}}</th> :span-method="tableSpanMethod" style="width: 100%; font-size:12px;" :row-key="rowKey">
<el-table-column :label="$t('active.ad_xuhao')" prop="DMCNum" width="120">
<template #default="{row}">
<span v-if="row.isFirst">{{row.parent.DMCNum}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('salesModule.CompanyNum')" prop="TCNUM" width="100">
<template #default="{row}">
<div v-if="row.isFirst" class="w120 link">
<p @click="goUrlT('productQuery', row.parent.TCNUM, '产品查询')">{{row.parent.TCNUM}}</p>
</div>
</template>
</el-table-column>
<el-table-column label="出团公司" prop="OutBranchName" width="100">
<template #default="{row}">
<span v-if="row.isFirst">{{row.parent.OutBranchName}}</span>
</template>
</el-table-column>
<th width="80">{{$t('salesModule.CompanyNum')}}</th> <el-table-column :label="$t('leader.leader_Leader')" prop="LeaderName" width="100">
<template #default="{row}">
<span v-if="row.isFirst">{{row.parent.LeaderName}}</span>
</template>
</el-table-column>
<th width="100">{{$t('leader.leader_Leader')}}</th> <el-table-column :label="$t('leader.leader_Guide')" prop="GuideName" width="100">
<th width="100">{{$t('leader.leader_Guide')}}</th> <template #default="{row}">
<th width="100">{{$t('advmanager.v_xilie')}}</th> <span v-if="row.isFirst">{{row.parent.GuideName}}</span>
<th width="80">{{$t('ground.jiweishu')}}<br />(Y/E/F)</th> </template>
<th width="100">{{$t('ground.shuyongsj')}}</th> </el-table-column>
<th width="120">{{$t('hotel.hotel_name')}}</th>
<th width="120">{{$t('ground.genghuanjiudian')}}</th>
<th width="100">{{$t('salesModule.OPstatus')}}</th>
<th width="100">{{$t('salesModule.DJstatus')}}</th>
</tr>
<tr v-if="dataList.length==0">
<td colspan="13">{{$t('active.ld_noData')}}</td>
</tr>
<template v-for="(item,index) in dataList">
<tbody :class="{roomQuerySplitTrCss:index%2!=0}" :key="`ht_`+index">
<template v-for="(subItem,subIndex) in item.OrderDetailsList">
<tr :key="`h_`+index+`d_`+subIndex">
<td :rowspan="5" v-if='subIndex==0'>
{{item.DMCNum}}
</td>
<td :rowspan="5" v-if='subIndex==0'>
<div class="w120 link">
<p @click="goUrlT('productQuery',item.TCNUM,'产品查询')">{{item.TCNUM}}</p>
</div>
</td>
<td :rowspan="5" v-if='subIndex==0'>
{{item.LeaderName}}
</td>
<td :rowspan="5" v-if='subIndex==0'>
{{item.GuideName}}
</td>
<td :rowspan="5" v-if='subIndex==0'>
{{item.LtName}}
</td>
<td :rowspan="5" v-if='subIndex==0 '>
<p @click="goUrlT('RegistrationList',item.TCID,'报名清单')">
{{item.TotalSeat}}/{{item.YSeatNum}}/{{item.ESeatNum}}/{{item.FSeatNum}}
</p>
</td>
<td :rowspan="5" v-if='subIndex==0'>
{{item.UseDay}}
</td>
<td style="text-align:left;padding-left:2px;" :rowspan="5" v-if='subIndex==0'>
<template v-if="item.OldHotelName!=item.NewHotelName && item.NewHotelName!=''">
<span style="text-decoration:line-through"> {{item.OldHotelName}}</span>
</template>
<template v-else>
{{item.OldHotelName}}
</template>
</td>
<td style="text-align:left;padding-left:2px;" :rowspan="5" v-if='subIndex==0'>
<template v-if="item.OldHotelName!=item.NewHotelName">
<span style="color:red;">{{item.NewHotelName}}</span>
</template>
</td>
<td> <el-table-column :label="$t('advmanager.v_xilie')" prop="LtName" width="150">
{{getHouseTypeName(subItem)}} <template #default="{row}">
<span v-if="row.isFirst">{{row.parent.LtName}}</span>
</template>
</el-table-column>
</td> <el-table-column :label="$t('ground.jiweishu')+'/(不占床)' " prop="seat" width="120">
<template #default="{row}">
<span v-if="row.isFirst">
<p @click="goUrlT('RegistrationList', row.parent.TCID, '报名清单')">
{{row.parent.TotalSeat}}/{{row.parent.NoBedNum}}</p>
</span>
</template>
</el-table-column>
<el-table-column :label="$t('ground.shuyongsj')" prop="UseTime" width="100">
<template #default="{row}">
<span v-if="row.isFirst">{{row.parent.UseTime}}</span>
</template>
</el-table-column>
</tr> <el-table-column :label="$t('hotel.hotel_name')" prop="NewHotelName" width="200">
<template #default="{row}">
<div style="text-align:left;padding-left:6px;" v-if="row.isFirst">{{row.parent.NewHotelName}}</div>
</template>
</el-table-column>
<el-table-column :label="$t('ground.fangjianleixing')" prop="HouseTypeName" width="100">
<template #default="{row}">
{{getHouseTypeName(row.sub)}}
</template>
</el-table-column>
<el-table-column :label="$t('ground.yudingshu')" prop="HouseNum" width="100">
<template #default="{row}">
<template v-if="row.parent.IsEdit">
<el-input v-model="row.sub.HouseNum"></el-input>
</template>
<template v-else>
{{row.sub.HouseNum}}
</template> </template>
</tbody> </template>
</template> </el-table-column>
</table>
<el-table-column label="操作" prop="actions" width="200">
<template #default="{row}">
<div v-if="row.isFirst">
<el-link v-if="!row.parent.IsEdit" type="primary" @click="row.parent.IsEdit = true">修改</el-link>
<el-button type="text" v-if="row.parent.IsEdit" @click="saveBookNum(row.parent)" :loading="saveLoading">保存
</el-button>
<el-button type="text" style="color:red" v-if="row.parent.IsEdit" @click="row.parent.IsEdit = false">关闭
</el-button>
</div>
</template>
</el-table-column>
</el-table>
</div> </div>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage" <el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="total"></el-pagination> layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="total"></el-pagination>
...@@ -199,6 +214,7 @@ ...@@ -199,6 +214,7 @@
LineList: [], LineList: [],
LineTeamList: [], LineTeamList: [],
}, },
saveLoading: false,
pickerBeginDateBefore: { pickerBeginDateBefore: {
disabledDate: time => { disabledDate: time => {
if (this.msg.EndDate == null) { if (this.msg.EndDate == null) {
...@@ -214,21 +230,111 @@ ...@@ -214,21 +230,111 @@
let startTime = new Date(this.msg.StartDate) let startTime = new Date(this.msg.StartDate)
return startTime.getTime() >= time.getTime() return startTime.getTime() >= time.getTime()
} }
} },
tableHeight: 600,
} }
}, },
computed: {
flattenedRows() {
const rows = []
if (!this.dataList) return rows
this.dataList.forEach(parent => {
if (parent.OrderDetailsList && parent.OrderDetailsList.length) {
parent.OrderDetailsList.forEach((sub, idx) => {
// 直接用原始 sub,而不是 {...sub}
rows.push({
sub,
parent,
isFirst: idx === 0
})
})
} else {
rows.push({
parent,
isFirst: true
})
}
})
return rows
}
},
methods: { methods: {
rowKey(row) {
// 使用TCID 和 子项可能的 HouseType 或相对索引保证唯一
return (row.parent && row.parent.TCID ? row.parent.TCID : 'p') + row.ID + '_' + (row.HouseType || '0') + '_' + (
row
.HouseNum || '')
},
// 控制合并单元格:当为某父项的第一行时,把前几列合并到子项个数
tableSpanMethod({
row,
column,
rowIndex,
columnIndex
}) {
if (!row || !row.parent) return [1, 1];
const parent = row.parent;
const span = parent.OrderDetailsList ? parent.OrderDetailsList.length : 1;
// 需要合并的列(根据上面 el-table-column 的顺序):0..8 以及最后一列动作 (共 10 列)
// 我们只按列属性判断,合并那些基于父级显示的列
const mergeCols = ['DMCNum', 'TCNUM', 'OutBranchName', 'LeaderName', 'GuideName', 'LtName', 'seat', 'UseTime',
'NewHotelName', 'actions'
];
if (row.isFirst && mergeCols.includes(column.property)) {
return [span, 1];
}
if (!row.isFirst && mergeCols.includes(column.property)) {
return [0, 0];
}
return [1, 1];
},
//保存用房数
saveBookNum(item) {
console.log("item", item);
var sMsg = {
TCID: item.TCID,
OrderDetails: item.OrderDetailsList
};
this.saveLoading = true;
this.apipost('dmcstatistics_get_SetBatchHotelOrderService', sMsg, res => {
this.saveLoading = false;
if (res.data.resultCode == 1) {
this.getList();
this.Success(res.data.message);
} else {
this.Error(res.data.message);
}
}, err => {})
},
getHouseTypeName(subItem) { getHouseTypeName(subItem) {
console.log("subItem", subItem);
var roomName = ""; var roomName = "";
//单间
if (subItem.HouseType == 1) {
roomName = "SGL";
}
//标准间
else if (subItem.HouseType == 2) {
roomName = "TWN";
}
//大床
else if (subItem.HouseType == 3) {
roomName = "DBL";
}
//三人间
else if (subItem.HouseType == 4) {
roomName = "TRP";
}
//T/G
else if (subItem.HouseType == 5) {
roomName = "T/D";
}
return roomName; return roomName;
}, },
getLineList() { getLineList() {
this.apipost("line_post_GetAllList", {}, res => { this.apipost("line_post_GetAllList", {}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.queryCommonData.LineList = res.data.data; this.queryCommonData.LineList = res.data.data;
this.queryCommonData.LineTeamList = [] this.queryCommonData.LineTeamList = []
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
...@@ -240,7 +346,6 @@ ...@@ -240,7 +346,6 @@
this.msg.LineteamId = 0 this.msg.LineteamId = 0
let msg = { let msg = {
lineID: this.msg.LineId, lineID: this.msg.LineId,
placeID: this.msg.PlaceID,
isTOOP: 1 isTOOP: 1
} }
this.apipost('team_post_GetList', msg, res => { this.apipost('team_post_GetList', msg, res => {
...@@ -275,7 +380,11 @@ ...@@ -275,7 +380,11 @@
this.total = res.data.data.count; this.total = res.data.data.count;
var sourceData = res.data.data.pageData; var sourceData = res.data.data.pageData;
console.log("sourceData", sourceData); console.log("sourceData", sourceData);
if (sourceData && sourceData.length > 0) {
sourceData.forEach(sItem => {
sItem.IsEdit = false;
});
}
this.dataList = sourceData; this.dataList = sourceData;
} else { } else {
this.$message.error(res.data.message) this.$message.error(res.data.message)
...@@ -305,7 +414,7 @@ ...@@ -305,7 +414,7 @@
uid: this.userInfo.EmployeeId uid: this.userInfo.EmployeeId
}; };
let fileName = this.$t('ground.dingfangcx') + this.$commonUtils.getCurrentDate() + ".xls"; let fileName = this.$t('ground.dingfangcx') + this.$commonUtils.getCurrentDate() + ".xls";
this.GetLocalFile("hotel_get_downloadHotel", qMsg, fileName, this.GetLocalFile("hotel_get_downloadJapanHotelUse", qMsg, fileName,
res => { res => {
this.loading = false; this.loading = false;
}); });
...@@ -329,6 +438,10 @@ ...@@ -329,6 +438,10 @@
) )
}, },
}, },
created() {
this.getCompanyList();
this.getLineList();
},
mounted() { mounted() {
this.userInfo = this.getLocalStorage(); this.userInfo = this.getLocalStorage();
let myDate = new Date(); let myDate = new Date();
...@@ -351,10 +464,9 @@ ...@@ -351,10 +464,9 @@
} }
if (this.userInfo.RB_Group_id == 2) { if (this.userInfo.RB_Group_id == 2) {
this.msg.LineId = 14; this.msg.LineId = 14;
this.getLineTeamList();
} }
this.getLineList(); //this.GetHotelList();
this.getCompanyList();
this.GetHotelList();
this.getList(); this.getList();
}, },
} }
...@@ -386,77 +498,9 @@ ...@@ -386,77 +498,9 @@
font-size: 12px; font-size: 12px;
} }
.roomQueryTalbe tr td .pDateStyle {
border-bottom: 1px solid #ccc;
min-height: 24px;
line-height: 24px;
margin-top: 0;
box-sizing: content-box;
}
.roomQueryTalbe tr td .pDateStyle:last-child {
border-bottom: none;
}
.roomQueryTalbe tr td .pDateStyle>span:after {
content: '/';
}
.roomQueryTalbe tr td .pDateStyle>span:last-child:after {
content: ''
}
.roomQueryTalbe tr td .link p:hover { .roomQueryTalbe tr td .link p:hover {
text-decoration: underline; text-decoration: underline;
cursor: pointer; cursor: pointer;
} }
.roomQueryTalbe tr td .phoverStype:hover {
text-decoration: underline;
cursor: pointer;
}
.roomQuery_tripDetails {
padding: 0;
box-shadow: 0px 1px 3px 0px #dedede;
max-height: 400px;
overflow-y: auto;
}
.roomQuery_tripDetails .popper__arrow::after {
border-bottom-color: #ededed !important;
}
.roomQuery_tripDetails table {
padding: 10px 0 0 20px;
background-color: #ededed;
border-collapse: collapse;
border: 1px solid #d2d2d2;
font-size: 12px;
}
.roomQuery_tripDetails table th {
background-color: #ededed;
padding: 5px;
}
.roomQuery_tripDetails table td {
background-color: #ffffff;
padding: 9px 15px;
color: #333333;
border: 1px solid #d2d2d2;
}
.roomQuery_tripDetails table td._d_name {
background-color: #ededed;
}
.roomQuery_tripDetails table ._color_666 {
color: #666666;
}
.roomQuery_tripDetails table tr._color_666 th {
padding: 9px 15px;
}
</style> </style>
...@@ -961,7 +961,7 @@ ...@@ -961,7 +961,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="5"> <td colspan="5" contenteditable="true">
<div style="display: flex"> <div style="display: flex">
<span>地接社名称:株式会社ピースインターナショナル</span> <span>地接社名称:株式会社ピースインターナショナル</span>
</div> </div>
......
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