tplus-member 3.26.29 → 3.26.30

Sign up to get free protection for your applications and to get access to all the features.
@@ -307,105 +307,136 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
307
307
  return handleEvent;
308
308
  }()
309
309
  }, {
310
- key: 'storage',
310
+ key: 'justifyAuthority',
311
311
  value: function () {
312
312
  var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
313
- var _props5, _props5$cardList, cardList, _props5$selected, selected, cardInfo, _ref4, CardTypeEnum, WalletEnabled, FreePaymentPasswordStore, DueDate, CardStatusEnum;
313
+ var _props5, _props5$cardList, cardList, _props5$selected, selected, _ref4, CardStatusEnum;
314
314
 
315
315
  return _regenerator2.default.wrap(function _callee2$(_context2) {
316
316
  while (1) {
317
317
  switch (_context2.prev = _context2.next) {
318
318
  case 0:
319
319
  _props5 = this.props, _props5$cardList = _props5.cardList, cardList = _props5$cardList === undefined ? [] : _props5$cardList, _props5$selected = _props5.selected, selected = _props5$selected === undefined ? 0 : _props5$selected;
320
+ _ref4 = cardList[selected] || {}, CardStatusEnum = _ref4.CardStatusEnum;
320
321
 
321
- if (!(cardList && cardList.length)) {
322
- _context2.next = 35;
322
+ if (!(CardStatusEnum === 'DISABLED')) {
323
+ _context2.next = 7;
323
324
  break;
324
325
  }
325
326
 
326
- cardInfo = cardList[selected];
327
- _ref4 = cardInfo || {}, CardTypeEnum = _ref4.CardTypeEnum, WalletEnabled = _ref4.WalletEnabled, FreePaymentPasswordStore = _ref4.FreePaymentPasswordStore, DueDate = _ref4.DueDate, CardStatusEnum = _ref4.CardStatusEnum;
327
+ _tplusComponentsTouch.Message.warn('该储值卡未启用,不能进行该操作!');
328
+ return _context2.abrupt('return', false);
328
329
 
329
- if (!(CardTypeEnum === 'BALANCE_CARD')) {
330
- _context2.next = 8;
330
+ case 7:
331
+ if (!(CardStatusEnum === 'REFUNDED_CARD')) {
332
+ _context2.next = 12;
331
333
  break;
332
334
  }
333
335
 
334
- if (FreePaymentPasswordStore || WalletEnabled) {
335
- this.storageInit();
336
- } else {
337
- this.setState({ modifyPass: true, passwordTitle: '设置密码', warnContent: '' });
338
- }
339
- _context2.next = 35;
340
- break;
336
+ _tplusComponentsTouch.Message.warn('该储值卡已退卡,不能进行该操作!');
337
+ return _context2.abrupt('return', false);
341
338
 
342
- case 8:
343
- if (!(new Date(DueDate).getTime() < new Date().getTime())) {
344
- _context2.next = 11;
339
+ case 12:
340
+ if (!(CardStatusEnum === 'REFUNDING_CARD')) {
341
+ _context2.next = 17;
345
342
  break;
346
343
  }
347
344
 
348
- _tplusComponentsTouch.Message.warn('该储值卡已过期,不能储值!');
349
- return _context2.abrupt('return');
345
+ _tplusComponentsTouch.Message.warn('该储值卡退卡中,不能进行该操作!');
346
+ return _context2.abrupt('return', false);
350
347
 
351
- case 11:
352
- if (!(CardStatusEnum === 'DISABLED')) {
353
- _context2.next = 16;
348
+ case 17:
349
+ if (!(CardStatusEnum === 'INVALIDATION')) {
350
+ _context2.next = 22;
354
351
  break;
355
352
  }
356
353
 
357
- _tplusComponentsTouch.Message.warn('该储值卡未启用,不能储值!');
358
- return _context2.abrupt('return');
354
+ _tplusComponentsTouch.Message.warn('该储值卡已失效,不能进行该操作!');
355
+ return _context2.abrupt('return', false);
359
356
 
360
- case 16:
361
- if (!(CardStatusEnum === 'REFUNDED_CARD')) {
362
- _context2.next = 21;
357
+ case 22:
358
+ if (!(CardStatusEnum === 'EXPIRED')) {
359
+ _context2.next = 25;
363
360
  break;
364
361
  }
365
362
 
366
- _tplusComponentsTouch.Message.warn('该储值卡已退卡,不能储值!');
367
- return _context2.abrupt('return');
363
+ _tplusComponentsTouch.Message.warn('该储值卡已过期,不能进行该操作!');
364
+ return _context2.abrupt('return', false);
368
365
 
369
- case 21:
370
- if (!(CardStatusEnum === 'REFUNDING_CARD')) {
371
- _context2.next = 26;
366
+ case 25:
367
+ case 'end':
368
+ return _context2.stop();
369
+ }
370
+ }
371
+ }, _callee2, this);
372
+ }));
373
+
374
+ function justifyAuthority() {
375
+ return _ref3.apply(this, arguments);
376
+ }
377
+
378
+ return justifyAuthority;
379
+ }()
380
+ }, {
381
+ key: 'storage',
382
+ value: function () {
383
+ var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() {
384
+ var _props6, _props6$cardList, cardList, _props6$selected, selected, cardInfo, _ref6, CardTypeEnum, WalletEnabled, FreePaymentPasswordStore, data;
385
+
386
+ return _regenerator2.default.wrap(function _callee3$(_context3) {
387
+ while (1) {
388
+ switch (_context3.prev = _context3.next) {
389
+ case 0:
390
+ _props6 = this.props, _props6$cardList = _props6.cardList, cardList = _props6$cardList === undefined ? [] : _props6$cardList, _props6$selected = _props6.selected, selected = _props6$selected === undefined ? 0 : _props6$selected;
391
+
392
+ if (!(cardList && cardList.length)) {
393
+ _context3.next = 14;
372
394
  break;
373
395
  }
374
396
 
375
- _tplusComponentsTouch.Message.warn('该储值卡退卡中,不能储值!');
376
- return _context2.abrupt('return');
397
+ cardInfo = cardList[selected];
398
+ _ref6 = cardInfo || {}, CardTypeEnum = _ref6.CardTypeEnum, WalletEnabled = _ref6.WalletEnabled, FreePaymentPasswordStore = _ref6.FreePaymentPasswordStore;
377
399
 
378
- case 26:
379
- if (!(CardStatusEnum === 'INVALIDATION')) {
380
- _context2.next = 31;
400
+ if (!(CardTypeEnum === 'BALANCE_CARD')) {
401
+ _context3.next = 8;
381
402
  break;
382
403
  }
383
404
 
384
- _tplusComponentsTouch.Message.warn('该储值卡已失效,不能储值!');
385
- return _context2.abrupt('return');
405
+ if (FreePaymentPasswordStore || WalletEnabled) {
406
+ this.storageInit();
407
+ } else {
408
+ this.setState({ modifyPass: true, passwordTitle: '设置密码', warnContent: '' });
409
+ }
410
+ _context3.next = 14;
411
+ break;
412
+
413
+ case 8:
414
+ _context3.next = 10;
415
+ return this.justifyAuthority();
416
+
417
+ case 10:
418
+ data = _context3.sent;
386
419
 
387
- case 31:
388
- if (!(CardStatusEnum === 'EXPIRED')) {
389
- _context2.next = 34;
420
+ if (!(data === false)) {
421
+ _context3.next = 13;
390
422
  break;
391
423
  }
392
424
 
393
- _tplusComponentsTouch.Message.warn('该储值卡已过期,不能储值!');
394
- return _context2.abrupt('return');
425
+ return _context3.abrupt('return');
395
426
 
396
- case 34:
427
+ case 13:
397
428
  this.storageInit();
398
429
 
399
- case 35:
430
+ case 14:
400
431
  case 'end':
401
- return _context2.stop();
432
+ return _context3.stop();
402
433
  }
403
434
  }
404
- }, _callee2, this);
435
+ }, _callee3, this);
405
436
  }));
406
437
 
407
438
  function storage() {
408
- return _ref3.apply(this, arguments);
439
+ return _ref5.apply(this, arguments);
409
440
  }
410
441
 
411
442
  return storage;
@@ -417,45 +448,111 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
417
448
  key: 'changePassword',
418
449
 
419
450
  // 修改密码
420
- value: function changePassword() {
421
- var _props6 = this.props,
422
- _props6$cardList = _props6.cardList,
423
- cardList = _props6$cardList === undefined ? [] : _props6$cardList,
424
- _props6$selected = _props6.selected,
425
- selected = _props6$selected === undefined ? 0 : _props6$selected;
426
-
427
- var _ref5 = cardList[selected] || {},
428
- IsNeedPassword = _ref5.IsNeedPassword,
429
- CardTypeEnum = _ref5.CardTypeEnum;
430
-
431
- if (CardTypeEnum !== 'BALANCE_CARD' && !IsNeedPassword) {
432
- _tplusComponentsTouch.Message.warn("此卡没启用密码!");
433
- return;
451
+ value: function () {
452
+ var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
453
+ var data, _props7, _props7$cardList, cardList, _props7$selected, selected, _ref8, IsNeedPassword, CardTypeEnum;
454
+
455
+ return _regenerator2.default.wrap(function _callee4$(_context4) {
456
+ while (1) {
457
+ switch (_context4.prev = _context4.next) {
458
+ case 0:
459
+ _context4.next = 2;
460
+ return this.justifyAuthority();
461
+
462
+ case 2:
463
+ data = _context4.sent;
464
+
465
+ if (!(data === false)) {
466
+ _context4.next = 5;
467
+ break;
468
+ }
469
+
470
+ return _context4.abrupt('return');
471
+
472
+ case 5:
473
+ _props7 = this.props, _props7$cardList = _props7.cardList, cardList = _props7$cardList === undefined ? [] : _props7$cardList, _props7$selected = _props7.selected, selected = _props7$selected === undefined ? 0 : _props7$selected;
474
+ _ref8 = cardList[selected] || {}, IsNeedPassword = _ref8.IsNeedPassword, CardTypeEnum = _ref8.CardTypeEnum;
475
+
476
+ if (!(CardTypeEnum !== 'BALANCE_CARD' && !IsNeedPassword)) {
477
+ _context4.next = 10;
478
+ break;
479
+ }
480
+
481
+ _tplusComponentsTouch.Message.warn("此卡没启用密码!");
482
+ return _context4.abrupt('return');
483
+
484
+ case 10:
485
+ this.setState({ modifyPass: true, passwordTitle: '修改密码' });
486
+
487
+ case 11:
488
+ case 'end':
489
+ return _context4.stop();
490
+ }
491
+ }
492
+ }, _callee4, this);
493
+ }));
494
+
495
+ function changePassword() {
496
+ return _ref7.apply(this, arguments);
434
497
  }
435
- this.setState({ modifyPass: true, passwordTitle: '修改密码' });
436
- }
498
+
499
+ return changePassword;
500
+ }()
437
501
 
438
502
  // 重置密码
439
503
 
440
504
  }, {
441
505
  key: 'resetPassword',
442
- value: function resetPassword() {
443
- var _props7 = this.props,
444
- _props7$cardList = _props7.cardList,
445
- cardList = _props7$cardList === undefined ? [] : _props7$cardList,
446
- _props7$selected = _props7.selected,
447
- selected = _props7$selected === undefined ? 0 : _props7$selected;
448
-
449
- var _ref6 = cardList[selected] || {},
450
- IsNeedPassword = _ref6.IsNeedPassword,
451
- CardTypeEnum = _ref6.CardTypeEnum;
452
-
453
- if (CardTypeEnum !== 'BALANCE_CARD' && !IsNeedPassword) {
454
- _tplusComponentsTouch.Message.warn("此卡没启用密码!");
455
- return;
506
+ value: function () {
507
+ var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
508
+ var data, _props8, _props8$cardList, cardList, _props8$selected, selected, _ref10, IsNeedPassword, CardTypeEnum;
509
+
510
+ return _regenerator2.default.wrap(function _callee5$(_context5) {
511
+ while (1) {
512
+ switch (_context5.prev = _context5.next) {
513
+ case 0:
514
+ _context5.next = 2;
515
+ return this.justifyAuthority();
516
+
517
+ case 2:
518
+ data = _context5.sent;
519
+
520
+ if (!(data === false)) {
521
+ _context5.next = 5;
522
+ break;
523
+ }
524
+
525
+ return _context5.abrupt('return');
526
+
527
+ case 5:
528
+ _props8 = this.props, _props8$cardList = _props8.cardList, cardList = _props8$cardList === undefined ? [] : _props8$cardList, _props8$selected = _props8.selected, selected = _props8$selected === undefined ? 0 : _props8$selected;
529
+ _ref10 = cardList[selected] || {}, IsNeedPassword = _ref10.IsNeedPassword, CardTypeEnum = _ref10.CardTypeEnum;
530
+
531
+ if (!(CardTypeEnum !== 'BALANCE_CARD' && !IsNeedPassword)) {
532
+ _context5.next = 10;
533
+ break;
534
+ }
535
+
536
+ _tplusComponentsTouch.Message.warn("此卡没启用密码!");
537
+ return _context5.abrupt('return');
538
+
539
+ case 10:
540
+ this.setState({ modifyPass: true, passwordTitle: '重置密码' });
541
+
542
+ case 11:
543
+ case 'end':
544
+ return _context5.stop();
545
+ }
546
+ }
547
+ }, _callee5, this);
548
+ }));
549
+
550
+ function resetPassword() {
551
+ return _ref9.apply(this, arguments);
456
552
  }
457
- this.setState({ modifyPass: true, passwordTitle: '重置密码' });
458
- }
553
+
554
+ return resetPassword;
555
+ }()
459
556
 
460
557
  // 注销卡
461
558
 
@@ -483,16 +580,16 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
483
580
  // MeStorageCard > gridTemplateUser > MeStorageCard.cardbatchExport
484
581
  // 绑卡/会员绑卡确定按钮后,如果是会员绑卡
485
582
  value: function () {
486
- var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(state) {
487
- var value, _props8, getCardList, _props8$cardList, cardList, _props8$selected, selected, _ref8, StorageCardNo, params, ret;
583
+ var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(state) {
584
+ var value, _props9, getCardList, _props9$cardList, cardList, _props9$selected, selected, _ref12, StorageCardNo, params, ret;
488
585
 
489
- return _regenerator2.default.wrap(function _callee3$(_context3) {
586
+ return _regenerator2.default.wrap(function _callee6$(_context6) {
490
587
  while (1) {
491
- switch (_context3.prev = _context3.next) {
588
+ switch (_context6.prev = _context6.next) {
492
589
  case 0:
493
590
  value = state.value;
494
- _props8 = this.props, getCardList = _props8.getCardList, _props8$cardList = _props8.cardList, cardList = _props8$cardList === undefined ? [] : _props8$cardList, _props8$selected = _props8.selected, selected = _props8$selected === undefined ? 0 : _props8$selected;
495
- _ref8 = cardList[selected] || {}, StorageCardNo = _ref8.StorageCardNo;
591
+ _props9 = this.props, getCardList = _props9.getCardList, _props9$cardList = _props9.cardList, cardList = _props9$cardList === undefined ? [] : _props9$cardList, _props9$selected = _props9.selected, selected = _props9$selected === undefined ? 0 : _props9$selected;
592
+ _ref12 = cardList[selected] || {}, StorageCardNo = _ref12.StorageCardNo;
496
593
  params = {
497
594
  cardNo: StorageCardNo,
498
595
  mobile: value,
@@ -500,12 +597,12 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
500
597
  };
501
598
 
502
599
  this.changeBindCardBtnDisabled(true);
503
- _context3.prev = 5;
504
- _context3.next = 8;
600
+ _context6.prev = 5;
601
+ _context6.next = 8;
505
602
  return this.api.MeStorageCardBind(params);
506
603
 
507
604
  case 8:
508
- ret = _context3.sent;
605
+ ret = _context6.sent;
509
606
 
510
607
  this.changeBindCardBtnDisabled(false);
511
608
  _tplusComponentsTouch.Message.success('绑定成功');
@@ -513,25 +610,25 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
513
610
  this.setState({
514
611
  bindCardShow: false
515
612
  });
516
- _context3.next = 18;
613
+ _context6.next = 18;
517
614
  break;
518
615
 
519
616
  case 15:
520
- _context3.prev = 15;
521
- _context3.t0 = _context3['catch'](5);
617
+ _context6.prev = 15;
618
+ _context6.t0 = _context6['catch'](5);
522
619
 
523
620
  this.changeBindCardBtnDisabled(false);
524
621
 
525
622
  case 18:
526
623
  case 'end':
527
- return _context3.stop();
624
+ return _context6.stop();
528
625
  }
529
626
  }
530
- }, _callee3, this, [[5, 15]]);
627
+ }, _callee6, this, [[5, 15]]);
531
628
  }));
532
629
 
533
630
  function bindCardFn(_x3) {
534
- return _ref7.apply(this, arguments);
631
+ return _ref11.apply(this, arguments);
535
632
  }
536
633
 
537
634
  return bindCardFn;
@@ -547,30 +644,30 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
547
644
 
548
645
  // 点击退储值确定或者退现金之后,请求数据 isCash, 是否是现金结算
549
646
  value: function () {
550
- var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
647
+ var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7() {
551
648
  var cardInfo = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
552
649
  var storageAmount = arguments[1];
553
650
  var lastesStorageResult = arguments[2];
554
651
 
555
- var store, _store$data, data, MeStorageCardId, StorageCardNo, ID, _cardInfo$PresentAmou, PresentAmount, _props9, getCardList, _props9$cardList, cardList, _ref10, _ref10$isCanRefund, isCanRefund, _ref10$storageInfos, storageInfos, params, _ref11, finAccountId, paymentTypeId, latestStorageAmount, outTradeNo, ret, _ref12, isSuccess, ex;
652
+ var store, _store$data, data, MeStorageCardId, StorageCardNo, ID, _cardInfo$PresentAmou, PresentAmount, _props10, getCardList, _props10$cardList, cardList, _ref14, _ref14$isCanRefund, isCanRefund, _ref14$storageInfos, storageInfos, params, _ref15, finAccountId, paymentTypeId, latestStorageAmount, outTradeNo, ret, _ref16, isSuccess, ex;
556
653
 
557
- return _regenerator2.default.wrap(function _callee4$(_context4) {
654
+ return _regenerator2.default.wrap(function _callee7$(_context7) {
558
655
  while (1) {
559
- switch (_context4.prev = _context4.next) {
656
+ switch (_context7.prev = _context7.next) {
560
657
  case 0:
561
658
  if (cardInfo) {
562
- _context4.next = 2;
659
+ _context7.next = 2;
563
660
  break;
564
661
  }
565
662
 
566
- return _context4.abrupt('return');
663
+ return _context7.abrupt('return');
567
664
 
568
665
  case 2:
569
666
  store = _mutantsMicrofx.stores.memberStore;
570
667
  _store$data = store.data, data = _store$data === undefined ? {} : _store$data;
571
668
  MeStorageCardId = cardInfo.MeStorageCardId, StorageCardNo = cardInfo.StorageCardNo, ID = cardInfo.ID, _cardInfo$PresentAmou = cardInfo.PresentAmount, PresentAmount = _cardInfo$PresentAmou === undefined ? 0 : _cardInfo$PresentAmou;
572
- _props9 = this.props, getCardList = _props9.getCardList, _props9$cardList = _props9.cardList, cardList = _props9$cardList === undefined ? [] : _props9$cardList;
573
- _ref10 = lastesStorageResult || {}, _ref10$isCanRefund = _ref10.isCanRefund, isCanRefund = _ref10$isCanRefund === undefined ? false : _ref10$isCanRefund, _ref10$storageInfos = _ref10.storageInfos, storageInfos = _ref10$storageInfos === undefined ? [] : _ref10$storageInfos;
669
+ _props10 = this.props, getCardList = _props10.getCardList, _props10$cardList = _props10.cardList, cardList = _props10$cardList === undefined ? [] : _props10$cardList;
670
+ _ref14 = lastesStorageResult || {}, _ref14$isCanRefund = _ref14.isCanRefund, isCanRefund = _ref14$isCanRefund === undefined ? false : _ref14$isCanRefund, _ref14$storageInfos = _ref14.storageInfos, storageInfos = _ref14$storageInfos === undefined ? [] : _ref14$storageInfos;
574
671
  params = (0, _extends3.default)({}, data, {
575
672
  StorageDetails: [{
576
673
  Idmember: ID,
@@ -587,7 +684,7 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
587
684
  // 如果isCanRefund是false的话,说明是需要退现金,入参的计算方式明细金额是需要退的总金额
588
685
  });
589
686
  if (!isCanRefund) {
590
- _ref11 = storageInfos[0] || {}, finAccountId = _ref11.finAccountId, paymentTypeId = _ref11.paymentTypeId, latestStorageAmount = _ref11.latestStorageAmount, outTradeNo = _ref11.outTradeNo;
687
+ _ref15 = storageInfos[0] || {}, finAccountId = _ref15.finAccountId, paymentTypeId = _ref15.paymentTypeId, latestStorageAmount = _ref15.latestStorageAmount, outTradeNo = _ref15.outTradeNo;
591
688
 
592
689
  params.StorageMutiSettleDetails = [{
593
690
  "StorageAmount": storageAmount,
@@ -618,19 +715,19 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
618
715
  });
619
716
  }
620
717
 
621
- _context4.next = 11;
718
+ _context7.next = 11;
622
719
  return this.setState({
623
720
  refundBtnDisabled: true
624
721
  });
625
722
 
626
723
  case 11:
627
- _context4.prev = 11;
628
- _context4.next = 14;
724
+ _context7.prev = 11;
725
+ _context7.next = 14;
629
726
  return this.api.ReturnedStorage(params);
630
727
 
631
728
  case 14:
632
- ret = _context4.sent;
633
- _ref12 = ret.data || {}, isSuccess = _ref12.isSuccess, ex = _ref12.ex;
729
+ ret = _context7.sent;
730
+ _ref16 = ret.data || {}, isSuccess = _ref16.isSuccess, ex = _ref16.ex;
634
731
 
635
732
  if (isSuccess === true || isSuccess === 'true') {
636
733
  getCardList && getCardList(cardList && cardList.length > 1 ? cardList[0].MemberMobile : StorageCardNo);
@@ -639,34 +736,34 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
639
736
  this.returnedCash('\u53EA\u80FD\u9000\u73B0\u91D1\uFF0C\u662F\u5426\u7EE7\u7EED', storageAmount, lastesStorageResult);
640
737
  }
641
738
 
642
- _context4.next = 19;
739
+ _context7.next = 19;
643
740
  return this.setState({
644
741
  refundBtnDisabled: false,
645
742
  refundShow: false
646
743
  });
647
744
 
648
745
  case 19:
649
- _context4.next = 25;
746
+ _context7.next = 25;
650
747
  break;
651
748
 
652
749
  case 21:
653
- _context4.prev = 21;
654
- _context4.t0 = _context4['catch'](11);
655
- _context4.next = 25;
750
+ _context7.prev = 21;
751
+ _context7.t0 = _context7['catch'](11);
752
+ _context7.next = 25;
656
753
  return this.setState({
657
754
  refundBtnDisabled: false
658
755
  });
659
756
 
660
757
  case 25:
661
758
  case 'end':
662
- return _context4.stop();
759
+ return _context7.stop();
663
760
  }
664
761
  }
665
- }, _callee4, this, [[11, 21]]);
762
+ }, _callee7, this, [[11, 21]]);
666
763
  }));
667
764
 
668
765
  function submitRefundStorage() {
669
- return _ref9.apply(this, arguments);
766
+ return _ref13.apply(this, arguments);
670
767
  }
671
768
 
672
769
  return submitRefundStorage;
@@ -717,8 +814,8 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
717
814
  });
718
815
  }
719
816
  if (ret === true) {
720
- var _ref13 = _mutantsUtil.platform || {},
721
- isHorizontalSunMi = _ref13.isHorizontalSunMi;
817
+ var _ref17 = _mutantsUtil.platform || {},
818
+ isHorizontalSunMi = _ref17.isHorizontalSunMi;
722
819
 
723
820
  switch (key) {
724
821
  case 'storage':
@@ -758,27 +855,27 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
758
855
  refundShow = _state.refundShow,
759
856
  refundBtnDisabled = _state.refundBtnDisabled,
760
857
  menuKey = _state.menuKey;
761
- var _props10 = this.props,
762
- _props10$member = _props10.member,
763
- member = _props10$member === undefined ? {} : _props10$member,
764
- authProcess = _props10.authProcess,
765
- getCardList = _props10.getCardList,
766
- _props10$selected = _props10.selected,
767
- selected = _props10$selected === undefined ? 0 : _props10$selected,
768
- modifyMember = _props10.modifyMember,
769
- _props10$cardList = _props10.cardList,
770
- cardList = _props10$cardList === undefined ? [] : _props10$cardList;
771
-
772
- var _ref14 = cardList.length && cardList[selected] || {},
773
- Id = _ref14.Id,
774
- _ref14$BalanceStorage = _ref14.BalanceStorage,
775
- BalanceStorage = _ref14$BalanceStorage === undefined ? 0 : _ref14$BalanceStorage,
776
- _ref14$PresentAmount = _ref14.PresentAmount,
777
- PresentAmount = _ref14$PresentAmount === undefined ? 0 : _ref14$PresentAmount,
778
- WalletEnabled = _ref14.WalletEnabled,
779
- CardTypeEnum = _ref14.CardTypeEnum,
780
- CardStatusEnum = _ref14.CardStatusEnum,
781
- StorageCardNo = _ref14.StorageCardNo;
858
+ var _props11 = this.props,
859
+ _props11$member = _props11.member,
860
+ member = _props11$member === undefined ? {} : _props11$member,
861
+ authProcess = _props11.authProcess,
862
+ getCardList = _props11.getCardList,
863
+ _props11$selected = _props11.selected,
864
+ selected = _props11$selected === undefined ? 0 : _props11$selected,
865
+ modifyMember = _props11.modifyMember,
866
+ _props11$cardList = _props11.cardList,
867
+ cardList = _props11$cardList === undefined ? [] : _props11$cardList;
868
+
869
+ var _ref18 = cardList.length && cardList[selected] || {},
870
+ Id = _ref18.Id,
871
+ _ref18$BalanceStorage = _ref18.BalanceStorage,
872
+ BalanceStorage = _ref18$BalanceStorage === undefined ? 0 : _ref18$BalanceStorage,
873
+ _ref18$PresentAmount = _ref18.PresentAmount,
874
+ PresentAmount = _ref18$PresentAmount === undefined ? 0 : _ref18$PresentAmount,
875
+ WalletEnabled = _ref18.WalletEnabled,
876
+ CardTypeEnum = _ref18.CardTypeEnum,
877
+ CardStatusEnum = _ref18.CardStatusEnum,
878
+ StorageCardNo = _ref18.StorageCardNo;
782
879
 
783
880
  return _react2.default.createElement(
784
881
  'div',
@@ -819,10 +916,10 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
819
916
  cancel: this.changePasswordCancel,
820
917
  btnDissabled: btnDissabled
821
918
  },
822
- passwordTitle === '换卡' ? _react2.default.createElement(_changeMemberCard2.default, { cardList: cardList && cardList.length && cardList[selected], modifyMember: modifyMember, member: member, ref: function ref(_ref15) {
823
- return _this4.modifyPass = _ref15;
824
- }, cancelModal: this.changePasswordCancel }) : _react2.default.createElement(_modifyPass2.default, { menuKey: menuKey, cardListCopy: cardList, cardList: cardList && cardList.length && cardList[selected], changeBtnDisabled: this.changeBtnDisabled, loadUserInfo: getCardList, selected: selected, storageInit: this.storageInit, passwordTitle: CardTypeEnum === 'BALANCE_CARD' && !WalletEnabled ? '设置密码' : passwordTitle, modifyMember: modifyMember, ref: function ref(_ref16) {
825
- return _this4.modifyPass = _ref16;
919
+ passwordTitle === '换卡' ? _react2.default.createElement(_changeMemberCard2.default, { cardList: cardList && cardList.length && cardList[selected], modifyMember: modifyMember, member: member, ref: function ref(_ref19) {
920
+ return _this4.modifyPass = _ref19;
921
+ }, cancelModal: this.changePasswordCancel }) : _react2.default.createElement(_modifyPass2.default, { menuKey: menuKey, cardListCopy: cardList, cardList: cardList && cardList.length && cardList[selected], changeBtnDisabled: this.changeBtnDisabled, loadUserInfo: getCardList, selected: selected, storageInit: this.storageInit, passwordTitle: CardTypeEnum === 'BALANCE_CARD' && !WalletEnabled ? '设置密码' : passwordTitle, modifyMember: modifyMember, ref: function ref(_ref20) {
922
+ return _this4.modifyPass = _ref20;
826
923
  }, member: member, cancelModal: this.changePasswordCancel })
827
924
  ),
828
925
  _react2.default.createElement(
@@ -837,8 +934,8 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
837
934
  btnDissabled: bindCardBtnDisabled
838
935
  },
839
936
  _react2.default.createElement(_bindCard2.default, {
840
- ref: function ref(_ref17) {
841
- return _this4.bindCardRef = _ref17;
937
+ ref: function ref(_ref21) {
938
+ return _this4.bindCardRef = _ref21;
842
939
  },
843
940
  bindCardClick: this.bindCardClick,
844
941
  changeBindCardBtnDisabled: this.changeBindCardBtnDisabled
@@ -938,9 +1035,9 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
938
1035
  var _this5 = this;
939
1036
 
940
1037
  this.filterMenus = function (tags) {
941
- var _props11 = _this5.props,
942
- title = _props11.title,
943
- storeKey = _props11.storeKey;
1038
+ var _props12 = _this5.props,
1039
+ title = _props12.title,
1040
+ storeKey = _props12.storeKey;
944
1041
 
945
1042
  menus = menus1;
946
1043
  return menus.filter(function (menu) {
@@ -953,15 +1050,15 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
953
1050
  };
954
1051
 
955
1052
  this.storageInit = function () {
956
- var _props12 = _this5.props,
957
- _props12$cardList = _props12.cardList,
958
- cardList = _props12$cardList === undefined ? [] : _props12$cardList,
959
- getCardList = _props12.getCardList,
960
- _props12$selected = _props12.selected,
961
- selected = _props12$selected === undefined ? 0 : _props12$selected;
1053
+ var _props13 = _this5.props,
1054
+ _props13$cardList = _props13.cardList,
1055
+ cardList = _props13$cardList === undefined ? [] : _props13$cardList,
1056
+ getCardList = _props13.getCardList,
1057
+ _props13$selected = _props13.selected,
1058
+ selected = _props13$selected === undefined ? 0 : _props13$selected;
962
1059
 
963
- var _ref18 = cardList[selected] || {},
964
- StorageCardNo = _ref18.StorageCardNo;
1060
+ var _ref22 = cardList[selected] || {},
1061
+ StorageCardNo = _ref22.StorageCardNo;
965
1062
 
966
1063
  _mutantsMicrofx.stores.memberStore.init({
967
1064
  cardInfo: cardList[selected],
@@ -995,19 +1092,19 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
995
1092
  };
996
1093
 
997
1094
  this.reportLoss = function () {
998
- var _props13 = _this5.props,
999
- member = _props13.member,
1000
- handleChange = _props13.handleChange,
1001
- memberEnumState = _props13.memberEnumState;
1095
+ var _props14 = _this5.props,
1096
+ member = _props14.member,
1097
+ handleChange = _props14.handleChange,
1098
+ memberEnumState = _props14.memberEnumState;
1002
1099
 
1003
1100
  _tplusComponentsTouch.ModalWraper.confirm({
1004
1101
  title: '提示',
1005
1102
  content: '确定要挂失该会员卡吗?',
1006
1103
  onOk: function () {
1007
- var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
1008
- return _regenerator2.default.wrap(function _callee5$(_context5) {
1104
+ var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
1105
+ return _regenerator2.default.wrap(function _callee8$(_context8) {
1009
1106
  while (1) {
1010
- switch (_context5.prev = _context5.next) {
1107
+ switch (_context8.prev = _context8.next) {
1011
1108
  case 0:
1012
1109
  _this5.api.RecordLoss(member).then(function (ret) {
1013
1110
  var Success = ret.Success,
@@ -1029,14 +1126,14 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
1029
1126
 
1030
1127
  case 1:
1031
1128
  case 'end':
1032
- return _context5.stop();
1129
+ return _context8.stop();
1033
1130
  }
1034
1131
  }
1035
- }, _callee5, _this5);
1132
+ }, _callee8, _this5);
1036
1133
  }));
1037
1134
 
1038
1135
  return function onOk() {
1039
- return _ref19.apply(this, arguments);
1136
+ return _ref23.apply(this, arguments);
1040
1137
  };
1041
1138
  }(),
1042
1139
  onCancel: function onCancel() {},
@@ -1047,19 +1144,19 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
1047
1144
 
1048
1145
  this.cancelLoss = function () {
1049
1146
  if (!_this5.api) return;
1050
- var _props14 = _this5.props,
1051
- member = _props14.member,
1052
- handleChange = _props14.handleChange,
1053
- memberEnumState = _props14.memberEnumState;
1147
+ var _props15 = _this5.props,
1148
+ member = _props15.member,
1149
+ handleChange = _props15.handleChange,
1150
+ memberEnumState = _props15.memberEnumState;
1054
1151
 
1055
1152
  _tplusComponentsTouch.ModalWraper.confirm({
1056
1153
  title: '提示',
1057
1154
  content: '确定要取消挂失该会员卡吗?',
1058
1155
  onOk: function () {
1059
- var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
1060
- return _regenerator2.default.wrap(function _callee6$(_context6) {
1156
+ var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9() {
1157
+ return _regenerator2.default.wrap(function _callee9$(_context9) {
1061
1158
  while (1) {
1062
- switch (_context6.prev = _context6.next) {
1159
+ switch (_context9.prev = _context9.next) {
1063
1160
  case 0:
1064
1161
  _this5.api.UnRecordLoss(member).then(function (ret) {
1065
1162
  var Success = ret.Success,
@@ -1081,14 +1178,14 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
1081
1178
 
1082
1179
  case 1:
1083
1180
  case 'end':
1084
- return _context6.stop();
1181
+ return _context9.stop();
1085
1182
  }
1086
1183
  }
1087
- }, _callee6, _this5);
1184
+ }, _callee9, _this5);
1088
1185
  }));
1089
1186
 
1090
1187
  return function onOk() {
1091
- return _ref20.apply(this, arguments);
1188
+ return _ref24.apply(this, arguments);
1092
1189
  };
1093
1190
  }(),
1094
1191
  onCancel: function onCancel() {},
@@ -1098,19 +1195,19 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
1098
1195
  };
1099
1196
 
1100
1197
  this.openCard = function () {
1101
- var _props15 = _this5.props,
1102
- member = _props15.member,
1103
- loadUserInfo = _props15.loadUserInfo,
1104
- _props15$selected = _props15.selected,
1105
- selected = _props15$selected === undefined ? 0 : _props15$selected,
1106
- memberEnumState = _props15.memberEnumState;
1198
+ var _props16 = _this5.props,
1199
+ member = _props16.member,
1200
+ loadUserInfo = _props16.loadUserInfo,
1201
+ _props16$selected = _props16.selected,
1202
+ selected = _props16$selected === undefined ? 0 : _props16$selected,
1203
+ memberEnumState = _props16.memberEnumState;
1107
1204
 
1108
- var _ref21 = member || {},
1109
- ID = _ref21.ID,
1110
- _ref21$MemberType = _ref21.MemberType;
1205
+ var _ref25 = member || {},
1206
+ ID = _ref25.ID,
1207
+ _ref25$MemberType = _ref25.MemberType;
1111
1208
 
1112
- _ref21$MemberType = _ref21$MemberType === undefined ? {} : _ref21$MemberType;
1113
- var IsStorage = _ref21$MemberType.IsStorage;
1209
+ _ref25$MemberType = _ref25$MemberType === undefined ? {} : _ref25$MemberType;
1210
+ var IsStorage = _ref25$MemberType.IsStorage;
1114
1211
 
1115
1212
  memberStore.GetMemberDTO(ID, false).then(function (ret) {
1116
1213
  _mutantsMicrofx.stores.selectMemberStore.setCurMemberInfo(ret);
@@ -1144,29 +1241,80 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
1144
1241
  _tplusComponentsTouch.Loading.hide();
1145
1242
  };
1146
1243
 
1147
- this.bindCard = function () {
1148
- var _props16 = _this5.props,
1149
- _props16$cardList = _props16.cardList,
1150
- cardList = _props16$cardList === undefined ? [] : _props16$cardList,
1151
- _props16$selected = _props16.selected,
1152
- selected = _props16$selected === undefined ? 0 : _props16$selected;
1244
+ this.bindCard = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10() {
1245
+ var data, _props17, _props17$cardList, cardList, _props17$selected, selected, _ref27, ID;
1153
1246
 
1154
- var _ref22 = cardList[selected] || {},
1155
- ID = _ref22.ID;
1247
+ return _regenerator2.default.wrap(function _callee10$(_context10) {
1248
+ while (1) {
1249
+ switch (_context10.prev = _context10.next) {
1250
+ case 0:
1251
+ _context10.next = 2;
1252
+ return _this5.justifyAuthority();
1156
1253
 
1157
- if (!!ID) {
1158
- _tplusComponentsTouch.Message.error('该储值卡已经绑定,不能再次进行绑定');
1159
- return;
1160
- }
1161
- _this5.setState({ bindCardShow: true });
1162
- };
1254
+ case 2:
1255
+ data = _context10.sent;
1163
1256
 
1164
- this.changeBindCardCancel = function () {
1165
- _this5.setState({
1166
- bindCardShow: false,
1167
- bindCardBtnDisabled: true
1168
- });
1169
- };
1257
+ if (!(data === false)) {
1258
+ _context10.next = 5;
1259
+ break;
1260
+ }
1261
+
1262
+ return _context10.abrupt('return');
1263
+
1264
+ case 5:
1265
+ _props17 = _this5.props, _props17$cardList = _props17.cardList, cardList = _props17$cardList === undefined ? [] : _props17$cardList, _props17$selected = _props17.selected, selected = _props17$selected === undefined ? 0 : _props17$selected;
1266
+ _ref27 = cardList[selected] || {}, ID = _ref27.ID;
1267
+
1268
+ if (!ID) {
1269
+ _context10.next = 10;
1270
+ break;
1271
+ }
1272
+
1273
+ _tplusComponentsTouch.Message.error('该储值卡已经绑定,不能再次进行绑定');
1274
+ return _context10.abrupt('return');
1275
+
1276
+ case 10:
1277
+ _this5.setState({ bindCardShow: true });
1278
+
1279
+ case 11:
1280
+ case 'end':
1281
+ return _context10.stop();
1282
+ }
1283
+ }
1284
+ }, _callee10, _this5);
1285
+ }));
1286
+ this.changeBindCardCancel = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11() {
1287
+ var data;
1288
+ return _regenerator2.default.wrap(function _callee11$(_context11) {
1289
+ while (1) {
1290
+ switch (_context11.prev = _context11.next) {
1291
+ case 0:
1292
+ _context11.next = 2;
1293
+ return _this5.justifyAuthority();
1294
+
1295
+ case 2:
1296
+ data = _context11.sent;
1297
+
1298
+ if (!(data === false)) {
1299
+ _context11.next = 5;
1300
+ break;
1301
+ }
1302
+
1303
+ return _context11.abrupt('return');
1304
+
1305
+ case 5:
1306
+ _this5.setState({
1307
+ bindCardShow: false,
1308
+ bindCardBtnDisabled: true
1309
+ });
1310
+
1311
+ case 6:
1312
+ case 'end':
1313
+ return _context11.stop();
1314
+ }
1315
+ }
1316
+ }, _callee11, _this5);
1317
+ }));
1170
1318
 
1171
1319
  this.changeBindCardBtnDisabled = function (disabled) {
1172
1320
  _this5.setState({
@@ -1188,42 +1336,42 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
1188
1336
  });
1189
1337
  };
1190
1338
 
1191
- this.changeRefundOk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7() {
1192
- var _props17, _props17$cardList, cardList, _props17$selected, selected, _ref24, MeStorageCardId, _ref24$BalanceStorage, BalanceStorage, _ref24$PresentAmount, PresentAmount, StorageCardNo, ID, refundable, storageAmount, lastesStorageResult, _ref25, _ref25$isCanRefund, isCanRefund, _ref25$storageInfos, storageInfos, latestStorageAmount;
1339
+ this.changeRefundOk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12() {
1340
+ var _props18, _props18$cardList, cardList, _props18$selected, selected, _ref30, MeStorageCardId, _ref30$BalanceStorage, BalanceStorage, _ref30$PresentAmount, PresentAmount, StorageCardNo, ID, refundable, storageAmount, lastesStorageResult, _ref31, _ref31$isCanRefund, isCanRefund, _ref31$storageInfos, storageInfos, latestStorageAmount;
1193
1341
 
1194
- return _regenerator2.default.wrap(function _callee7$(_context7) {
1342
+ return _regenerator2.default.wrap(function _callee12$(_context12) {
1195
1343
  while (1) {
1196
- switch (_context7.prev = _context7.next) {
1344
+ switch (_context12.prev = _context12.next) {
1197
1345
  case 0:
1198
- _props17 = _this5.props, _props17$cardList = _props17.cardList, cardList = _props17$cardList === undefined ? [] : _props17$cardList, _props17$selected = _props17.selected, selected = _props17$selected === undefined ? 0 : _props17$selected;
1199
- _ref24 = cardList.length && cardList[selected] || {}, MeStorageCardId = _ref24.MeStorageCardId, _ref24$BalanceStorage = _ref24.BalanceStorage, BalanceStorage = _ref24$BalanceStorage === undefined ? 0 : _ref24$BalanceStorage, _ref24$PresentAmount = _ref24.PresentAmount, PresentAmount = _ref24$PresentAmount === undefined ? 0 : _ref24$PresentAmount, StorageCardNo = _ref24.StorageCardNo, ID = _ref24.ID;
1346
+ _props18 = _this5.props, _props18$cardList = _props18.cardList, cardList = _props18$cardList === undefined ? [] : _props18$cardList, _props18$selected = _props18.selected, selected = _props18$selected === undefined ? 0 : _props18$selected;
1347
+ _ref30 = cardList.length && cardList[selected] || {}, MeStorageCardId = _ref30.MeStorageCardId, _ref30$BalanceStorage = _ref30.BalanceStorage, BalanceStorage = _ref30$BalanceStorage === undefined ? 0 : _ref30$BalanceStorage, _ref30$PresentAmount = _ref30.PresentAmount, PresentAmount = _ref30$PresentAmount === undefined ? 0 : _ref30$PresentAmount, StorageCardNo = _ref30.StorageCardNo, ID = _ref30.ID;
1200
1348
  refundable = parseFloat((0, _utils.getFixedNumber)(BalanceStorage - PresentAmount));
1201
1349
  storageAmount = (0, _utils.getFixedNumber)(0 - (BalanceStorage - PresentAmount));
1202
- _context7.next = 6;
1350
+ _context12.next = 6;
1203
1351
  return _this5.api.getLatestStorageAmount({ cardId: MeStorageCardId, inputRefundAmount: refundable });
1204
1352
 
1205
1353
  case 6:
1206
- lastesStorageResult = _context7.sent;
1207
- _ref25 = lastesStorageResult.data || {}, _ref25$isCanRefund = _ref25.isCanRefund, isCanRefund = _ref25$isCanRefund === undefined ? false : _ref25$isCanRefund, _ref25$storageInfos = _ref25.storageInfos, storageInfos = _ref25$storageInfos === undefined ? [] : _ref25$storageInfos;
1354
+ lastesStorageResult = _context12.sent;
1355
+ _ref31 = lastesStorageResult.data || {}, _ref31$isCanRefund = _ref31.isCanRefund, isCanRefund = _ref31$isCanRefund === undefined ? false : _ref31$isCanRefund, _ref31$storageInfos = _ref31.storageInfos, storageInfos = _ref31$storageInfos === undefined ? [] : _ref31$storageInfos;
1208
1356
 
1209
1357
  // 退款金额小于等于0,不允许退款
1210
1358
 
1211
1359
  if (!(Number(refundable) <= 0)) {
1212
- _context7.next = 11;
1360
+ _context12.next = 11;
1213
1361
  break;
1214
1362
  }
1215
1363
 
1216
1364
  _tplusComponentsTouch.Message.error('无可退金额,不支持退款!');
1217
- return _context7.abrupt('return');
1365
+ return _context12.abrupt('return');
1218
1366
 
1219
1367
  case 11:
1220
1368
  if (isCanRefund) {
1221
- _context7.next = 14;
1369
+ _context12.next = 14;
1222
1370
  break;
1223
1371
  }
1224
1372
 
1225
1373
  _this5.returnedCash('\u53EA\u80FD\u9000\u73B0\u91D1\uFF0C\u662F\u5426\u7EE7\u7EED', storageAmount, lastesStorageResult.data);
1226
- return _context7.abrupt('return');
1374
+ return _context12.abrupt('return');
1227
1375
 
1228
1376
  case 14:
1229
1377
 
@@ -1234,12 +1382,12 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
1234
1382
  // 退款只支持退最后一次储值的金额,如果最后一次储值的金额小于可退金额,弹出提示。
1235
1383
 
1236
1384
  if (!(latestStorageAmount && latestStorageAmount < refundable)) {
1237
- _context7.next = 18;
1385
+ _context12.next = 18;
1238
1386
  break;
1239
1387
  }
1240
1388
 
1241
1389
  _this5.returnedCash('\u9000\u6B3E\u5927\u4E8E\u6700\u540E\u4E00\u6B21\u50A8\u503C\u91D1\u989D\uFF0C\u65E0\u6CD5\u539F\u8DEF\u9000\u56DE\uFF0C\u53EA\u53EF\u9000\u73B0\u91D1\uFF01\u662F\u5426\u9000\u6B3E\uFF1F', storageAmount, lastesStorageResult.data);
1242
- return _context7.abrupt('return');
1390
+ return _context12.abrupt('return');
1243
1391
 
1244
1392
  case 18:
1245
1393
 
@@ -1247,93 +1395,135 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
1247
1395
 
1248
1396
  case 19:
1249
1397
  case 'end':
1250
- return _context7.stop();
1398
+ return _context12.stop();
1251
1399
  }
1252
1400
  }
1253
- }, _callee7, _this5);
1401
+ }, _callee12, _this5);
1254
1402
  }));
1403
+ this.returnedStorage = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13() {
1404
+ var data, _props19, _props19$cardList, cardList, _props19$selected, selected, _ref33, Id;
1255
1405
 
1256
- this.returnedStorage = function () {
1257
- var _props18 = _this5.props,
1258
- _props18$cardList = _props18.cardList,
1259
- cardList = _props18$cardList === undefined ? [] : _props18$cardList,
1260
- _props18$selected = _props18.selected,
1261
- selected = _props18$selected === undefined ? 0 : _props18$selected;
1406
+ return _regenerator2.default.wrap(function _callee13$(_context13) {
1407
+ while (1) {
1408
+ switch (_context13.prev = _context13.next) {
1409
+ case 0:
1410
+ _context13.next = 2;
1411
+ return _this5.justifyAuthority();
1262
1412
 
1263
- var _ref26 = cardList[selected] || {},
1264
- Id = _ref26.Id;
1413
+ case 2:
1414
+ data = _context13.sent;
1265
1415
 
1266
- cardList[selected].meMemberId = Id;
1267
- cardList[selected].isRefundStorage = 1; // 自己添加参数,用来判断是储值还是退储值
1268
- _mutantsMicrofx.stores.memberStore.init({
1269
- cardInfo: cardList[selected],
1270
- settlementControlEvent: {},
1271
- callback: function callback() {
1272
- _this5.setState({
1273
- refundShow: true
1274
- });
1275
- }
1276
- });
1277
- };
1416
+ if (!(data === false)) {
1417
+ _context13.next = 5;
1418
+ break;
1419
+ }
1278
1420
 
1279
- this.memberUnBindCard = function () {
1280
- var _props19 = _this5.props,
1281
- _props19$cardList = _props19.cardList,
1282
- cardList = _props19$cardList === undefined ? [] : _props19$cardList,
1283
- _props19$selected = _props19.selected,
1284
- selected = _props19$selected === undefined ? 0 : _props19$selected;
1285
-
1286
- var _ref27 = cardList[selected] || {},
1287
- StorageCardNo = _ref27.StorageCardNo,
1288
- MemberMobile = _ref27.MemberMobile,
1289
- MemberName = _ref27.MemberName,
1290
- ID = _ref27.ID;
1291
-
1292
- if (!ID) {
1293
- _tplusComponentsTouch.Message.error('该卡未绑定会员');
1294
- return;
1295
- }
1296
- _tplusComponentsTouch.ModalWraper.confirm({
1297
- title: '提示',
1298
- content: '\u6B64\u5361\u5C5E\u4E8E' + (MemberName || MemberMobile) + '\u4F1A\u5458\uFF0C\u786E\u8BA4\u89E3\u7ED1\u5417\uFF1F',
1299
- confirmLoading: _this5.state.memberUnBindCardLoading,
1300
- onOk: function () {
1301
- var _ref28 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
1302
- return _regenerator2.default.wrap(function _callee8$(_context8) {
1303
- while (1) {
1304
- switch (_context8.prev = _context8.next) {
1305
- case 0:
1306
- _this5.setState({
1307
- memberUnBindCardLoading: true
1308
- });
1309
- _this5.api.MeStorageCardUnbind({ StorageCardNo: StorageCardNo }).then(function (res) {
1310
- var getCardList = _this5.props.getCardList;
1311
-
1312
- _tplusComponentsTouch.Message.success('解绑成功');
1313
- getCardList(cardList && cardList.length > 1 ? cardList[0].MemberMobile : StorageCardNo);
1314
- _this5.setState({
1315
- memberUnBindCardLoading: false
1316
- });
1317
- }).catch(function () {
1318
- _this5.setState({
1319
- memberUnBindCardLoading: false
1320
- });
1321
- });
1421
+ return _context13.abrupt('return');
1322
1422
 
1323
- case 2:
1324
- case 'end':
1325
- return _context8.stop();
1423
+ case 5:
1424
+ _props19 = _this5.props, _props19$cardList = _props19.cardList, cardList = _props19$cardList === undefined ? [] : _props19$cardList, _props19$selected = _props19.selected, selected = _props19$selected === undefined ? 0 : _props19$selected;
1425
+ _ref33 = cardList[selected] || {}, Id = _ref33.Id;
1426
+
1427
+ cardList[selected].meMemberId = Id;
1428
+ cardList[selected].isRefundStorage = 1; // 自己添加参数,用来判断是储值还是退储值
1429
+ _mutantsMicrofx.stores.memberStore.init({
1430
+ cardInfo: cardList[selected],
1431
+ settlementControlEvent: {},
1432
+ callback: function callback() {
1433
+ _this5.setState({
1434
+ refundShow: true
1435
+ });
1326
1436
  }
1437
+ });
1438
+
1439
+ case 10:
1440
+ case 'end':
1441
+ return _context13.stop();
1442
+ }
1443
+ }
1444
+ }, _callee13, _this5);
1445
+ }));
1446
+ this.memberUnBindCard = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15() {
1447
+ var data, _props20, _props20$cardList, cardList, _props20$selected, selected, _ref35, StorageCardNo, MemberMobile, MemberName, ID;
1448
+
1449
+ return _regenerator2.default.wrap(function _callee15$(_context15) {
1450
+ while (1) {
1451
+ switch (_context15.prev = _context15.next) {
1452
+ case 0:
1453
+ _context15.next = 2;
1454
+ return _this5.justifyAuthority();
1455
+
1456
+ case 2:
1457
+ data = _context15.sent;
1458
+
1459
+ if (!(data === false)) {
1460
+ _context15.next = 5;
1461
+ break;
1327
1462
  }
1328
- }, _callee8, _this5);
1329
- }));
1330
1463
 
1331
- return function onOk() {
1332
- return _ref28.apply(this, arguments);
1333
- };
1334
- }()
1335
- });
1336
- };
1464
+ return _context15.abrupt('return');
1465
+
1466
+ case 5:
1467
+ _props20 = _this5.props, _props20$cardList = _props20.cardList, cardList = _props20$cardList === undefined ? [] : _props20$cardList, _props20$selected = _props20.selected, selected = _props20$selected === undefined ? 0 : _props20$selected;
1468
+ _ref35 = cardList[selected] || {}, StorageCardNo = _ref35.StorageCardNo, MemberMobile = _ref35.MemberMobile, MemberName = _ref35.MemberName, ID = _ref35.ID;
1469
+
1470
+ if (ID) {
1471
+ _context15.next = 10;
1472
+ break;
1473
+ }
1474
+
1475
+ _tplusComponentsTouch.Message.error('该卡未绑定会员');
1476
+ return _context15.abrupt('return');
1477
+
1478
+ case 10:
1479
+ _tplusComponentsTouch.ModalWraper.confirm({
1480
+ title: '提示',
1481
+ content: '\u6B64\u5361\u5C5E\u4E8E' + (MemberName || MemberMobile) + '\u4F1A\u5458\uFF0C\u786E\u8BA4\u89E3\u7ED1\u5417\uFF1F',
1482
+ confirmLoading: _this5.state.memberUnBindCardLoading,
1483
+ onOk: function () {
1484
+ var _ref36 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
1485
+ return _regenerator2.default.wrap(function _callee14$(_context14) {
1486
+ while (1) {
1487
+ switch (_context14.prev = _context14.next) {
1488
+ case 0:
1489
+ _this5.setState({
1490
+ memberUnBindCardLoading: true
1491
+ });
1492
+ _this5.api.MeStorageCardUnbind({ StorageCardNo: StorageCardNo }).then(function (res) {
1493
+ var getCardList = _this5.props.getCardList;
1494
+
1495
+ _tplusComponentsTouch.Message.success('解绑成功');
1496
+ getCardList(cardList && cardList.length > 1 ? cardList[0].MemberMobile : StorageCardNo);
1497
+ _this5.setState({
1498
+ memberUnBindCardLoading: false
1499
+ });
1500
+ }).catch(function () {
1501
+ _this5.setState({
1502
+ memberUnBindCardLoading: false
1503
+ });
1504
+ });
1505
+
1506
+ case 2:
1507
+ case 'end':
1508
+ return _context14.stop();
1509
+ }
1510
+ }
1511
+ }, _callee14, _this5);
1512
+ }));
1513
+
1514
+ return function onOk() {
1515
+ return _ref36.apply(this, arguments);
1516
+ };
1517
+ }()
1518
+ });
1519
+
1520
+ case 11:
1521
+ case 'end':
1522
+ return _context15.stop();
1523
+ }
1524
+ }
1525
+ }, _callee15, _this5);
1526
+ }));
1337
1527
 
1338
1528
  this.changeBtnDisabled = function (value) {
1339
1529
  _this5.setState({
@@ -1342,21 +1532,21 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
1342
1532
  };
1343
1533
 
1344
1534
  this.getMenuItem = function (index, menu) {
1345
- var _props20 = _this5.props,
1346
- loadingBtn = _props20.loadingBtn,
1347
- _props20$cardList = _props20.cardList,
1348
- cardList = _props20$cardList === undefined ? [] : _props20$cardList,
1349
- _props20$selected = _props20.selected,
1350
- selected = _props20$selected === undefined ? 0 : _props20$selected;
1535
+ var _props21 = _this5.props,
1536
+ loadingBtn = _props21.loadingBtn,
1537
+ _props21$cardList = _props21.cardList,
1538
+ cardList = _props21$cardList === undefined ? [] : _props21$cardList,
1539
+ _props21$selected = _props21.selected,
1540
+ selected = _props21$selected === undefined ? 0 : _props21$selected;
1351
1541
 
1352
- var _ref29 = _this5.state || {},
1353
- setPwdShortKey = _ref29.setPwdShortKey;
1542
+ var _ref37 = _this5.state || {},
1543
+ setPwdShortKey = _ref37.setPwdShortKey;
1354
1544
 
1355
1545
  var newStyle = _mutantsUtil.localStore && _mutantsUtil.localStore.get('voucherDefaultPosMode') == 'voucher';
1356
1546
 
1357
- var _ref30 = cardList && cardList.length && cardList[selected] || {},
1358
- WalletEnabled = _ref30.WalletEnabled,
1359
- CardTypeEnum = _ref30.CardTypeEnum;
1547
+ var _ref38 = cardList && cardList.length && cardList[selected] || {},
1548
+ WalletEnabled = _ref38.WalletEnabled,
1549
+ CardTypeEnum = _ref38.CardTypeEnum;
1360
1550
  // 控制显示修改密码还是设置密码
1361
1551
 
1362
1552