Commit 549434f4 authored by 黄奎's avatar 黄奎

新增酒店统计页面下载功能

parent d5e5afbb
......@@ -202,9 +202,11 @@
.hotelSalesBoard .stock1 {
color: red;
}
.hotelSalesBoard .stock2 {
color: white;
}
/* 日期样式结束*/
</style>
......@@ -228,8 +230,7 @@
</li>
<li>
<span><em>{{$t('admin.admin_company')}}</em>
<el-select filterable v-model='msg.OutBranchId'
:placeholder="$t('pub.unlimitedSel')">
<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>
......@@ -245,8 +246,19 @@
</el-select>
</span>
</li>
<li>
<span>
<em>供应商</em>
<el-select v-model="msg.Supplier" placeholder="请选择">
<el-option :label="$t('pub.unlimitedSel')" :value='0'></el-option>
<el-option v-for="(item,index) in SupplierList" :key="index" :label="item.Name" :value="item.ID">
</el-option>
</el-select>
</span>
</li>
<li style="margin-right:50px;">
<button class="normalBtn" type="button" @click="GetHoltelInventory()">{{$t('pub.searchBtn')}}</button>
<input type="button" class="normalBtn" value="下载" @click="DownLoadHotelSalesBoard()" />
</li>
</ul>
</div>
......@@ -297,7 +309,8 @@
(总: {{subItem.Inventory}} &nbsp;&nbsp;
<a title="点击跳转到订房管理" v-if="subItem.UseInventory>0"
@click="goUrl('roomReservations',subItem,dayItem.DayStr,'订房管理')"
style="cursor:pointer;text-decoration:underline;" :class="subItem.InventoryType==4 ? 'stock1' : 'stock2'">已用:{{subItem.UseInventory}}</a>
style="cursor:pointer;text-decoration:underline;"
:class="subItem.InventoryType==4 ? 'stock1' : 'stock2'">已用:{{subItem.UseInventory}}</a>
<span v-else>已用:{{subItem.UseInventory}}</span>
)
</p>
......@@ -319,7 +332,9 @@
Province: 0,
City: 0,
loading: false,
OutBranchId:-1,
OutBranchId: -1,
//供应商编号
Supplier:0,
},
//分公司列表
companyList: [],
......@@ -341,6 +356,8 @@
provinceList: [],
cityList: [],
district: [],
//供应商列表
SupplierList:[]
};
},
methods: {
......@@ -511,6 +528,33 @@
err => {}
);
},
//Excel下载
DownLoadHotelSalesBoard() {
if (this.msg.HotelId > 0) {
this.msg.loading = true;
let qMsg = {
queryMsg: this.msg,
uid: this.getLocalStorage().EmployeeId
};
let fileName = "酒店统计" + this.$commonUtils.getCurrentDate() + ".xls";
this.GetLocalFile("hotel_get_downloadHotelSalesBoard", qMsg, fileName,
res => {
this.msg.loading = false;
});
} else {
this.Info("请选择要下载的酒店!");
}
},
// 获取供应商
initSupplier() {
this.apipost("supplier_post_GetAllList", {
Type: 1
}, res => {
if (res.data.resultCode === 1) {
this.SupplierList = res.data.data;
}
}, err => {});
},
},
mounted() {
//初始化日历
......@@ -523,6 +567,7 @@
this.currentMonth = myDate.getMonth() + 1;
this.msg.Year = this.currentYear;
this.msg.Month = this.currentDay;
this.initSupplier();
this.getBranchList();
this.GetHotelList();
this.initCalendar();
......
......@@ -356,6 +356,17 @@
</el-select>
</span>
</li>
<li>
<span>
<em>供应商</em>
<el-select v-model="msg.Supplier" placeholder="请选择">
<el-option :label="$t('pub.unlimitedSel')" :value='0'></el-option>
<el-option v-for="(item,index) in SupplierList" :key="index" :label="item.Name" :value="item.ID">
</el-option>
</el-select>
</span>
</li>
<li class='time'>
<div class="block date">
<label class="demonstration">{{$t('pub.date')}}</label>
......@@ -413,6 +424,8 @@
Country: "651",
Province: 0,
City: 0,
//供应商编号
Supplier: 0,
},
DataList: [],
loading: true,
......@@ -434,6 +447,8 @@
provinceList: [],
cityList: [],
district: [],
//供应商列表
SupplierList: []
}
},
methods: {
......@@ -524,11 +539,22 @@
},
err => {}
);
}
},
// 获取供应商
initSupplier() {
this.apipost("supplier_post_GetAllList", {
Type: 1
}, res => {
if (res.data.resultCode === 1) {
this.SupplierList = res.data.data;
}
}, err => {});
},
},
mounted() {
this.msg.HotelId = this.$route.query.HotelId === undefined ? 0 : this.$route.query.HotelId;
this.initSupplier();
this.GetHotelList();
this.getProvinceList(651, 1);
this.getList();
......
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