黎海 преди 2 години
родител
ревизия
52beddc976

+ 2 - 0
src/components/common/layout/layout.vue

@@ -187,11 +187,13 @@ export default {
187 187
         border-radius: 50%;
188 188
         img {
189 189
           width: 100%;
190
+          border-radius: 50%;
190 191
           display: block;
191 192
         }
192 193
       }
193 194
       .el-dropdown-link {
194 195
         img {
196
+          margin-left: 20px;
195 197
           width: 28px;
196 198
           height: 28px;
197 199
           display: block;

+ 16 - 14
src/pages/confirmOrder/details/index.vue

@@ -365,7 +365,7 @@
365 365
     <mine-pupop :show="PayStatus">
366 366
       <div class="pay-block">
367 367
         <div class="delete-pupop"
368
-             @click="PayStatus=false"><img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
368
+             @click="changePayStatus"><img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
369 369
                alt=""></div>
370 370
         <div v-if="isPayCode">
371 371
           <div class="pay-title">请扫码支付</div>
@@ -685,9 +685,9 @@ export default {
685 685
         this.reservationPrice += Number(res.price)
686 686
       })
687 687
     },
688
+
688 689
     //获取订单优惠券
689 690
     onCoupon () {
690
-
691 691
       if (this.couponList.length > 0) {
692 692
         this.isCoupun = true
693 693
         return
@@ -769,9 +769,14 @@ export default {
769 769
 
770 770
       })
771 771
     },
772
+    changePayStatus () {
773
+      this.PayStatus = false
774
+      if (this.payStatusInterval) { //如果定时器在运行则关闭
775
+        clearInterval(this.payStatusInterval)
776
+      }
777
+    },
772 778
     payStatus () {
773 779
       api.payStatus({ id: this.id, }).then(res => {
774
-
775 780
         if (res.data.pay_status == 1) {
776 781
           clearInterval(this.payStatusInterval)
777 782
           this.isPayCode = false
@@ -808,9 +813,7 @@ export default {
808 813
        */
809 814
     selectPupop: function (item, index) {
810 815
 
811
-
812 816
       let CouPonIndex = this.couponList
813
-
814 817
       let selectIndex = index
815 818
       let curreValue = !CouPonIndex[selectIndex].isSelect
816 819
       let project_list = this.order_data.project_list //这里是项目列表
@@ -860,8 +863,6 @@ export default {
860 863
       this.order_data = orderDetails1
861 864
       this.couponList = CouPonIndex
862 865
       this.coupSelectType = this.couponList[selectIndex].type
863
-
864
-
865 866
       this.selectCoup()
866 867
 
867 868
     },
@@ -889,11 +890,12 @@ export default {
889 890
       let project_list = this.order_data.project_list //这里是项目列表
890 891
       let isSelectCoup = this.isSelectCoup //这里选择了的卡券列表
891 892
       let selectProjectList = [] // 适合的卡券列表
892
-      // let CouPonIndex = this.CouPonIndex // 卡券选择的Id
893
+      // let CouPonIndex = this.CouPonIndex // 卡券选择的Id\
893 894
       let productDiscount = this.couponList // 卡券列表
894
-        (productDiscount)
895
+      console.log(this.couponList, 'this.couponList');
896
+      (productDiscount)
895 897
       // debugger
896
-      if (isSelectCoup[0].type == 4) {
898
+      if (isSelectCoup.length > 0 && isSelectCoup[0].type && isSelectCoup[0].type == 4) {
897 899
         for (let i = 0; i < isSelectCoup.length; i++) { // 首先遍历卡券
898 900
           if (!isSelectCoup[i].projectids) { // 如果卡券没绑定项目
899 901
 
@@ -938,7 +940,7 @@ export default {
938 940
     // 计算总额
939 941
     calculateMoney () {
940 942
       let that = this
941
-      let money = this.order_data.price
943
+      let money = Number(this.order_data.price)
942 944
       let isSelectCoup = this.isSelectCoup
943 945
       let project_list = this.order_data.project_list //这里是项目列表
944 946
 
@@ -951,17 +953,17 @@ export default {
951 953
       if (isSelectCoup[0].type == 4) {
952 954
         for (let i = 0; i < project_list.length; i++) {
953 955
           if (project_list[i].cardId) {
954
-            money = money - project_list[i].price
956
+            money = money - Number(project_list[i].price)
955 957
           }
956 958
         }
957 959
         this.showMoney = money.toFixed(2)
958 960
       } else if (isSelectCoup[0].type == 3) {
959 961
         for (let i = 0; i < project_list.length; i++) {
960
-          money = money - project_list[i].price
962
+          money = money - Number(project_list[i].price)
961 963
         }
962 964
 
963 965
       } else {
964
-        money = money - isSelectCoup[0].price
966
+        money = money - Number(isSelectCoup[0].price)
965 967
       }
966 968
 
967 969
       this.showMoney = money.toFixed(2)

+ 9 - 2
src/pages/coupon/index.vue

@@ -34,7 +34,7 @@
34 34
       <el-table ref="multipleTable"
35 35
                 :data="tableData"
36 36
                 tooltip-effect="dark"
37
-                height="354"
37
+                height="500"
38 38
                 style="width: 100%;border-radius: 8px;"
39 39
                 @selection-change="handleSelectionChange">
40 40
         <el-table-column type="selection"
@@ -110,7 +110,14 @@ export default {
110 110
         user_ids: selectIds.substring(1, selectIds.length),
111 111
         num: this.couponNum
112 112
       };
113
-      api.sendCoupon(params).then(res => { });
113
+      api.sendCoupon(params).then(res => {
114
+        if (res.code == 200) {
115
+          this.$message({
116
+            message: '发送成功',
117
+            type: 'success'
118
+          });
119
+        }
120
+      });
114 121
     },
115 122
 
116 123
     // 获取订单列表

+ 40 - 31
src/pages/customerMan/details/index.vue

@@ -3,7 +3,8 @@
3 3
     <div class="left">
4 4
       <div class="user-info">
5 5
         <div class="user-img">
6
-          <img :src="userInfo.avatar_url" alt />
6
+          <img :src="userInfo.avatar_url"
7
+               alt />
7 8
         </div>
8 9
         <div class="user-span">
9 10
           <div class="name">
@@ -82,7 +83,9 @@
82 83
           <div class="lable">
83 84
             <div class="lable-title">面诊标签</div>
84 85
             <div class="lable-list">
85
-              <div v-for="(item,index) in lableList" :key="index" class="lable-info">{{item.text}}</div>
86
+              <div v-for="(item,index) in lableList"
87
+                   :key="index"
88
+                   class="lable-info">{{item.text}}</div>
86 89
             </div>
87 90
           </div>
88 91
           <div class="ps">
@@ -91,18 +94,22 @@
91 94
           </div>
92 95
         </div>
93 96
         <div class="right-top-list">
94
-          <div class="dataList" @click="toOrder(1)">
95
-            <img :src="userInfo.image" />
97
+          <div class="dataList"
98
+               @click="toOrder(1)">
99
+            <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/project_icon.png" />
96 100
             <p>项目订单</p>
97 101
             <span>{{order_total.project}}</span>
98 102
           </div>
99
-          <div class="dataList" style="margin:18px 0px" @click="toOrder(2)">
100
-            <img :src="userInfo.image" />
101
-            <p>卡券订单</p>
103
+          <div class="dataList"
104
+               style="margin:18px 0px"
105
+               @click="toOrder(2)">
106
+            <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/coupon_icon.png" />
107
+            <p>优惠券</p>
102 108
             <span>{{order_total.coupon}}</span>
103 109
           </div>
104
-          <div class="dataList" @click="toOrder(3)">
105
-            <img :src="userInfo.image" />
110
+          <div class="dataList"
111
+               @click="toOrder(3)">
112
+            <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/order_total_icon.png" />
106 113
             <p>商品订单</p>
107 114
             <span>{{order_total.goods}}</span>
108 115
           </div>
@@ -114,18 +121,14 @@
114 121
             <div class="tab-title">执行方案</div>
115 122
           </div>
116 123
           <div class="programme-list">
117
-            <div
118
-              :class="['programme-info',item.onSelect?'programme-active':'']"
119
-              v-for="(item,index) in programmeList"
120
-              :key="index"
121
-              @click="onOperation(index)"
122
-            >
124
+            <div :class="['programme-info',item.onSelect?'programme-active':'']"
125
+                 v-for="(item,index) in programmeList"
126
+                 :key="index"
127
+                 @click="onOperation(index)">
123 128
               <div class="programme-left">
124 129
                 <div class="programme-img">
125
-                  <img
126
-                    src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png"
127
-                    alt
128
-                  />
130
+                  <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png"
131
+                       alt />
129 132
                 </div>
130 133
                 <div class="programme-tips">
131 134
                   <div class="tips-title">{{'【清洁补水】华熙智慧…'|ellipsis(9)}}</div>
@@ -146,7 +149,8 @@
146 149
                   <span>28天</span>
147 150
                 </div>
148 151
               </div>
149
-              <div class="operation" v-if="item.onSelect">
152
+              <div class="operation"
153
+                   v-if="item.onSelect">
150 154
                 <div class="edit">编辑</div>
151 155
                 <div class="delete">删除</div>
152 156
               </div>
@@ -162,7 +166,7 @@
162 166
 import api from "../../../server/home";
163 167
 
164 168
 export default {
165
-  data() {
169
+  data () {
166 170
     return {
167 171
       userInfo: {
168 172
         image:
@@ -195,7 +199,7 @@ export default {
195 199
   watch: {},
196 200
 
197 201
   methods: {
198
-    getPadUserInfo() {
202
+    getPadUserInfo () {
199 203
       api.getPadUserInfo({ id: this.id }).then(res => {
200 204
         this.userInfo = res.data.user;
201 205
         this.remarks = res.data.remark;
@@ -208,7 +212,7 @@ export default {
208 212
       });
209 213
     },
210 214
 
211
-    onOperation(index) {
215
+    onOperation (index) {
212 216
       if (this.programmeList[index].onSelect) {
213 217
         this.$set(
214 218
           this.programmeList[index],
@@ -219,27 +223,32 @@ export default {
219 223
         this.$set(this.programmeList[index], "onSelect", true);
220 224
       }
221 225
     },
222
-    toOrder(index) {
223
-      if (index === 1) {
226
+    toOrder (index) {
227
+      let activeName = 'first'
228
+      if (index == 3) {
229
+        activeName = 'third'
230
+      } else if (index == 2) {
231
+        activeName = 'second'
232
+      }
224 233
       this.$router.push({
225 234
         path: "/customerMan/projectOrder",
226 235
         query: {
227
-          id: this.id
236
+          id: this.id,
237
+          activeName: activeName
228 238
         }
229 239
       });
230
-      }
231 240
     },
232
-    onSubmit() {},
233
-    submitFrequency() {}
241
+    onSubmit () { },
242
+    submitFrequency () { }
234 243
   },
235 244
 
236
-  created() {
245
+  created () {
237 246
     let id = this.$route.query.id;
238 247
     this.id = id;
239 248
     this.getPadUserInfo();
240 249
   },
241 250
 
242
-  mounted() {}
251
+  mounted () { }
243 252
 };
244 253
 </script>
245 254
 

+ 1 - 1
src/pages/customerMan/index.vue

@@ -16,7 +16,7 @@
16 16
       <el-table ref="multipleTable"
17 17
                 :data="tableData"
18 18
                 tooltip-effect="dark"
19
-                height="354"
19
+                height="500"
20 20
                 style="width: 100%;border-radius: 8px;"
21 21
                 @row-click="handleSelectionChange">
22 22
         <el-table-column label="头像"

+ 24 - 9
src/pages/customerMan/myOrder/index.vue

@@ -1,8 +1,10 @@
1 1
 <template>
2 2
   <div class="order">
3 3
     <div class="warp">
4
-      <el-tabs type="border-card">
5
-        <el-tab-pane label="项目订单">
4
+      <el-tabs type="border-card"
5
+               v-model="activeName">
6
+        <el-tab-pane label="项目订单"
7
+                     name="first">
6 8
           <div class="user-list">
7 9
             <el-table ref="multipleTable"
8 10
                       :data="projectData"
@@ -41,7 +43,7 @@
41 43
                                label="状态"
42 44
                                show-overflow-tooltip>
43 45
                 <template slot-scope="scope">
44
-                  <div :class="'color'+scope.row.status">{{statusStr[scope.row.status]}}</div>
46
+                  <div :class="'color'+scope.row.status">{{scope.row.status!=5?statusStr[scope.row.status]:statusStr[statusStr.length-1]}}</div>
45 47
                 </template>
46 48
               </el-table-column>
47 49
             </el-table>
@@ -56,7 +58,8 @@
56 58
             </div>
57 59
           </div>
58 60
         </el-tab-pane>
59
-        <el-tab-pane label="卡卷订单">
61
+        <el-tab-pane label="卡卷订单"
62
+                     name="second">
60 63
           <div class="user-list">
61 64
             <el-table ref="multipleTable"
62 65
                       :data="couponData"
@@ -93,7 +96,7 @@ type: "全额券" -->
93 96
                                label="状态"
94 97
                                show-overflow-tooltip>
95 98
                 <template slot-scope="scope">
96
-                  <div :class="'color'+scope.row.status">{{statusStr[scope.row.status]}}</div>
99
+                  <div :class="'color'+scope.row.status">{{couponStatus[scope.row.status]}}</div>
97 100
                 </template>
98 101
               </el-table-column>
99 102
             </el-table>
@@ -109,7 +112,8 @@ type: "全额券" -->
109 112
           </div>
110 113
         </el-tab-pane>
111 114
 
112
-        <el-tab-pane label="商品订单">
115
+        <el-tab-pane label="商品订单"
116
+                     name="third">
113 117
           <div class="user-list">
114 118
             <el-table ref="multipleTable"
115 119
                       :data="goodData"
@@ -152,7 +156,7 @@ status: 5 -->
152 156
                                label="状态"
153 157
                                show-overflow-tooltip>
154 158
                 <template slot-scope="scope">
155
-                  <div :class="'classShow'+scope.$index">{{statusStr[scope.row.status]}}</div>
159
+                  <div :class="'classShow'+scope.$index">{{scope.row.status==1||scope.row.status==2?goodStatus[scope.row.status]:goodStatus[goodStatus.length-1]}}</div>
156 160
                 </template>
157 161
               </el-table-column>
158 162
             </el-table>
@@ -213,14 +217,23 @@ export default {
213 217
         }
214 218
       ],
215 219
       statusStr: [
216
-        "已预约",
217 220
         "未支付",
218
-        "已支付",
219 221
         "待使用",
220 222
         "正在使用",
221 223
         "已结算",
222 224
         "已取消"
223 225
       ],
226
+      couponStatus: [
227
+        '待使用',
228
+        '已使用',
229
+        '已过期'
230
+      ],
231
+      goodStatus: [
232
+        '未支付',
233
+        '已支付',
234
+        '已取货'
235
+      ],
236
+      activeName: 'first',
224 237
       currentPage1: 1,
225 238
       couponData: [],
226 239
       goodData: [],
@@ -282,6 +295,8 @@ export default {
282 295
 
283 296
   created () {
284 297
     let id = this.$route.query.id;
298
+    let activeName = this.$route.query.activeName
299
+    this.activeName = activeName
285 300
     this.id = id;
286 301
     this.getUserCoupon();
287 302
     this.getUserGoods();

+ 1 - 1
src/pages/historicalOrder/index.vue

@@ -36,7 +36,7 @@
36 36
       <el-table ref="multipleTable"
37 37
                 :data="tableData"
38 38
                 tooltip-effect="dark"
39
-                height="354"
39
+                height="500"
40 40
                 style="width: 100%;border-radius: 8px;"
41 41
                 @row-click="handleSelectionChange">
42 42
         <el-table-column label="头像"

+ 20 - 7
src/pages/home/index.vue

@@ -3,6 +3,7 @@
3 3
     <div class="tab">
4 4
       <div class="make-order"
5 5
            v-for="item,index in tabList"
6
+           @click="changeTable(item.type)"
6 7
            :key="index">
7 8
         <div class="make-icon">
8 9
           <img :src="item.image">
@@ -27,7 +28,8 @@
27 28
                @click="toOrderDetails(item)"
28 29
                :style="index==orderList.length-1?'border-bottom:0px':''">
29 30
             <div class="head-img">
30
-              <div class="new">新</div><img :src="item.avatar_url"
31
+              <div class="new"
32
+                   v-if="item.is_new==1">新</div><img :src="item.avatar_url"
31 33
                    alt="">
32 34
             </div>
33 35
             <div class="user-information">
@@ -69,17 +71,20 @@ export default {
69 71
         {
70 72
           image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
71 73
           num: 0,
72
-          name: '预约订单'
74
+          name: '预约订单',
75
+          type: 1,
73 76
         },
74 77
         {
75 78
           image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png',
76 79
           num: 0,
77
-          name: '未支付订单'
80
+          name: '未支付订单',
81
+          type: 2,
78 82
         },
79 83
         {
80 84
           image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/cancelOrder.png',
81 85
           num: 0,
82
-          name: '取消订单'
86
+          name: '取消订单',
87
+          type: 3
83 88
         },
84 89
       ],
85 90
       orderList: [
@@ -87,7 +92,8 @@ export default {
87 92
       loading: false,
88 93
       finished: false,
89 94
       page: 1,
90
-      limit: 10
95
+      limit: 10,
96
+      type: 0
91 97
 
92 98
     }
93 99
   },
@@ -109,9 +115,16 @@ export default {
109 115
         }
110 116
       })
111 117
     },
118
+    changeTable (type) {
119
+      this.type = type
120
+      this.orderList = []
121
+      this.loading = false
122
+      this.finished = false
123
+      this.page = 1
124
+    },
112 125
     getToday () {
113 126
       setTimeout(() => {
114
-        api.getToday({ page: this.page, limit: this.limit }).then(res => {
127
+        api.getToday({ page: this.page, limit: this.limit, type: this.type }).then(res => {
115 128
           if (res.code = 200) {
116 129
             this.orderList = [...this.orderList, ...res.data.list]
117 130
             this.page++
@@ -209,7 +222,7 @@ export default {
209 222
     }
210 223
 
211 224
     .list-info {
212
-      height: 300px;
225
+      height: 450px;
213 226
       overflow: auto;
214 227
 
215 228
       .user-info {

+ 2 - 0
src/pages/login/login.vue

@@ -57,6 +57,8 @@ export default {
57 57
           this.$router.push({
58 58
             path: '/home'
59 59
           })
60
+        } else {
61
+          this.$message.error('账号或密码错误,请核对后输入');
60 62
         }
61 63
       })
62 64
     }

+ 7 - 1
src/router/map/home.js

@@ -37,7 +37,13 @@ export default {
37 37
       },
38 38
       component: CustomerManDetails
39 39
     },
40
-    { path: '/customerMan/projectOrder', component: projectOrder },
40
+    {
41
+      path: '/customerMan/projectOrder',
42
+      meta: {
43
+        isback: true,
44
+      },
45
+      component: projectOrder
46
+    },
41 47
     { path: '/historicalOrder', component: HistoricalOrder },
42 48
     {
43 49
       path: '/historicalOrder/details',