yuantianjiao 6 years ago
parent
commit
53c104fd07

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

74
   margin-bottom: 0.2rem;
74
   margin-bottom: 0.2rem;
75
   &.invalid {
75
   &.invalid {
76
     filter: grayscale(100%);
76
     filter: grayscale(100%);
77
-    opacity: .5;
77
+    opacity: 0.5;
78
   }
78
   }
79
   .card-top {
79
   .card-top {
80
     height: 0.88rem;
80
     height: 0.88rem;
84
       overflow: hidden;
84
       overflow: hidden;
85
       text-overflow: ellipsis;
85
       text-overflow: ellipsis;
86
       display: -webkit-box;
86
       display: -webkit-box;
87
-      -webkit-line-clamp: 2;
87
+      -webkit-line-clamp: 1;
88
       -webkit-box-orient: vertical;
88
       -webkit-box-orient: vertical;
89
+      height: .16rem;
90
+      line-height: .16rem;
89
     }
91
     }
90
     div:nth-of-type(1) {
92
     div:nth-of-type(1) {
91
       width: 1.2rem;
93
       width: 1.2rem;

+ 2
- 2
src/pages/sales/salesGiveOutDetail/index.vue View File

31
                       <span>¥{{item.Price}} * 1</span>
31
                       <span>¥{{item.Price}} * 1</span>
32
                     </div>
32
                     </div>
33
                   </div>
33
                   </div>
34
-                  <span>{{toolClass.dateFormat(item.CreateDate)}}</span>
34
+                  <span>{{toolClass.dateFormat(item.CreateDate, 'yyyy/MM/dd hh:mm')}}</span>
35
                 </li>
35
                 </li>
36
               </ul>
36
               </ul>
37
             </li>
37
             </li>
48
                       <span>¥{{item.Price}} * 1</span>
48
                       <span>¥{{item.Price}} * 1</span>
49
                     </div>
49
                     </div>
50
                   </div>
50
                   </div>
51
-                  <span>{{toolClass.dateFormat(item.ReceiveDate)}}</span>
51
+                  <span>{{toolClass.dateFormat(item.ReceiveDate, 'yyyy/MM/dd hh:mm')}}</span>
52
                 </router-link>
52
                 </router-link>
53
               </ul>
53
               </ul>
54
             </li>
54
             </li>

+ 3
- 1
src/pages/sales/salesGiveOutDetail/page.scss View File

92
                   flex:1;
92
                   flex:1;
93
                 }
93
                 }
94
                 >div{
94
                 >div{
95
+                  flex: 1;
95
                   span{
96
                   span{
96
                     width: 100%;
97
                     width: 100%;
97
                     display: block;
98
                     display: block;
99
+                    text-align: center;
98
                   }
100
                   }
99
                   margin-left: .1rem;
101
                   margin-left: .1rem;
100
                   &:first-child{
102
                   &:first-child{
102
                   }
104
                   }
103
                   &:nth-child(2){
105
                   &:nth-child(2){
104
                     span{
106
                     span{
105
-                      text-align: center;
107
+                      text-align: left;
106
                     }
108
                     }
107
                   }
109
                   }
108
                 }
110
                 }

+ 42
- 33
src/pages/user/mainPage/coffeeIndex/index.vue View File

68
                       <span>¥{{couponTotalCount}}</span>
68
                       <span>¥{{couponTotalCount}}</span>
69
                     </div>
69
                     </div>
70
                   </div>
70
                   </div>
71
-                  <a @click="toSalesHistory">销售记录</a>
71
+                  <a @click="toSalesHistory" v-if="userInfo.customer.UserTypeId == 'manager'">销售记录</a>
72
                 </div>
72
                 </div>
73
                 <myCard v-for="(item,index) in data[2].list" :key="index" :data='item' @share='shareCoupon'></myCard>
73
                 <myCard v-for="(item,index) in data[2].list" :key="index" :data='item' @share='shareCoupon'></myCard>
74
               </div>
74
               </div>
77
               <div class="list-box">
77
               <div class="list-box">
78
                 <div class="search-bar flex-h">
78
                 <div class="search-bar flex-h">
79
                   <span>共{{this.data[3].list.length}}位客户</span>
79
                   <span>共{{this.data[3].list.length}}位客户</span>
80
-                  <van-checkbox v-model="postCustomerData.isrecommend">
80
+                  <!-- <van-checkbox v-model="postCustomerData.isrecommend">
81
                     我推荐的客户({{myRecommendUserList.length}}人)
81
                     我推荐的客户({{myRecommendUserList.length}}人)
82
                     <img
82
                     <img
83
                       slot="icon"
83
                       slot="icon"
85
                       :src="postCustomerData.isrecommend ? icon.active : icon.normal"
85
                       :src="postCustomerData.isrecommend ? icon.active : icon.normal"
86
                       style="width:.2rem;height:.2rem;bottom: .02rem;position: relative;"
86
                       style="width:.2rem;height:.2rem;bottom: .02rem;position: relative;"
87
                     >
87
                     >
88
-                  </van-checkbox>
88
+                  </van-checkbox> -->
89
                   <i class="iconfont icon-sousuo search-icon" @click="searchMask"></i>
89
                   <i class="iconfont icon-sousuo search-icon" @click="searchMask"></i>
90
                 </div>
90
                 </div>
91
                 <customerCard v-for="(item,index) in postCustomerData.isrecommend ? myRecommendUserList : data[3].list" :key="index" :data='item' @record='record'></customerCard>
91
                 <customerCard v-for="(item,index) in postCustomerData.isrecommend ? myRecommendUserList : data[3].list" :key="index" :data='item' @record='record'></customerCard>
279
               price: res.list[n].Price,
279
               price: res.list[n].Price,
280
               title: res.list[n].CouponName,
280
               title: res.list[n].CouponName,
281
               desc: res.list[n].Share.UseRule,
281
               desc: res.list[n].Share.UseRule,
282
-              startDate: this.toolClass.dateFormat(res.list[n].StartDate),
283
-              endDate: this.toolClass.dateFormat(res.list[n].EndDate),
282
+              startDate: this.toolClass.dateFormat(res.list[n].StartDate, 'YYYY年MM月DD日'),
283
+              endDate: this.toolClass.dateFormat(res.list[n].EndDate, 'YYYY年MM月DD日'),
284
               totalCount: res.list[n].TotalCount,
284
               totalCount: res.list[n].TotalCount,
285
               SentCount: res.list[n].SentCount,
285
               SentCount: res.list[n].SentCount,
286
               usedCount: res.list[n].UsedCount,
286
               usedCount: res.list[n].UsedCount,
431
           caseid: that.topCaseInfoData.caseId
431
           caseid: that.topCaseInfoData.caseId
432
         })
432
         })
433
       }
433
       }
434
-      wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
435
-        title: '城的空间',
436
-        desc: '城的空间',
437
-        link: `${window.location.origin}${window.location.pathname}/user.html#/mainPage/indexPage`,
438
-        thu_image: `${window.location.origin}${window.location.pathname}${logo}`
439
-      }).then(() => {
440
-        wx.getLocation({
441
-          type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
442
-          success: function (res) {
443
-            let latitude1 = res.latitude // 纬度,浮点数,范围为90 ~ -90
444
-            let longitude1 = res.longitude // 经度,浮点数,范围为180 ~ -180。
445
-            for (let i = 0; i < that.CaseList.length; i++) {
446
-              let result = that.CaseList[i].Coordinate.split(",")
447
-              let latitude2 = parseFloat(result[0])
448
-              let longitude2 = parseFloat(result[1])
449
-              if (that.toolClass.getGreatCircleDistance(latitude1, longitude1, latitude2, longitude2) < 500) {
450
-                that.topCaseInfoData.caseName = that.CaseList[i].CaseName
451
-                that.topCaseInfoData.caseId = that.CaseList[i].CaseId
452
-                that.getCaseTableList({
453
-                  caseid: that.topCaseInfoData.caseId
454
-                })
455
-                if (this.userInfo.customer.MapUser !== '') {
456
-                  that.getCaseTotal({
434
+      if (this.userInfo.customer.MapUser !== '') {
435
+        this.topCaseInfoData.caseId = this.userInfo.customer.BelongCaseId
436
+        for (let i = 0; i < this.CaseList.length; i++) {
437
+          if (this.CaseList[i].CaseId === this.topCaseInfoData.caseId) {
438
+            this.topCaseInfoData.caseName = this.CaseList[i].CaseName
439
+          }
440
+        }
441
+      } else {
442
+        wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
443
+          title: '城的空间',
444
+          desc: '城的空间',
445
+          link: `${window.location.origin}${window.location.pathname}/user.html#/mainPage/indexPage`,
446
+          thu_image: `${window.location.origin}${window.location.pathname}${logo}`
447
+        }).then(() => {
448
+          wx.getLocation({
449
+            type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
450
+            success: function (res) {
451
+              let latitude1 = res.latitude // 纬度,浮点数,范围为90 ~ -90
452
+              let longitude1 = res.longitude // 经度,浮点数,范围为180 ~ -180。
453
+              for (let i = 0; i < that.CaseList.length; i++) {
454
+                let result = that.CaseList[i].Coordinate.split(",")
455
+                let latitude2 = parseFloat(result[0])
456
+                let longitude2 = parseFloat(result[1])
457
+                if (that.toolClass.getGreatCircleDistance(latitude1, longitude1, latitude2, longitude2) < 500) {
458
+                  that.topCaseInfoData.caseName = that.CaseList[i].CaseName
459
+                  that.topCaseInfoData.caseId = that.CaseList[i].CaseId
460
+                  that.getCaseTableList({
457
                     caseid: that.topCaseInfoData.caseId
461
                     caseid: that.topCaseInfoData.caseId
458
                   })
462
                   })
463
+                  if (this.userInfo.customer.MapUser !== '') {
464
+                    that.getCaseTotal({
465
+                      caseid: that.topCaseInfoData.caseId
466
+                    })
467
+                  }
459
                 }
468
                 }
460
               }
469
               }
470
+              if (!that.topCaseInfoData.caseId || !that.topCaseInfoData.caseName) {
471
+                that.topCaseInfoData.caseName = '当前位置无案场'
472
+              }
461
             }
473
             }
462
-            if (!that.topCaseInfoData.caseId || !that.topCaseInfoData.caseName) {
463
-              that.topCaseInfoData.caseName = '当前位置无案场'
464
-            }
465
-          }
474
+          })
466
         })
475
         })
467
-      })
476
+      }
468
     },
477
     },
469
     beforeClose (action, done) {
478
     beforeClose (action, done) {
470
       if (action === 'confirm') {
479
       if (action === 'confirm') {

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

180
           .search-bar{
180
           .search-bar{
181
             align-items: center;
181
             align-items: center;
182
             justify-content: space-between;
182
             justify-content: space-between;
183
-            padding: 0 .1rem .1rem;
183
+            padding: 0 .1rem .1rem; 
184
             .search-icon{
184
             .search-icon{
185
               font-size: .18rem;
185
               font-size: .18rem;
186
               color: #909090;
186
               color: #909090;

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

2
   <div class="mainPage">
2
   <div class="mainPage">
3
     <div class="banner">
3
     <div class="banner">
4
       <div>
4
       <div>
5
-        <swiper :options="swiperOption" ref="mySwiper">
5
+        <!-- <swiper :options="swiperOption" ref="mySwiper">
6
           <swiper-slide class="swiper-slide" v-for="(item,index) in projectInfo.CmsCaseImgs" :key="index">
6
           <swiper-slide class="swiper-slide" v-for="(item,index) in projectInfo.CmsCaseImgs" :key="index">
7
             <img :src='item.CaseImageUrl' class="cover" alt="">
7
             <img :src='item.CaseImageUrl' class="cover" alt="">
8
           </swiper-slide>
8
           </swiper-slide>
9
-        </swiper>
9
+        </swiper> -->
10
+        <img :src="projectInfo.CmsCaseImgs[0].CaseImageUrl" alt="">
10
       </div>
11
       </div>
11
     </div>
12
     </div>
12
     <p>{{projectInfo.DetailContent}}</p>
13
     <p>{{projectInfo.DetailContent}}</p>

+ 2
- 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