yuantianjiao 6 years ago
parent
commit
6b947233c6

+ 4
- 3
src/components/topCaseInfo/index.vue View File

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

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

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

+ 2
- 2
src/pages/user/mainPage/index.vue View File

48
     if (!this.userInfo.customer.MapUser || !this.$route.query.hideTabbar) {
48
     if (!this.userInfo.customer.MapUser || !this.$route.query.hideTabbar) {
49
       this.showTabBar = true
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 View File

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

+ 1
- 0
src/pages/user/orderList/index.vue View File

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

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

213
     ]),
213
     ]),
214
     toPlaceOrder () { // 下单 
214
     toPlaceOrder () { // 下单 
215
       if (this.selGoods.length) {
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
           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) } })
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
         } else {
218
         } else {
219
           this.showCalcMenu = true
219
           this.showCalcMenu = true
305
         this.toPay({
305
         this.toPay({
306
           info: JSON.stringify(this.postData.info),
306
           info: JSON.stringify(this.postData.info),
307
           detail: JSON.stringify(this.postData.detail),
307
           detail: JSON.stringify(this.postData.detail),
308
-          customercouponid: JSON.stringify(this.postData.coupon) || '',
308
+          customercouponid: '',
309
           from: this.postData.from
309
           from: this.postData.from
310
         }).then((res) => {
310
         }).then((res) => {
311
           this.ajaxOff = true
311
           this.ajaxOff = true