Browse Source

调整右键菜单

DESKTOP-B78GIPM\admin 2 years ago
parent
commit
c22dbdd593
2 changed files with 147 additions and 46 deletions
  1. 145 45
      src/views/room/fangtailive.vue
  2. 2 1
      src/views/room/modules/checkIn/FeeForm.vue

+ 145 - 45
src/views/room/fangtailive.vue

@@ -532,7 +532,99 @@
                           style="width: 126px"
                           style="width: 126px"
                           @click="(e) => onMenuClick(e, roomLive)"
                           @click="(e) => onMenuClick(e, roomLive)"
                         >
                         >
-                          <template
+                        <template
+                            v-if="
+                              roomLive.roomInfo.roomStatus === 3 ||
+                              roomLive.roomInfo.roomStatus === 4
+                            "
+                          >
+                            <a-menu-item key="16"> 结账退房 </a-menu-item>
+
+                            <!-- <a-menu-item key="8"> 查房 </a-menu-item> -->
+
+                            <a-menu-item key="10"> 续住收款 </a-menu-item>
+
+                            <a-menu-item key="99"> 商品销售 </a-menu-item>
+
+                            <!-- <a-menu-item key="9"> 入账 </a-menu-item> -->
+
+                            <a-sub-menu key="sub1">
+                              <span slot="title"><span>制/注房卡</span></span>
+                              <a-menu-item key="11"> 制新卡 </a-menu-item>
+                              <a-menu-item key="12"> 复制卡 </a-menu-item>
+                              <a-menu-item key="11"> 读房卡 </a-menu-item>
+                              <a-menu-item key="12"> 注销卡 </a-menu-item>
+                              <a-menu-item key="11"> 发密码 </a-menu-item>
+                              <a-menu-item key="12"> 门卡记录 </a-menu-item>
+                            </a-sub-menu>
+                            
+                            <!-- <a-menu-item key="14"> 合并联房 </a-menu-item>
+
+                            <a-menu-item key="15"> 添加同住 </a-menu-item>
+
+                            <a-menu-item key="17"> 撤销入住 </a-menu-item> -->
+                          </template>
+                          <a-menu-item
+                            key="31"
+                            v-if="roomLive.roomInfo.roomStatus === 2"
+                          >
+                            置干净
+                          </a-menu-item>
+                          <a-menu-item
+                            key="3"
+                            v-else-if="
+                              roomLive.roomInfo.roomStatus !== 6 &&
+                              roomLive.roomInfo.roomStatus !== 5
+                            "
+                          >
+                            置脏
+                          </a-menu-item>
+                          <a-sub-menu key="sub2">
+                              <span slot="title"><span>修改房态</span></span>
+                              <template
+                                v-if="
+                                  roomLive.roomInfo.roomStatus !== 3 &&
+                                  roomLive.roomInfo.roomStatus !== 4
+                                "
+                              >
+                                <a-menu-item
+                                  key="41"
+                                  v-if="roomLive.roomInfo.roomStatus === 5"
+                                >
+                                  完成维修
+                                </a-menu-item>
+                                <a-menu-item
+                                  key="4"
+                                  v-else-if="roomLive.roomInfo.roomStatus !== 6"
+                                >
+                                  置维修
+                                </a-menu-item>
+                                <a-menu-item
+                                  key="51"
+                                  v-if="roomLive.roomInfo.roomStatus === 6"
+                                >
+                                  解锁
+                                </a-menu-item>
+                                <a-menu-item
+                                  key="5"
+                                  v-else-if="roomLive.roomInfo.roomStatus !== 5"
+                                >
+                                  锁房
+                                </a-menu-item>
+                              </template>
+                              <template v-if="roomLive.roomInfo.roomStatus === 3 || roomLive.roomInfo.roomStatus === 4">
+                                <a-menu-item key="97"> 停用 </a-menu-item>
+                                <a-menu-item key="97"> 保密房 </a-menu-item>
+                                <a-menu-item key="97"> 免打扰 </a-menu-item>
+                                <a-menu-item key="97"> 免查询 </a-menu-item>
+                              </template>
+                            </a-sub-menu>
+                          <template v-if="roomLive.roomInfo.roomStatus === 3 || roomLive.roomInfo.roomStatus === 4">
+                            
+                            <a-menu-item key="13"> 换房 </a-menu-item>
+                            <a-menu-item key="17"> 撤销入住 </a-menu-item>
+                          </template>
+                          <!-- <template
                             v-if="
                             v-if="
                               roomLive.roomInfo.roomStatus === 3 ||
                               roomLive.roomInfo.roomStatus === 3 ||
                               roomLive.roomInfo.roomStatus === 4
                               roomLive.roomInfo.roomStatus === 4
@@ -541,7 +633,7 @@
                             <a-menu-item key="6"> 详单 </a-menu-item>
                             <a-menu-item key="6"> 详单 </a-menu-item>
 
 
                             <a-menu-item key="7"> 账单 </a-menu-item>
                             <a-menu-item key="7"> 账单 </a-menu-item>
-                          </template>
+                          </template> -->
                           <a-menu-item
                           <a-menu-item
                             key="1"
                             key="1"
                             v-if="
                             v-if="
@@ -564,22 +656,8 @@
                           >
                           >
                             预定</a-menu-item
                             预定</a-menu-item
                           >
                           >
-                          <a-menu-item
-                            key="31"
-                            v-if="roomLive.roomInfo.roomStatus === 2"
-                          >
-                            置干净
-                          </a-menu-item>
-                          <a-menu-item
-                            key="3"
-                            v-else-if="
-                              roomLive.roomInfo.roomStatus !== 6 &&
-                              roomLive.roomInfo.roomStatus !== 5
-                            "
-                          >
-                            置脏
-                          </a-menu-item>
-                          <template
+                          
+                          <!-- <template
                             v-if="
                             v-if="
                               roomLive.roomInfo.roomStatus !== 3 &&
                               roomLive.roomInfo.roomStatus !== 3 &&
                               roomLive.roomInfo.roomStatus !== 4
                               roomLive.roomInfo.roomStatus !== 4
@@ -609,35 +687,16 @@
                             >
                             >
                               锁房
                               锁房
                             </a-menu-item>
                             </a-menu-item>
-                          </template>
-                          <template
-                            v-if="
-                              roomLive.roomInfo.roomStatus === 3 ||
-                              roomLive.roomInfo.roomStatus === 4
-                            "
-                          >
-                            <a-menu-item key="8"> 查房 </a-menu-item>
-
-                            <a-menu-item key="9"> 入账 </a-menu-item>
-
-                            <a-menu-item key="10"> 续住/提前 </a-menu-item>
-
-                            <a-menu-item key="11"> 制房卡 </a-menu-item>
-
-                            <a-menu-item key="12"> 注销房卡 </a-menu-item>
-
-                            <a-menu-item key="13"> 换房 </a-menu-item>
-
-                            <a-menu-item key="14"> 合并联房 </a-menu-item>
+                          </template> -->
+                          
 
 
+                          <a-menu-item key="18"> 日志 </a-menu-item>
+                          <template v-if="roomLive.roomInfo.roomStatus === 3 || roomLive.roomInfo.roomStatus === 4">
+                            <a-menu-item v-if="roomLive.livingData &&  roomLive.livingData.livingOrder && !roomLive.livingData.livingOrder.isTeam" key="14"> 合并联房 </a-menu-item>
+                            <a-menu-item v-if="roomLive.livingData &&  roomLive.livingData.livingOrder && roomLive.livingData.livingOrder.isRel" key="98"> 拆分房间 </a-menu-item>
                             <a-menu-item key="15"> 添加同住 </a-menu-item>
                             <a-menu-item key="15"> 添加同住 </a-menu-item>
-
-                            <a-menu-item key="16"> 结账退房 </a-menu-item>
-
-                            <a-menu-item key="17"> 撤销入住 </a-menu-item>
                           </template>
                           </template>
-
-                          <a-menu-item key="18"> 日志 </a-menu-item>
+                          
                         </a-menu>
                         </a-menu>
                       </a-dropdown>
                       </a-dropdown>
                     </a-popover>
                     </a-popover>
@@ -802,6 +861,7 @@
     <batchCardModal ref="batchCheckInModal" @ok="modalBatchhFormOk" />
     <batchCardModal ref="batchCheckInModal" @ok="modalBatchhFormOk" />
     <liveBatchCardModal ref="liveBatchCardModal" @ok="liveBatchCardOk" />
     <liveBatchCardModal ref="liveBatchCardModal" @ok="liveBatchCardOk" />
     <batchCardModalCopy ref="batchCardModalCopy" />
     <batchCardModalCopy ref="batchCardModalCopy" />
+    <fee-modal ref="modalFeeForm" @ok="modalLockRoomFormOk"></fee-modal>
 
 
     <!-- 右键菜单 -->
     <!-- 右键菜单 -->
     <look-room-modalVue ref="lookRoomModalVue" @ok="modalLockRoomFormOk" />
     <look-room-modalVue ref="lookRoomModalVue" @ok="modalLockRoomFormOk" />
@@ -871,6 +931,7 @@ import fangwuLookRoom from "./fangwuLookRoom.vue";
 import posOrderModal from "./posOrderModal.vue";
 import posOrderModal from "./posOrderModal.vue";
 import liveBatchCardModal from "./modules/checkIn/liveBatchCardModal.vue";
 import liveBatchCardModal from "./modules/checkIn/liveBatchCardModal.vue";
 import batchCardModalCopy from './modules/checkIn/batchCardModalCopy.vue'
 import batchCardModalCopy from './modules/checkIn/batchCardModalCopy.vue'
+import FeeModal from "./modules/checkIn/FeeModal.vue";
 
 
 import batchCardModal from "./modules/checkIn/batchCardModal.vue";
 import batchCardModal from "./modules/checkIn/batchCardModal.vue";
 
 
@@ -910,7 +971,8 @@ export default {
     posOrderModal,
     posOrderModal,
     batchCardModal,
     batchCardModal,
     liveBatchCardModal,
     liveBatchCardModal,
-    batchCardModalCopy
+    batchCardModalCopy,
+    FeeModal
   },
   },
   data() {
   data() {
     return {
     return {
@@ -1803,6 +1865,44 @@ export default {
             this.loadData();
             this.loadData();
           }
           }
         })
         })
+      }else if(e.key == 99){
+        console.log('商品销售');
+        this.$refs.modalFeeForm.add();
+        this.$refs.modalFeeForm.livingOrderId = row.livingData.livingOrder.id;
+        this.$refs.modalFeeForm.title = "增加消费项目";
+        this.$refs.modalFeeForm.disableSubmit = false;
+      }else if( e.key == 98 ){
+        this.$confirm({
+          title: "提示",
+          content: "确认要拆分房间?",
+          onOk: function () {
+            // var index = that.model.livingRoomIds.findLastIndex(
+            //   (t) => t.roomId == that.selectRoomId
+            // );
+            // var livingRoom = that.model.livingRoomIds[index];
+            httpAction(
+              "business/busRoomBookingOrders/split-living?livingOrderId=" +
+                row.livingData.livingOrder.id,
+              {},
+              "post"
+            )
+              .then((res) => {
+                if (res.success) {
+                  that.$message.success("拆分成功");
+                  // that.getBookingOrderInfo();
+                  // that.$emit("ok");
+                  this.loadData()
+                } else {
+                  that.$message.warning(res.message);
+                }
+              })
+              .finally(() => {
+                that.confirmLoading = false;
+              });
+          },
+        });
+      }else if( e.key==97 ){
+        that.$message.success("设置成功");
       }
       }
     },
     },
     modalBillRoomFormOk(e) {
     modalBillRoomFormOk(e) {

+ 2 - 1
src/views/room/modules/checkIn/FeeForm.vue

@@ -122,7 +122,8 @@ export default {
                 payType: 1,
                 payType: 1,
                 livingOrderId: "",
                 livingOrderId: "",
                 certType: 1,
                 certType: 1,
-                gender: 1
+                gender: 1,
+                subjectType: 6,
             },
             },
             queryParams: {},
             queryParams: {},
             labelCol: {
             labelCol: {