|
@@ -20,6 +20,9 @@
|
|
|
style="float: left; overflow: hidden"
|
|
style="float: left; overflow: hidden"
|
|
|
class="table-page-search-submitButtons"
|
|
class="table-page-search-submitButtons"
|
|
|
>
|
|
>
|
|
|
|
|
+ <span style="margin-right:10px;">
|
|
|
|
|
+ 包含当日预离房<a-switch v-model="queryParam.isContainLeave" />
|
|
|
|
|
+ </span>
|
|
|
<a-button type="primary" @click="searchQuery" icon="search"
|
|
<a-button type="primary" @click="searchQuery" icon="search"
|
|
|
>查询</a-button
|
|
>查询</a-button
|
|
|
>
|
|
>
|
|
@@ -38,7 +41,7 @@
|
|
|
<!-- 查询区域-END -->
|
|
<!-- 查询区域-END -->
|
|
|
|
|
|
|
|
<!-- table区域-begin -->
|
|
<!-- table区域-begin -->
|
|
|
- <div v-if="false">
|
|
|
|
|
|
|
+ <div>
|
|
|
<!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
|
<!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
|
|
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
|
|
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
|
|
|
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
|
|
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
|
|
@@ -68,6 +71,12 @@
|
|
|
/> -->
|
|
/> -->
|
|
|
0/0/{{ text }}
|
|
0/0/{{ text }}
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+
|
|
|
|
|
+ <template :slot="'long'" slot-scope="text, record">
|
|
|
|
|
+ <!-- {{text.leaveCount}}/{{text.livingCount}} -->
|
|
|
|
|
+ <a @click="leaveCountOpen(text)">{{text.leaveCount}}</a> / <a @click="openModal(text)">{{text.livingCount}}</a> / <span>{{record.count*1 - text.livingCount*1}}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
<template slot="htmlSlot" slot-scope="text">
|
|
<template slot="htmlSlot" slot-scope="text">
|
|
|
<div v-html="text"></div>
|
|
<div v-html="text"></div>
|
|
|
</template>
|
|
</template>
|
|
@@ -121,6 +130,16 @@
|
|
|
</a-menu>
|
|
</a-menu>
|
|
|
</a-dropdown>
|
|
</a-dropdown>
|
|
|
</span>
|
|
</span>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <template slot="footer" slot-scope="currentPageData" v-if="dataList.length>0">
|
|
|
|
|
+ <a-table size="middle" :scroll="{ x: true }" bordered rowKey="id" :showHeader="false" :pagination="false" :columns="columns" :dataSource="dataList">
|
|
|
|
|
+ <template slot="action" slot-scope="text, record">
|
|
|
|
|
+ {{record}}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </a-table>
|
|
|
|
|
+ </template>
|
|
|
</a-table>
|
|
</a-table>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -128,6 +147,7 @@
|
|
|
ref="modalForm"
|
|
ref="modalForm"
|
|
|
@ok="modalFormOk"
|
|
@ok="modalFormOk"
|
|
|
></bus-member-balance-log-modal> -->
|
|
></bus-member-balance-log-modal> -->
|
|
|
|
|
+ <ForWardFangTaiModal ref="forWardModal" />
|
|
|
</a-card>
|
|
</a-card>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -138,6 +158,8 @@ import { JeecgListMixin } from "@/mixins/JeecgListMixin2";
|
|
|
import { formatDate } from "@/utils/util";
|
|
import { formatDate } from "@/utils/util";
|
|
|
import EditableCell from "@views/room/modules/checkIn/EditableCell.vue";
|
|
import EditableCell from "@views/room/modules/checkIn/EditableCell.vue";
|
|
|
import { httpAction, postAction,getAction } from "@/api/manage";
|
|
import { httpAction, postAction,getAction } from "@/api/manage";
|
|
|
|
|
+import ForWardFangTaiModal from './forWardFangTaiModal.vue';
|
|
|
|
|
+
|
|
|
const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
|
|
const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
|
|
|
import moment from "moment";
|
|
import moment from "moment";
|
|
|
const date = new Date();
|
|
const date = new Date();
|
|
@@ -147,15 +169,19 @@ export default {
|
|
|
mixins: [JeecgListMixin, mixinDevice],
|
|
mixins: [JeecgListMixin, mixinDevice],
|
|
|
components: {
|
|
components: {
|
|
|
EditableCell,
|
|
EditableCell,
|
|
|
|
|
+ ForWardFangTaiModal
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
description: "远期房态",
|
|
description: "远期房态",
|
|
|
queryParam: {
|
|
queryParam: {
|
|
|
gradeId: "全天房",
|
|
gradeId: "全天房",
|
|
|
- startTime: moment(new Date()).format("YYYY-MM-DD"),
|
|
|
|
|
- endTime: moment(endDate).format("YYYY-MM-DD"),
|
|
|
|
|
|
|
+ start: moment(new Date()).format("YYYY-MM-DD"),
|
|
|
|
|
+ end: moment(endDate).format("YYYY-MM-DD"),
|
|
|
|
|
+ isContainLeave: true
|
|
|
},
|
|
},
|
|
|
|
|
+ modalVisible:false,
|
|
|
|
|
+ modalTitle: "占用房间",
|
|
|
datetime: [
|
|
datetime: [
|
|
|
moment(new Date(), "YYYY-MM-DD"),
|
|
moment(new Date(), "YYYY-MM-DD"),
|
|
|
moment(endDate, "YYYY-MM-DD"),
|
|
moment(endDate, "YYYY-MM-DD"),
|
|
@@ -170,8 +196,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
],
|
|
],
|
|
|
url: {
|
|
url: {
|
|
|
- list:
|
|
|
|
|
- "/rooms/cesRoomLayoutPriceDate/pageList?hotelIds[]=" + hotelInfo.id,
|
|
|
|
|
|
|
+ list:"/business/busRoomBookingOrders/forward-fangtai",
|
|
|
delete: "/business/busMemberBalanceLog/delete",
|
|
delete: "/business/busMemberBalanceLog/delete",
|
|
|
deleteBatch: "/business/busMemberBalanceLog/deleteBatch",
|
|
deleteBatch: "/business/busMemberBalanceLog/deleteBatch",
|
|
|
exportXlsUrl: "/business/busMemberBalanceLog/exportXls",
|
|
exportXlsUrl: "/business/busMemberBalanceLog/exportXls",
|
|
@@ -197,6 +222,29 @@ export default {
|
|
|
importExcelUrl: function () {
|
|
importExcelUrl: function () {
|
|
|
return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
|
|
return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
|
|
|
},
|
|
},
|
|
|
|
|
+ dataList() {
|
|
|
|
|
+ if (this.dataSource.length == 0) {
|
|
|
|
|
+ return []
|
|
|
|
|
+ }
|
|
|
|
|
+ let arr = Object.keys(this.dataSource[0])
|
|
|
|
|
+ let brr = []
|
|
|
|
|
+ arr = arr.filter(item => item != 'layout_name' && item != 'flag' && item != 'data' && item!='count')
|
|
|
|
|
+ let sum = 0
|
|
|
|
|
+ console.log(arr);
|
|
|
|
|
+ arr.forEach(item => {
|
|
|
|
|
+ sum += this.dataSource[this.dataSource.length - 1][item]
|
|
|
|
|
+ })
|
|
|
|
|
+ arr.forEach(item => {
|
|
|
|
|
+ console.log(item);
|
|
|
|
|
+ let a = {}
|
|
|
|
|
+ a[item] = `${this.dataSource.reduce((a, b) => a + b[item].leaveCount, 0)} ` + '/' + ` ${this.dataSource.reduce((a, b) => a + b[item].livingCount, 0)}` + ' / ' + (this.dataSource.reduce((a, b) => a + b.count*1, 0) - this.dataSource.reduce((a, b) => a + b[item].livingCount, 0))
|
|
|
|
|
+ brr.push(a)
|
|
|
|
|
+ })
|
|
|
|
|
+ let obj1 = {}
|
|
|
|
|
+ obj1=Object.assign({}, ...brr, {layout_name: '合计'},{flag:true}, {count: this.dataSource.reduce((a, b) => a + b.count*1, 0)});
|
|
|
|
|
+ console.log(obj1);
|
|
|
|
|
+ return [obj1]
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
onCellChange(key, dataIndex, value) {
|
|
onCellChange(key, dataIndex, value) {
|
|
@@ -227,8 +275,8 @@ export default {
|
|
|
if (this.queryParam.hotelIds && this.queryParam.hotelIds.length > 0) {
|
|
if (this.queryParam.hotelIds && this.queryParam.hotelIds.length > 0) {
|
|
|
this.url.list = "/rooms/cesRoomLayoutPriceDate/pageList";
|
|
this.url.list = "/rooms/cesRoomLayoutPriceDate/pageList";
|
|
|
} else {
|
|
} else {
|
|
|
- this.url.list =
|
|
|
|
|
- "/rooms/cesRoomLayoutPriceDate/pageList?hotelIds[]=" + hotelInfo.id;
|
|
|
|
|
|
|
+ this.url.list = "/business/busRoomBookingOrders/forward-fangtai"
|
|
|
|
|
+ // "/rooms/cesRoomLayoutPriceDate/pageList?hotelIds[]=" + hotelInfo.id;
|
|
|
}
|
|
}
|
|
|
this.loadData(1);
|
|
this.loadData(1);
|
|
|
this.selectedRowKeys = [];
|
|
this.selectedRowKeys = [];
|
|
@@ -242,8 +290,8 @@ export default {
|
|
|
onChange(e, dateString) {
|
|
onChange(e, dateString) {
|
|
|
// console.log("Selected Time: ", e);
|
|
// console.log("Selected Time: ", e);
|
|
|
// console.log("Formatted Selected Time: ", dateString);
|
|
// console.log("Formatted Selected Time: ", dateString);
|
|
|
- this.queryParam.startTime = dateString[0];
|
|
|
|
|
- this.queryParam.endTime = dateString[1];
|
|
|
|
|
|
|
+ this.queryParam.start = dateString[0];
|
|
|
|
|
+ this.queryParam.end = dateString[1];
|
|
|
},
|
|
},
|
|
|
initDictConfig() {},
|
|
initDictConfig() {},
|
|
|
getSuperFieldList() {
|
|
getSuperFieldList() {
|
|
@@ -266,9 +314,127 @@ export default {
|
|
|
fieldList.push({ type: "string", value: "code", text: "流水号" });
|
|
fieldList.push({ type: "string", value: "code", text: "流水号" });
|
|
|
this.superFieldList = fieldList;
|
|
this.superFieldList = fieldList;
|
|
|
},
|
|
},
|
|
|
|
|
+ loadData(arg) {
|
|
|
|
|
+ if (!this.url.list) {
|
|
|
|
|
+ this.$message.error("请设置url.list属性!")
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ //加载数据 若传入参数1则加载第一页的内容
|
|
|
|
|
+ if (arg === 1) {
|
|
|
|
|
+ this.ipagination.current = 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ var params = this.getQueryParams();//查询条件
|
|
|
|
|
+ this.loading = true;
|
|
|
|
|
+ this.columns = [
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "房型",
|
|
|
|
|
+ align: "center",
|
|
|
|
|
+ dataIndex: "layout_name",
|
|
|
|
|
+ width: 300,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "",
|
|
|
|
|
+ align: "center",
|
|
|
|
|
+ dataIndex: "count",
|
|
|
|
|
+ width: 40,
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ getAction(this.url.list, params).then((res) => {
|
|
|
|
|
+ if (res.success) {
|
|
|
|
|
+ //update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
|
|
|
|
+ this.dataSource = res.result.records || res.result.dateList || res.result;
|
|
|
|
|
+ if (res.result.layoutRooms.length>0) {
|
|
|
|
|
+ // this.dataSource = this.dataSource.map((item, index) => ({
|
|
|
|
|
+ // layout_name:item
|
|
|
|
|
+ // }))
|
|
|
|
|
+ let brr = []
|
|
|
|
|
+ res.result.layoutRooms.forEach(ele=>{
|
|
|
|
|
+ // console.log(ele);
|
|
|
|
|
+ brr.push({
|
|
|
|
|
+ layout_name:ele.layoutName,
|
|
|
|
|
+ count:ele.roomCount,
|
|
|
|
|
+ data:res.result.dateList.filter(item => item.layoutId == ele.layoutId)
|
|
|
|
|
+ })
|
|
|
|
|
+ // brr = res.result.dateList.filter(item => item.layoutId == ele.layoutId)
|
|
|
|
|
+ })
|
|
|
|
|
+ // console.log(brr);
|
|
|
|
|
+ brr.forEach(ele=>{
|
|
|
|
|
+ ele.data.forEach(item=>{
|
|
|
|
|
+ ele[item.date] = item
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ console.log(brr);
|
|
|
|
|
+ let arr = []
|
|
|
|
|
+ brr[0].data.forEach(ele=>{
|
|
|
|
|
+ arr.push({
|
|
|
|
|
+ title: ele.date,
|
|
|
|
|
+ align: "center",
|
|
|
|
|
+ dataIndex: ele.date,
|
|
|
|
|
+ width:'120px',
|
|
|
|
|
+ scopedSlots: {
|
|
|
|
|
+ customRender: 'long'
|
|
|
|
|
+ },
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ this.dataSource = brr
|
|
|
|
|
+ this.columns = this.columns.concat(arr)
|
|
|
|
|
+ console.log('1111111111111111',arr);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (res.result.total) {
|
|
|
|
|
+ this.ipagination.total = res.result.total;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.ipagination.total = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.warning(res.message)
|
|
|
|
|
+ }
|
|
|
|
|
+ }).finally(() => {
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ leaveCountOpen(data){
|
|
|
|
|
+ console.log(data);
|
|
|
|
|
+ this.$refs.forWardModal.modalVisible = true
|
|
|
|
|
+ this.$refs.forWardModal.modalTitle = '今日预离'
|
|
|
|
|
+ this.$refs.forWardModal.tableData = data.leaveOrders
|
|
|
|
|
+ this.$refs.forWardModal.tableDataCopy = data.leaveOrders
|
|
|
|
|
+ },
|
|
|
|
|
+ openModal(data){
|
|
|
|
|
+ console.log(data);
|
|
|
|
|
+ this.$refs.forWardModal.modalVisible = true
|
|
|
|
|
+ this.$refs.forWardModal.modalTitle = '占用房间'
|
|
|
|
|
+ this.$refs.forWardModal.tableData = data.livingOrders
|
|
|
|
|
+ this.$refs.forWardModal.tableDataCopy = data.livingOrders
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
-<style scoped>
|
|
|
|
|
|
|
+<style lang="less" scoped>
|
|
|
@import "~@assets/less/common.less";
|
|
@import "~@assets/less/common.less";
|
|
|
|
|
+/deep/ .ant-table-content .ant-table-body {
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ z-index: 2;
|
|
|
|
|
+ background: #FFFFFF;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/deep/ .ant-table-footer .ant-table-body {
|
|
|
|
|
+ // overflow: hidden !important;
|
|
|
|
|
+ position: relative !important;
|
|
|
|
|
+ z-index: 1 !important;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/deep/ .ant-table-content>.ant-table-footer {
|
|
|
|
|
+ padding: 0 !important;
|
|
|
|
|
+ top: 0px;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ z-index: 0;
|
|
|
|
|
+}
|
|
|
|
|
+/deep/.ant-table-footer{
|
|
|
|
|
+ padding: 0 !important;
|
|
|
|
|
+ top: 0px;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ z-index: 2;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|