许成详 6 년 전
부모
커밋
3451738068
3개의 변경된 파일48개의 추가작업 그리고 5개의 파일을 삭제
  1. 10
    3
      src/pages/user/placeOrder/index.vue
  2. 1
    1
      src/pages/user/placeOrderForCourse/index.vue
  3. 37
    1
      src/util/contants.js

+ 10
- 3
src/pages/user/placeOrder/index.vue 파일 보기

@@ -67,8 +67,8 @@
67 67
           <i class="iconfont" :class="{'icon-jiantou-up': !showCalcMenu,'icon-jiantou-down': showCalcMenu}" @click="showCalcMenu = true"></i>
68 68
         </div>
69 69
       </div>
70
-      <router-link :to="{name: 'placeOrderDetail', query: {info: JSON.stringify(settlementList), caseid: encodeURI(caseId), areaid: encodeURI(areaId), areaname: encodeURI(areaName), areaid: encodeURI(areaId), tableid: encodeURI(tableId), tableno: encodeURI(tableNo)}}">下单</router-link>
71
-      <!-- <a @click="showCalcMenu = true">下单</a> -->
70
+      <!-- <router-link :to="{name: 'placeOrderDetail', query: {info: JSON.stringify(settlementList), caseid: encodeURI(caseId), areaid: encodeURI(areaId), areaname: encodeURI(areaName), areaid: encodeURI(areaId), tableid: encodeURI(tableId), tableno: encodeURI(tableNo)}}">下单</router-link> -->
71
+      <a @click="toPlaceOrder">下单</a>
72 72
     </div>
73 73
     <orderPopup :show="showPopup" :data="currentSpec" @closePopup="closePopup" @returnData="calcMenus"></orderPopup>
74 74
     <calcMenu :show="showCalcMenu" :totalNum="totalCupNum" :data="settlementList" @returnData="calcMenus" @emptyMenus="emptyMenus" @closeCalcMenu="closeCalcMenu" @placeOrder="placeOrder"></calcMenu>
@@ -259,6 +259,13 @@ export default {
259 259
       'getGoodsTypeList',
260 260
       'getGoodsList',
261 261
     ]),
262
+    toPlaceOrder () { // 下单 
263
+      if(this.settlementList.length){
264
+        this.$router.push({name: 'placeOrderDetail', query: {info: JSON.stringify(this.settlementList), caseid: encodeURI(this.caseId), areaid: encodeURI(this.areaId), areaname: encodeURI(this.areaName), areaid: encodeURI(this.areaId), tableid: encodeURI(this.tableId), tableno: encodeURI(this.tableNo)}})
265
+      }else{
266
+        this.$toast('您还没有选择商品哦~')
267
+      }
268
+    },
262 269
     mapArr () { // 匹配商品规格
263 270
       var aArr = this.goodsTypeList, bArr = this.goodsList
264 271
       for (var n = 0; n < aArr.length; n++) {
@@ -307,7 +314,7 @@ export default {
307 314
         title: '提示',
308 315
         message: '返回页面将清空当前选择的商品,确定要返回吗?'
309 316
       }).then(() => {
310
-        this.$router.push({name: 'coffeeIndex'})
317
+        this.$router.push({ name: 'coffeeIndex' })
311 318
       })
312 319
     },
313 320
     placeOrder () { // 下单

+ 1
- 1
src/pages/user/placeOrderForCourse/index.vue 파일 보기

@@ -36,7 +36,7 @@
36 36
                     <span>地点</span>
37 37
                   </div>
38 38
                 </div>
39
-                <!-- <span>{{courseDetail.CaseInfo.CaseAddress}}</span> -->
39
+                <span v-if="courseDetail.CaseInfo !== undefined">{{courseDetail.CaseInfo.CaseAddress}}</span>
40 40
               </li>
41 41
               <li class="flex-h">
42 42
                 <div class="flex-item">

+ 37
- 1
src/util/contants.js 파일 보기

@@ -12,7 +12,43 @@ const dict = {
12 12
   }, {
13 13
     value: '已取消',
14 14
     key: 'cancel'
15
-  }]
15
+  }],
16
+  gymCard: [{ // 健身卡字典
17
+    value: '次卡',
18
+    key: 'once'
19
+  }, {
20
+    value: '月卡',
21
+    key: 'month'
22
+  }, {
23
+    value: '季卡',
24
+    key: 'quarter'
25
+  }, {
26
+    value: '年卡',
27
+    key: 'year'
28
+  }],
29
+  consumptionType: [{ // 消费类型字典
30
+    value: '系统用户',
31
+    key: 'sys user'
32
+  }, {
33
+    value: '优惠券',
34
+    key: 'coupon'
35
+  }, {
36
+    value: '积分',
37
+    key: 'points'
38
+  }, {
39
+    value: '城币',
40
+    key: 'cheng-coin'
41
+  }],
42
+  userType: [{ // 用户类型
43
+    value: '销售',
44
+    key: 'sales'
45
+  }, {
46
+    value: '主管',
47
+    key: 'manager'
48
+  }, {
49
+    value: '用户',
50
+    key: 'customer'
51
+  }],
16 52
 }
17 53
 
18 54
 export default dict