yuantianjiao 6 år sedan
förälder
incheckning
6b947233c6

+ 4
- 3
src/components/topCaseInfo/index.vue Visa fil

@@ -2,7 +2,7 @@
2 2
   <div class="topCaseInfo flex-h">
3 3
     <i class="iconfont icon-dingwei"></i>
4 4
       <span>{{data.caseName}}</span>
5
-      <a v-if="data.ShowSelect" @click="selectCase">请选择</a>
5
+      <a v-if="data.ShowSelect && from !== 'sales'" @click="selectCase">请选择</a>
6 6
       <div class="flex-item">
7 7
         <span>{{userName}}您好!</span>
8 8
       </div>
@@ -16,7 +16,7 @@ export default {
16 16
   props: ['data', 'userName'],
17 17
   data () {
18 18
     return {
19
-
19
+      from: ''
20 20
     }
21 21
   },
22 22
   computed: {
@@ -26,7 +26,8 @@ export default {
26 26
 
27 27
   },
28 28
   created () {
29
-
29
+    this.from = sessionStorage.getItem('from')
30
+    console.log(this.from)
30 31
   },
31 32
   methods: {
32 33
     selectCase () { // 选择案场

+ 5
- 3
src/pages/user/mainPage/coffeeIndex/index.vue Visa fil

@@ -3,14 +3,14 @@
3 3
     <div class="top">
4 4
       <topCaseInfo :data="topCaseInfoData" :userName="userInfo.customer.RealName ? userInfo.customer.RealName : userInfo.customer.Name" @selectCase="showVanPicker"></topCaseInfo>
5 5
     </div>
6
-    <nav class="flex-h" v-if="userInfo.customer.MapUser !== ''">
6
+    <nav class="flex-h" v-if="userInfo.customer.MapUser !== '' && fromPage === 'sales'">
7 7
       <a class="flex-item" v-for="(item,index) in cutNavList" :key="index" v-if="userInfo.customer.UserTypeId !== 'manager' || item.id !== '4'" :class="{'active': navActive === index}" @click="cutNav(index)">{{item.value}}</a>
8 8
     </nav>
9 9
       <div class="content">
10 10
         <div>
11 11
           <ul>
12 12
             <li :hidden="navActive !== 0 && userInfo.customer.MapUser !== ''" class="placeOrder">
13
-              <div class="topInfo flex-h" v-if="userInfo.customer.MapUser !== ''">
13
+              <div class="topInfo flex-h" v-if="userInfo.customer.MapUser !== '' && fromPage === 'sales'">
14 14
                 <div class="flex-item">
15 15
                   <div>
16 16
                     <span>共计已使用:{{caseTotal.total}}杯</span>
@@ -146,6 +146,7 @@ export default {
146 146
   name: '',
147 147
   data () {
148 148
     return {
149
+      fromPage: '',
149 150
       myRecommendUserList: [],
150 151
       forbidList: [],
151 152
       postCustomerData: {
@@ -261,6 +262,7 @@ export default {
261 262
     noMore
262 263
   },
263 264
   created () {
265
+    this.fromPage = sessionStorage.getItem('from')
264 266
     if (!this.userInfo.customer.MapUser) {
265 267
       this.topCaseInfoData.ShowSelect = true
266 268
     }
@@ -562,7 +564,7 @@ export default {
562 564
     toOrders (subItem, item) {
563 565
       const _that = this
564 566
       this.getCaseConf({ caseid: subItem.CaseId }).then(res => {
565
-        if (this.checkCanOrder()) {
567
+        if (this.checkCanOrder() && sessionStorage.getItem('from') === 'sales') {
566 568
           _that.$toast('您的点单功能已被关闭!')
567 569
           return
568 570
         }

+ 2
- 2
src/pages/user/mainPage/index.vue Visa fil

@@ -48,8 +48,8 @@ export default {
48 48
     if (!this.userInfo.customer.MapUser || !this.$route.query.hideTabbar) {
49 49
       this.showTabBar = true
50 50
     }
51
-    if (this.$route.query.hideTabbar){
52
-      sessionStorage.setItem('from','sales')
51
+    if (this.$route.query.hideTabbar) {
52
+      sessionStorage.setItem('from', 'sales')
53 53
     }
54 54
   }
55 55
 }

+ 3
- 1
src/pages/user/mainPage/userCenter/index.vue Visa fil

@@ -86,6 +86,8 @@ export default {
86 86
       this.user = this.userInfo.customer
87 87
       if (this.user.AccountInfo) {
88 88
         this.AccountInfo = JSON.parse(this.user.AccountInfo)
89
+
90
+        
89 91
       }
90 92
       this.headimgurl = this.user.Headimgurl
91 93
     })
@@ -109,7 +111,7 @@ export default {
109 111
       this.$router.push({ name: 'bindMobile' })
110 112
     },
111 113
     toGoodsOrder () {
112
-      this.$router.push({ name: 'orderList' })
114
+      this.$router.push({ name: 'orderList', query: { from: 'c' } })
113 115
     },
114 116
     toBodyCheck () {
115 117
       var url = window.location.pathname

+ 1
- 0
src/pages/user/orderList/index.vue Visa fil

@@ -79,6 +79,7 @@ export default {
79 79
     this.getCustomerGoodsOrder({
80 80
       page: this.page,
81 81
       pagesize: this.pagesize,
82
+      from: this.$route.query.from || ''
82 83
     }).then((res) => {
83 84
       // console.log(JSON.stringify(res))
84 85
       if(res.list === null){

+ 2
- 2
src/pages/user/placeOrder/index.vue Visa fil

@@ -213,7 +213,7 @@ export default {
213 213
     ]),
214 214
     toPlaceOrder () { // 下单 
215 215
       if (this.selGoods.length) {
216
-        if (this.userInfo.customer.MapUser === '') {
216
+        if (this.userInfo.customer.MapUser === '' || (this.userInfo.customer.MapUser !== '' && sessionStorage.getItem('from') !== 'sales')) {
217 217
           this.$router.push({ name: 'placeOrderDetail', query: { info: JSON.stringify(this.selGoods), caseid: encodeURI(this.caseId), areaid: encodeURI(this.areaId), areaname: encodeURI(this.areaName), areaid: encodeURI(this.areaId), tableid: encodeURI(this.tableId), tableno: encodeURI(this.tableNo) } })
218 218
         } else {
219 219
           this.showCalcMenu = true
@@ -305,7 +305,7 @@ export default {
305 305
         this.toPay({
306 306
           info: JSON.stringify(this.postData.info),
307 307
           detail: JSON.stringify(this.postData.detail),
308
-          customercouponid: JSON.stringify(this.postData.coupon) || '',
308
+          customercouponid: '',
309 309
           from: this.postData.from
310 310
         }).then((res) => {
311 311
           this.ajaxOff = true