Browse Source

Merge branch 'master' of http://49.4.53.36:3000/hotel/hotel-saas-tenant-frontend

qh 2 years ago
parent
commit
f4fbf3247e
55 changed files with 15424 additions and 709 deletions
  1. 2 1
      src/utils/excloudHotelIdParamPath/MemeberController.js
  2. 222 0
      src/views/fangwu/index.vue
  3. 282 0
      src/views/fangwu/tabList/LockRoomRecords.vue
  4. 349 0
      src/views/fangwu/tabList/clearRecords.vue
  5. 303 0
      src/views/fangwu/tabList/clearRoomManagement.vue
  6. 298 0
      src/views/fangwu/tabList/houseTypeConsumables.vue
  7. 303 0
      src/views/fangwu/tabList/maintenanceRecords.vue
  8. 252 0
      src/views/markets/agreementunit.vue
  9. 1 1
      src/views/markets/marketInfo.vue
  10. 368 0
      src/views/markets/modules/agreementUnit/agreementUnitForm.vue
  11. 84 0
      src/views/markets/modules/agreementUnit/agreementUnitModal.Style#Drawer.vue
  12. 60 0
      src/views/markets/modules/agreementUnit/agreementUnitModal.vue
  13. 1 1
      src/views/orders/orderInfo.vue
  14. 318 0
      src/views/orders/servicerepairorderinfo.vue
  15. 695 0
      src/views/room/calendarfangtai.vue
  16. 563 268
      src/views/room/fangtailive.vue
  17. 274 0
      src/views/room/forwardfangtai.vue
  18. 253 0
      src/views/room/guestorders.vue
  19. 246 0
      src/views/room/leasegoods.vue
  20. 670 134
      src/views/room/modules/checkIn/BillRoomForm.vue
  21. 5 5
      src/views/room/modules/checkIn/BillRoomFormModal.vue
  22. 273 97
      src/views/room/modules/checkIn/BillRoomInfo.vue
  23. 3 2
      src/views/room/modules/checkIn/BillRoomInfoModal.vue
  24. 236 0
      src/views/room/modules/checkIn/CustomerForm.vue
  25. 60 0
      src/views/room/modules/checkIn/CustomerModal.vue
  26. 80 22
      src/views/room/modules/checkIn/SelectRoomForm.vue
  27. 2 2
      src/views/room/modules/checkIn/SelectRoomFormModal.vue
  28. 239 0
      src/views/room/modules/customer/CustomerForm.vue
  29. 60 0
      src/views/room/modules/customer/CustomerModal.vue
  30. 222 0
      src/views/room/modules/leasegoods/CesOrderLeaseGoodsForm.vue
  31. 84 0
      src/views/room/modules/leasegoods/CesOrderLeaseGoodsModal.Style#Drawer.vue
  32. 60 0
      src/views/room/modules/leasegoods/CesOrderLeaseGoodsModal.vue
  33. 1348 0
      src/views/room/modules/schedule/EditScheduleRoomForm.vue
  34. 88 0
      src/views/room/modules/schedule/EditScheduleRoomModal.vue
  35. 576 102
      src/views/room/modules/schedule/ScheduleRoomForm.vue
  36. 58 47
      src/views/room/modules/schedule/ScheduleRoomModal.vue
  37. 35 22
      src/views/room/modules/schedule/SelectRoomForm.vue
  38. 2 2
      src/views/room/modules/schedule/SelectRoomFormModal.vue
  39. 585 0
      src/views/room/modules/scheduleTeam/BatchSelectRoomTypeForm.vue
  40. 82 0
      src/views/room/modules/scheduleTeam/BatchSelectRoomTypeFormModal.vue
  41. 1335 0
      src/views/room/modules/scheduleTeam/EdiBatchScheduleRoomForm.vue
  42. 527 0
      src/views/room/modules/scheduleTeam/EditBatchSelectRoomTypeForm.vue
  43. 77 0
      src/views/room/modules/scheduleTeam/EditBatchSelectRoomTypeFormModal.vue
  44. 929 0
      src/views/room/modules/scheduleTeam/EditScheduleRoomFormMain.vue
  45. 1071 0
      src/views/room/modules/scheduleTeam/ScheduleRoomForm.vue
  46. 92 0
      src/views/room/modules/scheduleTeam/ScheduleRoomModal.vue
  47. 279 0
      src/views/room/modules/scheduleTeam/SelectRoomForm.vue
  48. 65 0
      src/views/room/modules/scheduleTeam/SelectRoomFormModal.vue
  49. 200 0
      src/views/room/scheduledetail.vue
  50. 312 0
      src/views/room/scheduleteamdetail.vue
  51. 336 0
      src/views/settings/components/roomModules/housePriceSchemeList.vue
  52. 47 3
      src/views/settings/components/roomModules/marketObjectiveList.vue
  53. 449 0
      src/views/settings/components/roomModules/modules/housePriceSchemeForm.vue
  54. 60 0
      src/views/settings/components/roomModules/modules/housePriceSchemeModal.vue
  55. 3 0
      src/views/settings/roomSettings.vue

+ 2 - 1
src/utils/excloudHotelIdParamPath/MemeberController.js

@@ -2,6 +2,7 @@ export default {
     name: '会员管理模块',
     excloudUrls: [
         '/business/busMemberCard/list',
-        '/business/busMemberBalanceLog/list'
+        '/business/busMemberBalanceLog/list',
+        '/bus/busCustomer/list'
     ]
 }

+ 222 - 0
src/views/fangwu/index.vue

@@ -0,0 +1,222 @@
+<template>
+<a-card :bordered="false">
+    <a-tabs default-active-key="1" @change="callback">
+        <a-tab-pane key="1" tab="房务数据概览">
+            <div>
+                <h3>今日房务管理</h3>
+                <a-card style="width:50%;" class="card">
+                    <div class="grid-day">
+                        <div>
+                            <div>今日锁房</div>
+                            <div>0间</div>
+                        </div>
+                        <div>
+                            <div>正在维修中房间</div>
+                            <div>0间</div>
+                        </div>
+                        <div>
+                            <div>今日完成维修房间</div>
+                            <div>0间</div>
+                        </div>
+                    </div>
+                </a-card>
+            </div>
+
+            <div>
+                <h3>分派房</h3>
+                <div class="grid-assign">
+                    <a-card class="card">
+                        <div class="assign-flex">
+                            <div>今日待派房间<span>0</span>间,已经分配了<span>0</span>间,剩余<span>0</span>间</div>
+                            <div style="color:#1890FF">点击分配</div>
+                        </div>
+                        <div style="text-indent: 2em;" class="assign-content">
+                            <div v-for="(item, index) in 15" :key="index">
+                                <span style="color:#1890FF">{{'小明'}}</span>:{{'0间'}}
+                            </div>
+                        </div>
+                    </a-card>
+                    <a-card class="card">
+                        <div>
+                            <div>房务审核记录及调整</div>
+                        </div>
+                        <div class="assgin-center">0条需要审核,点击查看> </div>
+                    </a-card>
+                    <a-card class="card">
+                        <div>
+                            <div>房屋审核记录及调整</div>
+                        </div>
+                        <div class="assgin-right">
+                            <a-button>点击设置</a-button>
+                        </div>
+                    </a-card>
+                </div>
+            </div>
+
+            <div>
+                <h3>房扫记录</h3>
+                <div class="">
+                    <ClearRecords />
+                </div>
+            </div>
+
+            <div>
+                <h3>房间易耗品记录</h3>
+                <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;">
+                    <div style="display:flex;align-items:center;width:100%;">
+                        <div class="list-container">
+                            <div class="list-item" v-for="(item, index) in list" :key="index" :class="{active: activeIndex === index}" @click="handleClick(index)">
+                                {{ item }}
+                            </div>
+                        </div>
+                        <a-range-picker v-show="activeIndex==4" @change="onChange" size="large" />
+                    </div>
+
+                    <a-button style="background:#1890ff;color:#fff;">配置易耗品</a-button>
+                </div>
+                <a-card class="card">
+                    <div>
+                        客房易耗品消耗数量
+                    </div>
+                    <div>
+                        布草换洗
+                    </div>
+                </a-card>
+            </div>
+        </a-tab-pane>
+        <a-tab-pane key="2" tab="维修记录" force-render>
+            <MaintenanceRecords />
+        </a-tab-pane>
+        <a-tab-pane key="3" tab="锁房记录">
+            <LockRoomRecords />
+        </a-tab-pane>
+        <a-tab-pane key="4" tab="房扫管理">
+            <ClearRoomManagement />
+        </a-tab-pane>
+        <a-tab-pane key="5" tab="房型易耗品">
+            <HouseTypeConsumablesVue />
+        </a-tab-pane>
+    </a-tabs>
+</a-card>
+</template>
+
+<script>
+import ClearRecords from './tabList/clearRecords.vue'
+import ClearRoomManagement from './tabList/clearRoomManagement.vue'
+import HouseTypeConsumablesVue from './tabList/houseTypeConsumables.vue'
+import LockRoomRecords from './tabList/LockRoomRecords.vue'
+import MaintenanceRecords from './tabList/maintenanceRecords.vue'
+export default {
+    components: {
+        ClearRecords,
+        MaintenanceRecords,
+        LockRoomRecords,
+        ClearRoomManagement,
+        HouseTypeConsumablesVue
+    },
+    data() {
+        return {
+            list: ['今天', '昨日', '本周', '本月', '更多'],
+            activeIndex: 0,
+        }
+    },
+    methods: {
+        callback(key) {
+            console.log(key)
+        },
+        handleClick(index) {
+            this.activeIndex = index
+            this.searchQuery()
+        },
+        onChange(date, dateString) {
+            console.log(date, dateString)
+        },
+    },
+    mounted() {
+
+    }
+}
+</script>
+
+<style lang="less">
+.grid-day {
+    display: grid;
+    grid-template-columns: 1fr 1fr 1fr;
+}
+
+.grid-assign {
+    display: grid;
+    grid-template-columns: 2fr 1fr 1fr;
+    gap: 10px;
+
+    .assign-flex {
+        display: flex;
+        justify-content: space-between;
+    }
+
+    .assign-content {
+        display: flex;
+        flex-wrap: wrap;
+        margin-top: 18px;
+    }
+
+    .assgin-center {
+        color: #1890ff;
+        text-align: center;
+        margin-top: 25px;
+    }
+
+    .assgin-right {
+        text-align: center;
+        margin-top: 18px;
+
+        button {
+            background: #1890ff;
+            color: #fff;
+        }
+    }
+}
+
+.grid-clearRecords {
+    display: grid;
+    grid-template-columns: 2fr 1fr;
+    gap: 10px;
+}
+
+.list-container {
+    display: grid;
+    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
+    border: solid 1px #d9d9d9;
+    width: 300px;
+    border-radius: 5px;
+    margin-right: 10px;
+    overflow: hidden;
+}
+
+.list-item {
+    padding: 10px;
+    border-right: solid 1px #d9d9d9;
+    cursor: pointer;
+    text-align: center;
+}
+
+.list-item.active {
+    background-color: #1890ff;
+    color: #fff;
+}
+
+.card {
+    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
+    transition: 0.3s;
+    border-radius: 5px;
+    /* optional */
+}
+
+.card:hover {
+    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
+}
+
+h3 {
+    margin-top: 15px;
+}
+</style>

+ 282 - 0
src/views/fangwu/tabList/LockRoomRecords.vue

@@ -0,0 +1,282 @@
+<template>
+<a-card :bordered="false">
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+        <a-tag color="pink" v-if="buildingFloorSearchTag.name">
+            {{ buildingFloorSearchTag.name }}
+            <a-icon type="close" @click="onFliterClose" />
+        </a-tag>
+        <!-- <a-button @click="handleAdd" type="primary" icon="plus">新增房间</a-button>
+        <a-button @click="onAddBatch" type="primary" icon="tags">批量新增</a-button>
+        <a-popconfirm title="确定全部删除吗?" @confirm="delAll">
+            <a-button :disabled="delLoading" :loading="delLoading" type="primary" icon="stop">全部删除</a-button>
+        </a-popconfirm> -->
+        <j-input placeholder="房间号" v-model="queryParam.name" style="width: 200px;margin-right:8px;"></j-input>
+        <a-range-picker style="margin-right:8px;" @change="onChangeTime" />
+        <a-popconfirm v-if="selectedRowKeys.length > 0" title="确定删除吗?" @confirm="delBatch">
+            <a-button :disabled="delLoading" :loading="delLoading" icon="stop" style="">
+                批量删除</a-button>
+        </a-popconfirm>
+        <!-- <div style="display:flex;align-items:center;width:100%;">
+            <div class="list-container">
+                <div class="list-item" v-for="(item, index) in list" :key="index" :class="{active: activeIndex === index}" @click="handleClick(index)">
+                    {{ item }}
+                </div>
+            </div>
+            <a-range-picker v-show="activeIndex==4" @change="onChangeTime" size="large" />
+        </div> -->
+        <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+    </div>
+
+    <!-- table区域-begin -->
+    <div class="grid-clear">
+        <a-table ref="table" size="middle" :scroll="{ x: true }" bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{
+          selectedRowKeys: selectedRowKeys,
+          onChange: onSelectChange,
+        }" class="j-table-force-nowrap" @change="handleTableChange">
+
+            <template slot="layoutId" slot-scope="text, record">
+                {{ getLayoutName(record) }}
+            </template>
+            <template slot="prefix_name" slot-scope="text, record">
+                {{ (record.prefix || "") + record.name }}
+            </template>
+            <template slot="pictureSlot" slot-scope="text, record">
+                <img :src="record.cover" style="width:40px;height40px;" />
+            </template>
+            <template slot="htmlSlot" slot-scope="text">
+                <div v-html="text"></div>
+            </template>
+
+            <span slot="action" slot-scope="text, record">
+                <a @click="handleEdit(record)">编辑</a>
+
+                <a-divider type="vertical" />
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                    <a>删除</a>
+                </a-popconfirm>
+                <a-divider type="vertical" />
+                <a @click="handleImage(record)">图片</a>
+            </span>
+        </a-table>
+    </div>
+    <!-- <room-num-modal ref="modalForm" @ok="modalFormOk"></room-num-modal> -->
+    <!-- <room-imgs @saveOk="onImgSave" ref="roomimgmodal"></room-imgs> -->
+</a-card>
+</template>
+
+<script>
+import {
+    JeecgListMixin
+} from "@/mixins/JeecgListMixin";
+// import roomNumModal from "./roomNumModal.vue"; // todo roomLayoutForm 需要替换成房型的表单弹窗
+// import roomImgs from './roomImagesForm.vue'
+import {
+    getAllLayouts
+} from "@/api/roomLayout";
+import {
+    delBatch,
+    delAll
+} from '@/api/roomBuildingApi'
+let hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+export default {
+    mixins: [JeecgListMixin],
+    components: {
+        // roomNumModal,
+        // roomImgs
+    },
+    data() {
+        return {
+            list: ['今天', '昨日', '本周', '本月', '更多'],
+            activeIndex: 0,
+            delLoading: false,
+            layouts: [],
+            queryParam: {},
+            // 分页参数
+            ipagination: {
+                current: 1,
+                pageSize: 10,
+                pageSizeOptions: ["10", "20", "30"],
+                showTotal: (total, range) => {
+                    return range[0] + "-" + range[1] + " 共" + total + "条";
+                },
+                showQuickJumper: true,
+                showSizeChanger: true,
+                total: 0,
+            },
+            // 表头
+            columns: [{
+                    title: "房间号",
+                    align: "center",
+                    dataIndex: "hotelName",
+                },
+                {
+                    title: "状态",
+                    // align: "center",
+                    dataIndex: "buildName",
+                },
+                {
+                    title: "原因",
+                    // align: "center",
+                    dataIndex: "floorName",
+                }
+            ],
+            url: {
+                // list: 'org.jeecg.modules.business/busMarketMember/list',
+                list: "/rooms/cesRooms/list",
+                delete: "/rooms/cesRooms/remove",
+                deleteBatch: "/rooms/cesRooms/deleteBatch",
+                exportXlsUrl: "/rooms/cesRooms/exportXls",
+                importExcelUrl: "rooms/cesRooms/importExcel",
+            },
+            buildingFloorSearchTag: {
+                name: null
+            },
+            dictOptions: {},
+            superFieldList: [],
+            selectedRowKeys: [],
+            isorter: {
+                column: "createTime",
+                order: "desc",
+            },
+        };
+    },
+    created() {
+        // this.loadData()
+        getAllLayouts().then((res) => {
+            if (res.code == 200) {
+                this.layouts = res.result.records;
+                this.loadData();
+            }
+        });
+    },
+    methods: {
+        onImgSave() {
+            this.loadData()
+        },
+        onFliterClose() {
+            this.filters['buildId'] = null
+            this.filters['floorId'] = null
+            this.ipagination.current = 1
+            this.buildingFloorSearchTag.name = null
+            this.loadData()
+        },
+        // 搜索
+        searchParam(id, name, isBuilding) {
+            this.$set(this.buildingFloorSearchTag, 'name', name)
+            if (isBuilding) {
+                this.filters['buildId'] = id
+                if (this.filters['floorId']) {
+                    delete this.filters.floorId
+                }
+            } else {
+                this.filters['floorId'] = id
+                if (this.filters['buildId']) {
+                    delete this.filters.buildId
+                }
+            }
+            this.loadData()
+        },
+        getLayoutName(row) {
+            let i = this.layouts.findIndex((s) => s.id == row.layoutId);
+            if (i > -1) {
+                return this.layouts[i].name;
+            }
+            return "";
+        },
+        // 批量删除
+        delBatch() {
+            let hotelInfo = JSON.parse(localStorage.getItem('storeInfo'))
+            let keys = this.selectedRowKeys
+            this.delLoading = true
+            delBatch({
+                hotelId: hotelInfo.id,
+                idStr: keys.toString()
+            }).then(res => {
+                if (res.code == 200) {
+                    this.selectedRowKeys = []
+                    this.$message.success('删除成功');
+                    this.loadData()
+                }
+            }).finally(_ => {
+                this.delLoading = false
+            })
+        },
+        // 删除所有
+        delAll() {
+            let hotelInfo = JSON.parse(localStorage.getItem('storeInfo'))
+            this.delLoading = true
+            delAll({
+                hotelId: hotelInfo.id,
+            }).then(res => {
+                if (res.code == 200) {
+                    this.selectedRowKeys = []
+                    this.$message.success('全部删除成功');
+                    this.loadData()
+                }
+            }).finally(_ => {
+                this.delLoading = false
+            })
+        },
+        // 批量添加按钮
+        onAddBatch() {
+            this.$router.push('/tenant/gen/rooms');
+        },
+        // 全部删除
+        onDelAll() {},
+        // 显示图片弹窗
+        handleImage(row) {
+            this.$refs.roomimgmodal.setModel(row)
+        },
+        onSaveOk() {
+            this.loadData();
+        },
+        handleClick(index) {
+            this.activeIndex = index
+            this.searchQuery()
+        },
+        onChange(checkedValues) {
+            console.log('checked = ', checkedValues)
+        },
+        //选择日期
+        onChangeTime(date, dateString) {
+            console.log(date, dateString)
+        },
+    },
+};
+</script>
+
+<style scoped>
+@import "~@assets/less/common.less";
+
+.list-container {
+    display: grid;
+    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
+    border: solid 1px #d9d9d9;
+    width: 300px;
+    border-radius: 5px;
+    /* margin-bottom: 20px; */
+    margin-right: 10px;
+}
+
+.list-item {
+    padding: 10px;
+    border-right: solid 1px #d9d9d9;
+    cursor: pointer;
+    text-align: center;
+}
+
+.list-item.active {
+    background-color: #1890ff;
+    color: #fff;
+}
+
+.grid-clear {
+    /* display: grid; */
+    /* grid-template-columns: 2fr 1fr; */
+    /* grid-gap: 10px; */
+    width: 100%;
+}
+</style>

+ 349 - 0
src/views/fangwu/tabList/clearRecords.vue

@@ -0,0 +1,349 @@
+<template>
+<a-card :bordered="false">
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+        <a-tag color="pink" v-if="buildingFloorSearchTag.name">
+            {{ buildingFloorSearchTag.name }}
+            <a-icon type="close" @click="onFliterClose" />
+        </a-tag>
+        <!-- <a-button @click="handleAdd" type="primary" icon="plus">新增房间</a-button>
+        <a-button @click="onAddBatch" type="primary" icon="tags">批量新增</a-button>
+        <a-popconfirm title="确定全部删除吗?" @confirm="delAll">
+            <a-button :disabled="delLoading" :loading="delLoading" type="primary" icon="stop">全部删除</a-button>
+        </a-popconfirm>
+
+        <a-popconfirm v-if="selectedRowKeys.length > 0" title="确定删除吗?" @confirm="delBatch">
+            <a-button :disabled="delLoading" :loading="delLoading" icon="stop" style="margin-left: 8px">
+                批量删除</a-button>
+        </a-popconfirm> -->
+        <div style="display:flex;align-items:center;width:100%;">
+            <div class="list-container">
+                <div class="list-item" v-for="(item, index) in list" :key="index" :class="{active: activeIndex === index}" @click="handleClick(index)">
+                    {{ item }}
+                </div>
+            </div>
+            <a-range-picker v-show="activeIndex==4" @change="onChangeTime" size="large" />
+        </div>
+        <!-- <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> -->
+    </div>
+
+    <!-- table区域-begin -->
+    <div class="grid-clear">
+        <a-table ref="table" size="middle" :scroll="{ x: true }" bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="false" :loading="loading" :rowSelection="{
+          selectedRowKeys: selectedRowKeys,
+          onChange: onSelectChange,
+        }" class="j-table-force-nowrap" @change="handleTableChange">
+
+            <template slot="layoutId" slot-scope="text, record">
+                {{ getLayoutName(record) }}
+            </template>
+            <template slot="prefix_name" slot-scope="text, record">
+                {{ (record.prefix || "") + record.name }}
+            </template>
+            <template slot="pictureSlot" slot-scope="text, record">
+                <img :src="record.cover" style="width:40px;height40px;" />
+            </template>
+            <template slot="htmlSlot" slot-scope="text">
+                <div v-html="text"></div>
+            </template>
+
+            <span slot="action" slot-scope="text, record">
+                <a @click="handleEdit(record)">编辑</a>
+
+                <a-divider type="vertical" />
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                    <a>删除</a>
+                </a-popconfirm>
+                <a-divider type="vertical" />
+                <a @click="handleImage(record)">图片</a>
+            </span>
+        </a-table>
+        <a-card>
+            <a-checkbox-group @change="onChange">
+                <a-row>
+                    <a-col :span="6">
+                        <a-checkbox value="A">
+                            退脏房
+                        </a-checkbox>
+                    </a-col>
+                    <a-col :span="6">
+                        <a-checkbox value="B">
+                            续脏房
+                        </a-checkbox>
+                    </a-col>
+                    <a-col :span="6">
+                        <a-checkbox value="C">
+                            特脏房
+                        </a-checkbox>
+                    </a-col>
+                    <a-col :span="6">
+                        <a-checkbox value="D">
+                            钟点房
+                        </a-checkbox>
+                    </a-col>
+                </a-row>
+            </a-checkbox-group>
+        </a-card>
+    </div>
+    <!-- <room-num-modal ref="modalForm" @ok="modalFormOk"></room-num-modal> -->
+    <!-- <room-imgs @saveOk="onImgSave" ref="roomimgmodal"></room-imgs> -->
+</a-card>
+</template>
+
+<script>
+import {
+    JeecgListMixin
+} from "@/mixins/JeecgListMixin";
+// import roomNumModal from "./roomNumModal.vue"; // todo roomLayoutForm 需要替换成房型的表单弹窗
+// import roomImgs from './roomImagesForm.vue'
+import {
+    getAllLayouts
+} from "@/api/roomLayout";
+import {
+    delBatch,
+    delAll
+} from '@/api/roomBuildingApi'
+let hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+export default {
+    mixins: [JeecgListMixin],
+    components: {
+        // roomNumModal,
+        // roomImgs
+    },
+    data() {
+        return {
+            list: ['今天', '昨日', '本周', '本月', '更多'],
+            activeIndex: 0,
+            delLoading: false,
+            layouts: [],
+            queryParam: {},
+            // 分页参数
+            ipagination: {
+                current: 1,
+                pageSize: 10,
+                pageSizeOptions: ["10", "20", "30"],
+                showTotal: (total, range) => {
+                    return range[0] + "-" + range[1] + " 共" + total + "条";
+                },
+                showQuickJumper: true,
+                showSizeChanger: true,
+                total: 0,
+            },
+            // 表头
+            columns: [{
+                    title: "房屋人员",
+                    align: "center",
+                    dataIndex: "hotelName",
+                },
+                {
+                    title: "退房",
+                    // align: "center",
+                    dataIndex: "buildName",
+                    children: [{
+                        title: '脏房数',
+                        dataIndex: 'buildName',
+                        // key: 'companyAddress',
+                        // width: 200,
+                    }],
+                },
+                {
+                    title: "续房",
+                    // align: "center",
+                    dataIndex: "floorName",
+                    children: [{
+                        title: '脏房',
+                        dataIndex: 'floorName',
+                        // key: 'companyAddress',
+                        // width: 200,
+                    }],
+                },
+                {
+                    title: "钟点",
+                    align: "center",
+                    dataIndex: "layoutId",
+                    scopedSlots: {
+                        customRender: "layoutId"
+                    },
+                },
+                {
+                    title: "特脏",
+                    align: "center",
+                    dataIndex: "name",
+                    scopedSlots: {
+                        customRender: "prefix_name"
+                    },
+                },
+                {
+                    title: "合计房间数",
+                    align: "center",
+                    dataIndex: "createAt",
+                },
+                {
+                    title: "提成金额",
+                    dataIndex: "action",
+                    align: "center",
+                    fixed: "right",
+                    width: 147,
+                    scopedSlots: {
+                        customRender: "action"
+                    },
+                },
+            ],
+            url: {
+                // list: 'org.jeecg.modules.business/busMarketMember/list',
+                list: "/rooms/cesRooms/list",
+                delete: "/rooms/cesRooms/remove",
+                deleteBatch: "/rooms/cesRooms/deleteBatch",
+                exportXlsUrl: "/rooms/cesRooms/exportXls",
+                importExcelUrl: "rooms/cesRooms/importExcel",
+            },
+            buildingFloorSearchTag: {
+                name: null
+            },
+            dictOptions: {},
+            superFieldList: [],
+            selectedRowKeys: [],
+            isorter: {
+                column: "createTime",
+                order: "desc",
+            },
+        };
+    },
+    created() {
+        // this.loadData()
+        getAllLayouts().then((res) => {
+            if (res.code == 200) {
+                this.layouts = res.result.records;
+                this.loadData();
+            }
+        });
+    },
+    methods: {
+        onImgSave() {
+            this.loadData()
+        },
+        onFliterClose() {
+            this.filters['buildId'] = null
+            this.filters['floorId'] = null
+            this.ipagination.current = 1
+            this.buildingFloorSearchTag.name = null
+            this.loadData()
+        },
+        // 搜索
+        searchParam(id, name, isBuilding) {
+            this.$set(this.buildingFloorSearchTag, 'name', name)
+            if (isBuilding) {
+                this.filters['buildId'] = id
+                if (this.filters['floorId']) {
+                    delete this.filters.floorId
+                }
+            } else {
+                this.filters['floorId'] = id
+                if (this.filters['buildId']) {
+                    delete this.filters.buildId
+                }
+            }
+            this.loadData()
+        },
+        getLayoutName(row) {
+            let i = this.layouts.findIndex((s) => s.id == row.layoutId);
+            if (i > -1) {
+                return this.layouts[i].name;
+            }
+            return "";
+        },
+        // 批量删除
+        delBatch() {
+            let hotelInfo = JSON.parse(localStorage.getItem('storeInfo'))
+            let keys = this.selectedRowKeys
+            this.delLoading = true
+            delBatch({
+                hotelId: hotelInfo.id,
+                idStr: keys.toString()
+            }).then(res => {
+                if (res.code == 200) {
+                    this.selectedRowKeys = []
+                    this.$message.success('删除成功');
+                    this.loadData()
+                }
+            }).finally(_ => {
+                this.delLoading = false
+            })
+        },
+        // 删除所有
+        delAll() {
+            let hotelInfo = JSON.parse(localStorage.getItem('storeInfo'))
+            this.delLoading = true
+            delAll({
+                hotelId: hotelInfo.id,
+            }).then(res => {
+                if (res.code == 200) {
+                    this.selectedRowKeys = []
+                    this.$message.success('全部删除成功');
+                    this.loadData()
+                }
+            }).finally(_ => {
+                this.delLoading = false
+            })
+        },
+        // 批量添加按钮
+        onAddBatch() {
+            this.$router.push('/tenant/gen/rooms');
+        },
+        // 全部删除
+        onDelAll() {},
+        // 显示图片弹窗
+        handleImage(row) {
+            this.$refs.roomimgmodal.setModel(row)
+        },
+        onSaveOk() {
+            this.loadData();
+        },
+        handleClick(index) {
+            this.activeIndex = index
+            this.searchQuery()
+        },
+        onChange(checkedValues) {
+            console.log('checked = ', checkedValues)
+        },
+        //选择日期
+        onChangeTime(date, dateString) {
+            console.log(date, dateString)
+        },
+    },
+};
+</script>
+
+<style scoped>
+@import "~@assets/less/common.less";
+
+.list-container {
+    display: grid;
+    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
+    border: solid 1px #d9d9d9;
+    width: 300px;
+    border-radius: 5px;
+    /* margin-bottom: 20px; */
+    margin-right: 10px;
+}
+
+.list-item {
+    padding: 10px;
+    border-right: solid 1px #d9d9d9;
+    cursor: pointer;
+    text-align: center;
+}
+
+.list-item.active {
+    background-color: #1890ff;
+    color: #fff;
+}
+
+.grid-clear {
+    display: grid;
+    grid-template-columns: 2fr 1fr;
+    grid-gap: 10px;
+}
+</style>

+ 303 - 0
src/views/fangwu/tabList/clearRoomManagement.vue

@@ -0,0 +1,303 @@
+<template>
+<a-card :bordered="false">
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+        <a-tag color="pink" v-if="buildingFloorSearchTag.name">
+            {{ buildingFloorSearchTag.name }}
+            <a-icon type="close" @click="onFliterClose" />
+        </a-tag>
+        <!-- <a-button @click="handleAdd" type="primary" icon="plus">新增房间</a-button>
+        <a-button @click="onAddBatch" type="primary" icon="tags">批量新增</a-button>
+        <a-popconfirm title="确定全部删除吗?" @confirm="delAll">
+            <a-button :disabled="delLoading" :loading="delLoading" type="primary" icon="stop">全部删除</a-button>
+        </a-popconfirm> -->
+        <j-input placeholder="房间号" v-model="queryParam.name" style="width: 200px;margin-right:8px;"></j-input>
+        <a-range-picker style="margin-right:8px;" @change="onChangeTime" />
+        <!-- <a-popconfirm v-if="selectedRowKeys.length > 0" title="确定删除吗?" @confirm="delBatch">
+            <a-button :disabled="delLoading" :loading="delLoading" icon="stop" style="">
+                批量删除</a-button>
+        </a-popconfirm> -->
+        <!-- <div style="display:flex;align-items:center;width:100%;">
+            <div class="list-container">
+                <div class="list-item" v-for="(item, index) in list" :key="index" :class="{active: activeIndex === index}" @click="handleClick(index)">
+                    {{ item }}
+                </div>
+            </div>
+            <a-range-picker v-show="activeIndex==4" @change="onChangeTime" size="large" />
+        </div> -->
+        <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+    </div>
+
+    <!-- table区域-begin -->
+    <div class="grid-clear">
+        <a-table ref="table" size="middle" :scroll="{ x: true }" bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{
+          selectedRowKeys: selectedRowKeys,
+          onChange: onSelectChange,
+        }" class="j-table-force-nowrap" @change="handleTableChange">
+
+            <template slot="layoutId" slot-scope="text, record">
+                {{ getLayoutName(record) }}
+            </template>
+            <template slot="prefix_name" slot-scope="text, record">
+                {{ (record.prefix || "") + record.name }}
+            </template>
+            <template slot="pictureSlot" slot-scope="text, record">
+                <img :src="record.cover" style="width:40px;height40px;" />
+            </template>
+            <template slot="htmlSlot" slot-scope="text">
+                <div v-html="text"></div>
+            </template>
+
+            <span slot="action" slot-scope="text, record">
+                <a @click="handleEdit(record)">编辑</a>
+
+                <a-divider type="vertical" />
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                    <a>删除</a>
+                </a-popconfirm>
+                <a-divider type="vertical" />
+                <a @click="handleImage(record)">图片</a>
+            </span>
+        </a-table>
+    </div>
+    <!-- <room-num-modal ref="modalForm" @ok="modalFormOk"></room-num-modal> -->
+    <!-- <room-imgs @saveOk="onImgSave" ref="roomimgmodal"></room-imgs> -->
+</a-card>
+</template>
+
+<script>
+import {
+    JeecgListMixin
+} from "@/mixins/JeecgListMixin";
+// import roomNumModal from "./roomNumModal.vue"; // todo roomLayoutForm 需要替换成房型的表单弹窗
+// import roomImgs from './roomImagesForm.vue'
+import {
+    getAllLayouts
+} from "@/api/roomLayout";
+import {
+    delBatch,
+    delAll
+} from '@/api/roomBuildingApi'
+let hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+export default {
+    mixins: [JeecgListMixin],
+    components: {
+        // roomNumModal,
+        // roomImgs
+    },
+    data() {
+        return {
+            list: ['今天', '昨日', '本周', '本月', '更多'],
+            activeIndex: 0,
+            delLoading: false,
+            layouts: [],
+            queryParam: {},
+            // 分页参数
+            ipagination: {
+                current: 1,
+                pageSize: 10,
+                pageSizeOptions: ["10", "20", "30"],
+                showTotal: (total, range) => {
+                    return range[0] + "-" + range[1] + " 共" + total + "条";
+                },
+                showQuickJumper: true,
+                showSizeChanger: true,
+                total: 0,
+            },
+            // 表头
+            columns: [{
+                    title: "房扫时间",
+                    align: "center",
+                    dataIndex: "hotelName",
+                },
+                {
+                    title: "房扫人员",
+                    // align: "center",
+                    dataIndex: "buildName",
+                },
+                {
+                    title: "房间号",
+                    // align: "center",
+                    dataIndex: "floorName",
+                },
+                {
+                    title: "是否续住",
+                    align: "center",
+                    dataIndex: "layoutId",
+                    scopedSlots: {
+                        customRender: "layoutId"
+                    },
+                },
+                {
+                    title: "脏房类型",
+                    align: "center",
+                    dataIndex: "name",
+                    scopedSlots: {
+                        customRender: "prefix_name"
+                    },
+                },
+                {
+                    title: "操作人",
+                    align: "center",
+                    dataIndex: "createAt",
+                }
+            ],
+            url: {
+                // list: 'org.jeecg.modules.business/busMarketMember/list',
+                list: "/rooms/cesRooms/list",
+                delete: "/rooms/cesRooms/remove",
+                deleteBatch: "/rooms/cesRooms/deleteBatch",
+                exportXlsUrl: "/rooms/cesRooms/exportXls",
+                importExcelUrl: "rooms/cesRooms/importExcel",
+            },
+            buildingFloorSearchTag: {
+                name: null
+            },
+            dictOptions: {},
+            superFieldList: [],
+            selectedRowKeys: [],
+            isorter: {
+                column: "createTime",
+                order: "desc",
+            },
+        };
+    },
+    created() {
+        // this.loadData()
+        getAllLayouts().then((res) => {
+            if (res.code == 200) {
+                this.layouts = res.result.records;
+                this.loadData();
+            }
+        });
+    },
+    methods: {
+        onImgSave() {
+            this.loadData()
+        },
+        onFliterClose() {
+            this.filters['buildId'] = null
+            this.filters['floorId'] = null
+            this.ipagination.current = 1
+            this.buildingFloorSearchTag.name = null
+            this.loadData()
+        },
+        // 搜索
+        searchParam(id, name, isBuilding) {
+            this.$set(this.buildingFloorSearchTag, 'name', name)
+            if (isBuilding) {
+                this.filters['buildId'] = id
+                if (this.filters['floorId']) {
+                    delete this.filters.floorId
+                }
+            } else {
+                this.filters['floorId'] = id
+                if (this.filters['buildId']) {
+                    delete this.filters.buildId
+                }
+            }
+            this.loadData()
+        },
+        getLayoutName(row) {
+            let i = this.layouts.findIndex((s) => s.id == row.layoutId);
+            if (i > -1) {
+                return this.layouts[i].name;
+            }
+            return "";
+        },
+        // 批量删除
+        delBatch() {
+            let hotelInfo = JSON.parse(localStorage.getItem('storeInfo'))
+            let keys = this.selectedRowKeys
+            this.delLoading = true
+            delBatch({
+                hotelId: hotelInfo.id,
+                idStr: keys.toString()
+            }).then(res => {
+                if (res.code == 200) {
+                    this.selectedRowKeys = []
+                    this.$message.success('删除成功');
+                    this.loadData()
+                }
+            }).finally(_ => {
+                this.delLoading = false
+            })
+        },
+        // 删除所有
+        delAll() {
+            let hotelInfo = JSON.parse(localStorage.getItem('storeInfo'))
+            this.delLoading = true
+            delAll({
+                hotelId: hotelInfo.id,
+            }).then(res => {
+                if (res.code == 200) {
+                    this.selectedRowKeys = []
+                    this.$message.success('全部删除成功');
+                    this.loadData()
+                }
+            }).finally(_ => {
+                this.delLoading = false
+            })
+        },
+        // 批量添加按钮
+        onAddBatch() {
+            this.$router.push('/tenant/gen/rooms');
+        },
+        // 全部删除
+        onDelAll() {},
+        // 显示图片弹窗
+        handleImage(row) {
+            this.$refs.roomimgmodal.setModel(row)
+        },
+        onSaveOk() {
+            this.loadData();
+        },
+        handleClick(index) {
+            this.activeIndex = index
+            this.searchQuery()
+        },
+        onChange(checkedValues) {
+            console.log('checked = ', checkedValues)
+        },
+        //选择日期
+        onChangeTime(date, dateString) {
+            console.log(date, dateString)
+        },
+    },
+};
+</script>
+
+<style scoped>
+@import "~@assets/less/common.less";
+
+.list-container {
+    display: grid;
+    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
+    border: solid 1px #d9d9d9;
+    width: 300px;
+    border-radius: 5px;
+    /* margin-bottom: 20px; */
+    margin-right: 10px;
+}
+
+.list-item {
+    padding: 10px;
+    border-right: solid 1px #d9d9d9;
+    cursor: pointer;
+    text-align: center;
+}
+
+.list-item.active {
+    background-color: #1890ff;
+    color: #fff;
+}
+
+.grid-clear {
+    /* display: grid; */
+    /* grid-template-columns: 2fr 1fr; */
+    /* grid-gap: 10px; */
+    width: 100%;
+}
+</style>

+ 298 - 0
src/views/fangwu/tabList/houseTypeConsumables.vue

@@ -0,0 +1,298 @@
+<template>
+<a-card :bordered="false">
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+        <a-tag color="pink" v-if="buildingFloorSearchTag.name">
+            {{ buildingFloorSearchTag.name }}
+            <a-icon type="close" @click="onFliterClose" />
+        </a-tag>
+        <!-- <a-button @click="onAddBatch" type="primary" icon="tags">批量新增</a-button> -->
+        <!-- <a-popconfirm title="确定全部删除吗?" @confirm="delAll">
+            <a-button :disabled="delLoading" :loading="delLoading" type="primary" icon="stop">全部删除</a-button>
+        </a-popconfirm> -->
+        <j-input placeholder="商品名称" v-model="queryParam.name" style="width: 200px;margin-right:8px;"></j-input>
+        <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+        <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+        <!--  style="margin-right:8px;" @change="onChangeTime" /> -->
+        <a-popconfirm v-if="selectedRowKeys.length > 0" title="确定删除吗?" @confirm="delBatch">
+            <a-button :disabled="delLoading" :loading="delLoading" icon="stop" style="">
+                批量删除</a-button>
+        </a-popconfirm>
+        <!-- <div style="display:flex;align-items:center;width:100%;">
+            <div class="list-container">
+                <div class="list-item" v-for="(item, index) in list" :key="index" :class="{active: activeIndex === index}" @click="handleClick(index)">
+                    {{ item }}
+                </div>
+            </div>
+            <a-range-picker v-show="activeIndex==4" @change="onChangeTime" size="large" />
+        </div> -->
+    </div>
+
+    <!-- table区域-begin -->
+    <div class="grid-clear">
+        <a-table ref="table" size="middle" :scroll="{ x: true }" bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{
+          selectedRowKeys: selectedRowKeys,
+          onChange: onSelectChange,
+        }" class="j-table-force-nowrap" @change="handleTableChange">
+
+            <template slot="layoutId" slot-scope="text, record">
+                {{ getLayoutName(record) }}
+            </template>
+            <template slot="prefix_name" slot-scope="text, record">
+                {{ (record.prefix || "") + record.name }}
+            </template>
+            <template slot="pictureSlot" slot-scope="text, record">
+                <img :src="record.cover" style="width:40px;height40px;" />
+            </template>
+            <template slot="htmlSlot" slot-scope="text">
+                <div v-html="text"></div>
+            </template>
+
+            <span slot="action" slot-scope="text, record">
+                <a @click="handleEdit(record)">编辑</a>
+
+                <a-divider type="vertical" />
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                    <a>删除</a>
+                </a-popconfirm>
+                <a-divider type="vertical" />
+                <a @click="handleImage(record)">图片</a>
+            </span>
+        </a-table>
+    </div>
+    <!-- <room-num-modal ref="modalForm" @ok="modalFormOk"></room-num-modal> -->
+    <!-- <room-imgs @saveOk="onImgSave" ref="roomimgmodal"></room-imgs> -->
+</a-card>
+</template>
+
+<script>
+import {
+    JeecgListMixin
+} from "@/mixins/JeecgListMixin";
+// import roomNumModal from "./roomNumModal.vue"; // todo roomLayoutForm 需要替换成房型的表单弹窗
+// import roomImgs from './roomImagesForm.vue'
+import {
+    getAllLayouts
+} from "@/api/roomLayout";
+import {
+    delBatch,
+    delAll
+} from '@/api/roomBuildingApi'
+let hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+export default {
+    mixins: [JeecgListMixin],
+    components: {
+        // roomNumModal,
+        // roomImgs
+    },
+    data() {
+        return {
+            list: ['今天', '昨日', '本周', '本月', '更多'],
+            activeIndex: 0,
+            delLoading: false,
+            layouts: [],
+            queryParam: {},
+            // 分页参数
+            ipagination: {
+                current: 1,
+                pageSize: 10,
+                pageSizeOptions: ["10", "20", "30"],
+                showTotal: (total, range) => {
+                    return range[0] + "-" + range[1] + " 共" + total + "条";
+                },
+                showQuickJumper: true,
+                showSizeChanger: true,
+                total: 0,
+            },
+            // 表头
+            columns: [{
+                    title: "商品名称",
+                    align: "center",
+                    dataIndex: "hotelName",
+                },
+                {
+                    title: "类型",
+                    // align: "center",
+                    dataIndex: "buildName",
+                },
+                {
+                    title: "商品规格",
+                    // align: "center",
+                    dataIndex: "floorName",
+                },
+                {
+                    title: "单位",
+                    align: "center",
+                    dataIndex: "layoutId",
+                    scopedSlots: {
+                        customRender: "layoutId"
+                    },
+                },
+                {
+                    title: "操作",
+                    align: "center",
+                    dataIndex: "name",
+                    scopedSlots: {
+                        customRender: "action"
+                    },
+                }
+            ],
+            url: {
+                // list: 'org.jeecg.modules.business/busMarketMember/list',
+                list: "/rooms/cesRooms/list",
+                delete: "/rooms/cesRooms/remove",
+                deleteBatch: "/rooms/cesRooms/deleteBatch",
+                exportXlsUrl: "/rooms/cesRooms/exportXls",
+                importExcelUrl: "rooms/cesRooms/importExcel",
+            },
+            buildingFloorSearchTag: {
+                name: null
+            },
+            dictOptions: {},
+            superFieldList: [],
+            selectedRowKeys: [],
+            isorter: {
+                column: "createTime",
+                order: "desc",
+            },
+        };
+    },
+    created() {
+        // this.loadData()
+        getAllLayouts().then((res) => {
+            if (res.code == 200) {
+                this.layouts = res.result.records;
+                this.loadData();
+            }
+        });
+    },
+    methods: {
+        onImgSave() {
+            this.loadData()
+        },
+        onFliterClose() {
+            this.filters['buildId'] = null
+            this.filters['floorId'] = null
+            this.ipagination.current = 1
+            this.buildingFloorSearchTag.name = null
+            this.loadData()
+        },
+        // 搜索
+        searchParam(id, name, isBuilding) {
+            this.$set(this.buildingFloorSearchTag, 'name', name)
+            if (isBuilding) {
+                this.filters['buildId'] = id
+                if (this.filters['floorId']) {
+                    delete this.filters.floorId
+                }
+            } else {
+                this.filters['floorId'] = id
+                if (this.filters['buildId']) {
+                    delete this.filters.buildId
+                }
+            }
+            this.loadData()
+        },
+        getLayoutName(row) {
+            let i = this.layouts.findIndex((s) => s.id == row.layoutId);
+            if (i > -1) {
+                return this.layouts[i].name;
+            }
+            return "";
+        },
+        // 批量删除
+        delBatch() {
+            let hotelInfo = JSON.parse(localStorage.getItem('storeInfo'))
+            let keys = this.selectedRowKeys
+            this.delLoading = true
+            delBatch({
+                hotelId: hotelInfo.id,
+                idStr: keys.toString()
+            }).then(res => {
+                if (res.code == 200) {
+                    this.selectedRowKeys = []
+                    this.$message.success('删除成功');
+                    this.loadData()
+                }
+            }).finally(_ => {
+                this.delLoading = false
+            })
+        },
+        // 删除所有
+        delAll() {
+            let hotelInfo = JSON.parse(localStorage.getItem('storeInfo'))
+            this.delLoading = true
+            delAll({
+                hotelId: hotelInfo.id,
+            }).then(res => {
+                if (res.code == 200) {
+                    this.selectedRowKeys = []
+                    this.$message.success('全部删除成功');
+                    this.loadData()
+                }
+            }).finally(_ => {
+                this.delLoading = false
+            })
+        },
+        // 批量添加按钮
+        onAddBatch() {
+            this.$router.push('/tenant/gen/rooms');
+        },
+        // 全部删除
+        onDelAll() {},
+        // 显示图片弹窗
+        handleImage(row) {
+            this.$refs.roomimgmodal.setModel(row)
+        },
+        onSaveOk() {
+            this.loadData();
+        },
+        handleClick(index) {
+            this.activeIndex = index
+            this.searchQuery()
+        },
+        onChange(checkedValues) {
+            console.log('checked = ', checkedValues)
+        },
+        //选择日期
+        onChangeTime(date, dateString) {
+            console.log(date, dateString)
+        },
+    },
+};
+</script>
+
+<style scoped>
+@import "~@assets/less/common.less";
+
+.list-container {
+    display: grid;
+    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
+    border: solid 1px #d9d9d9;
+    width: 300px;
+    border-radius: 5px;
+    /* margin-bottom: 20px; */
+    margin-right: 10px;
+}
+
+.list-item {
+    padding: 10px;
+    border-right: solid 1px #d9d9d9;
+    cursor: pointer;
+    text-align: center;
+}
+
+.list-item.active {
+    background-color: #1890ff;
+    color: #fff;
+}
+
+.grid-clear {
+    /* display: grid; */
+    /* grid-template-columns: 2fr 1fr; */
+    /* grid-gap: 10px; */
+    width: 100%;
+}
+</style>

+ 303 - 0
src/views/fangwu/tabList/maintenanceRecords.vue

@@ -0,0 +1,303 @@
+<template>
+<a-card :bordered="false">
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+        <a-tag color="pink" v-if="buildingFloorSearchTag.name">
+            {{ buildingFloorSearchTag.name }}
+            <a-icon type="close" @click="onFliterClose" />
+        </a-tag>
+        <!-- <a-button @click="handleAdd" type="primary" icon="plus">新增房间</a-button>
+        <a-button @click="onAddBatch" type="primary" icon="tags">批量新增</a-button>
+        <a-popconfirm title="确定全部删除吗?" @confirm="delAll">
+            <a-button :disabled="delLoading" :loading="delLoading" type="primary" icon="stop">全部删除</a-button>
+        </a-popconfirm> -->
+        <j-input placeholder="房间号" v-model="queryParam.name" style="width: 200px;margin-right:8px;"></j-input>
+        <a-range-picker style="margin-right:8px;" @change="onChangeTime" />
+        <a-popconfirm v-if="selectedRowKeys.length > 0" title="确定删除吗?" @confirm="delBatch">
+            <a-button :disabled="delLoading" :loading="delLoading" icon="stop" style="">
+                批量删除</a-button>
+        </a-popconfirm>
+        <!-- <div style="display:flex;align-items:center;width:100%;">
+            <div class="list-container">
+                <div class="list-item" v-for="(item, index) in list" :key="index" :class="{active: activeIndex === index}" @click="handleClick(index)">
+                    {{ item }}
+                </div>
+            </div>
+            <a-range-picker v-show="activeIndex==4" @change="onChangeTime" size="large" />
+        </div> -->
+        <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+    </div>
+
+    <!-- table区域-begin -->
+    <div class="grid-clear">
+        <a-table ref="table" size="middle" :scroll="{ x: true }" bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{
+          selectedRowKeys: selectedRowKeys,
+          onChange: onSelectChange,
+        }" class="j-table-force-nowrap" @change="handleTableChange">
+
+            <template slot="layoutId" slot-scope="text, record">
+                {{ getLayoutName(record) }}
+            </template>
+            <template slot="prefix_name" slot-scope="text, record">
+                {{ (record.prefix || "") + record.name }}
+            </template>
+            <template slot="pictureSlot" slot-scope="text, record">
+                <img :src="record.cover" style="width:40px;height40px;" />
+            </template>
+            <template slot="htmlSlot" slot-scope="text">
+                <div v-html="text"></div>
+            </template>
+
+            <span slot="action" slot-scope="text, record">
+                <a @click="handleEdit(record)">编辑</a>
+
+                <a-divider type="vertical" />
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                    <a>删除</a>
+                </a-popconfirm>
+                <a-divider type="vertical" />
+                <a @click="handleImage(record)">图片</a>
+            </span>
+        </a-table>
+    </div>
+    <!-- <room-num-modal ref="modalForm" @ok="modalFormOk"></room-num-modal> -->
+    <!-- <room-imgs @saveOk="onImgSave" ref="roomimgmodal"></room-imgs> -->
+</a-card>
+</template>
+
+<script>
+import {
+    JeecgListMixin
+} from "@/mixins/JeecgListMixin";
+// import roomNumModal from "./roomNumModal.vue"; // todo roomLayoutForm 需要替换成房型的表单弹窗
+// import roomImgs from './roomImagesForm.vue'
+import {
+    getAllLayouts
+} from "@/api/roomLayout";
+import {
+    delBatch,
+    delAll
+} from '@/api/roomBuildingApi'
+let hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+export default {
+    mixins: [JeecgListMixin],
+    components: {
+        // roomNumModal,
+        // roomImgs
+    },
+    data() {
+        return {
+            list: ['今天', '昨日', '本周', '本月', '更多'],
+            activeIndex: 0,
+            delLoading: false,
+            layouts: [],
+            queryParam: {},
+            // 分页参数
+            ipagination: {
+                current: 1,
+                pageSize: 10,
+                pageSizeOptions: ["10", "20", "30"],
+                showTotal: (total, range) => {
+                    return range[0] + "-" + range[1] + " 共" + total + "条";
+                },
+                showQuickJumper: true,
+                showSizeChanger: true,
+                total: 0,
+            },
+            // 表头
+            columns: [{
+                    title: "房间号",
+                    align: "center",
+                    dataIndex: "hotelName",
+                },
+                {
+                    title: "开始时间",
+                    // align: "center",
+                    dataIndex: "buildName",
+                },
+                {
+                    title: "结束时间",
+                    // align: "center",
+                    dataIndex: "floorName",
+                },
+                {
+                    title: "维修状态",
+                    align: "center",
+                    dataIndex: "layoutId",
+                    scopedSlots: {
+                        customRender: "layoutId"
+                    },
+                },
+                {
+                    title: "维修原因",
+                    align: "center",
+                    dataIndex: "name",
+                    scopedSlots: {
+                        customRender: "prefix_name"
+                    },
+                },
+                {
+                    title: "维修结果",
+                    align: "center",
+                    dataIndex: "createAt",
+                }
+            ],
+            url: {
+                // list: 'org.jeecg.modules.business/busMarketMember/list',
+                list: "/rooms/cesRooms/list",
+                delete: "/rooms/cesRooms/remove",
+                deleteBatch: "/rooms/cesRooms/deleteBatch",
+                exportXlsUrl: "/rooms/cesRooms/exportXls",
+                importExcelUrl: "rooms/cesRooms/importExcel",
+            },
+            buildingFloorSearchTag: {
+                name: null
+            },
+            dictOptions: {},
+            superFieldList: [],
+            selectedRowKeys: [],
+            isorter: {
+                column: "createTime",
+                order: "desc",
+            },
+        };
+    },
+    created() {
+        // this.loadData()
+        getAllLayouts().then((res) => {
+            if (res.code == 200) {
+                this.layouts = res.result.records;
+                this.loadData();
+            }
+        });
+    },
+    methods: {
+        onImgSave() {
+            this.loadData()
+        },
+        onFliterClose() {
+            this.filters['buildId'] = null
+            this.filters['floorId'] = null
+            this.ipagination.current = 1
+            this.buildingFloorSearchTag.name = null
+            this.loadData()
+        },
+        // 搜索
+        searchParam(id, name, isBuilding) {
+            this.$set(this.buildingFloorSearchTag, 'name', name)
+            if (isBuilding) {
+                this.filters['buildId'] = id
+                if (this.filters['floorId']) {
+                    delete this.filters.floorId
+                }
+            } else {
+                this.filters['floorId'] = id
+                if (this.filters['buildId']) {
+                    delete this.filters.buildId
+                }
+            }
+            this.loadData()
+        },
+        getLayoutName(row) {
+            let i = this.layouts.findIndex((s) => s.id == row.layoutId);
+            if (i > -1) {
+                return this.layouts[i].name;
+            }
+            return "";
+        },
+        // 批量删除
+        delBatch() {
+            let hotelInfo = JSON.parse(localStorage.getItem('storeInfo'))
+            let keys = this.selectedRowKeys
+            this.delLoading = true
+            delBatch({
+                hotelId: hotelInfo.id,
+                idStr: keys.toString()
+            }).then(res => {
+                if (res.code == 200) {
+                    this.selectedRowKeys = []
+                    this.$message.success('删除成功');
+                    this.loadData()
+                }
+            }).finally(_ => {
+                this.delLoading = false
+            })
+        },
+        // 删除所有
+        delAll() {
+            let hotelInfo = JSON.parse(localStorage.getItem('storeInfo'))
+            this.delLoading = true
+            delAll({
+                hotelId: hotelInfo.id,
+            }).then(res => {
+                if (res.code == 200) {
+                    this.selectedRowKeys = []
+                    this.$message.success('全部删除成功');
+                    this.loadData()
+                }
+            }).finally(_ => {
+                this.delLoading = false
+            })
+        },
+        // 批量添加按钮
+        onAddBatch() {
+            this.$router.push('/tenant/gen/rooms');
+        },
+        // 全部删除
+        onDelAll() {},
+        // 显示图片弹窗
+        handleImage(row) {
+            this.$refs.roomimgmodal.setModel(row)
+        },
+        onSaveOk() {
+            this.loadData();
+        },
+        handleClick(index) {
+            this.activeIndex = index
+            this.searchQuery()
+        },
+        onChange(checkedValues) {
+            console.log('checked = ', checkedValues)
+        },
+        //选择日期
+        onChangeTime(date, dateString) {
+            console.log(date, dateString)
+        },
+    },
+};
+</script>
+
+<style scoped>
+@import "~@assets/less/common.less";
+
+.list-container {
+    display: grid;
+    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
+    border: solid 1px #d9d9d9;
+    width: 300px;
+    border-radius: 5px;
+    /* margin-bottom: 20px; */
+    margin-right: 10px;
+}
+
+.list-item {
+    padding: 10px;
+    border-right: solid 1px #d9d9d9;
+    cursor: pointer;
+    text-align: center;
+}
+
+.list-item.active {
+    background-color: #1890ff;
+    color: #fff;
+}
+
+.grid-clear {
+    /* display: grid; */
+    /* grid-template-columns: 2fr 1fr; */
+    /* grid-gap: 10px; */
+    width: 100%;
+}
+</style>

+ 252 - 0
src/views/markets/agreementunit.vue

@@ -0,0 +1,252 @@
+<template>
+    <a-card :bordered="false">
+        <!-- 查询区域 -->
+        <div class="table-page-search-wrapper">
+            <a-form layout="inline" @keyup.enter.native="searchQuery">
+                <a-row :gutter="24">
+                </a-row>
+            </a-form>
+        </div>
+        <!-- 查询区域-END -->
+
+        <!-- 操作按钮区域 -->
+        <div class="table-operator">
+            <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+            <a-button type="primary" icon="download" @click="handleExportXls('协议单位')">导出</a-button>
+            <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+                <a-button type="primary" icon="import">导入</a-button>
+            </a-upload>
+            <!-- 高级查询区域 -->
+            <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+            <a-dropdown v-if="selectedRowKeys.length > 0">
+                <a-menu slot="overlay">
+                    <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+                </a-menu>
+                <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+            </a-dropdown>
+        </div>
+
+        <!-- table区域-begin -->
+        <div>
+            <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>项
+                <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+            </div>
+
+            <a-table
+                    ref="table"
+                    size="middle"
+                    :scroll="{x:true}"
+                    bordered
+                    rowKey="id"
+                    :columns="columns"
+                    :dataSource="dataSource"
+                    :pagination="ipagination"
+                    :loading="loading"
+                    :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+                    class="j-table-force-nowrap"
+                    @change="handleTableChange">
+
+                <template slot="htmlSlot" slot-scope="text">
+                    <div v-html="text"></div>
+                </template>
+                <template slot="imgSlot" slot-scope="text,record">
+                    <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+                    <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+                </template>
+                <template slot="fileSlot" slot-scope="text">
+                    <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+                    <a-button
+                            v-else
+                            :ghost="true"
+                            type="primary"
+                            icon="download"
+                            size="small"
+                            @click="downloadFile(text)">
+                        下载
+                    </a-button>
+                </template>
+
+                <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+            </a-table>
+        </div>
+
+        <agreement-unit-modal ref="modalForm" @ok="modalFormOk"></agreement-unit-modal>
+    </a-card>
+</template>
+
+<script>
+
+    import '@/assets/less/TableExpand.less'
+    import { mixinDevice } from '@/utils/mixin'
+    import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+    import agreementUnitModal from './modules/agreementUnit/agreementUnitModal'
+
+    export default {
+        name: 'agreementunit',
+        mixins:[JeecgListMixin, mixinDevice],
+        components: {
+            agreementUnitModal
+        },
+        data () {
+            return {
+                description: '协议单位管理页面',
+                // 表头
+                columns: [
+                    {
+                        title:'商家名称',
+                        align:"center",
+                        dataIndex: 'hotelName'
+                    },
+                    {
+                        title:'账号',
+                        align:"center",
+                        dataIndex: 'accountNo'
+                    },
+                    {
+                        title:'客户名称',
+                        align:"center",
+                        dataIndex: 'customerName'
+                    },
+                    {
+                        title:'客户类型',
+                        align:"center",
+                        dataIndex: 'customerType_dictText'
+                    },
+                    {
+                        title:'客户状态',
+                        align:"center",
+                        dataIndex: 'status_dictText'
+                    },
+                    {
+                        title:'记账额度',
+                        align:"center",
+                        dataIndex: 'bookkeeping'
+                    },
+                    {
+                        title:'已用额度',
+                        align:"center",
+                        dataIndex: 'amountUsed'
+                    },
+                    {
+                        title:'剩余额度',
+                        align:"center",
+                        dataIndex: 'balance'
+                    },
+                    {
+                        title:'备注',
+                        align:"center",
+                        dataIndex: 'remark'
+                    },
+                    {
+                        title:'账号状态',
+                        align:"center",
+                        dataIndex: 'accountStatus_dictText'
+                    },
+                    {
+                        title:'审核状态',
+                        align:"center",
+                        dataIndex: 'checkStatus_dictText'
+                    },
+                    {
+                        title:'审核时间',
+                        align:"center",
+                        dataIndex: 'checkTime',
+                        customRender:function (text) {
+                            return !text?"":(text.length>10?text.substr(0,10):text)
+                        }
+                    },
+                    {
+                        title: '操作',
+                        dataIndex: 'action',
+                        align:"center",
+                        fixed:"right",
+                        width:147,
+                        scopedSlots: { customRender: 'action' }
+                    }
+                ],
+                url: {
+                    list: "/business/busMarketAgreementUnit/list",
+                    delete: "/business/busMarketAgreementUnit/delete",
+                    deleteBatch: "/business/busMarketAgreementUnit/deleteBatch",
+                    exportXlsUrl: "/business/busMarketAgreementUnit/exportXls",
+                    importExcelUrl: "business/busMarketAgreementUnit/importExcel",
+
+                },
+                dictOptions:{},
+                superFieldList:[],
+            }
+        },
+        created() {
+            this.getSuperFieldList();
+        },
+        computed: {
+            importExcelUrl: function(){
+                return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+            },
+        },
+        methods: {
+            initDictConfig(){
+            },
+            getSuperFieldList(){
+                let fieldList=[];
+                fieldList.push({type:'string',value:'tenantId',text:'关联租户'})
+                fieldList.push({type:'string',value:'hotelId',text:'关联酒店'})
+                fieldList.push({type:'string',value:'customerName',text:'客户全称'})
+                fieldList.push({type:'string',value:'customerShortName',text:'客户简称'})
+                fieldList.push({type:'string',value:'customerNo',text:'客户编号'})
+                fieldList.push({type:'string',value:'contactsName',text:'联系人'})
+                fieldList.push({type:'string',value:'systemType',text:'系统类型'})
+                fieldList.push({type:'string',value:'customerType',text:'客户类型'})
+                fieldList.push({type:'string',value:'sellerId',text:'销售人员'})
+                fieldList.push({type:'string',value:'phone',text:'手机号'})
+                fieldList.push({type:'string',value:'status',text:'客户状态'})
+                fieldList.push({type:'string',value:'region',text:'地区'})
+                fieldList.push({type:'string',value:'postalCode',text:'邮编'})
+                fieldList.push({type:'string',value:'address',text:'地址'})
+                fieldList.push({type:'string',value:'companyPhone',text:'公司电话'})
+                fieldList.push({type:'string',value:'fax',text:'传真'})
+                fieldList.push({type:'string',value:'customerSource',text:'客户来源'})
+                fieldList.push({type:'string',value:'homepage',text:'主页'})
+                fieldList.push({type:'string',value:'email',text:'邮箱'})
+                fieldList.push({type:'string',value:'customerIndustry',text:'客户行业'})
+                fieldList.push({type:'int',value:'checkStatus',text:'审核状态'})
+                fieldList.push({type:'date',value:'checkTime',text:'审核时间'})
+                fieldList.push({type:'string',value:'checkBy',text:'审核人'})
+                fieldList.push({type:'string',value:'checkRemarks',text:'审核备注'})
+                fieldList.push({type:'string',value:'accountNo',text:'账户编号'})
+                fieldList.push({type:'int',value:'accountStatus',text:'账户状态'})
+                fieldList.push({type:'number',value:'amountUsed',text:'已用额度'})
+                fieldList.push({type:'number',value:'balance',text:'余额'})
+                fieldList.push({type:'number',value:'bookkeeping',text:'记账限额'})
+                fieldList.push({type:'int',value:'bookkStatus',text:'不允许该单位记账'})
+                fieldList.push({type:'int',value:'commission',text:'前台是否查询'})
+                fieldList.push({type:'int',value:'reception',text:'是否返佣'})
+                fieldList.push({type:'string',value:'remark',text:'备注'})
+                fieldList.push({type:'int',value:'delFlag',text:'删除状态'})
+                this.superFieldList = fieldList
+            }
+        }
+    }
+</script>
+<style scoped>
+    @import '~@assets/less/common.less';
+</style>

+ 1 - 1
src/views/markets/marketInfo.vue

@@ -27,7 +27,7 @@
         />
         <p>营销短信</p>
       </div>
-      <div class="height-100" @click="toPage()">
+      <div class="height-100" @click="toPage('/tenant/marketinfo/agreementunit')">
         <img
           src="https://oss.qlan99.com/20200525/5a16520de701452d885cdcbfd2508e50.png"
         />

+ 368 - 0
src/views/markets/modules/agreementUnit/agreementUnitForm.vue

@@ -0,0 +1,368 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="客户全称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerName">
+              <a-input v-model="model.customerName" placeholder="请输入客户全称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="客户简称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerShortName">
+              <a-input v-model="model.customerShortName" placeholder="请输入客户简称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="系统类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="systemType">
+<!--              <a-input v-model="model.systemType" placeholder="请输入系统类型"  ></a-input>-->
+              <a-select
+                      v-model="model.systemType"
+                      placeholder="请选择系统类型"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in systemTypeList" :key="index">{{ item.itemText }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="客户编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerNo">
+              <a-input v-model="model.customerNo" placeholder="请输入客户编号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="主联系人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="contactsName">
+              <a-input v-model="model.contactsName" placeholder="请输入主联系人"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="客户类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerType">
+<!--              <a-input v-model="model.customerType" placeholder="请输入客户类型"  ></a-input>-->
+              <a-select
+                      v-model="model.customerType"
+                      placeholder="请选择客户类型"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in customerTypeList" :key="index">{{ item.itemText }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="销售人员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sellerId">
+<!--              <a-input v-model="model.sellerId" placeholder="请输入销售人员"  ></a-input>-->
+              <a-select
+                      v-model="model.sellerId"
+                      placeholder="请选择销售人员"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in saleList" :key="index">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="手机号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
+              <a-input v-model="model.phone" placeholder="请输入手机号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="客户状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">
+<!--              <a-input v-model="model.status" placeholder="请输入客户状态"  ></a-input>-->
+              <a-select
+                      v-model="model.status"
+                      placeholder="请选择客户状态"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in customerStatusList" :key="index">{{ item.itemText }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="地区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="region">
+              <a-input v-model="model.region" placeholder="请输入地区"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="邮编" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="postalCode">
+              <a-input v-model="model.postalCode" placeholder="请输入邮编"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
+              <a-input v-model="model.address" placeholder="请输入地址"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="公司电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyPhone">
+              <a-input v-model="model.companyPhone" placeholder="请输入公司电话"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="传真" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fax">
+              <a-input v-model="model.fax" placeholder="请输入传真"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="客户来源" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerSource">
+<!--              <a-input v-model="model.customerSource" placeholder="请输入客户来源"  ></a-input>-->
+              <a-select
+                      v-model="model.customerSource"
+                      placeholder="请选择客户来源"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in customerSourceList" :key="index">{{ item.itemText }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="主页" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="homepage">
+              <a-input v-model="model.homepage" placeholder="请输入主页"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="Email" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="email">
+              <a-input v-model="model.email" placeholder="请输入Email"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="客户行业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerIndustry">
+<!--              <a-input v-model="model.customerIndustry" placeholder="请输入客户行业"  ></a-input>-->
+              <a-select
+                      v-model="model.customerIndustry"
+                      placeholder="请选择客户行业"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in customerIndustryList" :key="index">{{ item.itemText }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'BusAgreementUnitForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+            customerName: [
+              { required: true, message: '请输入客户全称!'},
+           ],
+            customerShortName: [
+                { required: true, message: '请输入客户简称!'},
+            ],
+            systemType: [
+                { required: true, message: '请选择系统类型!'},
+            ],
+            customerNo: [
+                { required: true, message: '请输入客户编号!'},
+            ],
+            contactsName: [
+                { required: true, message: '请输入主联系人!'},
+            ],
+            customerType: [
+                { required: true, message: '请选择客户类型!'},
+            ],
+            phone: [
+                { required: true, message: '请输入手机号!'},
+            ],
+            status: [
+                { required: true, message: '请选择状态!'},
+            ],
+            customerSource: [
+                { required: true, message: '请选择客户来源!'},
+            ],
+            customerIndustry: [
+                { required: true, message: '请选择客户行业!'},
+            ],
+           hotelId: [
+              { required: true, message: '请输入关联酒店!'},
+           ],
+        },
+        url: {
+          add: "/business/busMarketAgreementUnit/add",
+          edit: "/business/busMarketAgreementUnit/edit",
+          queryById: "/business/busMarketAgreementUnit/queryById",
+          query_saleList: "/business/busSalesPerson/queryList",
+        },
+        saleList:[],
+        systemTypeList:[],
+        customerTypeList:[],
+        customerStatusList:[],
+        customerSourceList:[],
+        customerIndustryList:[]
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+      getAction(this.url.query_saleList,{}).then((res)=>{
+        if(res.success){
+          this.saleList = res.result
+        }else{
+
+        }
+      })
+      this.getDictConfig();
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+              var info = JSON.parse(localStorage.getItem("storeInfo"));
+              this.model.hotelId = info.id;
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+
+        })
+      },
+      getDictConfig(){
+        var that = this;
+        //系统类型
+        var param = {
+          dictName:'协议系统类型设置'
+        }
+        // var values = JSON.parse(JSON.stringify(param))
+        that.confirmLoading = true;
+        getAction('/business/busDictItem/queryList',param).then((res)=>{
+          console.log(res)
+          if(res.success){
+            if (res.code == 200 && res.result) {
+              this.systemTypeList = res.result;
+            }
+          }
+        }).finally(() => {
+          that.confirmLoading = false;
+        })
+
+        //客户类型
+        var param = {
+          dictName:'协议客户类型设置'
+        }
+        // var values = JSON.parse(JSON.stringify(param))
+        that.confirmLoading = true;
+        getAction('/business/busDictItem/queryList',param).then((res)=>{
+          console.log(res)
+          if(res.success){
+            if (res.code == 200 && res.result) {
+              this.customerTypeList = res.result;
+            }
+          }
+        }).finally(() => {
+          that.confirmLoading = false;
+        })
+
+        //客户状态
+        var param = {
+          dictName:'协议客户状态设置'
+        }
+        // var values = JSON.parse(JSON.stringify(param))
+        that.confirmLoading = true;
+        getAction('/business/busDictItem/queryList',param).then((res)=>{
+          console.log(res)
+          if(res.success){
+            if (res.code == 200 && res.result) {
+              this.customerStatusList = res.result;
+            }
+          }
+        }).finally(() => {
+          that.confirmLoading = false;
+        })
+
+        //客户来源
+        var param = {
+          dictName:'客人来源设置'
+        }
+        // var values = JSON.parse(JSON.stringify(param))
+        that.confirmLoading = true;
+        getAction('/business/busDictItem/queryList',param).then((res)=>{
+          console.log(res)
+          if(res.success){
+            if (res.code == 200 && res.result) {
+              this.customerSourceList = res.result;
+            }
+          }
+        }).finally(() => {
+          that.confirmLoading = false;
+        })
+
+        //客户行业
+        var param = {
+          dictName:'协议客户行业设置'
+        }
+        // var values = JSON.parse(JSON.stringify(param))
+        that.confirmLoading = true;
+        getAction('/business/busDictItem/queryList',param).then((res)=>{
+          console.log(res)
+          if(res.success){
+            if (res.code == 200 && res.result) {
+              this.customerIndustryList = res.result;
+            }
+          }
+        }).finally(() => {
+          that.confirmLoading = false;
+        })
+      }
+    }
+  }
+</script>

+ 84 - 0
src/views/markets/modules/agreementUnit/agreementUnitModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <agreement-unit-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></agreement-unit-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import agreementUnitForm from './agreementUnitForm'
+
+  export default {
+    name: 'agreementUnitModal',
+    components: {
+      agreementUnitForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
src/views/markets/modules/agreementUnit/agreementUnitModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <agreement-unit-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></agreement-unit-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import agreementUnitForm from './agreementUnitForm'
+  export default {
+    name: 'agreementUnitModal',
+    components: {
+      agreementUnitForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 1 - 1
src/views/orders/orderInfo.vue

@@ -53,7 +53,7 @@
         />
         <p>点餐订单</p>
       </div>
-      <div class="height-100" @click="toPage()">
+      <div class="height-100" @click="toPage('/tenant/orderinfo/servicerepairorderinfo')">
         <img
           src="http://oss.qlan99.com/20200529/1e5f75e885454e8e83c563afec910123.png"
         />

+ 318 - 0
src/views/orders/servicerepairorderinfo.vue

@@ -0,0 +1,318 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-select
+                mode="multiple"
+                style="width: 180px"
+                placeholder="商家名称"
+                :maxTagCount="1"
+                :maxTagTextLength="50"
+                v-model="queryParam.hotelIds"
+              >
+                <a-select-option
+                  v-for="(item, index) in hotelList"
+                  :key="index"
+                  :value="item.id"
+                >
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-input placeholder="房号" v-model="queryParam.roomNo"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-input
+                placeholder="姓名"
+                v-model="queryParam.userName"
+              ></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-input
+                placeholder="手机号"
+                v-model="queryParam.userMobile"
+              ></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-select
+                v-model="queryParam.commentType"
+                style="width: 100%"
+                placeholder="类型"
+              >
+                <a-select-option value="1">服务</a-select-option>
+                <a-select-option value="2">维修</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="">
+              <a-range-picker
+                format="YYYY-MM-DD"
+                :placeholder="['开始日期', '结束日期']"
+                @change="onChange"
+                v-model="datetime"
+                :allowClear="false"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <span
+              style="float: left; overflow: hidden"
+              class="table-page-search-submitButtons"
+            >
+              <a-button type="primary" @click="searchQuery" icon="search"
+                >查询</a-button
+              >
+              <!-- <a-button
+                type="primary"
+                @click="searchReset"
+                icon="reload"
+                style="margin-left: 8px"
+                >重置</a-button
+              > -->
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+    <!-- table区域-begin -->
+    <div>
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{ x: true }"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{
+          selectedRowKeys: selectedRowKeys,
+          onChange: onSelectChange,
+        }"
+        class="j-table-force-nowrap"
+        @change="handleTableChange"
+      >
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text, record">
+          <span v-if="!text" style="font-size: 12px; font-style: italic"
+            >无图片</span
+          >
+          <img
+            v-else
+            :src="getImgView(text)"
+            :preview="record.id"
+            height="25px"
+            alt=""
+            style="max-width: 80px; font-size: 12px; font-style: italic"
+          />
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px; font-style: italic"
+            >无文件</span
+          >
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)"
+          >
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <!-- <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" /> -->
+          <a @click="handleDelete(record.id)">删除</a>
+        </span>
+      </a-table>
+    </div>
+
+    <ces-order-message-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></ces-order-message-modal>
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import CesOrderMessageModal from "./modules/CesOrderMessageModal";
+import { httpAction, postAction, getAction } from "@/api/manage";
+export default {
+  name: "cesOrderRepairList",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    CesOrderMessageModal,
+  },
+  data() {
+    return {
+      description: "ces_order_message管理页面",
+      datetime: [],
+      // 表头
+      columns: [
+        {
+          title: "商家",
+          align: "center",
+          dataIndex: "hotelName",
+        },
+        {
+          title: "订单号",
+          align: "center",
+          dataIndex: "orderId",
+        },
+        {
+          title: "服务类型",
+          align: "center",
+          dataIndex: "type",
+          customRender: function (text) {
+            return text == 1 ? "服务" : "维修";
+          },
+        },
+        {
+          title: "姓名",
+          align: "center",
+          dataIndex: "userName",
+        },
+        {
+          title: "手机号",
+          align: "center",
+          dataIndex: "userMobile",
+        },
+        {
+          title: "房号",
+          align: "center",
+          dataIndex: "roomNo",
+        },
+        {
+          title: "维修时间段",
+          align: "center",
+          dataIndex: "repairDate",
+        },
+        {
+          title: "内容",
+          align: "center",
+          dataIndex: "contentBody",
+        },
+        {
+          title: "备注",
+          align: "center",
+          dataIndex: "remark",
+        },
+        {
+          title: "状态",
+          align: "center",
+          dataIndex: "status",
+          customRender: function (text) {
+            var msg = "待处理";
+            if (text == 2) {
+              msg = "已处理";
+            } else if (text == 3) {
+              msg = "已取消";
+            }
+            return msg;
+          },
+        },
+        {
+          title: "创建时间",
+          align: "center",
+          dataIndex: "createDate",
+          customRender: function (text) {
+            return !text ? "" : text.length > 10 ? text.substr(0, 10) : text;
+          },
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/order/cesOrderRepair/list",
+        delete: "/order/cesOrderRepair/delete",
+        deleteBatch: "/order/cesOrderRepair/deleteBatch",
+        exportXlsUrl: "/order/cesOrderRepair/exportXls",
+        importExcelUrl: "order/cesOrderRepair/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      hotelList: [],
+    };
+  },
+  created() {
+    getAction("/business/busHotel/list", { pageNo: 1, pageSize: 100 }).then(
+      (res) => {
+        if (res.success) {
+          this.hotelList = res.result.records;
+        }
+      }
+    );
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    searchReset() {
+      this.datetime = [];
+      this.queryParam = {};
+      this.loadData(1);
+    },
+    onChange(e, dateString) {
+      // console.log("Selected Time: ", e);
+      // console.log("Formatted Selected Time: ", dateString);
+      this.queryParam.startTime = dateString[0];
+      this.queryParam.endTime = dateString[1];
+    },
+    initDictConfig() {},
+    getSuperFieldList() {
+      let fieldList = [];
+      fieldList.push({ type: "string", value: "tenantId", text: "关联租户" });
+      fieldList.push({ type: "string", value: "hotelId", text: "关联酒店" });
+      fieldList.push({ type: "int", value: "userId", text: "用户ID" });
+      fieldList.push({
+        type: "int",
+        value: "messageType",
+        text: "留言类型 1 投诉 2建议",
+      });
+      fieldList.push({ type: "string", value: "images", text: "图片逗号分隔" });
+      fieldList.push({ type: "string", value: "contentBody", text: "内容" });
+      fieldList.push({ type: "string", value: "userName", text: "姓名" });
+      fieldList.push({ type: "string", value: "userMobile", text: "手机号" });
+      fieldList.push({ type: "string", value: "roomNo", text: "房号" });
+      fieldList.push({ type: "date", value: "createDate", text: "创建时间" });
+      this.superFieldList = fieldList;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 695 - 0
src/views/room/calendarfangtai.vue

@@ -0,0 +1,695 @@
+<template>
+  <a-card :bordered="false">
+        <!-- 查询区域 -->
+        <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-select v-model="queryParam.gradeId" placeholder="全部房型">
+                <a-select-option value="全天房">全天房</a-select-option>
+                <a-select-option value="钟点房">钟点房</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-select v-model="queryParam.gradeId" placeholder="全部楼层">
+                <a-select-option value="1001">1001</a-select-option>
+                <a-select-option value="1002">1002</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <span
+              style="float: left; overflow: hidden"
+              class="table-page-search-submitButtons"
+            >
+              <a-button type="primary" @click="searchQuery" icon="search"
+                >查询</a-button
+              >
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+    <div class="course-week">
+      <div class="week-top">
+        <div class="week-btn-wrap">
+          <span @click="getLastWeek">上周</span>
+          <span @click="getCurWeek">本周</span>
+          <span @click="getNextWeek">下周</span>
+        </div>
+        <span class="w-today-date"> {{ todayDate }}</span>
+        <div class="w-choose-status">
+          <div v-for="sta in cardStatus">
+            <span class="square" :style="{ background: sta.color }"></span>
+            <span class="title">{{ sta.title }}</span>
+          </div>
+        </div>
+      </div>
+      <div class="week-table">
+        <div class="table-header">
+          <div class="table-week">
+            <template v-for="(item, index) of weeks">
+              <span class="w-first" v-if="index === 0" :key="index">{{
+                item
+              }}</span>
+              <span v-else :key="index">{{ item }}</span>
+            </template>
+          </div>
+          <div class="w-table-date">
+            <template v-for="(item, index) of months">
+              <span class="w-first" v-if="index === 0" :key="index"> </span>
+              <template v-else>
+                <span
+                  :key="index"
+                  class="w-day-item"
+                  :class="{ 'w-isCurDate': item && item.isCurDate }"
+                >
+                  {{
+                    `${
+                      item && item.isCurDate
+                        ? (item && item.showDate + "(今天)") || ""
+                        : (item && item.showDate) || ""
+                    }`
+                  }}
+                </span>
+              </template>
+            </template>
+          </div>
+        </div>
+        <div class="w-time-period-list">
+          <ul
+            class="w-time-period-row"
+            v-for="(i, i_index) in planList2"
+            :key="i_index"
+          >
+            <!--循环时段,看时段有多少个-->
+            <template v-if="i.child && i.child.length > 0">
+              <li
+                class="w-time-period-col"
+                v-for="(period, p_index) in i.child"
+                :key="`period${p_index}`"
+              >
+                <!--第一列显示时段-->
+                <div class="w-time-period">
+                  1001
+                </div>
+                <!-- 后面显示周一到周日的计划-->
+                <div class="w-row-day">
+                  <!-- 循环显示每周的日期-->
+                  <template v-for="(month, m_index) of months">
+                    <!-- v-if="month" 去除数据处理的时候移除数组第一个为empty的问题-->
+                    <div
+                      v-if="month"
+                      :key="`month${m_index}`"
+                      class="w-things"
+                      @click="handleCardDetail(month, period)"
+                    >
+                      <!-- 循环每个时间段的计划-->
+                      <template v-for="(card, t_index) of period.schedule">
+                        <template
+                          v-if="card.key == month.date"
+                          v-for="(single, sIndex) in card.value"
+                        >
+                          <div style="width: 80%">
+                            <a-popover placement="rightTop">
+                              <template slot="content">
+                                <p>会议室:{{ i.meetingRoomName }}</p>
+                                <p>会议主题:{{ single.roomSchedule.theme }}</p>
+                                <p>公司名称:{{ single.roomSchedule.name }}</p>
+                                <p>
+                                  预定人:{{ single.roomSchedule.destinedName }}
+                                </p>
+                                <p>
+                                  联系电话:{{ single.roomSchedule.mobile }}
+                                </p>
+                                <p>是否结账:未结账</p>
+                                <p>备注:{{ single.roomSchedule.remark }}</p>
+                              </template>
+                              <template slot="title">
+                                <span>详情</span>
+                              </template>
+
+                              <div
+                                :key="`thing${sIndex}`"
+                                class="w-thing-item"
+                                @click.stop="handleDetail(single)"
+                                :style="{
+                                  background:
+                                    cardStatus[single.detail.status].color,
+                                }"
+                              >
+                                <span>{{ single.theme }}</span>
+                              </div>
+                            </a-popover>
+                          </div>
+                        </template>
+                      </template>
+                    </div>
+                  </template>
+                </div>
+              </li>
+            </template>
+            <!-- <div class="w-noMore" v-else><span>暂无数据</span></div> -->
+          </ul>
+        </div>
+      </div>
+    </div>
+    <!-- <bus-meeting-room-schedule-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></bus-meeting-room-schedule-modal>
+    <bus-meeting-room-schedule-confirm-modal
+      ref="modalBusMeetingRoomScheduleConfirm"
+      @ok="modalFormOk"
+    ></bus-meeting-room-schedule-confirm-modal> -->
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+// import { mixinDevice } from "@/utils/mixin";
+// import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import { httpAction, getAction } from "@/api/manage";
+// import BusMeetingRoomScheduleModal from "./modules/meetingRoomSchedule/BusMeetingRoomScheduleModal.vue";
+// import BusMeetingRoomScheduleConfirmModal from "./modules/meetingRoomSchedule/BusMeetingRoomScheduleConfirmModal.vue";
+
+export default {
+  name: "BusMeetingRoomList",
+  // mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    // BusMeetingRoomScheduleModal,
+    // BusMeetingRoomScheduleConfirmModal,
+  },
+  data() {
+    const planList = [
+      {
+        timePeriod: "上午",
+        schedule: [
+          {
+            key: "2023-03-15",
+            value: [
+              {
+                theme: "大会议室",
+                status: 1,
+                meeting_room_schedule: {}, //预定信息实体
+              },
+            ],
+          },
+          {
+            key: "2023-03-14",
+            value: [
+              {
+                theme: "大会议室",
+                status: 0,
+                meeting_room_schedule: {}, //预定信息实体
+              },
+            ],
+          },
+        ],
+      },
+      {
+        timePeriod: "下午",
+        schedule: [
+          {
+            key: "2023-03-15",
+            value: [
+              {
+                theme: "大会议室1111111111111111111111111",
+                status: 0,
+                meeting_room_schedule: {}, //预定信息实体
+              },
+            ],
+          },
+          {
+            key: "2023-03-14",
+            value: [
+              {
+                theme: "大会议室",
+                status: 0,
+                meeting_room_schedule: {}, //预定信息实体
+              },
+            ],
+          },
+        ],
+      },
+      {
+        timePeriod: "晚上",
+        schedule: [],
+      },
+    ];
+    return {
+      queryParam:{},
+      isFirstDayOfMondayOrSunday: 1,
+      cardStatus: {
+        0: {
+          title: "空闲中",
+          color: "#3291F8",
+        },
+        1: {
+          title: "已入住",
+          color: "#FF6200",
+        },
+      },
+      weeks: ["房间", "周一", "周二", "周三", "周四", "周五", "周六", "周日"],
+      todayDate: "",
+      months: [],
+      curDate: "",
+      nowDate: new Date(),
+      planList2: [
+        // { meetingRoomName: "大会议", child: planList },
+        // { meetingRoomName: "大会议2", child: planList },
+      ],
+      startDate: "",
+      endDate: "",
+    };
+  },
+  watch: {
+    isFirstDayOfMondayOrSunday: {
+      handler(val) {
+        if (val > 1) {
+          let arr = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"];
+          const arr1 = arr.slice(val - 1);
+          const arr2 = arr.slice(0, val - 1);
+          this.weeks = ["房间", ...arr1, ...arr2];
+        }
+      },
+      immediate: true,
+    },
+  },
+  mounted() {
+    this.getCurWeek();
+  },
+  created() {},
+  methods: {
+    searchQuery(){
+
+    },
+    modalFormOk() {
+      this.loadData();
+    },
+    loadData() {
+      var _info = JSON.parse(localStorage.getItem("storeInfo"));
+      getAction("/business/busMeetingRoomSchedule/fetch", {
+        startDate: this.startDate,
+        endDate: this.endDate,
+        hotelId: _info.id,
+      }).then((res) => {
+        if (res.success) {
+          this.planList2 = res.result;
+        }
+      });
+    },
+    /**
+     * 获取 时间
+     * @param time
+     */
+    getWeek(time) {
+      this.curDate = new Date(time);
+      //当前是周几
+      const whichDay = time.getDay();
+      let num = 0;
+      if (this.isFirstDayOfMondayOrSunday <= whichDay) {
+        num = this.isFirstDayOfMondayOrSunday;
+      } else {
+        num = this.isFirstDayOfMondayOrSunday - 7;
+      }
+      const weekDay = time.getDay() - num;
+      time = this.addDate(time, weekDay * -1);
+      for (let i = 0; i < 7; i++) {
+        const { year, month, day } = this.formatDate(
+          i === 0 ? time : this.addDate(time, 1)
+        );
+        this.months.push({
+          date: `${year}-${month}-${day}`,
+          showDate: `${month}-${day}`,
+          timestamp: new Date(`${year}-${month}-${day}`).getTime(),
+        });
+      }
+      this.months.sort((a, b) => a.timestamp - b.timestamp);
+      delete this.months[0];
+      this.todayDate = `${this.months[1].date} ~ ${
+        this.months[this.months.length - 1].date
+      }`;
+
+      this.startDate = this.months[1].date + " 00:00:00";
+      this.endDate = this.months[this.months.length - 1].date + " 00:00:00";
+      this.loadData();
+    },
+    /**
+     * 处理日期
+     * @param date
+     * @param n
+     * @returns {*}
+     */
+    addDate(date, n) {
+      date.setDate(date.getDate() + n);
+      return date;
+    },
+    /**
+     * 上周
+     */
+    getLastWeek() {
+      const date = this.addDate(this.curDate, -7),
+        { year, month, day } = this.formatDate(date),
+        dateObj = {
+          date: `${year}-${month}-${day}`,
+          timestamp: new Date(`${year}-${month}-${day}`).getTime(),
+        };
+      this.dealDate(date);
+      this.$emit("changeWeek", dateObj);
+    },
+    /**
+     * 本周
+     */
+    getCurWeek() {
+      const { year, month, day } = this.formatDate(new Date()),
+        dateObj = {
+          date: `${year}-${month}-${day}`,
+          timestamp: new Date(`${year}-${month}-${day}`).getTime(),
+        };
+      this.dealDate(new Date());
+      this.$emit("changeWeek", dateObj);
+    },
+    //日期格式处理
+    formatDate(date) {
+      var year = date.getFullYear();
+      var months = date.getMonth() + 1;
+      var month = (months < 10 ? "0" + months : months).toString();
+      var day = (
+        date.getDate() < 10 ? "0" + date.getDate() : date.getDate()
+      ).toString();
+      return {
+        year: year.toString(),
+        month,
+        day,
+      };
+    },
+    /**
+     * 获取当天时间
+     * @returns {string}
+     */
+    getCurDay(num = 0) {
+      var datetime = new Date();
+      var year = datetime.getFullYear();
+      var month =
+        datetime.getMonth() + 1 < 10
+          ? "0" + (datetime.getMonth() + 1)
+          : datetime.getMonth() + 1;
+      let day = datetime.getDate();
+      if (day + num > 0) {
+        day =
+          day + num < 10
+            ? "0" + (datetime.getDate() + num)
+            : datetime.getDate() + num;
+      } else {
+        day =
+          day - num < 10
+            ? "0" + (datetime.getDate() - num)
+            : datetime.getDate() - num;
+      }
+      return `${year}-${month}-${day}`;
+    },
+    /**
+     * 下周
+     */
+    getNextWeek() {
+      const date = this.addDate(this.curDate, 7),
+        { year, month, day } = this.formatDate(date),
+        dateObj = {
+          date: `${year}-${month}-${day}`,
+          timestamp: new Date(`${year}-${month}-${day}`).getTime(),
+        };
+      this.dealDate(date);
+      this.$emit("changeWeek", dateObj);
+    },
+    /**
+     * 显示当天日期状态
+     * @param date
+     */
+    dealDate(date) {
+      this.months = [""];
+      this.getWeek(date);
+      const curDate = this.getCurDay();
+      this.months.forEach((item) => {
+        item.isCurDate = item.date === curDate;
+      });
+    },
+    /**
+     * 预定确认
+     * @param row
+     */
+    handleDetail(row) {
+      console.log("row", row);
+      this.$refs.modalBusMeetingRoomScheduleConfirm.edit(row);
+      this.$refs.modalBusMeetingRoomScheduleConfirm.title = "预定确认";
+      this.$refs.modalBusMeetingRoomScheduleConfirm.disableSubmit = false;
+      this.$refs.modalBusMeetingRoomScheduleConfirm.disableSubmit = true;
+    },
+    /**
+     * 预定登记
+     * @param month
+     * @param period
+     */
+    handleCardDetail(month, period) {
+      this.$refs.modalForm.add();
+      this.$refs.modalForm.title = "预定登记";
+      this.$refs.modalForm.disableSubmit = false;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>
+<style>
+ul {
+  list-style: none;
+}
+
+ul,
+li {
+  margin: 0;
+  padding: 0;
+}
+
+.course-week {
+  width: 100%;
+  border: 1px solid #ddd;
+  padding: 1%;
+  box-sizing: border-box;
+}
+
+.week-top {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  width: 100%;
+  height: 40px;
+  padding: 0 1%;
+  box-sizing: border-box;
+}
+
+.week-top .week-btn-wrap {
+  width: 200px;
+  display: flex;
+  justify-content: space-around;
+  color: #409eff;
+}
+
+.week-top .week-btn-wrap span {
+  cursor: pointer;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  font-size: 15px;
+}
+
+.w-today-date {
+  font-weight: bold;
+  font-size: 16px;
+}
+
+.w-choose-status {
+  display: flex;
+  /* justify-content: flex-end; */
+  width: 200px;
+}
+
+.w-choose-status > div {
+  width: 100%;
+  flex: 1;
+  display: flex;
+  padding: 0 2%;
+  white-space: nowrap;
+  line-height: 20px;
+  box-sizing: border-box;
+}
+
+.w-choose-status > div .square {
+  display: flex;
+  width: 16px;
+  height: 16px;
+  border-radius: 4px;
+  box-sizing: border-box;
+}
+
+.w-choose-status > div .title {
+  display: flex;
+  align-items: center;
+  line-height: 16px;
+  padding-left: 4px;
+  font-size: 14px;
+  box-sizing: border-box;
+}
+
+.week-table {
+  display: flex;
+  flex-direction: column;
+}
+
+.week-table .table-header {
+  width: 100%;
+  height: 80px;
+  background: #eaedf2;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  border-bottom: 1px solid #eaedf2;
+  box-sizing: border-box;
+}
+
+.table-header .w-table-date,
+.table-week {
+  width: 100%;
+  height: 40px;
+  text-align: left;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+
+.table-header .w-table-date > span,
+.table-week > span {
+  flex: 1;
+  color: #000;
+  height: 100%;
+  font-size: 14px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  font-weight: bold;
+}
+
+.w-table-date .w-day-item,
+.table-week .w-day-item {
+  color: #000;
+  font-size: 14px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+
+.week-table .w-time-period-list {
+  width: 100%;
+}
+
+.w-time-period-list .w-time-period-row {
+  width: 100%;
+  min-height: 60px;
+}
+
+.w-time-period-col {
+  width: 100%;
+  min-height: 60px;
+  display: flex;
+}
+
+.w-time-period-col .w-time-period {
+  width: 12.5%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  border-left: 1px solid #eaedf2;
+  border-bottom: 1px solid #eaedf2;
+  box-sizing: border-box;
+}
+.w-time-period-col:last-child {
+  border-bottom: 1px solid #eaedf2;
+}
+.meeting-room-center {
+  transform: translate(-200%, 0%);
+  width: 14px;
+  font-size: 14px;
+  word-wrap: break-word;
+  position: absolute;
+}
+
+.w-time-period-col .w-row-day {
+  width: 87.5%;
+  display: flex;
+  justify-content: center;
+}
+
+.w-row-day .w-things {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  border-left: 1px solid #eaedf2;
+  border-bottom: 1px solid #eaedf2;
+  box-sizing: border-box;
+  cursor: pointer;
+  background-color: rgb(50, 145, 248);
+}
+
+.w-row-day .w-things:last-child {
+  border-right: 1px solid #eaedf2;
+}
+
+.w-things .w-thing-item {
+  display: flex;
+  width: 80%;
+  font-size: 14px;
+  flex-direction: column;
+  justify-content: space-around;
+  min-height: 50px;
+  border-radius: 10px;
+  margin: 2% 1%;
+  padding: 1% 2%;
+  cursor: pointer;
+  color: #fff;
+  background: #ff6200;
+  box-sizing: border-box;
+  transition: all 1s linear 0.5s;
+}
+
+.w-isCurDate {
+  color: #ff2525 !important;
+}
+
+.w-noMore {
+  min-height: 200px;
+  padding: 2%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  border: 1px solid rgba(156, 173, 173, 0.3);
+  color: #9cadadb7;
+  box-sizing: border-box;
+}
+
+.w_expand,
+.w_shrink {
+  color: #0a98d5;
+  cursor: pointer;
+  width: 100%;
+  padding: 2% 0;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+</style>

File diff suppressed because it is too large
+ 563 - 268
src/views/room/fangtailive.vue


+ 274 - 0
src/views/room/forwardfangtai.vue

@@ -0,0 +1,274 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :span="6">
+            <a-form-item label="">
+              <a-range-picker
+                format="YYYY-MM-DD"
+                :placeholder="['开始日期', '结束日期']"
+                @change="onChange"
+                v-model="datetime"
+                :allowClear="false"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <span
+              style="float: left; overflow: hidden"
+              class="table-page-search-submitButtons"
+            >
+              <a-button type="primary" @click="searchQuery" icon="search"
+                >查询</a-button
+              >
+              <!-- <a-button
+                type="primary"
+                @click="searchReset"
+                icon="reload"
+                style="margin-left: 8px"
+                >重置</a-button
+              > -->
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- table区域-begin -->
+    <div>
+      <!-- <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>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div> -->
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{ x: true }"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        class="j-table-force-nowrap"
+        @change="handleTableChange"
+      >
+        <template
+          :slot="item.dataIndex"
+          slot-scope="text, record, index"
+          v-for="item in columns"
+        >
+          <!-- <editable-cell
+            :text="text"
+            @change="onCellChange(item.dataIndex, index, $event)"
+          /> -->
+          0/0/{{ text }}
+        </template>
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text, record">
+          <span v-if="!text" style="font-size: 12px; font-style: italic"
+            >无图片</span
+          >
+          <img
+            v-else
+            :src="getImgView(text)"
+            :preview="record.id"
+            height="25px"
+            alt=""
+            style="max-width: 80px; font-size: 12px; font-style: italic"
+          />
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px; font-style: italic"
+            >无文件</span
+          >
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)"
+          >
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm
+                  title="确定删除吗?"
+                  @confirm="() => handleDelete(record.id)"
+                >
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+      </a-table>
+    </div>
+
+    <!-- <bus-member-balance-log-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></bus-member-balance-log-modal> -->
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin2";
+import { formatDate } from "@/utils/util";
+import EditableCell from "@views/room/modules/checkIn/EditableCell.vue";
+import { httpAction, postAction,getAction } from "@/api/manage";
+const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+import moment from "moment";
+const date = new Date();
+const endDate = new Date(date.setDate(date.getDate() + 7));
+export default {
+  name: "BusMemberBalanceLogList",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    EditableCell,
+  },
+  data() {
+    return {
+      description: "远期房态",
+      queryParam: {
+        gradeId: "全天房",
+        startTime: moment(new Date()).format("YYYY-MM-DD"),
+        endTime: moment(endDate).format("YYYY-MM-DD"),
+      },
+      datetime: [
+        moment(new Date(), "YYYY-MM-DD"),
+        moment(endDate, "YYYY-MM-DD"),
+      ],
+      setColumns: true,
+      // 表头
+      columns: [
+        {
+          title: "房型",
+          align: "center",
+          dataIndex: "layout_name",
+        },
+      ],
+      url: {
+        list:
+          "/rooms/cesRoomLayoutPriceDate/pageList?hotelIds[]=" + hotelInfo.id,
+        delete: "/business/busMemberBalanceLog/delete",
+        deleteBatch: "/business/busMemberBalanceLog/deleteBatch",
+        exportXlsUrl: "/business/busMemberBalanceLog/exportXls",
+        importExcelUrl: "business/busMemberBalanceLog/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      hotelList: [],
+    };
+  },
+  created() {
+    // this.getSuperFieldList();
+    getAction(
+      "/business/busHotel/list",
+      { pageNo: 1, pageSize: 100 }
+    ).then((res) => {
+      if (res.success) {
+        this.hotelList = res.result.records;
+      }
+    });
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    onCellChange(key, dataIndex, value) {
+      const dataSource = [...this.dataSource];
+      const target = dataSource[dataIndex];
+      if (target) {
+        target[key] = value;
+        this.dataSourcea = dataSource;
+      }
+      console.log("this.dataSource", this.dataSource);
+
+      postAction("/rooms/cesRoomLayoutPriceDate/editPrice", {
+        roomLayoutPriceId: target.price_id,
+        date: key,
+        price: value,
+      })
+        .then((res) => {
+          if (res.success) {
+            this.$message.success(res.message);
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+        .finally(() => {});
+    },
+    moment,
+    searchQuery() {
+      if (this.queryParam.hotelIds && this.queryParam.hotelIds.length > 0) {
+        this.url.list = "/rooms/cesRoomLayoutPriceDate/pageList";
+      } else {
+        this.url.list =
+          "/rooms/cesRoomLayoutPriceDate/pageList?hotelIds[]=" + hotelInfo.id;
+      }
+      this.loadData(1);
+      this.selectedRowKeys = [];
+      this.selectionRows = [];
+    },
+    searchReset() {
+      this.datetime = [];
+      this.queryParam = {};
+      this.loadData(1);
+    },
+    onChange(e, dateString) {
+      // console.log("Selected Time: ", e);
+      // console.log("Formatted Selected Time: ", dateString);
+      this.queryParam.startTime = dateString[0];
+      this.queryParam.endTime = dateString[1];
+    },
+    initDictConfig() {},
+    getSuperFieldList() {
+      let fieldList = [];
+      fieldList.push({ type: "string", value: "tenantId", text: "关联租户" });
+      fieldList.push({ type: "string", value: "hotelId", text: "关联酒店" });
+      fieldList.push({ type: "string", value: "memberId", text: "会员id" });
+      fieldList.push({ type: "int", value: "type", text: "类型" });
+      fieldList.push({ type: "number", value: "money", text: "充值金额" });
+      fieldList.push({ type: "number", value: "balance", text: "金额余额" });
+      fieldList.push({ type: "number", value: "giveMoney", text: "赠送金额" });
+      fieldList.push({ type: "string", value: "remarks", text: "备注" });
+      fieldList.push({ type: "string", value: "staffId", text: "推荐员工" });
+      fieldList.push({
+        type: "string",
+        value: "paymentMethod",
+        text: "支付方式",
+      });
+      fieldList.push({ type: "number", value: "payMoney", text: "支付金额" });
+      fieldList.push({ type: "string", value: "code", text: "流水号" });
+      this.superFieldList = fieldList;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 253 - 0
src/views/room/guestorders.vue

@@ -0,0 +1,253 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-input placeholder="房号" v-model="queryParam.roomNo"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-input placeholder="姓名" v-model="queryParam.userName"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-input placeholder="手机号" v-model="queryParam.userMobile"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-select
+                v-model="queryParam.commentType"
+                style="width: 100%"
+                placeholder="类型"
+              >
+                <a-select-option value="1">正常入住</a-select-option>
+                <a-select-option value="2">未结离点</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <span
+              style="float: left; overflow: hidden"
+              class="table-page-search-submitButtons"
+            >
+              <a-button type="primary" @click="searchQuery" icon="search"
+                >查询</a-button
+              >
+              <!-- <a-button
+                type="primary"
+                @click="searchReset"
+                icon="reload"
+                style="margin-left: 8px"
+                >重置</a-button
+              > -->
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+    <!-- table区域-begin -->
+    <div>
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{ x: true }"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{
+          selectedRowKeys: selectedRowKeys,
+          onChange: onSelectChange,
+        }"
+        class="j-table-force-nowrap"
+        @change="handleTableChange"
+      >
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text, record">
+          <span v-if="!text" style="font-size: 12px; font-style: italic"
+            >无图片</span
+          >
+          <img
+            v-else
+            :src="getImgView(text)"
+            :preview="record.id"
+            height="25px"
+            alt=""
+            style="max-width: 80px; font-size: 12px; font-style: italic"
+          />
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px; font-style: italic"
+            >无文件</span
+          >
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)"
+          >
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <!-- <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" /> -->
+          <a @click="handleDelete(record.id)">删除</a>
+        </span>
+      </a-table>
+    </div>
+
+    <!-- <ces-order-message-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></ces-order-message-modal> -->
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+// import CesOrderMessageModal from "./modules/CesOrderMessageModal";
+import { httpAction, postAction, getAction } from "@/api/manage";
+export default {
+  name: "CesOrderMessageList",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    // CesOrderMessageModal,
+  },
+  data() {
+    return {
+      description: "客单",
+      // 表头
+      columns: [
+        {
+          title: "单号",
+          align: "center",
+          dataIndex: "hotelName",
+        },
+        {
+          title: "客人/电话",
+          align: "center",
+          dataIndex: "messageType",
+          customRender: function (text) {
+            return text == 1 ? "投诉" : "建议";
+          },
+        },
+        {
+          title: "客人类型",
+          align: "center",
+          dataIndex: "contentBody",
+          customRender: function (text) {
+            return text == 1 ? "投诉" : "建议";
+          },
+        },
+        {
+          title: "入住类型",
+          align: "center",
+          dataIndex: "userName",
+        },
+        {
+          title: "房型",
+          align: "center",
+          dataIndex: "userMobile",
+        },
+        {
+          title: "房号",
+          align: "center",
+          dataIndex: "roomNo",
+        },
+        {
+          title: "房价",
+          align: "center",
+          dataIndex: "createDate",
+        },
+        {
+          title: "状态",
+          align: "center",
+          dataIndex: "createDate",
+        },
+        {
+          title: "创建时间",
+          align: "center",
+          dataIndex: "createDate",
+          customRender: function (text) {
+            return !text ? "" : text.length > 10 ? text.substr(0, 10) : text;
+          },
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/order/cesOrderMessage/list",
+        delete: "/order/cesOrderMessage/delete",
+        deleteBatch: "/order/cesOrderMessage/deleteBatch",
+        exportXlsUrl: "/order/cesOrderMessage/exportXls",
+        importExcelUrl: "order/cesOrderMessage/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      hotelList: [],
+    };
+  },
+  created() {
+    getAction("/business/busHotel/list", { pageNo: 1, pageSize: 100 }).then(
+      (res) => {
+        if (res.success) {
+          this.hotelList = res.result.records;
+        }
+      }
+    );
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    initDictConfig() {},
+    getSuperFieldList() {
+      let fieldList = [];
+      fieldList.push({ type: "string", value: "tenantId", text: "关联租户" });
+      fieldList.push({ type: "string", value: "hotelId", text: "关联酒店" });
+      fieldList.push({ type: "int", value: "userId", text: "用户ID" });
+      fieldList.push({
+        type: "int",
+        value: "messageType",
+        text: "留言类型 1 投诉 2建议",
+      });
+      fieldList.push({ type: "string", value: "images", text: "图片逗号分隔" });
+      fieldList.push({ type: "string", value: "contentBody", text: "内容" });
+      fieldList.push({ type: "string", value: "userName", text: "姓名" });
+      fieldList.push({ type: "string", value: "userMobile", text: "手机号" });
+      fieldList.push({ type: "string", value: "roomNo", text: "房号" });
+      fieldList.push({ type: "date", value: "createDate", text: "创建时间" });
+      this.superFieldList = fieldList;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 246 - 0
src/views/room/leasegoods.vue

@@ -0,0 +1,246 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-input placeholder="姓名" v-model="queryParam.userName"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="">
+              <a-range-picker
+                format="YYYY-MM-DD"
+                :placeholder="['租借开始日期', '租借结束日期']"
+                @change="onChange"
+                v-model="datetime"
+                :allowClear="false"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <span
+              style="float: left; overflow: hidden"
+              class="table-page-search-submitButtons"
+            >
+              <a-button type="primary" @click="searchQuery" icon="search"
+                >查询</a-button
+              >
+              <!-- <a-button
+                type="primary"
+                @click="searchReset"
+                icon="reload"
+                style="margin-left: 8px"
+                >重置</a-button
+              > -->
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+    </div>
+    <!-- table区域-begin -->
+    <div>
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{ x: true }"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{
+          selectedRowKeys: selectedRowKeys,
+          onChange: onSelectChange,
+        }"
+        class="j-table-force-nowrap"
+        @change="handleTableChange"
+      >
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text, record">
+          <span v-if="!text" style="font-size: 12px; font-style: italic"
+            >无图片</span
+          >
+          <img
+            v-else
+            :src="getImgView(text)"
+            :preview="record.id"
+            height="25px"
+            alt=""
+            style="max-width: 80px; font-size: 12px; font-style: italic"
+          />
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px; font-style: italic"
+            >无文件</span
+          >
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)"
+          >
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <template v-if="!record.revertDate">
+            <a @click="handleEdit(record)">编辑</a>
+
+            <a-divider type="vertical"
+          /></template>
+          <a @click="handleDelete(record.id)">删除</a>
+          <template v-if="!record.revertDate">
+            <a-divider type="vertical" />
+            <a @click="handleRevert(record.id)">归还</a></template
+          >
+        </span>
+      </a-table>
+    </div>
+
+    <ces-order-lease-goods-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></ces-order-lease-goods-modal>
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import CesOrderLeaseGoodsModal from "./modules/leasegoods/CesOrderLeaseGoodsModal";
+import { httpAction, postAction, getAction } from "@/api/manage";
+export default {
+  name: "租借物品",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    CesOrderLeaseGoodsModal,
+  },
+  data() {
+    return {
+      description: "客单",
+      // 表头
+      columns: [
+        {
+          title: "单号",
+          align: "center",
+          dataIndex: "orderNo",
+        },
+        {
+          title: "房号",
+          align: "center",
+          dataIndex: "roomNo",
+        },
+        {
+          title: "姓名",
+          align: "center",
+          dataIndex: "userName",
+        },
+        {
+          title: "物品",
+          align: "center",
+          dataIndex: "goodsId",
+        },
+        {
+          title: "数量",
+          align: "center",
+          dataIndex: "num",
+        },
+        {
+          title: "押金",
+          align: "center",
+          dataIndex: "deposit",
+        },
+        {
+          title: "租借时间",
+          align: "center",
+          dataIndex: "createDate",
+        },
+        {
+          title: "归还时间",
+          align: "center",
+          dataIndex: "revertDate",
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/order/cesOrderLeaseGoods/list",
+        delete: "/order/cesOrderLeaseGoods/delete",
+        deleteBatch: "/order/cesOrderLeaseGoods/deleteBatch",
+        exportXlsUrl: "/order/cesOrderLeaseGoods/exportXls",
+        importExcelUrl: "order/cesOrderLeaseGoods/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      hotelList: [],
+      datetime: [],
+    };
+  },
+  created() {},
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    onChange(e, dateString) {
+      this.queryParam.startTime = dateString[0];
+      this.queryParam.endTime = dateString[1];
+    },
+    handleRevert(id) {
+      var that = this;
+      postAction("/order/cesOrderLeaseGoods/revert", { id: id }).then((res) => {
+        if (res.success) {
+          that.$message.success(res.message);
+          that.loadData();
+        } else {
+          that.$message.warning(res.message);
+        }
+      });
+    },
+    initDictConfig() {},
+    getSuperFieldList() {
+      let fieldList = [];
+      fieldList.push({ type: "string", value: "tenantId", text: "关联租户" });
+      fieldList.push({ type: "string", value: "hotelId", text: "关联酒店" });
+      fieldList.push({ type: "int", value: "userId", text: "用户ID" });
+      fieldList.push({
+        type: "int",
+        value: "messageType",
+        text: "留言类型 1 投诉 2建议",
+      });
+      fieldList.push({ type: "string", value: "images", text: "图片逗号分隔" });
+      fieldList.push({ type: "string", value: "contentBody", text: "内容" });
+      fieldList.push({ type: "string", value: "userName", text: "姓名" });
+      fieldList.push({ type: "string", value: "userMobile", text: "手机号" });
+      fieldList.push({ type: "string", value: "roomNo", text: "房号" });
+      fieldList.push({ type: "date", value: "createDate", text: "创建时间" });
+      this.superFieldList = fieldList;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>

File diff suppressed because it is too large
+ 670 - 134
src/views/room/modules/checkIn/BillRoomForm.vue


+ 5 - 5
src/views/room/modules/checkIn/BillRoomFormModal.vue

@@ -24,7 +24,7 @@ export default {
   data() {
     return {
       title: "",
-      width: 1200,
+      width: 1300,
       visible: false,
       disableSubmit: false,
     };
@@ -36,10 +36,10 @@ export default {
         this.$refs.realForm.add2(record);
       });
     },
-    addList(record) {
+    addList(record,key) {
       this.visible = true;
       this.$nextTick(() => {
-        this.$refs.realForm.addList(record);
+        this.$refs.realForm.addList(record,key);
       });
     },
     edit(record) {
@@ -55,8 +55,8 @@ export default {
     handleOk() {
       this.$refs.realForm.submitForm();
     },
-    submitCallback() {
-      this.$emit("ok");
+    submitCallback(e) {
+      this.$emit("ok",e);
       this.visible = false;
     },
     handleCancel() {

+ 273 - 97
src/views/room/modules/checkIn/BillRoomInfo.vue

@@ -28,99 +28,166 @@
           </div>
         </div>
         <a-divider />
-
-        <a-descriptions :column="2">
-          <a-descriptions-item label="主客姓名">
-            张三
-            <a-icon
-              type="edit"
-              style="color: rgba(255, 141, 26, 1); font-size: 18px"
-          /></a-descriptions-item>
-          <a-descriptions-item label="房间数量"> 3间 </a-descriptions-item>
-          <a-descriptions-item label="手机号">
-            1588888888
-            <a-icon
-              type="edit"
-              style="color: rgba(255, 141, 26, 1); font-size: 18px"
-          /></a-descriptions-item>
-          <a-descriptions-item label="房间号"> 8888/9999 </a-descriptions-item>
-          <a-descriptions-item label="宾客类型">
-            散客
-            <a-icon
-              type="edit"
-              style="color: rgba(255, 141, 26, 1); font-size: 18px"
-          /></a-descriptions-item>
-          <a-descriptions-item label="入住时间">
-            2023-03-21 18:55
-          </a-descriptions-item>
-          <a-descriptions-item label="房价方案">
-            会员京卡折扣
-          </a-descriptions-item>
-          <a-descriptions-item label="预离时间">
-            2023-03-21 18:55
-          </a-descriptions-item>
-          <a-descriptions-item label="订单来源">
-            美团
-            <a-icon
-              type="edit"
-              style="color: rgba(255, 141, 26, 1); font-size: 18px"
-          /></a-descriptions-item>
-          <a-descriptions-item label="已住时长"> 3天 </a-descriptions-item>
-          <a-descriptions-item label="外部单号">
-            MT8888888888
-          </a-descriptions-item>
-          <a-descriptions-item label="销售员工">
-            无
-            <a-icon
-              type="edit"
-              style="color: rgba(255, 141, 26, 1); font-size: 18px"
-          /></a-descriptions-item>
-          <a-descriptions-item label="订单备注" :span="2">
-            该房间打碎玻璃杯1只,应赔付80元<a-icon
-              type="edit"
-              style="color: rgba(255, 141, 26, 1); font-size: 18px"
-            />
-          </a-descriptions-item>
-          <a-descriptions-item
-            label="叫醒服务"
-            :span="2"
-            v-for="(item, index) in wakeList"
-            :key="index"
+        <a-tabs>
+          <a-tab-pane
+            :key="item.id"
+            :tab="item.roomName"
+            v-for="(item, livingIndex) in model.livingRoomIds"
           >
-            <a-select
-              style="width: 100px"
-              placeholder="房间号"
-              @change="onChange"
-            >
-              <a-select-option value="jack"> 1001 </a-select-option>
-              <a-select-option value="lucy"> 1002 </a-select-option>
-            </a-select>
-            <a-date-picker
-              style="width: 120px; margin-left: 2px"
-              placeholder="日期"
-              @change="onChange"
-            />
-            <a-time-picker
-              style="width: 100px; margin-left: 2px"
-              :default-value="moment('12:08', 'HH:mm')"
-              format="HH:mm"
-            />
-            <a-icon
-              v-if="wakeList.length - 1 == index"
-              type="plus-circle"
-              class="dynamic-delete-button"
-              @click="puls()"
-            />
-            <a-icon
-              type="minus-circle"
-              style="color: #f56c6c"
-              class="dynamic-delete-button"
-              v-if="wakeList.length > 1"
-              @click="() => remove(index)"
-            />
-          </a-descriptions-item>
-        </a-descriptions>
-        <h4
+            <a-descriptions :column="2">
+              <a-descriptions-item label="主客姓名">
+                {{ item.livingCustomers[0].customerName }}
+                <a-icon
+                  type="edit"
+                  style="color: rgba(255, 141, 26, 1); font-size: 18px"
+              /></a-descriptions-item>
+              <a-descriptions-item label="性别">
+                {{
+                  item.livingCustomers[0].gender === 1 ? "男" : "女"
+                }}</a-descriptions-item
+              >
+              <a-descriptions-item label="房间数量">
+                {{ livingIndex == 0 ? model.livingRoomIds.length : 1 }}间
+              </a-descriptions-item>
+              <a-descriptions-item label="手机号">
+                {{ item.livingCustomers[0].phone }}
+                <a-icon
+                  type="edit"
+                  style="color: rgba(255, 141, 26, 1); font-size: 18px"
+              /></a-descriptions-item>
+
+              <a-descriptions-item label="宾客类型">
+                {{ customerTypeName(model.orderInfo.customerType) }}
+                <a-icon
+                  type="edit"
+                  style="color: rgba(255, 141, 26, 1); font-size: 18px"
+              /></a-descriptions-item>
+              <a-descriptions-item label="入住时间">
+                {{ model.orderInfo.arrivalTime }}
+              </a-descriptions-item>
+              <a-descriptions-item label="房价方案"> -- </a-descriptions-item>
+              <a-descriptions-item label="预离时间">
+                {{ model.orderInfo.dueOutTime }}
+              </a-descriptions-item>
+              <a-descriptions-item label="订单来源">
+                {{ customerSourceName(model.orderInfo.customerSource) }}
+                <a-icon
+                  type="edit"
+                  style="color: rgba(255, 141, 26, 1); font-size: 18px"
+              /></a-descriptions-item>
+              <a-descriptions-item label="入住类型">
+                {{ model.orderInfo.bookingType == 1 ? "全天" : "钟点" }}
+              </a-descriptions-item>
+              <a-descriptions-item label="入住天数">
+                {{ model.orderInfo.dayCount }}
+              </a-descriptions-item>
+              <a-descriptions-item label="早餐券">
+                {{ model.orderInfo.breakfastNum }}
+              </a-descriptions-item>
+              <a-descriptions-item label="外部单号">
+                {{ model.orderInfo.outerOrdersNo }}
+              </a-descriptions-item>
+              <a-descriptions-item label="销售员工">
+                {{ warranterName(model.orderInfo.warranter) }}
+                <a-icon
+                  type="edit"
+                  style="color: rgba(255, 141, 26, 1); font-size: 18px"
+              /></a-descriptions-item>
+              <a-descriptions-item label="订单备注" :span="2">
+                {{ model.orderInfo.remark
+                }}<a-icon
+                  type="edit"
+                  style="color: rgba(255, 141, 26, 1); font-size: 18px"
+                />
+              </a-descriptions-item>
+              <a-descriptions-item
+                label="叫醒服务"
+                :span="2"
+                v-for="(item, index) in wakeList"
+                :key="index"
+              >
+                <a-select
+                  style="width: 100px"
+                  placeholder="房间号"
+                  @change="onChange"
+                >
+                  <a-select-option value="jack"> 1001 </a-select-option>
+                  <a-select-option value="lucy"> 1002 </a-select-option>
+                </a-select>
+                <a-date-picker
+                  style="width: 120px; margin-left: 2px"
+                  placeholder="日期"
+                  @change="onChange"
+                />
+                <a-time-picker
+                  style="width: 100px; margin-left: 2px"
+                  :default-value="moment('12:08', 'HH:mm')"
+                  format="HH:mm"
+                />
+                <a-icon
+                  v-if="wakeList.length - 1 == index"
+                  type="plus-circle"
+                  class="dynamic-delete-button"
+                  @click="puls()"
+                />
+                <a-icon
+                  type="minus-circle"
+                  style="color: #f56c6c"
+                  class="dynamic-delete-button"
+                  v-if="wakeList.length > 1"
+                  @click="() => remove(index)"
+                />
+              </a-descriptions-item>
+            </a-descriptions>
+            <div style="display: flex; justify-content: space-between">
+              <h4
+                style="
+                  color: rgba(255, 141, 26, 1);
+                  font-weight: 600;
+                  margin-top: 15px;
+                "
+              >
+                同住人
+              </h4>
+              <div style="display: flex">
+                <div style="display: flex; flex-direction: column">
+                  <a-icon
+                    type="user-add"
+                    style="color: rgba(255, 141, 26, 1); font-size: 18px"
+                  /><a-button
+                    type="link"
+                    @click="addlivingCustomer(item.livingOrder.id, item.roomId)"
+                  >
+                    添加
+                  </a-button>
+                </div>
+              </div>
+            </div>
+            <div id="livingCustomers-grid">
+              <a-row
+                v-for="(customer, index) in item.livingCustomers"
+                :key="customer.id"
+              >
+                <template v-if="index > 0">
+                  <a-col :span="7"> {{ customer.customerName }} </a-col>
+                  <a-col :span="1"
+                    >{{ customer.gender == 1 ? "男" : "女" }}
+                  </a-col>
+                  <a-col :span="8"> {{ customer.certNo }}</a-col>
+                  <a-col :span="6"> {{ customer.phone }}</a-col>
+                  <a-col :span="2">
+                    <a-icon
+                      type="minus-circle"
+                      style="color: #f56c6c"
+                      class="dynamic-delete-button"
+                      @click="() => removeLivingCustomer(customer.id)"
+                  /></a-col>
+                </template>
+              </a-row>
+            </div>
+          </a-tab-pane>
+        </a-tabs>
+        <!-- <h4
           style="
             color: rgba(255, 141, 26, 1);
             font-weight: 600;
@@ -140,7 +207,7 @@
           <a-descriptions-item label="会员级别"> 金卡 </a-descriptions-item>
           <a-descriptions-item label="余额"> 3000.00元 </a-descriptions-item>
           <a-descriptions-item label="积分"> 888888分 </a-descriptions-item>
-        </a-descriptions>
+        </a-descriptions> -->
       </div>
       <div style="width: 40%">
         <div style="display: flex; justify-content: space-between">
@@ -268,13 +335,15 @@
         >
       </div>
     </div>
+    <customer-modal ref="modalCustomerForm" @ok="modalFormOk"></customer-modal>
   </div>
 </template>
 
 <script>
-import { httpAction, getAction } from "@/api/manage";
+import { httpAction, getAction, deleteAction } from "@/api/manage";
 import { validateDuplicateValue } from "@/utils/util";
 import moment from "moment";
+import CustomerModal from "./CustomerModal.vue";
 const columns = [
   // {
   //     title: "",
@@ -358,9 +427,11 @@ for (let i = 0; i < 8; i++) {
     amount: 888,
   });
 }
+const date = new Date();
+const endDate = new Date(date.setDate(date.getDate() + 1));
 export default {
   name: "BusMeetingRoomForm",
-  components: {},
+  components: { CustomerModal },
   props: {
     //表单禁用
     disabled: {
@@ -377,7 +448,13 @@ export default {
       data2,
       columns2,
       wakeList: [{}],
-      model: {},
+      model: {
+        // data: data,
+        orderInfo: {},
+        roomIds: [],
+        layoutDayPrices: [],
+        livingRoomIds: [],
+      },
       labelCol: {
         xs: { span: 24 },
         sm: { span: 5 },
@@ -395,7 +472,13 @@ export default {
         add: "/business/busMeetingRoom/add",
         edit: "/business/busMeetingRoom/edit",
         queryById: "/business/busMeetingRoom/queryById",
+        getBookingOrderInfo:
+          "/business/busRoomBookingOrders/getBookingOrderInfo",
       },
+      id: "",
+      customerSourceList: [],
+      warranterList: [],
+      key: 0,
     };
   },
   computed: {
@@ -410,8 +493,91 @@ export default {
     }
     //备份model原始值
     this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    getAction("/business/busDictItem/list", {
+      hotelId: _info.id,
+      dictId: "1639538915239743490",
+    }).then((res) => {
+      if (res.success) {
+        this.customerSourceList = res.result.records;
+      }
+    });
+    getAction("/business/busSalesPerson/list", {
+      hotelId: _info.id,
+      pageNo: 1,
+      pageSize: 100,
+    }).then((res) => {
+      if (res.success) {
+        this.warranterList = res.result.records;
+      }
+    });
   },
   methods: {
+    removeLivingCustomer(id) {
+      deleteAction("/business/busLivingCustomer/delete", { id: id }).then(
+        (res) => {
+          if (res.success) {
+            this.getBookingOrderInfo();
+          }
+        }
+      );
+    },
+    addlivingCustomer(id, roomId) {
+      console.log(id);
+      this.$refs.modalCustomerForm.add(id, roomId);
+      this.$refs.modalCustomerForm.title = "添加同住人";
+      this.$refs.modalCustomerForm.disableSubmit = false;
+    },
+    modalFormOk(e) {
+      this.getBookingOrderInfo();
+    },
+    customerTypeName(customerType) {
+      switch (customerType) {
+        case 1:
+          return "散客";
+        case 2:
+          return "会员";
+        case 3:
+          return "协议单位";
+        case 4:
+          return "中介";
+        default:
+          return "散客";
+      }
+    },
+    warranterName(warranter) {
+      var find = this.warranterList.find((t) => t.id == warranter);
+      return find ? find.name : "--";
+    },
+    customerSourceName(customerSource) {
+      var find = this.customerSourceList.find((t) => t.id == customerSource);
+      return find ? find.itemText : "--";
+    },
+    getBookingOrderInfo() {
+      var obj = {
+        bookingNo: this.id,
+      };
+      if (this.key && this.key == 1) {
+        obj = {
+          bookingOrderId: this.id,
+        };
+      }
+      getAction(this.url.getBookingOrderInfo, obj).then((res) => {
+        if (res.success) {
+          var livingRoomId = JSON.parse(
+            JSON.stringify(res.result.livingRoomIds[0])
+          );
+          livingRoomId.id = "1";
+          livingRoomId.roomName = "全部";
+          var list = [];
+          res.result.livingRoomIds.forEach((t) => {
+            list = [...list, ...t.livingCustomers];
+          });
+          livingRoomId.livingCustomers = list;
+          res.result.livingRoomIds.unshift(livingRoomId);
+          this.model = res.result;
+        }
+      });
+    },
     onSelectChange(selectedRowKeys, selectionRows) {
       this.selectedRowKeys = selectedRowKeys;
       this.selectionRows = selectionRows;
@@ -427,8 +593,11 @@ export default {
     onChange(e) {
       console.log(e);
     },
-    add() {
+    add(id, key) {
+      this.key = key;
+      this.id = id;
       this.edit(this.modelDefault);
+      this.getBookingOrderInfo();
     },
     edit(record) {
       this.model = Object.assign({}, record);
@@ -513,4 +682,11 @@ export default {
   padding: 5px 5px !important;
   overflow-wrap: break-word;
 }
+
+#livingCustomers-grid [class~="ant-col"] {
+  border: #ccc 1px solid;
+}
+#livingCustomers-grid [class~="ant-col"]:last-child {
+  border: 0;
+}
 </style>

+ 3 - 2
src/views/room/modules/checkIn/BillRoomInfoModal.vue

@@ -98,10 +98,11 @@
       }
     },
     methods: {
-      add () {
+      add (id,key) {
+        console.log("id",id)
         this.visible=true
         this.$nextTick(()=>{
-          this.$refs.realForm.add();
+          this.$refs.realForm.add(id,key);
         })
       },
       edit (record) {

+ 236 - 0
src/views/room/modules/checkIn/CustomerForm.vue

@@ -0,0 +1,236 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model
+        ref="form"
+        :model="model"
+        :rules="validatorRules"
+        slot="detail"
+      >
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item
+              label="证件类型"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="certType"
+            >
+              <a-select
+                v-model="model.certType"
+                style="width: 100%"
+                placeholder="证件类型"
+                :allowClear="true"
+              >
+                <a-select-option :value="1">身份证</a-select-option>
+                <a-select-option :value="2">护照</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="姓名"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="customerName"
+            >
+              <a-auto-complete
+                v-model="model.customerName"
+                placeholder="联系人"
+                @search="handleSearch"
+                @select="(e) => handleSelectMember(e)"
+              >
+                <template slot="dataSource">
+                  <a-select-option v-for="item in customerList" :key="item.id"
+                    >{{ item.name }}-{{ item.phone }}</a-select-option
+                  >
+                </template>
+              </a-auto-complete>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="性别"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="gender"
+            >
+              <a-radio-group v-model="model.gender">
+                <a-radio :value="1">男</a-radio>
+                <a-radio :value="2">女</a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="手机号"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="phone"
+            >
+              <a-input
+                v-model="model.phone"
+                placeholder="请输入手机号"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="证件号"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="certNo"
+            >
+              <a-input
+                v-model="model.certNo"
+                placeholder="请输入证件号"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <!-- <a-col :span="24">
+            <a-form-model-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
+              <a-input v-model="model.address" placeholder="请输入地址"  ></a-input>
+            </a-form-model-item>
+          </a-col> -->
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+
+export default {
+  name: "BusMemberCardForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: { payType: 1, livingOrderId: "",certType:1,gender:1 },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        mobile: [
+          {
+            required: true,
+            pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+            message: "请输入手机号!",
+          },
+        ],
+        cardNo: [{ required: true, message: "请输入会员卡号!" }],
+        gradeId: [{ required: true, message: "请输入等级类型!" }],
+        payType: [{ required: true, message: "请输入付款类型!" }],
+        paymentMethod: [{ required: true, message: "请输入付款方式!" }],
+        customerName: [{ required: true, message: "请输入会员姓名!" }],
+        sex: [{ required: true, message: "请输入性别!" }],
+        certificateType: [{ required: true, message: "请输入证件类型!" }],
+        validity: [{ required: true, message: "请输入有效期!" }],
+      },
+      url: {
+        add: "/business/busRoomBookingOrders/booking-to-live",
+        edit: "/business/busMemberCard/edit",
+        queryById: "/business/busMemberCard/queryById",
+      },
+      gradeList: [],
+      paymentMethodList: [],
+      staffList: [],
+      customerList: [],
+      oldcustomerList: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    this.getbusCustomer();
+  },
+  methods: {
+    handleSearch(value) {
+      let result;
+      if (!value) {
+        result = this.oldcustomerList;
+      } else {
+        result = this.oldcustomerList.filter((t) => t.name.includes(value));
+      }
+      this.customerList = result;
+    },
+    handleSelectMember(e) {
+      var find = this.customerList.find((t) => t.id === e);
+      this.model.phone = find.phone;
+      this.model.customerName = find.name;
+      this.model.customerId = find.id;
+    },
+    getbusCustomer() {
+      getAction("/bus/busCustomer/list", {}).then((res) => {
+        if (res.success) {
+          this.customerList = res.result.records;
+          this.oldcustomerList = JSON.parse(JSON.stringify(this.customerList));
+        }
+      });
+    },
+    add(livingOrderId,roomId) {
+      this.modelDefault.livingOrderId = livingOrderId;
+      this.modelDefault.roomId = roomId;
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      // 触发表单验证
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true;
+          // var customers = [];
+          // customers.push({
+          //   certNo: this.model.certNo,
+          //   certType: this.model.certType,
+          //   customerId: this.model.customerId,
+          //   customerName: this.model.customerName,
+          //   gender: this.model.gender,
+          //   phone: this.model.phone,
+          //   roomId: this.model.roomId,
+          // });
+          httpAction("/business/busLivingCustomer/add", this.model, "post")
+            .then((res) => {
+              if (res.success) {
+                that.$message.success("入住成功");
+                that.$emit("ok");
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>

+ 60 - 0
src/views/room/modules/checkIn/CustomerModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <bus-member-card-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-member-card-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusMemberCardForm from './CustomerForm'
+  export default {
+    name: 'BusMemberCardModal',
+    components: {
+      BusMemberCardForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add (livingOrderId,roomId) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add(livingOrderId,roomId);
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 80 - 22
src/views/room/modules/checkIn/SelectRoomForm.vue

@@ -13,15 +13,23 @@
               label="房型"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
-              prop="roomType"
             >
-              <a-checkbox-group
-                v-model="model.roomType"
-                :options="roomTypeOptions"
-              />
+              <a-checkbox-group @change="onChange" v-model="checkLayoutList">
+                <a-row>
+                  <a-col
+                    :span="12"
+                    v-for="(item, index) in roomLayoutList"
+                    :key="item.id"
+                  >
+                    <a-checkbox :value="item.id">
+                      {{ item.name }}
+                    </a-checkbox>
+                  </a-col>
+                </a-row>
+              </a-checkbox-group>
             </a-form-model-item>
           </a-col>
-          <a-col :span="24">
+          <!-- <a-col :span="24">
             <a-form-model-item
               label="房态"
               :labelCol="labelCol"
@@ -33,7 +41,7 @@
                 :options="roomStatusOptions"
               />
             </a-form-model-item>
-          </a-col>
+          </a-col> -->
           <a-col :span="24">
             <a-form-model-item
               label="已选"
@@ -48,10 +56,10 @@
                 color="blue"
                 closable
                 :visible="visible"
-                @close.stop="tagClose2(index, item.roomNo)"
+                @close.stop="tagClose2(index, item.name)"
                 v-for="(item, index) in model.rooms"
                 :key="index"
-                >{{ item.roomNo }}</a-tag
+                >{{ item.name }}</a-tag
               >
             </a-form-model-item>
           </a-col>
@@ -65,14 +73,14 @@
               }"
             >
               <a-tabs
-                :default-active-key="0"
+                default-active-key="room0"
                 tab-position="left"
                 :style="{ height: '300px' }"
               >
                 <a-tab-pane
                   v-for="(room, index) in roomList"
-                  :key="index"
-                  :tab="room.key"
+                  :key="'room' + index"
+                  :tab="room.floorName"
                 >
                   <div
                     id="components-grid-demo-playground"
@@ -81,8 +89,8 @@
                     <a-row :gutter="[8, 8]">
                       <a-col
                         :span="3"
-                        v-for="(r, rIndex) in room.child"
-                        :key="rIndex"
+                        v-for="(r, rIndex) in room.floorRooms"
+                        :key="'floorRooms' + rIndex"
                       >
                         <div
                           :class="[
@@ -91,7 +99,7 @@
                           ]"
                           @click="checkRoomClick(r)"
                         >
-                          {{ r.roomNo }}
+                          {{ r.name }}
                         </div></a-col
                       >
                     </a-row>
@@ -145,9 +153,9 @@ export default {
         { key: "1层", child: rooms },
         { key: "2层", child: rooms2 },
       ],
-      roomTypeOptions: ["休闲家庭房", "特价房"],
+      roomTypeOptions: [],
       roomStatusOptions: ["空净", "空脏"],
-      model: { rooms: [] },
+      model: { roomType: "", rooms: [] },
       labelCol: {
         xs: { span: 24 },
         sm: { span: 2 },
@@ -166,6 +174,13 @@ export default {
         edit: "/business/busMeetingRoom/edit",
         queryById: "/business/busMeetingRoom/queryById",
       },
+      layoutName: "",
+      presetNum: 0,
+      canUserRooms: [],
+      oldcanUserRooms: [],
+      checkLayoutList: [],
+      roomLayoutList: [],
+      oldroomList: [],
     };
   },
   computed: {
@@ -180,6 +195,19 @@ export default {
     }
     //备份model原始值
     this.modelDefault = JSON.parse(JSON.stringify(this.model));
+
+    getAction("/rooms/cesRoomLayout/list", { pageSize: 99999, pageNo: 1 }).then(
+      (res) => {
+        if (res.success) {
+          this.roomLayoutList = res.result.records;
+          if (this.roomLayoutList && this.roomLayoutList.length > 0) {
+            this.roomLayoutList.forEach((item) => {
+              this.checkLayoutList.push(item.id);
+            });
+          }
+        }
+      }
+    );
   },
   methods: {
     checkRoomClick(row) {
@@ -195,8 +223,8 @@ export default {
     tagClose2(index, key1) {
       this.model.rooms.splice(index, 1);
       this.roomList.some((t) => {
-        var r = t.child.some((c) => {
-          if (c.roomNo === key1) {
+        var r = t.floorRooms.some((c) => {
+          if (c.name === key1) {
             c.check = 0;
             return true;
           }
@@ -207,14 +235,44 @@ export default {
         }
       });
     },
-    onChange(date, dateString) {
-      console.log(date, dateString);
+    onChange(e) {
+      console.log(e);
+      var list = [];
+      this.oldroomList.forEach((item) => {
+        var floorRooms = [];
+        item.floorRooms.forEach((f) => {
+          if (e.includes(f.layoutId)) {
+            floorRooms.push(f);
+          }
+        });
+        var itemd = JSON.parse(JSON.stringify(item));
+        itemd.floorRooms = floorRooms;
+        list.push(itemd);
+      });
+      this.roomList = list;
+      // result = this.oldcustomerList.filter((t) => t.name.includes(value));
+      console.log("this.oldroomList", this.oldroomList);
+      console.log("this.roomList", this.roomList);
     },
-    add() {
+    add(row) {
+      console.log("canUserRooms", row);
+      // this.canUserRooms = row;
+      this.oldroomList = JSON.parse(JSON.stringify(row[0].buildingRooms));
+
+      // this.layoutName = row.layout.name;
+      // this.presetNum = row.layout.presetNum;
+      this.roomList = row[0].buildingRooms;
       this.edit(this.modelDefault);
     },
     edit(record) {
       this.model = Object.assign({}, record);
+      this.roomList.forEach((t) => {
+        t.floorRooms.forEach((f) => {
+          if (f.check && f.check == 1) {
+            this.model.rooms.push(f);
+          }
+        });
+      });
       this.visible = true;
     },
     submitForm() {

+ 2 - 2
src/views/room/modules/checkIn/SelectRoomFormModal.vue

@@ -33,10 +33,10 @@ export default {
     };
   },
   methods: {
-    add() {
+    add(row) {
       this.visible = true;
       this.$nextTick(() => {
-        this.$refs.realForm.add();
+        this.$refs.realForm.add(row);
       });
     },
     edit(record) {

+ 239 - 0
src/views/room/modules/customer/CustomerForm.vue

@@ -0,0 +1,239 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model
+        ref="form"
+        :model="model"
+        :rules="validatorRules"
+        slot="detail"
+      >
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item
+              label="证件类型"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="certType"
+            >
+              <a-select
+                v-model="model.certType"
+                style="width: 100%"
+                placeholder="证件类型"
+                :allowClear="true"
+              >
+                <a-select-option :value="1">身份证</a-select-option>
+                <a-select-option :value="2">护照</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="姓名"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="customerName"
+            >
+              <a-auto-complete
+                v-model="model.customerName"
+                placeholder="联系人"
+                @search="handleSearch"
+                @select="(e) => handleSelectMember(e)"
+              >
+                <template slot="dataSource">
+                  <a-select-option v-for="item in customerList" :key="item.id"
+                    >{{ item.name }}-{{ item.phone }}</a-select-option
+                  >
+                </template>
+              </a-auto-complete>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="性别"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="gender"
+            >
+              <a-radio-group v-model="model.gender">
+                <a-radio :value="1">男</a-radio>
+                <a-radio :value="2">女</a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="手机号"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="phone"
+            >
+              <a-input
+                v-model="model.phone"
+                placeholder="请输入手机号"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="证件号"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="certNo"
+            >
+              <a-input
+                v-model="model.certNo"
+                placeholder="请输入证件号"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <!-- <a-col :span="24">
+            <a-form-model-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
+              <a-input v-model="model.address" placeholder="请输入地址"  ></a-input>
+            </a-form-model-item>
+          </a-col> -->
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+
+export default {
+  name: "BusMemberCardForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: { payType: 1 },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        mobile: [
+          {
+            required: true,
+            pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+            message: "请输入手机号!",
+          },
+        ],
+        cardNo: [{ required: true, message: "请输入会员卡号!" }],
+        gradeId: [{ required: true, message: "请输入等级类型!" }],
+        payType: [{ required: true, message: "请输入付款类型!" }],
+        paymentMethod: [{ required: true, message: "请输入付款方式!" }],
+        customerName: [{ required: true, message: "请输入会员姓名!" }],
+        sex: [{ required: true, message: "请输入性别!" }],
+        certificateType: [{ required: true, message: "请输入证件类型!" }],
+        validity: [{ required: true, message: "请输入有效期!" }],
+      },
+      url: {
+        add: "/business/busRoomBookingOrders/booking-to-live",
+        edit: "/business/busMemberCard/edit",
+        queryById: "/business/busMemberCard/queryById",
+      },
+      gradeList: [],
+      paymentMethodList: [],
+      staffList: [],
+      customerList: [],
+      oldcustomerList: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    this.getbusCustomer();
+  },
+  methods: {
+    handleSearch(value) {
+      let result;
+      if (!value) {
+        result = this.oldcustomerList;
+      } else {
+        result = this.oldcustomerList.filter((t) => t.name.includes(value));
+      }
+      this.customerList = result;
+    },
+    handleSelectMember(e) {
+      var find = this.customerList.find((t) => t.id === e);
+      this.model.phone = find.phone;
+      this.model.customerName = find.name;
+      this.model.customerId = find.id;
+    },
+    getbusCustomer() {
+      getAction("/bus/busCustomer/list", {}).then((res) => {
+        if (res.success) {
+          this.customerList = res.result.records;
+          this.oldcustomerList = JSON.parse(JSON.stringify(this.customerList));
+        }
+      });
+    },
+    add() {
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      // 触发表单验证
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true;
+          var customers = [];
+          customers.push({
+            certNo: this.model.certNo,
+            certType: this.model.certType,
+            customerId: this.model.customerId,
+            customerName: this.model.customerName,
+            gender: this.model.gender,
+            phone: this.model.phone,
+            roomId: this.model.roomId,
+          });
+          httpAction(
+            "/business/busRoomBookingOrders/booking-to-live?bookingRoomId=" +
+              this.model.bookingRoomId,
+            customers,
+            "post"
+          )
+            .then((res) => {
+              if (res.success) {
+                that.$message.success('入住成功');
+                that.$emit("ok");
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>

+ 60 - 0
src/views/room/modules/customer/CustomerModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <bus-member-card-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-member-card-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusMemberCardForm from './CustomerForm'
+  export default {
+    name: 'BusMemberCardModal',
+    components: {
+      BusMemberCardForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 222 - 0
src/views/room/modules/leasegoods/CesOrderLeaseGoodsForm.vue

@@ -0,0 +1,222 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model
+        ref="form"
+        :model="model"
+        :rules="validatorRules"
+        slot="detail"
+      >
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item
+              label="房号"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="roomId"
+            >
+              <a-select v-model="model.roomId" placeholder="请选择房号">
+                <a-select-option
+                  :value="item.id"
+                  v-for="(item, index) in roomsList"
+                  :key="item.id"
+                >
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="姓名"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="userName"
+            >
+              <a-input
+                v-model="model.userName"
+                placeholder="请输入姓名"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="物品"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="goodsId"
+            >
+              <a-select v-model="model.goodsId" placeholder="请选择民族">
+                <a-select-option
+                  :value="item.id"
+                  v-for="(item, index) in busDictItemList"
+                  :key="item.id"
+                >
+                  {{ item.itemText }}
+                </a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="数量"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="num"
+            >
+              <a-input-number
+                v-model="model.num"
+                placeholder="请输入数量"
+                style="width: 100%"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="押金"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="deposit"
+            >
+              <a-input-number
+                v-model="model.deposit"
+                placeholder="请输入押金"
+                style="width: 100%"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="备注"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="remark"
+            >
+              <a-textarea
+                v-model="model.remark"
+                rows="4"
+                placeholder="请输入备注"
+              />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+
+export default {
+  name: "CesOrderLeaseGoodsForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        tenantId: [{ required: true, message: "请输入关联租户!" }],
+        hotelId: [{ required: true, message: "请输入关联酒店!" }],
+        goodsId: [{ required: true, message: "请输入物品平台字典项目ID!" }],
+        num: [{ required: true, message: "请输入数量!" }],
+        deposit: [{ required: true, message: "请输入押金!" }],
+        createDate: [{ required: true, message: "请输入创建时间!" }],
+        orderNo: [{ required: true, message: "请输入单据号!" }],
+      },
+      url: {
+        add: "/order/cesOrderLeaseGoods/add",
+        edit: "/order/cesOrderLeaseGoods/edit",
+        queryById: "/order/cesOrderLeaseGoods/queryById",
+      },
+      busDictItemList: [],
+      roomsList: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    getAction("/business/busDictItem/list", {
+      dictId: "1639538235288539138",
+    }).then((res) => {
+      if (res.success) {
+        this.busDictItemList = res.result.records;
+      }
+    });
+
+    getAction("/rooms/cesRooms/list", {
+      pageNo: 1,
+      pageSize: 100,
+    }).then((res) => {
+      if (res.success) {
+        this.roomsList = res.result.records;
+      }
+    });
+  },
+  methods: {
+    add() {
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      // 触发表单验证
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true;
+          let httpurl = "";
+          let method = "";
+          if (!this.model.id) {
+            httpurl += this.url.add;
+            method = "post";
+          } else {
+            httpurl += this.url.edit;
+            method = "put";
+          }
+          httpAction(httpurl, this.model, method)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.$emit("ok");
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>

+ 84 - 0
src/views/room/modules/leasegoods/CesOrderLeaseGoodsModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <ces-order-lease-goods-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></ces-order-lease-goods-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import CesOrderLeaseGoodsForm from './CesOrderLeaseGoodsForm'
+
+  export default {
+    name: 'CesOrderLeaseGoodsModal',
+    components: {
+      CesOrderLeaseGoodsForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
src/views/room/modules/leasegoods/CesOrderLeaseGoodsModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <ces-order-lease-goods-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></ces-order-lease-goods-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import CesOrderLeaseGoodsForm from './CesOrderLeaseGoodsForm'
+  export default {
+    name: 'CesOrderLeaseGoodsModal',
+    components: {
+      CesOrderLeaseGoodsForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

File diff suppressed because it is too large
+ 1348 - 0
src/views/room/modules/schedule/EditScheduleRoomForm.vue


+ 88 - 0
src/views/room/modules/schedule/EditScheduleRoomModal.vue

@@ -0,0 +1,88 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <schedule-room-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></schedule-room-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import ScheduleRoomForm from './EditScheduleRoomForm'
+  export default {
+    name: 'ScheduleRoomModal',
+    components: {
+      ScheduleRoomForm
+    },
+    data () {
+      return {
+        title:'',
+        width:1300,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      addList(record) {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.addList(record);
+      });
+    },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+<style scoped>
+/deep/.ant-modal-body {
+  padding: 12px;
+  max-height: calc(80vh - 150px);
+  overflow-y: auto;
+  &::-webkit-scrollbar {
+    width: 6px;
+    /*高宽分别对应横竖滚动条的尺寸*/
+    height: 1px;
+  }
+
+  &::-webkit-scrollbar-thumb {
+    background: #e3e3e6;
+    border-radius: 6px;
+  }
+
+  &::-webkit-scrollbar-track {
+    background: transparent;
+    border-radius: 5px;
+  }
+}
+</style>

+ 576 - 102
src/views/room/modules/schedule/ScheduleRoomForm.vue

@@ -19,11 +19,15 @@
                   label="入住类型"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="orderInfo.bookingType"
                 >
-                  <a-select placeholder="入住类型">
-                    <a-select-option value="全天"> 全天 </a-select-option>
-                    <a-select-option value="钟点"> 钟点 </a-select-option>
+                  <a-select
+                    placeholder="入住类型"
+                    v-model="model.orderInfo.bookingType"
+                    @change="bookingTypeChange"
+                  >
+                    <a-select-option :value="1"> 全天 </a-select-option>
+                    <a-select-option :value="2"> 钟点 </a-select-option>
                   </a-select>
                 </a-form-model-item>
               </a-col>
@@ -33,17 +37,23 @@
                   label="预抵时间"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="orderInfo.arrivalTime2"
                 >
                   <j-date
                     placeholder="预抵时间"
-                    v-model="model.endTime"
+                    v-model="model.orderInfo.arrivalTime2"
                     style="width: 180px"
+                    :allowClear="false"
+                    :disabled-date="disabledDate"
+                    @change="arrivalTimeChange"
                   />
                   <a-time-picker
                     style="width: 80px; margin-left: 2px"
-                    :default-value="moment('18:00', 'HH:mm')"
+                    v-model="model.orderInfo.arrivalTimeSpan"
+                    :default-value="moment('12:00', 'HH:mm')"
                     format="HH:mm"
+                    :allowClear="false"
+                    @change="arrivalTimeSpanChange"
                   />
                 </a-form-model-item>
               </a-col>
@@ -52,17 +62,23 @@
                   label="预离时间"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="orderInfo.dueOutTime2"
                 >
                   <j-date
                     placeholder="预离时间"
-                    v-model="model.endTime"
+                    v-model="model.orderInfo.dueOutTime2"
                     style="width: 180px"
+                    :allowClear="false"
+                    :disabled-date="disabledDate"
+                    :disabled="model.orderInfo.bookingType === 2"
+                    @change="arrivalTimeChange2"
                   />
                   <a-time-picker
                     style="width: 80px; margin-left: 2px"
-                    :default-value="moment('12:00', 'HH:mm')"
+                    v-model="model.orderInfo.dueOutTimeSpan"
                     format="HH:mm"
+                    :allowClear="false"
+                    :disabled="model.orderInfo.bookingType === 2"
                   />
                 </a-form-model-item>
               </a-col>
@@ -71,25 +87,71 @@
                   label="客人来源"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="orderInfo.customerSource"
                 >
-                  <a-select placeholder="订单来源">
-                    <a-select-option value="散客"> 散客 </a-select-option>
-                    <a-select-option value="美团"> 美团 </a-select-option>
+                  <a-select
+                    placeholder="客人来源"
+                    v-model="model.orderInfo.customerSource"
+                  >
+                    <a-select-option
+                      :value="item.id"
+                      v-for="(item, index) in customerSourceList"
+                      :key="item.id"
+                    >
+                      {{ item.itemText }}
+                    </a-select-option>
                   </a-select>
                 </a-form-model-item>
               </a-col>
-              <a-col :span="24">
+              <a-col :span="24" v-if="model.orderInfo.bookingType == 2">
+                <a-form-model-item
+                  label="时长"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.hourRoomId"
+                >
+                  <a-select
+                    placeholder="时长"
+                    v-model="model.orderInfo.hourRoomId"
+                    @change="hourRoomIdChange"
+                  >
+                    <a-select-option
+                      :value="item.id"
+                      v-for="(item, index) in hourRoomRuleList"
+                      :key="item.id"
+                    >
+                      {{ item.hourRoomName }}
+                    </a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24" v-else>
                 <a-form-model-item
                   label="天数"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="orderInfo.dayCount"
                 >
                   <a-input-number
-                    v-model="model.userName"
+                    v-model="model.orderInfo.dayCount"
                     placeholder="天数"
                     :min="1"
+                    @change="dayCountChange"
+                  ></a-input-number>
+                </a-form-model-item>
+              </a-col>
+
+              <a-col :span="24">
+                <a-form-model-item
+                  label="早餐"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.breakfastNum"
+                >
+                  <a-input-number
+                    v-model="model.orderInfo.breakfastNum"
+                    placeholder="早餐"
+                    :min="0"
                   ></a-input-number>
                 </a-form-model-item>
               </a-col>
@@ -98,14 +160,18 @@
                   label="预定方式"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="orderInfo.bookingDicWay"
                 >
-                  <a-select placeholder="预定方式">
-                    <a-select-option value="美团酒店">
-                      美团酒店
-                    </a-select-option>
-                    <a-select-option value="携程酒店">
-                      携程酒店
+                  <a-select
+                    placeholder="预定方式"
+                    v-model="model.orderInfo.bookingDicWay"
+                  >
+                    <a-select-option
+                      :value="item.id"
+                      v-for="(item, index) in bookingdicWayList"
+                      :key="item.id"
+                    >
+                      {{ item.itemText }}
                     </a-select-option>
                   </a-select>
                 </a-form-model-item>
@@ -115,22 +181,30 @@
                   label="客人类型"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="orderInfo.customerType"
                 >
-                  <a-select placeholder="客人类型">
-                    <a-select-option value="散客"> 散客 </a-select-option>
-                    <a-select-option value="会员"> 会员 </a-select-option>
+                  <a-select
+                    placeholder="客人类型"
+                    v-model="model.orderInfo.customerType"
+                  >
+                    <a-select-option :value="1"> 散客 </a-select-option>
+                    <a-select-option :value="2"> 会员 </a-select-option>
+                    <a-select-option :value="3"> 协议单位 </a-select-option>
+                    <a-select-option :value="4"> 中介 </a-select-option>
                   </a-select>
                 </a-form-model-item>
               </a-col>
-              <a-col :span="24">
+              <a-col :span="24" v-if="model.orderInfo.bookingType === 1">
                 <a-form-model-item
                   label="房价方案"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="orderInfo.roomPriceSlnId"
                 >
-                  <a-select placeholder="房价方案">
+                  <a-select
+                    placeholder="房价方案"
+                    v-model="model.orderInfo.roomPriceSlnId"
+                  >
                     <a-select-option value="会员价"> 会员价 </a-select-option>
                     <a-select-option value="平日价"> 平日价 </a-select-option>
                   </a-select>
@@ -145,18 +219,20 @@
                   label="联系人"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="contactName"
                 >
                   <a-auto-complete
-                    v-model="model.key1"
+                    v-model="model.contactName"
                     placeholder="联系人"
                     @search="handleSearch"
                     @select="(e) => handleSelectMember(e)"
                   >
                     <template slot="dataSource">
-                      <a-select-option v-for="item in result" :key="item">{{
-                        item
-                      }}</a-select-option>
+                      <a-select-option
+                        v-for="item in customerList"
+                        :key="item.id"
+                        >{{ item.name }}-{{ item.phone }}</a-select-option
+                      >
                     </template>
                   </a-auto-complete>
                 </a-form-model-item>
@@ -166,9 +242,9 @@
                   label="电话"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="phone"
                 >
-                  <a-input v-model="model.mobile" placeholder="电话"></a-input>
+                  <a-input v-model="model.phone" placeholder="电话"></a-input>
                 </a-form-model-item>
               </a-col>
               <a-col :span="24">
@@ -176,11 +252,15 @@
                   label="担保方式"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="orderInfo.warrantType"
                 >
-                  <a-select placeholder="担保方式">
-                    <a-select-option value="无担保"> 无担保 </a-select-option>
-                    <a-select-option value="有担保"> 有担保 </a-select-option>
+                  <a-select
+                    placeholder="担保方式"
+                    v-model="model.orderInfo.warrantType"
+                  >
+                    <a-select-option :value="1"> 无担保 </a-select-option>
+                    <a-select-option :value="2"> 有担保 </a-select-option>
+                    <a-select-option :value="3"> OTA担保 </a-select-option>
                   </a-select>
                 </a-form-model-item>
               </a-col>
@@ -189,11 +269,19 @@
                   label="销售员"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="orderInfo.warranter"
                 >
-                  <a-select placeholder="销售员">
-                    <a-select-option value="a"> a </a-select-option>
-                    <a-select-option value="b"> b </a-select-option>
+                  <a-select
+                    placeholder="销售员"
+                    v-model="model.orderInfo.warranter"
+                  >
+                    <a-select-option
+                      :value="item.id"
+                      v-for="item in warranterList"
+                      :key="item.id"
+                    >
+                      {{ item.name }}
+                    </a-select-option>
                   </a-select>
                 </a-form-model-item>
               </a-col>
@@ -202,10 +290,10 @@
                   label="外部单号"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="orderInfo.outerOrdersNo"
                 >
                   <a-input
-                    v-model="model.mobile"
+                    v-model="model.orderInfo.outerOrdersNo"
                     placeholder="外部单号"
                   ></a-input>
                 </a-form-model-item>
@@ -215,10 +303,10 @@
                   label="备注"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="remark"
+                  prop="orderInfo.remark"
                 >
                   <a-textarea
-                    v-model="model.remark"
+                    v-model="model.orderInfo.remark"
                     rows="4"
                     placeholder="备注"
                   />
@@ -231,46 +319,75 @@
               </h4>
               <a-divider />
               <p>
-                <span>占房天数:1晚</span>
-                <span style="padding-left: 10px">总价:599.00</span>
+                <span>占房天数:{{ model.orderInfo.dayCount }}晚</span>
+                <span style="padding-left: 10px">总价:{{ amount }}</span>
               </p>
               <a-table
                 :columns="columns"
-                :data-source="model.data"
+                :data-source="canUserRooms"
                 :pagination="false"
-                rowKey="id"
+                :rowKey="rowKey"
               >
                 <div
                   slot="expandedRowRender"
-                  slot-scope="text, record, index"
+                  slot-scope="record, index, indent, expanded"
                   style="margin: 0"
                 >
                   <p>
-                    已排房:<a-tag
-                      color="blue"
-                      closable
-                      :visible="visible"
-                      @close.stop="tagClose2(rindex, index)"
-                      v-for="(item, rindex) in text.rooms"
-                      :key="rindex"
-                      >{{ item.roomNo }}</a-tag
+                    已排房:
+                    <template
+                      v-for="(building, bIndex) in record.buildingRooms"
                     >
+                      <a-tag
+                        color="blue"
+                        closable
+                        :visible="visible"
+                        @close.stop="tagClose2(rindex, bIndex, index)"
+                        v-for="(item, rindex) in building.floorRooms"
+                        :key="rindex"
+                        v-if="item.check && item.check == 1"
+                        >{{ item.name }}</a-tag
+                      >
+                      <!-- <a-tag
+                        color="blue"
+                        closable
+                        :visible="visible"
+                        @close.stop="tagClose2(rindex, index)"
+                        v-for="(item, rindex) in record.rooms"
+                        :key="rindex"
+                        >{{ item.name }}</a-tag
+                      > -->
+                    </template>
+                  </p>
+                  <p>
+                    未排房:{{
+                      record.layout.presetNum - (record.rooms || []).length
+                    }}间
                   </p>
-                  <p>未排房:0间</p>
                 </div>
-                <template slot="key3" slot-scope="text, record, index">
-                  <editable-cell
-                    :text="text"
-                    @change="onCellChange('key3', index, $event)"
-                  />
+                <template slot="favPrice" slot-scope="text, record, index">
+                  <!-- <editable-cell
+                    :text="record.layout.favPrice"
+                    @change="onCellChange('favPrice', index, $event)"
+                  /> -->
+                  {{ record.layout.favPrice }}
                 </template>
-                <template slot="key6" slot-scope="text, record, index">
+                <template slot="presetNum" slot-scope="text, record, index">
                   <div>
-                    <a-input-number v-model="model.data[index].key6" :min="0" />
+                    <a-input-number
+                      v-model="record.layout.presetNum"
+                      :min="(record.rooms || []).length"
+                      :max="record.layout.oldTags"
+                      @change="presetNumChange($event, record)"
+                    />
                   </div>
                 </template>
                 <span slot="action" slot-scope="text, record, index">
-                  <a @click="pulsRoom(index)">排房</a>
+                  <a
+                    :disabled="record.layout.presetNum <= 0"
+                    @click="pulsRoom(index)"
+                    >排房</a
+                  >
                 </span>
               </a-table>
             </div>
@@ -286,11 +403,13 @@
 </template>
 
 <script>
-import { httpAction, getAction } from "@/api/manage";
+import { httpAction, getAction, postAction } from "@/api/manage";
 import { validateDuplicateValue } from "@/utils/util";
 import moment from "moment";
 import EditableCell from "@views/room/modules/checkIn/EditableCell.vue";
 import SelectRoomFormModal from "./SelectRoomFormModal.vue";
+const date = new Date();
+const endDate = new Date(date.setDate(date.getDate() + 1));
 const columns = [
   // {
   //     title: "",
@@ -299,33 +418,39 @@ const columns = [
   //   },
   {
     title: "房型",
-    dataIndex: "key1",
+    dataIndex: "name",
     width: 150,
+    customRender: function (text, record) {
+      return record.layout.name;
+    },
   },
   {
     title: "门市价",
-    dataIndex: "key2",
+    dataIndex: "marketPrice",
     width: 100,
+    customRender: function (text, record) {
+      return record.layout.marketPrice;
+    },
   },
   {
     title: "优惠价",
-    dataIndex: "key3",
+    dataIndex: "favPrice",
     width: 120,
-    scopedSlots: { customRender: "key3" },
+    scopedSlots: { customRender: "favPrice" },
   },
   {
     title: "可订数/可超数",
-    dataIndex: "key4",
+    dataIndex: "canUseCount",
     width: 170,
     customRender: function (text, record) {
-      return text + "/" + record.key5;
+      return record.layout.canUseCount + "/0";
     },
   },
   {
     title: "预定间数",
-    dataIndex: "key6",
+    dataIndex: "presetNum",
     width: 100,
-    scopedSlots: { customRender: "key6" },
+    scopedSlots: { customRender: "presetNum" },
   },
   {
     title: "操作",
@@ -358,12 +483,32 @@ export default {
       default: false,
       required: false,
     },
+    bookingOrdersId: {
+      type: String,
+      default: "",
+    },
   },
   data() {
     return {
       visible: true,
       columns,
-      model: { data: data },
+      model: {
+        // data: data,
+        orderInfo: {
+          bookingOrdersType: this.bookingOrdersId ? 2 : 1,
+          arrivalTime2: moment(new Date()).format("YYYY-MM-DD"),
+          dueOutTime2: moment(endDate).format("YYYY-MM-DD"),
+          arrivalTimeSpan: moment("18:00", "HH:mm"),
+          dueOutTimeSpan: moment("12:00", "HH:mm"),
+          bookingType: 1,
+          dayCount: 1,
+          warrantType: 1,
+          hourRoomId: "",
+          breakfastNum: 0,
+        },
+        roomIds: [],
+        layoutDayPrices: [],
+      },
       labelCol: {
         xs: { span: 24 },
         sm: { span: 5 },
@@ -374,22 +519,54 @@ export default {
       },
       confirmLoading: false,
       validatorRules: {
-        dateRange: [{ required: true, message: "请选择维修时间!" }],
-        remark: [{ required: true, message: "请输入维修原因!" }],
+        "orderInfo.bookingType": [
+          { required: true, message: "请选择入住类型!" },
+        ],
+        "orderInfo.arrivalTime2": [
+          { required: true, message: "请选择预抵时间!" },
+        ],
+        "orderInfo.dueOutTime2": [
+          { required: true, message: "请选择预离时间!" },
+        ],
+        "orderInfo.customerSource": [
+          { required: true, message: "请选择客人来源!" },
+        ],
+        "orderInfo.bookingDicWay": [
+          { required: true, message: "请选择预定方式!" },
+        ],
+        "orderInfo.customerType": [
+          { required: true, message: "请选择客人类型!" },
+        ],
+        contactName: [{ required: true, message: "请输入联系人!" }],
+        phone: [{ required: true, message: "请输入电话!" }],
       },
       url: {
-        add: "/business/busMeetingRoom/add",
+        add: "/business/busRoomBookingOrders/add",
         edit: "/business/busMeetingRoom/edit",
         queryById: "/business/busMeetingRoom/queryById",
       },
       result: [],
       selectIndex: 0,
+      customerSourceList: [],
+      bookingdicWayList: [],
+      warranterList: [],
+      hourRoomRuleList: [],
+      canUserRooms: [],
+      customerList: [],
+      oldcustomerList: [],
     };
   },
   computed: {
     formDisabled() {
       return this.disabled;
     },
+    amount() {
+      var sum = 0;
+      this.canUserRooms.forEach((t) => {
+        sum += t.layout.favPrice * t.layout.presetNum;
+      });
+      return sum.toFixed(2);
+    },
   },
   created() {
     var _info = JSON.parse(localStorage.getItem("storeInfo"));
@@ -398,37 +575,286 @@ export default {
     }
     //备份model原始值
     this.modelDefault = JSON.parse(JSON.stringify(this.model));
+
+    getAction("/business/busDictItem/list", {
+      hotelId: _info.id,
+      dictId: "1639538915239743490",
+    }).then((res) => {
+      if (res.success) {
+        this.customerSourceList = res.result.records;
+      }
+    });
+    getAction("/business/busDictItem/list", {
+      hotelId: _info.id,
+      dictId: "1639544187093995521",
+    }).then((res) => {
+      if (res.success) {
+        this.bookingdicWayList = res.result.records;
+      }
+    });
+    getAction("/business/busSalesPerson/list", {
+      hotelId: _info.id,
+      pageNo: 1,
+      pageSize: 100,
+    }).then((res) => {
+      if (res.success) {
+        this.warranterList = res.result.records;
+      }
+    });
+
+    getAction("/rooms/cesHourRoomRule/list", {
+      pageNo: 1,
+      pageSize: 100,
+    }).then((res) => {
+      if (res.success) {
+        this.hourRoomRuleList = res.result.records;
+      }
+    });
+    getAction("/bus/busCustomer/list", {}).then((res) => {
+      if (res.success) {
+        this.customerList = res.result.records;
+        this.oldcustomerList = JSON.parse(JSON.stringify(this.customerList));
+      }
+    });
+
+    postAction("/rooms/cesAllDayPriceRule/fetch", { hotelId: _info.id }).then(
+      (res) => {
+        if (res.success) {
+          if (
+            res.result &&
+            res.result.cesAllDayPriceRule &&
+            res.result.cesAllDayPriceRule.leaveTime
+          ) {
+            this.model.orderInfo.dueOutTimeSpan = moment(
+              res.result.cesAllDayPriceRule.leaveTime,
+              "HH:mm"
+            );
+          }
+        }
+
+        this.loadRooms();
+      }
+    );
   },
   methods: {
-    tagClose2(rindex, index) {
-      this.model.data[index].rooms.splice(rindex, 1);
+    presetNumChange(e, record) {
+      console.log(e);
+      record.layout.canUseCount = record.layout.oldTags - e;
+    },
+    onCellChange(key, dataIndex, value) {
+      const dataSource = [...this.canUserRooms];
+      const target = dataSource[dataIndex];
+      console.log("target", target);
+      if (target && target.layout) {
+        target.layout[key] = value;
+        this.canUserRooms = dataSource;
+      }
+      console.log("this.canUserRooms", this.canUserRooms);
+    },
+    rowKey(record) {
+      return record.layout.id;
+    },
+    loadRooms() {
+      getAction("/rooms/cesRooms/can-user-rooms", {
+        startOf:
+          this.model.orderInfo.arrivalTime2 +
+          " " +
+          moment(this.model.orderInfo.arrivalTimeSpan).format("HH:mm"),
+        endOf:
+          this.model.orderInfo.dueOutTime2 +
+          " " +
+          moment(this.model.orderInfo.dueOutTimeSpan).format("HH:mm"),
+        bookingType: this.model.orderInfo.bookingType,
+        hourRoomRuleId: this.model.orderInfo.hourRoomId,
+      }).then((res) => {
+        if (res.success) {
+          res.result.forEach((t) => {
+            t.layout = Object.assign({}, t.layout, {
+              presetNum: 0,
+              oldTags: t.layout.canUseCount,
+            });
+            t.buildingRooms.forEach((b) => {
+              b.floorRooms.forEach((f) => {
+                this.$set(f, "check", 0);
+              });
+            });
+          });
+          this.canUserRooms = res.result;
+        }
+      });
+    },
+    bookingTypeChange(e) {
+      if (this.model.orderInfo.bookingType == 1) {
+        this.model.orderInfo.hourRoomId = "";
+      } else {
+        var hourRoomRule = this.hourRoomRuleList[0];
+        if (hourRoomRule) {
+          this.model.orderInfo.hourRoomId = hourRoomRule.id;
+        }
+      }
+      if (this.model.orderInfo.bookingType === 2) {
+        var find = this.hourRoomRuleList.find(
+          (t) => t.id === this.model.orderInfo.hourRoomId
+        );
+        if (find) {
+          var mDate = moment(
+            this.model.orderInfo.arrivalTime2 +
+              " " +
+              moment(this.model.orderInfo.arrivalTimeSpan).format("HH:mm")
+          ).add(find.afterOpenRoom, "minutes");
+          this.model.orderInfo.dueOutTime2 = mDate.format("YYYY-MM-DD");
+
+          this.model.orderInfo.dueOutTimeSpan = moment(
+            mDate.format("HH:mm"),
+            "HH:mm"
+          );
+        }
+      } else if (this.model.orderInfo.bookingType === 1) {
+        var mDate = moment(this.model.orderInfo.arrivalTime2).add(1, "days");
+        this.model.orderInfo.dueOutTime2 = mDate.format("YYYY-MM-DD");
+      }
+      this.loadRooms();
+    },
+    dayCountChange(e) {
+      this.model.orderInfo.dueOutTime2 = moment(
+        this.model.orderInfo.arrivalTime2
+      )
+        .add(e, "days")
+        .format("YYYY-MM-DD");
+      this.loadRooms();
+    },
+    disabledDate(current) {
+      return current && current < moment().add(-1, "days").endOf("day");
+    },
+    arrivalTimeChange(e) {
+      var v = parseInt(
+        (new Date(this.model.orderInfo.dueOutTime2).getTime() -
+          new Date(this.model.orderInfo.arrivalTime2).getTime()) /
+          (1000 * 60 * 60 * 24)
+      );
+      if (v <= 0) {
+        this.model.orderInfo.dueOutTime2 = moment(
+          this.model.orderInfo.arrivalTime2
+        )
+          .add(1, "days")
+          .format("YYYY-MM-DD");
+      }
+      v = parseInt(
+        (new Date(this.model.orderInfo.dueOutTime2).getTime() -
+          new Date(this.model.orderInfo.arrivalTime2).getTime()) /
+          (1000 * 60 * 60 * 24)
+      );
+      this.model.orderInfo.dayCount = Math.abs(v);
+      this.loadRooms();
+    },
+    arrivalTimeChange2(e) {
+      var v = parseInt(
+        (new Date(this.model.orderInfo.dueOutTime2).getTime() -
+          new Date(this.model.orderInfo.arrivalTime2).getTime()) /
+          (1000 * 60 * 60 * 24)
+      );
+      if (v <= 0) {
+        this.model.orderInfo.arrivalTime2 = moment(
+          this.model.orderInfo.dueOutTime2
+        )
+          .add(-1, "days")
+          .format("YYYY-MM-DD");
+      }
+      v = parseInt(
+        (new Date(this.model.orderInfo.dueOutTime2).getTime() -
+          new Date(this.model.orderInfo.arrivalTime2).getTime()) /
+          (1000 * 60 * 60 * 24)
+      );
+      this.model.orderInfo.dayCount = Math.abs(v);
+      this.loadRooms();
+    },
+    arrivalTimeSpanChange(m, time) {
+      console.log(time);
+      console.log(moment(m).format("HH:mm"));
+      if (this.model.orderInfo.bookingType === 2) {
+        var find = this.hourRoomRuleList.find(
+          (t) => t.id === this.model.orderInfo.hourRoomId
+        );
+        if (find) {
+          var mDate = moment(
+            this.model.orderInfo.arrivalTime2 +
+              " " +
+              moment(this.model.orderInfo.arrivalTimeSpan).format("HH:mm")
+          ).add(find.afterOpenRoom, "minutes");
+          this.model.orderInfo.dueOutTime2 = mDate.format("YYYY-MM-DD");
+
+          this.model.orderInfo.dueOutTimeSpan = moment(
+            mDate.format("HH:mm"),
+            "HH:mm"
+          );
+        }
+      }
+      this.loadRooms();
+    },
+    hourRoomIdChange() {
+      if (this.model.orderInfo.bookingType === 2) {
+        var find = this.hourRoomRuleList.find(
+          (t) => t.id === this.model.orderInfo.hourRoomId
+        );
+        if (find) {
+          var mDate = moment(
+            this.model.orderInfo.arrivalTime2 +
+              " " +
+              moment(this.model.orderInfo.arrivalTimeSpan).format("HH:mm")
+          ).add(find.afterOpenRoom, "minutes");
+          this.model.orderInfo.dueOutTime2 = mDate.format("YYYY-MM-DD");
+
+          this.model.orderInfo.dueOutTimeSpan = moment(
+            mDate.format("HH:mm"),
+            "HH:mm"
+          );
+        }
+      }
+      this.loadRooms();
+    },
+    tagClose2(rindex, bindex, index) {
+      var id =
+        this.canUserRooms[index].buildingRooms[bindex].floorRooms[rindex].id;
+      var findIndex = this.canUserRooms[index].rooms.findIndex(
+        (t) => t.id === id
+      );
+      this.canUserRooms[index].rooms.splice(findIndex, 1);
+
+      this.$set(
+        this.canUserRooms[index].buildingRooms[bindex].floorRooms[rindex],
+        "check",
+        0
+      );
+      console.log(this.canUserRooms);
     },
     modalFormOk(e) {
       // this.modelDefault = Object.assign({}, this.modelDefault, {
       //   rooms: e,
       // });
       // this.edit(this.modelDefault);
-      this.$set(this.model.data[this.selectIndex], "rooms", e);
+      this.$set(this.canUserRooms[this.selectIndex], "rooms", e);
+      console.log(this.canUserRooms[this.selectIndex]);
     },
     pulsRoom(index) {
       this.selectIndex = index;
-      this.$refs.modalSelectRoomForm.add();
+      this.$refs.modalSelectRoomForm.add(this.canUserRooms[this.selectIndex]);
       this.$refs.modalSelectRoomForm.title = "排房";
       this.$refs.modalSelectRoomForm.disableSubmit = false;
     },
     handleSearch(value) {
       let result;
       if (!value) {
-        result = [];
+        result = this.oldcustomerList;
       } else {
-        result = ["a", "b", "c"].map(
-          (domain) => `${value}${domain}(15888888888)`
-        );
+        result = this.oldcustomerList.filter((t) => t.name.includes(value));
       }
-      this.result = result;
+      this.customerList = result;
     },
     handleSelectMember(e) {
-      this.model.mobile = "158888888888";
+      var find = this.customerList.find((t) => t.id === e);
+      this.model.phone = find.phone;
+      this.model.contactName = find.name;
+      this.model.orderInfo.contactId = find.id;
     },
     moment,
     onChange(date, dateString) {
@@ -437,10 +863,11 @@ export default {
     add() {
       this.edit(this.modelDefault);
     },
-    addList(roomLiveList) {
-      this.modelDefault = Object.assign({}, this.modelDefault, {
-        rooms: roomLiveList,
-      });
+    addList(roomLiveList, key) {
+      // this.modelDefault = Object.assign({}, this.modelDefault, {
+      //   rooms: roomLiveList,
+      // });
+      this.modelDefault.orderInfo.bookingOrdersType = key;
       this.edit(this.modelDefault);
     },
     edit(record) {
@@ -449,11 +876,54 @@ export default {
     },
     submitForm() {
       const that = this;
-      that.$message.warning("未实现");
-      return;
+      that.model.roomIds = [];
+      that.canUserRooms.forEach((t) => {
+        var lastlayoutId = t.layout.id;
+        t.buildingRooms.forEach((b) => {
+          b.floorRooms.forEach((f) => {
+            if (f.check && f.check === 1) {
+              that.model.roomIds.push({ layoutId: t.layout.id, roomId: f.id });
+            }
+          });
+        });
+        const roomIds = that.model.roomIds.filter(
+          (it) => it.layoutId === lastlayoutId
+        );
+        var len = roomIds.length;
+        for (var i = len; i < t.layout.presetNum; i++) {
+          that.model.roomIds.push({ layoutId: t.layout.id, roomId: null });
+        }
+        for (var b = 0; b < that.model.orderInfo.dayCount; b++) {
+          if (t.layout.presetNum > 0) {
+            var dayTime = moment(this.model.orderInfo.arrivalTime2)
+              .add(b, "days")
+              .format("YYYY-MM-DD");
+            that.model.layoutDayPrices.push({
+              bookingType: 1,
+              dayTime: dayTime,
+              price: t.layout.favPrice,
+              roomLayoutId: t.layout.id,
+            });
+          }
+        }
+      });
+      that.model.orderInfo.bookingOrdersId = this.bookingOrdersId;
+      console.log("this.model", this.model);
+      if (that.model.roomIds.length <= 0) {
+        that.$message.warning("请先添加房间");
+        return;
+      }
       // 触发表单验证
       this.$refs.form.validate((valid) => {
         if (valid) {
+          this.model.orderInfo.arrivalTime =
+            this.model.orderInfo.arrivalTime2 +
+            " " +
+            moment(this.model.orderInfo.arrivalTimeSpan).format("HH:mm");
+          this.model.orderInfo.dueOutTime =
+            this.model.orderInfo.dueOutTime2 +
+            " " +
+            moment(this.model.orderInfo.dueOutTimeSpan).format("HH:mm");
           that.confirmLoading = true;
           let httpurl = "";
           let method = "";
@@ -464,11 +934,15 @@ export default {
             httpurl += this.url.edit;
             method = "put";
           }
+          if (this.model.orderInfo.bookingOrdersId) {
+            httpurl = "/business/busRoomBookingOrders/add-batch";
+            method = "post";
+          }
           httpAction(httpurl, this.model, method)
             .then((res) => {
               if (res.success) {
                 that.$message.success(res.message);
-                that.$emit("ok");
+                that.$emit("ok", res.result);
               } else {
                 that.$message.warning(res.message);
               }

+ 58 - 47
src/views/room/modules/schedule/ScheduleRoomModal.vue

@@ -5,64 +5,75 @@
     :visible="visible"
     switchFullscreen
     @ok="handleOk"
-    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
     @cancel="handleCancel"
-    cancelText="关闭">
-    <schedule-room-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></schedule-room-form>
+    cancelText="关闭"
+  >
+    <schedule-room-form
+      ref="realForm"
+      @ok="submitCallback"
+      :disabled="disableSubmit"
+      :bookingOrdersId="bookingOrdersId"
+    ></schedule-room-form>
   </j-modal>
 </template>
 
 <script>
-
-  import ScheduleRoomForm from './ScheduleRoomForm'
-  export default {
-    name: 'ScheduleRoomModal',
-    components: {
-      ScheduleRoomForm
+import ScheduleRoomForm from "./ScheduleRoomForm";
+export default {
+  name: "ScheduleRoomModal",
+  components: {
+    ScheduleRoomForm,
+  },
+  props: {
+    bookingOrdersId: {
+      type: String,
+      default: "",
     },
-    data () {
-      return {
-        title:'',
-        width:1300,
-        visible: false,
-        disableSubmit: false
-      }
+  },
+  data() {
+    return {
+      title: "",
+      width: 1300,
+      visible: false,
+      disableSubmit: false,
+    };
+  },
+  methods: {
+    add() {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.add();
+      });
     },
-    methods: {
-      add () {
-        this.visible=true
-        this.$nextTick(()=>{
-          this.$refs.realForm.add();
-        })
-      },
-      addList(record) {
+    addList(record,key) {
       this.visible = true;
       this.$nextTick(() => {
-        this.$refs.realForm.addList(record);
+        this.$refs.realForm.addList(record,key);
       });
     },
-      edit (record) {
-        this.visible=true
-        this.$nextTick(()=>{
-          this.$refs.realForm.edit(record);
-        })
-      },
-      close () {
-        this.$emit('close');
-        this.visible = false;
-      },
-      handleOk () {
-        this.$refs.realForm.submitForm();
-      },
-      submitCallback(){
-        this.$emit('ok');
-        this.visible = false;
-      },
-      handleCancel () {
-        this.close()
-      }
-    }
-  }
+    edit(record) {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.edit(record);
+      });
+    },
+    close() {
+      this.$emit("close");
+      this.visible = false;
+    },
+    handleOk() {
+      this.$refs.realForm.submitForm();
+    },
+    submitCallback(e) {
+      this.$emit("ok", e);
+      this.visible = false;
+    },
+    handleCancel() {
+      this.close();
+    },
+  },
+};
 </script>
 <style scoped>
 /deep/.ant-modal-body {

+ 35 - 22
src/views/room/modules/schedule/SelectRoomForm.vue

@@ -13,15 +13,11 @@
               label="房型"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
-              prop="roomType"
             >
-              <a-checkbox-group
-                v-model="model.roomType"
-                :options="roomTypeOptions"
-              />
+              <a-checkbox default-checked disabled>{{ layoutName }}</a-checkbox>
             </a-form-model-item>
           </a-col>
-          <a-col :span="24">
+          <!-- <a-col :span="24">
             <a-form-model-item
               label="房态"
               :labelCol="labelCol"
@@ -33,14 +29,14 @@
                 :options="roomStatusOptions"
               />
             </a-form-model-item>
-          </a-col>
+          </a-col> -->
           <a-col :span="24">
             <a-form-model-item
-            label="已排房"
+              label="已排房"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
             >
-            {{model.rooms.length||0}}/1
+              {{ model.rooms.length || 0 }}/{{ presetNum }}
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
@@ -57,10 +53,10 @@
                 color="blue"
                 closable
                 :visible="visible"
-                @close.stop="tagClose2(index, item.roomNo)"
+                @close.stop="tagClose2(index, item.name)"
                 v-for="(item, index) in model.rooms"
                 :key="index"
-                >{{ item.roomNo }}</a-tag
+                >{{ item.name }}</a-tag
               >
             </a-form-model-item>
           </a-col>
@@ -74,14 +70,14 @@
               }"
             >
               <a-tabs
-                :default-active-key="0"
+                default-active-key="room0"
                 tab-position="left"
                 :style="{ height: '300px' }"
               >
                 <a-tab-pane
                   v-for="(room, index) in roomList"
-                  :key="index"
-                  :tab="room.key"
+                  :key="'room' + index"
+                  :tab="room.floorName"
                 >
                   <div
                     id="components-grid-demo-playground"
@@ -90,8 +86,8 @@
                     <a-row :gutter="[8, 8]">
                       <a-col
                         :span="3"
-                        v-for="(r, rIndex) in room.child"
-                        :key="rIndex"
+                        v-for="(r, rIndex) in room.floorRooms"
+                        :key="'floorRooms' + rIndex"
                       >
                         <div
                           :class="[
@@ -100,7 +96,7 @@
                           ]"
                           @click="checkRoomClick(r)"
                         >
-                          {{ r.roomNo }}
+                          {{ r.name }}
                         </div></a-col
                       >
                     </a-row>
@@ -154,9 +150,9 @@ export default {
         { key: "1层", child: rooms },
         { key: "2层", child: rooms2 },
       ],
-      roomTypeOptions: ["休闲家庭房", "特价房"],
+      roomTypeOptions: [],
       roomStatusOptions: ["空净", "空脏"],
-      model: { rooms: [] },
+      model: { roomType: "", rooms: [] },
       labelCol: {
         xs: { span: 24 },
         sm: { span: 2 },
@@ -175,6 +171,8 @@ export default {
         edit: "/business/busMeetingRoom/edit",
         queryById: "/business/busMeetingRoom/queryById",
       },
+      layoutName: "",
+      presetNum: 0,
     };
   },
   computed: {
@@ -197,6 +195,10 @@ export default {
         var index = this.model.rooms.findIndex((t) => t.key1 == row.key1);
         this.model.rooms.splice(index, 1);
       } else {
+        if (this.model.rooms.length >= this.presetNum) {
+          this.$message.warning("超过排房数量");
+          return;
+        }
         row.check = 1;
         this.model.rooms.push(row);
       }
@@ -204,8 +206,8 @@ export default {
     tagClose2(index, key1) {
       this.model.rooms.splice(index, 1);
       this.roomList.some((t) => {
-        var r = t.child.some((c) => {
-          if (c.roomNo === key1) {
+        var r = t.floorRooms.some((c) => {
+          if (c.name === key1) {
             c.check = 0;
             return true;
           }
@@ -219,11 +221,22 @@ export default {
     onChange(date, dateString) {
       console.log(date, dateString);
     },
-    add() {
+    add(row) {
+      console.log("buildingRooms", row.buildingRooms);
+      this.layoutName = row.layout.name;
+      this.presetNum = row.layout.presetNum;
+      this.roomList = row.buildingRooms;
       this.edit(this.modelDefault);
     },
     edit(record) {
       this.model = Object.assign({}, record);
+      this.roomList.forEach((t) => {
+        t.floorRooms.forEach((f) => {
+          if (f.check && f.check == 1) {
+            this.model.rooms.push(f);
+          }
+        });
+      });
       this.visible = true;
     },
     submitForm() {

+ 2 - 2
src/views/room/modules/schedule/SelectRoomFormModal.vue

@@ -33,10 +33,10 @@ export default {
     };
   },
   methods: {
-    add() {
+    add(row) {
       this.visible = true;
       this.$nextTick(() => {
-        this.$refs.realForm.add();
+        this.$refs.realForm.add(row);
       });
     },
     edit(record) {

+ 585 - 0
src/views/room/modules/scheduleTeam/BatchSelectRoomTypeForm.vue

@@ -0,0 +1,585 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model
+        ref="form"
+        :model="model"
+        :rules="validatorRules"
+        slot="detail"
+      >
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item
+              label="预抵时间"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="arrivalTime2"
+            >
+              <j-date
+                placeholder="预抵时间"
+                v-model="model.arrivalTime2"
+                style="width: 180px"
+                :allowClear="false"
+                :disabled-date="disabledDate"
+                @change="arrivalTimeChange"
+              />
+              <a-time-picker
+                style="width: 80px; margin-left: 2px"
+                v-model="model.arrivalTimeSpan"
+                format="HH:mm"
+                :allowClear="false"
+                @change="arrivalTimeSpanChange"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="预离时间"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="dueOutTime2"
+            >
+              <j-date
+                placeholder="预离时间"
+                v-model="model.dueOutTime2"
+                style="width: 180px"
+                :allowClear="false"
+                :disabled-date="disabledDate"
+                @change="arrivalTimeChange2"
+                :disabled="model.bookingType === 2"
+              />
+              <a-time-picker
+                style="width: 80px; margin-left: 2px"
+                v-model="model.dueOutTimeSpan"
+                format="HH:mm"
+                :allowClear="false"
+                :disabled="model.bookingType === 2"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="天数"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="dayCount"
+            >
+              <a-input-number
+                v-model="model.dayCount"
+                placeholder="天数"
+                :min="1"
+                @change="dayCountChange"
+              ></a-input-number>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <h4 style="color: rgba(255, 141, 26, 1); font-weight: 600">
+              选择房间
+            </h4>
+            <a-divider />
+            <p>
+              <span>占房天数:{{ model.dayCount }}晚</span>
+              <span style="padding-left: 10px">总价:{{ amount }}</span>
+            </p>
+            <a-table
+              :columns="columns"
+              :data-source="canUserRooms"
+              :pagination="false"
+              :rowKey="rowKey"
+            >
+              <div
+                slot="expandedRowRender"
+                slot-scope="record, index, indent, expanded"
+                style="margin: 0"
+              >
+                <p>
+                  已排房:
+                  <template v-for="(building, bIndex) in record.buildingRooms">
+                    <a-tag
+                      color="blue"
+                      closable
+                      :visible="visible"
+                      @close.stop="tagClose2(rindex, bIndex, index)"
+                      v-for="(item, rindex) in building.floorRooms"
+                      :key="rindex"
+                      v-if="item.check && item.check == 1"
+                      >{{ item.name }}</a-tag
+                    >
+                  </template>
+                </p>
+                <p>
+                  未排房:{{
+                    record.layout.presetNum - (record.rooms || []).length
+                  }}间
+                </p>
+              </div>
+              <template slot="favPrice" slot-scope="text, record, index">
+                <!-- <editable-cell
+                    :text="record.layout.favPrice"
+                    @change="onCellChange('favPrice', index, $event)"
+                  /> -->
+                {{ record.layout.favPrice }}
+              </template>
+              <template slot="presetNum" slot-scope="text, record, index">
+                <div>
+                  <a-input-number
+                    v-model="record.layout.presetNum"
+                    :min="(record.rooms || []).length"
+                    :max="record.layout.oldTags"
+                    @change="presetNumChange($event, record)"
+                  />
+                </div>
+              </template>
+              <span slot="action" slot-scope="text, record, index">
+                <a
+                  :disabled="record.layout.presetNum <= 0"
+                  @click="pulsRoom(index)"
+                  >排房</a
+                >
+              </span>
+            </a-table>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+    <select-room-form-modal
+      ref="modalSelectRoomForm"
+      @ok="modalFormOk"
+    ></select-room-form-modal>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+import SelectRoomFormModal from "./SelectRoomFormModal.vue";
+import moment from "moment";
+export default {
+  name: "SelectRoomForm",
+  components: { SelectRoomFormModal },
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+    orderInfo: {
+      type: Object,
+      default: {},
+    },
+    batchRoomsTypeList: {
+      type: Array,
+      default: [],
+    },
+    hourRoomRuleList: {
+      type: Array,
+      default: [],
+    },
+  },
+  data() {
+    return {
+      visible: true,
+      columns: [
+        // {
+        //     title: "",
+        //     dataIndex: "key",
+        //     width: 20,
+        //   },
+        {
+          title: "房型",
+          dataIndex: "name",
+          width: 150,
+          customRender: function (text, record) {
+            return record.layout.name;
+          },
+        },
+        {
+          title: "门市价",
+          dataIndex: "marketPrice",
+          width: 100,
+          customRender: function (text, record) {
+            return record.layout.marketPrice;
+          },
+        },
+        {
+          title: "优惠价",
+          dataIndex: "favPrice",
+          width: 120,
+          scopedSlots: { customRender: "favPrice" },
+        },
+        {
+          title: "可订数/可超数",
+          dataIndex: "canUseCount",
+          width: 170,
+          customRender: function (text, record) {
+            return record.layout.canUseCount + "/0";
+          },
+        },
+        {
+          title: "预定间数",
+          dataIndex: "presetNum",
+          width: 100,
+          scopedSlots: { customRender: "presetNum" },
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 70,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      model: {
+        arrivalTime2: moment(new Date()).format("YYYY-MM-DD"),
+        dueOutTime2: this.orderInfo.dueOutTime2,
+        arrivalTimeSpan: moment("18:00", "HH:mm"),
+        dueOutTimeSpan: this.orderInfo.dueOutTimeSpan,
+        dayCount: 1,
+        bookingType: this.orderInfo.bookingType,
+        hourRoomId: this.orderInfo.hourRoomId,
+      },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 2 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        dateRange: [{ required: true, message: "请选择维修时间!" }],
+        remark: [{ required: true, message: "请输入维修原因!" }],
+      },
+      url: {
+        add: "/business/busMeetingRoom/add",
+        edit: "/business/busMeetingRoom/edit",
+        queryById: "/business/busMeetingRoom/queryById",
+      },
+      layoutName: "",
+      presetNum: 0,
+      canUserRooms: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+    amount() {
+      var sum = 0;
+      this.canUserRooms.forEach((t) => {
+        sum += t.layout.favPrice * t.layout.presetNum * this.model.dayCount;
+      });
+      return sum.toFixed(2);
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    if (this.model.bookingType === 2) {
+      var find = this.hourRoomRuleList.find(
+        (t) => t.id === this.model.hourRoomId
+      );
+
+      console.log("222222", this.hourRoomRuleList);
+      if (find) {
+        var mDate = moment(
+          this.model.arrivalTime2 +
+            " " +
+            moment(this.model.arrivalTimeSpan).format("HH:mm")
+        ).add(find.afterOpenRoom, "minutes");
+        this.model.dueOutTime2 = mDate.format("YYYY-MM-DD");
+
+        this.$nextTick(() => {
+          this.model.dueOutTimeSpan = moment(mDate.format("HH:mm"), "HH:mm");
+          this.loadRooms();
+        });
+      } else {
+        this.loadRooms();
+      }
+    } else {
+      this.loadRooms();
+    }
+  },
+  methods: {
+    tagClose2(rindex, bindex, index) {
+      this.canUserRooms[index].rooms.splice(rindex, 1);
+
+      this.$set(
+        this.canUserRooms[index].buildingRooms[bindex].floorRooms[rindex],
+        "check",
+        0
+      );
+      console.log(this.canUserRooms);
+    },
+    modalFormOk(e) {
+      this.$set(this.canUserRooms[this.selectIndex], "rooms", e);
+      console.log(this.canUserRooms[this.selectIndex]);
+    },
+    pulsRoom(index) {
+      this.selectIndex = index;
+      this.$refs.modalSelectRoomForm.add(this.canUserRooms[this.selectIndex]);
+      this.$refs.modalSelectRoomForm.title = "排房";
+      this.$refs.modalSelectRoomForm.disableSubmit = false;
+    },
+    presetNumChange(e, record) {
+      console.log(e);
+      record.layout.canUseCount = record.layout.oldTags - e;
+    },
+    rowKey(record) {
+      return record.layout.id;
+    },
+    dayCountChange(e) {
+      this.model.dueOutTime2 = moment(this.model.arrivalTime2)
+        .add(e, "days")
+        .format("YYYY-MM-DD");
+      this.loadRooms();
+    },
+    disabledDate(current) {
+      return current && current < moment().add(-1, "days").endOf("day");
+    },
+    arrivalTimeChange(e) {
+      var v = parseInt(
+        (new Date(this.model.dueOutTime2).getTime() -
+          new Date(this.model.arrivalTime2).getTime()) /
+          (1000 * 60 * 60 * 24)
+      );
+      if (v <= 0) {
+        this.model.dueOutTime2 = moment(this.model.arrivalTime2)
+          .add(1, "days")
+          .format("YYYY-MM-DD");
+      }
+      v = parseInt(
+        (new Date(this.model.dueOutTime2).getTime() -
+          new Date(this.model.arrivalTime2).getTime()) /
+          (1000 * 60 * 60 * 24)
+      );
+      this.model.dayCount = Math.abs(v);
+      this.loadRooms();
+    },
+    arrivalTimeChange2(e) {
+      var v = parseInt(
+        (new Date(this.model.dueOutTime2).getTime() -
+          new Date(this.model.arrivalTime2).getTime()) /
+          (1000 * 60 * 60 * 24)
+      );
+      if (v <= 0) {
+        this.model.arrivalTime2 = moment(this.model.dueOutTime2)
+          .add(-1, "days")
+          .format("YYYY-MM-DD");
+      }
+      v = parseInt(
+        (new Date(this.model.dueOutTime2).getTime() -
+          new Date(this.model.arrivalTime2).getTime()) /
+          (1000 * 60 * 60 * 24)
+      );
+      this.model.dayCount = Math.abs(v);
+      this.loadRooms();
+    },
+    arrivalTimeSpanChange(m, time) {
+      console.log(time);
+      console.log(moment(m).format("HH:mm"));
+      if (this.model.bookingType === 2) {
+        var find = this.hourRoomRuleList.find(
+          (t) => t.id === this.model.hourRoomId
+        );
+        if (find) {
+          var mDate = moment(
+            this.model.arrivalTime2 +
+              " " +
+              moment(this.model.arrivalTimeSpan).format("HH:mm")
+          ).add(find.afterOpenRoom, "minutes");
+          this.model.dueOutTime2 = mDate.format("YYYY-MM-DD");
+          this.model.dueOutTimeSpan = moment(mDate.format("HH:mm"), "HH:mm");
+        }
+      }
+      this.loadRooms();
+    },
+    isDateIntersection(start1, end1, start2, end2) {
+      var startdate1 = new Date(start1.replace("-", "/").replace("-", "/"));
+      var enddate1 = new Date(end1.replace("-", "/").replace("-", "/"));
+
+      var startdate2 = new Date(start2.replace("-", "/").replace("-", "/"));
+      var enddate2 = new Date(end2.replace("-", "/").replace("-", "/"));
+
+      if (startdate1 >= startdate2 && startdate1 <= enddate2) {
+        return true;
+      }
+
+      if (enddate1 >= startdate2 && enddate1 <= enddate2) {
+        return true;
+      }
+
+      if (startdate1 <= startdate2 && enddate1 >= enddate2) {
+        return true;
+      }
+      return false;
+    },
+    loadRooms() {
+      var startOf =
+        this.model.arrivalTime2 +
+        " " +
+        moment(this.model.arrivalTimeSpan).format("HH:mm");
+      var endOf =
+        this.model.dueOutTime2 +
+        " " +
+        moment(this.model.dueOutTimeSpan).format("HH:mm");
+
+      getAction("/rooms/cesRooms/can-user-rooms", {
+        startOf: startOf,
+        endOf: endOf,
+        bookingType: this.model.bookingType,
+        hourRoomRuleId: this.model.hourRoomId,
+      }).then((res) => {
+        if (res.success) {
+          if (this.batchRoomsTypeList.length > 0) {
+            this.batchRoomsTypeList.forEach((bt) => {
+              var dateArr = bt.key.split(",");
+              var startOf2 = dateArr[0];
+              var endOf2 = dateArr[1];
+              //判断日期段是否有交集,有交集的情况下可订数量动态计算,动态排除已选排房
+              var isDateSection = this.isDateIntersection(
+                startOf,
+                endOf,
+                startOf2,
+                endOf2
+              );
+              console.log("isDateSection", isDateSection);
+              if (isDateSection) {
+                res.result.forEach((t) => {
+                  var find = bt.data.find(
+                    (ibt) => ibt.layout.id === t.layout.id
+                  );
+
+                  t.layout = Object.assign({}, t.layout, {
+                    presetNum: 0,
+                    canUseCount:
+                      t.layout.canUseCount - (find ? find.layout.presetNum : 0),
+                    oldTags:
+                      t.layout.canUseCount - (find ? find.layout.presetNum : 0),
+                  });
+                  t.buildingRooms.forEach((b) => {
+                    if (find && find.buildingRooms) {
+                      find.buildingRooms.forEach((fbr) => {
+                        fbr.floorRooms.forEach((fbrfloorRoom) => {
+                          if (fbrfloorRoom.check && fbrfloorRoom.check == 1) {
+                            var findIndex = b.floorRooms.findIndex(
+                              (floorRoom) => floorRoom.id === fbrfloorRoom.id
+                            );
+                            if (findIndex >= 0) {
+                              b.floorRooms.splice(findIndex, 1);
+                            }
+                          }
+                        });
+                      });
+                    }
+                    b.floorRooms.forEach((f) => {
+                      this.$set(f, "check", 0);
+                    });
+                  });
+                });
+              } else {
+                res.result.forEach((t) => {
+                  t.layout = Object.assign({}, t.layout, {
+                    presetNum: 0,
+                    oldTags: t.layout.canUseCount,
+                  });
+                  t.buildingRooms.forEach((b) => {
+                    b.floorRooms.forEach((f) => {
+                      this.$set(f, "check", 0);
+                    });
+                  });
+                });
+              }
+            });
+            this.canUserRooms = res.result;
+          } else {
+            res.result.forEach((t) => {
+              t.layout = Object.assign({}, t.layout, {
+                presetNum: 0,
+                oldTags: t.layout.canUseCount,
+              });
+              t.buildingRooms.forEach((b) => {
+                b.floorRooms.forEach((f) => {
+                  this.$set(f, "check", 0);
+                });
+              });
+            });
+            this.canUserRooms = res.result;
+          }
+        }
+      });
+    },
+    moment,
+    add(row) {
+      // console.log("buildingRooms", row.buildingRooms);
+      // this.layoutName = row.layout.name;
+      // this.presetNum = row.layout.presetNum;
+      // this.roomList = row.buildingRooms;
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      var data = that.canUserRooms.filter((it) => it.layout.presetNum > 0);
+      if (data.length <= 0) {
+        that.$message.warning("请先添加房间");
+        return;
+      }
+      that.$emit("ok", {
+        key:
+          this.model.arrivalTime2 +
+          " " +
+          moment(this.model.arrivalTimeSpan).format("HH:mm") +
+          "," +
+          this.model.dueOutTime2 +
+          " " +
+          moment(this.model.dueOutTimeSpan).format("HH:mm"),
+        arrivalTime2: this.model.arrivalTime2,
+        dueOutTime2: this.model.dueOutTime2,
+        arrivalTimeSpan: this.model.arrivalTimeSpan,
+        dueOutTimeSpan: this.model.dueOutTimeSpan,
+        dayCount: this.model.dayCount,
+        amount: this.amount,
+        data: data,
+      });
+    },
+  },
+};
+</script>
+<style scoped>
+#components-grid-demo-playground [class~="ant-col"] {
+  background: transparent;
+  border: 0;
+}
+#components-grid-demo-playground [class~="ant-col"] > div {
+  /* background: #00a0e9; */
+  height: 28px;
+  line-height: 28px;
+  font-size: 13px;
+  text-align: center;
+  cursor: pointer;
+  border-radius: 5px;
+}
+#components-grid-demo-playground .check {
+  border: 1px solid #00a0e9;
+}
+#components-grid-demo-playground .kz {
+  background: rgba(166, 166, 166, 1);
+}
+#components-grid-demo-playground pre {
+  background: #f9f9f9;
+  border-radius: 6px;
+  font-size: 13px;
+  padding: 8px 16px;
+}
+</style>

+ 82 - 0
src/views/room/modules/scheduleTeam/BatchSelectRoomTypeFormModal.vue

@@ -0,0 +1,82 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
+    @cancel="handleCancel"
+    cancelText="关闭"
+  >
+    <batch-select-room-type-form
+      ref="realForm"
+      @ok="submitCallback"
+      :disabled="disableSubmit"
+      :orderInfo="orderInfo"
+      :batchRoomsTypeList="batchRoomsTypeList"
+      :hourRoomRuleList="hourRoomRuleList"
+    ></batch-select-room-type-form>
+  </j-modal>
+</template>
+
+<script>
+import BatchSelectRoomTypeForm from "./BatchSelectRoomTypeForm";
+export default {
+  name: "BatchSelectRoomTypeFormModal",
+  components: {
+    BatchSelectRoomTypeForm,
+  },
+  props: {
+    orderInfo: {
+      type: Object,
+      default: {},
+    },
+    batchRoomsTypeList: {
+      type: Array,
+      default: [],
+    },
+    hourRoomRuleList: {
+      type: Array,
+      default: [],
+    },
+  },
+  data() {
+    return {
+      title: "",
+      width: 900,
+      visible: false,
+      disableSubmit: false,
+    };
+  },
+  methods: {
+    add(row) {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.add(row);
+      });
+    },
+    edit(record) {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.edit(record);
+      });
+    },
+    close() {
+      this.$emit("close");
+      this.visible = false;
+    },
+    handleOk() {
+      this.$refs.realForm.submitForm();
+    },
+    submitCallback(e) {
+      console.log("e", e);
+      this.$emit("ok", e);
+      this.visible = false;
+    },
+    handleCancel() {
+      this.close();
+    },
+  },
+};
+</script>

File diff suppressed because it is too large
+ 1335 - 0
src/views/room/modules/scheduleTeam/EdiBatchScheduleRoomForm.vue


+ 527 - 0
src/views/room/modules/scheduleTeam/EditBatchSelectRoomTypeForm.vue

@@ -0,0 +1,527 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model
+        ref="form"
+        :model="model"
+        :rules="validatorRules"
+        slot="detail"
+      >
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item
+              label="预抵时间"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="arrivalTime2"
+            >
+              <j-date
+                placeholder="预抵时间"
+                v-model="model.arrivalTime2"
+                style="width: 180px"
+                :allowClear="false"
+                :disabled-date="disabledDate"
+                @change="arrivalTimeChange"
+              />
+              <a-time-picker
+                style="width: 80px; margin-left: 2px"
+                v-model="model.arrivalTimeSpan"
+                format="HH:mm"
+                :allowClear="false"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="预离时间"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="dueOutTime2"
+            >
+              <j-date
+                placeholder="预离时间"
+                v-model="model.dueOutTime2"
+                style="width: 180px"
+                :allowClear="false"
+                :disabled-date="disabledDate"
+                @change="arrivalTimeChange2"
+              />
+              <a-time-picker
+                style="width: 80px; margin-left: 2px"
+                v-model="model.dueOutTimeSpan"
+                format="HH:mm"
+                :allowClear="false"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="天数"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="dayCount"
+            >
+              <a-input-number
+                v-model="model.dayCount"
+                placeholder="天数"
+                :min="1"
+                @change="dayCountChange"
+              ></a-input-number>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <h4 style="color: rgba(255, 141, 26, 1); font-weight: 600">
+              选择房间
+            </h4>
+            <a-divider />
+            <p>
+              <span>占房天数:{{ model.dayCount }}晚</span>
+              <span style="padding-left: 10px">总价:{{ amount }}</span>
+            </p>
+            <a-table
+              :columns="columns"
+              :data-source="canUserRooms"
+              :pagination="false"
+              :rowKey="rowKey"
+            >
+              <div
+                slot="expandedRowRender"
+                slot-scope="record, index, indent, expanded"
+                style="margin: 0"
+              >
+                <p>
+                  已排房:
+                  <template v-for="(building, bIndex) in record.buildingRooms">
+                    <a-tag
+                      color="blue"
+                      closable
+                      :visible="visible"
+                      @close.stop="tagClose2(rindex, bIndex, index)"
+                      v-for="(item, rindex) in building.floorRooms"
+                      :key="rindex"
+                      v-if="item.check && item.check == 1"
+                      >{{ item.name }}</a-tag
+                    >
+                  </template>
+                </p>
+                <p>
+                  未排房:{{
+                    record.layout.presetNum - (record.rooms || []).length
+                  }}间
+                </p>
+              </div>
+              <template slot="favPrice" slot-scope="text, record, index">
+                <!-- <editable-cell
+                    :text="record.layout.favPrice"
+                    @change="onCellChange('favPrice', index, $event)"
+                  /> -->
+                {{ record.layout.favPrice }}
+              </template>
+              <template slot="presetNum" slot-scope="text, record, index">
+                <div>
+                  <a-input-number
+                    v-model="record.layout.presetNum"
+                    :min="(record.rooms || []).length"
+                    :max="record.layout.oldTags"
+                    @change="presetNumChange($event, record)"
+                  />
+                </div>
+              </template>
+              <span slot="action" slot-scope="text, record, index">
+                <a
+                  :disabled="record.layout.presetNum <= 0"
+                  @click="pulsRoom(index)"
+                  >排房</a
+                >
+              </span>
+            </a-table>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+    <select-room-form-modal
+      ref="modalSelectRoomForm"
+      @ok="modalFormOk"
+    ></select-room-form-modal>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+import SelectRoomFormModal from "./SelectRoomFormModal.vue";
+import moment from "moment";
+export default {
+  name: "SelectRoomForm",
+  components: { SelectRoomFormModal },
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+    orderInfo: {
+      type: Object,
+      default: {},
+    },
+    batchRoomsTypeList: {
+      type: Array,
+      default: [],
+    },
+  },
+  data() {
+    return {
+      visible: true,
+      columns: [
+        // {
+        //     title: "",
+        //     dataIndex: "key",
+        //     width: 20,
+        //   },
+        {
+          title: "房型",
+          dataIndex: "name",
+          width: 150,
+          customRender: function (text, record) {
+            return record.layout.name;
+          },
+        },
+        {
+          title: "门市价",
+          dataIndex: "marketPrice",
+          width: 100,
+          customRender: function (text, record) {
+            return record.layout.marketPrice;
+          },
+        },
+        {
+          title: "优惠价",
+          dataIndex: "favPrice",
+          width: 120,
+          scopedSlots: { customRender: "favPrice" },
+        },
+        {
+          title: "可订数/可超数",
+          dataIndex: "canUseCount",
+          width: 170,
+          customRender: function (text, record) {
+            return record.layout.canUseCount + "/0";
+          },
+        },
+        {
+          title: "预定间数",
+          dataIndex: "presetNum",
+          width: 100,
+          scopedSlots: { customRender: "presetNum" },
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 70,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      model: {
+        arrivalTime2: this.orderInfo.arrivalTime2,
+        dueOutTime2: this.orderInfo.dueOutTime2,
+        arrivalTimeSpan: this.orderInfo.arrivalTimeSpan,
+        dueOutTimeSpan: this.orderInfo.dueOutTimeSpan,
+        dayCount: this.orderInfo.dayCount,
+        bookingType: this.orderInfo.bookingType,
+        hourRoomId: this.orderInfo.hourRoomId,
+      },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 2 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        dateRange: [{ required: true, message: "请选择维修时间!" }],
+        remark: [{ required: true, message: "请输入维修原因!" }],
+      },
+      url: {
+        add: "/business/busMeetingRoom/add",
+        edit: "/business/busMeetingRoom/edit",
+        queryById: "/business/busMeetingRoom/queryById",
+      },
+      layoutName: "",
+      presetNum: 0,
+      canUserRooms: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+    amount() {
+      var sum = 0;
+      this.canUserRooms.forEach((t) => {
+        sum += t.layout.favPrice * t.layout.presetNum * this.model.dayCount;
+      });
+      return sum.toFixed(2);
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    this.loadRooms();
+  },
+  methods: {
+    tagClose2(rindex, bindex, index) {
+      this.canUserRooms[index].rooms.splice(rindex, 1);
+
+      this.$set(
+        this.canUserRooms[index].buildingRooms[bindex].floorRooms[rindex],
+        "check",
+        0
+      );
+      console.log(this.canUserRooms);
+    },
+    modalFormOk(e) {
+      this.$set(this.canUserRooms[this.selectIndex], "rooms", e);
+      console.log(this.canUserRooms[this.selectIndex]);
+    },
+    pulsRoom(index) {
+      this.selectIndex = index;
+      this.$refs.modalSelectRoomForm.add(this.canUserRooms[this.selectIndex]);
+      this.$refs.modalSelectRoomForm.title = "排房";
+      this.$refs.modalSelectRoomForm.disableSubmit = false;
+    },
+    rowKey(record) {
+      return record.layout.id;
+    },
+    dayCountChange(e) {
+      this.model.dueOutTime2 = moment(this.model.arrivalTime2)
+        .add(e, "days")
+        .format("YYYY-MM-DD");
+      this.loadRooms();
+    },
+    disabledDate(current) {
+      return current && current < moment().add(-1, "days").endOf("day");
+    },
+    arrivalTimeChange(e) {
+      this.model.dueOutTime2 = moment(this.model.arrivalTime2)
+        .add(this.model.dayCount, "days")
+        .format("YYYY-MM-DD");
+      this.model.dayCount = Math.abs(
+        parseInt(
+          (new Date(this.model.arrivalTime2).getTime() -
+            new Date(this.model.dueOutTime2).getTime()) /
+            (1000 * 60 * 60 * 24)
+        )
+      );
+      this.loadRooms();
+    },
+    arrivalTimeChange2(e) {
+      this.model.dayCount = Math.abs(
+        parseInt(
+          (new Date(this.model.arrivalTime2).getTime() -
+            new Date(this.model.dueOutTime2).getTime()) /
+            (1000 * 60 * 60 * 24)
+        )
+      );
+      this.loadRooms();
+    },
+    isDateIntersection(start1, end1, start2, end2) {
+      var startdate1 = new Date(start1.replace("-", "/").replace("-", "/"));
+      var enddate1 = new Date(end1.replace("-", "/").replace("-", "/"));
+
+      var startdate2 = new Date(start2.replace("-", "/").replace("-", "/"));
+      var enddate2 = new Date(end2.replace("-", "/").replace("-", "/"));
+
+      if (startdate1 >= startdate2 && startdate1 <= enddate2) {
+        return true;
+      }
+
+      if (enddate1 >= startdate2 && enddate1 <= enddate2) {
+        return true;
+      }
+
+      if (startdate1 <= startdate2 && enddate1 >= enddate2) {
+        return true;
+      }
+      return false;
+    },
+    presetNumChange(e, record) {
+      console.log(e);
+      record.layout.canUseCount = record.layout.oldTags - e;
+    },
+    loadRooms() {
+      var startOf =
+        this.model.arrivalTime2 +
+        " " +
+        moment(this.model.arrivalTimeSpan).format("HH:mm");
+      var endOf =
+        this.model.dueOutTime2 +
+        " " +
+        moment(this.model.dueOutTimeSpan).format("HH:mm");
+
+      getAction("/rooms/cesRooms/can-user-rooms", {
+        startOf: startOf,
+        endOf: endOf,
+        bookingType: this.model.bookingType,
+        hourRoomRuleId: this.model.hourRoomId,
+      }).then((res) => {
+        if (res.success) {
+          if (this.batchRoomsTypeList.length > 0) {
+            this.batchRoomsTypeList.forEach((bt) => {
+              var dateArr = bt.key.split(",");
+              var startOf2 = dateArr[0];
+              var endOf2 = dateArr[1];
+              //判断日期段是否有交集,有交集的情况下可订数量动态计算,动态排除已选排房
+              var isDateSection = this.isDateIntersection(
+                startOf,
+                endOf,
+                startOf2,
+                endOf2
+              );
+              console.log("isDateSection", isDateSection);
+              if (isDateSection) {
+                res.result.forEach((t) => {
+                  this.$set(t, "rooms", []);
+                  var find = bt.data.find(
+                    (ibt) => ibt.layout.id === t.layout.id
+                  );
+
+                  t.layout = Object.assign({}, t.layout, {
+                    presetNum: find ? find.layout.presetNum : 0,
+                    canUseCount:
+                      t.layout.canUseCount - (find ? find.layout.presetNum : 0),
+                    // oldTags:
+                    //   t.layout.canUseCount - (find ? find.layout.presetNum : 0),
+                    oldTags: t.layout.canUseCount,
+                  });
+                  t.buildingRooms.forEach((b) => {
+                    if (find && find.buildingRooms) {
+                      find.buildingRooms.forEach((fbr) => {
+                        fbr.floorRooms.forEach((fbrfloorRoom) => {
+                          if (fbrfloorRoom.check && fbrfloorRoom.check == 1) {
+                            var findIndex = b.floorRooms.findIndex(
+                              (floorRoom) => floorRoom.id === fbrfloorRoom.id
+                            );
+                            if (findIndex >= 0) {
+                              // b.floorRooms.splice(findIndex, 1);
+                              this.$set(b.floorRooms[findIndex], "check", 1);
+                              t.rooms.push(b)
+                            }
+                          }
+                        });
+                      });
+                    }
+                    b.floorRooms.forEach((f) => {
+                      if (!f.check) {
+                        this.$set(f, "check", 0);
+                      }
+                    });
+                  });
+                });
+              } else {
+                res.result.forEach((t) => {
+                  t.layout = Object.assign({}, t.layout, {
+                    presetNum: 0,
+                    oldTags: t.layout.canUseCount,
+                  });
+                  t.buildingRooms.forEach((b) => {
+                    b.floorRooms.forEach((f) => {
+                      this.$set(f, "check", 0);
+                    });
+                  });
+                });
+              }
+            });
+            this.canUserRooms = res.result;
+          } else {
+            res.result.forEach((t) => {
+              t.layout = Object.assign({}, t.layout, {
+                presetNum: 0,
+                oldTags: t.layout.canUseCount,
+              });
+              t.buildingRooms.forEach((b) => {
+                b.floorRooms.forEach((f) => {
+                  this.$set(f, "check", 0);
+                });
+              });
+            });
+            this.canUserRooms = res.result;
+          }
+        }
+      });
+    },
+    moment,
+    add(row) {
+      // console.log("buildingRooms", row);
+      // this.layoutName = row.layout.name;
+      // this.presetNum = row.layout.presetNum;
+      // this.roomList = row.buildingRooms;
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      var data = that.canUserRooms.filter((it) => it.layout.presetNum > 0);
+      if (data.length <= 0) {
+        that.$message.warning("请先添加房间");
+        return;
+      }
+      that.$emit("ok", {
+        key:
+          this.model.arrivalTime2 +
+          " " +
+          moment(this.model.arrivalTimeSpan).format("HH:mm") +
+          "," +
+          this.model.dueOutTime2 +
+          " " +
+          moment(this.model.dueOutTimeSpan).format("HH:mm"),
+        arrivalTime2: this.model.arrivalTime2,
+        dueOutTime2: this.model.dueOutTime2,
+        arrivalTimeSpan: this.model.arrivalTimeSpan,
+        dueOutTimeSpan: this.model.dueOutTimeSpan,
+        dayCount: this.model.dayCount,
+        amount: this.amount,
+        data: data,
+      });
+    },
+  },
+};
+</script>
+<style scoped>
+#components-grid-demo-playground [class~="ant-col"] {
+  background: transparent;
+  border: 0;
+}
+#components-grid-demo-playground [class~="ant-col"] > div {
+  /* background: #00a0e9; */
+  height: 28px;
+  line-height: 28px;
+  font-size: 13px;
+  text-align: center;
+  cursor: pointer;
+  border-radius: 5px;
+}
+#components-grid-demo-playground .check {
+  border: 1px solid #00a0e9;
+}
+#components-grid-demo-playground .kz {
+  background: rgba(166, 166, 166, 1);
+}
+#components-grid-demo-playground pre {
+  background: #f9f9f9;
+  border-radius: 6px;
+  font-size: 13px;
+  padding: 8px 16px;
+}
+</style>

+ 77 - 0
src/views/room/modules/scheduleTeam/EditBatchSelectRoomTypeFormModal.vue

@@ -0,0 +1,77 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
+    @cancel="handleCancel"
+    cancelText="关闭"
+  >
+    <batch-select-room-type-form
+      ref="realForm"
+      @ok="submitCallback"
+      :disabled="disableSubmit"
+      :orderInfo="orderInfo"
+      :batchRoomsTypeList="batchRoomsTypeList"
+    ></batch-select-room-type-form>
+  </j-modal>
+</template>
+
+<script>
+import BatchSelectRoomTypeForm from "./EditBatchSelectRoomTypeForm";
+export default {
+  name: "BatchSelectRoomTypeFormModal",
+  components: {
+    BatchSelectRoomTypeForm,
+  },
+  props: {
+    orderInfo: {
+      type: Object,
+      default: {},
+    },
+    batchRoomsTypeList: {
+      type: Array,
+      default: [],
+    },
+  },
+  data() {
+    return {
+      title: "",
+      width: 900,
+      visible: false,
+      disableSubmit: false,
+    };
+  },
+  methods: {
+    add(row) {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.add(row);
+      });
+    },
+    edit(record) {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.edit(record);
+      });
+    },
+    close() {
+      this.$emit("close");
+      this.visible = false;
+    },
+    handleOk() {
+      this.$refs.realForm.submitForm();
+    },
+    submitCallback(e) {
+      console.log("e", e);
+      this.$emit("ok", e);
+      this.visible = false;
+    },
+    handleCancel() {
+      this.close();
+    },
+  },
+};
+</script>

+ 929 - 0
src/views/room/modules/scheduleTeam/EditScheduleRoomFormMain.vue

@@ -0,0 +1,929 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <div style="gap: 10px; display: flex; margin: 10px">
+      <a-button>加入团队</a-button>
+      <a-button @click="editOrder">确认修改</a-button>
+    </div>
+    <j-form-container>
+      <a-form-model
+        ref="form"
+        :model="model"
+        :rules="validatorRules"
+        slot="detail"
+      >
+        <a-row>
+          <div style="display: flex; gap: 15px">
+            <div style="width: 39%">
+              <h4 style="color: rgba(255, 141, 26, 1); font-weight: 600">
+                团队信息
+              </h4>
+              <a-divider />
+              <a-col :span="24">
+                <a-form-model-item
+                  label="团队名称"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.teamName"
+                >
+                  <a-input
+                    v-model="model.orderInfo.teamName"
+                    placeholder="团队名称"
+                  ></a-input>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item
+                  label="团队类型"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.teamTypeDicId"
+                >
+                  <a-select
+                    placeholder="团队类型"
+                    v-model="model.orderInfo.teamTypeDicId"
+                  >
+                    <a-select-option
+                      :value="item.id"
+                      v-for="(item, index) in teamTypeDicList"
+                      :key="item.id"
+                    >
+                      {{ item.itemText }}
+                    </a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item
+                  label="团队人数"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.teamPeopleNumber"
+                >
+                  <a-input-number
+                    v-model="model.orderInfo.teamPeopleNumber"
+                    placeholder="团队人数"
+                    :min="1"
+                    @change="dayCountChange"
+                  ></a-input-number>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item
+                  label="早餐"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.breakfastNum"
+                >
+                  <a-input-number
+                    v-model="model.orderInfo.breakfastNum"
+                    placeholder="早餐"
+                    :min="0"
+                  ></a-input-number>
+                </a-form-model-item>
+              </a-col>
+
+              <a-col :span="24">
+                <a-form-model-item
+                  label="客人来源"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.customerSource"
+                >
+                  <a-select
+                    placeholder="客人来源"
+                    v-model="model.orderInfo.customerSource"
+                  >
+                    <a-select-option
+                      :value="item.id"
+                      v-for="(item, index) in customerSourceList"
+                      :key="item.id"
+                    >
+                      {{ item.itemText }}
+                    </a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item
+                  label="公付项目"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.publicConsumeProject"
+                >
+                  <a-select
+                    mode="multiple"
+                    placeholder="公付项目"
+                    v-model="model.orderInfo.publicConsumeProject"
+                  >
+                    <a-select-option :value="1"> 房费 </a-select-option>
+                    <a-select-option :value="2"> 消费 </a-select-option>
+                    <a-select-option :value="3"> 会员费 </a-select-option>
+                    <a-select-option :value="4"> 会议费 </a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item
+                  label="客人类型"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.customerType"
+                >
+                  <a-select
+                    placeholder="客人类型"
+                    v-model="model.orderInfo.customerType"
+                  >
+                    <a-select-option :value="1"> 散客 </a-select-option>
+                    <a-select-option :value="2"> 会员 </a-select-option>
+                    <a-select-option :value="3"> 协议单位 </a-select-option>
+                    <a-select-option :value="4"> 中介 </a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24" v-if="model.orderInfo.bookingType === 1">
+                <a-form-model-item
+                  label="房价方案"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.roomPriceSlnId"
+                >
+                  <a-select
+                    placeholder="房价方案"
+                    v-model="model.orderInfo.roomPriceSlnId"
+                  >
+                    <a-select-option value="会员价"> 会员价 </a-select-option>
+                    <a-select-option value="平日价"> 平日价 </a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+              <h4 style="color: rgba(255, 141, 26, 1); font-weight: 600">
+                其他信息
+              </h4>
+              <a-divider />
+              <a-col :span="24">
+                <a-form-model-item
+                  label="联系人"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="contactName"
+                >
+                  <a-auto-complete
+                    v-model="model.contactName"
+                    placeholder="联系人"
+                    @search="handleSearch"
+                    @select="(e) => handleSelectMember(e)"
+                  >
+                    <template slot="dataSource">
+                      <a-select-option v-for="item in result" :key="item">{{
+                        item
+                      }}</a-select-option>
+                    </template>
+                  </a-auto-complete>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item
+                  label="电话"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="phone"
+                >
+                  <a-input v-model="model.phone" placeholder="电话"></a-input>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item
+                  label="领队"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.leaderName"
+                >
+                  <a-input
+                    v-model="model.orderInfo.leaderName"
+                    placeholder="领队"
+                  ></a-input>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item
+                  label="担保方式"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.warrantType"
+                >
+                  <a-select
+                    placeholder="担保方式"
+                    v-model="model.orderInfo.warrantType"
+                  >
+                    <a-select-option :value="1"> 无担保 </a-select-option>
+                    <a-select-option :value="2"> 有担保 </a-select-option>
+                    <a-select-option :value="3"> OTA担保 </a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item
+                  label="销售员"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.warranter"
+                >
+                  <a-select
+                    placeholder="销售员"
+                    v-model="model.orderInfo.warranter"
+                  >
+                    <a-select-option
+                      value="item.id"
+                      v-for="item in warranterList"
+                      :key="item.id"
+                    >
+                      {{ item.name }}
+                    </a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item
+                  label="外部单号"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.outerOrdersNo"
+                >
+                  <a-input
+                    v-model="model.orderInfo.outerOrdersNo"
+                    placeholder="外部单号"
+                  ></a-input>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item
+                  label="备注"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.remark"
+                >
+                  <a-textarea
+                    v-model="model.orderInfo.remark"
+                    rows="4"
+                    placeholder="备注"
+                  />
+                </a-form-model-item>
+              </a-col>
+            </div>
+            <div style="width: 61%">
+              <h4 style="color: rgba(255, 141, 26, 1); font-weight: 600">
+                团队汇总
+              </h4>
+              <a-divider />
+
+              <a-table
+                :columns="columns"
+                :data-source="model.batchRooms"
+                :pagination="false"
+                rowKey="batchNo"
+              >
+                <div
+                  slot="expandedRowRender"
+                  slot-scope="record, index, indent, expanded"
+                  style="margin: 0"
+                >
+                  <a-table
+                    :columns="columns2"
+                    :data-source="record.buildingRooms"
+                    :pagination="false"
+                    :rowKey="rowKey"
+                  >
+                    <span slot="action" slot-scope="text, record, index">
+                      <a @click="pulsRoom(brindex, index)">退出团队</a>
+                    </span>
+                  </a-table>
+                </div>
+              </a-table>
+            </div>
+          </div>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+    <select-room-form-modal
+      ref="modalSelectRoomForm"
+      @ok="modalFormOk"
+    ></select-room-form-modal>
+    <batch-select-room-type-form-modal
+      ref="modalBatchSelectRoomTypeForm"
+      @ok="modalBatchSelectRoomTypeFormOk"
+      :orderInfo="model.orderInfo"
+      :batchRoomsTypeList="batchRoomsTypeList"
+      :hourRoomRuleList="hourRoomRuleList"
+    ></batch-select-room-type-form-modal>
+    <edit-batch-select-room-type-form-modal
+      ref="modalEditBatchSelectRoomTypeForm"
+      @ok="modalEditBatchSelectRoomTypeFormOk"
+      :orderInfo="batchOrderInfo"
+      :batchRoomsTypeList="batchRoomsTypeList"
+    ></edit-batch-select-room-type-form-modal>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction, postAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+import moment from "moment";
+import EditableCell from "@views/room/modules/checkIn/EditableCell.vue";
+import SelectRoomFormModal from "./SelectRoomFormModal.vue";
+import BatchSelectRoomTypeFormModal from "./BatchSelectRoomTypeFormModal.vue";
+import EditBatchSelectRoomTypeFormModal from "./EditBatchSelectRoomTypeFormModal.vue";
+
+const date = new Date();
+const endDate = new Date(date.setDate(date.getDate() + 1));
+const columns = [
+  {
+    title: "批次",
+    dataIndex: "batchNo",
+    customRender: function (text, record, index) {
+      return index + 1;
+    },
+  },
+  {
+    title: "预抵时间",
+    dataIndex: "arrivalTime",
+  },
+  {
+    title: "预离时间",
+    dataIndex: "dueOutTime",
+  },
+  {
+    title: "天数",
+    dataIndex: "dayCount",
+  },
+];
+const data = [];
+for (let i = 0; i < 2; i++) {
+  data.push({
+    id: i,
+    key1: `双人床` + i,
+    key2: 298,
+    key3: 298,
+    key4: 8,
+    key5: 0,
+    key6: 0,
+  });
+}
+export default {
+  name: "ScheduleRoomForm",
+  components: {
+    EditableCell,
+    SelectRoomFormModal,
+    BatchSelectRoomTypeFormModal,
+    EditBatchSelectRoomTypeFormModal,
+  },
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+    id: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    return {
+      // id: "",
+      visible: true,
+      columns,
+      columns2: [
+        {
+          title: "姓名",
+          dataIndex: "name",
+        },
+        {
+          title: "房号",
+          dataIndex: "marketPrice",
+        },
+        {
+          title: "房型",
+          dataIndex: "favPrice",
+        },
+        {
+          title: "入住时间",
+          dataIndex: "canUseCount",
+        },
+        {
+          title: "状态",
+          dataIndex: "canUseCount",
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 70,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      batchOrderInfo: {},
+      model: {
+        // data: data,
+        orderInfo: {
+          bookingOrdersType: 2,
+          arrivalTime2: moment(new Date()).format("YYYY-MM-DD"),
+          dueOutTime2: moment(endDate).format("YYYY-MM-DD"),
+          arrivalTimeSpan: moment("18:00", "HH:mm"),
+          dueOutTimeSpan: moment("12:00", "HH:mm"),
+          bookingType: 1,
+          dayCount: 1,
+          warrantType: 1,
+          hourRoomId: "",
+          breakfastNum: 0,
+          teamPeopleNumber: 0,
+        },
+        roomIds: [],
+        layoutDayPrices: [],
+      },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        "orderInfo.teamName": [{ required: true, message: "请输入团队名称!" }],
+        "orderInfo.teamTypeDicId": [
+          { required: true, message: "请选择团队类型!" },
+        ],
+        "orderInfo.bookingType": [
+          { required: true, message: "请选择入住类型!" },
+        ],
+        "orderInfo.arrivalTime2": [
+          { required: true, message: "请选择预抵时间!" },
+        ],
+        "orderInfo.dueOutTime2": [
+          { required: true, message: "请选择预离时间!" },
+        ],
+        "orderInfo.customerSource": [
+          { required: true, message: "请选择客人来源!" },
+        ],
+        "orderInfo.bookingDicWay": [
+          { required: true, message: "请选择预定方式!" },
+        ],
+        "orderInfo.customerType": [
+          { required: true, message: "请选择客人类型!" },
+        ],
+        contactName: [{ required: true, message: "请输入联系人!" }],
+        phone: [{ required: true, message: "请输入电话!" }],
+      },
+      url: {
+        add: "/business/busRoomBookingOrders/add",
+        edit: "/business/busRoomBookingOrders/edit",
+        queryById: "/business/busMeetingRoom/queryById",
+        getBookingOrderInfo:
+          "/business/busRoomBookingOrders/getBookingOrderInfo",
+      },
+      result: [],
+      selectIndex: 0,
+      selectChidIndex: 0,
+      customerSourceList: [],
+      bookingdicWayList: [],
+      warranterList: [],
+      hourRoomRuleList: [],
+      canUserRooms: [],
+      teamTypeDicList: [],
+      batchRoomsTypeList: [],
+      customerList: [],
+      oldcustomerList: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+    amount() {
+      var sum = 0;
+      this.canUserRooms.forEach((t) => {
+        sum += t.layout.favPrice * t.layout.presetNum;
+      });
+      return sum.toFixed(2);
+    },
+  },
+  created() {
+    this.load();
+  },
+  mounted() {
+    // this.pulsBatch();
+  },
+  methods: {
+    load(id) {
+      // this.id = id;
+      var _info = JSON.parse(localStorage.getItem("storeInfo"));
+      if (_info) {
+        this.model.hotelId = _info.id;
+      }
+      //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+
+      getAction("/business/busDictItem/list", {
+        hotelId: _info.id,
+        dictId: "1639544105636417538",
+      }).then((res) => {
+        if (res.success) {
+          this.teamTypeDicList = res.result.records;
+        }
+      });
+      getAction("/business/busDictItem/list", {
+        hotelId: _info.id,
+        dictId: "1639538915239743490",
+      }).then((res) => {
+        if (res.success) {
+          this.customerSourceList = res.result.records;
+        }
+      });
+      getAction("/business/busDictItem/list", {
+        hotelId: _info.id,
+        dictId: "1639544187093995521",
+      }).then((res) => {
+        if (res.success) {
+          this.bookingdicWayList = res.result.records;
+        }
+      });
+      getAction("/business/busSalesPerson/list", {
+        hotelId: _info.id,
+        pageNo: 1,
+        pageSize: 100,
+      }).then((res) => {
+        if (res.success) {
+          this.warranterList = res.result.records;
+        }
+      });
+
+      getAction("/rooms/cesHourRoomRule/list", {
+        pageNo: 1,
+        pageSize: 100,
+      }).then((res) => {
+        if (res.success) {
+          this.hourRoomRuleList = res.result.records;
+        }
+      });
+
+      // postAction("/rooms/cesAllDayPriceRule/fetch", { hotelId: _info.id }).then(
+      //   (res) => {
+      //     if (res.success) {
+      //       if (
+      //         res.result &&
+      //         res.result.cesAllDayPriceRule &&
+      //         res.result.cesAllDayPriceRule.leaveTime
+      //       ) {
+      //         this.model.orderInfo.dueOutTimeSpan = moment(
+      //           res.result.cesAllDayPriceRule.leaveTime,
+      //           "HH:mm"
+      //         );
+      //       }
+      //     }
+
+      //     // this.loadRooms();
+      //   }
+      // );
+      this.getBookingOrderInfo();
+    },
+    getbusCustomer() {
+      getAction("/bus/busCustomer/list", {}).then((res) => {
+        if (res.success) {
+          this.customerList = res.result.records;
+          this.oldcustomerList = JSON.parse(JSON.stringify(this.customerList));
+          var find = this.oldcustomerList.find(
+            (t) => t.id == this.model.orderInfo.contactId
+          );
+          if (find) {
+            this.model.contactName = find.name;
+            this.model.phone = find.phone;
+          }
+
+          this.$emit("ok", this.model);
+        }
+      });
+    },
+    getBookingOrderInfo() {
+      console.log("this.id", this.id);
+      getAction(this.url.getBookingOrderInfo, {
+        bookingNo: this.id,
+      }).then((res) => {
+        if (res.success) {
+          this.model = res.result;
+          var publicConsumeProject = [];
+          if (this.model.orderInfo.publicRoomFee == 1) {
+            publicConsumeProject.push(1);
+          }
+          if (this.model.orderInfo.publicConsumeFee == 1) {
+            publicConsumeProject.push(2);
+          }
+          if (this.model.orderInfo.publicVipFee == 1) {
+            publicConsumeProject.push(3);
+          }
+          if (this.model.orderInfo.publicMeetingFee == 1) {
+            publicConsumeProject.push(4);
+          }
+
+          // this.model.orderInfo.publicConsumeProject = publicConsumeProject;
+          this.$set(this.model.orderInfo,'publicConsumeProject',publicConsumeProject)
+
+          this.getbusCustomer();
+          // this.loadRooms();
+        }
+      });
+    },
+    deleteBatch(index) {
+      this.batchRoomsTypeList.splice(index, 1);
+    },
+    presetNumChange(e, record) {
+      console.log(e);
+      record.layout.canUseCount = record.layout.oldTags - e;
+    },
+    onCellChange(key, dataIndex, value) {
+      const dataSource = [...this.canUserRooms];
+      const target = dataSource[dataIndex];
+      console.log("target", target);
+      if (target && target.layout) {
+        target.layout[key] = value;
+        this.canUserRooms = dataSource;
+      }
+      console.log("this.canUserRooms", this.canUserRooms);
+    },
+    rowKey(record) {
+      return record.name;
+    },
+    loadRooms() {
+      getAction("/rooms/cesRooms/can-user-rooms", {
+        startOf:
+          this.model.orderInfo.arrivalTime2 +
+          " " +
+          moment(this.model.orderInfo.arrivalTimeSpan).format("HH:mm"),
+        endOf:
+          this.model.orderInfo.dueOutTime2 +
+          " " +
+          moment(this.model.orderInfo.dueOutTimeSpan).format("HH:mm"),
+        bookingType: this.model.orderInfo.bookingType,
+        hourRoomRuleId: this.model.orderInfo.hourRoomId,
+      }).then((res) => {
+        if (res.success) {
+          res.result.forEach((t) => {
+            t.layout = Object.assign({}, t.layout, {
+              presetNum: 0,
+              oldTags: t.layout.canUseCount,
+            });
+            t.buildingRooms.forEach((b) => {
+              b.floorRooms.forEach((f) => {
+                this.$set(f, "check", 0);
+              });
+            });
+          });
+          this.canUserRooms = res.result;
+        }
+      });
+    },
+    bookingTypeChange(e) {
+      if (this.model.orderInfo.bookingType == 1) {
+        this.model.orderInfo.hourRoomId = "";
+      } else {
+        var hourRoomRule = this.hourRoomRuleList[0];
+        if (hourRoomRule) {
+          this.model.orderInfo.hourRoomId = hourRoomRule.id;
+        }
+      }
+      // this.loadRooms();
+      this.batchRoomsTypeList = [];
+    },
+    dayCountChange(e) {
+      this.model.orderInfo.dueOutTime2 = moment(
+        this.model.orderInfo.arrivalTime2
+      )
+        .add(e, "days")
+        .format("YYYY-MM-DD");
+      this.loadRooms();
+    },
+    disabledDate(current) {
+      return current && current < moment().add(-1, "days").endOf("day");
+    },
+    arrivalTimeChange(e) {
+      this.model.orderInfo.dayCount = Math.abs(
+        parseInt(
+          (new Date(this.model.orderInfo.arrivalTime2).getTime() -
+            new Date(this.model.orderInfo.dueOutTime2).getTime()) /
+            (1000 * 60 * 60 * 24)
+        )
+      );
+      this.loadRooms();
+    },
+    arrivalTimeSpanChange(m, time) {
+      console.log(time);
+      console.log(moment(m).format("HH:mm"));
+    },
+    tagClose2(brindex, index, bIndex, rindex) {
+      var id =
+        this.batchRoomsTypeList[brindex].data[index].buildingRooms[bIndex]
+          .floorRooms[rindex].id;
+      var findIndex = this.batchRoomsTypeList[brindex].data[
+        index
+      ].rooms.findIndex((t) => t.id === id);
+      this.batchRoomsTypeList[brindex].data[index].rooms.splice(findIndex, 1);
+
+      console.log(this.batchRoomsTypeList[brindex].data[index]);
+      this.$set(
+        this.batchRoomsTypeList[brindex].data[index].buildingRooms[bIndex]
+          .floorRooms[rindex],
+        "check",
+        0
+      );
+    },
+    modalEditBatchSelectRoomTypeFormOk(e) {
+      console.log("e", e);
+      var find = this.batchRoomsTypeList[this.selectIndex];
+      if (find) {
+        this.$set(this.batchRoomsTypeList, this.selectIndex, e);
+        console.log("find", find);
+      } else {
+        this.batchRoomsTypeList.push(e);
+      }
+    },
+    modalBatchSelectRoomTypeFormOk(e) {
+      console.log("e", e);
+      var find = this.batchRoomsTypeList.find((t) => t.key === e.key);
+      if (find) {
+        find.amount = (Number(e.amount) + Number(find.amount)).toFixed(2);
+        e.data.forEach((t) => {
+          var layoutType = find.data.find((f) => f.layout.id === t.layout.id);
+          if (layoutType) {
+            layoutType.layout.presetNum += t.layout.presetNum;
+            layoutType.layout.canUseCount -= t.layout.presetNum;
+            t.rooms.forEach((room) => {
+              if (room.check && room.check === 1) {
+                layoutType.buildingRooms.forEach((buildingRoom) => {
+                  // buildingRoom.floorRooms.forEach((floorRoom) => {
+                  var buildingRoomFind = buildingRoom.floorRooms.find(
+                    (br) => br.id === room.id
+                  );
+                  console.log("buildingRoomFind", buildingRoomFind);
+                  if (buildingRoomFind) {
+                    buildingRoomFind.check = 1;
+                  }
+                  // });
+                });
+                layoutType.rooms.push(room);
+              }
+            });
+          } else {
+            console.log(2);
+            console.log(t);
+            find.data = [...find.data, ...e.data];
+          }
+        });
+      } else {
+        this.batchRoomsTypeList.push(e);
+      }
+    },
+    modalFormOk(e) {
+      // this.modelDefault = Object.assign({}, this.modelDefault, {
+      //   rooms: e,
+      // });
+      // this.edit(this.modelDefault);
+      this.$set(
+        this.batchRoomsTypeList[this.selectIndex].data[this.selectChidIndex],
+        "rooms",
+        e
+      );
+      console.log(
+        this.batchRoomsTypeList[this.selectIndex].data[this.selectChidIndex]
+      );
+    },
+    pulsBatch(index) {
+      this.selectIndex = index;
+      this.$refs.modalBatchSelectRoomTypeForm.add();
+      this.$refs.modalBatchSelectRoomTypeForm.title = "添加批次";
+      this.$refs.modalBatchSelectRoomTypeForm.disableSubmit = false;
+    },
+    editBatch(index) {
+      this.selectIndex = index;
+      var item = this.batchRoomsTypeList[index];
+      item.bookingType = this.model.orderInfo.bookingType;
+      item.hourRoomId = this.model.orderInfo.hourRoomId;
+      this.batchOrderInfo = item;
+      console.log("item", item);
+      this.$refs.modalEditBatchSelectRoomTypeForm.add(item);
+      this.$refs.modalEditBatchSelectRoomTypeForm.title = "修改批次";
+      this.$refs.modalEditBatchSelectRoomTypeForm.disableSubmit = false;
+    },
+
+    pulsRoom(brindex, index) {
+      this.selectIndex = brindex;
+      this.selectChidIndex = index;
+      console.log(this.batchRoomsTypeList[this.selectIndex].data[index]);
+      this.$refs.modalSelectRoomForm.add(
+        this.batchRoomsTypeList[this.selectIndex].data[index]
+      );
+      this.$refs.modalSelectRoomForm.title = "排房";
+      this.$refs.modalSelectRoomForm.disableSubmit = false;
+    },
+    handleSearch(value) {
+      let result;
+      if (!value) {
+        result = [];
+      } else {
+        result = ["a", "b", "c"].map(
+          (domain) => `${value}${domain}(15888888888)`
+        );
+      }
+      this.result = result;
+    },
+    handleSelectMember(e) {
+      this.model.mobile = "158888888888";
+    },
+    moment,
+    onChange(date, dateString) {
+      console.log(date, dateString);
+    },
+    add() {
+      this.edit(this.modelDefault);
+    },
+    addList(roomLiveList) {
+      this.modelDefault = Object.assign({}, this.modelDefault, {
+        rooms: roomLiveList,
+      });
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+    editOrder() {
+      this.submitForm();
+    },
+    submitForm() {
+      const that = this;
+      if (
+        that.model.orderInfo.publicConsumeProject &&
+        that.model.orderInfo.publicConsumeProject.length > 0
+      ) {
+        var publicRoomFee = that.model.orderInfo.publicConsumeProject.some(
+          (t) => t == 1
+        );
+        that.model.orderInfo.publicRoomFee = publicRoomFee ? 1 : 0;
+        var publicConsumeFee = that.model.orderInfo.publicConsumeProject.some(
+          (t) => t == 2
+        );
+        that.model.orderInfo.publicConsumeFee = publicConsumeFee ? 1 : 0;
+        var publicVipFee = that.model.orderInfo.publicConsumeProject.some(
+          (t) => t == 3
+        );
+        that.model.orderInfo.publicVipFee = publicVipFee ? 1 : 0;
+        var publicMeetingFee = that.model.orderInfo.publicConsumeProject.some(
+          (t) => t == 4
+        );
+        that.model.orderInfo.publicMeetingFee = publicMeetingFee ? 1 : 0;
+      }
+      // 触发表单验证
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true;
+          let httpurl = "";
+          let method = "";
+          if (!this.model.orderInfo.id) {
+            httpurl += this.url.add;
+            method = "post";
+          } else {
+            httpurl += this.url.edit;
+            method = "put";
+          }
+          httpAction(httpurl, this.model, method)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.getBookingOrderInfo();
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>
+<style scoped>
+/deep/.ant-divider-horizontal {
+  margin: 12px 0 !important;
+}
+/deep/ .ant-form-item {
+  margin-bottom: 5px !important;
+}
+
+/deep/ .ant-btn-link {
+  flex: 1;
+  color: rgba(255, 141, 26, 1) !important;
+}
+</style>

File diff suppressed because it is too large
+ 1071 - 0
src/views/room/modules/scheduleTeam/ScheduleRoomForm.vue


+ 92 - 0
src/views/room/modules/scheduleTeam/ScheduleRoomModal.vue

@@ -0,0 +1,92 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
+    @cancel="handleCancel"
+    cancelText="关闭"
+  >
+    <schedule-room-form
+      ref="realForm"
+      @ok="submitCallback"
+      :disabled="disableSubmit"
+    ></schedule-room-form>
+  </j-modal>
+</template>
+
+<script>
+import ScheduleRoomForm from "./ScheduleRoomForm";
+export default {
+  name: "ScheduleRoomModal",
+  components: {
+    ScheduleRoomForm,
+  },
+  data() {
+    return {
+      title: "",
+      width: 1300,
+      visible: false,
+      disableSubmit: false,
+    };
+  },
+  methods: {
+    add() {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.add();
+      });
+    },
+    addList(record) {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.addList(record);
+      });
+    },
+    edit(record) {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.edit(record);
+      });
+    },
+    close() {
+      this.$emit("close");
+      this.visible = false;
+    },
+    handleOk() {
+      this.$refs.realForm.submitForm();
+    },
+    submitCallback(e) {
+      this.$emit("ok", e);
+      this.visible = false;
+    },
+    handleCancel() {
+      this.close();
+    },
+  },
+};
+</script>
+<style scoped>
+/deep/.ant-modal-body {
+  padding: 12px;
+  max-height: calc(80vh - 150px);
+  overflow-y: auto;
+  &::-webkit-scrollbar {
+    width: 6px;
+    /*高宽分别对应横竖滚动条的尺寸*/
+    height: 1px;
+  }
+
+  &::-webkit-scrollbar-thumb {
+    background: #e3e3e6;
+    border-radius: 6px;
+  }
+
+  &::-webkit-scrollbar-track {
+    background: transparent;
+    border-radius: 5px;
+  }
+}
+</style>

+ 279 - 0
src/views/room/modules/scheduleTeam/SelectRoomForm.vue

@@ -0,0 +1,279 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model
+        ref="form"
+        :model="model"
+        :rules="validatorRules"
+        slot="detail"
+      >
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item
+              label="房型"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <a-checkbox default-checked disabled>{{ layoutName }}</a-checkbox>
+            </a-form-model-item>
+          </a-col>
+          <!-- <a-col :span="24">
+            <a-form-model-item
+              label="房态"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="roomStatus"
+            >
+              <a-checkbox-group
+                v-model="model.roomStatus"
+                :options="roomStatusOptions"
+              />
+            </a-form-model-item>
+          </a-col> -->
+          <a-col :span="24">
+            <a-form-model-item
+              label="已排房"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              {{ model.rooms.length || 0 }}/{{ presetNum }}间
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="已选"
+              :labelCol="labelCol"
+              :wrapperCol="{
+                xs: { span: 24 },
+                sm: { span: 20 },
+              }"
+              prop="roomStatus"
+            >
+              <a-tag
+                color="blue"
+                closable
+                :visible="visible"
+                @close.stop="tagClose2(index, item.name)"
+                v-for="(item, index) in model.rooms"
+                :key="index"
+                >{{ item.name }}</a-tag
+              >
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="房间"
+              :labelCol="labelCol"
+              :wrapperCol="{
+                xs: { span: 24 },
+                sm: { span: 20 },
+              }"
+            >
+              <a-tabs
+                default-active-key="room0"
+                tab-position="left"
+                :style="{ height: '300px' }"
+              >
+                <a-tab-pane
+                  v-for="(room, index) in roomList"
+                  :key="'room' + index"
+                  :tab="room.floorName"
+                >
+                  <div
+                    id="components-grid-demo-playground"
+                    style="height: 300px; overflow: hidden auto"
+                  >
+                    <a-row :gutter="[8, 8]">
+                      <a-col
+                        :span="3"
+                        v-for="(r, rIndex) in room.floorRooms"
+                        :key="'floorRooms' + rIndex"
+                      >
+                        <div
+                          :class="[
+                            r.check == 1 ? 'check' : '',
+                            r.kz == 1 ? 'kz' : '',
+                          ]"
+                          @click="checkRoomClick(r)"
+                        >
+                          {{ r.name }}
+                        </div></a-col
+                      >
+                    </a-row>
+                  </div>
+                </a-tab-pane>
+              </a-tabs>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+export default {
+  name: "SelectRoomForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    const rooms = [];
+    for (let i = 0; i < 100; i++) {
+      rooms.push({
+        id: "100" + i,
+        roomNo: 1000 + i,
+        check: 0,
+        kz: i == 1 ? 1 : 0,
+      });
+    }
+    const rooms2 = [];
+    for (let i = 0; i < 50; i++) {
+      rooms2.push({
+        id: "200" + i,
+        roomNo: 2000 + i,
+        check: 0,
+        kz: i == 5 ? 1 : 0,
+      });
+    }
+    return {
+      visible: true,
+      roomList: [
+        { key: "1层", child: rooms },
+        { key: "2层", child: rooms2 },
+      ],
+      roomTypeOptions: [],
+      roomStatusOptions: ["空净", "空脏"],
+      model: { roomType: "", rooms: [] },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 2 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        dateRange: [{ required: true, message: "请选择维修时间!" }],
+        remark: [{ required: true, message: "请输入维修原因!" }],
+      },
+      url: {
+        add: "/business/busMeetingRoom/add",
+        edit: "/business/busMeetingRoom/edit",
+        queryById: "/business/busMeetingRoom/queryById",
+      },
+      layoutName: "",
+      presetNum: 0,
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+  },
+  methods: {
+    checkRoomClick(row) {
+      if (row.check === 1) {
+        row.check = 0;
+        var index = this.model.rooms.findIndex((t) => t.key1 == row.key1);
+        this.model.rooms.splice(index, 1);
+      } else {
+        if (this.model.rooms.length >= this.presetNum) {
+          this.$message.warning("超过排房数量");
+          return;
+        }
+        row.check = 1;
+        this.model.rooms.push(row);
+      }
+    },
+    tagClose2(index, key1) {
+      this.model.rooms.splice(index, 1);
+      this.roomList.some((t) => {
+        var r = t.floorRooms.some((c) => {
+          if (c.name === key1) {
+            c.check = 0;
+            return true;
+          }
+          return false;
+        });
+        if (r === true) {
+          return true;
+        }
+      });
+    },
+    onChange(date, dateString) {
+      console.log(date, dateString);
+    },
+    add(row) {
+      console.log("buildingRooms", row.buildingRooms);
+      this.layoutName = row.layout.name;
+      this.presetNum = row.layout.presetNum;
+      this.roomList = row.buildingRooms;
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.roomList.forEach((t) => {
+        t.floorRooms.forEach((f) => {
+          if (f.check && f.check == 1) {
+            this.model.rooms.push(f);
+          }
+        });
+      });
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      if (that.model.rooms.length === 0) {
+        that.$message.warning("请先选择房间");
+        return;
+      }
+      that.$emit("ok", that.model.rooms);
+    },
+  },
+};
+</script>
+<style scoped>
+#components-grid-demo-playground [class~="ant-col"] {
+  background: transparent;
+  border: 0;
+}
+#components-grid-demo-playground [class~="ant-col"] > div {
+  /* background: #00a0e9; */
+  height: 28px;
+  line-height: 28px;
+  font-size: 13px;
+  text-align: center;
+  cursor: pointer;
+  border-radius: 5px;
+}
+#components-grid-demo-playground .check {
+  border: 1px solid #00a0e9;
+}
+#components-grid-demo-playground .kz {
+  background: rgba(166, 166, 166, 1);
+}
+#components-grid-demo-playground pre {
+  background: #f9f9f9;
+  border-radius: 6px;
+  font-size: 13px;
+  padding: 8px 16px;
+}
+</style>

+ 65 - 0
src/views/room/modules/scheduleTeam/SelectRoomFormModal.vue

@@ -0,0 +1,65 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
+    @cancel="handleCancel"
+    cancelText="关闭"
+  >
+    <select-room-form
+      ref="realForm"
+      @ok="submitCallback"
+      :disabled="disableSubmit"
+    ></select-room-form>
+  </j-modal>
+</template>
+
+<script>
+import SelectRoomForm from "./SelectRoomForm";
+export default {
+  name: "SelectRoomFormModal",
+  components: {
+    SelectRoomForm,
+  },
+  data() {
+    return {
+      title: "",
+      width: 800,
+      visible: false,
+      disableSubmit: false,
+    };
+  },
+  methods: {
+    add(row) {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.add(row);
+      });
+    },
+    edit(record) {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.edit(record);
+      });
+    },
+    close() {
+      this.$emit("close");
+      this.visible = false;
+    },
+    handleOk() {
+      this.$refs.realForm.submitForm();
+    },
+    submitCallback(e) {
+      console.log("e", e);
+      this.$emit("ok", e);
+      this.visible = false;
+    },
+    handleCancel() {
+      this.close();
+    },
+  },
+};
+</script>

+ 200 - 0
src/views/room/scheduledetail.vue

@@ -0,0 +1,200 @@
+<template>
+  <a-card>
+    <div style="display: flex; gap: 10px" v-if="isShow">
+      <div style="width: 18%; background: #f4f5f8">
+        <div style="font-size: 16px; font-weight: 600; padding: 15px 15px 0">
+          共计关联{{ roomCount }}个房间
+        </div>
+        <a-divider></a-divider>
+        <a-collapse v-model="activeKey" :bordered="false">
+          <!-- <a-collapse-panel
+            key="1"
+            header="接待(1间)"
+            style="
+              background: #f7f7f7;
+              border-radius: 4px;
+              margin-bottom: 24px;
+              border: 0;
+              overflow: hidden;
+            "
+          >
+            <div slot="extra" style="color: #1890ff">合计:-82.00</div>
+            <div class="cell_check_group">
+              <a-checkbox-group @change="onChange">
+                <a-row>
+                  <a-col :span="12">
+                    <a-checkbox value="1"> 正常入住 </a-checkbox>
+                  </a-col>
+                  <a-col :span="12">
+                    <a-checkbox value="2"> 未结退房 </a-checkbox>
+                  </a-col>
+                  <a-col :span="12">
+                    <a-checkbox value="3"> 已结退房</a-checkbox>
+                  </a-col>
+                  <a-col :span="12">
+                    <a-checkbox value="4"> 联房退房 </a-checkbox>
+                  </a-col>
+                </a-row>
+              </a-checkbox-group>
+            </div>
+          </a-collapse-panel> -->
+          <!-- <a-collapse-panel
+            key="2"
+            header="Q100(1人)"
+            style="
+              background: #f7f7f7;
+              border-radius: 4px;
+              margin-bottom: 24px;
+              border: 0;
+              overflow: hidden;
+            "
+          >
+            <div class="select">
+              <a-tag color="#87d068"> 正常入住 </a-tag>
+              <span
+                class="booking_circle_span orange_color"
+                style="margin-left: 4px"
+                >主</span
+              >
+              <span style="font-weight: 700">何先生</span>
+              <div style="font-weight: 700; float: right">¥ -82.00</div>
+            </div>
+          </a-collapse-panel> -->
+          <a-collapse-panel
+            key="3"
+            :header="'预定(' + scheduleRoomCount + '间)'"
+            style="
+              background: #f7f7f7;
+              border-radius: 4px;
+              margin-bottom: 24px;
+              border: 0;
+              overflow: hidden;
+            "
+          >
+            <div class="select">
+              <div
+                style="
+                  display: flex;
+                  justify-content: space-between;
+                  overflow: hidden;
+                  text-overflow: ellipsis;
+                  white-space: nowrap;
+                "
+              >
+                <div>
+                  <a-tag color="#2db7f5"> 预定中 </a-tag>
+                  <span>{{ busRoomBookingOrders.contactName }}</span>
+                </div>
+                <div style="float: right">{{ busRoomBookingOrders.phone }}</div>
+              </div>
+            </div>
+          </a-collapse-panel>
+        </a-collapse>
+      </div>
+      <div style="width: 82%">
+        <a-tabs default-active-key="1">
+          <a-tab-pane key="1">
+            <span slot="tab"> 详单 </span>
+            <edit-schedule-room-form
+              :id="id"
+              :disabled2="true"
+              @ok="getCallback"
+            ></edit-schedule-room-form>
+          </a-tab-pane>
+          <a-tab-pane key="2">
+            <span slot="tab"> 账单 </span>
+          </a-tab-pane>
+          <a-tab-pane key="3">
+            <span slot="tab"> 日志 </span>
+          </a-tab-pane>
+        </a-tabs>
+      </div>
+    </div>
+  </a-card>
+</template>
+
+<script>
+import EditScheduleRoomForm from "./modules/schedule/EditScheduleRoomForm.vue";
+
+export default {
+  components: {
+    EditScheduleRoomForm,
+  },
+  // props: {
+  //   id: {
+  //     type: String,
+  //     default: "",
+  //   },
+  // },
+  data() {
+    return {
+      id: "",
+      activeKey: ["1", "2", "3"],
+      scheduleRoomCount: 0,
+      roomCount: 0,
+      scheduleRoomList: [],
+      busRoomBookingOrders: {},
+      isShow: true,
+    };
+  },
+  created(){
+    this.id = this.$route.params.id;
+  },
+  activated() {
+    //重新进入界面可能参数id不一样,需要重新加载数据,使用钩子方式
+    this.id = this.$route.params.id;
+    this.isShow = true;
+  },
+  deactivated() {
+    this.isShow = false;
+  },
+  methods: {
+    getCallback(e) {
+      console.log("getCallback", e);
+      this.busRoomBookingOrders = e;
+      this.roomCount = e.roomIds.length;
+      this.scheduleRoomList = e.roomIds.filter(
+        (t) => t.roomStatus == 1 || t.roomStatus == 2
+      );
+      this.scheduleRoomCount = this.scheduleRoomList.length;
+    },
+    onChange(checkedValues) {
+      console.log("checked = ", checkedValues);
+    },
+  },
+};
+</script>
+
+<style scoped>
+.cell_check_group {
+  padding: 10px;
+  background-color: #d9e5ec;
+  border-radius: 4px;
+  margin: 0px 0 6px 0px;
+}
+.orange_color {
+  border-color: #ff9e35 !important;
+  color: #ff9e35 !important;
+  vertical-align: initial;
+}
+.booking_circle_span {
+  width: 18px;
+  height: 18px;
+  border-radius: 50%;
+  color: #f24e4c;
+  border: 1px solid #f24e4c;
+  font-size: 12px;
+  text-align: center;
+  line-height: 16px;
+  display: inline-block;
+}
+.select {
+  color: #000 !important;
+  border: 1px solid #f24e4c !important;
+  background: transparent;
+  border-radius: 4px;
+  padding: 0 10px;
+  line-height: 32px;
+  cursor: pointer;
+}
+</style>

+ 312 - 0
src/views/room/scheduleteamdetail.vue

@@ -0,0 +1,312 @@
+<template>
+  <a-card>
+    <div style="display: flex; gap: 10px" v-if="isShow">
+      <div style="width: 20%; background: #f4f5f8">
+        <div style="font-size: 16px; font-weight: 600; padding: 15px 15px 0">
+          共计关联2个房间
+        </div>
+        <a-divider></a-divider>
+        <div
+          :class="[selectMain ? 'select' : '']"
+          style="font-size: 16px; font-weight: 500; cursor: pointer"
+          @click="selectMain = true"
+        >
+          查看团队主账务
+        </div>
+        <a-collapse v-model="activeKey" :bordered="false">
+          <!-- <a-collapse-panel
+            key="1"
+            header="接待(1间)"
+            style="
+              background: #f7f7f7;
+              border-radius: 4px;
+              margin-bottom: 24px;
+              border: 0;
+              overflow: hidden;
+            "
+          >
+            <div class="cell_check_group">
+              <a-checkbox-group @change="onChange">
+                <a-row>
+                  <a-col :span="12">
+                    <a-checkbox value="1"> 正常入住 </a-checkbox>
+                  </a-col>
+                  <a-col :span="12">
+                    <a-checkbox value="2"> 未结退房 </a-checkbox>
+                  </a-col>
+                  <a-col :span="12">
+                    <a-checkbox value="3"> 已结退房</a-checkbox>
+                  </a-col>
+                  <a-col :span="12">
+                    <a-checkbox value="4"> 联房退房 </a-checkbox>
+                  </a-col>
+                </a-row>
+              </a-checkbox-group>
+            </div>
+            <a-collapse activeKey="1" expandIconPosition="right">
+              <a-collapse-panel key="1" header="批次2">
+                <a-collapse
+                  activeKey="1"
+                  :bordered="false"
+                  expandIconPosition="right"
+                >
+                  <a-collapse-panel key="1" header="Q100(1人)">
+                    <div class="select" style="padding: 5px">
+                      <a-tag color="#87d068"> 正常入住 </a-tag>
+                      <span
+                        class="booking_circle_span orange_color"
+                        style="margin-left: 4px"
+                        >主</span
+                      >
+                      <span style="font-weight: 700">何先生</span>
+                      <div style="font-weight: 700; float: right">
+                        ¥ -82.00
+                      </div>
+                    </div>
+                  </a-collapse-panel>
+                </a-collapse>
+              </a-collapse-panel>
+            </a-collapse>
+          </a-collapse-panel> -->
+          <a-collapse-panel
+            key="3"
+            :header="'预定(' + batchRoomsCount + '批次)'"
+            style="
+              background: #f7f7f7;
+              border-radius: 4px;
+              margin-bottom: 24px;
+              border: 0;
+              overflow: hidden;
+            "
+          >
+            <div
+              :class="[item.check == 1 ? 'select' : '']"
+              style="padding: 5px; cursor: pointer"
+              @click="selectBatch(item)"
+              v-for="(item, index) in batchRoomsList"
+            >
+              <div
+                style="
+                  display: flex;
+                  justify-content: space-between;
+                  overflow: hidden;
+                  text-overflow: ellipsis;
+                  white-space: nowrap;
+                "
+              >
+                <div>
+                  <a-tag color="#2db7f5"> 预定中 </a-tag>
+                  <span
+                    >批次{{ index + 1 }}({{ item.roomIds.length }}间)</span
+                  >
+                </div>
+                <!-- <div>{{ busRoomBookingOrders.phone }}</div> -->
+                <div>{{ findCustomer(item.contactId) }}</div>
+              </div>
+            </div>
+          </a-collapse-panel>
+        </a-collapse>
+        <div style="display: flex; justify-content: center">
+          <a-button type="link" @click="addPatch">添加批次</a-button>
+        </div>
+      </div>
+      <div style="width: 80%" v-if="selectMain">
+        <a-tabs default-active-key="1">
+          <a-tab-pane key="1">
+            <span slot="tab"> 详单 </span>
+            <edit-schedule-room-form-main
+              :id="id"
+              :disabled="true"
+              @ok="getCallback"
+              ref="EditScheduleRoomFormMain"
+            ></edit-schedule-room-form-main>
+          </a-tab-pane>
+          <a-tab-pane key="2">
+            <span slot="tab"> 账单 </span>
+          </a-tab-pane>
+          <a-tab-pane key="3">
+            <span slot="tab"> 日志 </span>
+          </a-tab-pane>
+        </a-tabs>
+      </div>
+      <div style="width: 80%" v-else>
+        <a-tabs default-active-key="1">
+          <a-tab-pane key="1">
+            <span slot="tab"> 详单 </span>
+            <edi-batch-schedule-room-form
+              ref="EdiBatchScheduleRoomForm"
+              :id="batchId"
+              :disabled2="true"
+            ></edi-batch-schedule-room-form>
+          </a-tab-pane>
+          <a-tab-pane key="2">
+            <span slot="tab"> 日志 </span>
+          </a-tab-pane>
+        </a-tabs>
+      </div>
+    </div>
+    <add-batch-schedule-room-modal
+      ref="modalAddBatchScheduleRoom"
+      :bookingOrdersId="bookingOrdersId"
+      @ok="modalFormOk"
+    ></add-batch-schedule-room-modal>
+  </a-card>
+</template>
+
+<script>
+import EditScheduleRoomFormMain from "./modules/scheduleTeam/EditScheduleRoomFormMain.vue";
+import EdiBatchScheduleRoomForm from "./modules/scheduleTeam/EdiBatchScheduleRoomForm.vue";
+import AddBatchScheduleRoomModal from "./modules/schedule/ScheduleRoomModal";
+import { httpAction, getAction, postAction } from "@/api/manage";
+export default {
+  components: {
+    EditScheduleRoomFormMain,
+    EdiBatchScheduleRoomForm,
+    AddBatchScheduleRoomModal,
+  },
+  // props: {
+  //   id: {
+  //     type: String,
+  //     default: "",
+  //   },
+  // },
+  data() {
+    return {
+      isShow: true,
+      selectMain: true,
+      id: "",
+      batchId: "",
+      activeKey: ["1", "2", "3"],
+      activeKey2: ["1"],
+      scheduleRoomCount: 0,
+      batchRoomsCount: 0,
+      batchRoomsList: [],
+      busRoomBookingOrders: {},
+      bookingOrdersId: "",
+      customerList: [],
+    };
+  },
+  created() {
+    this.id = this.$route.params.id;
+    console.log("created", this.id);
+    this.getbusCustomer();
+  },
+  // beforeRouteEnter(to, from, next) {
+  //   console.log("to", to.query.id);
+  //   console.log("from", from);
+  //   var id = to.query.id;
+  //   console.log("this.id", id);
+  //   next();
+  // },
+  activated() {
+    //重新进入界面可能参数id不一样,需要重新加载数据,使用钩子方式
+    this.id = this.$route.params.id;
+    this.selectMain = true;
+    // try {
+    //   this.$refs.EditScheduleRoomFormMain.load(this.id);
+    // } catch {}
+    this.isShow = true;
+  },
+  deactivated() {
+    this.isShow = false;
+  },
+  methods: {
+    findCustomer(id) {
+      if (this.customerList && this.customerList.length) {
+        var find = this.customerList.find((t) => t.id == id);
+        if (find) {
+          return find.phone;
+        } else {
+          return this.busRoomBookingOrders.phone;
+        }
+      }
+    },
+    getbusCustomer() {
+      getAction("/bus/busCustomer/list", {}).then((res) => {
+        if (res.success) {
+          this.customerList = res.result.records;
+        }
+      });
+    },
+    addPatch() {
+      this.$refs.modalAddBatchScheduleRoom.add();
+      this.$refs.modalAddBatchScheduleRoom.title = "添加批次";
+      this.$refs.modalAddBatchScheduleRoom.disableSubmit = false;
+    },
+    modalFormOk(e) {
+      console.log("modalFormOk");
+      this.isShow = false;
+      setTimeout(() => {
+        this.isShow = true;
+      }, 100);
+    },
+    selectBatch(item) {
+      this.batchRoomsList.forEach((t) => {
+        if (t.check === 1 && t != item) {
+          t.check = 0;
+        }
+      });
+      if (item.check === 0) {
+        item.check = 1;
+      } else {
+        item.check = 0;
+      }
+      this.selectMain = item.check == 0;
+      this.batchId = item.id;
+      if (!this.selectMain) {
+        setTimeout(() => {
+          this.$refs.EdiBatchScheduleRoomForm.load();
+        }, 100);
+      }
+    },
+    getCallback(e) {
+      console.log("getCallback", e);
+      this.busRoomBookingOrders = e;
+      this.batchRoomsCount = e.batchRooms.length;
+      this.batchRoomsList = e.batchRooms;
+      this.batchRoomsList.forEach((t) => {
+        this.$set(t, "check", 0);
+      });
+      this.bookingOrdersId = this.busRoomBookingOrders.orderInfo.id;
+      console.log("bookingOrdersId", this.bookingOrdersId);
+    },
+    onChange(checkedValues) {
+      console.log("checked = ", checkedValues);
+    },
+  },
+};
+</script>
+
+<style scoped>
+.cell_check_group {
+  padding: 10px;
+  background-color: #d9e5ec;
+  border-radius: 4px;
+  margin: 0px 0 6px 0px;
+}
+.orange_color {
+  border-color: #ff9e35 !important;
+  color: #ff9e35 !important;
+  vertical-align: initial;
+}
+.booking_circle_span {
+  width: 18px;
+  height: 18px;
+  border-radius: 50%;
+  color: #f24e4c;
+  border: 1px solid #f24e4c;
+  font-size: 12px;
+  text-align: center;
+  line-height: 16px;
+  display: inline-block;
+}
+.select {
+  color: #000 !important;
+  border: 1px solid #f24e4c !important;
+  background: transparent;
+  border-radius: 4px;
+  /* padding: 0 10px; */
+  line-height: 32px;
+  cursor: pointer;
+}
+</style>

+ 336 - 0
src/views/settings/components/roomModules/housePriceSchemeList.vue

@@ -0,0 +1,336 @@
+<template>
+    <a-card :bordered="false">
+        <!-- 查询区域 -->
+        <div class="table-page-search-wrapper">
+            <a-form layout="inline" @keyup.enter.native="searchQuery">
+                <a-row :gutter="24">
+                    <a-col :span="6">
+                        <a-form-item label="关键字">
+                            <a-input placeholder="关键字(方案、编号、简码)" v-model="queryParam.paramName" allowClear></a-input>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="6" :sm="8">
+                        <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
+                            <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+                            <a-button type="primary" @click="searchReset" icon="reload"
+                                      style="margin-left: 8px">重置</a-button>
+                        </span>
+                    </a-col>
+                </a-row>
+            </a-form>
+        </div>
+        <!-- 查询区域-END -->
+
+        <!-- 操作按钮区域 -->
+        <div class="table-operator">
+            <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+            <a-dropdown v-if="selectedRowKeys.length > 0">
+<!--                <a-button style="margin-left: 8px">-->
+<!--                    批量操作 <a-icon type="down" /></a-button>-->
+                <a-button @click="batchDel" type="danger" icon="delete">批量删除</a-button>
+            </a-dropdown>
+        </div>
+
+        <!-- table区域-begin -->
+        <div>
+            <!-- <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
+        >项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div> -->
+
+            <a-table ref="table" size="middle" :scroll="{ x: true }" bordered rowKey="id" :columns="columns"
+                     :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{
+                    selectedRowKeys: selectedRowKeys,
+                    onChange: onSelectChange,
+                }" class="j-table-force-nowrap" @change="handleTableChange">
+                <template slot="openSlot" slot-scope="text, record, index">
+                    <a-switch checked-children="开" un-checked-children="关" default-checked :checked="record.open == 1"
+                              @change="e=>changeOpenState(e,record)" />
+                </template>
+                <template slot="htmlSlot" slot-scope="text">
+                    <div v-html="text"></div>
+                </template>
+                <template slot="imgSlot" slot-scope="text, record">
+                    <span v-if="!text" style="font-size: 12px; font-style: italic">无图片</span>
+                    <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt=""
+                         style="max-width: 80px; font-size: 12px; font-style: italic" />
+                </template>
+                <template slot="fileSlot" slot-scope="text">
+                    <span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span>
+                    <a-button v-else :ghost="true" type="primary" icon="download" size="small"
+                              @click="downloadFile(text)">
+                        下载
+                    </a-button>
+                </template>
+
+                <span slot="action" slot-scope="text, record">
+                    <a @click="handleEdit(record)">编辑</a>
+
+                    <a-divider type="vertical" />
+                    <a-dropdown>
+                        <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+                        <a-menu slot="overlay">
+                            <a-menu-item>
+                                <a @click="handlePriceManager(record)">价格管理</a>
+                            </a-menu-item>
+                            <a-menu-item>
+                                <a @click="handleDetailSetting(record)">详细设置</a>
+                            </a-menu-item>
+                            <a-menu-item>
+                                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                                    <a>删除</a>
+                                </a-popconfirm>
+                            </a-menu-item>
+                        </a-menu>
+                    </a-dropdown>
+                </span>
+            </a-table>
+        </div>
+<!--        <room-layout-form ref="modalForm" @ok="modalFormOk"></room-layout-form>-->
+<!--        <room-layout-price-modal ref="priceModal" @ok="onPriceSave"></room-layout-price-modal>-->
+<!--        <room-layout-detail-modal @saveOk="onSaveOk" ref="detailModal"></room-layout-detail-modal>-->
+        <house-price-scheme-modal ref="modalForm" @ok="modalFormOk"></house-price-scheme-modal>
+    </a-card>
+</template>
+
+<script>
+
+    import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+    import roomLayoutForm from "./RoomLayoutFormModal"; // todo roomLayoutForm 需要替换成房型的表单弹窗
+    import RoomLayoutDetailModal from "./RoomLayoutFormDetailModal.vue";
+
+    import RoomLayoutPriceModal from "./RoomLayoutPriceModal.vue";
+
+    import { modifyAppState } from '@/api/roomLayout'
+    import { filterObj } from "@/utils/util";
+    import HousePriceSchemeModal from "./modules/housePriceSchemeModal";
+    let hotelInfo = JSON.parse(localStorage.getItem('storeInfo'))
+    import { httpAction, getAction } from '@/api/manage'
+    export default {
+        name: "housePriceSchemeList",
+        mixins: [JeecgListMixin],
+        components: {
+            HousePriceSchemeModal,
+            roomLayoutForm,
+            RoomLayoutPriceModal,
+            RoomLayoutDetailModal
+        },
+        data() {
+            return {
+                queryParam: {},
+                // 分页参数
+                ipagination: {
+                    current: 1,
+                    pageSize: 10,
+                    pageSizeOptions: ["10", "20", "30"],
+                    showTotal: (total, range) => {
+                        return range[0] + "-" + range[1] + " 共" + total + "条";
+                    },
+                    showQuickJumper: true,
+                    showSizeChanger: true,
+                    total: 0,
+                },
+                // 表头
+                columns: [
+                    {
+                        title: "简码",
+                        align: "center",
+                        dataIndex: "simpleCode",
+                    },
+                    {
+                        title: "编号",
+                        align: "center",
+                        dataIndex: "number",
+                    },
+                    {
+                        title: "房价方案",
+                        align: "center",
+                        dataIndex: "priceScheme",
+
+                    },
+                    {
+                        title: "客人类型",
+                        align: "center",
+                        dataIndex: "guestTypeName",
+                    },
+                    {
+                        title: "入住时间",
+                        align: "center",
+                        dataIndex: "checkInTimeText",
+                    },
+                    {
+                        title: "有效期",
+                        align: "center",
+                        dataIndex: "validTimeText",
+                    },
+                    {
+                        title: "状态",
+                        align: "center",
+                        dataIndex: "open",
+                        scopedSlots: {customRender: "openSlot"},
+                    },
+                    {
+                        title: "排序",
+                        align: "center",
+                        dataIndex: "sort",
+                    },
+                    {
+                        title: "操作时间",
+                        align: "center",
+                        dataIndex: "createAt",
+                    },
+                    {
+                        title: "操作",
+                        dataIndex: "action",
+                        align: "center",
+                        fixed: "right",
+                        width: 147,
+                        scopedSlots: {customRender: "action"},
+                    },
+                ],
+                url: {
+                    // list: 'org.jeecg.modules.business/busMarketMember/list',
+                    list: "/rooms/cesHousePriceScheme/list?hotelId=" + hotelInfo.id,
+                    delete: "/rooms/cesHousePriceScheme/remove",
+                    deleteBatch: "/rooms/cesHousePriceScheme/deleteBatch",
+                    exportXlsUrl: "/rooms/cesHousePriceScheme/exportXls",
+                    importExcelUrl:
+                        "rooms/cesHousePriceScheme/importExcel",
+                    modifyOpen: "/rooms/cesHousePriceScheme/modifyOpen",
+                },
+                dictOptions: {},
+                superFieldList: [],
+                selectedRowKeys: [],
+                isorter: {
+                    column: "createTime",
+                    order: "desc",
+                },
+            };
+        },
+        created() {
+            // this.loadData()
+        },
+        methods: {
+            onSaveOk() {
+                this.loadData()
+            },
+            onPriceSave() {
+
+            },
+            handlePriceManager(record) {
+                this.$refs.priceModal.setRaw(record.id, record.name)
+                this.$refs.priceModal.visible = true
+            },
+            handleDetailSetting(record) {
+                this.$refs.detailModal.setRaw(record)
+                this.$refs.detailModal.visible = true
+            },
+            changeOpenState(e, record) {
+                console.log(e)
+                var that = this;
+                this.confirmLoading = true
+                httpAction(this.url.modifyOpen +'/'+ record.id + "?open=" + (e ? 1 : 0), {}, 'put').then((res) => {
+                    if (res.success) {
+                        that.$message.success('操作成功')
+                        that.$emit('ok')
+                        that.loadData(1);
+                    } else {
+                        that.$message.warning(res.message)
+                    }
+                }).finally(() => {
+                    that.confirmLoading = false
+                })
+            },
+            changeAppState(e, param) {
+                modifyAppState(param).then(res => {
+                    if (res.code == 200) {
+                        this.loadData();
+                    }
+                })
+            },
+            getAvatarView: function (avatar) {
+                return getFileAccessHttpUrl(avatar);
+            },
+
+            batchFrozen: function (status) {
+                if (this.selectedRowKeys.length <= 0) {
+                    this.$message.warning("请选择一条记录!");
+                    return false;
+                } else {
+                    let ids = "";
+                    let that = this;
+                    let isAdmin = false;
+                    that.selectionRows.forEach(function (row) {
+                        if (row.username == "admin") {
+                            isAdmin = true;
+                        }
+                    });
+                    if (isAdmin) {
+                        that.$message.warning("管理员账号不允许此操作,请重新选择!");
+                        return;
+                    }
+                    that.selectedRowKeys.forEach(function (val) {
+                        ids += val + ",";
+                    });
+                    that.$confirm({
+                        title: "确认操作",
+                        content: "是否" + (status == 1 ? "解冻" : "冻结") + "选中账号?",
+                        onOk: function () {
+                            frozenBatch({ids: ids, status: status}).then((res) => {
+                                if (res.success) {
+                                    that.$message.success(res.message);
+                                    that.loadData();
+                                    that.onClearSelected();
+                                } else {
+                                    that.$message.warning(res.message);
+                                }
+                            });
+                        },
+                    });
+                }
+            },
+            handleMenuClick(e) {
+                if (e.key == 1) {
+                    this.batchDel();
+                } else if (e.key == 2) {
+                    this.batchFrozen(2);
+                } else if (e.key == 3) {
+                    this.batchFrozen(1);
+                }
+            },
+            handleFrozen: function (id, status, username) {
+                let that = this;
+                //TODO 后台校验管理员角色
+                if ("admin" == username) {
+                    that.$message.warning("管理员账号不允许此操作!");
+                    return;
+                }
+                frozenBatch({ids: id, status: status}).then((res) => {
+                    if (res.success) {
+                        that.$message.success(res.message);
+                        that.loadData();
+                    } else {
+                        that.$message.warning(res.message);
+                    }
+                });
+            },
+            handleChangePassword(username) {
+                this.$refs.passwordmodal.show(username);
+            },
+            passwordModalOk() {
+                //TODO 密码修改完成 不需要刷新页面,可以把datasource中的数据更新一下
+            },
+            onSyncFinally({isToLocal}) {
+                // 同步到本地时刷新下数据
+                if (isToLocal) {
+                    this.loadData();
+                }
+            },
+        },
+    };
+</script>
+<style scoped>
+    @import "~@assets/less/common.less";
+</style>

+ 47 - 3
src/views/settings/components/roomModules/marketObjectiveList.vue

@@ -97,6 +97,17 @@
           <template slot="nightSlot" slot-scope="text,record">
               <a-input-number v-model="record.night" style="width: 70%" :min="0" :step="1" :precision="2"/>
           </template>
+          <template slot="footer" slot-scope="currentPageData">
+              <div class='subtotal'>
+                  <div class='left'>合计</div>
+                  <div class='number'>{{ total1.toFixed(2) }}</div>
+                  <div class='number'>{{ total2.toFixed(2) }}</div>
+                  <div class='number'>{{ total3.toFixed(2) }}</div>
+                  <div class='number'>{{ total4.toFixed(2) }}</div>
+                  <div class='number'>{{ total5.toFixed(2) }}</div>
+                  <div class='number'>{{  }}</div>
+              </div>
+          </template>
       </a-table>
     </div>
     <a-button type="primary" @click="submitData" style="margin-top: 20px">保存</a-button>
@@ -172,7 +183,12 @@
               dictOptions: {},
               superFieldList: [],
               yearShowOne: false,
-              hotelId:''
+              hotelId:'',
+              total1:0,
+              total2:0,
+              total3:0,
+              total4:0,
+              total5:0
           }
       },
       beforeCreate() {
@@ -268,10 +284,38 @@
               }).finally(() => {
                   that.confirmLoading = false;
               })
-          }
+          },
       }
   }
 </script>
-<style scoped>
+<style scoped lang="less">
   @import '~@assets/less/common.less';
+  .subtotal {
+      height: 50px;
+      position: absolute;
+      bottom: -10px;
+      width: 97%;
+      border: 1px solid #e8e8e8;
+      background: #F4F4F4;
+      display: flex;
+      align-items: center;
+      font-weight: 900;
+      overflow-x: scroll;
+      overflow-y: hidden;
+
+      .left {
+          flex: none; /* div显示滚动条的重点 */
+          width: 510px;
+      }
+
+      .number {
+          flex: none;
+          color: #666666;
+          height: 100%;
+          width: 150px;
+          display: flex;
+          align-items: center;
+          padding-left: 15px;
+      }
+  }
 </style>

+ 449 - 0
src/views/settings/components/roomModules/modules/housePriceSchemeForm.vue

@@ -0,0 +1,449 @@
+<template>
+    <a-spin :spinning="confirmLoading">
+        <j-form-container :disabled="formDisabled">
+            <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+                <a-form-model-item label="房价方案" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="priceScheme">
+                    <a-input v-model="model.priceScheme" placeholder="请输入房价方案" allowClear></a-input>
+                </a-form-model-item>
+                <a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="number">
+                    <a-input v-model="model.number" placeholder="请输入编号"></a-input>
+                </a-form-model-item>
+                <a-form-model-item label="客人来源" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="guestSource">
+                    <a-select
+                            v-model="model.guestSource"
+                            placeholder="请选择客人来源"
+                            :allowClear="true"
+                    >
+                        <a-select-option :value="item.id" v-for="(item,index) in customerSourceList" :key="index">{{ item.itemText }}</a-select-option>
+                    </a-select>
+                </a-form-model-item>
+                <a-form-model-item label="客人类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="guestType">
+                    <a-row>
+                        <a-col :span="10">
+                            <a-select
+                                    style="width: 100%"
+                                    v-model="model.guestType"
+                                    placeholder="请选择客人类型"
+                                    :allowClear="true"
+                                    @change="e=>handleGuestType(e)"
+                            >
+                                <a-select-option :value="undefined">请选择</a-select-option>
+                                <a-select-option :value="item.value" v-for="item in guestTypeList" :key="item.value">{{ item.text }}</a-select-option>
+                            </a-select>
+                        </a-col>
+                        <a-col :span="8">
+                            <a-select
+                                    v-if="model.guestType == 2"
+                                    style="width: 100%"
+                                    v-model="model.martketMemberId"
+                                    placeholder="请选择会员"
+                                    :allowClear="true"
+                                    @change="e=>handleGuestType(e)"
+                            >
+                                <a-select-option :value="undefined">请选择</a-select-option>
+                                <a-select-option :value="item.id" v-for="item in customerList" :key="item.id">{{ item.name }}</a-select-option>
+                            </a-select>
+
+                            <a-select
+                                    v-if="model.guestType == 3"
+                                    style="width: 100%"
+                                    v-model="model.agreementUnitId"
+                                    placeholder="请选择协议单位"
+                                    :allowClear="true"
+                                    @change="e=>handleGuestType(e)"
+                            >
+                                <a-select-option :value="undefined">请选择</a-select-option>
+                                <a-select-option :value="item.id" v-for="item in agreementUnitList" :key="item.id">{{ item.customerName }}</a-select-option>
+                            </a-select>
+
+                            <a-input v-if="model.guestType == 4" style="width: 90%;margin: auto;" v-model="model.mediation" placeholder="请输入名称/简介/联系人"></a-input>
+                        </a-col>
+                    </a-row>
+                </a-form-model-item>
+                <a-form-model-item label="入住时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="checkInTime">
+                    <a-radio-group v-model="model.checkInTime">
+                        <a-radio :value="0">无限制</a-radio>
+                        <a-radio :value="1">时间段</a-radio>
+                    </a-radio-group>
+                    <a-row>
+                        <a-col :span="16">
+                            <a-range-picker @change="onCheckTimeChange" v-model="checkTimeRange" format="YYYY-MM-DD 00:00:00" v-if="model.checkInTime == 1" />
+                        </a-col>
+                    </a-row>
+                </a-form-model-item>
+                <a-form-model-item label="周末假日" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="weekends">
+                    <a-checkbox-group v-model="model.weekends" @change="onChange">
+                        <a-checkbox :value="item.value" v-for="item in weeks" :key="item.value">
+                            {{ item.text }}
+                        </a-checkbox>
+                    </a-checkbox-group>
+                </a-form-model-item>
+                <a-form-model-item label="节假日" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="holiday">
+                    <a-date-picker valueFormat="YYYY-MM-DD"
+                                   v-model="model.holiday"
+                                   :open='open'
+                                   type="dates"
+                                   :showToday="false"
+                                   @ok="handleOk"
+                                   @change="handleChange"
+                                   @openChange="openChangeOne"
+                                   @panelChange="panelChangeOne">
+                        <template slot="renderExtraFooter" style="float: right">
+                            <a-button slot="addon" size="small" @click="handleHolidCancel">
+                                取消
+                            </a-button>
+                            <a-button class="margin_left_6" slot="addon" size="small" type="primary" @click="handleHolidConfirm">
+                                确定
+                            </a-button>
+                        </template>
+                    </a-date-picker>
+                </a-form-model-item>
+                <a-form-model-item label="有效期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="validTime">
+                    <a-radio-group v-model="model.validTime">
+                        <a-radio :value="0">无限制</a-radio>
+                        <a-radio :value="1">时间段</a-radio>
+                    </a-radio-group>
+                    <a-row>
+                        <a-col :span="16">
+                            <a-range-picker @change="onValidTimeChange" v-model="validTimeRange" format="YYYY-MM-DD 00:00:00" v-if="model.validTime == 1" />
+                        </a-col>
+                    </a-row>
+                </a-form-model-item>
+                <a-form-model-item label="是否开启" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="openValue">
+                    <a-switch checked-children="开启" un-checked-children="关闭" default-checked
+                              v-model="model.openValue"
+                              @change="e=>onOpenChange(e)"/>
+                </a-form-model-item>
+
+                <a-form-model-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sort">
+                    <a-input-number style="width:50%;" v-model="model.sort" :min="0"  placeholder="请填写排序"/>
+                </a-form-model-item>
+            </a-form-model>
+
+        </j-form-container>
+    </a-spin>
+</template>
+<script>
+    import { getRoomPlans, getSelectList } from "@/api/api";
+    import { httpAction, getAction } from "@/api/manage";
+    import { validateDuplicateValue } from "@/utils/util";
+    import { initDictOptions } from '@/components/dict/JDictSelectUtil'
+    import moment from 'moment'
+    export default {
+        name: "housePriceSchemeForm",
+        props: {
+            disabled: {
+                type: Boolean,
+                default: false,
+                required: false,
+            },
+        },
+        data() {
+            return {
+                model: {
+                    weekends:[],
+                },
+                labelCol: {
+                    xs: { span: 24 },
+                    sm: { span: 5 },
+                },
+                wrapperCol: {
+                    xs: { span: 24 },
+                    sm: { span: 16 },
+                },
+                confirmLoading: false,
+                validatorRules: {
+                    priceScheme: [{ required: true, message: "请输入房价方案!" }],
+                    number: [{ required: true, message: "请输入编号!" }],
+                    guestSource: [{ required: true, message: "请选择客人来源!" }],
+                    guestType: [{ required: true, message: "请选择客人类型!" }],
+                    checkInTime: [{ required: true, message: "请选择入住时间!" }],
+                    validTime: [{ required: true, message: "请选择有效期!" }],
+                    open: [{ required: true, message: "请选择是否开启!" }],
+                    sort: [{ required: true, message: "请填写排序!" }],
+                },
+                url: {
+                    add: "/rooms/cesHousePriceScheme/save",
+                    edit: "/rooms/cesHousePriceScheme/modify",
+                    queryById: "/rooms/cesHousePriceScheme/queryById",
+                    queryCustomerList:'/org.jeecg.modules.business/busMarketMember/queryList',
+                    queryAgreementUnitList:'/business/busMarketAgreementUnit/queryList',
+                },
+                iconChooseVisible: false,
+                customerSourceList:[],
+                guestTypeList:[],
+                weeks:[],
+                open: false,
+                customerList:[],
+                agreementUnitList:[],
+                checkTimeRange:[],
+                validTimeRange:[],
+            };
+        },
+        computed: {
+            formDisabled() {
+                return this.disabled;
+            },
+        },
+        created() {
+            var _info = JSON.parse(localStorage.getItem("storeInfo"));
+            if (_info) {
+                this.model.hotelId = _info.id;
+                this.initData();
+                this.getDictConfig();
+            }
+            this.modelDefault = JSON.parse(JSON.stringify(this.model));
+        },
+        methods: {
+            initData() {
+                getRoomPlans(this.model.hotelId, null).then((res) => {
+                    if (res.success) {
+                        this.roomPlans = res.result;
+                    }
+                });
+
+            },
+            getDictConfig(){
+                var that = this;
+                //客户来源
+                var param = {
+                    dictName:'客人来源设置'
+                }
+                // var values = JSON.parse(JSON.stringify(param))
+                that.confirmLoading = true;
+                getAction('/business/busDictItem/queryList',param).then((res)=>{
+                    console.log(res)
+                    if(res.success){
+                        if (res.code == 200 && res.result) {
+                            this.customerSourceList = res.result;
+                        }
+                    }
+                }).finally(() => {
+                    that.confirmLoading = false;
+                })
+
+                //初始化字典 - 客人类型
+                initDictOptions('guest_type').then((res) => {
+                    if (res.success) {
+                        this.guestTypeList = res.result;
+                    }
+                });
+                //初始化字典 - 客人类型
+                initDictOptions('house_price_zmjr').then((res) => {
+                    if (res.success) {
+                        that.weeks = res.result;
+                    }
+                });
+
+                getAction(this.url.queryCustomerList,{}).then((res)=>{
+                    if(res.success){
+                        this.customerList = res.result
+                    }else{
+
+                    }
+                })
+
+                getAction(this.url.queryAgreementUnitList,{}).then((res)=>{
+                    if(res.success){
+                        this.agreementUnitList = res.result
+                    }else{
+
+                    }
+                })
+            },
+            selectIcons() {
+                this.iconChooseVisible = true;
+            },
+            handleIconCancel() {
+                this.iconChooseVisible = false;
+            },
+            handleIconChoose(value) {
+                console.log(value);
+                this.model.icon = value;
+                this.iconChooseVisible = false;
+            },
+            add() {
+                this.edit(this.modelDefault);
+            },
+            edit(record) {
+                let _record = record
+                _record.guestType = record.guestType.toString();
+                if (record.id){
+                    if (record.open == 1){
+                        _record.openValue =true
+                    }else{
+                        _record.openValue =false
+                    }
+
+                    if (record.weekend.length > 0){
+                        _record.weekends = record.weekend.split(',');
+                    }
+                }else{
+                    _record.checkInTime = 0
+                    _record.validTime = 0
+                }
+
+                console.log(_record)
+                this.model = Object.assign({}, _record);
+                this.visible = true;
+                if(this.model.id){
+                    if (this.model.checkInTime === 1){
+                        this.checkTimeRange =
+                            [moment(new Date(this.model.startTime)).format('YYYY-MM-DD 00:00:00'),
+                                moment(new Date(this.model.endTime)).format('YYYY-MM-DD 00:00:00')]
+                    }
+                    if (this.model.validTime === 1){
+                        this.validTimeRange =
+                            [moment(new Date(this.model.validStartTime)).format('YYYY-MM-DD 00:00:00'),
+                                moment(new Date(this.model.validEndTime)).format('YYYY-MM-DD 00:00:00')]
+                    }
+
+                }
+
+                getSelectList({ id: this.model.id }).then((res) => {
+                    if (res.success) {
+                        this.members = res.result;
+                    }
+                });
+            },
+            onCheckTimeChange(date, dateString) {
+                // this.checkStartTime = dateString[0];
+                // this.checkEndTime = dateString[1];
+                // if (date.length === 0) {
+                //     this.checkTimeRange = [];
+                // } else {
+                //     console.log("这是开始时间", this.$moment(this.checkTimeRange[0]).format('YYYY-MM-DD 00:00:00'));
+                //     console.log("这是结束时间", this.$moment( this.checkTimeRange[1]).format('YYYY-MM-DD 00:00:00'));
+                // }
+            },
+            onValidTimeChange(date, dateString) {
+                // this.validStartTime = dateString[0];
+                // this.validEndTime = dateString[1];
+                // if (date.length === 0) {
+                //     this.validTimeRange = [];
+                // } else {
+                //     console.log("这是开始时间", this.$moment(this.validTimeRange[0]).format('YYYY-MM-DD 00:00:00'));
+                //     console.log("这是结束时间", this.$moment( this.validTimeRange[1]).format('YYYY-MM-DD 00:00:00'));
+                // }
+                // console.log(this.validTimeRange.length);
+            },
+            onOpenChange(e){
+                console.log(e)
+                console.log(this.model.openValue)
+                // this.model.open = e?1:0;
+                // this.model.openValue = e
+
+                // this.model.openValue = !this.model.openValue
+                this.model.openValue = e;
+            },
+            submitForm() {
+                const that = this;
+                // 触发表单验证
+                if (this.model.checkInTime == 1){
+                    this.model.startTime =moment(this.checkTimeRange[0]).format('YYYY-MM-DD 00:00:00');
+                    this.model.endTime =moment(this.checkTimeRange[1]).format('YYYY-MM-DD 00:00:00');
+                }
+                if (this.model.validTime == 1){
+                    this.model.validStartTime =moment(this.validTimeRange[0]).format('YYYY-MM-DD 00:00:00');
+                    this.model.validEndTime =moment(this.validTimeRange[1]).format('YYYY-MM-DD 00:00:00');
+                }
+                this.model.weekend = this.model.weekends.join(',');
+                this.model.open = this.model.openValue?1:0;
+                console.log(this.model)
+                this.$refs.form.validate((valid) => {
+                    if (valid) {
+                        that.confirmLoading = true;
+                        let httpurl = "";
+                        let method = "";
+                        if (!this.model.id) {
+                            httpurl += this.url.add;
+                            method = "post";
+                        } else {
+                            httpurl += this.url.edit;
+                            method = "put";
+                        }
+
+
+
+                        httpAction(httpurl, this.model, method)
+                            .then((res) => {
+                                if (res.success) {
+                                    that.$message.success(res.message);
+                                    that.$emit("ok");
+                                } else {
+                                    that.$message.warning(res.message);
+                                }
+                            })
+                            .finally(() => {
+                                that.confirmLoading = false;
+                            });
+                    }
+                });
+            },
+            onChange(){
+
+            },
+            handleHolidCancel() {
+                this.open = false
+            },
+            handleHolidConfirm(){
+                this.open = false
+            },
+            moment,
+            range(start, end) {
+                const result = [];
+                for (let i = start; i < end; i++) {
+                    result.push(i);
+                }
+                return result;
+            },
+
+            disabledDate(current) {
+                // Can not select days before today and today
+                return current && current < moment().endOf('day');
+            },
+
+            disabledDateTime() {
+                return {
+                    disabledHours: () => this.range(0, 24).splice(4, 20),
+                    disabledMinutes: () => this.range(30, 60),
+                    disabledSeconds: () => [55, 56],
+                };
+            },
+            // 弹出日历和关闭日历的回调
+            openChangeOne(status) {
+                if (status) {
+                    this.open = true
+                }
+            },
+            // 得到年份选择器的值
+            panelChangeOne(value) {
+                this.queryParam.year = moment(new Date(value)).format('YYYY');
+                this.open = false;
+            },
+            handleOk(e){
+                console.log(e)
+            },
+            handleChange(e){
+                console.log(e)
+                console.log(this.model.holiday)
+                this.model.holiday = e+",";
+            },
+            handleFocus(){
+                this.open = true;
+            },
+            handleGuestType(e){
+                console.log(e)
+            }
+        },
+    };
+</script>
+<style scoped>
+    .avatar-uploader>.ant-upload {
+        width: 104px;
+        height: 104px;
+    }
+    .margin_left_6{
+        margin-left: 6px;
+    }
+</style>

+ 60 - 0
src/views/settings/components/roomModules/modules/housePriceSchemeModal.vue

@@ -0,0 +1,60 @@
+<template>
+    <j-modal
+            :title="title"
+            :width="width"
+            :visible="visible"
+            switchFullscreen
+            @ok="handleOk"
+            :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+            @cancel="handleCancel"
+            cancelText="关闭">
+        <house-price-scheme-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></house-price-scheme-form>
+    </j-modal>
+</template>
+
+<script>
+
+    import HousePriceSchemeForm from "./housePriceSchemeForm";
+    export default {
+        name: 'housePriceSchemeModal',
+        components: {
+            HousePriceSchemeForm,
+        },
+        data () {
+            return {
+                title:'',
+                width:950,
+                visible: false,
+                disableSubmit: false
+            }
+        },
+        methods: {
+            add () {
+                this.visible=true
+                this.$nextTick(()=>{
+                    this.$refs.realForm.add();
+                })
+            },
+            edit (record) {
+                this.visible=true
+                this.$nextTick(()=>{
+                    this.$refs.realForm.edit(record);
+                })
+            },
+            close () {
+                this.$emit('close');
+                this.visible = false;
+            },
+            handleOk () {
+                this.$refs.realForm.submitForm();
+            },
+            submitCallback(){
+                this.$emit('ok');
+                this.visible = false;
+            },
+            handleCancel () {
+                this.close()
+            }
+        }
+    }
+</script>

+ 3 - 0
src/views/settings/roomSettings.vue

@@ -42,6 +42,7 @@
                     <a-icon type="file" />
                     房价方案
                 </span>
+                <house-price-scheme-list></house-price-scheme-list>
             </a-tab-pane>
             <a-tab-pane key="7">
                 <span slot="tab">
@@ -85,8 +86,10 @@ import ServiceRepairList from "./components/roomModules/serviceRepairList";
 import hourRoomRuleList from './components/roomModules/hourRoomRule/table.vue'
 import MarketObjectiveList from "./components/roomModules/marketObjectiveList";
 import RoomUtilitySettingList from "./components/roomModules/roomUtilitySettingList";
+import HousePriceSchemeList from "./components/roomModules/housePriceSchemeList";
 export default {
     components: {
+        HousePriceSchemeList,
         RoomUtilitySettingList,
         MarketObjectiveList,
         ServiceRepairList,