Commit fabb8dbb authored by 华国豪's avatar 华国豪 🙄
parents a8927ed3 fc0581a7
......@@ -138,14 +138,16 @@
<!--<th rowspan="2">数量</th>-->
<!--<th rowspan="2">单 价</th>-->
<th rowspan="2">{{$t('hotel.hotel_Currency')}}</th>
<th colspan="3">{{$t('fnc.jine')}}</th>
<th colspan="5">{{$t('fnc.jine')}}</th>
<th rowspan="2">{{$t('hotel.hotel_remark')}}</th>
<th rowspan="2">{{$t('fnc.zhidanren')}}</th>
</tr>
<tr>
<th width="88">{{$t('fnc.yuanbi')}}</th>
<th width="50">{{$t('hotel.hotel_CurrentRate')}}</th>
<th width="88">{{$t('fnc.bweibi')}}</th>
<th width="68">{{$t('fnc.bweibi')}}</th>
<th width="68">到账</th>
<th width="48">手续费</th>
</tr>
<template v-if="GetDetail.MergeDetailList&&GetDetail.MergeDetailList.length">
<tr v-for="(item) in GetDetail.MergeDetailList" class="_color_b">
......@@ -163,6 +165,8 @@
<td height="34px">{{item.OriginalMoney}}</td>
<td height="34px">{{item.Rate}}</td>
<td height="34px">{{item.Money}}</td>
<td height="34px">{{item.PayMoney}}</td>
<td height="34px">{{item.Fee}}</td>
<td height="34px" style="max-width: 120px;">{{item.Remark}}</td>
<td height="34px">{{item.EmName}}</td>
</tr>
......@@ -212,7 +216,7 @@
<!--v-if="GetDetail.MergeBankList&&GetDetail.MergeBankList.length>0"-->
<tr v-if="GetDetail.MergeBankList&&GetDetail.MergeBankList.length>0">
<td height="34px" class="">{{$t('tips.jiaoyifangshi')}}</td>
<td height="34px" colspan="9" class="_color_b">
<td height="34px" colspan="11" class="_color_b">
<template v-for="(item,index) in GetDetail.MergeBankList">
<p class="_fex_cen clearfix"><span class="_bold">{{item.Alias}}-</span><span class="_bank_name">{{item.TypeName}}-</span><span class="_bank_type" :class="item.AccountType=='对私'?'':'_bank_type2'">{{item.AccountType==""?$t('fnc.no'):item.AccountType}}</span> {{item.BankNo?'-':''}} <span>{{item.BankNo}}</span></p>
</template>
......@@ -220,23 +224,23 @@
</tr>
<tr v-if="GetDetail.Merge">
<td height="34px" class="">{{$t('fnc.wbzjine')}}<span class="_font_size12"></span></td>
<td height="34px" colspan="3" class="_color_b">{{GetDetail.Merge.WBMoney==''?$t('fnc.ling'):GetDetail.WBChineseMoney}}({{GetDetail.Merge.WBMoney}})</td>
<td height="34px" colspan="4" class="_color_b">{{GetDetail.Merge.WBMoney==''?$t('fnc.ling'):GetDetail.WBChineseMoney}}({{GetDetail.Merge.WBMoney}})</td>
<td height="34px" class="">{{$t('fnc.bwbzjine')}}<span class="_font_size12"></span></td>
<td height="34px" colspan="5" class="_color_b">{{GetDetail.Merge.Money==''?$t('fnc.ling'):GetDetail.ChineseMoney}}({{GetDetail.Merge.Money}})</td>
<td height="34px" colspan="6" class="_color_b">{{GetDetail.Merge.Money==''?$t('fnc.ling'):GetDetail.ChineseMoney}}({{GetDetail.Merge.Money}})</td>
</tr>
<tr class="_huik_info" v-if="GetDetail.Type==1&&GetDetail.Merge">
<td height="34px" class="">{{$t('fnc.huikuanren')}}</td>
<td height="34px" colspan="3">
<td height="34px" colspan="4">
<span class="_color_b _font_size12">{{GetDetail.Merge.RemitterNameV2}}</span>
</td>
<td height="34px" class="">{{$t('fnc.hkshijian')}}</td>
<td height="34px" colspan="5">
<td height="34px" colspan="6">
<span class="_color_b _font_size12">{{GetDetail.Merge.TradeDateV2}}</span>
</td>
</tr>
<tr class="_huik_info" v-else-if="GetDetail.Type!=1&&GetDetail.Merge">
<td height="34px" class="">{{$t('fnc.jiaoyiriqi')}}</td>
<td height="34px" colspan="9">
<td height="34px" colspan="11">
<span class="_color_b _font_size12">{{GetDetail.Merge.TradeDateV2}}</span>
</td>
</tr>
......
......@@ -22,6 +22,9 @@
top: 55px;
right: 0;
}
.column-cell-class-name-test-lan-s .v-table-body-cell{
background-color: #9cf;
}
/* .My_table_tell .v-table-body-cell{
display: block!important;
line-height: 30px!important;
......@@ -981,6 +984,66 @@ export default {
if(rowData.ZongJi < 0 && columnName=="ZongJi"){
return "column-cell-class-name-test-red"
}
if(rowData.ZhaiYao=='以下项均不计入计算'){
if(rowData.YiYue==0){
rowData.YiYue='';
}
if(rowData.ErYue==0){
rowData.ErYue='';
}
if(rowData.SanYue==0){
rowData.SanYue='';
}
if(rowData.DiYiJiDu==0){
rowData.DiYiJiDu='';
}
if(rowData.SiYue==0){
rowData.SiYue='';
}
if(rowData.WuYue==0){
rowData.WuYue='';
}
if(rowData.LiuYue==0){
rowData.LiuYue='';
}
if(rowData.DiErJiDu==0){
rowData.DiErJiDu='';
}
if(rowData.ShangBanNianBao==0){
rowData.ShangBanNianBao='';
}
if(rowData.QiYue==0){
rowData.QiYue='';
}
if(rowData.BaYue==0){
rowData.BaYue='';
}
if(rowData.JiuYue==0){
rowData.JiuYue='';
}
if(rowData.DiSanJiDu==0){
rowData.DiSanJiDu='';
}
if(rowData.ShiYue==0){
rowData.ShiYue='';
}
if(rowData.ShiYiYue==0){
rowData.ShiYiYue='';
}
if(rowData.ShiErYue==0){
rowData.ShiErYue='';
}
if(rowData.DiSiJiDu==0){
rowData.DiSiJiDu='';
}
if(rowData.XiaBanNianBao==0){
rowData.XiaBanNianBao='';
}
if(rowData.ZongJi==0){
rowData.ZongJi='';
}
}
// 设置列class
if (columnName === "ZongJi") {
......@@ -1006,7 +1069,10 @@ export default {
}
if (rowData.ZhaiYao === '所得税费用') {
return "column-cell-class-name-test-greed-s";
}
}
if(rowData.ZhaiYao=='以下项均不计入计算'){
return "column-cell-class-name-test-lan-s"
}
},
exportExcel: function () {
let msg = {
......
......@@ -501,7 +501,7 @@ tr._item_list td:last-child {
</el-col>
<el-col :span="4">
<el-form-item label="数据类别:">
<el-select v-model="msg.DataType" filterable class="w150">
<el-select v-model="msg.DataType" :disabled="shujuType" filterable class="w150">
<el-option value="-1" label="不限"></el-option>
<el-option value="1" label="团队营收"></el-option>
<el-option value="3" label="单办签证"></el-option>
......@@ -1397,6 +1397,7 @@ export default {
pageIndex: 1,
AALloading: false,
BranchStatus:true,
shujuType:false,
};
},
created() {
......@@ -2082,6 +2083,17 @@ export default {
res => {
if (res.data.resultCode == 1) {
let BranchStatus=res.data.data.IsBranchButton;
if(BranchStatus==-2){
BranchStatus = -1;
this.shujuType = true;
this.apipost("line_post_GetList", {}, res => {
if (res.data.resultCode == 1) {
this.LineList = res.data.data;
} else {
this.Error(res.data.message);
}
});
}
if(BranchStatus==-1){
this.BranchStatus=false;
}else{
......
......@@ -29,9 +29,15 @@
<div v-if="item.data&&item.month===calendar.data.date" :class="stockColor(item.data.SubList[0].InventoryType)">
<template v-for="(childItem,childIndex) in item.data.SubList">
<p>
<span @click="goUrlA('2', item,childItem.BatchNumber)" class="text_underLine">价格:{{childItem.CostPrice}}{{childItem.CurrencyName}}</span>
<span class="text_underLine" @click="goUrlB(item)">总库存:{{childItem.Inventory}}(间)</span>
<span class="text_underLine" @click="goUrlHotelTeam(item)">剩余库存:{{childItem.RemainingInventory}}(间)</span>
<span title="点击修改价格和库存信息">
价格:<span @click="goUrlA('2', item,childItem.BatchNumber)" class="text_underLine">{{childItem.CostPrice}}{{childItem.CurrencyName}}</span>
</span><br/>
<span title="点击跳转到总库存看板">
总库存:<span class="text_underLine" @click="goUrlB(item)">{{childItem.Inventory}}(间)</span>
</span><br/>
<span title="点击跳转到酒店查询">
剩余库存:<span class="text_underLine" @click="goUrlHotelTeam(item)">{{childItem.RemainingInventory}}(间)</span>
</span>
</p>
</template>
</div>
......@@ -314,6 +320,7 @@
.text_underLine {
cursor: pointer;
text-decoration: underline
}
</style>
......@@ -27,16 +27,41 @@
</li>
<li>
<span>
<em>酒店</em>
<el-select v-model="msg.HotelChooseArray" :placeholder="$t('pub.pleaseSel')" filterable multiple :multiple-limit="3" size="mini">
<el-option v-for="item in HotelList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
<em>星级</em>
<el-select v-model="msg.Star" :placeholder="$t('pub.pleaseSel')" >
<el-option :label="$t('pub.unlimitedSel')" :value='0'></el-option>
<el-option label="3星或商务" :value='3'></el-option>
<el-option label="4星" :value='4'></el-option>
<el-option label="5星" :value='5'></el-option>
</el-select>
</span>
</li>
<li>
<span>
<em>价格区间</em>
<el-select v-model="msg.PriceLevel" :placeholder="$t('pub.pleaseSel')" >
<el-option :label="$t('pub.unlimitedSel')" :value='0'></el-option>
<el-option label="5000以下" :value='1'></el-option>
<el-option label="5000~6000" :value='2'></el-option>
<el-option label="6000~7000" :value='3'></el-option>
<el-option label="7000~8000" :value='4'></el-option>
<el-option label="8000~9000" :value='5'></el-option>
<el-option label="9000~10000" :value='6'></el-option>
<el-option label="10000以上" :value='7'></el-option>
</el-select>
</span>
</li>
<li><span><em>日期</em>
<el-date-picker v-model='msg.StartDate' class='w135' value-format="yyyy-MM-dd" type="date"></el-date-picker>
-
<el-date-picker v-model='msg.EndDate' class='w135' value-format="yyyy-MM-dd" type="date"></el-date-picker>
<el-date-picker v-model='msg.StartDate' value-format="yyyy-MM-dd" type="date"></el-date-picker>
<el-date-picker v-model='msg.EndDate' value-format="yyyy-MM-dd" type="date"></el-date-picker>
</span>
</li>
<li>
<span>
<em>酒店</em>
<el-select v-model="msg.HotelChooseArray" :placeholder="$t('pub.pleaseSel')" class="multiple_input w300" filterable multiple :multiple-limit="3">
<el-option v-for="item in HotelList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
</span>
</li>
<li>
......@@ -69,8 +94,9 @@
</tr>
<tr v-for="item in dataList">
<td>
<div style="min-width:300px; text-align:left;padding-left:5px;cursor:pointer;" @click="GotoHotel(item.HotelId)">
{{item.HotelName}}</div>
<div style="min-width:140px; text-align:left;padding-left:5px;cursor:pointer;" >
<span title="点击跳转到酒店查询页面" @click="GotoHotel(item.HotelId)" style="text-decoration: underline;min-width:140px; ">{{item.HotelName}}</span>
<br/>(总库存:{{item.TotalInventory}})</div>
</td>
<td>
<div class="Hotel_kong">价格</div>
......@@ -166,6 +192,8 @@
</div>
<el-dialog custom-class="w800" title="信息" :visible.sync="showHQinfo" center>
<el-form>
<div class="HQ_miaoshu">1.酒店库存系统已开放使用,欢迎前往参观选购!! </div>
<div class="HQ_miaoshu">2.库存酒店皆为时时更新,请上传人员细心上传!!</div>
<table border="0" cellspacing="1" cellpadding="0" class="HouseTypeList Hq_addTable" style="width:100%;">
<tr>
<th>编号</th>
......@@ -188,8 +216,6 @@
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="queryMsg.currentPage"
:page-size="queryMsg.pageSize" layout="total,prev, pager, next, jumper" :total="queryMsg.total">
</el-pagination>
<div class="HQ_miaoshu">1.酒店库存系统已开放使用,欢迎前往参观选购!! </div>
<div class="HQ_miaoshu">2.库存酒店皆为时时更新,请上传人员细心上传!!</div>
</el-form>
<div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="showHQinfo = false">关闭</button>
......@@ -211,6 +237,10 @@
Province: 0,
City: 0,
OutBranchId: -1,
//星级
Star:0,
//价格等级
PriceLevel:0
},
//分公司列表
......@@ -291,7 +321,6 @@
this.loading = false;
if (res.data.resultCode == 1) {
this.dataList = res.data.data;
console.log("dataList",this.dataList);
this.isShow = true;
} else {
this.Error(res.data.message);
......
<template>
<div>
<div class="query-box" style="border-bottom: none;">
<ul>
<li>
<span><em>出团公司</em>
<el-select filterable v-model='msg.OutBranchId' :placeholder="$t('pub.unlimitedSel')">
<el-option :label="$t('pub.unlimitedSel')" :value='-1'></el-option>
<el-option v-for='item in companyList' :label='item.BName' :value='item.Id' :key="item.Id">
</el-option>
</el-select>
</span>
</li>
<li><span><em>系列</em>
<el-select v-model="msg.LineteamId" filterable :placeholder="$t('pub.pleaseSel')">
<el-option label="不限" value='-1'></el-option>
<el-option v-for="item in LineTeamList" :label='item.LtName' :value='item.LtID' :key='item.LtID'>
</el-option>
</el-select>
</span>
</li>
<li>
<span>
<em>订团号</em>
<el-input v-model='msg.CombinationNum' class='w135'></el-input>
</span>
</li>
<li>
<span>
<em>团号</em>
<el-input v-model='msg.TCNUM' class='w135'></el-input>
</span>
</li>
<li><span><em>出发日期</em>
<el-date-picker v-model='msg.StartDate' class='w135' value-format="yyyy-MM-dd" type="date"></el-date-picker>
-
<el-date-picker v-model='msg.EndDate' class='w135' value-format="yyyy-MM-dd" type="date"></el-date-picker>
</span>
</li>
<li>
<span>
<em>酒店</em>
<el-select v-model="msg.HotelId" :placeholder="$t('pub.pleaseSel')" filterable>
<el-option :label="$t('pub.unlimitedSel')" :value='0'></el-option>
<el-option v-for="item in HotelList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
</span>
</li>
<li>
<input type="button" class="normalBtn" value="查询" @click="getList();resetPageIndex()" />
</li>
</ul>
</div>
<div style="width: 100%; overflow-x: auto;padding-bottom: 10px; " class="ownScrollbarStyle">
<table border="0" cellspacing="1" cellpadding="0" class="roomQueryTalbe" v-loading='loading'>
<tr>
<th width="w100">序号</th>
<th width="120">出发地</th>
<th width="80">公司团号</th>
<th width="120">机位总数<br />(Y/E/F)</th>
<th>使用时间&酒店情况</th>
</tr>
<tr v-if="dataList.length==0">
<td colspan="10">暂无数据</td>
</tr>
<tbody v-for="(outItem,outindex) in dataList" :class="{roomQuerySplitTrCss:outindex%2!=0}">
<template v-for="(item,index) in outItem.StaticsReportList">
<tr>
<td :rowspan="outItem.StaticsReportList.length" v-if='index==0'>
<div style="max-width: 100px; min-width: 50px;margin:auto;">{{outindex+1}}</div>
<div v-if='outItem.StaticsReportList.length>0' class="w150">{{outItem.NewCombinationNum}}</div>
</td>
<td>
<div class="w80">
{{item.StartCityNames}}
</div>
</td>
<td>
<div class="w120 link">
<p @click="goUrlT('productQuery',item.TCNUMS,'产品查询')">{{item.TCNUMS}}</p>
</div>
</td>
<td>
<div class="w120 link">
<p @click="goUrlT('RegistrationList',item.TCIDS,'报名清单')">
{{item.TotalSeat}}/{{item.CommonReport.HouseStatistics.RealityYSeatNum}}/{{item.CommonReport.HouseStatistics.RealityESeatNum}}/{{item.CommonReport.HouseStatistics.RealityFSeatNum}}
</p>
</div>
</td>
<td style="vertical-align: top;">
<div :style="{width:150*item.CommonReport.newHotel.length+'px'}">
<div class="w150" v-for="childItem in item.CommonReport.newHotel"
style="float:left;border-right:1px solid #d1d1d1;">
<p class="pDateStyle">{{childItem.CheckInDateStr}}</p>
<p @click="goUrlR('HotelManagement',childItem.HotelId,'酒店管理')"
class="pDateStyle phoverStype ownScrollbarStyle" style="height: 50px!important; overflow:auto;">
{{childItem.NewHotelName}}<span class="colorE95252">{{childItem.HotelOrderState==1?"OK":"暂定"}}</span>
</p>
</div>
</div>
</td>
</tr>
</template>
</tbody>
</table>
</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>
</div>
</template>
<script>
export default {
data() {
return {
loading: false,
currentPage: 1,
total: 0,
msg: {
pageIndex: 1,
pageSize: 5,
SelectType: 1,
LineId: 14,
LineteamId: "-1",
StartDate: '',
EndDate: '',
//酒店编号
HotelId: 0,
//日期
DateStr: "",
OutBranchId: -1,
//订团号
CombinationNum: ""
},
//分公司类表
companyList: [],
//酒店类表
HotelList: [],
LineList: [],
LineTeamList: [],
thLengthTitle: [],
dataList: [],
}
},
methods: {
getLineList() {
this.apipost("line_post_GetAllList", {}, res => {
if (res.data.resultCode == 1) {
this.LineList = res.data.data;
}
});
},
//获取系列列表
getLineTeamList(lineId) {
this.LineTeamList = [];
this.apipost(
"team_post_GetList", {
lineID: 14,
isTOOP: 1
},
res => {
if (res.data.resultCode == 1) {
this.msg.LineteamId = "-1";
this.LineTeamList = res.data.data;
}
}
);
},
goUrlR(path, obj, title) {
this.$router.push({
name: path,
query: {
"ID": obj,
blank: 'y',
tab: title
}
})
},
goUrlT(path, obj, title) {
this.$router.push({
name: path,
query: {
"id": obj,
blank: 'y',
tab: title
}
})
},
goUrl(path, obj, outItem, title) {
this.$router.push({
name: path,
query: {
"id": obj.TCIDS,
'TCNUM': obj.TCNUMS,
'flightTotal': obj.TotalSeat,
'GuestNum': obj.CommonReport.HouseStatistics.RealityNum,
'NewCombinationNum': outItem.NewCombinationNum,
blank: 'y',
tab: title
}
})
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
resetPageIndex() {
this.msg.pageIndex = 1;
this.currentPage = 1;
},
getList() {
this.loading = true;
this.apipost('dmcstatistics_post_GetUniteCombinationNumService', this.msg, res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
this.dataList = res.data.data.pageData.data;
this.thLengthTitle = [];
for (let i = 1; i <= res.data.data.pageData.columnsCount; i++) {
this.thLengthTitle.push('第' + i + '晚')
}
this.dataList.forEach(x => {
x.StaticsReportList.forEach(y => {
y.CommonReport.newHotel = [];
if (y.CommonReport.HotelOrderListReport != null && y.CommonReport.HotelOrderListReport
.length > 0) {
y.CommonReport.HotelOrderListReport.forEach(z => {
z.HotelOrderList.forEach(q => {
y.CommonReport.newHotel.push(q);
})
})
}
y.colNum = 9 + y.CommonReport.newHotel.length;
})
})
} else {
this.$message.error(res.data.message)
}
}, err => {})
},
//获取酒店列表
GetHotelList() {
this.apipost(
"hotel_post_GetHasStockHotelList", {
Country: 651,
IsMoreThanZero: 1
},
res => {
if (res.data.resultCode == 1) {
this.HotelList = res.data.data;
}
},
err => {}
);
},
getBranchList() {
this.apipost('admin_get_BranchGetList', {
RB_Group_Id: '2',
Status: 0,
}, res => {
if (res.data.resultCode == 1) {
this.companyList = res.data.data;
}
}, err => {})
},
},
mounted() {
let myDate = new Date();
let nowDate =
myDate.getFullYear() +
"-" +
parseInt(myDate.getMonth() + 1) +
"-" +
myDate.getDate();
if (this.$route.query.hotelId) {
this.msg.HotelId = this.$route.query.hotelId;
}
if (this.$route.query.dateStr) {
this.msg.DateStr = this.$route.query.dateStr;
}
if (this.$route.query.hotelId || this.$route.query.dateStr) {
this.msg.StartDate = "";
} else {
this.msg.StartDate = nowDate;
}
this.getBranchList();
this.GetHotelList();
this.getList();
this.getLineTeamList();
},
}
</script>
<style>
.roomQuerySplitTrCss td {
background: #eee !important;
}
.roomQueryTalbe {
background: #ccc;
}
.roomQueryTalbe tr th {
background: #E6E6E6;
height: 40px;
font-size: 12px;
color: #333;
}
.roomQueryTalbe tr {
background: #fff;
text-align: center;
height: 40px;
}
.roomQueryTalbe tr td {
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 {
text-decoration: underline;
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>
......@@ -2,11 +2,11 @@
._PrintPage{
width: 100%;
background-color: white;
position: absolute;
/* position: absolute; */
padding-top: 20px;
}
._PrintPage_box{
width: 752px;
width: 1000px;
/* margin-left: 160px; */
margin: 0 auto;
padding: 0 !important;
......@@ -14,6 +14,12 @@
._border_1{
border: 1px solid #333333;
margin-bottom:30px;
page-break-after: always;
}
@media print {
._PrintPage{
margin-left:-145px;
}
}
</style>
<template v-loading="loading">
......
<style>
</style>
<template>
<div class="flexOne">
<div class="query-box">
<ul>
<li>
<span><em>名称</em><el-input v-model='msg.MenuName' class="permiss-input" placeholder="请输入内容"></el-input></span>
</li>
<li>
<span><em>权限层级</em><el-select v-model='msg.Tier' placeholder="请选择">
<el-option label="不限" value="0" ></el-option>
<el-option label="一级" value="1" ></el-option>
<el-option label="二级" value="2" ></el-option>
<el-option label="三级" value="3" ></el-option>
</el-select>
</span>
</li>
<li>
<span><em>上级权限</em><el-select filterable v-model='msg.ParentId' filterable placeholder="请选择">
<el-option label="不限" value="0"></el-option>
<el-option
v-for="item in getParentNodeData"
:key="item.MenuId"
:label="item.MenuName"
:value="item.MenuId">
</el-option>
</el-select>
</span>
</li>
<li>
<span><em>状态</em><el-select v-model="msg.MenuStatus" placeholder="请选择">
<el-option label="不限" value="-1"></el-option>
<el-option label="开启" value="0"></el-option>
<el-option label="关闭" value="1"></el-option>
</el-select>
</span>
</li>
<li>
<input type="button" class="hollowFixedBtn" name="" id="" value="查询" @click="resetPageIndex(),getList()" />
<input type="button" @click="outerVisible = true,dialogTitle='新增权限菜单',clearMessage();" class="normalBtn" value="新增" />
</li>
</ul>
</div>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="300">名称</th>
<th width="500">菜单地址</th>
<th>层级</th>
<th>状态</th>
<th width="200">分组名称</th>
<th width="100">排序</th>
<th width="100">操作</th>
</tr>
<tr v-for="(item,index) in DataList">
<td>{{item.MenuName}}</td>
<td>{{item.MenuUrl}}</td>
<td>{{item.Tier | tierFormat(item.Tier)}}</td>
<td>{{item.MenuStatus==0?'开启':'关闭'}}</td>
<td>
{{item.GroupingCode}}
</td>
<td>
{{item.Sort}}
</td>
<td>
<el-row>
<el-tooltip class="item" effect="dark" content="修改" placement="top-start">
<el-button @click="outerVisible = true,dialogTitle='修改权限菜单',updateData(index,item.MenuId)" type="primary" icon="el-icon-edit" circle></el-button>
</el-tooltip>
</el-row>
</td>
</tr>
</table>
<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 class="flexOne">
<div class="query-box">
<ul>
<li>
<span><em>名称</em>
<el-input v-model='msg.MenuName' class="permiss-input" placeholder="请输入内容"></el-input>
</span>
</li>
<li>
<span><em>权限层级</em>
<el-select v-model='msg.Tier' placeholder="请选择">
<el-option label="不限" value="0"></el-option>
<el-option label="一级" value="1"></el-option>
<el-option label="二级" value="2"></el-option>
<el-option label="三级" value="3"></el-option>
</el-select>
</span>
</li>
<li>
<span><em>上级权限</em>
<el-select filterable v-model='msg.ParentId' filterable placeholder="请选择">
<el-option label="不限" value="0"></el-option>
<el-option v-for="item in getParentNodeData" :key="item.MenuId" :label="item.MenuName"
:value="item.MenuId">
</el-option>
</el-select>
</span>
</li>
<li>
<span><em>状态</em>
<el-select v-model="msg.MenuStatus" placeholder="请选择">
<el-option label="不限" value="-1"></el-option>
<el-option label="开启" value="0"></el-option>
<el-option label="关闭" value="1"></el-option>
</el-select>
</span>
</li>
<li>
<input type="button" class="hollowFixedBtn" name="" id="" value="查询" @click="resetPageIndex(),getList()" />
<input type="button" @click="outerVisible = true,dialogTitle='新增权限菜单',clearMessage();" class="normalBtn"
value="新增" />
</li>
</ul>
</div>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="300">名称</th>
<th width="500">菜单地址</th>
<th>层级</th>
<th>状态</th>
<th width="200">分组名称</th>
<th width="100">排序</th>
<th width="100">操作</th>
</tr>
<tr v-for="(item,index) in DataList">
<td>{{item.MenuName}}</td>
<td>{{item.MenuUrl}}</td>
<td>{{item.Tier | tierFormat(item.Tier)}}</td>
<td>{{item.MenuStatus==0?'开启':'关闭'}}</td>
<td>
{{item.GroupingCode}}
</td>
<td>
{{item.Sort}}
</td>
<td>
<el-row>
<el-tooltip class="item" effect="dark" content="修改" placement="top-start">
<el-button @click="outerVisible = true,dialogTitle='修改权限菜单',updateData(index,item.MenuId)" type="primary"
icon="el-icon-edit" circle></el-button>
</el-tooltip>
</el-row>
</td>
</tr>
</table>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total='total'>
</el-pagination>
<el-dialog custom-class='w750' :title="dialogTitle" :visible.sync="outerVisible" center :before-close="closeChangeMachie">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="120px" >
<table class="layerNoIcon">
<tr>
<td>
<el-form-item label="名称" prop="MenuName"><el-input maxlength='50' class='w200' type="text" v-model="addMsg.MenuName" :placeholder="$t('pub.pleaseImport')"></el-input>
</el-form-item>
</td>
<td>
<el-form-item label="菜单URL" prop="MenuUrl">
<el-input maxlength='50' class='w200' type="text" v-model="addMsg.MenuUrl" :placeholder="$t('pub.pleaseImport')"></el-input>
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="权限层级" prop="Tier">
<el-select class='w200' v-model="addMsg.Tier" @change='getChildMenu' placeholder="请选择">
<el-option label="一级" value="1" ></el-option>
<el-option label="二级" value="2" ></el-option>
<el-option label="三级" value="3" ></el-option>
</el-select>
</el-form-item>
</td>
<td>
<el-form-item label="上级权限" prop="ParentId">
<el-select filterable class='w200' v-model='addMsg.ParentId' :placeholder="$t('pub.pleaseSel')">
<el-option v-for="item in layerGetParentNodeData" :key="item.MenuId" :label="item.MenuName" :value="item.MenuId">
</el-option>
</el-select>
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="分组名称">
<el-input maxlength='50' class='w200' type="text" v-model="addMsg.GroupingCode" :placeholder="$t('pub.pleaseImport')"></el-input>
</el-form-item>
</td>
<td>
<el-form-item label="排序" prop='Sort'>
<el-input maxlength='50' class='w200' @keyup.native="checkInteger(addMsg,'Sort')" type="text" v-model="addMsg.Sort" :placeholder="$t('pub.pleaseImport')"></el-input>
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="菜单图标" >
<el-input class='w200' type="text" maxlength='50' v-model="addMsg.MenuStyleIcon" :placeholder="$t('pub.pleaseImport')"></el-input>
</el-form-item>
</td>
<td>
<el-form-item label="菜单背景配置">
<el-color-picker style='vertical-align: middle;' :predefine="predefineColors" v-model="addMsg.MenuStyleColor"></el-color-picker>
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="状态">
<el-switch v-model="addMsg.MenuStatus" active-value="0" inactive-value="1"></el-switch>
</el-form-item>
</td>
</tr>
</table>
</el-form>
<div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="outerVisible = false,resetForm('addMsg'),getList()">{{$t('pub.cancelBtn')}}</button> &nbsp;
<button class="normalBtn" type="primary" @click="submitForm('addMsg'),getList()">{{$t('pub.saveBtn')}}</button>
</div>
</el-dialog>
</div>
<el-dialog custom-class='w750' :title="dialogTitle" :visible.sync="outerVisible" center
:before-close="closeChangeMachie">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="120px">
<table class="layerNoIcon">
<tr>
<td>
<el-form-item label="名称" prop="MenuName">
<el-input maxlength='50' class='w200' type="text" v-model="addMsg.MenuName"
:placeholder="$t('pub.pleaseImport')"></el-input>
</el-form-item>
</td>
<td>
<el-form-item label="菜单URL" prop="MenuUrl">
<el-input maxlength='50' class='w200' type="text" v-model="addMsg.MenuUrl"
:placeholder="$t('pub.pleaseImport')"></el-input>
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="权限层级" prop="Tier">
<el-select class='w200' v-model="addMsg.Tier" @change='getChildMenu' placeholder="请选择">
<el-option label="一级" value="1"></el-option>
<el-option label="二级" value="2"></el-option>
<el-option label="三级" value="3"></el-option>
</el-select>
</el-form-item>
</td>
<td>
<el-form-item label="上级权限" prop="ParentId">
<el-select filterable class='w200' v-model='addMsg.ParentId' :placeholder="$t('pub.pleaseSel')">
<el-option v-for="item in layerGetParentNodeData" :key="item.MenuId" :label="item.MenuName"
:value="item.MenuId">
</el-option>
</el-select>
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="分组名称">
<el-input maxlength='50' class='w200' type="text" v-model="addMsg.GroupingCode"
:placeholder="$t('pub.pleaseImport')"></el-input>
</el-form-item>
</td>
<td>
<el-form-item label="排序" prop='Sort'>
<el-input maxlength='50' class='w200' @keyup.native="checkInteger(addMsg,'Sort')" type="text"
v-model="addMsg.Sort" :placeholder="$t('pub.pleaseImport')"></el-input>
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="菜单图标">
<el-input class='w200' type="text" maxlength='50' v-model="addMsg.MenuStyleIcon"
:placeholder="$t('pub.pleaseImport')"></el-input>
</el-form-item>
</td>
<td>
<el-form-item label="菜单背景配置">
<el-color-picker style='vertical-align: middle;' :predefine="predefineColors"
v-model="addMsg.MenuStyleColor"></el-color-picker>
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="状态">
<el-switch v-model="addMsg.MenuStatus" active-value="0" inactive-value="1"></el-switch>
</el-form-item>
</td>
</tr>
</table>
</el-form>
<div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn"
@click="outerVisible = false,resetForm('addMsg'),getList()">{{$t('pub.cancelBtn')}}</button> &nbsp;
<button class="normalBtn" type="primary" @click="submitForm('addMsg'),getList()">{{$t('pub.saveBtn')}}</button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
let validateParent=(rule, value, callback)=>{
if(this.addMsg.Tier!='1'&&this.addMsg.Tier!=''&&value==''){
return callback(new Error('请选择上级层级'));
}else{
callback();
}
}
let validateUrl=(rule, value, callback)=>{
if(this.addMsg.Tier=='3'&&this.addMsg.Tier!=''&&value==''){
return callback(new Error('请输入菜单URL'));
}else{
callback();
}
}
return {
dialogTitle: '',
DataList: '',
total: 0,
pageSize: '',
currentPage: 1,
thisColor: '#E95252',
predefineColors: [
'#ff4500',
'#ff8c00',
'#ffd700',
'#90ee90',
'#00ced1',
'#1e90ff',
'#c71585',
],
outerVisible: false,
addStatus: [{
value: '0',
label: '开启'
}, {
value: '1',
label: '关闭'
}],
msg: { //列表查询请求数据
"pageIndex": 1,
'pageSize': 15,
'MenuName': '',
'ParentId': '',
'MenuStatus': '0',
'Tier':''
},
addMsg: {
'MenuId':'0',
'Tier':'',
'MenuName': '',
'MenuUrl': '',
'ParentId': '0',
'MenuStyle': '',
'MenuStatus': '0',
MenuStyleIcon:'',
MenuStyleColor:'',
Sort:0
},
rules:{
Sort:[
{ required: true, message: '请输入排序', trigger: 'blur' }
],
MenuName:[
{ required: true, message: '请输入菜单名称', trigger: 'blur' }
],
Tier:[
{ required: true, message: '请选择菜单层级', trigger: 'change' }
],
ParentId:[
{validator: validateParent, trigger: 'change' }
],
MenuUrl:[
{validator: validateUrl, trigger: 'blur' }
],
},
getParentNodeMsg: {
'Tier':'0',
"ParentId": '0',
"MenuStatus": '0',
"MenuName": '',
},
layerGetParentNodeData:[],
getParentNodeData: [],
currentUpdateIndex:-1
}
},
mounted() {
this.getList();
this.getParentNode()
},
filters:{
tierFormat(value){
if(value=='1')
return '一级'
if(value=='2')
return '二级'
if(value=='3')
return '三级'
}
},
methods: {
getParentNode() { //上级权限
this.apipost('admin_get_SysMenuGetList', this.getParentNodeMsg, res => {
if(this.outerVisible){
this.layerGetParentNodeData = res.data.data;
}else{
this.getParentNodeData = res.data.data;
}
}, err => {})
},
getList() { //列表查询
this.apipost('admin_get_SysMenuGetPageList', this.msg, res => {
if(res.data.resultCode == 1) {
this.DataList = res.data.data.pageData;
console.log(this.DataList)
this.total = res.data.data.count;
}
}, err => {})
},
getChildMenu(){
this.addMsg.ParentId='';
if(this.addMsg.Tier==1){
this.layerGetParentNodeData=null;
//this.addMsg.ParentId=0
}else{
this.getParentNodeMsg.Tier=this.addMsg.Tier-1;
this.getParentNode();
}
},
addData() { //新增数据
if(this.addMsg.MenuName==''){
this.$message.error('菜单名不能为空');
return
}
let mStyle={"icon":"","color":""};
mStyle.icon=this.addMsg.MenuStyleIcon;
mStyle.color=this.addMsg.MenuStyleColor;
this.addMsg.MenuStyle=JSON.stringify(mStyle);
if(this.addMsg.Tier==1)
this.addMsg.ParentId=0
this.apipost('admin_post_SysMenuSet', this.addMsg, res => {
if(res.data.resultCode == 1){
this.outerVisible=false;
this.$message.success(res.data.message)
if(this.currentUpdateIndex>-1){
this.DataList[this.currentUpdateIndex]=this.addMsg
}
}else{
this.$message.error(res.data.message);
}
}, err => {})
export default {
data() {
let validateParent = (rule, value, callback) => {
if (this.addMsg.Tier != '1' && this.addMsg.Tier != '' && value == '') {
return callback(new Error('请选择上级层级'));
} else {
callback();
}
}
let validateUrl = (rule, value, callback) => {
if (this.addMsg.Tier == '3' && this.addMsg.Tier != '' && value == '') {
return callback(new Error('请输入菜单URL'));
} else {
callback();
}
}
},
updateData(index,id) { //修改
this.apipost('admin_get_SysMenuGet',{MenuId:id},res=>{
let updateList=res.data.data
console.log(updateList)
this.addMsg.MenuId=id
this.addMsg.MenuName=updateList.MenuName
this.addMsg.Tier=updateList.Tier.toString()
this.addMsg.ParentId=updateList.ParentId
this.addMsg.Sort=updateList.Sort
this.addMsg.GroupingCode=updateList.GroupingCode
this.addMsg.MenuUrl=updateList.MenuUrl
this.addMsg.MenuStatus=updateList.MenuStatus.toString()
let style=JSON.parse(updateList.MenuStyle)
this.addMsg.MenuStyleIcon=style.icon
this.addMsg.MenuStyleColor=style.color
this.currentUpdateIndex=index
},err=>{})
this.getChildMenu();
// this.addMsg = this.DataList[index]
// this.addMsg.ParentId=this.addMsg.ParentId.toString();
// this.addMsg.Tier=this.DataList[index].Tier.toString();
// this.addMsg.MenuStatus=this.addMsg.MenuStatus.toString();
// //console.log(this.DataList[index])
if(this.addMsg.MenuStyle && this.addMsg.MenuStyle!=""){
let style=JSON.parse(this.DataList[index].MenuStyle)
this.addMsg.MenuStyleIcon=style.icon
this.addMsg.MenuStyleColor=style.color
}
this.currentUpdateIndex=index
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
clearMessage() {
this.addMsg = {
'Tier':'',
'MenuName': '',
'MenuUrl': '',
'ParentId': '',
'MenuStyle': '',
'MenuStatus': '0',
MenuStyleIcon:'',
MenuStyleColor:''
}
},
resetPageIndex() {
this.msg.pageIndex = 1
this.currentPage = 1
},
submitForm(addMsg) {//提交创建、修改表单
this.$refs[addMsg].validate((valid) => {
if (valid) {
this.addData()
} else {
return false;
}
});
},
closeChangeMachie(done){//弹出框关闭初始化弹框内表单
done();
this.resetForm('addMsg');
},
resetForm(formName) {//弹出框取消 初始化谈框内表单
this.$refs[formName].resetFields();
}
}
return {
dialogTitle: '',
DataList: '',
total: 0,
pageSize: '',
currentPage: 1,
thisColor: '#E95252',
predefineColors: [
'#ff4500',
'#ff8c00',
'#ffd700',
'#90ee90',
'#00ced1',
'#1e90ff',
'#c71585',
],
outerVisible: false,
addStatus: [{
value: '0',
label: '开启'
}, {
value: '1',
label: '关闭'
}],
msg: { //列表查询请求数据
"pageIndex": 1,
'pageSize': 15,
'MenuName': '',
'ParentId': '',
'MenuStatus': '0',
'Tier': ''
},
addMsg: {
'MenuId': '0',
'Tier': '',
'MenuName': '',
'MenuUrl': '',
'ParentId': '0',
'MenuStyle': '',
'MenuStatus': '0',
MenuStyleIcon: '',
MenuStyleColor: '',
Sort: 0
},
rules: {
Sort: [{
required: true,
message: '请输入排序',
trigger: 'blur'
}],
MenuName: [{
required: true,
message: '请输入菜单名称',
trigger: 'blur'
}],
Tier: [{
required: true,
message: '请选择菜单层级',
trigger: 'change'
}],
ParentId: [{
validator: validateParent,
trigger: 'change'
}],
MenuUrl: [{
validator: validateUrl,
trigger: 'blur'
}],
},
getParentNodeMsg: {
'Tier': '0',
"ParentId": '0',
"MenuStatus": '0',
"MenuName": '',
},
layerGetParentNodeData: [],
getParentNodeData: [],
currentUpdateIndex: -1
}
},
mounted() {
this.getList();
this.getParentNode()
},
filters: {
tierFormat(value) {
if (value == '1')
return '一级'
if (value == '2')
return '二级'
if (value == '3')
return '三级'
}
},
methods: {
getParentNode() { //上级权限
this.apipost('admin_get_SysMenuGetList', this.getParentNodeMsg, res => {
if (this.outerVisible) {
this.layerGetParentNodeData = res.data.data;
} else {
this.getParentNodeData = res.data.data;
}
}, err => {})
},
}
getList() { //列表查询
this.apipost('admin_get_SysMenuGetPageList', this.msg, res => {
if (res.data.resultCode == 1) {
this.DataList = res.data.data.pageData;
this.total = res.data.data.count;
}
}, err => {})
},
getChildMenu() {
this.addMsg.ParentId = '';
if (this.addMsg.Tier == 1) {
this.layerGetParentNodeData = null;
} else {
this.getParentNodeMsg.Tier = this.addMsg.Tier - 1;
this.getParentNode();
}
},
addData() { //新增数据
if (this.addMsg.MenuName == '') {
this.$message.error('菜单名不能为空');
return
}
let mStyle = {
"icon": "",
"color": ""
};
mStyle.icon = this.addMsg.MenuStyleIcon;
mStyle.color = this.addMsg.MenuStyleColor;
this.addMsg.MenuStyle = JSON.stringify(mStyle);
if (this.addMsg.Tier == 1)
this.addMsg.ParentId = 0
this.apipost('admin_post_SysMenuSet', this.addMsg, res => {
if (res.data.resultCode == 1) {
this.outerVisible = false;
this.$message.success(res.data.message)
if (this.currentUpdateIndex > -1) {
this.DataList[this.currentUpdateIndex] = this.addMsg
}
} else {
this.$message.error(res.data.message);
}
}, err => {})
},
updateData(index, id) { //修改
this.apipost('admin_get_SysMenuGet', {
MenuId: id
}, res => {
let updateList = res.data.data
this.addMsg.MenuId = id
this.addMsg.MenuName = updateList.MenuName
this.addMsg.Tier = updateList.Tier.toString()
this.addMsg.ParentId = updateList.ParentId
this.addMsg.Sort = updateList.Sort
this.addMsg.GroupingCode = updateList.GroupingCode
this.addMsg.MenuUrl = updateList.MenuUrl
this.addMsg.MenuStatus = updateList.MenuStatus.toString()
let style = JSON.parse(updateList.MenuStyle)
this.addMsg.MenuStyleIcon = style.icon
this.addMsg.MenuStyleColor = style.color
this.currentUpdateIndex = index
}, err => {})
this.getChildMenu();
if (this.addMsg.MenuStyle && this.addMsg.MenuStyle != "") {
let style = JSON.parse(this.DataList[index].MenuStyle)
this.addMsg.MenuStyleIcon = style.icon
this.addMsg.MenuStyleColor = style.color
}
this.currentUpdateIndex = index
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
clearMessage() {
this.addMsg = {
'Tier': '',
'MenuName': '',
'MenuUrl': '',
'ParentId': '',
'MenuStyle': '',
'MenuStatus': '0',
MenuStyleIcon: '',
MenuStyleColor: ''
}
},
resetPageIndex() {
this.msg.pageIndex = 1
this.currentPage = 1
},
submitForm(addMsg) { //提交创建、修改表单
this.$refs[addMsg].validate((valid) => {
if (valid) {
this.addData()
} else {
return false;
}
});
},
closeChangeMachie(done) { //弹出框关闭初始化弹框内表单
done();
this.resetForm('addMsg');
},
resetForm(formName) { //弹出框取消 初始化谈框内表单
this.$refs[formName].resetFields();
}
}
}
</script>
\ No newline at end of file
......@@ -856,6 +856,14 @@ export default {
title: '订房管理'
},
},
{
path: '/roomQuery', //订房查询
name: 'roomQuery',
component: resolve => require(['@/components/Hotel/roomQuery'], resolve),
meta: {
title: '订房查询'
},
},
{
path: '/roomReservationsDetails', //订房管理详情
name: 'roomReservationsDetails',
......
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