Ver código fonte

房态模块其他界面

gqx 2 anos atrás
pai
commit
e510c8c41d

+ 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>

+ 42 - 9
src/views/room/fangtailive.vue

@@ -1,12 +1,20 @@
 <template>
   <a-card :bordered="false">
-    <a-tabs type="card" @change="tabsClick">
-      <a-tab-pane key="1" tab="全部房型"> </a-tab-pane>
-      <a-tab-pane key="2" tab="大床房"> </a-tab-pane>
-      <a-tab-pane key="3" tab="麻将房"> </a-tab-pane>
+    <a-tabs v-model="activeKey" type="card" @change="tabsClick">
+      <a-tab-pane key="1" tab="实时房态"> </a-tab-pane>
+      <a-tab-pane key="2" tab="日历房态"> </a-tab-pane>
+      <a-tab-pane key="3" tab="客单"> </a-tab-pane>
+      <a-tab-pane key="4" tab="远期房态"> </a-tab-pane>
+      <a-tab-pane key="5" tab="物品租借"> </a-tab-pane>
+      <a-tab-pane key="6" tab="客人留言"> </a-tab-pane>
+      <a-tab-pane key="7" tab="客人物品管理"> </a-tab-pane>
     </a-tabs>
-    <div style="display: flex; height: calc(100vh - 240px)">
-      <div class="course-week">
+
+    <div
+      v-if="activeKey === '1'"
+      style="display: flex; height: calc(100vh - 240px)"
+    >
+      <div style="width: 80%;" class="course-week">
         <div style="display: flex; flex-direction: column">
           <div style="display: flex; gap: 5px">
             <a-dropdown>
@@ -381,6 +389,18 @@
         </a-checkbox-group>
       </div>
     </div>
+    <template v-else-if="activeKey === '2'">
+      <calendarfangtai> </calendarfangtai>
+    </template>
+    <template v-else-if="activeKey === '3'">
+      <guestorders></guestorders>
+    </template>
+    <template v-else-if="activeKey === '4'">
+      <forwardfangtai></forwardfangtai>
+    </template>
+    <template v-else-if="activeKey === '5'">
+      <leasegoods></leasegoods>
+    </template>
     <upkeep-room-modal ref="modalForm" @ok="modalFormOk"></upkeep-room-modal>
     <bill-room-info-modal
       ref="ModalBillRoomInfo"
@@ -416,6 +436,10 @@ import BillRoomFormModal from "./modules/checkIn/BillRoomFormModal.vue";
 import ScheduleRoomModal from "./modules/schedule/ScheduleRoomModal.vue";
 import ScheduleTeamRoomModal from "./modules/scheduleTeam/ScheduleRoomModal.vue";
 import EditScheduleRoomModal from "./modules/schedule/EditScheduleRoomModal.vue";
+import calendarfangtai from "./calendarfangtai";
+import forwardfangtai from "./forwardfangtai";
+import guestorders from './guestorders'
+import leasegoods from './leasegoods'
 import { TreeSelect } from "ant-design-vue";
 const SHOW_PARENT = TreeSelect.SHOW_PARENT;
 const treeData = [
@@ -628,9 +652,14 @@ export default {
     ScheduleRoomModal,
     ScheduleTeamRoomModal,
     EditScheduleRoomModal,
+    calendarfangtai,
+    guestorders,
+    forwardfangtai,
+    leasegoods,
   },
   data() {
     return {
+      activeKey: "1",
       timeId: null,
       multipleRoom: false,
       keyWord: "",
@@ -731,7 +760,7 @@ export default {
         // path: "/room/scheduleteamdetail",
         // query: { id: "YD20230403170240075" },
         name: "room-scheduleteamdetail",
-        params: { id: 'YD20230403170240075' },
+        params: { id: "YD20230403170240075" },
       });
     },
     addScheduleTeam() {
@@ -841,7 +870,12 @@ export default {
       });
     },
     onChange() {},
-    tabsClick() {},
+    tabsClick(e) {
+      // this.$router.push({
+      //   name: "room-scheduledetail",
+      //   params: { id: "YD20230331112026203" },
+      // });
+    },
     collapseClick(row, value) {
       this.$set(row, "collapse", value);
     },
@@ -906,7 +940,6 @@ li {
 }
 
 .course-week {
-  width: 80%;
   /* border: 1px solid #ddd; */
   /* padding: 1%; */
   box-sizing: border-box;

+ 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>

+ 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>