소스 검색

会议室模块

gqx 2 년 전
부모
커밋
b374ab8aa9

+ 72 - 48
src/views/markets/modules/meetingRoomSchedule/BusMeetingRoomScheduleConfirm.vue

@@ -57,12 +57,13 @@
               style="float: left; overflow: hidden"
               class="table-page-search-submitButtons"
             >
-              <a-button
+            <!--先不实现增加预定功能-->
+              <!-- <a-button v-if="model.roomSchedule.billStatus==0"
                 @click="handleAdd"
                 type="danger"
                 style="margin-left: 8px"
                 >增加预定</a-button
-              >
+              > -->
             </span>
           </a-col>
         </a-row>
@@ -115,26 +116,32 @@
         </template>
 
         <span slot="action" slot-scope="text, record">
-          <a @click="handleEdit(record)">全部档期</a>
+          <a @click="handleDetail(record)">全部档期</a>
           <a-divider type="vertical" />
           <template v-if="record.status != 0 && record.billStatus == 0">
-            <a @click="handleEdit(record)">结账</a>
+            <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" />
+          <a-divider type="vertical" /></template>
           <template v-if="record.status == 0">
-            <a @click="handleEdit(record)">确认</a>
+            <a @click="batchConfirm(record)">确认</a>
             <a-divider type="vertical" />
           </template>
-          <a @click="handleEdit(record)">删除</a>
+          <a v-if="record.status == 0" @click="handleEdit(record)">删除</a>
         </span>
       </a-table>
     </div>
     <bus-meeting-room-schedule-edit-modal
       ref="modalForm"
-      @ok="modalFormOk"
+      @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>
 
@@ -143,13 +150,16 @@ import "@/assets/less/TableExpand.less";
 import { mixinDevice } from "@/utils/mixin";
 import { JeecgListMixin } from "@/mixins/JeecgListMixin";
 import BusMeetingRoomScheduleEditModal from "./BusMeetingRoomScheduleEditModal";
-import { httpAction, getAction } from "@/api/manage";
+import meetingRoomScheduleDetailModal from "./meetingRoomScheduleDetail/meetingRoomScheduleDetailModal";
+
+import { httpAction, getAction, postAction } from "@/api/manage";
 
 export default {
   name: "BusMarketCouponsUsedList",
   // mixins: [ mixinDevice],
   components: {
-    BusMeetingRoomScheduleEditModal
+    BusMeetingRoomScheduleEditModal,
+    meetingRoomScheduleDetailModal,
   },
   props: {
     couponsId: {
@@ -159,6 +169,7 @@ export default {
   },
   data() {
     return {
+      meetingRoomScheduleId: "",
       description: "",
       model: {
         detail: { meetingRoomId: "", meetingDate: "", meetingDatev: "" },
@@ -216,12 +227,7 @@ export default {
         },
       ],
       url: {
-        list:
-          "/business/busMarketCouponsCashUsed/list?couponsId=" + this.couponsId,
-        delete: "/business/busMarketCouponsCashUsed/delete",
-        deleteBatch: "/business/busMarketCouponsCashUsed/deleteBatch",
-        exportXlsUrl: "/business/busMarketCouponsCashUsed/exportXls",
-        importExcelUrl: "business/busMarketCouponsCashUsed/importExcel",
+        confirmBatch: "/business/busMeetingRoomScheduleDetail/confirmBatchByMeetingRoomScheduleId",
       },
       dictOptions: {},
       superFieldList: [],
@@ -252,14 +258,54 @@ export default {
     },
   },
   methods: {
-    modalFormOk() {
+    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
+      delete this.model.roomSchedule.createTime;
       this.dataSource = [
         Object.assign({}, this.model.roomSchedule, {
           status: this.model.detail.status,
@@ -267,35 +313,18 @@ export default {
       ];
       this.visible = true;
     },
-    handleEdit(record){
+    handleEdit(record) {
       this.$refs.modalForm.edit(record);
       this.$refs.modalForm.title = "编辑";
       this.$refs.modalForm.disableSubmit = false;
     },
-    // handleEdit(item) {
-    //   var that = this;
-    //   this.$confirm({
-    //     title: "确认作废",
-    //     content: "是否作废?",
-    //     onOk: function () {
-    //       httpAction(
-    //         "/business/busMarketCouponsCashUsed/voided",
-    //         { id: item.id },
-    //         "put"
-    //       )
-    //         .then((res) => {
-    //           if (res.success) {
-    //             that.$message.success(res.message);
-    //             item.statusName = "已作废";
-    //           } else {
-    //             that.$message.warning(res.message);
-    //           }
-    //         })
-    //         .finally(() => {});
-    //     },
-    //     onCancel: function () {},
-    //   });
-    // },
+    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 = [];
@@ -363,11 +392,6 @@ export default {
       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>

+ 1 - 1
src/views/markets/modules/meetingRoomSchedule/BusMeetingRoomScheduleConfirmModal.vue

@@ -11,6 +11,7 @@
   >
     <bus-meeting-room-schedule-confirm
       ref="modalBusMeetingRoomScheduleConfirmModal"
+      @ok="submitCallback"
     ></bus-meeting-room-schedule-confirm>
   </j-modal>
 </template>
@@ -56,7 +57,6 @@ export default {
     },
     submitCallback() {
       this.$emit("ok");
-      this.visible = false;
     },
     handleCancel() {
       this.close();

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

@@ -191,7 +191,9 @@ export default {
             .then((res) => {
               if (res.success) {
                 that.$message.success(res.message);
-                that.$emit("ok");
+                console.log(1)
+                that.$emit("ok",this.model);
+                // that.$parent.modalFormOk2(this.model);
               } else {
                 that.$message.warning(res.message);
               }

+ 3 - 3
src/views/markets/modules/meetingRoomSchedule/BusMeetingRoomScheduleEditModal.vue

@@ -4,7 +4,7 @@
     :width="width"
     :visible="visible"
     switchFullscreen
-    @ok="handleOk"
+    @ok="handleOk($event)"
     :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
     @cancel="handleCancel"
     cancelText="关闭">
@@ -48,8 +48,8 @@
       handleOk () {
         this.$refs.realForm.submitForm();
       },
-      submitCallback(){
-        this.$emit('ok');
+      submitCallback($event){
+        this.$emit('ok',$event);
         this.visible = false;
       },
       handleCancel () {

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

@@ -0,0 +1,310 @@
+<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: ids })
+          .then((res) => {
+            if (res.success) {
+              that.$message.success(res.message);
+              that.loadData();
+              that.onClearSelected();
+            } 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;
+          } 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>

+ 66 - 0
src/views/markets/modules/meetingRoomSchedule/meetingRoomScheduleDetail/meetingRoomScheduleDetailModal.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="关闭"
+  >
+    <meeting-room-schedule-detail-list
+      :meetingRoomScheduleId="meetingRoomScheduleId"
+      ref="modalMeetingRoomScheduleDetailListModal"
+    ></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>