|
@@ -68,7 +68,7 @@
|
68
|
68
|
<span>¥{{couponTotalCount}}</span>
|
69
|
69
|
</div>
|
70
|
70
|
</div>
|
71
|
|
- <a @click="toSalesHistory">销售记录</a>
|
|
71
|
+ <a @click="toSalesHistory" v-if="userInfo.customer.UserTypeId == 'manager'">销售记录</a>
|
72
|
72
|
</div>
|
73
|
73
|
<myCard v-for="(item,index) in data[2].list" :key="index" :data='item' @share='shareCoupon'></myCard>
|
74
|
74
|
</div>
|
|
@@ -77,7 +77,7 @@
|
77
|
77
|
<div class="list-box">
|
78
|
78
|
<div class="search-bar flex-h">
|
79
|
79
|
<span>共{{this.data[3].list.length}}位客户</span>
|
80
|
|
- <van-checkbox v-model="postCustomerData.isrecommend">
|
|
80
|
+ <!-- <van-checkbox v-model="postCustomerData.isrecommend">
|
81
|
81
|
我推荐的客户({{myRecommendUserList.length}}人)
|
82
|
82
|
<img
|
83
|
83
|
slot="icon"
|
|
@@ -85,7 +85,7 @@
|
85
|
85
|
:src="postCustomerData.isrecommend ? icon.active : icon.normal"
|
86
|
86
|
style="width:.2rem;height:.2rem;bottom: .02rem;position: relative;"
|
87
|
87
|
>
|
88
|
|
- </van-checkbox>
|
|
88
|
+ </van-checkbox> -->
|
89
|
89
|
<i class="iconfont icon-sousuo search-icon" @click="searchMask"></i>
|
90
|
90
|
</div>
|
91
|
91
|
<customerCard v-for="(item,index) in postCustomerData.isrecommend ? myRecommendUserList : data[3].list" :key="index" :data='item' @record='record'></customerCard>
|
|
@@ -279,8 +279,8 @@ export default {
|
279
|
279
|
price: res.list[n].Price,
|
280
|
280
|
title: res.list[n].CouponName,
|
281
|
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
|
284
|
totalCount: res.list[n].TotalCount,
|
285
|
285
|
SentCount: res.list[n].SentCount,
|
286
|
286
|
usedCount: res.list[n].UsedCount,
|
|
@@ -431,40 +431,49 @@ export default {
|
431
|
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
|
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
|
478
|
beforeClose (action, done) {
|
470
|
479
|
if (action === 'confirm') {
|