yuantianjiao 6 years ago
parent
commit
a75e31d687

BIN
src/common/icon/Group 3@3x.png View File


BIN
src/common/icon/bottomMsg.png View File


+ 8
- 4
src/components/myCard/myCard.vue View File

63
   methods: {
63
   methods: {
64
     share () {
64
     share () {
65
       if (!this.data.invalid) {
65
       if (!this.data.invalid) {
66
-        this.$emit('share', this.data)
66
+        if (this.isgrey) {
67
+          this.$toast('您的卡券分享功能已被关闭,请联系主管')
68
+        } else {
69
+          this.$emit('share', this.data)
70
+        }
67
       }
71
       }
68
     }
72
     }
69
   }
73
   }
90
       display: -webkit-box;
94
       display: -webkit-box;
91
       -webkit-line-clamp: 2;
95
       -webkit-line-clamp: 2;
92
       -webkit-box-orient: vertical;
96
       -webkit-box-orient: vertical;
93
-      height: .32rem;
94
-      line-height: .16rem;
97
+      height: 0.32rem;
98
+      line-height: 0.16rem;
95
     }
99
     }
96
     div:nth-of-type(1) {
100
     div:nth-of-type(1) {
97
       width: 1.15rem;
101
       width: 1.15rem;
128
       }
132
       }
129
       span {
133
       span {
130
         color: #323645;
134
         color: #323645;
131
-        font-size: 12px;      
135
+        font-size: 12px;
132
         padding-top: 0.05rem;
136
         padding-top: 0.05rem;
133
       }
137
       }
134
     }
138
     }

+ 6
- 5
src/components/noMore/noMore.vue View File

16
 </script>
16
 </script>
17
 
17
 
18
 <style lang="scss" scoped>
18
 <style lang="scss" scoped>
19
-.nomore{
20
-  img{
21
-    width: 100%;
19
+.nomore {
20
+  img {
21
+    width: 40%;
22
     position: absolute;
22
     position: absolute;
23
-    top: 40%;
24
-    transform: translateX(-50%);
23
+    top: 50%;
24
+    left: 50%;
25
+    transform: translate(-50%, -50%);
25
   }
26
   }
26
 }
27
 }
27
 </style>
28
 </style>

+ 1
- 1
src/components/orderItem/index.vue View File

18
           </div>
18
           </div>
19
         </div>
19
         </div>
20
         <i class="iconfont icon-jian" :class="{'active': defaultNum > 0}" @click="subtract" v-if="!data.spec.length && data.status === 1"></i>
20
         <i class="iconfont icon-jian" :class="{'active': defaultNum > 0}" @click="subtract" v-if="!data.spec.length && data.status === 1"></i>
21
-        <input v-if="!data.spec.length && data.status === 1" type="tel" @input="input" v-model="defaultNum">
21
+        <input v-if="!data.spec.length && data.status === 1" type="tel" @input="input" v-model="defaultNum" readonly style="color:#000;">
22
         <i class="iconfont icon-jia" :class="{'active': defaultNum > 0}" @click="add" v-if="!data.spec.length && data.status === 1"></i>
22
         <i class="iconfont icon-jia" :class="{'active': defaultNum > 0}" @click="add" v-if="!data.spec.length && data.status === 1"></i>
23
         <a v-if="data.spec.length && data.status === 1" @click="selectSpec">选规格</a>
23
         <a v-if="data.spec.length && data.status === 1" @click="selectSpec">选规格</a>
24
         <span v-if="data.status !== 1">已售罄</span>
24
         <span v-if="data.status !== 1">已售罄</span>

+ 1
- 1
src/components/orderPopup/index.vue View File

22
           </div>
22
           </div>
23
         </div>
23
         </div>
24
         <i class="iconfont icon-jian" @click="subtract"></i>
24
         <i class="iconfont icon-jian" @click="subtract"></i>
25
-        <input type="tel" v-model="num">
25
+        <input type="tel" v-model="num" readonly style="color:#000;">
26
         <i class="iconfont icon-jia" @click="add"></i>
26
         <i class="iconfont icon-jia" @click="add"></i>
27
         <a @click="sure">确定</a>
27
         <a @click="sure">确定</a>
28
       </div>
28
       </div>

+ 3
- 2
src/pages/sales/customerSearch/page.scss View File

89
         height: .3rem;
89
         height: .3rem;
90
         background: #eee;
90
         background: #eee;
91
         border-radius: .08rem;
91
         border-radius: .08rem;
92
-        padding-left: .2rem;
92
+        padding-left: .3rem;
93
         line-height: .3rem;
93
         line-height: .3rem;
94
+        padding-top: .03rem;
94
       }
95
       }
95
       i{
96
       i{
96
         font-size: .16rem;
97
         font-size: .16rem;
97
         position: absolute;
98
         position: absolute;
98
-        top: .16rem;
99
+        top: .18rem;
99
         left: .23rem;
100
         left: .23rem;
100
         color: #aaa;
101
         color: #aaa;
101
       }
102
       }

+ 7
- 1
src/pages/user/bindMobile/bindMobile.vue View File

110
           }
110
           }
111
         }
111
         }
112
       }
112
       }
113
+      if (this.caseInfo.manager) {
114
+        for (let i = 0; i < this.caseInfo.manager.length; i++) {
115
+          if (this.caseInfo.manager[i].CaseId === this.postData.case) {
116
+            this.columnsS.push(this.caseInfo.manager[i])
117
+          }
118
+        }
119
+      }
113
       this.showCase = false
120
       this.showCase = false
114
     },
121
     },
115
     onCancelC () {
122
     onCancelC () {
169
       //   return
176
       //   return
170
       // }
177
       // }
171
       this.submitData(this.postData).then((res) => {
178
       this.submitData(this.postData).then((res) => {
172
-        this.$toast(res)
173
         if (this.$route.query.isLottery) {
179
         if (this.$route.query.isLottery) {
174
           setTimeout(() => {
180
           setTimeout(() => {
175
             const from = this.$route.query.luckshare ? `#/from/${this.$route.query.luckshare}` : ''
181
             const from = this.$route.query.luckshare ? `#/from/${this.$route.query.luckshare}` : ''

+ 25
- 19
src/pages/user/card/index.vue View File

3
     <nav class="flex-h" v-if='false'>
3
     <nav class="flex-h" v-if='false'>
4
       <a class="flex-item" v-for="(item,index) in nav" :key="index" :class="{'active':index==active}" @click="change(item,index)">{{item}}</a>
4
       <a class="flex-item" v-for="(item,index) in nav" :key="index" :class="{'active':index==active}" @click="change(item,index)">{{item}}</a>
5
     </nav>
5
     </nav>
6
-    <scroll ref='scroll' :isloading='isloading' class='wrapper' :data='data[active].list' :pullUpLoad='pullUpLoadObj' :startY='parseInt(startY)' @pullingUp='getList'>
6
+    <div style="background:#fff;">
7
+    <!-- <scroll ref='scroll' :isloading='isloading' class='wrapper' :data='data[active].list' :pullUpLoad='pullUpLoadObj' :startY='parseInt(startY)' @pullingUp='getList'> -->
7
       <div class="box">
8
       <div class="box">
8
         <div v-if="active == 0">
9
         <div v-if="active == 0">
9
           <discounts v-for="(item,index) in data[0].list" :key='index' @toUse='toUse' :data='item' @toDetail="toCardDetail(item)"></discounts>
10
           <discounts v-for="(item,index) in data[0].list" :key='index' @toUse='toUse' :data='item' @toDetail="toCardDetail(item)"></discounts>
29
               </div>
30
               </div>
30
               <div class="card-bottom">
31
               <div class="card-bottom">
31
                 <img :src="line" alt="">
32
                 <img :src="line" alt="">
32
-                <div class="time">有效期:{{toolClass.dateFormat(item.EndDate)}}</div>
33
+                <div class="time">有效期:{{toolClass.dateFormat(item.EndDate,'yyyy-MM-dd')}}</div>
33
                 <div class="status" :class="{'gray-location' : item.CardStatus == 'used'}">
34
                 <div class="status" :class="{'gray-location' : item.CardStatus == 'used'}">
34
                   <span v-if="item.GymType == 'year'">年卡</span>
35
                   <span v-if="item.GymType == 'year'">年卡</span>
35
                   <span v-if="item.GymType == 'quarter'">季卡</span>
36
                   <span v-if="item.GymType == 'quarter'">季卡</span>
46
           <noMore v-if="data[active].hasPic"></noMore>
47
           <noMore v-if="data[active].hasPic"></noMore>
47
         </div>
48
         </div>
48
       </div>
49
       </div>
49
-    </scroll>
50
+    </div>
51
+    <!-- </scroll> -->
50
   </div>
52
   </div>
51
 </template>
53
 </template>
52
 
54
 
80
           hasPic: false,
82
           hasPic: false,
81
           hasMore: true,
83
           hasMore: true,
82
           page: 1,
84
           page: 1,
83
-          pageSize: 1,
85
+          pagesize: 1,
84
           list: []
86
           list: []
85
         },
87
         },
86
         {
88
         {
87
           hasPic: false,
89
           hasPic: false,
88
           hasMore: true,
90
           hasMore: true,
89
           page: 0,
91
           page: 0,
90
-          pageSize: 10,
92
+          pagesize: 10000,
91
           list: []
93
           list: []
92
         }
94
         }
93
       ],
95
       ],
118
   created () {
120
   created () {
119
     this.change('', 0)
121
     this.change('', 0)
120
     this.getCardList().then((res) => {
122
     this.getCardList().then((res) => {
121
-      for (var n = 0; n < res.length; n++) {
122
-        this.data[0].list.push({
123
-          title: res[n].CardName,
124
-          desc: res[n].Share.CardUseRule,
125
-          time: this.toolClass.dateFormat(res[n].EndDate),
126
-          useType: res[n].Status === 1 ? '未使用' : '已使用',
127
-          tag: '共享',
128
-          cardid: res[n].CardId
129
-        })
123
+      if (res) {
124
+        for (var n = 0; n < res.length; n++) {
125
+          this.data[0].list.push({
126
+            title: res[n].CustomerCardName,
127
+            desc: res[n].Share.CardUseRule,
128
+            time: this.toolClass.dateFormat(res[n].EndDate, 'yyyy-MM-dd'),
129
+            useType: res[n].Status === 1 ? '未使用' : '已使用',
130
+            tag: '共享',
131
+            CustomerCourseId: res[n].CustomerCourseId,
132
+            CustomerCardId: res[n].CustomerCardId
133
+          })
134
+        }
135
+      } else {
136
+        this.data[this.active].hasPic
130
       }
137
       }
131
     })
138
     })
132
   },
139
   },
141
     },
148
     },
142
     toUse (item) {
149
     toUse (item) {
143
       console.log(item)
150
       console.log(item)
144
-      this.$router.push({ name: 'lessonDetail', query: {id: item.CustomerCourseId} })
145
-      // this.$router.push({ name: 'lessonOrder' })
151
+      this.$router.push({ name: 'lessonDetail', query: { id: item.CustomerCourseId } })
146
     },
152
     },
147
     getList (param) {
153
     getList (param) {
148
       if (this.active === 0) {
154
       if (this.active === 0) {
152
           this.data[this.active].page = 0
158
           this.data[this.active].page = 0
153
         }
159
         }
154
         if (this.data[this.active].hasMore) {
160
         if (this.data[this.active].hasMore) {
155
-          this.getgymCardList({ page: this.data[this.active].page, pageSize: this.data[this.active].pageSize }).then((res) => {
161
+          this.getgymCardList({ page: this.data[this.active].page, pagesize: this.data[this.active].pagesize }).then((res) => {
156
             this.data[this.active].list = this.data[this.active].list.concat(this.gymCardList)
162
             this.data[this.active].list = this.data[this.active].list.concat(this.gymCardList)
157
             this.data[this.active].page++
163
             this.data[this.active].page++
158
-            if (this.gymCardList.length < this.data[this.active].pageSize) {
164
+            if (this.gymCardList.length < this.data[this.active].pagesize) {
159
               this.data[this.active].hasMore = false
165
               this.data[this.active].hasMore = false
160
             }
166
             }
161
             if (this.data[this.active].list.length <= 0) {
167
             if (this.data[this.active].list.length <= 0) {
171
       this.$router.push({ name: 'gymCardDetail', query: { CustomerGymId: item.CustomerGymId } })
177
       this.$router.push({ name: 'gymCardDetail', query: { CustomerGymId: item.CustomerGymId } })
172
     },
178
     },
173
     toCardDetail (item) {
179
     toCardDetail (item) {
174
-      this.$router.push({ name: 'cardDetail', query: { id: item.cardid } })
180
+      this.$router.push({ name: 'cardDetail', query: { id: item.CustomerCardId } })
175
     }
181
     }
176
   }
182
   }
177
 }
183
 }

+ 1
- 1
src/pages/user/card/page.scss View File

28
     }
28
     }
29
   }
29
   }
30
   .box{
30
   .box{
31
-    padding: .25rem;
31
+    padding: .25rem .25rem 0;
32
     box-sizing: border-box;
32
     box-sizing: border-box;
33
     .fitness-card{
33
     .fitness-card{
34
       overflow: hidden;
34
       overflow: hidden;

+ 3
- 3
src/pages/user/cardDetail/index.vue View File

4
     <div class="content" v-if="info !== null">
4
     <div class="content" v-if="info !== null">
5
       <div class="message">
5
       <div class="message">
6
         <div>
6
         <div>
7
-          <span>{{info.CardName}}</span>
8
-          <span class="sub">(可在银城会所健身房和游泳池使用)</span>
7
+          <span>{{info.CustomerCardName}}</span>
8
+          <!-- <span class="sub">(可在银城会所健身房和游泳池使用)</span> -->
9
         </div>
9
         </div>
10
         <div>
10
         <div>
11
           <span>有效时间</span>
11
           <span>有效时间</span>
12
-          <span>{{toolClass.dateFormat(info.EndDate)}}</span>
12
+          <span>{{toolClass.dateFormat(info.StartDate,'yyyy-MM-dd') + '~' + toolClass.dateFormat(info.EndDate,'yyyy-MM-dd')}}</span>
13
         </div>
13
         </div>
14
       </div>
14
       </div>
15
       <div class="rule">
15
       <div class="rule">

+ 22
- 12
src/pages/user/coupons/index.vue View File

46
     this.getCouponList().then((res) => {
46
     this.getCouponList().then((res) => {
47
       // console.log(JSON.stringify(res))
47
       // console.log(JSON.stringify(res))
48
       // console.log(JSON.stringify(this.couponList))
48
       // console.log(JSON.stringify(this.couponList))
49
-      for (var n = 0; n < res.length; n++) {
50
-        this.list.push({
51
-          title: res[n].Coupon.CouponName,
52
-          desc: res[n].Coupon.Share.UseInstruction,
53
-          time: this.toolClass.dateFormat(res[n].EndDate),
54
-          useType: res[n].Status === 1 ? '未使用' : '已使用',
55
-          tag: res[n].Coupon.CouponType === 'course' ? '课程' : '商品',
56
-          customercouponid: res[n].CustomerCouponId,
57
-          couponid: res[n].Coupon.CouponId,
58
-          Coupon: res[n].Coupon
59
-        })
49
+      if (res) {
50
+        for (var n = 0; n < res.length; n++) {
51
+          this.list.push({
52
+            title: res[n].Coupon.CouponName,
53
+            desc: res[n].Coupon.Share.UseInstruction,
54
+            time: this.toolClass.dateFormat(res[n].EndDate),
55
+            useType: res[n].Status === 1 ? '未使用' : '已使用',
56
+            tag: res[n].Coupon.CouponType === 'course' ? '课程' : '商品',
57
+            customercouponid: res[n].CustomerCouponId,
58
+            couponid: res[n].Coupon.CouponId,
59
+            Coupon: res[n].Coupon
60
+          })
61
+        }
62
+      } else {
63
+        this.hasPic = true
60
       }
64
       }
65
+
61
     })
66
     })
62
   },
67
   },
63
   methods: {
68
   methods: {
69
     },
74
     },
70
     toUse (item) {
75
     toUse (item) {
71
       console.log(item)
76
       console.log(item)
77
+      item.Coupon.Targets = item.Coupon.Targets || []
72
       if (item.Coupon.Targets.length > 1) {
78
       if (item.Coupon.Targets.length > 1) {
73
         this.$router.push({ name: 'indexPage' })
79
         this.$router.push({ name: 'indexPage' })
74
       } else {
80
       } else {
75
         if (item.tag === '商品') {
81
         if (item.tag === '商品') {
76
           this.$router.push({ name: 'coffeeIndex' })
82
           this.$router.push({ name: 'coffeeIndex' })
77
         } else {
83
         } else {
78
-          this.$router.push({ name: 'majorProjectsDetail', query: { id: item.Coupon.Targets[0].TargetId } })
84
+          if (item.Coupon.Targets && item.Coupon.Targets.length === 1) {
85
+            this.$router.push({ name: 'majorProjectsDetail', query: { id: item.Coupon.Targets[0].TargetId } })
86
+          } else {
87
+            this.$router.push({ name: 'indexPage' })
88
+          }
79
         }
89
         }
80
       }
90
       }
81
     },
91
     },

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

22
                 <courseItem :data="courseInfo(course)"></courseItem>
22
                 <courseItem :data="courseInfo(course)"></courseItem>
23
               </router-link>
23
               </router-link>
24
             </ul>
24
             </ul>
25
-            <span v-if="fiveANoData" style="width:100%;line-height:.3rem;display:block;text-align:center;color:#ccc;margin-bottom:.1rem;">暂无数据</span>
25
+            <!-- <span v-if="fiveANoData" style="width:100%;line-height:.3rem;display:block;text-align:center;color:#ccc;margin-bottom:.1rem;">暂无数据</span> -->
26
           </div>
26
           </div>
27
-          <router-link :to="{name:'',query:{}}" class="more">查看更多</router-link>
28
           <div style="width:100%;height:.1rem;background:#f8f8f8;margin:0 auto;"></div>
27
           <div style="width:100%;height:.1rem;background:#f8f8f8;margin:0 auto;"></div>
29
           <h5>{{item.Consult}}</h5>
28
           <h5>{{item.Consult}}</h5>
30
           <div class="newsList flex-h">
29
           <div class="newsList flex-h">

+ 7
- 5
src/pages/user/lessonDetail/index.vue View File

1
 <template>
1
 <template>
2
-  <div class="mainPage">
2
+  <div class="mainPage" v-if="showPage">
3
     <div class="title">课程详情</div>
3
     <div class="title">课程详情</div>
4
     <div class="content" :class="{'opacity' : courseOrderDetail.IsDone === 1, 'gray': courseOrderDetail.IsDone === 1}">
4
     <div class="content" :class="{'opacity' : courseOrderDetail.IsDone === 1, 'gray': courseOrderDetail.IsDone === 1}">
5
       <div class="list-item flex-h">
5
       <div class="list-item flex-h">
28
       </div>
28
       </div>
29
       <div class="list-item flex-h">
29
       <div class="list-item flex-h">
30
         <span>课程时间</span>
30
         <span>课程时间</span>
31
-        <span class="flex-item">{{toolClass.dateFormat(courseOrderDetail.CreateDate)}}</span>
31
+        <span class="flex-item">{{toolClass.dateFormat(courseOrderDetail.BeginDate) + ' ~ ' + toolClass.dateFormat(courseOrderDetail.EndDate)}}<span class="remark">计划备注({{courseOrderDetail.Remark}})</span> </span>
32
       </div>
32
       </div>
33
       <div class="list-item">
33
       <div class="list-item">
34
         <span>地点</span>
34
         <span>地点</span>
36
       </div>
36
       </div>
37
       <div class="list-item">
37
       <div class="list-item">
38
         <span>付款方式</span>
38
         <span>付款方式</span>
39
-        <span>{{courseOrderDetail.CourseObtaimType === 'cheng-coin' ? '城币支付' : '优惠券抵用'}}</span>
40
-        <!-- <span>优惠券抵用 <div class="coupon-name">小拉伸柔韧度体验券</div></span> -->
39
+        <span v-if="courseOrderDetail.CourseObtaimType === 'cheng-coin'">城币支付</span>
40
+        <span v-if="courseOrderDetail.CourseObtaimType === 'card'">卡券抵用</span>
41
+        <span v-if="courseOrderDetail.CourseObtaimType === 'coupon'">优惠券抵用</span>
41
       </div>
42
       </div>
42
       <div class="half-cic">
43
       <div class="half-cic">
43
         <span></span>
44
         <span></span>
45
       </div>
46
       </div>
46
       <div class="qr-code" v-if="courseOrderDetail.IsDone === 0">
47
       <div class="qr-code" v-if="courseOrderDetail.IsDone === 0">
47
         <qrCode v-if="showQrCode" :msg="courseOrderDetail.QrCodeString"></qrCode>
48
         <qrCode v-if="showQrCode" :msg="courseOrderDetail.QrCodeString"></qrCode>
48
-        <!-- <div class="number">32237489123</div> -->
49
       </div>
49
       </div>
50
     </div>
50
     </div>
51
     <div class="useType">
51
     <div class="useType">
73
       used,
73
       used,
74
       failure,
74
       failure,
75
       showQrCode: false,
75
       showQrCode: false,
76
+      showPage: false
76
     }
77
     }
77
   },
78
   },
78
   created () {
79
   created () {
82
           id: this.$route.query.id
83
           id: this.$route.query.id
83
         }).then((res) => {
84
         }).then((res) => {
84
           this.showQrCode = true
85
           this.showQrCode = true
86
+          this.showPage = true
85
           // console.log(JSON.stringify(res))
87
           // console.log(JSON.stringify(res))
86
         })
88
         })
87
       })
89
       })

+ 4
- 0
src/pages/user/lessonDetail/page.scss View File

71
     width: .76rem;
71
     width: .76rem;
72
     height: .76rem;
72
     height: .76rem;
73
   }
73
   }
74
+  .remark{
75
+    font-size: .12rem;
76
+    color: #FC6243 !important;
77
+  }
74
 }
78
 }

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

19
             <div class="type" :class="{'un-use' : item.IsDone === 0}">{{item.IsDone === 0 ? '未使用' : '已使用'}}</div>
19
             <div class="type" :class="{'un-use' : item.IsDone === 0}">{{item.IsDone === 0 ? '未使用' : '已使用'}}</div>
20
           </div>
20
           </div>
21
         </div>
21
         </div>
22
-        <span v-if="noData" style="width:100%;display:block;text-align:center;font-size:.11rem;color:#ccc;">暂无数据</span>
23
-        <!-- <noMore v-if="hasPic"></noMore> -->
22
+        <noMore v-if="noData"></noMore>
23
+        <!-- <span v-if="noData" style="width:100%;display:block;text-align:center;font-size:.11rem;color:#ccc;">暂无数据</span> -->
24
       </div>
24
       </div>
25
     </scroll>
25
     </scroll>
26
   </div>
26
   </div>

+ 63
- 47
src/pages/user/mainPage/coffeeIndex/index.vue View File

60
                   <a @click="toSalesHistory" v-if="userInfo.customer.UserTypeId == 'manager'">销售记录</a>
60
                   <a @click="toSalesHistory" v-if="userInfo.customer.UserTypeId == 'manager'">销售记录</a>
61
                 </div>
61
                 </div>
62
                 <myCard v-for="(item,index) in data[1].list" :isgrey="checkCanDo()" :key="index" :data='item' @share='shareCard'></myCard>
62
                 <myCard v-for="(item,index) in data[1].list" :isgrey="checkCanDo()" :key="index" :data='item' @share='shareCard'></myCard>
63
+                <noMore v-if="data[1].hasPic"></noMore>
63
               </div>
64
               </div>
64
             </li>
65
             </li>
65
             <li :hidden="navActive !== 2" class="my-card">
66
             <li :hidden="navActive !== 2" class="my-card">
74
                   <a @click="toSalesHistory" v-if="userInfo.customer.UserTypeId == 'manager'">销售记录</a>
75
                   <a @click="toSalesHistory" v-if="userInfo.customer.UserTypeId == 'manager'">销售记录</a>
75
                 </div>
76
                 </div>
76
                 <myCard v-for="(item,index) in data[2].list" :isgrey="checkCanDo()" :key="index" :data='item' @share='shareCoupon'></myCard>
77
                 <myCard v-for="(item,index) in data[2].list" :isgrey="checkCanDo()" :key="index" :data='item' @share='shareCoupon'></myCard>
78
+                <noMore v-if="data[2].hasPic"></noMore>
77
               </div>
79
               </div>
78
             </li>
80
             </li>
79
             <li :hidden="navActive !== 3" class="customer-card">
81
             <li :hidden="navActive !== 3" class="customer-card">
92
                   <i class="iconfont icon-sousuo search-icon" @click="searchMask"></i>
94
                   <i class="iconfont icon-sousuo search-icon" @click="searchMask"></i>
93
                 </div>
95
                 </div>
94
                 <customerCard v-for="(item,index) in postCustomerData.isrecommend ? myRecommendUserList : data[3].list" :key="index" :data='item' @record='record'></customerCard>
96
                 <customerCard v-for="(item,index) in postCustomerData.isrecommend ? myRecommendUserList : data[3].list" :key="index" :data='item' @record='record'></customerCard>
97
+                <noMore v-if="data[3].hasPic"></noMore>
95
               </div>
98
               </div>
96
             </li>
99
             </li>
97
           </ul>
100
           </ul>
130
 import normal from '../../../../common/icon/check-box-empty.png'
133
 import normal from '../../../../common/icon/check-box-empty.png'
131
 import logo from '../../../../common/icon/indexlogo.jpg'
134
 import logo from '../../../../common/icon/indexlogo.jpg'
132
 import wxsdk from '../../../../util/share'
135
 import wxsdk from '../../../../util/share'
136
+import noMore from '../../../../components/noMore/noMore'
133
 import { mapState, createNamespacedHelpers } from 'vuex'
137
 import { mapState, createNamespacedHelpers } from 'vuex'
134
 const { mapActions: actions } = createNamespacedHelpers('app')
138
 const { mapActions: actions } = createNamespacedHelpers('app')
135
 const { mapActions: caseTableActions } = createNamespacedHelpers('placeOrderForCoffee')
139
 const { mapActions: caseTableActions } = createNamespacedHelpers('placeOrderForCoffee')
252
     topCaseInfo,
256
     topCaseInfo,
253
     caseTableItem,
257
     caseTableItem,
254
     myCard,
258
     myCard,
255
-    customerCard
259
+    customerCard,
260
+    noMore
256
   },
261
   },
257
   created () {
262
   created () {
258
     if (!this.userInfo.customer.MapUser) {
263
     if (!this.userInfo.customer.MapUser) {
264
         this.getCustomerList({
269
         this.getCustomerList({
265
           ...this.postCustomerData
270
           ...this.postCustomerData
266
         }).then((res) => {
271
         }).then((res) => {
267
-          // console.log(JSON.stringify(res))
268
-          for (var n = 0; n < res.length; n++) {
269
-            if (res[n].RecommendId === this.userInfo.customer.MapUser) {
270
-              this.myRecommendUserList.push(res[n])
271
-              res[n].showTag = true
272
-            } else {
273
-              res[n].showTag = false
272
+          if (res) {
273
+            for (var n = 0; n < res.length; n++) {
274
+              if (res[n].RecommendId === this.userInfo.customer.MapUser) {
275
+                this.myRecommendUserList.push(res[n])
276
+                res[n].showTag = true
277
+              } else {
278
+                res[n].showTag = false
279
+              }
280
+              this.data[3].list.push(res[n])
274
             }
281
             }
275
-            this.data[3].list.push(res[n])
282
+          } else {
283
+            this.data[3].hasPic = true
276
           }
284
           }
277
         })
285
         })
278
         this.getMyCouponList({
286
         this.getMyCouponList({
279
           ...this.postCouponData
287
           ...this.postCouponData
280
         }).then((res) => {
288
         }).then((res) => {
281
           res.list = res.list || []
289
           res.list = res.list || []
282
-          for (var n = 0; n < res.list.length; n++) {
283
-            this.data[2].list.push({
284
-              invalid: this.returnInvalid(res.list[n], 'coupon'),
285
-              price: parseInt(res.list[n].Price),
286
-              title: res.list[n].CouponName,
287
-              desc: res.list[n].Share.UseRule,
288
-              startDate: this.toolClass.dateFormat(res.list[n].StartDate, 'yyyy年MM月dd日'),
289
-              endDate: this.toolClass.dateFormat(res.list[n].EndDate, 'yyyy年MM月dd日'),
290
-              totalCount: res.list[n].TotalCount,
291
-              SentCount: res.list[n].SentCount,
292
-              usedCount: res.list[n].UsedCount,
293
-              CardId: res.list[n].CouponId,
294
-            })
295
-          }
296
-          var count = 0
297
-          for (var n = 0; n < this.data[2].list.length; n++) {
298
-            count += this.data[2].list[n].price * this.data[2].list[n].totalCount - 0
290
+          if (res.list.length > 0) {
291
+            for (var n = 0; n < res.list.length; n++) {
292
+              this.data[2].list.push({
293
+                invalid: this.returnInvalid(res.list[n], 'coupon'),
294
+                price: parseInt(res.list[n].Price),
295
+                title: res.list[n].CouponName,
296
+                desc: res.list[n].Share.UseRule,
297
+                startDate: this.toolClass.dateFormat(res.list[n].StartDate, 'yyyy年MM月dd日'),
298
+                endDate: this.toolClass.dateFormat(res.list[n].EndDate, 'yyyy年MM月dd日'),
299
+                totalCount: res.list[n].TotalCount,
300
+                SentCount: res.list[n].SentCount,
301
+                usedCount: res.list[n].UsedCount,
302
+                CardId: res.list[n].CouponId,
303
+              })
304
+            }
305
+            var count = 0
306
+            for (var n = 0; n < this.data[2].list.length; n++) {
307
+              count += this.data[2].list[n].price * this.data[2].list[n].totalCount - 0
308
+            }
309
+            this.couponTotalCount = count.toFixed(2)
310
+          } else {
311
+            this.data[2].hasPic = true
299
           }
312
           }
300
-          this.couponTotalCount = count.toFixed(2)
301
         })
313
         })
302
         this.getMyCardList({
314
         this.getMyCardList({
303
           ...this.postCardData
315
           ...this.postCardData
304
         }).then((res) => {
316
         }).then((res) => {
305
           res.list = res.list || []
317
           res.list = res.list || []
306
-          for (var n = 0; n < res.list.length; n++) {
307
-            this.data[1].list.push({
308
-              invalid: this.returnInvalid(res.list[n], 'card'),
309
-              price: parseInt(res.list[n].Price),
310
-              title: res.list[n].CardName,
311
-              desc: res.list[n].Share.CardUseRule,
312
-              startDate: this.toolClass.dateFormat(res.list[n].StartDate, 'yyyy年MM月dd日'),
313
-              endDate: this.toolClass.dateFormat(res.list[n].EndDate, 'yyyy年MM月dd日'),
314
-              totalCount: res.list[n].TotalCount,
315
-              SentCount: res.list[n].SentCount,
316
-              usedCount: res.list[n].UsedCount,
317
-              CardId: res.list[n].CardId
318
-            })
319
-          }
320
-          var count = 0
321
-          for (var n = 0; n < this.data[1].list.length; n++) {
322
-            count += this.data[1].list[n].price * this.data[1].list[n].totalCount - 0
318
+          if (res.list.length > 0) {
319
+            for (var n = 0; n < res.list.length; n++) {
320
+              this.data[1].list.push({
321
+                invalid: this.returnInvalid(res.list[n], 'card'),
322
+                price: parseInt(res.list[n].Price),
323
+                title: res.list[n].CardName,
324
+                desc: res.list[n].Share.CardUseRule,
325
+                startDate: this.toolClass.dateFormat(res.list[n].StartDate, 'yyyy年MM月dd日'),
326
+                endDate: this.toolClass.dateFormat(res.list[n].EndDate, 'yyyy年MM月dd日'),
327
+                totalCount: res.list[n].TotalCount,
328
+                SentCount: res.list[n].SentCount,
329
+                usedCount: res.list[n].UsedCount,
330
+                CardId: res.list[n].CardId
331
+              })
332
+            }
333
+            var count = 0
334
+            for (var n = 0; n < this.data[1].list.length; n++) {
335
+              count += this.data[1].list[n].price * this.data[1].list[n].totalCount - 0
336
+            }
337
+            this.cardTotalCount = count.toFixed(2)
338
+          } else {
339
+            this.data[1].hasPic = true
323
           }
340
           }
324
-          this.cardTotalCount = count.toFixed(2)
325
         })
341
         })
326
       })
342
       })
327
     } else {
343
     } else {
505
     },
521
     },
506
     toOrders (subItem, item) {
522
     toOrders (subItem, item) {
507
       const _that = this
523
       const _that = this
508
-      this.getCaseConf({caseid: subItem.CaseId}).then(res => {
524
+      this.getCaseConf({ caseid: subItem.CaseId }).then(res => {
509
         if (res.Status === 1) {
525
         if (res.Status === 1) {
510
-          this.$router.push({name: 'placeOrder', query: { tableid: encodeURI(subItem.TableId), tableno: encodeURI(subItem.TableNo), caseid: encodeURI(subItem.CaseId), casename: encodeURI(_that.topCaseInfoData.caseName), areaid: encodeURI(subItem.AreaId), areaname: encodeURI(item.AreaName)}})
526
+          this.$router.push({ name: 'placeOrder', query: { tableid: encodeURI(subItem.TableId), tableno: encodeURI(subItem.TableNo), caseid: encodeURI(subItem.CaseId), casename: encodeURI(_that.topCaseInfoData.caseName), areaid: encodeURI(subItem.AreaId), areaname: encodeURI(item.AreaName) } })
511
         } else {
527
         } else {
512
           _that.$toast('当前案场已歇业!')
528
           _that.$toast('当前案场已歇业!')
513
           return
529
           return

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

41
 
41
 
42
       <div class="userCenter-menu">
42
       <div class="userCenter-menu">
43
         <div class="menu-item flex-h" @click="toLessonOrder">
43
         <div class="menu-item flex-h" @click="toLessonOrder">
44
-          <span>课程订单</span>
44
+          <span>我的课程</span>
45
           <i class="iconfont icon-jiantou-right"></i>
45
           <i class="iconfont icon-jiantou-right"></i>
46
         </div>
46
         </div>
47
         <div class="menu-item flex-h" @click="toGoodsOrder">
47
         <div class="menu-item flex-h" @click="toGoodsOrder">

+ 7
- 0
src/pages/user/majorProjectsDetail/index.vue View File

142
       if (nowDate > endData) {
142
       if (nowDate > endData) {
143
         this.gray = true
143
         this.gray = true
144
       }
144
       }
145
+      if (this.courseDetail.SignupNum >= this.courseDetail.MaxNum) {
146
+        this.gray = true
147
+      }
145
       // console.log(JSON.stringify(res))
148
       // console.log(JSON.stringify(res))
146
       this.showPage = true
149
       this.showPage = true
147
     })
150
     })
166
       this.showMoreCourse = !this.showMoreCourse
169
       this.showMoreCourse = !this.showMoreCourse
167
     },
170
     },
168
     toBuy () {
171
     toBuy () {
172
+      if (this.gray) {
173
+        this.$toast('该课程已过期或参与人数已满')
174
+        return
175
+      }
169
       let nowDate = Date.now()
176
       let nowDate = Date.now()
170
       let endData = new Date(this.courseDetail.EndDate).getTime()
177
       let endData = new Date(this.courseDetail.EndDate).getTime()
171
       if (nowDate > endData) {
178
       if (nowDate > endData) {

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

17
                 <orderListItem :data="item"></orderListItem>
17
                 <orderListItem :data="item"></orderListItem>
18
               </li>
18
               </li>
19
             </ul>
19
             </ul>
20
-            <span v-if="noData" style="width:100%;display:block;text-align:center;font-size:.11rem;color:#ccc;">暂无数据</span>
20
+            <noMore v-if="noData"></noMore>
21
+            <!-- <span v-if="noData" style="width:100%;display:block;text-align:center;font-size:.11rem;color:#ccc;">暂无数据</span> -->
21
           </scroll>
22
           </scroll>
22
         </div>
23
         </div>
23
       </div>
24
       </div>

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

69
       <a @click="toPlaceOrder">下单</a>
69
       <a @click="toPlaceOrder">下单</a>
70
     </div>
70
     </div>
71
     <orderPopup :show="showPopup" :data="currentSpec" @closePopup="closePopup" @returnData="calcMenus"></orderPopup>
71
     <orderPopup :show="showPopup" :data="currentSpec" @closePopup="closePopup" @returnData="calcMenus"></orderPopup>
72
-    <calcMenu :show="showCalcMenu" :totalNum="sumNum" :data="selGoods" @returnData="calcMenus" @emptyMenus="emptyMenus" @closeCalcMenu="closeCalcMenu" @placeOrder="placeOrder"></calcMenu>
72
+    <calcMenu :show="showCalcMenu" :totalNum="sumNum + caseTotal.total" :data="selGoods" @returnData="calcMenus" @emptyMenus="emptyMenus" @closeCalcMenu="closeCalcMenu" @placeOrder="placeOrder"></calcMenu>
73
   </div>
73
   </div>
74
 </template>
74
 </template>
75
 
75
 
165
       this.selGoods.map(x => {
165
       this.selGoods.map(x => {
166
         price += x.price * x.num - 0
166
         price += x.price * x.num - 0
167
       })
167
       })
168
-      return price
168
+      return Math.ceil((price) * 100) / 100
169
     }
169
     }
170
   },
170
   },
171
   components: {
171
   components: {

+ 4
- 1
src/pages/user/placeOrderForCourse/index.vue View File

63
                     <span>优惠券</span>
63
                     <span>优惠券</span>
64
                   </div>
64
                   </div>
65
                 </div>
65
                 </div>
66
-                <span>{{couponList.length ? couponList.length + '张可用优惠券' : '暂无优惠券'}}</span>
66
+                <span v-if='couponList.length <= 0 && !showCoupon'>暂无优惠券</span>
67
+                <span v-if='couponList.length > 0 && !showCoupon' style="color:#fc6243">{{couponList.length + '张可用优惠券'}}</span>
68
+                <span v-if='showCoupon' style="color:#fc6243">{{showCoupon}}</span>
67
               </div>
69
               </div>
68
             </div>
70
             </div>
69
             <div class="agreement">
71
             <div class="agreement">
211
         if (this.couponList[n].select) {
213
         if (this.couponList[n].select) {
212
           bool = true
214
           bool = true
213
           this.postData.customercouponid = this.couponList[n].id
215
           this.postData.customercouponid = this.couponList[n].id
216
+          this.showCoupon = this.couponList[n].title
214
         }
217
         }
215
       }
218
       }
216
       if (!bool) {
219
       if (!bool) {

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

30
           <i class="icon-kaquan iconfont"></i>
30
           <i class="icon-kaquan iconfont"></i>
31
           <span>卡券有效期</span>
31
           <span>卡券有效期</span>
32
         </div>
32
         </div>
33
-        <pre>有效期至{{toolClass.dateFormat(data.EndDate)}},请在有效期结束前使用, 过期作废;</pre>
33
+        <pre>有效期至{{toolClass.dateFormat(data.EndDate,'yyyy-MM-dd')}},请在有效期结束前使用, 过期作废;</pre>
34
       </div>
34
       </div>
35
       <div class="text">
35
       <div class="text">
36
         <div>
36
         <div>

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

30
           <i class="icon-kaquan iconfont"></i>
30
           <i class="icon-kaquan iconfont"></i>
31
           <span>卡券有效期</span>
31
           <span>卡券有效期</span>
32
         </div>
32
         </div>
33
-        <pre>有效期至{{toolClass.dateFormat(data.EndDate)}},请在有效期结束前使用, 过期作废;</pre>
33
+        <pre>有效期至{{toolClass.dateFormat(data.EndDate,'yyyy-MM-dd')}},请在有效期结束前使用, 过期作废;</pre>
34
       </div>
34
       </div>
35
       <div class="text">
35
       <div class="text">
36
         <div>
36
         <div>

+ 5
- 0
src/util/ajax.js View File

76
         if (router.history.current.name !== 'bindMobile') {
76
         if (router.history.current.name !== 'bindMobile') {
77
           router.push({ name: 'bindMobile' })
77
           router.push({ name: 'bindMobile' })
78
         }
78
         }
79
+      } else if (code === 405) {
80
+        // console.log(router.history.current.name)
81
+        // if (router.history.current.name !== 'bindMobile') {
82
+          router.push({ name: 'login' })
83
+        // }
79
       } else {
84
       } else {
80
         if (message.indexOf("log-error") != -1) {
85
         if (message.indexOf("log-error") != -1) {
81
           console.log(message)
86
           console.log(message)