Explorar el Código

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

qh hace 2 años
padre
commit
2bf360632d
Se han modificado 27 ficheros con 5089 adiciones y 79 borrados
  1. 115 0
      src/api/good.js
  2. 26 1
      src/views/markets/marketInfo.vue
  3. 254 0
      src/views/markets/meetingroom.vue
  4. 659 0
      src/views/markets/meetingroomschedule.vue
  5. 357 0
      src/views/markets/meetingroomscheduleorder.vue
  6. 1 1
      src/views/markets/modules/couponsCash/BusMarketCouponsCashUsedListModal.vue
  7. 181 0
      src/views/markets/modules/meetingRoom/BusMeetingRoomForm.vue
  8. 84 0
      src/views/markets/modules/meetingRoom/BusMeetingRoomModal.Style#Drawer.vue
  9. 60 0
      src/views/markets/modules/meetingRoom/BusMeetingRoomModal.vue
  10. 400 0
      src/views/markets/modules/meetingRoomSchedule/BusMeetingRoomScheduleConfirm.vue
  11. 66 0
      src/views/markets/modules/meetingRoomSchedule/BusMeetingRoomScheduleConfirmModal.vue
  12. 228 0
      src/views/markets/modules/meetingRoomSchedule/BusMeetingRoomScheduleEditForm.vue
  13. 60 0
      src/views/markets/modules/meetingRoomSchedule/BusMeetingRoomScheduleEditModal.vue
  14. 324 0
      src/views/markets/modules/meetingRoomSchedule/BusMeetingRoomScheduleForm.vue
  15. 60 0
      src/views/markets/modules/meetingRoomSchedule/BusMeetingRoomScheduleModal.vue
  16. 312 0
      src/views/markets/modules/meetingRoomSchedule/meetingRoomScheduleDetail/meetingRoomScheduleDetailList.vue
  17. 67 0
      src/views/markets/modules/meetingRoomSchedule/meetingRoomScheduleDetail/meetingRoomScheduleDetailModal.vue
  18. 333 0
      src/views/markets/modules/meetingRoomScheduleOrder/BusMeetingRoomScheduleEditForm.vue
  19. 60 0
      src/views/markets/modules/meetingRoomScheduleOrder/BusMeetingRoomScheduleEditModal.vue
  20. 8 10
      src/views/markets/modules/memberCard/BusMemberCardForm.vue
  21. 322 31
      src/views/settings/components/roomModules/goodList.vue
  22. 60 0
      src/views/settings/components/roomModules/goodStock/goods.vue
  23. 333 0
      src/views/settings/components/roomModules/goodStock/goodsForm.vue
  24. 271 0
      src/views/settings/components/roomModules/moreSet/commodity.vue
  25. 87 0
      src/views/settings/components/roomModules/moreSet/goodImg.vue
  26. 273 0
      src/views/settings/components/roomModules/setUnit/index.vue
  27. 88 36
      src/views/settings/components/roomModules/stockTypeForm.vue

+ 115 - 0
src/api/good.js

@@ -13,5 +13,120 @@ export function tree(parameter) {
     })
 }
 
+/**
+ * 刪除商品分类
+ * @param {*} parameter 
+ * @returns 
+ */
+export function delTree(parameter){
+    return axios({
+        url: '/rooms/cesStockType/delete',
+        method:'delete',
+        params:parameter
+    })
+}
+
+/**
+ * 修改商品分类
+ * @param {*} parameter 
+ * @returns 
+ */
+export function editTree(parameter){
+    return axios({
+        url:'/rooms/cesStockType/modify',
+        method:'put',
+        params:parameter
+    })
+}
+
+/**
+ * 获取商品单位数据
+ * @param {*} parameter 
+ * @returns 
+ */
+export function getUnit(parameter){
+    return axios({
+        url:'/rooms/cesGoodsUnit/list',
+        method:'get',
+        params:parameter
+    })
+}
 
+/**
+ * 新增单位
+ * @param {*} parameter 
+ * @returns 
+ */
+export function addUnit(parameter){
+    return axios({
+        url:'/rooms/cesGoodsUnit/save',
+        method:'post',
+        data:parameter
+    })
+}
 
+/**
+ * 修改单位
+ * @param {*} data 
+ * @returns 
+ */
+export function editUnit(data){
+    return axios({
+        url:'/rooms/cesGoodsUnit/modify',
+        method:'put',
+        data:data
+    })
+}
+
+
+/**
+ * 删除商品单位
+ * @param {*} id 
+ * @returns 
+ */
+export function delUnit(hotelId){
+    return axios({
+        url:'/rooms/cesGoodsUnit/remove',
+        method:'delete',
+        params:hotelId
+    })
+}
+
+/**
+ * 批量删除
+ * @param {*} data 
+ * @returns 
+ */
+export function batchDelUnit(parameter){
+    return axios({
+        url:'/rooms/cesGoodsUnit/deleteBatch',
+        method:'post',
+        data:parameter
+    })
+}
+
+/**
+ * 商品批量删除
+ * @param {*} parameter 
+ * @returns 
+ */
+export function goodBatchDel(parameter){
+    return axios({
+        url:'/rooms/cesGoods/delBatch',
+        method:'delete',
+        data:parameter
+    })
+}
+
+/**
+ * 进退货
+ * @param {*} parameter 
+ * @returns 
+ */
+export function goodSet(parameter){
+    return axios({
+        url:"/rooms/cesGoodStockRecords/create",
+        method:'post',
+        data:parameter
+    })
+}

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

@@ -59,6 +59,31 @@
         <p>免房券</p>
       </div>
     </div>
+    <p>会议管理</p>
+    <a-divider />
+    <div class="space-align-container">
+      <div class="height-100" @click="toPage('/tenant/marketinfo/meetingroomschedule')">
+        <img
+          src="http://oss.qlan99.com/20210204/1aef78a036e84fd18caebc0de5175281.png"
+        />
+        <p>会议室管理</p>
+      </div>
+
+      <div class="height-100" @click="toPage('/tenant/marketinfo/meetingroom')">
+        <img
+          src="http://oss.qlan99.com/20210204/70ad866bfd9a431b9bec3e8e2234ee39.png"
+          width="50"
+        />
+        <p>会议室设置</p>
+      </div>
+      <div class="height-100" @click="toPage('/tenant/marketinfo/meetingroomscheduleorder')">
+        <img
+          src="http://oss.qlan99.com/20210204/528927c30c854370a28085a02774b951.png"
+          width="50"
+        />
+        <p>会议室订单管理</p>
+      </div>
+    </div>
     <!-- <p>会员分组设置</p>
     <a-divider />
     <a-space>
@@ -87,7 +112,7 @@ export default {
   methods: {
     toPage(url) {
       if(!url){
-        this.$message.warning('开发中,请先体验免房券/优惠券');
+        this.$message.warning('开发中,请先体验其他');
         return
       }
       this.$router.push(url);

+ 254 - 0
src/views/markets/meetingroom.vue

@@ -0,0 +1,254 @@
+<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="">
+              <j-input placeholder="名称" v-model="queryParam.name"></j-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
+              >
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button @click="batchDel" type="danger" icon="minus">批量删除</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">
+          <a v-if="record.status != 1" @click="setStatus(record,1)">启用</a>
+          <a v-else @click="setStatus(record,0)">禁用</a>
+          <a-divider type="vertical" />
+          <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-meeting-room-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></bus-meeting-room-modal>
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import BusMeetingRoomModal from "./modules/meetingRoom/BusMeetingRoomModal";
+import { httpAction, postAction } from "@/api/manage";
+export default {
+  name: "BusMeetingRoomList",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    BusMeetingRoomModal,
+  },
+  data() {
+    return {
+      description: "bus_meeting_room管理页面",
+      // 表头
+      columns: [
+        {
+          title: "名称",
+          align: "center",
+          dataIndex: "name",
+        },
+        {
+          title: "规格",
+          align: "center",
+          dataIndex: "spec",
+        },
+        {
+          title: "面积",
+          align: "center",
+          dataIndex: "area",
+        },
+        {
+          title: "人数",
+          align: "center",
+          dataIndex: "number",
+        },
+        {
+          title: "管理员姓名",
+          align: "center",
+          dataIndex: "adminName",
+        },
+        {
+          title: "地址",
+          align: "center",
+          dataIndex: "address",
+        },
+        {
+          title: "设备",
+          align: "center",
+          dataIndex: "facility",
+        },
+        {
+          title: "排序",
+          align: "center",
+          dataIndex: "sort",
+        },
+        {
+          title: "描述",
+          align: "center",
+          dataIndex: "remark",
+        },
+        {
+          title: "状态",
+          align: "center",
+          dataIndex: "status",
+          customRender: function (text) {
+            return text == 1 ? "启用" : "未启用";
+          },
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/business/busMeetingRoom/list",
+        delete: "/business/busMeetingRoom/delete",
+        deleteBatch: "/business/busMeetingRoom/deleteBatch",
+        exportXlsUrl: "/business/busMeetingRoom/exportXls",
+        importExcelUrl: "business/busMeetingRoom/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+    };
+  },
+  created() {
+    this.getSuperFieldList();
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    setStatus(record, status) {
+      record.status = status;
+      postAction("/business/busMeetingRoom/edit", record).then((res) => {
+        if (res.success) {
+          this.$message.success(res.message);
+        } else {
+          this.$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: "string", value: "name", text: "名称" });
+      fieldList.push({ type: "string", value: "spec", text: "规格" });
+      fieldList.push({ type: "number", value: "area", text: "金额" });
+      fieldList.push({ type: "int", value: "number", text: "人数" });
+      fieldList.push({
+        type: "string",
+        value: "adminName",
+        text: "管理员姓名",
+      });
+      fieldList.push({ type: "string", value: "address", text: "地址" });
+      fieldList.push({ type: "string", value: "facility", text: "设备" });
+      fieldList.push({ type: "int", value: "sort", text: "排序" });
+      fieldList.push({ type: "string", value: "remark", text: "描述" });
+      fieldList.push({ type: "int", value: "status", text: "状态" });
+      this.superFieldList = fieldList;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 659 - 0
src/views/markets/meetingroomschedule.vue

@@ -0,0 +1,659 @@
+<template>
+  <a-card :bordered="false">
+    <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">
+                  <span v-if="p_index == 1" class="meeting-room-center">{{
+                    i.meetingRoomName
+                  }}</span
+                  >{{ period.timePeriod }}
+                </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 {
+      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: {
+    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;
+}
+
+.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>

+ 357 - 0
src/views/markets/meetingroomscheduleorder.vue

@@ -0,0 +1,357 @@
+<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="">
+              <j-input
+                placeholder="账单号"
+                v-model="queryParam.orderNo"
+              ></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <j-input
+                placeholder="会议主题"
+                v-model="queryParam.theme"
+              ></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <j-input
+                placeholder="公司名称"
+                v-model="queryParam.name"
+              ></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <j-input
+                placeholder="预定人"
+                v-model="queryParam.destinedName"
+              ></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <j-input
+                placeholder="联系电话"
+                v-model="queryParam.mobile"
+              ></j-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
+              >
+            </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="orderDetailList" slot-scope="text">
+          <div
+            v-if="text && text.length > 0"
+            v-for="(item, index) in text"
+            :key="index"
+          >
+            {{ item.payWayName }}:{{ item.amount }}
+            <a-divider type="vertical" />
+          </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="setStatus(record, 0)">确认</a>
+          <a-divider type="vertical" />
+          <a @click="setStatus(record, 0)">结账</a>
+          <a-divider type="vertical" />
+          <a @click="setStatus(record, 0)">删除</a>
+        </span> -->
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleDetail(record)">全部档期</a>
+          <a-divider type="vertical" />
+          <template v-if="record.confirmStatus != 0 && record.billStatus == 0">
+            <a @click="handleSettle(record)">结账</a>
+            <a-divider type="vertical"
+          /></template>
+          <template v-if="record.confirmStatus == 0">
+            <a @click="handleEdit(record)">修改</a>
+            <a-divider type="vertical"
+          /></template>
+          <template v-if="record.confirmStatus == 0">
+            <a @click="batchConfirm(record)">确认</a>
+            <a-divider type="vertical" />
+          </template>
+          <a v-if="record.status == 0" @click="handleEdit(record)">删除</a>
+        </span>
+      </a-table>
+    </div>
+
+    <bus-meeting-room-schedule-edit-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></bus-meeting-room-schedule-edit-modal>
+    <meeting-room-schedule-detail-modal
+      ref="modalMeetingRoomScheduleDetail"
+      :meetingRoomScheduleId="meetingRoomScheduleId"
+      @ok="modalFormOk"
+    ></meeting-room-schedule-detail-modal>
+    <bus-meeting-room-schedule-edit-modal-2
+      ref="modalForm2"
+      @ok="modalFormOk"
+    ></bus-meeting-room-schedule-edit-modal-2>
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import BusMeetingRoomScheduleEditModal from "./modules/meetingRoomSchedule/BusMeetingRoomScheduleEditModal";
+import meetingRoomScheduleDetailModal from "./modules/meetingRoomSchedule/meetingRoomScheduleDetail/meetingRoomScheduleDetailModal";
+import BusMeetingRoomScheduleEditModal2 from "./modules/meetingRoomScheduleOrder/BusMeetingRoomScheduleEditModal";
+import { httpAction, postAction } from "@/api/manage";
+export default {
+  name: "BusMeetingRoomList",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    BusMeetingRoomScheduleEditModal,
+    meetingRoomScheduleDetailModal,
+    BusMeetingRoomScheduleEditModal2,
+  },
+  data() {
+    return {
+      description: "bus_meeting_room管理页面",
+      // 表头
+      columns: [
+        {
+          title: "账单号",
+          align: "center",
+          dataIndex: "orderNo",
+        },
+        {
+          title: "会议主题",
+          align: "center",
+          dataIndex: "theme",
+        },
+        {
+          title: "公司名称",
+          align: "center",
+          dataIndex: "name",
+        },
+        {
+          title: "预定人",
+          align: "center",
+          dataIndex: "destinedName",
+        },
+        {
+          title: "联系电话",
+          align: "center",
+          dataIndex: "mobile",
+        },
+        {
+          title: "账单状态",
+          align: "center",
+          dataIndex: "billStatus",
+          customRender: function (text) {
+            return text == 1 ? "已结账" : "未结账";
+          },
+        },
+        {
+          title: "挂账人",
+          align: "center",
+          dataIndex: "",
+          customRender: function (text) {
+            //后期结合房间订单关联
+            return "无";
+          },
+        },
+        {
+          title: "消费金额",
+          align: "center",
+          dataIndex: "amount",
+        },
+        {
+          title: "付款",
+          align: "center",
+          dataIndex: "orderDetailList",
+          scopedSlots: { customRender: "orderDetailList" },
+        },
+        {
+          title: "状态",
+          align: "center",
+          dataIndex: "confirmStatus",
+          customRender: function (text) {
+            return text == 1 ? "已确认" : "未确认";
+          },
+        },
+        {
+          title: "创建时间",
+          align: "center",
+          dataIndex: "createTime",
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/business/busMeetingRoomSchedule/list",
+        delete: "/business/busMeetingRoomSchedule/delete",
+        deleteBatch: "/business/busMeetingRoomSchedule/deleteBatch",
+        exportXlsUrl: "/business/busMeetingRoomSchedule/exportXls",
+        importExcelUrl: "business/busMeetingRoomSchedule/importExcel",
+        confirmBatch:
+          "/business/busMeetingRoomScheduleDetail/confirmBatchByMeetingRoomScheduleId",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      meetingRoomScheduleId: "",
+    };
+  },
+  created() {
+    this.getSuperFieldList();
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    handleSettle(record) {
+      this.$refs.modalForm2.edit(record);
+      this.$refs.modalForm2.title = "结账";
+      this.$refs.modalForm2.disableSubmit = false;
+    },
+    handleDetail(record) {
+      console.log("record", record);
+      this.meetingRoomScheduleId = record.id;
+      this.$refs.modalMeetingRoomScheduleDetail.add(record);
+      this.$refs.modalMeetingRoomScheduleDetail.title = "档期列表预定确认";
+      this.$refs.modalMeetingRoomScheduleDetail.disableSubmit = true;
+    },
+    batchConfirm(record) {
+      if (!this.url.confirmBatch) {
+        this.$message.error("请设置url.confirmBatch!");
+        return;
+      }
+
+      var that = this;
+      that.loading = true;
+      postAction(that.url.confirmBatch, {
+        id: record.id,
+      })
+        .then((res) => {
+          if (res.success) {
+            that.$message.success(res.message);
+            that.loadData();
+          } else {
+            that.$message.warning(res.message);
+          }
+        })
+        .finally(() => {
+          that.loading = false;
+        });
+    },
+    setStatus(record, status) {
+      record.status = status;
+      postAction("/business/busMeetingRoomSchedule/edit", record).then(
+        (res) => {
+          if (res.success) {
+            this.$message.success(res.message);
+          } else {
+            this.$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: "string", value: "name", text: "名称" });
+      fieldList.push({ type: "string", value: "spec", text: "规格" });
+      fieldList.push({ type: "number", value: "area", text: "金额" });
+      fieldList.push({ type: "int", value: "number", text: "人数" });
+      fieldList.push({
+        type: "string",
+        value: "adminName",
+        text: "管理员姓名",
+      });
+      fieldList.push({ type: "string", value: "address", text: "地址" });
+      fieldList.push({ type: "string", value: "facility", text: "设备" });
+      fieldList.push({ type: "int", value: "sort", text: "排序" });
+      fieldList.push({ type: "string", value: "remark", text: "描述" });
+      fieldList.push({ type: "int", value: "status", text: "状态" });
+      this.superFieldList = fieldList;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 1 - 1
src/views/markets/modules/couponsCash/BusMarketCouponsCashUsedListModal.vue

@@ -7,7 +7,7 @@
     @ok="handleOk"
     :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
     @cancel="handleCancel"
-    cancelText="关闭">
+    cancelText="关闭1">
     <bus-market-coupons-cash-used-list :couponsId="couponsId" ref="modalCouponsCashUsedListModal"></bus-market-coupons-cash-used-list>
   </j-modal>
 </template>

+ 181 - 0
src/views/markets/modules/meetingRoom/BusMeetingRoomForm.vue

@@ -0,0 +1,181 @@
+<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="name">
+              <a-input v-model="model.name" placeholder="请输入名称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spec">
+              <a-input v-model="model.spec" placeholder="请输入规格"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="面积" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="area">
+              <a-input-number v-model="model.area" placeholder="请输入面积" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="人数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="number">
+              <a-input-number v-model="model.number" placeholder="请输入人数" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="管理员姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="adminName">
+              <a-input v-model="model.adminName" 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="facility">
+              <a-input v-model="model.facility" placeholder="请输入设备"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sort">
+              <a-input-number v-model="model.sort" 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: 'BusMeetingRoomForm',
+    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: '请输入关联酒店!'},
+           ],
+           name: [
+              { required: true, message: '请输入名称!'},
+           ],
+           spec: [
+              { required: true, message: '请输入规格!'},
+           ],
+           area: [
+              { required: true, message: '请输入面积!'},
+           ],
+           number: [
+              { required: true, message: '请输入人数!'},
+           ],
+           adminName: [
+              { required: true, message: '请输入管理员姓名!'},
+           ],
+           address: [
+              { required: true, message: '请输入地址!'},
+           ],
+           facility: [
+              { required: true, message: '请输入设备!'},
+           ],
+           sort: [
+              { required: true, message: '请输入排序!'},
+           ],
+           status: [
+              { required: true, message: '请输入状态!'},
+           ],
+        },
+        url: {
+          add: "/business/busMeetingRoom/add",
+          edit: "/business/busMeetingRoom/edit",
+          queryById: "/business/busMeetingRoom/queryById"
+        }
+      }
+    },
+    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: {
+      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/markets/modules/meetingRoom/BusMeetingRoomModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <bus-meeting-room-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></bus-meeting-room-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 BusMeetingRoomForm from './BusMeetingRoomForm'
+
+  export default {
+    name: 'BusMeetingRoomModal',
+    components: {
+      BusMeetingRoomForm
+    },
+    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/meetingRoom/BusMeetingRoomModal.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-meeting-room-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-meeting-room-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusMeetingRoomForm from './BusMeetingRoomForm'
+  export default {
+    name: 'BusMeetingRoomModal',
+    components: {
+      BusMeetingRoomForm
+    },
+    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>

+ 400 - 0
src/views/markets/modules/meetingRoomSchedule/BusMeetingRoomScheduleConfirm.vue

@@ -0,0 +1,400 @@
+<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="24">
+            <a-divider orientation="left">档期</a-divider></a-col
+          >
+          <a-col :span="6">
+            <a-form-item label="">
+              <a-select
+                v-model="model.detail.meetingRoomId"
+                style="width: 100%"
+                placeholder="会议室"
+                disabled
+              >
+                <a-select-option
+                  v-for="(item, index) in meetingRoomList"
+                  :key="index"
+                  :value="item.id"
+                  >{{ item.name }}</a-select-option
+                >
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="">
+              <j-date
+                disabled
+                placeholder="请选择开始时间"
+                v-model="model.detail.meetingDate"
+                style="width: 100%"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="">
+              <a-select
+                disabled
+                v-model="model.detail.timeSpan"
+                style="width: 100%"
+                placeholder="会议室"
+                :allowClear="true"
+              >
+                <a-select-option
+                  v-for="(item, index) in timeSpanList"
+                  :key="index"
+                  :value="item.id"
+                  >{{ item.name }}</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 v-if="model.roomSchedule.billStatus==0"
+                @click="handleAdd"
+                type="danger"
+                style="margin-left: 8px"
+                >增加预定</a-button
+              > -->
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+    <a-divider orientation="left">档期</a-divider>
+    <!-- table区域-begin -->
+    <div>
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{ x: true }"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        class="j-table-force-nowrap"
+      >
+        <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="handleDetail(record)">全部档期</a>
+          <a-divider type="vertical" />
+          <template v-if="record.status != 0 && record.billStatus == 0">
+            <a @click="handleSettle(record)">结账</a>
+            <a-divider type="vertical"
+          /></template>
+          <template v-if="record.status == 0">
+          <a @click="handleEdit(record)">修改</a>
+          <a-divider type="vertical" /></template>
+          <template v-if="record.status == 0">
+            <a @click="batchConfirm(record)">确认</a>
+            <a-divider type="vertical" />
+          </template>
+          <a v-if="record.status == 0" @click="handleEdit(record)">删除</a>
+        </span>
+      </a-table>
+    </div>
+    <bus-meeting-room-schedule-edit-modal
+      ref="modalForm"
+      @ok="modalFormOk2($event)"
+    ></bus-meeting-room-schedule-edit-modal>
+    <meeting-room-schedule-detail-modal
+      ref="modalMeetingRoomScheduleDetail"
+      :meetingRoomScheduleId="meetingRoomScheduleId"
+      @ok="modalFormOk"
+    ></meeting-room-schedule-detail-modal>
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import BusMeetingRoomScheduleEditModal from "./BusMeetingRoomScheduleEditModal";
+import meetingRoomScheduleDetailModal from "./meetingRoomScheduleDetail/meetingRoomScheduleDetailModal";
+
+import { httpAction, getAction, postAction } from "@/api/manage";
+
+export default {
+  name: "BusMarketCouponsUsedList",
+  // mixins: [ mixinDevice],
+  components: {
+    BusMeetingRoomScheduleEditModal,
+    meetingRoomScheduleDetailModal,
+  },
+  props: {
+    couponsId: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    return {
+      meetingRoomScheduleId: "",
+      description: "",
+      model: {
+        detail: { meetingRoomId: "", meetingDate: "", meetingDatev: "" },
+      },
+      dataSource: [],
+      // 表头
+      columns: [
+        {
+          title: "会议主题",
+          align: "center",
+          dataIndex: "theme",
+        },
+        {
+          title: "公司名称",
+          align: "center",
+          dataIndex: "name",
+        },
+        {
+          title: "预定人",
+          align: "center",
+          dataIndex: "destinedName",
+        },
+
+        {
+          title: "联系电话",
+          align: "center",
+          dataIndex: "mobile",
+        },
+        {
+          title: "账单状态",
+          align: "center",
+          dataIndex: "billStatus",
+          customRender: function (text) {
+            var msg = "未结账";
+            if (text == 1) {
+              msg = "已挂账";
+            } else if (text == 2) {
+              msg = "已结账";
+            }
+            return msg;
+          },
+        },
+        {
+          title: "备注",
+          align: "center",
+          dataIndex: "gainTime",
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 80,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        confirmBatch: "/business/busMeetingRoomScheduleDetail/confirmBatchByMeetingRoomScheduleId",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      meetingRoomList: [],
+      timeSpanList: [
+        { id: 1, name: "上午" },
+        { id: 2, name: "下午" },
+        { id: 3, name: "晚上" },
+      ],
+    };
+  },
+  created() {
+    getAction("/business/busMeetingRoom/list", {
+      pageNo: 1,
+      pageSize: 100,
+      stauts: 1,
+    }).then((res) => {
+      if (res.success) {
+        this.meetingRoomList = res.result.records;
+      }
+    });
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    handleSettle(){
+      this.$message.error("结账功能暂无实现");
+    },
+    handleAdd(){
+
+    },
+    batchConfirm(record) {
+      if (!this.url.confirmBatch) {
+        this.$message.error("请设置url.confirmBatch!");
+        return;
+      }
+
+      var that = this;
+      that.loading = true;
+      postAction(that.url.confirmBatch, {
+        id: record.id,
+      })
+        .then((res) => {
+          if (res.success) {
+            that.$message.success(res.message);
+            that.dataSource = [
+              Object.assign({}, that.model.roomSchedule, {
+                status: 1,
+              }),
+            ];
+            that.$emit("ok");
+          } else {
+            that.$message.warning(res.message);
+          }
+        })
+        .finally(() => {
+          that.loading = false;
+        });
+    },
+    modalFormOk2(record) {
+      console.log("record", record);
+      this.dataSource = [Object.assign({}, record)];
+      this.$emit("ok");
+    },
+    modalFormOk(){
+
+    },
+    add() {
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      delete this.model.roomSchedule.createTime;
+      this.dataSource = [
+        Object.assign({}, this.model.roomSchedule, {
+          status: this.model.detail.status,
+        }),
+      ];
+      this.visible = true;
+    },
+    handleEdit(record) {
+      this.$refs.modalForm.edit(record);
+      this.$refs.modalForm.title = "编辑";
+      this.$refs.modalForm.disableSubmit = false;
+    },
+    handleDetail(record) {
+      console.log("record", record);
+      this.meetingRoomScheduleId = record.id;
+      this.$refs.modalMeetingRoomScheduleDetail.add(record);
+      this.$refs.modalMeetingRoomScheduleDetail.title = "档期列表预定确认";
+      this.$refs.modalMeetingRoomScheduleDetail.disableSubmit = true;
+    },
+    initDictConfig() {},
+    getSuperFieldList() {
+      let fieldList = [];
+      fieldList.push({
+        type: "string",
+        value: "tenantId",
+        text: "关联租户",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "hotelId",
+        text: "关联酒店",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "couponsId",
+        text: "免房券id",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "code",
+        text: "券号",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "int",
+        value: "status",
+        text: "状态 0未领取 1已领取 2已使用 3已作废",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "userid",
+        text: "会员id",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "userName",
+        text: "姓名",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "roomNumber",
+        text: "房间号",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "checkedInNo",
+        text: "入住单号",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "mobile",
+        text: "手机号",
+        dictCode: "",
+      });
+      fieldList.push({ type: "date", value: "gainTime", text: "领取时间" });
+      fieldList.push({ type: "date", value: "usedTime", text: "使用时间" });
+      this.superFieldList = fieldList;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 66 - 0
src/views/markets/modules/meetingRoomSchedule/BusMeetingRoomScheduleConfirmModal.vue

@@ -0,0 +1,66 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
+    @cancel="handleCancel"
+    cancelText="关闭"
+  >
+    <bus-meeting-room-schedule-confirm
+      ref="modalBusMeetingRoomScheduleConfirmModal"
+      @ok="submitCallback"
+    ></bus-meeting-room-schedule-confirm>
+  </j-modal>
+</template>
+
+<script>
+import BusMeetingRoomScheduleConfirm from "./BusMeetingRoomScheduleConfirm";
+export default {
+  name: "BusMarketCouponsCashUsedListModal",
+  components: {
+    BusMeetingRoomScheduleConfirm,
+  },
+  props: {
+    couponsId: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    return {
+      title: "",
+      width: 1200,
+      visible: false,
+      disableSubmit: false,
+      // eventId:'',
+    };
+  },
+  methods: {
+    add() {
+      this.visible = true;
+    },
+    edit(record) {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.modalBusMeetingRoomScheduleConfirmModal.edit(record);
+      });
+    },
+    close() {
+      this.$emit("close");
+      this.visible = false;
+    },
+    handleOk() {
+      this.$refs.modalBusMeetingRoomScheduleConfirmModal.submitForm();
+    },
+    submitCallback() {
+      this.$emit("ok");
+    },
+    handleCancel() {
+      this.close();
+    },
+  },
+};
+</script>

+ 228 - 0
src/views/markets/modules/meetingRoomSchedule/BusMeetingRoomScheduleEditForm.vue

@@ -0,0 +1,228 @@
+<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="name"
+            >
+              <a-input
+                v-model="model.name"
+                placeholder="请输入公司名称"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="会议主题"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="theme"
+            >
+              <a-input
+                v-model="model.theme"
+                placeholder="请输入会议主题"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="预定人姓名"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="destinedName"
+            >
+              <a-input
+                v-model="model.destinedName"
+                placeholder="请输入预定人姓名"
+                style="width: 100%"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="联系电话"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="mobile"
+            >
+              <a-input
+                v-model="model.mobile"
+                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: "BusMeetingRoomForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: { detailList: [{}] },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      labelCol2: {
+        xs: { span: 7 },
+        sm: { span: 10 },
+      },
+      wrapperCol2: {
+        xs: { span: 7 },
+        sm: { span: 11 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        name: [{ required: true, message: "请输入名称!" }],
+        theme: [{ required: true, message: "请输入会议主题!" }],
+        destinedName: [{ required: true, message: "请输入预定人姓名!" }],
+        mobile: [{ required: true, message: "请输入联系电话!" }],
+      },
+      url: {
+        add: "/business/busMeetingRoomSchedule/create",
+        edit: "/business/busMeetingRoomSchedule/edit",
+        queryById: "/business/busMeetingRoomSchedule/queryById",
+      },
+      meetingRoomList: [],
+      timeSpanList: [
+        { id: 1, name: "上午" },
+        { id: 2, name: "下午" },
+        { id: 3, name: "晚上" },
+      ],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    getAction("/business/busMeetingRoom/list", {
+      pageNo: 1,
+      pageSize: 100,
+      stauts: 1,
+    }).then((res) => {
+      if (res.success) {
+        this.meetingRoomList = res.result.records;
+      }
+    });
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+  },
+  methods: {
+    puls() {
+      this.model.detailList.push({});
+    },
+    remove(index) {
+      this.model.detailList.splice(index, 1);
+    },
+    add() {
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      delete this.model.createTime;
+      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);
+                console.log(1);
+                that.$emit("ok", this.model);
+                // that.$parent.modalFormOk2(this.model);
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>
+<style scoped>
+.dynamic-delete-button {
+  cursor: pointer;
+  position: relative;
+  top: 10px;
+  margin-left: 5px;
+  font-size: 18px;
+  color: #1890ff;
+  transition: all 0.3s;
+}
+.dynamic-delete-button:hover {
+  color: #777;
+}
+.dynamic-delete-button[disabled] {
+  cursor: not-allowed;
+  opacity: 0.5;
+}
+</style>

+ 60 - 0
src/views/markets/modules/meetingRoomSchedule/BusMeetingRoomScheduleEditModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk($event)"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <bus-meeting-room-schedule-edit-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-meeting-room-schedule-edit-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusMeetingRoomScheduleEditForm from './BusMeetingRoomScheduleEditForm'
+  export default {
+    name: 'BusMeetingRoomModal',
+    components: {
+      BusMeetingRoomScheduleEditForm
+    },
+    data () {
+      return {
+        title:'',
+        width:1000,
+        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($event){
+        this.$emit('ok',$event);
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 324 - 0
src/views/markets/modules/meetingRoomSchedule/BusMeetingRoomScheduleForm.vue

@@ -0,0 +1,324 @@
+<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="name"
+            >
+              <a-input
+                v-model="model.name"
+                placeholder="请输入公司名称"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="会议主题"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="theme"
+            >
+              <a-input
+                v-model="model.theme"
+                placeholder="请输入会议主题"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="预定人姓名"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="destinedName"
+            >
+              <a-input
+                v-model="model.destinedName"
+                placeholder="请输入预定人姓名"
+                style="width: 100%"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="联系电话"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="mobile"
+            >
+              <a-input
+                v-model="model.mobile"
+                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-col :span="24">
+            <a-divider orientation="left">档期</a-divider>
+          </a-col>
+          <template v-for="(item, index) in model.detailList">
+            <a-col :span="7">
+              <a-form-model-item
+                label="会议室名称"
+                :labelCol="labelCol2"
+                :wrapperCol="wrapperCol2"
+                :prop="`detailList[${index}].meetingRoomId`"
+                :rules="[
+                  {
+                    required: true,
+                    message: '请选择会议室!',
+                    trigger: 'change',
+                  },
+                ]"
+              >
+                <a-select
+                  v-model="item.meetingRoomId"
+                  style="width: 100%"
+                  placeholder="会议室"
+                  :allowClear="true"
+                >
+                  <a-select-option
+                    v-for="(item, index) in meetingRoomList"
+                    :key="index"
+                    :value="item.id"
+                    >{{ item.name }}</a-select-option
+                  >
+                </a-select>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="7">
+              <a-form-model-item
+                label="开会日期"
+                :labelCol="labelCol2"
+                :wrapperCol="wrapperCol2"
+                :prop="`detailList[${index}].meetingDate`"
+                :rules="[
+                  {
+                    required: true,
+                    message: '请选择开会日期!',
+                    trigger: 'change',
+                  },
+                ]"
+              >
+                <j-date
+                  placeholder="请选择开始时间"
+                  v-model="item.meetingDate"
+                  style="width: 100%"
+                />
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="7">
+              <a-form-model-item
+                label="开会时段"
+                :labelCol="labelCol2"
+                :wrapperCol="wrapperCol2"
+                :prop="`detailList[${index}].timeSpan`"
+                :rules="[
+                  {
+                    required: true,
+                    message: '请选择开会时段!',
+                    trigger: 'change',
+                  },
+                ]"
+              >
+                <a-select
+                  v-model="item.timeSpan"
+                  style="width: 100%"
+                  placeholder="会议室"
+                  :allowClear="true"
+                >
+                  <a-select-option
+                    v-for="(item, index) in timeSpanList"
+                    :key="index"
+                    :value="item.id"
+                    >{{ item.name }}</a-select-option
+                  >
+                </a-select>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="2">
+              <a-icon
+                v-if="model.detailList.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="model.detailList.length > 1"
+                @click="() => remove(index)"
+              />
+            </a-col>
+          </template>
+        </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: "BusMeetingRoomForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: { detailList: [{}] },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      labelCol2: {
+        xs: { span: 7 },
+        sm: { span: 10 },
+      },
+      wrapperCol2: {
+        xs: { span: 7 },
+        sm: { span: 11 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        name: [{ required: true, message: "请输入名称!" }],
+        theme: [{ required: true, message: "请输入会议主题!" }],
+        destinedName: [{ required: true, message: "请输入预定人姓名!" }],
+        mobile: [{ required: true, message: "请输入联系电话!" }],
+      },
+      url: {
+        add: "/business/busMeetingRoomSchedule/create",
+        edit: "/business/busMeetingRoomSchedule/edit",
+        queryById: "/business/busMeetingRoomSchedule/queryById",
+      },
+      meetingRoomList: [],
+      timeSpanList: [
+        { id: 1, name: "上午" },
+        { id: 2, name: "下午" },
+        { id: 3, name: "晚上" },
+      ],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    getAction("/business/busMeetingRoom/list", {
+      pageNo: 1,
+      pageSize: 100,
+      stauts: 1,
+    }).then((res) => {
+      if (res.success) {
+        this.meetingRoomList = res.result.records;
+      }
+    });
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+  },
+  methods: {
+    puls() {
+      this.model.detailList.push({ });
+    },
+    remove(index) {
+      this.model.detailList.splice(index, 1);
+    },
+    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>
+<style scoped>
+.dynamic-delete-button {
+  cursor: pointer;
+  position: relative;
+  top: 10px;
+  margin-left: 5px;
+  font-size: 18px;
+  color: #1890ff;
+  transition: all 0.3s;
+}
+.dynamic-delete-button:hover {
+  color: #777;
+}
+.dynamic-delete-button[disabled] {
+  cursor: not-allowed;
+  opacity: 0.5;
+}
+</style>

+ 60 - 0
src/views/markets/modules/meetingRoomSchedule/BusMeetingRoomScheduleModal.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-meeting-room-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-meeting-room-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusMeetingRoomForm from './BusMeetingRoomScheduleForm'
+  export default {
+    name: 'BusMeetingRoomModal',
+    components: {
+      BusMeetingRoomForm
+    },
+    data () {
+      return {
+        title:'',
+        width:1000,
+        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>

+ 312 - 0
src/views/markets/modules/meetingRoomSchedule/meetingRoomScheduleDetail/meetingRoomScheduleDetailList.vue

@@ -0,0 +1,312 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-row :gutter="24">
+        <a-col :md="6" :sm="8">
+          <span
+            style="float: left; overflow: hidden"
+            class="table-page-search-submitButtons"
+          >
+            <a-button
+              @click="batchConfirm"
+              type="danger"
+              style="margin-left: 8px"
+              >批量确认</a-button
+            >
+            <a-button type="primary" style="margin-left: 8px" @click="batchDel"
+              >批量删除</a-button
+            >
+          </span>
+        </a-col>
+      </a-row>
+    </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 v-if="record.status == 0" @click="handleEdit(record)">确认</a>
+          <a-divider type="vertical" />
+          <a @click="handleDelete(record.id)">删除</a>
+        </span>
+      </a-table>
+    </div>
+
+    <!-- <bus-market-coupons-cash-used-generate-form-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></bus-market-coupons-cash-used-generate-form-modal> -->
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+// import BusMarketCouponsCashUsedGenerateFormModal from "./BusMarketCouponsCashUsedGenerateFormModal";
+import { httpAction, postAction } from "@/api/manage";
+
+export default {
+  name: "meetingRoomScheduleDetailList",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    // BusMarketCouponsCashUsedGenerateFormModal,
+  },
+  props: {
+    meetingRoomScheduleId: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    return {
+      description: "免房券领取使用表管理页面",
+      // 表头
+      columns: [
+        {
+          title: "会议室",
+          align: "center",
+          dataIndex: "meetingRoomName",
+        },
+        {
+          title: "会议主题",
+          align: "center",
+          dataIndex: "theme",
+        },
+
+        {
+          title: "开会日期",
+          align: "center",
+          dataIndex: "meetingDate",
+        },
+        {
+          title: "开会时段",
+          align: "center",
+          dataIndex: "timeSpan",
+          customRender: function (text) {
+            var msg = "";
+            if (text == 1) {
+              msg = "上午";
+            } else if (text == 2) {
+              msg = "下午";
+            } else if (text == 3) {
+              msg = "晚上";
+            }
+            return msg;
+          },
+        },
+        {
+          title: "状态",
+          align: "center",
+          dataIndex: "status",
+          customRender: function (text) {
+            return text == 0 ? "未确认" : "已确认";
+          },
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 80,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list:
+          "/business/busMeetingRoomScheduleDetail/list?meetingRoomScheduleId=" +
+          this.meetingRoomScheduleId,
+        delete: "/business/busMeetingRoomScheduleDetail/delete",
+        deleteBatch: "/business/busMeetingRoomScheduleDetail/deleteBatch",
+        exportXlsUrl: "/business/busMeetingRoomScheduleDetail/exportXls",
+        importExcelUrl: "business/busMeetingRoomScheduleDetail/importExcel",
+        confirmBatch: "/business/busMeetingRoomScheduleDetail/confirmBatch",
+      },
+      dictOptions: {},
+      superFieldList: [],
+    };
+  },
+  created() {
+    this.getSuperFieldList();
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    batchConfirm() {
+      if (!this.url.confirmBatch) {
+        this.$message.error("请设置url.confirmBatch!");
+        return;
+      }
+      if (this.selectedRowKeys.length <= 0) {
+        this.$message.warning("请选择一条记录!");
+        return;
+      } else {
+        // var ids = "";
+        // for (var a = 0; a < this.selectedRowKeys.length; a++) {
+        //   ids += this.selectedRowKeys[a] + ",";
+        // }
+        var that = this;
+        that.loading = true;
+        postAction(that.url.confirmBatch, { ids: this.selectedRowKeys })
+          .then((res) => {
+            if (res.success) {
+              that.$message.success(res.message);
+              that.loadData();
+              that.onClearSelected();
+              that.$emit("ok");
+            } else {
+              that.$message.warning(res.message);
+            }
+          })
+          .finally(() => {
+            that.loading = false;
+          });
+      }
+    },
+    handleEdit(item) {
+      var that = this;
+      postAction("/business/busMeetingRoomScheduleDetail/confirm", {
+        id: item.id,
+      })
+        .then((res) => {
+          if (res.success) {
+            that.$message.success(res.message);
+            item.status = 1;
+            that.$emit("ok");
+          } else {
+            that.$message.warning(res.message);
+          }
+        })
+        .finally(() => {});
+    },
+    initDictConfig() {},
+    getSuperFieldList() {
+      let fieldList = [];
+      fieldList.push({
+        type: "string",
+        value: "tenantId",
+        text: "关联租户",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "hotelId",
+        text: "关联酒店",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "couponsId",
+        text: "免房券id",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "code",
+        text: "券号",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "int",
+        value: "status",
+        text: "状态 0未领取 1已领取 2已使用 3已作废",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "userid",
+        text: "会员id",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "userName",
+        text: "姓名",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "roomNumber",
+        text: "房间号",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "checkedInNo",
+        text: "入住单号",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "mobile",
+        text: "手机号",
+        dictCode: "",
+      });
+      fieldList.push({ type: "date", value: "gainTime", text: "领取时间" });
+      fieldList.push({ type: "date", value: "usedTime", text: "使用时间" });
+      this.superFieldList = fieldList;
+    },
+    handleAdd() {
+      this.$refs.modalForm.add(this.ipagination.total, this.couponsId);
+      this.$refs.modalForm.title = "优惠券生成";
+      this.$refs.modalForm.disableSubmit = false;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 67 - 0
src/views/markets/modules/meetingRoomSchedule/meetingRoomScheduleDetail/meetingRoomScheduleDetailModal.vue

@@ -0,0 +1,67 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
+    @cancel="handleCancel"
+    cancelText="关闭"
+  >
+    <meeting-room-schedule-detail-list
+      :meetingRoomScheduleId="meetingRoomScheduleId"
+      ref="modalMeetingRoomScheduleDetailListModal"
+      @ok="submitCallback"
+    ></meeting-room-schedule-detail-list>
+  </j-modal>
+</template>
+
+<script>
+import meetingRoomScheduleDetailList from "./meetingRoomScheduleDetailList";
+export default {
+  name: "meetingRoomScheduleDetailListModal",
+  components: {
+    meetingRoomScheduleDetailList,
+  },
+  props: {
+    meetingRoomScheduleId: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    return {
+      title: "",
+      width: 1200,
+      visible: false,
+      disableSubmit: false,
+    };
+  },
+  methods: {
+    add() {
+      this.visible = true;
+    },
+    edit(record) {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.modalMeetingRoomScheduleDetailListModal.edit(record);
+      });
+    },
+    close() {
+      this.$emit("close");
+      this.visible = false;
+    },
+    handleOk() {
+      this.$refs.modalMeetingRoomScheduleDetailListModal.submitForm();
+    },
+    submitCallback() {
+      this.$emit("ok");
+      this.visible = false;
+    },
+    handleCancel() {
+      this.close();
+    },
+  },
+};
+</script>

+ 333 - 0
src/views/markets/modules/meetingRoomScheduleOrder/BusMeetingRoomScheduleEditForm.vue

@@ -0,0 +1,333 @@
+<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="orderNo"
+            >
+              <a-input
+                disabled
+                v-model="model.orderNo"
+                placeholder="请输入账单号"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="公司名称"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="name"
+            >
+              <a-input
+                disabled
+                v-model="model.name"
+                placeholder="请输入公司名称"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="会议主题"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="theme"
+            >
+              <a-input
+                disabled
+                v-model="model.theme"
+                placeholder="请输入会议主题"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="挂房账"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="payType"
+            >
+              <a-radio-group v-model="model.payType">
+                <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="amount"
+            >
+              <a-input-number
+                v-model="model.amount"
+                placeholder="请输入金额"
+                style="width: 100%"
+                :min="1"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24" v-if="model.payType == 2">
+            <a-form-model-item
+              label="入账人"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="settleRoomOrderNo"
+            >
+              <a-input
+                v-show="false"
+                v-model="model.settleRoomOrderNo"
+                placeholder="请输入入账人"
+                style="width: 100%"
+              />
+              <a @click="handleRoomOrder">请选择</a>
+            </a-form-model-item>
+          </a-col>
+
+          <a-col :span="24">
+            <a-divider orientation="left"> 支付方式 </a-divider>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="结账优惠"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="preferentialAmount"
+            >
+              <a-input-number
+                v-model="model.preferentialAmount"
+                placeholder="请输入结账优惠"
+                style="width: 100%"
+                :min="0"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="结账应收"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              {{ receiptsAmount }}
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="输入合计"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              {{ sumAmount }}
+            </a-form-model-item>
+          </a-col>
+          <a-col
+            :span="24"
+            v-for="(item, index) in paymentMethodList"
+            :key="index"
+          >
+            <a-form-model-item
+              :label="item.name"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              :prop="`paymentMethodList[${index}].amount`"
+            >
+              <a-input-number
+                v-model="item.amount"
+                style="width: 100%"
+                :min="0"
+              ></a-input-number>
+            </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: "BusMeetingRoomForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: { detailList: [{}] },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      labelCol2: {
+        xs: { span: 7 },
+        sm: { span: 10 },
+      },
+      wrapperCol2: {
+        xs: { span: 7 },
+        sm: { span: 11 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        payType: [{ required: true, message: "请输入挂房账!" }],
+        amount: [{ required: true, message: "请输入金额!" }],
+        // settleRoomOrderNo: [{ required: true, message: "请输入入账人!" }],
+      },
+      url: {
+        add: "/business/busMeetingRoomSchedule/create",
+        edit: "/business/busMeetingRoomSchedule/edit",
+        queryById: "/business/busMeetingRoomSchedule/queryById",
+        settle: "/business/busMeetingRoomSchedule/settle",
+      },
+      meetingRoomList: [],
+      timeSpanList: [
+        { id: 1, name: "上午" },
+        { id: 2, name: "下午" },
+        { id: 3, name: "晚上" },
+      ],
+      paymentMethodList: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+    receiptsAmount() {
+      var sum = this.model.amount - this.model.preferentialAmount;
+
+      return sum;
+    },
+    sumAmount() {
+      if (this.paymentMethodList && this.paymentMethodList.length > 0) {
+        return this.paymentMethodList.reduce(function (total, v) {
+          return total + v.amount;
+        }, 0);
+      } else {
+        return 0;
+      }
+    },
+  },
+  created() {
+    getAction("/business/busMeetingRoom/list", {
+      pageNo: 1,
+      pageSize: 100,
+      stauts: 1,
+    }).then((res) => {
+      if (res.success) {
+        this.meetingRoomList = res.result.records;
+      }
+    });
+    getAction("/business/busRoomPayType/queryList", {
+      pageNo: 1,
+      pageSize: 100,
+    }).then((res) => {
+      if (res.success) {
+        if (res.result && res.result.length > 0) {
+          res.result.forEach((item) => {
+            Object.assign(item, { amount: 0 });
+          });
+          this.paymentMethodList = res.result;
+          console.log("  this.paymentMethodList", this.paymentMethodList);
+        }
+      }
+    });
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+  },
+  methods: {
+    handleRoomOrder() {
+      this.$message.warning("房间订单功能暂未实现,请先选择挂房账否操作");
+    },
+    puls() {
+      this.model.detailList.push({});
+    },
+    remove(index) {
+      this.model.detailList.splice(index, 1);
+    },
+    add() {
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record, { preferentialAmount: 0 });
+      delete this.model.createTime;
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      // 触发表单验证
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          if (this.receiptsAmount > this.model.amount) {
+            this.$message.error("输入优惠金额不能大于订单金额");
+            return;
+          }
+          if (this.receiptsAmount != this.sumAmount) {
+            this.$message.error("输入必须等于结账应收金额");
+            return;
+          }
+          this.model.paymentMethodList = this.paymentMethodList;
+          that.confirmLoading = true;
+          let httpurl = this.url.settle;
+          let method = "post";
+          httpAction(httpurl, this.model, method)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.$emit("ok", this.model);
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>
+<style scoped>
+.dynamic-delete-button {
+  cursor: pointer;
+  position: relative;
+  top: 10px;
+  margin-left: 5px;
+  font-size: 18px;
+  color: #1890ff;
+  transition: all 0.3s;
+}
+.dynamic-delete-button:hover {
+  color: #777;
+}
+.dynamic-delete-button[disabled] {
+  cursor: not-allowed;
+  opacity: 0.5;
+}
+</style>

+ 60 - 0
src/views/markets/modules/meetingRoomScheduleOrder/BusMeetingRoomScheduleEditModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk($event)"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <bus-meeting-room-schedule-edit-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-meeting-room-schedule-edit-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusMeetingRoomScheduleEditForm from './BusMeetingRoomScheduleEditForm'
+  export default {
+    name: 'BusMeetingRoomModal',
+    components: {
+      BusMeetingRoomScheduleEditForm
+    },
+    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($event){
+        this.$emit('ok',$event);
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 8 - 10
src/views/markets/modules/memberCard/BusMemberCardForm.vue

@@ -218,20 +218,18 @@ export default {
     },
   },
   created() {
-    httpAction(
-      "/org.jeecg.modules.business/busMarketMember/list",
-      { pageNo: 1, pageSize: 100 },
-      "get"
-    ).then((res) => {
+    getAction("/org.jeecg.modules.business/busMarketMember/list", {
+      pageNo: 1,
+      pageSize: 100,
+    }).then((res) => {
       if (res.success) {
         this.gradeList = res.result.records;
       }
     });
-    httpAction(
-      "/business/busRoomPayType/queryList",
-      { pageNo: 1, pageSize: 100 },
-      "get"
-    ).then((res) => {
+    getAction("/business/busRoomPayType/queryList", {
+      pageNo: 1,
+      pageSize: 100,
+    }).then((res) => {
       if (res.success) {
         this.paymentMethodList = res.result;
       }

+ 322 - 31
src/views/settings/components/roomModules/goodList.vue

@@ -1,8 +1,8 @@
 <template>
     <div class="back">
         <div class="back-left">
-            <a-button @click="handleStockTypeModelManager(undefined,1)">添加分类</a-button>
-            <a-button style="margin-left: 30px;">单位设置</a-button>
+            <a-button @click="handleStockTypeModelManager('-1',1)">添加分类</a-button>
+            <a-button @click="unitVisible=true" style="margin-left: 30px;">单位设置</a-button>
             <a-tree class="draggable-tree" :tree-data="treeData" blockNode style="width: 400px;"
                 :replaceFields="{ children: 'children', title: 'name', key: 'id' }">
                 <div slot="title" slot-scope="item,key,children" style="display:flex; align-items: center; height: 100%; overflow: hidden;">
@@ -10,7 +10,13 @@
                     <div style="flex:1;height:1px;"></div>
                     <a-button style="font-size: 12px; padding: 0 5px;" type="link" v-show="item.parentId == 0" @click="handleStockTypeModelManager(item,1)">添加分类</a-button>
                     <a-button style="font-size: 12px; padding: 0 5px;" type="link" @click="handleStockTypeModelManager(item,2)">编辑</a-button>
-                    <a-button style="font-size: 12px; padding: 0 5px;" type="link" @click="() => { $message.success('删除--' + item.id) }">删除</a-button>
+                    <!-- <a-button style="font-size: 12px; padding: 0 5px;" type="link" @click="confirmDel(item.id)">删除</a-button> -->
+                    <a-popconfirm placement="topLeft" ok-text="是的" cancel-text="取消" @confirm="confirmDel(item.id)">
+                        <template slot="title">
+                        确定删除吗?
+                        </template>
+                        <a-button style="font-size: 12px; padding: 0 5px;" type="link">删除</a-button>
+                    </a-popconfirm>
                 </div>
             </a-tree>
         </div>
@@ -34,11 +40,11 @@
                                     <a-button type="primary" @click="handleAdd">新增商品</a-button>
                                 </span>
                                 <span style="float:left; overflow: hidden">
-                                    <a-button type="danger" @click="searchQuery">批量删除</a-button>
+                                    <a-button type="danger" @click="goodBatchDel">批量删除</a-button>
                                 </span>
                                 <span style="float:left; overflow: hidden;">
-                                    <a-button type="primary" style="background-color:coral;border: none"
-                                        @click="searchQuery">进退货</a-button>
+                                    <a-button :disabled="selectedRowKeys.length==0 || selectedRowKeys.length>1" type="primary" style="background-color:coral;border: none"
+                                        @click="goodsSet">进退货</a-button>
                                 </span>
                                 <span style="float:left; overflow: hidden">
                                     <a-button type="primary" style="background-color:seagreen;border: none"
@@ -50,30 +56,127 @@
                 </div>
                 <!-- 查询区域-END -->
                 <div>
-                    <a-table ref="table" size="middle" :scroll="{ x: true }" bordered rowKey="id" :columns="columns"
-                        :dataSource="dataSource" :pagination="ipagination" :loading="false" :rowSelection="{
+                    <a-table ref="table" size="middle" :scroll="{ x: '165%' }" bordered rowKey="id" :columns="columns"
+                        :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{
                             selectedRowKeys: selectedRowKeys,
                             onChange: onSelectChange,
                         }" class="j-table-force-nowrap" @change="handleTableChange">
-
+                        <span slot="state" slot-scope="record">
+                            {{record?'启用':'停用'}}
+                            <!-- {{record}} -->
+                        </span>
+                        <span slot="action" slot-scope="text, record">
+                            <a @click="handleEdit(record)">修改</a>
+                            <a-divider type="vertical" />
+                            <a @click="moreSet(record)">更多设置</a>
+                            <a-divider type="vertical" />
+                            <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                                <a>删除</a>
+                            </a-popconfirm>
+                        </span>
                     </a-table>
                 </div>
-                <!-- <room-layout-form ref="modalForm" @ok="modalFormOk"></room-layout-form> -->
+                <!-- 进退货弹窗 -->
+                <a-modal destroyOnClose title="进退货" closable :visible="goodsSetVisible" @ok="handleGoodOk" @cancel="handleGoodCancel"
+                 width="50%" >
+                 <a-space direction="vertical" style="width:100%" :size="'large'">
+                    <a-card title="商品信息" :bordered="true" >
+                        <a-row>
+                            <a-col :span="8">
+                                商品编号:{{goodsSetData.barCode}}
+                            </a-col>
+                            <a-col :span="8">
+                                商品名称:{{goodsSetData.name}}
+                            </a-col>
+                            <a-col :span="8">
+                                商品库存:{{goodsSetData.inventory}}
+                            </a-col>
+                        </a-row>
+                    </a-card>
+                    
+                    <a-radio-group name="radioGroup" :default-value="1" @change="goodChange">
+                        <a-radio :value="1">
+                            进货
+                        </a-radio>
+                        <a-radio :value="2">
+                            退货
+                        </a-radio>
+                    </a-radio-group>
+                    <a-row style="display:flex;align-items:center;">
+                        <a-col :span="1">
+                            数量
+                        </a-col>
+                        <a-col :span="4">
+                            <a-input-number v-model="goodsSetData.goodNum" :min="0" /> &nbsp;盘
+                        </a-col>
+                    </a-row>
+                    <a-row style="display:flex;justify-content:center;align-items:center;">
+                        <a-col :span="1">
+                            备注
+                        </a-col>
+                        <a-col :span="23">
+                            <a-input v-model="goodsSetData.remark" type="text" />
+                        </a-col>
+                    </a-row>
+                  </a-space>
+                </a-modal>
+                <!-- 进退货区域END -->
+                <!-- 更多设置弹窗 -->
+                <a-modal destroyOnClose title="详细设置" closable :visible="moreSetVisible" @ok="handleMoreSetOk" @cancel="()=>{moreSetVisible=false}"
+                 width="70%" >
+                    <a-card style="width:100%" :tab-list="tabListNoTitle" :active-tab-key="noTitleKey"
+                     @tabChange="key => onTabChange(key, 'noTitleKey')">
+                        <Commodity v-if="noTitleKey=='commodity'" />
+                        <GoodImg v-if="noTitleKey=='goodImg'" />
+                    </a-card>
+                </a-modal>
+                <room-layout-form ref="modalForm" @ok="modalFormOk"></room-layout-form>
                 <stock-type-model ref="stockTypeModel" @ok="onSave"></stock-type-model>
             </a-card>
         </div>
+        <!-- 单位设置区域 -->
+        <SetUnit :unitVisible="unitVisible" @center="handleCancel" />
     </div>
 
 </template>
 <script>
-import { tree } from '@/api/good'
+import { tree, delTree, goodBatchDel, goodSet } from '@/api/good'
 import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import roomLayoutForm from './goodStock/goods'
 import stockTypeModel from './stockTypeModel.vue'
+import Commodity from './moreSet/commodity.vue'
+import GoodImg from './moreSet/goodImg.vue';
+import { computed } from 'vue';
+import SetUnit from './setUnit/index.vue'
+
+
+const tabListNoTitle=[
+        {
+          key: 'commodity',
+          tab: '商品小程序设置',
+        },
+        {
+          key: 'goodImg',
+          tab: '商品图片',
+        },
+        {
+          key: 'project',
+          tab: '餐饮设置',
+        },
+        {
+          key: 'game',
+          tab: '娱乐设置',
+        },
+      ]
 export default {
     name: "goodList",
     mixins: [JeecgListMixin],
     components: {
-        stockTypeModel
+        stockTypeModel,
+        roomLayoutForm,
+        SetUnit,
+        Commodity,
+        GoodImg
       },
     data() {
         return {
@@ -97,9 +200,16 @@ export default {
                         },
                     ],
                 },],
+
+            key: 'tab1',
+            noTitleKey: 'commodity',
+
             checkedKeys: [''],
+            tabListNoTitle,
             selectedKeys: [],
             queryParam: {},
+            //单位对话框
+            unitVisible:false,
             // 分页参数
             ipagination: {
                 current: 1,
@@ -118,78 +228,127 @@ export default {
                     title: "商家",
                     align: "center",
                     dataIndex: "hotelName",
+                    customCell:() => {
+                        return {
+                        style: {
+                            wordWrap:'break-word',
+                            wordBreak:'break-all',
+                            whiteSpace:'normal',
+                            minHeight:'50px',
+                            width: '50px',
+                        }
+                        }
+                    }
                 },
                 {
                     title: "分类",
                     align: "center",
-                    dataIndex: "cover",
-
+                    dataIndex: "typeName",
+                    customCell:() => {
+                        return {
+                        style: {
+                            wordWrap:'break-word',
+                            wordBreak:'break-all',
+                            whiteSpace:'normal',
+                            minHeight:'50px',
+                            width: '50px',
+                        }
+                        }
+                    }
                 },
                 {
                     title: "单位",
                     align: "center",
-                    dataIndex: "name",
-
+                    dataIndex: "unitName",
+                    customCell:() => {
+                        return {
+                        style: {
+                            wordWrap:'break-word',
+                            wordBreak:'break-all',
+                            whiteSpace:'normal',
+                            minHeight:'50px',
+                            width: '50px',
+                        }
+                        }
+                    }
                 },
                 {
                     title: "条码",
                     align: "center",
-                    dataIndex: "marketPrice",
+                    dataIndex: "barCode",
                 },
                 {
                     title: "名称",
                     align: "center",
-                    dataIndex: "canLivePersonNum",
+                    dataIndex: "name",
                 },
                 {
                     title: "进价",
                     align: "center",
-                    dataIndex: "num",
+                    dataIndex: "bid",
                 },
                 {
                     title: "售价",
                     align: "center",
-                    dataIndex: "state",
+                    dataIndex: "sellingPrice",
 
                 },
 
                 {
                     title: "进货量",
                     align: "center",
-                    dataIndex: "appState",
+                    dataIndex: "purchases",
 
                 },
                 {
                     title: "销售量",
                     align: "center",
-                    dataIndex: "appState2",
+                    dataIndex: "salesVolume",
 
                 },
                 {
                     title: "库存量",
                     align: "center",
-                    dataIndex: "storeNum",
+                    dataIndex: "inventory",
 
                 },
                 {
                     title: "排序",
                     align: "center",
-                    dataIndex: "appState3",
+                    dataIndex: "sort",
 
                 },
                 {
-                    title: "操作",
-                    dataIndex: "action",
+                    title: "最近更新",
                     align: "center",
-                    fixed: "right",
-                    width: 147,
+                    dataIndex: "updateAt",
+
                 },
+                {
+                    title: '状态',
+                    dataIndex: 'appState',
+                    // key: 'address',
+                    scopedSlots: { customRender: "state" },
+                    align:'center'
+                },
+                {
+                    title: '操作',
+                    dataIndex: 'action',
+                    key: 'action',
+                    scopedSlots: { customRender: "action" },
+                    align:'center',
+                    fixed: "right",
+                    width: 200,
+                }
             ],
             url: {
                 // list: 'org.jeecg.modules.business/busMarketMember/list',
-                list: "/rooms/cesRoomLayout/list?hotelId",
-                delete: "/rooms/cesRoomLayout/remove",
-                deleteBatch: "/rooms/cesRoomLayout/deleteBatch",
+                list:'/rooms/cesGoods/list',
+                // list: "/rooms/cesRoomLayout/list?hotelId",
+                // delete: "/rooms/cesRoomLayout/remove",
+                delete:'/rooms/cesGoods/delete',
+                // deleteBatch: "/rooms/cesRoomLayout/deleteBatch",
+                deleteBatch:'/rooms/cesGoods/delBatch',
                 exportXlsUrl: "/rooms/cesRoomLayout/exportXls",
                 importExcelUrl:"rooms/cesRoomLayout/importExcel",
             },
@@ -201,6 +360,14 @@ export default {
                 order: "desc",
             },
             stockTypeVisible:false,
+            // 选中的数据
+            beforeTree:null,
+            goodsSetVisible:false,//进退货弹窗
+            moreSetVisible:false,//更多设置弹窗
+            goodsSetData:{
+                number:0,
+                type:1
+            }
         };
     },
     computed: {
@@ -212,9 +379,22 @@ export default {
     created() {
         this.loadTree();
     },
+    provide(){
+        return {
+            beforeTree:computed(() => this.beforeTree?this.beforeTree:{id:'0'}),
+            treeData:computed(()=> this.treeData),
+            dataSource:computed(()=> this.dataSource)
+        }
+    },
     methods: {
         handleStockTypeModelManager(item,type) {
             console.log(item, type)
+            this.beforeTree = null
+            if (item!='-1') {
+                this.beforeTree = item
+                this.beforeTree.editData = type ===2?true:false
+            }
+            console.log(this.beforeTree);
             this.$refs.stockTypeModel.title = type === 1 ?"新增":"修改"
             this.$refs.stockTypeModel.visible = true
         },
@@ -235,6 +415,117 @@ export default {
             console.log('onSelect', info);
             this.selectedKeys = selectedKeys;
         },
+        /**
+         * 保存成功
+         */
+        onSave(){
+            this.loadTree()
+        },
+        /**
+         * 删除
+         */
+        confirmDel(id){
+            delTree({id:id}).then(res=>{
+                if (res.code && res.code==200) {
+                    this.$message.success('删除成功')
+                    this.loadTree()
+                }
+            })
+        },
+        //批量删除
+        goodBatchDel(){
+            console.log(this.selectedRowKeys);
+            if (this.selectedRowKeys.length==0) {
+                this.$message.info('请先选择要删除的数据')
+                return
+            }
+            this.$confirm({
+                title: '提示',
+                content: '确认要删除吗',
+                okText: '确认',
+                cancelText: '取消',
+                onOk:(e)=>{
+                    return goodBatchDel({idStr:this.selectedRowKeys.toString()}).then(res=>{
+                        if (res.code && res.code==200) {
+                            this.$message.success(res.message)
+                            this.loadData();
+                        }else{
+                            this.$message.error(res.message)
+                        }
+                    })
+                }
+            });
+        },
+        //单位设置区域
+        handleOk(e) {
+            // this.confirmLoading = true;
+            // setTimeout(() => {
+            //     this.visible = false;
+            //     this.confirmLoading = false;
+            // }, 2000);
+            this.unitVisible=false
+        },
+        handleCancel(e) {
+            console.log('Clicked cancel button',e);
+            this.unitVisible = false;
+        },
+        /**
+         * 进退货
+         */
+        goodsSet(){
+            this.goodsSetData = this.dataSource.filter(item=> item.id==this.selectedRowKeys.toString() )[0]
+            console.log(this.goodsSetData);
+            this.goodsSetVisible = true
+        },
+        goodChange(e){
+            console.log(e);
+            this.goodsSetData.type = e.target.value
+        },
+        //更多设置
+        moreSet(e){
+            console.log(e);
+            this.moreSetVisible = true
+        },
+        //更多设置确认
+        handleMoreSetOk(){
+
+        },
+        //更多设置切换卡片
+        onTabChange(key, type) {
+            console.log(key, type);
+            this[type] = key;
+        },
+
+        //进退货确认事件
+        handleGoodOk(){
+            console.log(this.goodsSetData);
+            if (!this.goodsSetData.type) {
+                this.goodsSetData.type = 1
+            }
+            let obj = {
+                hotelId:this.goodsSetData.hotelId,
+                goodId:this.goodsSetData.id,
+                type:this.goodsSetData.type,
+                goodNum:this.goodsSetData.goodNum,
+                remark:this.goodsSetData.remark?this.goodsSetData.remark:''
+            }
+            // this.goodsSetData.goodId = this.goodsSetData.id
+            goodSet(obj).then(res=>{
+                if (res.code && res.code==200) {
+                            this.$message.success(res.message)
+                            this.goodsSetVisible = false
+                            // this.goodsSetData = {}
+                            this.loadData();
+                        }else{
+                            this.$message.error(res.message)
+                        }
+            })
+
+        },
+        //进退货取消
+        handleGoodCancel(){
+            this.goodsSetVisible = false
+        }
     },
 };
 </script>

+ 60 - 0
src/views/settings/components/roomModules/goodStock/goods.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-market-member-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-market-member-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusMarketMemberForm from './goodsForm.vue'
+  export default {
+    name: 'BusMarketMemberModal',
+    components: {
+      BusMarketMemberForm
+    },
+    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>

+ 333 - 0
src/views/settings/components/roomModules/goodStock/goodsForm.vue

@@ -0,0 +1,333 @@
+<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="12" type='flex' justify="start">
+                    <a-form-model-item label="分类" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="">
+                        <a-cascader :defaultValue="arr" :options="treeData?treeData:[]" :field-names="{ label: 'name', value: 'id', children: 'children' }"
+                         placeholder="请选择" @change="onChange" />
+                    </a-form-model-item>
+                </a-col>
+            </a-row>
+            <a-row>
+                <a-col :span="12" type='flex' justify="start">
+                    <a-form-model-item style="width:100%" label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="">
+                        <a-select :value="model.goodUnit?model.goodUnit:'-1'" placeholder='请选择商品单位' @change="handleChange">
+                            <a-select-option value="-1">{{"请选择商品单位"}}</a-select-option>
+                            <a-select-option v-for="item in unitData" :unitName='item.name' :key="item.id" :value="item.id">
+                                {{item.name}}
+                            </a-select-option>
+                        </a-select>
+                    </a-form-model-item>
+                </a-col>
+            </a-row>
+            <a-row>
+                <a-col :span="12">
+                    <a-form-model-item label="条码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="">
+                        <a-input v-model="model.barCode" placeholder="请填写条码" />
+                    </a-form-model-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-model-item label="名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="">
+                        <a-input v-model="model.name" placeholder="请填写名称" />
+                    </a-form-model-item>
+                </a-col>
+            </a-row>
+            <a-row>
+                <a-col :span="12">
+                    <a-form-model-item label="进价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="">
+                        <a-input-number v-model="model.bid" :min="0" />
+                    </a-form-model-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-model-item label="售价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="">
+                        <a-input-number v-model="model.sellingPrice" :min="0" />
+                    </a-form-model-item>
+                </a-col>
+            </a-row>
+            <a-row>
+                <a-col :span="12">
+                    <a-form-model-item label="进货量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="">
+                        <a-input-number v-model="model.purchases" :min="0" />
+                    </a-form-model-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-model-item label="销售量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="">
+                        <a-input-number v-model="model.salesVolume" :min="0" />
+                    </a-form-model-item>
+                </a-col>
+            </a-row>
+            <a-row>
+                <a-col :span="12">
+                    <a-form-model-item label="库存量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="">
+                        <a-input-number v-model="model.inventory" :min="0" />
+                    </a-form-model-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-model-item label="是否启用" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="">
+                        <a-switch :checked="model.appState" @change="switchState" ></a-switch>
+                    </a-form-model-item>
+                </a-col>
+            </a-row>
+            <a-row>
+                <a-col :span="16" type='flex' justify="start">
+                    <a-form-model-item style="width:100%" label="启用库存模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="">
+                        <a-switch></a-switch>
+                    </a-form-model-item>
+                </a-col>
+            </a-row>
+            <!-- <a-form-model-item label="房型名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
+                    <a-input v-model="model.name" placeholder="请输入房型名称"></a-input>
+                </a-form-model-item>
+                <a-form-model-item label="门市价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="marketPrice">
+                    <a-input-number style="width:50%;" v-model="model.marketPrice" :min="1"  placeholder="请填写门市价"/>
+                </a-form-model-item>
+
+                <a-form-model-item label="可住人数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="canLivePersonNum">
+                    <a-input-number style="width:50%;" v-model="model.canLivePersonNum" :min="0"  placeholder="请填写可住人数"/>
+                </a-form-model-item>
+
+                <a-form-model-item label="早餐数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="breakfastNum">
+                    <a-input-number style="width:50%;" v-model="model.breakfastNum" :min="0"  placeholder="请填写早餐数量"/>
+                </a-form-model-item>
+
+                <a-form-model-item label="中餐数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lunchNum">
+                    <a-input-number style="width:50%;" v-model="model.lunchNum" :min="0"  placeholder="请填写中餐数量"/>
+                </a-form-model-item>
+
+                <a-form-model-item label="晚餐数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dinnerNum">
+                    <a-input-number style="width:50%;" v-model="model.dinnerNum" :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 { getUnit } from '@/api/good'
+
+export default {
+    name: "BusMarketMemberForm",
+    inject:['treeData', 'dataSource'],
+    props: {
+        disabled: {
+            type: Boolean,
+            default: false,
+            required: false,
+        },
+    },
+    data() {
+        return {
+            unitData:[],
+            options: [{
+                label: '张三',
+                value: '1'
+            }],
+            model: {
+                id: "",
+                hotelId: 0,
+                goodType: '',
+                goodUnit: '',
+                barCode: '',
+                bid:null,
+                name:'',
+                sellingPrice:'',
+                purchases:null,
+                salesVolume:null,
+                inventory:null,
+                appState:null
+            },
+            labelCol: {
+                xs: {
+                    span: 24
+                },
+                sm: {
+                    span: 5
+                },
+            },
+            wrapperCol: {
+                xs: {
+                    span: 24
+                },
+                sm: {
+                    span: 16
+                },
+            },
+            confirmLoading: false,
+            validatorRules: {
+                name: [{
+                    required: true,
+                    message: "请输入房型!"
+                }],
+                marketPrice: [{
+                    required: true,
+                    message: "请填写门市价!"
+                }],
+                canLivePersonNum: [{
+                    required: true,
+                    message: "请填写可住人数!"
+                }],
+                breakfastNum: [{
+                    required: true,
+                    message: "请填写早餐数量!"
+                }],
+                lunchNum: [{
+                    required: true,
+                    message: "请填写中餐数量!"
+                }],
+                dinnerNum: [{
+                    required: true,
+                    message: "请填写晚餐数量!"
+                }],
+            },
+            url: {
+                // add: "/rooms/cesRoomLayout/save",
+                add:'/rooms/cesGoods/create',
+                // edit: "/rooms/cesRoomLayout/modify",
+                edit:'/rooms/cesGoods/modify',
+                delete:'/rooms/cesGoods/delete'
+                // queryById: "/rooms/cesRoomLayout/queryById",
+            },
+            iconChooseVisible: false,
+            roomPlans: [],
+            members: [],
+            arr:[]
+        };
+    },
+    computed: {
+        formDisabled() {
+            return this.disabled;
+        },
+    },
+    created() {
+        var _info = JSON.parse(localStorage.getItem("storeInfo"));
+        if (_info) {
+            this.model.hotelId = _info.id;
+            this.initData();
+            this.getData()
+        }
+        console.log(111111111111,this.treeData);
+        this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+        onChange(e) {
+            console.log(e);
+            this.model.goodType = e[e.length-1]
+            console.log(this.model.goodType);
+        },
+        handleChange(e, options) {
+            console.log(e);
+            this.model.goodUnit = e
+        },
+        initData() {
+            getRoomPlans(this.model.hotelId, null).then((res) => {
+                if (res.success) {
+                    this.roomPlans = res.result;
+                }
+            });
+
+        },
+        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);
+        },
+        //筛选分类数组
+        filterType(array, id){
+            let arr = []
+            array.forEach((item, index)=>{
+                if (item.id==id) {
+                    this.arr[0] = item.parentId
+                    this.arr[1] = item.id
+                    return
+                }else if(Array.isArray(item.children) && item.children){
+                    this.filterType(item.children, id)
+                }
+            })
+        },
+        edit(record) {
+            console.log(22222222,record);
+            // this.model = Object.assign({}, record);
+            this.model = JSON.parse(JSON.stringify(record))
+            
+            console.log(this.filterType(this.treeData, record.goodType));
+            console.log(this.arr);
+            this.visible = true;
+            getSelectList({
+                id: this.model.id
+            }).then((res) => {
+                if (res.success) {
+                    this.members = res.result;
+                }
+            });
+        },
+        submitForm() {
+            const that = this;
+            // 触发表单验证
+            debugger
+            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";
+                    }
+                    if (this.model.payFlag == 0) {
+                        this.model.payAmount = 0;
+                    }
+                    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;
+                        });
+                }
+            });
+        },
+        getData(){
+            getUnit({pageNo:1,pageSize:1000}).then(res=>{
+                console.log(res);
+                if (res.code && res.code==200) {
+                    this.unitData = res.result.records
+                }
+            })
+        },
+        switchState(e){
+            console.log('这是滑动按钮触发',e);
+            this.model.appState = e
+        }
+    },
+};
+</script>
+
+<style scoped>
+.avatar-uploader>.ant-upload {
+    width: 104px;
+    height: 104px;
+}
+</style>

+ 271 - 0
src/views/settings/components/roomModules/moreSet/commodity.vue

@@ -0,0 +1,271 @@
+<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="12" type='flex' justify="start">
+                    <a-form-model-item label="app是否上架" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="">
+                        <a-switch :checked="model.appState" @change="switchState" ></a-switch>
+                    </a-form-model-item>
+                </a-col>
+            </a-row>
+            <a-row>
+                <a-col :span="12" type='flex' justify="start">
+                    <a-form-model-item style="width:100%" label="能否储值卡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="">
+                        <a-switch :checked="model.appState" @change="switchState" ></a-switch>
+                    </a-form-model-item>
+                </a-col>
+            </a-row>
+            <a-row>
+                <a-col :span="12">
+                    <a-form-model-item label="能否积分支付" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="">
+                        <a-switch :checked="model.appState" @change="switchState" ></a-switch>
+                    </a-form-model-item>
+                </a-col>
+            </a-row>
+            <a-row>
+                <a-col :span="12">
+                    <a-form-model-item label="积分支付价格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="">
+                        <a-input-number v-model="model.bid" :min="0" />
+                    </a-form-model-item>
+                </a-col>
+            </a-row>
+            <a-row>
+                <a-col :span="24">
+                    <a-form-model-item label="描述" :labelCol="{span:'2',offset:'0'}" :wrapperCol="wrapperCol" prop="">
+                        <j-editor />
+                    </a-form-model-item>
+                </a-col>
+            </a-row>
+        </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 { getUnit } from '@/api/good'
+
+export default {
+    name: "BusMarketMemberForm",
+    inject:['treeData', 'dataSource'],
+    props: {
+        disabled: {
+            type: Boolean,
+            default: false,
+            required: false,
+        },
+    },
+    data() {
+        return {
+            unitData:[],
+            options: [{
+                label: '张三',
+                value: '1'
+            }],
+            model: {
+                id: "",
+                hotelId: 0,
+                goodType: '',
+                goodUnit: '',
+                barCode: '',
+                bid:null,
+                name:'',
+                sellingPrice:'',
+                purchases:null,
+                salesVolume:null,
+                inventory:null,
+                appState:null
+            },
+            labelCol: {
+                xs: {
+                    span: 24
+                },
+                sm: {
+                    span: 5
+                },
+            },
+            wrapperCol: {
+                xs: {
+                    span: 24
+                },
+                sm: {
+                    span: 16
+                },
+            },
+            confirmLoading: false,
+            validatorRules: {
+                name: [{
+                    required: true,
+                    message: "请输入房型!"
+                }],
+                marketPrice: [{
+                    required: true,
+                    message: "请填写门市价!"
+                }],
+                canLivePersonNum: [{
+                    required: true,
+                    message: "请填写可住人数!"
+                }],
+                breakfastNum: [{
+                    required: true,
+                    message: "请填写早餐数量!"
+                }],
+                lunchNum: [{
+                    required: true,
+                    message: "请填写中餐数量!"
+                }],
+                dinnerNum: [{
+                    required: true,
+                    message: "请填写晚餐数量!"
+                }],
+            },
+            url: {
+                // add: "/rooms/cesRoomLayout/save",
+                add:'/rooms/cesGoods/create',
+                // edit: "/rooms/cesRoomLayout/modify",
+                edit:'/rooms/cesGoods/modify',
+                delete:'/rooms/cesGoods/delete'
+                // queryById: "/rooms/cesRoomLayout/queryById",
+            },
+            iconChooseVisible: false,
+            roomPlans: [],
+            members: [],
+            arr:[]
+        };
+    },
+    computed: {
+        formDisabled() {
+            return this.disabled;
+        },
+    },
+    created() {
+        var _info = JSON.parse(localStorage.getItem("storeInfo"));
+        if (_info) {
+            this.model.hotelId = _info.id;
+            this.initData();
+            this.getData()
+        }
+        console.log(111111111111,this.treeData);
+        this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+        onChange(e) {
+            console.log(e);
+            this.model.goodType = e[e.length-1]
+            console.log(this.model.goodType);
+        },
+        handleChange(e, options) {
+            console.log(e);
+            this.model.goodUnit = e
+        },
+        initData() {
+            getRoomPlans(this.model.hotelId, null).then((res) => {
+                if (res.success) {
+                    this.roomPlans = res.result;
+                }
+            });
+
+        },
+        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);
+        },
+        //筛选分类数组
+        filterType(array, id){
+            let arr = []
+            array.forEach((item, index)=>{
+                if (item.id==id) {
+                    this.arr[0] = item.parentId
+                    this.arr[1] = item.id
+                    return
+                }else if(Array.isArray(item.children) && item.children){
+                    this.filterType(item.children, id)
+                }
+            })
+        },
+        edit(record) {
+            console.log(22222222,record);
+            // this.model = Object.assign({}, record);
+            this.model = JSON.parse(JSON.stringify(record))
+            
+            console.log(this.filterType(this.treeData, record.goodType));
+            console.log(this.arr);
+            this.visible = true;
+            getSelectList({
+                id: this.model.id
+            }).then((res) => {
+                if (res.success) {
+                    this.members = res.result;
+                }
+            });
+        },
+        submitForm() {
+            const that = this;
+            // 触发表单验证
+            debugger
+            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";
+                    }
+                    if (this.model.payFlag == 0) {
+                        this.model.payAmount = 0;
+                    }
+                    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;
+                        });
+                }
+            });
+        },
+        getData(){
+            getUnit({pageNo:1,pageSize:1000}).then(res=>{
+                console.log(res);
+                if (res.code && res.code==200) {
+                    this.unitData = res.result.records
+                }
+            })
+        },
+        switchState(e){
+            console.log('这是滑动按钮触发',e);
+            this.model.appState = e
+        }
+    },
+};
+</script>
+
+<style scoped>
+.avatar-uploader>.ant-upload {
+    width: 104px;
+    height: 104px;
+}
+</style>

+ 87 - 0
src/views/settings/components/roomModules/moreSet/goodImg.vue

@@ -0,0 +1,87 @@
+<template>
+  <div class="clearfix">
+        <a-row>
+            <a-col>商品大图</a-col>
+            <a-col>
+                <a-upload action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
+                list-type="picture-card"
+                :file-list="fileList"
+                @preview="handlePreview"
+                @change="handleChange">
+                <div v-if="fileList.length < 8">
+                    <a-icon type="plus" />
+                    <div class="ant-upload-text">
+                    Upload
+                    </div>
+                </div>
+                </a-upload>
+            </a-col>
+        </a-row>
+        <a-row>
+            <a-col>图片</a-col>
+            <a-col>
+                <a-upload action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
+                list-type="picture-card"
+                :file-list="fileList"
+                @preview="handlePreview"
+                @change="handleChange">
+                <div v-if="fileList.length < 8">
+                    <a-icon type="plus" />
+                    <div class="ant-upload-text">
+                    Upload
+                    </div>
+                </div>
+                </a-upload>
+            </a-col>
+        </a-row>
+    <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
+      <img alt="example" style="width: 100%" :src="previewImage" />
+    </a-modal>
+  </div>
+</template>
+<script>
+function getBase64(file) {
+  return new Promise((resolve, reject) => {
+    const reader = new FileReader();
+    reader.readAsDataURL(file);
+    reader.onload = () => resolve(reader.result);
+    reader.onerror = error => reject(error);
+  });
+}
+export default {
+  data() {
+    return {
+      previewVisible: false,
+      previewImage: '',
+      fileList: [],
+    };
+  },
+  methods: {
+    handleCancel() {
+      this.previewVisible = false;
+    },
+    async handlePreview(file) {
+      if (!file.url && !file.preview) {
+        file.preview = await getBase64(file.originFileObj);
+      }
+      this.previewImage = file.url || file.preview;
+      this.previewVisible = true;
+    },
+    handleChange({ fileList }) {
+      this.fileList = fileList;
+    },
+  },
+};
+</script>
+<style>
+/* you can make up upload button and sample style by using stylesheets */
+.ant-upload-select-picture-card i {
+  font-size: 32px;
+  color: #999;
+}
+
+.ant-upload-select-picture-card .ant-upload-text {
+  margin-top: 8px;
+  color: #666;
+}
+</style>

+ 273 - 0
src/views/settings/components/roomModules/setUnit/index.vue

@@ -0,0 +1,273 @@
+<template>
+  <div>
+    <a-modal destroyOnClose title="单位设置" :footer='null' closable :visible="unitVisible" @cancel="unitCancel" width="70%" >
+        <a-space direction="vertical" style="width:100%">
+            <a-space>
+                <a-input v-model="queryParam.name" placeholder="单位名称" /><a-button @click="searchQuery" type="primary">查询</a-button>
+                <a-button type="primary" @click="addUnit">新增</a-button>
+                <a-button type="primary" @click="batchDelUnit">批量删除</a-button>
+            </a-space>
+            <a-table rowKey="id" :columns="columns" :data-source="dataSource" :row-selection="rowSelection"
+             :pagination="ipagination" @change="handleTableChange" :loading="loading">
+                <span slot="state" slot-scope="record">
+                    {{record?'启用':'停用'}}
+                    <!-- {{record}} -->
+                </span>
+                <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>
+                </span>
+            </a-table>
+        </a-space>
+    </a-modal>
+    <!-- 新增和修改弹窗 -->
+    <a-modal destroyOnClose :title="titleUnit" :confirm-loading="confirmLoading" closable :visible="addVisible" width="70%" @ok="handleOk" @cancel="handleCancel">
+        <a-form-model ref="ruleForm" :model="ruleForm" :rules="rules" v-bind="layout">
+            <a-form-model-item has-feedback label="名称" prop="name">
+                <a-input v-model="ruleForm.name" autocomplete="off" />
+            </a-form-model-item>
+            <a-form-model-item has-feedback label="是否启用" prop="">
+                <a-switch :defaultChecked="ruleForm.state" @change="switchState" />
+            </a-form-model-item>
+        </a-form-model>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import { getUnit, addUnit, editUnit, delUnit, batchDelUnit } from '@/api/good'
+const columns = [
+  {
+    title: '商家',
+    dataIndex: 'name',
+    key: 'name',
+    align:'center'
+  },
+  {
+    title: '单位名称',
+    dataIndex: 'name',
+    key: 'age',
+    align:'center'
+  },
+  {
+    title: '最近更新',
+    dataIndex: 'updateAt',
+    key: 'updateAt',
+    align:'center'
+  },
+  {
+    title: '状态',
+    dataIndex: 'state',
+    // key: 'address',
+    scopedSlots: { customRender: "state" },
+    align:'center'
+  },
+  {
+    title: '操作',
+    dataIndex: 'action',
+    key: 'action',
+    scopedSlots: { customRender: "action" },
+    align:'center'
+  },
+];
+const rowSelection = {
+  onChange: (selectedRowKeys, selectedRows) => {
+    console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
+  },
+  onSelect: (record, selected, selectedRows) => {
+    console.log(record, selected, selectedRows);
+    console.log(this.delDataArr);
+  },
+  onSelectAll: (selected, selectedRows, changeRows) => {
+    console.log(selected, selectedRows, changeRows);
+  },
+};
+const validatePass = (rule, value, callback) => {
+    //   if (value === '') {
+    //     callback(new Error('Please input the password'));
+    //   } else {
+    //     if (this.ruleForm.checkPass !== '') {
+    //       this.$refs.ruleForm.validateField('checkPass');
+    //     }
+        // callback();
+    //   }
+    };
+export default {
+    props:{
+        unitVisible:{
+            type:Boolean
+        }
+    },
+    mixins:[JeecgListMixin],
+    data(){
+        return{
+            queryParam:{},
+            columns,
+            dataSource:[],
+            titleUnit:'添加',
+            // rowSelection,
+            page:1,
+            pageSize:10,
+            addVisible:false,
+            ruleForm:{
+                name:'',
+                checked:true
+            },
+            rules:{
+                name: [{ required: true, message: "名称不能为空!" }],
+                state: [{ validator:validatePass}],
+            },
+            layout: {
+                labelCol: { span: 4 },
+                wrapperCol: { span: 14 },
+            },
+            confirmLoading:false,
+            hotelId:null,
+            editUnitData:{},
+            delDataArr:[],
+            //分页参数
+            ipagination: {
+                current: 1,
+                pageSize: 10,
+                pageSizeOptions: ["10", "20", "30"],
+                showTotal: (total, range) => {
+                return range[0] + "-" + range[1] + " 共" + total + "条";
+                },
+                showQuickJumper: true,
+                showSizeChanger: true,
+                total: 0,
+            },
+            url:{
+                list:'/rooms/cesGoodsUnit/list'
+            }
+        }
+    },
+    created(){
+
+    },
+    mounted(){
+        this.getData()
+        this.hotelId = JSON.parse(localStorage.getItem('storeInfo')).id
+    },
+    computed:{
+        rowSelection(){
+            return {
+                onChange: (selectedRowKeys, selectedRows) => {
+                    console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
+                    if (selectedRows.length>0) {
+                        //获取选中数据的id
+                        this.delDataArr = selectedRows.map(i=> i.id).toString()
+                        console.log(this.delDataArr);
+                    }
+                },
+                onSelect: (record, selected, selectedRows) => {
+                    console.log(record, selected, selectedRows);
+                },
+                onSelectAll: (selected, selectedRows, changeRows) => {
+                    console.log(selected, selectedRows, changeRows);
+                },
+            }
+        }
+    },
+    methods:{
+        getData(){
+            getUnit({pageNo:this.page,pageSize:this.pageSize}).then(res=>{
+                console.log(res);
+                if (res.code && res.code==200) {
+                    this.dataSource = res.result.records
+                }
+            })
+        },
+        addUnit(){
+            this.ruleForm = {name:'', state:false}
+            this.addVisible = true
+            this.titleUnit = '添加'
+        },
+        unitCancel(){
+            this.$emit('center')
+            // this.unitVisible=false
+        },
+        handleEdit(e){
+            this.titleUnit = '修改'
+            this.ruleForm.name = e.name
+            this.ruleForm.state = e.state
+            this.editUnitData = e
+            this.addVisible = true
+            console.log(e);
+        },
+        handleDelete(e){
+            console.log(e);
+            delUnit({id:e}).then(res=>{
+                if (res.code && res.code==200) {
+                    this.$message.success(res.message)
+                    this.getData()
+                }else{
+                    this.$message.error(res.message)
+                }
+            })
+        },
+        handleOk(e) {
+            this.confirmLoading = true
+            if (this.titleUnit=='添加') {
+                addUnit({hotelId:this.hotelId, name:this.ruleForm.name, state:this.ruleForm.state}).then(res=>{
+                if (res.code && res.code==200) {
+                    this.$message.success(res.message)
+                    this.confirmLoading = false
+                    this.addVisible=false
+                    this.getData()
+                }else{
+                    this.$message.error(res.message)
+                }
+            })
+            }else{
+                this.editUnitData.name = this.ruleForm.name
+                this.editUnitData.state = this.ruleForm.state
+                editUnit(this.editUnitData).then(res=>{
+                    if (res.code && res.code==200) {
+                        this.$message.success(res.message)
+                        this.confirmLoading = false
+                        this.addVisible=false
+                    }else{
+                        this.$message.error(res.message)
+                    }
+                })
+            }
+        },
+        handleCancel(e) {
+            console.log('点击了取消');
+            this.addVisible = false;
+        },
+        switchState(e){
+            console.log(e);
+            this.ruleForm.state = e
+            console.log(this.ruleForm.state);
+        },
+        batchDelUnit(){
+            this.$confirm({
+                title: '提示',
+                content: '确认要删除吗',
+                okText: '确认',
+                cancelText: '取消',
+                onOk:(e)=>{
+                    console.log(e);
+                    return batchDelUnit({idsStr:this.delDataArr}).then(res=>{
+                        if (res.code && res.code==200) {
+                            this.$message.success(res.message)
+                            this.getData()
+                        }else{
+                            this.$message.error(res.message)
+                        }
+                    })
+                }
+            });
+        },
+    }
+}
+</script>
+
+<style>
+</style>

+ 88 - 36
src/views/settings/components/roomModules/stockTypeForm.vue

@@ -5,40 +5,42 @@
                 <a-form-model-item label="名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
                     <a-input v-model="model.name" placeholder="请输入名称"></a-input>
                 </a-form-model-item>
-                <a-form-model-item label="上级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="marketPrice">
-                    <a-select  style="width: 120px" v-model="model.canLivePersonNum" defaultValue="0">
-                        <a-select-option value ="0">{{"顶级目录"}}</a-select-option>
-                        <a-select-option v-for="d in selectData" :key="d.value">
+                <a-form-model-item label="上级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="">
+                    <a-select  style="width: 120px" :default-value="beforeTree.editData?beforeTree.parentId:beforeTree.id" @change="onChangeSelect" >
+                        <!-- :defaultValue='beforeTree.id' -->
+                        <a-select-option value="0">{{"顶级目录"}}</a-select-option>
+                        <a-select-option v-for="d in selectData" :key="d.value" :value="d.id">
                             {{ d.name }}
                         </a-select-option>
                     </a-select>
                 </a-form-model-item>
                 
                 <a-form-model-item label="快捷" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="canLivePersonNum">
-                    <a-switch default-checked @change="onChange"  v-model="model.canLivePersonNum" />
+                    <a-switch default-checked @change="onChange"  v-model="model.isQuick" />
                 </a-form-model-item>
 
                 <a-form-model-item label="是否启用" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="breakfastNum">
-                    <a-switch default-checked @change="onChange"  v-model="model.canLivePersonNum" />
+                    <a-switch default-checked @change="onChange"  v-model="model.state" />
                 </a-form-model-item>
 
                 <a-form-model-item label="应用范围" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lunchNum">
-                    <a-checkbox-group v-model="model.checkedList" :options="plainOptions" @change="onChange" />
+                    <!-- <a-checkbox-group :disabled='beforeTree.parentId!=0 && !beforeTree.editData' v-model="model.applyScope" :options="plainOptions" @change="onChange" /> -->
+                    <a-checkbox-group v-model="model.applyScope" :options="plainOptions" @change="onChange" />
                 </a-form-model-item>
-                <a-form-model-item v-show="model.checkedList.includes('2')" label="POS类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="posType">
+                <a-form-model-item v-show="model.applyScope.includes('2')" label="POS类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="posType">
                     <a-checkbox :indeterminate="indeterminatePos" :checked="posCheckAll" @change="onCheckAllChangePos">
                         全选
                     </a-checkbox>
-                    <a-checkbox-group v-model="model.postTypes" :options="posOptions" @change="onChangePos" />
+                    <a-checkbox-group :disabled='beforeTree.parentId==0?false:true' v-model="model.posType" :options="posOptions" @change="onChangePos" />
                 </a-form-model-item>
-                <a-form-model-item v-show="model.checkedList.includes('3')" label="娱乐类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="funType">
+                <a-form-model-item v-show="model.applyScope.includes('3')" label="娱乐类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="funType">
                     <a-checkbox :indeterminate="indeterminateFun" :checked="funCheckAll" @change="onCheckAllChangeFun">
                         全选
                     </a-checkbox>
-                    <a-checkbox-group v-model="model.funTypes" :options="funOptions" @change="onChangeFun" />
+                    <a-checkbox-group :disabled='beforeTree.parentId==0?false:true' v-model="model.funType" :options="funOptions" @change="onChangeFun" />
                 </a-form-model-item>
                 <a-form-model-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dinnerNum">
-                    <a-input-number style="width:50%;" v-model="model.dinnerNum" :min="0"  placeholder="请输入排序"/>
+                    <a-input-number style="width:50%;" v-model="model.sort" :min="0"  placeholder="请输入排序"/>
                 </a-form-model-item>
             </a-form-model>
 
@@ -50,10 +52,15 @@
 import { getRoomPlans, getSelectList } from "@/api/api";
 import { httpAction, getAction } from "@/api/manage";
 import { validateDuplicateValue } from "@/utils/util";
-
+import { tree } from '@/api/good'
 
 export default {
     name: "BusMarketMemberForm",
+    inject:{
+        beforeTree:{
+            default:{id:0}
+        }
+    },
     props: {
         disabled: {
 
@@ -86,16 +93,21 @@ export default {
             ],
             selectData:[],
             model: {
-                id: "",
-                hotelId: 0,
-                name: null,
-                marketPrice: null,
-                canLivePersonNum: true,
-                breakfastNum: 0,
-                lunchNum: 0,
-                checkedList: ["1"],
-                postTypes:[],
-                funTypes:[]
+                // id: "",
+                name: null, //名字
+                hotelId: 0, //酒店id
+                parentId: 0, //上级id
+                // marketPrice: null,
+                // canLivePersonNum: true,
+                // breakfastNum: 0,
+                isQuick:0, // 是否快捷
+                state:1, // 是否启用
+                // lunchNum: 0,
+                // checkedList: ["1"],
+                applyScope:['1'],//应用范围
+                posType:[], //应用范围 pos
+                funType:[], //应用范围 娱乐
+                sort:0
             },
             labelCol: {
                 xs: { span: 24 },
@@ -107,16 +119,17 @@ export default {
             },
             confirmLoading: false,
             validatorRules: {
-                name: [{ required: true, message: "请输入房型!" }],
-                marketPrice: [{ required: true, message: "请填写门市价!" }],
-                canLivePersonNum: [{ required: true, message: "请填写可住人数!" }],
-                breakfastNum: [{ required: true, message: "请填写早餐数量!" }],
-                lunchNum: [{ required: true, message: "请填写中餐数量!" }],
-                dinnerNum: [{ required: true, message: "请填写晚餐数量!" }],
+                name: [{ required: true, message: "请输入名称!" }],
+                marketPrice: [{ required: false, message: "请填写门市价!" }],
+                canLivePersonNum: [{ required: false, message: "请填写可住人数!" }],
+                breakfastNum: [{ required: false, message: "请填写早餐数量!" }],
+                lunchNum: [{ required: false, message: "请填写中餐数量!" }],
+                isQuick: [{required: false, message: ""}],
+                sort: [{ required: false, message: "请填写晚餐数量!" }],
             },
             url: {
-                add: "/rooms/cesRoomLayout/save",
-                edit: "/rooms/cesRoomLayout/modify",
+                add: "/rooms/cesStockType/create",
+                edit: "/rooms/cesStockType/modify",
                 queryById: "/rooms/cesRoomLayout/queryById",
             },
             iconChooseVisible: false,
@@ -135,9 +148,43 @@ export default {
             this.model.hotelId = _info.id;
             this.initData();
         }
+        console.log(this.beforeTree);
+        this.model.parentId = this.beforeTree.id
+        if (this.beforeTree && this.beforeTree.editData) {
+            this.model.name = this.beforeTree.name
+            // this.model.hotelId = this.beforeTree.hotelId
+            this.model.parentId = this.beforeTree.parentId
+            this.model.id = this.beforeTree.id
+            // this.model.hotelId = this.beforeTree
+            // this.model.hotelId = this.beforeTree
+            // this.model.hotelId = this.beforeTree
+            // this.model.hotelId = this.beforeTree
+        }
         this.modelDefault = JSON.parse(JSON.stringify(this.model));
+        this.getAlldata()
+    },
+    mounted(){
+        // console.log(this.beforeTree);
     },
     methods: {
+        /**
+         * 获取初始数据
+         */
+        getAlldata(){
+            tree().then(res=>{
+                if (res.success) {
+                    this.selectData = res.result;
+                }
+            })
+        },
+        /**
+         * 选择器选中时
+         */
+        onChangeSelect(val, options){
+            console.log(val);
+            console.log(options);
+            this.model.parentId = val
+        },
         onChangePos(checkedList){
             this.indeterminatePos = !!checkedList.length && checkedList.length < this.posOptions.length;
             this.posCheckAll = checkedList.length === this.posOptions.length;
@@ -149,29 +196,29 @@ export default {
         onChange(checkedList) {
            if(checkedList.length == 0){
               this.$message.error("应用范围必须选择一项!");
-              this.model.checkedList.push("1")
+              this.model.applyScope.push("1")
            }
          
         },
         onCheckAllChangePos(e) {   
-            this.model.postTypes = e.target.checked ? this.posOptions.map(v => v.value) : []
+            this.model.posType = e.target.checked ? this.posOptions.map(v => v.value) : []
             this.indeterminatePos = false
             this.posCheckAll = e.target.checked
             // Object.assign(this, {
             //     model:{
-            //         postTypes: e.target.checked ? this.posOptions.map(v => v.value) : []
+            //         posType: e.target.checked ? this.posOptions.map(v => v.value) : []
             //     },
             //     indeterminatePos: false,
             //     ,
             // });
         },
         onCheckAllChangeFun(e) {   
-            this.model.funTypes = e.target.checked ? this.funOptions.map(v => v.value) : []
+            this.model.funType = e.target.checked ? this.funOptions.map(v => v.value) : []
             this.indeterminateFun = false
             this.funCheckAll = e.target.checked
             // Object.assign(this, {
             //     model:{
-            //         funTypes: e.target.checked ? this.funOptions.map(v => v.value) : []
+            //         funType: e.target.checked ? this.funOptions.map(v => v.value) : []
             //     },
             //     indeterminateFun: false,
             //     funCheckAll: e.target.checked,
@@ -226,6 +273,11 @@ export default {
                     if (this.model.payFlag == 0) {
                         this.model.payAmount = 0;
                     }
+                    that.model.applyScope = that.model.applyScope.toString()
+                    that.model.posType = that.model.posType.toString()
+                    that.model.funType = that.model.funType.toString()
+                    that.model.isQuick = that.model.isQuick?true:false
+                    that.model.state = that.model.state?true:false
                     httpAction(httpurl, this.model, method)
                         .then((res) => {
                             if (res.success) {