许成详 6 years ago
parent
commit
0d600bcbc1
1 changed files with 11 additions and 1 deletions
  1. 11
    1
      src/pages/user/placeOrder/index.vue

+ 11
- 1
src/pages/user/placeOrder/index.vue View File

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