许成详 преди 6 години
родител
ревизия
0d600bcbc1
променени са 1 файла, в които са добавени 11 реда и са изтрити 1 реда
  1. 11
    1
      src/pages/user/placeOrder/index.vue

+ 11
- 1
src/pages/user/placeOrder/index.vue Целия файл

@@ -16,7 +16,7 @@
16 16
         <div class="flex-item">
17 17
           <div>
18 18
             <span>桌号:{{tableNo}}</span>
19
-            <!-- <span>本月已用:150杯</span> -->
19
+            <span v-if="userInfo.customer.MapUser !== ''">本月已用:{{caseTotal.monthtotal}}杯</span>
20 20
           </div>
21 21
         </div>
22 22
         <a @click="reback">返回选择桌号</a>
@@ -78,6 +78,7 @@
78 78
 <script>
79 79
 import { mapState, createNamespacedHelpers } from 'vuex'
80 80
 const { mapActions: caseTableActions } = createNamespacedHelpers('placeOrderForCoffee')
81
+const { mapState: mapCaseState, mapActions: mapCaseActions } = createNamespacedHelpers('case')
81 82
 import orderItem from '../../../components/orderItem/index'
82 83
 import orderPopup from '../../../components/orderPopup/index'
83 84
 import calcMenu from '../../../components/calcMenu/index'
@@ -145,6 +146,9 @@ export default {
145 146
       goodsTypeList: x => x.placeOrderForCoffee.goodsTypeList,
146 147
       goodsList: x => x.placeOrderForCoffee.goodsList
147 148
     }),
149
+    ...mapCaseState({
150
+      caseTotal: x => x.caseTotal,
151
+    }),
148 152
     MySwiper () {
149 153
       return this.$refs.mySwiper.swiper
150 154
     },
@@ -184,6 +188,9 @@ export default {
184 188
         // console.log(JSON.stringify(res))
185 189
         this.mapArr()
186 190
       })
191
+      this.getCaseTotal({
192
+        caseid: this.caseId
193
+      })
187 194
     })
188 195
   },
189 196
   methods: {
@@ -192,6 +199,9 @@ export default {
192 199
       'getGoodsList',
193 200
       'toPay',
194 201
     ]),
202
+    ...mapCaseActions([
203
+      'getCaseTotal',
204
+    ]),
195 205
     toPlaceOrder () { // 下单 
196 206
       if (this.selGoods.length) {
197 207
         if (this.userInfo.customer.MapUser === '') {