Browse Source

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

DESKTOP-B78GIPM\admin 2 years ago
parent
commit
1c74a1e1d9

+ 43 - 1
src/api/roomBuildingApi.js

@@ -63,4 +63,46 @@ export function saveBatch(param) {
         method: 'post',
         data: param
     })
- }
+ }
+
+
+ /**
+ * 批量删除房间
+ * @param {Object} param 
+ * @returns 
+ */
+export function delBatch(param) { 
+    return axios({
+        url: '/rooms/cesRooms/delete',
+        method: 'delete',
+        data: param
+    })
+ }
+
+  /**
+ * 删除所有
+ * @param {Object} param 
+ * @returns 
+ */
+export function delAll(param) { 
+    return axios({
+        url: '/rooms/cesRooms/removeAll',
+        method: 'delete',
+        data: param
+    })
+ }
+
+   /**
+ * 编辑房间
+ * @param {Object} param 
+ * @returns 
+ */
+export function roomEdit(param) { 
+    return axios({
+        url: '/rooms/cesRooms/modify',
+        method: 'put',
+        data: param
+    })
+ }
+
+ 

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

@@ -76,7 +76,7 @@
         />
         <p>会议室设置</p>
       </div>
-      <div class="height-100" @click="toPage()">
+      <div class="height-100" @click="toPage('/tenant/marketinfo/meetingroomscheduleorder')">
         <img
           src="http://oss.qlan99.com/20210204/528927c30c854370a28085a02774b951.png"
           width="50"

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

+ 20 - 12
src/views/markets/modules/meetingRoomSchedule/BusMeetingRoomScheduleConfirm.vue

@@ -57,7 +57,7 @@
               style="float: left; overflow: hidden"
               class="table-page-search-submitButtons"
             >
-            <!--先不实现增加预定功能-->
+              <!--先不实现增加预定功能-->
               <!-- <a-button v-if="model.roomSchedule.billStatus==0"
                 @click="handleAdd"
                 type="danger"
@@ -123,8 +123,9 @@
             <a-divider type="vertical"
           /></template>
           <template v-if="record.status == 0">
-          <a @click="handleEdit(record)">修改</a>
-          <a-divider type="vertical" /></template>
+            <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" />
@@ -142,6 +143,10 @@
       :meetingRoomScheduleId="meetingRoomScheduleId"
       @ok="modalFormOk"
     ></meeting-room-schedule-detail-modal>
+    <bus-meeting-room-schedule-edit-modal-2
+      ref="modalForm2"
+      @ok="modalFormOk3"
+    ></bus-meeting-room-schedule-edit-modal-2>
   </a-card>
 </template>
 
@@ -151,7 +156,7 @@ import { mixinDevice } from "@/utils/mixin";
 import { JeecgListMixin } from "@/mixins/JeecgListMixin";
 import BusMeetingRoomScheduleEditModal from "./BusMeetingRoomScheduleEditModal";
 import meetingRoomScheduleDetailModal from "./meetingRoomScheduleDetail/meetingRoomScheduleDetailModal";
-
+import BusMeetingRoomScheduleEditModal2 from "@/views/markets/modules/meetingRoomScheduleOrder/BusMeetingRoomScheduleEditModal";
 import { httpAction, getAction, postAction } from "@/api/manage";
 
 export default {
@@ -160,6 +165,7 @@ export default {
   components: {
     BusMeetingRoomScheduleEditModal,
     meetingRoomScheduleDetailModal,
+    BusMeetingRoomScheduleEditModal2,
   },
   props: {
     couponsId: {
@@ -227,7 +233,8 @@ export default {
         },
       ],
       url: {
-        confirmBatch: "/business/busMeetingRoomScheduleDetail/confirmBatchByMeetingRoomScheduleId",
+        confirmBatch:
+          "/business/busMeetingRoomScheduleDetail/confirmBatchByMeetingRoomScheduleId",
       },
       dictOptions: {},
       superFieldList: [],
@@ -258,12 +265,12 @@ export default {
     },
   },
   methods: {
-    handleSettle(){
-      this.$message.error("结账功能暂无实现");
-    },
-    handleAdd(){
-
+    handleSettle(record) {
+      this.$refs.modalForm2.edit(record);
+      this.$refs.modalForm2.title = "结账";
+      this.$refs.modalForm2.disableSubmit = false;
     },
+    handleAdd() {},
     batchConfirm(record) {
       if (!this.url.confirmBatch) {
         this.$message.error("请设置url.confirmBatch!");
@@ -297,9 +304,10 @@ export default {
       this.dataSource = [Object.assign({}, record)];
       this.$emit("ok");
     },
-    modalFormOk(){
-
+    modalFormOk3() {
+      this.dataSource = this.dataSource[0].billStatus = 1;
     },
+    modalFormOk() {},
     add() {
       this.edit(this.modelDefault);
     },

+ 4 - 3
src/views/markets/modules/meetingRoomSchedule/BusMeetingRoomScheduleEditForm.vue

@@ -160,7 +160,7 @@ export default {
   },
   methods: {
     puls() {
-      this.model.detailList.push({ });
+      this.model.detailList.push({});
     },
     remove(index) {
       this.model.detailList.splice(index, 1);
@@ -170,6 +170,7 @@ export default {
     },
     edit(record) {
       this.model = Object.assign({}, record);
+      delete this.model.createTime;
       this.visible = true;
     },
     submitForm() {
@@ -191,8 +192,8 @@ export default {
             .then((res) => {
               if (res.success) {
                 that.$message.success(res.message);
-                console.log(1)
-                that.$emit("ok",this.model);
+                console.log(1);
+                that.$emit("ok", this.model);
                 // that.$parent.modalFormOk2(this.model);
               } else {
                 that.$message.warning(res.message);

+ 7 - 5
src/views/markets/modules/meetingRoomSchedule/meetingRoomScheduleDetail/meetingRoomScheduleDetailList.vue

@@ -194,18 +194,19 @@ export default {
         this.$message.warning("请选择一条记录!");
         return;
       } else {
-        var ids = "";
-        for (var a = 0; a < this.selectedRowKeys.length; a++) {
-          ids += this.selectedRowKeys[a] + ",";
-        }
+        // 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: ids })
+        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);
             }
@@ -224,6 +225,7 @@ export default {
           if (res.success) {
             that.$message.success(res.message);
             item.status = 1;
+            that.$emit("ok");
           } else {
             that.$message.warning(res.message);
           }

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

@@ -12,6 +12,7 @@
     <meeting-room-schedule-detail-list
       :meetingRoomScheduleId="meetingRoomScheduleId"
       ref="modalMeetingRoomScheduleDetailListModal"
+      @ok="submitCallback"
     ></meeting-room-schedule-detail-list>
   </j-modal>
 </template>

+ 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="0"
+              />
+            </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;
       }

+ 94 - 0
src/views/settings/components/roomModules/allDaysRoomFeeRule.vue

@@ -0,0 +1,94 @@
+
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="false">
+      <a-form-model
+        ref="form"
+        :model="model"
+        layout="horizontal"
+        :rules="validatorRules"
+        slot="detail"
+      >
+        <div class="item-wrapper">
+          <div class="wrapper-content">1、进店时间在</div>
+          <div class="wrapper-form-item">
+            <a-form-model-item
+              label=""
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="enterTime"
+            >
+              <a-time-picker
+                :open.sync="open1"
+                v-model="model.enterTime"
+                format="HH:mm"
+              >
+                <a-button
+                  slot="addon"
+                  size="small"
+                  type="primary"
+                  @click="open1 = false"
+                >
+                  确定
+                </a-button>
+              </a-time-picker>
+            </a-form-model-item>
+          </div>
+          <div class="wrapper-content">
+            之后的,算第二天退房(例如,如果是6点,那么当天6点之后开的房间就是第二天中午退房,0点到6点开房就是当天中午退房)。
+          </div>
+        </div>
+
+        <a-form-model-item
+          label=""
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          prop="ass"
+        >
+          <a-input v-model="model.ass"></a-input>
+        </a-form-model-item>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      labelCol: {
+        xs: { span: 0 },
+        sm: { span: 0 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 24 },
+      },
+      open1: false,
+      enterTime: "",
+      confirmLoading: false,
+      model: {
+        enterTime: null,
+        ass: null,
+      },
+      validatorRules: {
+        enterTime: [
+          {
+            required: true,
+            message: "进!",
+          },
+        ],
+        ass: [{ required: true, message: "测试" }],
+      },
+    };
+  },
+};
+</script>
+
+<style lang="css" scoped>
+.item-wrapper{
+    display: flex;
+    align-items: center;
+    height: 50px;
+}
+</style>

+ 69 - 8
src/views/settings/components/roomModules/roomGen.vue

@@ -31,9 +31,9 @@
             placeholder="请选择楼栋"
             v-model="buildingId"
             option-filter-prop="children"
-            @change="floorChange"
+            @change="onBuildChange"
           >
-            <a-select-option v-for="item in buildingTreeData" :key="item.id">
+            <a-select-option v-for="item in buildingTreeData" :key="item.id" >
               {{ item.name }}
             </a-select-option>
           </a-select>
@@ -108,6 +108,7 @@
               style="margin-left: 5px"
             />
           </div>
+          <div style="color:red;" v-if="isExistNames(item.name)">名称已存在</div>
           <div
             style="display: flex;justify-content: start;margin: 20px;flex-wrap: wrap;"
           >
@@ -116,7 +117,8 @@
               :key="indexs"
               style="width: 25%; margin-top: 10px"
             >
-              <input :value="room.name" style="width: 50%; margin: auto" />
+              <input v-model="room.name" style="width: 50%; margin: auto" />
+              
               <a-button
                 @click="delRoom(index, indexs)"
                 type="danger"
@@ -125,7 +127,9 @@
                 icon="minus"
                 style="margin-left: 5px"
               />
+              <div style="color:red;" v-if="repeatName(item.children,indexs)">房名重复</div>
             </div>
+            
           </div>
           <div>
             <a-button
@@ -240,6 +244,7 @@ export default {
   },
   data() {
     return {
+      floorNames:[],
         saveLoading: false,
       myArray: [
         {
@@ -314,6 +319,12 @@ export default {
   },
 
   methods: {
+    onBuildChange() {
+      let bIndex = this.buildingTreeData.findIndex(s => s.id == this.buildingId)
+      let currentFloorNames = (this.buildingTreeData[bIndex].children||[]).map(s => s.name)
+      this.floorNames = currentFloorNames
+      // this.roomTree = JSON.parse(JSON.stringify(this.roomTree))
+    },
     delLayoutRoom(item, layoutIndex, roomIndex) {
         this.roomTree[item.floorIndex].children.push({
             checked: false,
@@ -375,7 +386,38 @@ export default {
         this.$message.error("房间数不正确");
         return;
       }
-
+      let errMsg = '';
+      
+      for(let i =0;i<this.roomTree.length;i++) {
+        let s = this.roomTree[i]
+        if(this.isExistNames(s.name)) {
+          errMsg = '楼层名称有重复';
+          break;
+        }
+      }
+      if(errMsg == '') {
+        for(let i =0;i<this.roomTree.length;i++) {
+        let s = this.roomTree[i]
+        for(let j=0;j<s.children.length;j++) {
+          let room = s.children[j]
+          if(!room.name){
+            errMsg = '存在空房名,请填写'
+            break
+          }
+          if(this.repeatName(s.children, j)) {
+            errMsg = '存在重复房名'
+            break
+          }
+        }
+        if(errMsg) break
+      }
+      }
+      if(errMsg) {
+        this.$message.error(errMsg)
+        return
+      }
+      
+      
       if (this.step == 1) {
         this.step = 2;
         return;
@@ -437,9 +479,6 @@ export default {
     hotelChange(value) {
       console.log(`selected ${value}`);
     },
-    floorChange(value) {
-      console.log(`selected ${value}`);
-    },
     tailNumberExclude() {
       console.log(`selected ${value}`);
     },
@@ -450,7 +489,11 @@ export default {
       this.closeCurrent();
     },
     check() {},
-    genRooms() {
+    genRooms() { 
+      if(!this.buildingId) {
+        this.$message.error("请先选择楼栋")
+        return
+      }
       let floors = [];
       let model = this.model;
       for (let i = 0; i < model.floorCount; i++) {
@@ -480,7 +523,25 @@ export default {
         });
       }
       this.roomTree = floors;
+      let bIndex = this.buildingTreeData.findIndex(s => s.id == this.buildingId)
+      let currentFloorNames = (this.buildingTreeData[bIndex].children||[]).map(s => s.name)
+      this.floorNames = currentFloorNames
     },
+    isExistNames(name) {
+      return this.floorNames.includes(name)
+    },
+    repeatName(items, index) {
+      let name = items[index].name
+      let newArr = JSON.parse(JSON.stringify(items)).map(s => s.name)
+      newArr.splice(index,1)
+
+      if(newArr.includes(items[index].name)) {
+        return true
+      }
+      return false
+    }
+
+
   },
 };
 </script>

+ 66 - 0
src/views/settings/components/roomModules/roomNumSettings/roomImagesForm.vue

@@ -0,0 +1,66 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    @cancel="handleCancel"
+    cancelText="关闭"
+  >
+  <a-form-model ref="form" :model="model">
+            <a-form-model-item label="房间大图" >
+                <j-image-upload class="avatar-uploader" text="上传" v-model="model.cover" ></j-image-upload>
+              </a-form-model-item>
+              <a-form-model-item label="图片" >
+                <j-image-upload class="avatar-uploader" text="上传" v-model="model.images" :isMultiple="true"></j-image-upload>
+              </a-form-model-item>
+        </a-form-model>
+  </j-modal>
+</template>
+
+<script>
+import { roomEdit } from '@/api/roomBuildingApi'
+export default {
+    data() {
+        return {
+            title: '房间图片',
+            width: '40%',
+            visible: false,
+            model: {
+                id: null,
+                cover: null,
+                images: null,
+            }
+        }
+    },
+    methods: {
+        // 设置模型图片数据
+        setModel(data) {
+            this.model = JSON.parse(JSON.stringify(data))
+            this.visible = true
+        },
+        // save
+        handleOk() {
+            roomEdit(this.model).then(res => {
+                if(res.code == 200) {
+                    this.$message.success('保存成功')
+                    this.$emit("saveOk")
+                    this.visible = false
+                }
+            }).catch(_ => {
+                this.$message.success('保存失败')
+            })
+        },
+        // 取消
+        handleCancel() {
+            this.visible = false
+        }
+    }
+
+}
+</script>
+
+<style>
+
+</style>

+ 14 - 1
src/views/settings/components/roomModules/roomNumSettings/roomNumList.vue

@@ -103,6 +103,7 @@ export default {
     },
   data() {
     return {
+        currentFilterId: null,
       flowData: {
         id: null,
         hotelId: null,
@@ -128,7 +129,9 @@ export default {
   methods: {
     // 点击 触发搜索
     filterSearch(item) {
-
+        this.currentFilterId = item.id
+        this.$refs.numtable.ipagination.current = 1
+        this.$refs.numtable.searchParam(item.id, item.name, item.parentId == "0")
     },
     // 获取楼栋树
     loadBuildingTreeData() {
@@ -168,7 +171,17 @@ export default {
         }).then(res => {
             if(res.code == 200) {
                 this.$message.success('删除成功')
+                
                 this.loadBuildingTreeData()
+                this.$refs.numtable.ipagination.current = 1
+                this.$refs.numtable.ipagination.pageSize = 10
+                if(this.currentFilterId == item.id ) {
+                    if(item.parentId == "0")
+                        this.$refs.numtable.filters['buildId'] = null
+                    else 
+                        this.$refs.numtable.filters['floorId'] = null
+                }
+                this.$refs.numtable.loadData()
             }
         })
     },

+ 92 - 6
src/views/settings/components/roomModules/roomNumSettings/roomNumTable.vue

@@ -4,18 +4,37 @@
 
     <!-- 操作按钮区域 -->
     <div class="table-operator">
+        <a-tag color="pink" v-if="buildingFloorSearchTag.name" >
+            {{ buildingFloorSearchTag.name }}
+            <a-icon type="close"  @click="onFliterClose" />
+        </a-tag>
       <a-button @click="handleAdd" type="primary" icon="plus"
         >新增房间</a-button
       >
-      <a-button @click="onAddBatch" type="primary" icon="plus"
+      <a-button @click="onAddBatch" type="primary" icon="tags"
         >批量新增</a-button
       >
-      <a-button @click="onDelAll" type="primary" icon="plus">全部删除</a-button>
-      <a-dropdown v-if="selectedRowKeys.length > 0">
+      <a-popconfirm
+            title="确定全部删除吗?"
+            @confirm="delAll"
+          >
+          <a-button :disabled="delLoading" :loading="delLoading" type="primary" icon="stop">全部删除</a-button>
+          </a-popconfirm>
+      
+      <a-popconfirm
+      v-if="selectedRowKeys.length > 0"
+            title="确定删除吗?"
+            @confirm="delBatch"
+          >
+          <a-button :disabled="delLoading" :loading="delLoading" icon="stop" style="margin-left: 8px">
+          批量删除</a-button>
+          </a-popconfirm>
+      
+      <!-- <a-dropdown v-if="selectedRowKeys.length > 0">
         <a-button style="margin-left: 8px">
           批量操作 <a-icon type="down"
         /></a-button>
-      </a-dropdown>
+      </a-dropdown> -->
       <a-button type="primary" @click="searchQuery" icon="search"
         >查询</a-button
       >
@@ -70,22 +89,26 @@
       </a-table>
     </div>
     <room-num-modal ref="modalForm" @ok="modalFormOk"></room-num-modal>
+    <room-imgs @saveOk="onImgSave" ref="roomimgmodal"></room-imgs>
   </a-card>
 </template>
   
 <script>
 import { JeecgListMixin } from "@/mixins/JeecgListMixin";
 import roomNumModal from "./roomNumModal.vue"; // todo roomLayoutForm 需要替换成房型的表单弹窗
-
+import roomImgs from './roomImagesForm.vue'
 import { getAllLayouts } from "@/api/roomLayout";
+import { delBatch, delAll } from '@/api/roomBuildingApi'
 let hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
 export default {
   mixins: [JeecgListMixin],
   components: {
     roomNumModal,
+    roomImgs
   },
   data() {
     return {
+      delLoading: false,
       layouts: [],
       queryParam: {},
       // 分页参数
@@ -151,6 +174,9 @@ export default {
         exportXlsUrl: "/rooms/cesRooms/exportXls",
         importExcelUrl: "rooms/cesRooms/importExcel",
       },
+      buildingFloorSearchTag: {
+        name: null
+      },
       dictOptions: {},
       superFieldList: [],
       selectedRowKeys: [],
@@ -170,6 +196,32 @@ export default {
     });
   },
   methods: {
+    onImgSave() {
+      this.loadData()
+    },
+    onFliterClose() {
+        this.filters['buildId'] = null
+        this.filters['floorId'] = null
+        this.ipagination.current = 1
+        this.buildingFloorSearchTag.name = null
+        this.loadData()
+    },
+    // 搜索
+    searchParam(id, name, isBuilding) {
+        this.$set(this.buildingFloorSearchTag,'name',name)
+        if(isBuilding) {
+            this.filters['buildId'] = id
+            if(this.filters['floorId']) {
+                delete this.filters.floorId
+            }
+        } else {
+            this.filters['floorId'] = id
+            if(this.filters['buildId']) {
+                delete this.filters.buildId
+            }
+        }
+        this.loadData()
+    },
     getLayoutName(row) {
       let i = this.layouts.findIndex((s) => s.id == row.layoutId);
       if (i > -1) {
@@ -177,6 +229,40 @@ export default {
       }
       return "";
     },
+    // 批量删除
+    delBatch() {
+      let hotelInfo = JSON.parse(localStorage.getItem('storeInfo'))
+      let keys = this.selectedRowKeys
+      this.delLoading = true
+      delBatch({
+        hotelId: hotelInfo.id,
+        idStr: keys.toString()
+      }).then(res => {
+        if(res.code == 200) {
+          this.selectedRowKeys = []
+          this.$message.success('删除成功');
+          this.loadData()
+        }
+      }).finally(_ => {
+        this.delLoading = false
+      })
+    },
+    // 删除所有
+    delAll() {
+      let hotelInfo = JSON.parse(localStorage.getItem('storeInfo'))
+      this.delLoading = true
+      delAll({
+        hotelId: hotelInfo.id,
+      }).then(res => {
+        if(res.code == 200) {
+          this.selectedRowKeys = []
+          this.$message.success('全部删除成功');
+          this.loadData()
+        }
+      }).finally(_ => {
+        this.delLoading = false
+      })
+    },
     // 批量添加按钮
     onAddBatch() {
         this.$router.push('/tenant/gen/rooms');
@@ -185,7 +271,7 @@ export default {
     onDelAll() {},
     // 显示图片弹窗
     handleImage(row) {
-
+      this.$refs.roomimgmodal.setModel(row)
     },
     onSaveOk() {
       this.loadData();

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

@@ -23,21 +23,34 @@
                 </span>
                <goodList></goodList>     
             </a-tab-pane>
+            <a-tab-pane key="4">
+                <span slot="tab">
+                    <a-icon type="clock-circle" />
+                    全天房计费
+                </span>
+                <all-days-rule></all-days-rule>
+            </a-tab-pane>
+            <a-tab-pane key="5">
+                <span slot="tab">
+                    <a-icon type="history" />
+                    钟点房计费
+                </span>
+            </a-tab-pane>
         </a-tabs>
     </a-card>
 </template>
 
 <script>
 import roomLayoutList from "./components/roomModules/roomLayoutList.vue"
-// import roomGen from "./components/roomModules/roomGen.vue";
 import goodList from "./components/roomModules/goodList.vue";
 import roomNumList from "./components/roomModules/roomNumSettings/roomNumList.vue";
+import allDaysRule from './components/roomModules/allDaysRoomFeeRule.vue'
 export default {
     components: {
         roomLayoutList,
-        // roomGen,
         goodList,
-        roomNumList
+        roomNumList,
+        allDaysRule, // 全天房计费规则tabContent
     },
     data() {
         return {