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

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

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