|
@@ -60,6 +60,7 @@
|
60
|
60
|
<a @click="toSalesHistory" v-if="userInfo.customer.UserTypeId == 'manager'">销售记录</a>
|
61
|
61
|
</div>
|
62
|
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
|
64
|
</div>
|
64
|
65
|
</li>
|
65
|
66
|
<li :hidden="navActive !== 2" class="my-card">
|
|
@@ -74,6 +75,7 @@
|
74
|
75
|
<a @click="toSalesHistory" v-if="userInfo.customer.UserTypeId == 'manager'">销售记录</a>
|
75
|
76
|
</div>
|
76
|
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
|
79
|
</div>
|
78
|
80
|
</li>
|
79
|
81
|
<li :hidden="navActive !== 3" class="customer-card">
|
|
@@ -92,6 +94,7 @@
|
92
|
94
|
<i class="iconfont icon-sousuo search-icon" @click="searchMask"></i>
|
93
|
95
|
</div>
|
94
|
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
|
98
|
</div>
|
96
|
99
|
</li>
|
97
|
100
|
</ul>
|
|
@@ -130,6 +133,7 @@ import active from '../../../../common/icon/check-box-checked.png'
|
130
|
133
|
import normal from '../../../../common/icon/check-box-empty.png'
|
131
|
134
|
import logo from '../../../../common/icon/indexlogo.jpg'
|
132
|
135
|
import wxsdk from '../../../../util/share'
|
|
136
|
+import noMore from '../../../../components/noMore/noMore'
|
133
|
137
|
import { mapState, createNamespacedHelpers } from 'vuex'
|
134
|
138
|
const { mapActions: actions } = createNamespacedHelpers('app')
|
135
|
139
|
const { mapActions: caseTableActions } = createNamespacedHelpers('placeOrderForCoffee')
|
|
@@ -252,7 +256,8 @@ export default {
|
252
|
256
|
topCaseInfo,
|
253
|
257
|
caseTableItem,
|
254
|
258
|
myCard,
|
255
|
|
- customerCard
|
|
259
|
+ customerCard,
|
|
260
|
+ noMore
|
256
|
261
|
},
|
257
|
262
|
created () {
|
258
|
263
|
if (!this.userInfo.customer.MapUser) {
|
|
@@ -264,64 +269,75 @@ export default {
|
264
|
269
|
this.getCustomerList({
|
265
|
270
|
...this.postCustomerData
|
266
|
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
|
286
|
this.getMyCouponList({
|
279
|
287
|
...this.postCouponData
|
280
|
288
|
}).then((res) => {
|
281
|
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
|
314
|
this.getMyCardList({
|
303
|
315
|
...this.postCardData
|
304
|
316
|
}).then((res) => {
|
305
|
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
|
343
|
} else {
|
|
@@ -505,9 +521,9 @@ export default {
|
505
|
521
|
},
|
506
|
522
|
toOrders (subItem, item) {
|
507
|
523
|
const _that = this
|
508
|
|
- this.getCaseConf({caseid: subItem.CaseId}).then(res => {
|
|
524
|
+ this.getCaseConf({ caseid: subItem.CaseId }).then(res => {
|
509
|
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
|
527
|
} else {
|
512
|
528
|
_that.$toast('当前案场已歇业!')
|
513
|
529
|
return
|