wangfei 6 vuotta sitten
vanhempi
commit
8d996386ec

+ 3
- 3
src/pages/sales/salesRecord/index.vue Näytä tiedosto

@@ -64,7 +64,7 @@ export default {
64 64
     ]),
65 65
     fibdata (item) {
66 66
       const couponfib = this.forbidList.filter(x => x.UserId === item.UserId && x.ForbidType === 'coupon').length > 0 ? true : false
67
-      const orderfib = this.forbidList.filter(x => x.UserId === item.UserId && x.ForbidType === 'order').length > 0 ? true : false
67
+      const orderfib = this.forbidList.filter(x => x.UserId === item.UserId && x.ForbidType === 'goods').length > 0 ? true : false
68 68
       return {
69 69
         'coupon': couponfib,
70 70
         'order': orderfib
@@ -94,9 +94,9 @@ export default {
94 94
     triggerDrink (val) { // 切换饮品状态 type='close':关闭;type='open':开启;
95 95
       console.log(val)
96 96
       if (val.type === 'open') {
97
-        this.putForbid({ userid: val.data.UserId, type: 'order' })
97
+        this.putForbid({ userid: val.data.UserId, type: 'goods' })
98 98
       } else {
99
-        this.putForbidOpen({ userid: val.data.UserId, type: 'order' })
99
+        this.putForbidOpen({ userid: val.data.UserId, type: 'goods' })
100 100
       }
101 101
       this.init()
102 102
     },

+ 13
- 3
src/pages/user/mainPage/coffeeIndex/index.vue Näytä tiedosto

@@ -34,9 +34,12 @@
34 34
                           <span>{{item.AreaName}}</span>
35 35
                         </div>
36 36
                         <ul class="subAreaList flex-h">
37
-                          <router-link tag="li" class="flex-item flex-h" v-for="(subItem,subIndex) in item.Tables" :key="subIndex" :to="{name: 'placeOrder', query: { tableid: encodeURI(subItem.TableId), tableno: encodeURI(subItem.TableNo), caseid: encodeURI(subItem.CaseId), casename: encodeURI(topCaseInfoData.caseName), areaid: encodeURI(subItem.AreaId), areaname: encodeURI(item.AreaName)}}">
37
+                          <!-- <router-link tag="li" class="flex-item flex-h" v-for="(subItem,subIndex) in item.Tables" :key="subIndex" :to="{name: 'placeOrder', query: { tableid: encodeURI(subItem.TableId), tableno: encodeURI(subItem.TableNo), caseid: encodeURI(subItem.CaseId), casename: encodeURI(topCaseInfoData.caseName), areaid: encodeURI(subItem.AreaId), areaname: encodeURI(item.AreaName)}}">
38 38
                             <caseTableItem :icon="item.AreaIcon" :item="subItem" :index="subIndex"></caseTableItem>
39
-                          </router-link>
39
+                          </router-link> -->
40
+                          <li class="flex-item flex-h" v-for="(subItem,subIndex) in item.Tables" :key="subIndex" @click="toOrders(subItem, item)">
41
+                            <caseTableItem :icon="item.AreaIcon" :item="subItem" :index="subIndex"></caseTableItem>
42
+                          </li>
40 43
                           <li class="flex-item noData" v-if="(item.Tables || []).length % 2 != 0"></li>
41 44
                         </ul>
42 45
                       </li>
@@ -340,6 +343,7 @@ export default {
340 343
     ]),
341 344
     ...mapCaseActions([
342 345
       'getCaseTotal',
346
+      'getCaseConf',
343 347
     ]),
344 348
     ...mapCardActions(['getCardList']),
345 349
     returnInvalid (item, type) {
@@ -481,7 +485,13 @@ export default {
481 485
       } else {
482 486
         done()
483 487
       }
484
-    }
488
+    },
489
+    toOrders (subItem, item) {
490
+
491
+
492
+
493
+      this.$router.push({name: 'placeOrder', query: { tableid: encodeURI(subItem.TableId), tableno: encodeURI(subItem.TableNo), caseid: encodeURI(subItem.CaseId), casename: encodeURI(this.topCaseInfoData.caseName), areaid: encodeURI(subItem.AreaId), areaname: encodeURI(item.AreaName)}})
494
+    },
485 495
   }
486 496
 }
487 497
 </script>

+ 19
- 0
src/store/case/case.js Näytä tiedosto

@@ -6,11 +6,15 @@ export default {
6 6
   namespaced: true,
7 7
   state: {
8 8
     caseTotal: {},
9
+    caseConf: {},
9 10
   },
10 11
   mutations: {
11 12
     setCaseTotal (state, data) { // 获取案场下单数量信息
12 13
       state.caseTotal = data
13 14
     },
15
+    setCaseConf (state, data) { // 获取案场下单数量信息
16
+      state.caseConf = data
17
+    },
14 18
   },
15 19
   actions: {
16 20
     getCaseTotal ({ commit }, { caseid }) {
@@ -28,5 +32,20 @@ export default {
28 32
         })
29 33
       })
30 34
     },
35
+    getCaseConf ({ commit },{ caseid }) {
36
+      return new Promise((resolve, reject) => {
37
+        Ajax(api.case.conf.url, {
38
+          method: api.case.conf.method,
39
+          urlData: {
40
+            caseid
41
+          }
42
+        }).then(res => {
43
+          commit("setCaseConf", res)
44
+          resolve(res)
45
+        }).catch((err) => {
46
+          reject(err)
47
+        })
48
+      })
49
+    }
31 50
   }
32 51
 }

+ 6
- 2
src/util/api.js Näytä tiedosto

@@ -1,5 +1,5 @@
1
-const baseUrl = '/api-v2'
2
-// const baseUrl = '/api'
1
+// const baseUrl = '/api-v2'
2
+const baseUrl = '/api'
3 3
 const wechat = '/wechat/:org'
4 4
 const guest = '/guest/:org'
5 5
 
@@ -201,6 +201,10 @@ const $api = {
201 201
       method: 'get',
202 202
       url: `${baseUrl}${wechat}/goods/case/:caseid`
203 203
     },
204
+    conf: {
205
+      method: 'get',
206
+      url: `${baseUrl}${wechat}/case/conf/:caseid`
207
+    },
204 208
   },
205 209
   goods: {
206 210
     getCustOrders: {