Browse Source

Merge branch 'dev' of http://git.ycjcjy.com/SpaceOfCheng/wechat into dev

yuantianjiao 6 years ago
parent
commit
e358b9f28c

+ 3
- 3
src/pages/sales/salesRecord/index.vue View File

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

+ 13
- 3
src/pages/user/mainPage/coffeeIndex/index.vue View File

34
                           <span>{{item.AreaName}}</span>
34
                           <span>{{item.AreaName}}</span>
35
                         </div>
35
                         </div>
36
                         <ul class="subAreaList flex-h">
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
                             <caseTableItem :icon="item.AreaIcon" :item="subItem" :index="subIndex"></caseTableItem>
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
                           <li class="flex-item noData" v-if="(item.Tables || []).length % 2 != 0"></li>
43
                           <li class="flex-item noData" v-if="(item.Tables || []).length % 2 != 0"></li>
41
                         </ul>
44
                         </ul>
42
                       </li>
45
                       </li>
343
     ]),
346
     ]),
344
     ...mapCaseActions([
347
     ...mapCaseActions([
345
       'getCaseTotal',
348
       'getCaseTotal',
349
+      'getCaseConf',
346
     ]),
350
     ]),
347
     ...mapCardActions(['getCardList']),
351
     ...mapCardActions(['getCardList']),
348
     returnInvalid (item, type) {
352
     returnInvalid (item, type) {
494
       } else {
498
       } else {
495
         done()
499
         done()
496
       }
500
       }
497
-    }
501
+    },
502
+    toOrders (subItem, item) {
503
+
504
+
505
+
506
+      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)}})
507
+    },
498
   }
508
   }
499
 }
509
 }
500
 </script>
510
 </script>

+ 19
- 0
src/store/case/case.js View File

6
   namespaced: true,
6
   namespaced: true,
7
   state: {
7
   state: {
8
     caseTotal: {},
8
     caseTotal: {},
9
+    caseConf: {},
9
   },
10
   },
10
   mutations: {
11
   mutations: {
11
     setCaseTotal (state, data) { // 获取案场下单数量信息
12
     setCaseTotal (state, data) { // 获取案场下单数量信息
12
       state.caseTotal = data
13
       state.caseTotal = data
13
     },
14
     },
15
+    setCaseConf (state, data) { // 获取案场下单数量信息
16
+      state.caseConf = data
17
+    },
14
   },
18
   },
15
   actions: {
19
   actions: {
16
     getCaseTotal ({ commit }, { caseid }) {
20
     getCaseTotal ({ commit }, { caseid }) {
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 View File

1
-const baseUrl = '/api-v2'
2
-// const baseUrl = '/api'
1
+// const baseUrl = '/api-v2'
2
+const baseUrl = '/api'
3
 const wechat = '/wechat/:org'
3
 const wechat = '/wechat/:org'
4
 const guest = '/guest/:org'
4
 const guest = '/guest/:org'
5
 
5
 
201
       method: 'get',
201
       method: 'get',
202
       url: `${baseUrl}${wechat}/goods/case/:caseid`
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
   goods: {
209
   goods: {
206
     getCustOrders: {
210
     getCustOrders: {