Преглед на файлове

修改消息提醒界面

许智捷 преди 2 години
родител
ревизия
49866e079d
променени са 2 файла, в които са добавени 12 реда и са изтрити 7 реда
  1. 8 4
      src/components/tools/HeaderNotice.vue
  2. 4 3
      src/views/pos/diandan.vue

+ 8 - 4
src/components/tools/HeaderNotice.vue

@@ -30,11 +30,11 @@
               </a-list-item>
             </a-list>-->
             <a-tabs size="small" class="header_notice">
-              <a-tab-pane tab="房间消息" key="1">
+              <a-tab-pane :tab='"房间消息(" + roomAnnouncements.length + ")"' key="1">
                 <a-list>
                   <a-list-item
                       :key="index"
-                      v-for="(record, index) in announcement1"
+                      v-for="(record, index) in roomAnnouncements"
                   >
                     <div style="margin-left: 5%; width: 80%">
                       <p>
@@ -78,11 +78,11 @@
               <a-tab-pane tab="资产消息" key="3">
 
               </a-tab-pane>
-              <a-tab-pane tab="订单消息" key="4">
+              <a-tab-pane :tab='"订单消息(" + orderAnnouncements.length + ")"' key="4">
                 <a-list>
                   <a-list-item
                       :key="index"
-                      v-for="(record, index) in announcement2"
+                      v-for="(record, index) in orderAnnouncements"
                   >
                     <div style="margin-left: 5%; width: 80%">
                       <p>
@@ -180,6 +180,8 @@ export default {
       hovered: false,
       announcement1: [],
       announcement2: [],
+      roomAnnouncements: [],
+      orderAnnouncements: [],
       msg1Count: "0",
       msg2Count: "0",
       msg1Title: "通知(0)",
@@ -228,6 +230,8 @@ export default {
           .then((res) => {
             if (res.success) {
               this.announcement1 = res.result.anntMsgList;
+              this.roomAnnouncements = res.result.anntMsgList.filter(e => e.msgCategoryDetail === '1');
+              this.orderAnnouncements = res.result.anntMsgList.filter(e => e.msgCategoryDetail === '4');
               this.msg1Count = res.result.anntMsgTotal;
               this.msg1Title = "通知(" + res.result.anntMsgTotal + ")";
               this.announcement2 = res.result.sysMsgList;

+ 4 - 3
src/views/pos/diandan.vue

@@ -67,7 +67,7 @@
             <a-button v-if="!btnDisabled && selectGoodsList.length !== 0" @click="unionStation('转菜','2')" :disabled="transferDishesList.length == 0"  style="margin-left: 10px;">转菜</a-button>
             <a-button v-if="!btnDisabled" @click="unionStation('换台','0')" style="margin-left: 10px;">换台</a-button>
             <a-button v-if="isUnionStation" @click="unlink" style="margin-left: 10px;">取消联台</a-button>
-            
+
             <!-- <a-button @click="pendingOrder">挂单</a-button> -->
             <!-- <a-button v-else @click="handlePickingGoodsOrder">取单</a-button> -->
           </div>
@@ -917,7 +917,7 @@ export default {
           this.unionOpen = false
         })
       }
-      
+
       console.log(this.posTableId);
     },
     // 联台大厅tab切换
@@ -943,6 +943,7 @@ export default {
         pageSize: 99999,
         posTypeId: this.tabPosTypeId,
         state: index,
+        id: this.tableId
       };
       if (this.tabPosRegionId != "1") {
         obj.posRegionId = this.tabPosRegionId;
@@ -993,7 +994,7 @@ export default {
         }
         this.unionOpen = false
       });
-      
+
     }
   }
 }