Quellcode durchsuchen

入住单留言/物品借用

gqx vor 2 Jahren
Ursprung
Commit
6ff46fab26

+ 17 - 2
src/views/room/leasegoods.vue

@@ -6,7 +6,10 @@
         <a-row :gutter="24">
           <a-col :span="3">
             <a-form-item label="">
-              <a-input placeholder="姓名" v-model="queryParam.userName"></a-input>
+              <a-input
+                placeholder="姓名"
+                v-model="queryParam.userName"
+              ></a-input>
             </a-form-item>
           </a-col>
           <a-col :span="6">
@@ -130,6 +133,12 @@ export default {
   components: {
     CesOrderLeaseGoodsModal,
   },
+  props: {
+    livingOrderId: {
+      type: String,
+      default: null,
+    },
+  },
   data() {
     return {
       description: "客单",
@@ -185,7 +194,8 @@ export default {
         },
       ],
       url: {
-        list: "/order/cesOrderLeaseGoods/list",
+        list:
+          "/order/cesOrderLeaseGoods/list?livingOrderId=" + this.livingOrderId,
         delete: "/order/cesOrderLeaseGoods/delete",
         deleteBatch: "/order/cesOrderLeaseGoods/deleteBatch",
         exportXlsUrl: "/order/cesOrderLeaseGoods/exportXls",
@@ -204,6 +214,11 @@ export default {
     },
   },
   methods: {
+    handleAdd() {
+      this.$refs.modalForm.add(this.livingOrderId);
+      this.$refs.modalForm.title = "新增";
+      this.$refs.modalForm.disableSubmit = false;
+    },
     onChange(e, dateString) {
       this.queryParam.startTime = dateString[0];
       this.queryParam.endTime = dateString[1];

+ 19 - 6
src/views/room/membermessage.vue

@@ -4,12 +4,15 @@
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-row :gutter="24">
-          <a-col :span="3">
+          <a-col :span="6">
             <a-form-item label="">
-              <a-input placeholder="姓名" v-model="queryParam.userName"></a-input>
+              <a-input
+                placeholder="姓名"
+                v-model="queryParam.userName"
+              ></a-input>
             </a-form-item>
           </a-col>
-          <a-col :span="6">
+          <a-col :span="12">
             <a-form-item label="">
               <a-range-picker
                 format="YYYY-MM-DD"
@@ -45,12 +48,10 @@
     <!-- 操作按钮区域 -->
     <div class="table-operator">
       <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
-      
     </div>
 
     <!-- table区域-begin -->
     <div>
-
       <a-table
         ref="table"
         size="middle"
@@ -133,6 +134,12 @@ export default {
   components: {
     BusMemberMessageModal,
   },
+  props: {
+    livingOrderId: {
+      type: String,
+      default: null,
+    },
+  },
   data() {
     return {
       description: "bus_member_message管理页面",
@@ -195,7 +202,8 @@ export default {
         },
       ],
       url: {
-        list: "/business/busMemberMessage/list",
+        list:
+          "/business/busMemberMessage/list?livingOrderId=" + this.livingOrderId,
         delete: "/business/busMemberMessage/delete",
         deleteBatch: "/business/busMemberMessage/deleteBatch",
         exportXlsUrl: "/business/busMemberMessage/exportXls",
@@ -215,6 +223,11 @@ export default {
     },
   },
   methods: {
+    handleAdd() {
+      this.$refs.modalForm.add(this.livingOrderId);
+      this.$refs.modalForm.title = "新增";
+      this.$refs.modalForm.disableSubmit = false;
+    },
     onChange(e, dateString) {
       this.queryParam.startTime = dateString[0];
       this.queryParam.endTime = dateString[1];

+ 66 - 1
src/views/room/modules/checkIn/BillRoomInfo.vue

@@ -423,6 +423,8 @@
     <refund-modal ref="modalRefundForm" @ok="modalFormOk"></refund-modal>
     <payment-modal ref="modalPaymentForm" @ok="modalFormOk"></payment-modal>
     <fee-modal ref="modalFeeForm" @ok="modalFormOk"></fee-modal>
+    <member-message-modal ref="modalMemberMessage"></member-message-modal>
+    <lease-goods-modal ref="modalLeaseGoods"></lease-goods-modal>
   </div>
 </template>
 
@@ -434,6 +436,8 @@ import CustomerModal from "./CustomerModal.vue";
 import RefundModal from "./RefundModal.vue";
 import PaymentModal from "./PaymentModal.vue";
 import FeeModal from "./FeeModal";
+import MemberMessageModal from "@/views/room/modules/membergoodsmanage/membermessageModal";
+import LeaseGoodsModal from "@/views/room/modules/leasegoods/leasegoodsModal";
 import { match } from "assert";
 const columns = [
   // {
@@ -535,7 +539,14 @@ const date = new Date();
 const endDate = new Date(date.setDate(date.getDate() + 1));
 export default {
   name: "BusMeetingRoomForm",
-  components: { CustomerModal, RefundModal, PaymentModal, FeeModal },
+  components: {
+    CustomerModal,
+    RefundModal,
+    PaymentModal,
+    FeeModal,
+    MemberMessageModal,
+    LeaseGoodsModal,
+  },
   props: {
     //表单禁用
     disabled: {
@@ -700,6 +711,34 @@ export default {
         },
       });
     },
+    addLeaseGoods() {
+      if (this.selectRoomId === "1") {
+        this.$message.warning("请先选择房间");
+        return;
+      }
+      var index = this.model.livingRoomIds.findLastIndex(
+        (t) => t.roomId == this.selectRoomId
+      );
+      var find = this.model.livingRoomIds[index];
+      this.$refs.modalLeaseGoods.add();
+      this.$refs.modalLeaseGoods.title = "客人留言";
+      this.$refs.modalLeaseGoods.disableSubmit = false;
+      this.$refs.modalLeaseGoods.livingOrderId = find.livingOrder.id;
+    },
+    addMessage() {
+      if (this.selectRoomId === "1") {
+        this.$message.warning("请先选择房间");
+        return;
+      }
+      var index = this.model.livingRoomIds.findLastIndex(
+        (t) => t.roomId == this.selectRoomId
+      );
+      var find = this.model.livingRoomIds[index];
+      this.$refs.modalMemberMessage.add();
+      this.$refs.modalMemberMessage.title = "客人留言";
+      this.$refs.modalMemberMessage.disableSubmit = false;
+      this.$refs.modalMemberMessage.livingOrderId = find.livingOrder.id;
+    },
     addProjectFee() {
       var index = this.model.livingRoomIds.findLastIndex(
         (t) => t.roomId == this.selectRoomId
@@ -967,6 +1006,32 @@ export default {
       this.model = Object.assign({}, record);
       this.visible = true;
     },
+    handleLeaveNotSettle() {
+      if (this.selectRoomId === "1") {
+        this.$message.warning("请先选择房间");
+        return;
+      }
+      var index = this.model.livingRoomIds.findLastIndex(
+        (t) => t.roomId == this.selectRoomId
+      );
+      var find = this.model.livingRoomIds[index];
+      httpAction(
+        "/business/busRoomBookingOrders/leave-not-settle?bookingOrderId=" +
+          find.bookingOrdersId +
+          "&livingOrderId=" +
+          find.livingOrder.id,
+        {},
+        "post"
+      ).then((res) => {
+        if (res.success) {
+          this.$message.success(res.message);
+          this.getBookingOrderInfo();
+          this.$emit("ok");
+        } else {
+          this.$message.warning(res.message);
+        }
+      });
+    },
     submitForm() {
       const that = this;
       that.$message.warning("未实现");

+ 80 - 86
src/views/room/modules/checkIn/BillRoomInfoModal.vue

@@ -4,9 +4,10 @@
     :visible="visible"
     switchFullscreen
     @ok="handleOk"
-    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
     @cancel="handleCancel"
-    cancelText="关闭">
+    cancelText="关闭"
+  >
     <template slot="title">
       <div
         style="
@@ -17,63 +18,49 @@
       >
         <div class="menu">
           <a-icon
-            type="retweet"
-            style="color: #fff; font-size: 30px"
-          /><a-button type="link"> 联房 </a-button>
-        </div>
-        <div class="menu">
-          <a-icon
-            type="shopping"
-            style="color: #fff; font-size: 30px"
-          /><a-button type="link"> 增加消费 </a-button>
-        </div>
-        <div class="menu">
-          <a-icon
             type="account-book"
             style="color: #fff; font-size: 30px"
           /><a-button type="link"> 调价 </a-button>
         </div>
         <div class="menu">
-          <a-icon
-            type="container"
-            style="color: #fff; font-size: 30px"
-          /><a-button type="link"> 自定义账单 </a-button>
-        </div>
-        <div class="menu">
-          <a-icon
-            type="printer"
-            style="color: #fff; font-size: 30px"
-          /><a-button type="link"> 打印账单 </a-button>
+          <a-icon type="block" style="color: #fff; font-size: 30px" /><a-button
+            type="link"
+            @click="handleLeaseGoods"
+          >
+            物品借用
+          </a-button>
         </div>
         <div class="menu">
           <a-icon
             type="message"
             style="color: #fff; font-size: 30px"
-          /><a-button type="link"> 客户留言 </a-button>
+          /><a-button type="link" @click="handleMessage"> 客户留言 </a-button>
         </div>
         <div class="menu">
           <a-icon
-            type="block"
+            type="retweet"
             style="color: #fff; font-size: 30px"
-          /><a-button type="link"> 物品借用 </a-button>
+          /><a-button type="link"> 联房 </a-button>
         </div>
         <div class="menu">
-          <a-icon
-            type="pay-circle"
-            style="color: #fff; font-size: 30px"
-          /><a-button type="link"> 结账退房 </a-button>
+          <a-icon type="euro" style="color: #fff; font-size: 30px" /><a-button
+            type="link"
+            @click="handleLeaveNotSettle"
+          >
+            先走不结
+          </a-button>
         </div>
         <div class="menu">
           <a-icon
-            type="euro"
+            type="printer"
             style="color: #fff; font-size: 30px"
-          /><a-button type="link"> 先走不结 </a-button>
+          /><a-button type="link"> 打印账单 </a-button>
         </div>
         <div class="menu">
           <a-icon
-            type="database"
+            type="container"
             style="color: #fff; font-size: 30px"
-          /><a-button type="link"> 房间日志 </a-button>
+          /><a-button type="link"> 自定义账单 </a-button>
         </div>
       </div></template
     >
@@ -82,51 +69,60 @@
 </template>
 
 <script>
+import BillRoomInfo from "./BillRoomInfo";
 
-  import BillRoomInfo from './BillRoomInfo'
-  export default {
-    name: 'BillRoomInfoModal',
-    components: {
-      BillRoomInfo
+export default {
+  name: "BillRoomInfoModal",
+  components: {
+    BillRoomInfo,
+  },
+  data() {
+    return {
+      title: "",
+      width: 1400,
+      visible: false,
+      disableSubmit: false,
+    };
+  },
+  methods: {
+    add(id, key) {
+      console.log("id", id);
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.add(id, key);
+      });
     },
-    data () {
-      return {
-        title:'',
-        width:1400,
-        visible: false,
-        disableSubmit: false
-      }
+    edit(record) {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.edit(record);
+      });
     },
-    methods: {
-      add (id,key) {
-        console.log("id",id)
-        this.visible=true
-        this.$nextTick(()=>{
-          this.$refs.realForm.add(id,key);
-        })
-      },
-      edit (record) {
-        this.visible=true
-        this.$nextTick(()=>{
-          this.$refs.realForm.edit(record);
-        })
-      },
-      close () {
-        this.$emit('close');
-        this.visible = false;
-      },
-      handleOk () {
-        this.$refs.realForm.submitForm();
-      },
-      submitCallback(){
-        this.$emit('ok');
-        // this.visible = false;
-      },
-      handleCancel () {
-        this.close()
-      }
-    }
-  }
+    close() {
+      this.$emit("close");
+      this.visible = false;
+    },
+    handleOk() {
+      this.$refs.realForm.submitForm();
+    },
+    handleMessage() {
+      this.$refs.realForm.addMessage();
+    },
+    handleLeaseGoods() {
+      this.$refs.realForm.addLeaseGoods();
+    },
+    handleLeaveNotSettle() {
+      this.$refs.realForm.handleLeaveNotSettle();
+    },
+    submitCallback() {
+      this.$emit("ok");
+      // this.visible = false;
+    },
+    handleCancel() {
+      this.close();
+    },
+  },
+};
 </script>
 <style scoped>
 /deep/ .ant-btn-link {
@@ -140,16 +136,14 @@
   color: #fff;
   margin-top: 12px;
 }
-/deep/.ant-modal-header{
-  padding: 0 !important;
+/deep/.ant-modal-header {
+  padding: 0;
   background-color: rgb(255, 141, 26);
-
 }
-/deep/.ant-modal-close{
-  color: #fff !important;
+/deep/.ant-modal-close {
+  color: #fff;
 }
-</style>
-<style scoped>
+
 /deep/.ant-modal-body {
   padding: 12px;
   max-height: calc(80vh - 150px);
@@ -159,12 +153,12 @@
     /*高宽分别对应横竖滚动条的尺寸*/
     height: 1px;
   }
- 
+
   &::-webkit-scrollbar-thumb {
     background: #e3e3e6;
     border-radius: 6px;
   }
- 
+
   &::-webkit-scrollbar-track {
     background: transparent;
     border-radius: 5px;

+ 13 - 9
src/views/room/modules/leasegoods/CesOrderLeaseGoodsForm.vue

@@ -13,15 +13,15 @@
               label="房号"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
-              prop="roomId"
+              prop="livingOrderId"
             >
-              <a-select v-model="model.roomId" placeholder="请选择房号">
+              <a-select v-model="model.livingOrderId" placeholder="请选择房号">
                 <a-select-option
-                  :value="item.id"
+                  :value="item.livingOrderId"
                   v-for="(item, index) in roomsList"
                   :key="item.id"
                 >
-                  {{ item.name }}
+                {{ item.roomName }}/{{ item.customerName }}
                 </a-select-option>
               </a-select>
             </a-form-model-item>
@@ -133,8 +133,7 @@ export default {
       },
       confirmLoading: false,
       validatorRules: {
-        tenantId: [{ required: true, message: "请输入关联租户!" }],
-        hotelId: [{ required: true, message: "请输入关联酒店!" }],
+        livingOrderId: [{ required: true, message: "请选择房间!" }],
         goodsId: [{ required: true, message: "请输入物品平台字典项目ID!" }],
         num: [{ required: true, message: "请输入数量!" }],
         deposit: [{ required: true, message: "请输入押金!" }],
@@ -170,9 +169,9 @@ export default {
       }
     });
 
-    getAction("/rooms/cesRooms/list", {
+    getAction("/business/busRoomBookingOrders/living-orders?status=-1", {
       pageNo: 1,
-      pageSize: 100,
+      pageSize: 99999,
     }).then((res) => {
       if (res.success) {
         this.roomsList = res.result.records;
@@ -180,7 +179,8 @@ export default {
     });
   },
   methods: {
-    add() {
+    add(livingOrderId) {
+      this.modelDefault.livingOrderId = livingOrderId;
       this.edit(this.modelDefault);
     },
     edit(record) {
@@ -192,6 +192,10 @@ export default {
       // 触发表单验证
       this.$refs.form.validate((valid) => {
         if (valid) {
+          var find = this.roomsList.find(
+            (t) => t.livingOrderId === this.model.livingOrderId
+          );
+          this.model.roomId = find.roomId;
           that.confirmLoading = true;
           let httpurl = "";
           let method = "";

+ 2 - 2
src/views/room/modules/leasegoods/CesOrderLeaseGoodsModal.vue

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

+ 70 - 0
src/views/room/modules/leasegoods/leasegoodsModal.vue

@@ -0,0 +1,70 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <upkeep-room-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" :livingOrderId="livingOrderId"></upkeep-room-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import UpkeepRoomForm from '@/views/room/leasegoods'
+  export default {
+    name: 'UpkeepRoomFormModal',
+    components: {
+      UpkeepRoomForm
+    },
+    data () {
+      return {
+        title:'',
+        width:1000,
+        visible: false,
+        disableSubmit: false,
+        livingOrderId:''
+      }
+    },
+    methods: {
+      add (record) {
+        this.visible=true
+        // this.$nextTick(()=>{
+        //   this.$refs.realForm.add(record);
+        // })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+<style scoped>
+/deep/.ant-modal-header {
+  padding: 16px 24px !important;
+  background-color: #fff !important;
+}
+/deep/.ant-modal-close {
+  color: rgba(0, 0, 0, 0.45) !important;
+}
+</style>

+ 70 - 0
src/views/room/modules/membergoodsmanage/membermessageModal.vue

@@ -0,0 +1,70 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <upkeep-room-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" :livingOrderId="livingOrderId"></upkeep-room-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import UpkeepRoomForm from '@/views/room/membermessage'
+  export default {
+    name: 'UpkeepRoomFormModal',
+    components: {
+      UpkeepRoomForm
+    },
+    data () {
+      return {
+        title:'',
+        width:1000,
+        visible: false,
+        disableSubmit: false,
+        livingOrderId:''
+      }
+    },
+    methods: {
+      add (record) {
+        this.visible=true
+        // this.$nextTick(()=>{
+        //   this.$refs.realForm.add(record);
+        // })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+<style scoped>
+/deep/.ant-modal-header {
+  padding: 16px 24px !important;
+  background-color: #fff !important;
+}
+/deep/.ant-modal-close {
+  color: rgba(0, 0, 0, 0.45) !important;
+}
+</style>

+ 13 - 7
src/views/room/modules/membermessage/BusMemberMessageForm.vue

@@ -13,15 +13,15 @@
               label="房号"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
-              prop="roomId"
+              prop="livingOrderId"
             >
-              <a-select v-model="model.roomId" placeholder="请选择房号">
+              <a-select v-model="model.livingOrderId" placeholder="请选择房号">
                 <a-select-option
-                  :value="item.id"
+                  :value="item.livingOrderId"
                   v-for="(item, index) in roomsList"
                   :key="item.id"
                 >
-                  {{ item.name }}
+                  {{ item.roomName }}/{{ item.customerName }}
                 </a-select-option>
               </a-select>
             </a-form-model-item>
@@ -155,9 +155,9 @@ export default {
     }
     //备份model原始值
     this.modelDefault = JSON.parse(JSON.stringify(this.model));
-    getAction("/rooms/cesRooms/list", {
+    getAction("/business/busRoomBookingOrders/living-orders?status=-1", {
       pageNo: 1,
-      pageSize: 100,
+      pageSize: 99999,
     }).then((res) => {
       if (res.success) {
         this.roomsList = res.result.records;
@@ -165,11 +165,13 @@ export default {
     });
   },
   methods: {
-    add() {
+    add(livingOrderId) {
+      this.modelDefault.livingOrderId = livingOrderId;
       this.edit(this.modelDefault);
     },
     edit(record) {
       this.model = Object.assign({}, record);
+      console.log("this.model", this.model);
       this.visible = true;
     },
     submitForm() {
@@ -177,6 +179,10 @@ export default {
       // 触发表单验证
       this.$refs.form.validate((valid) => {
         if (valid) {
+          var find = this.roomsList.find(
+            (t) => t.livingOrderId === this.model.livingOrderId
+          );
+          this.model.roomId = find.roomId;
           that.confirmLoading = true;
           let httpurl = "";
           let method = "";

+ 3 - 3
src/views/room/modules/membermessage/BusMemberMessageModal.vue

@@ -25,14 +25,14 @@
         title:'',
         width:800,
         visible: false,
-        disableSubmit: false
+        disableSubmit: false,
       }
     },
     methods: {
-      add () {
+      add (livingOrderId) {
         this.visible=true
         this.$nextTick(()=>{
-          this.$refs.realForm.add();
+          this.$refs.realForm.add(livingOrderId);
         })
       },
       edit (record) {