tplus-member 3.26.27 → 3.26.31

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;
386
412
 
387
- case 31:
388
- if (!(CardStatusEnum === 'EXPIRED')) {
389
- _context2.next = 34;
413
+ case 8:
414
+ _context3.next = 10;
415
+ return this.justifyAuthority();
416
+
417
+ case 10:
418
+ data = _context3.sent;
419
+
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,34 @@ 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, ret, _ref12, isSuccess, ex;
652
+ var store, _store$data, data, MeStorageCardId, StorageCardNo, ID, _cardInfo$PresentAmou, PresentAmount, _props10, getCardList, _props10$cardList, cardList, loadUserInfo, _ref14, _ref14$isCanRefund, isCanRefund, _ref14$storageInfos, storageInfos, _ref15, _ref15$data, _ref15$data$Member, dtMember, isSelectedMember, params, _ref16, finAccountId, paymentTypeId, latestStorageAmount, outTradeNo, ret, _ref17, 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, loadUserInfo = _props10.loadUserInfo;
670
+ _ref14 = lastesStorageResult || {}, _ref14$isCanRefund = _ref14.isCanRefund, isCanRefund = _ref14$isCanRefund === undefined ? false : _ref14$isCanRefund, _ref14$storageInfos = _ref14.storageInfos, storageInfos = _ref14$storageInfos === undefined ? [] : _ref14$storageInfos;
671
+ _ref15 = this.context.viewModel || {}, _ref15$data = _ref15.data;
672
+ _ref15$data = _ref15$data === undefined ? {} : _ref15$data;
673
+ _ref15$data$Member = _ref15$data.Member, dtMember = _ref15$data$Member === undefined ? {} : _ref15$data$Member;
674
+ isSelectedMember = !!dtMember.ID;
574
675
  params = (0, _extends3.default)({}, data, {
575
676
  StorageDetails: [{
576
677
  Idmember: ID,
@@ -587,7 +688,7 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
587
688
  // 如果isCanRefund是false的话,说明是需要退现金,入参的计算方式明细金额是需要退的总金额
588
689
  });
589
690
  if (!isCanRefund) {
590
- _ref11 = storageInfos[0] || {}, finAccountId = _ref11.finAccountId, paymentTypeId = _ref11.paymentTypeId;
691
+ _ref16 = storageInfos[0] || {}, finAccountId = _ref16.finAccountId, paymentTypeId = _ref16.paymentTypeId, latestStorageAmount = _ref16.latestStorageAmount, outTradeNo = _ref16.outTradeNo;
591
692
 
592
693
  params.StorageMutiSettleDetails = [{
593
694
  "StorageAmount": storageAmount,
@@ -597,7 +698,9 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
597
698
  "Code": 1,
598
699
  "IdsettleStyle": paymentTypeId,
599
700
  "DynamicPropertyKeys": [],
600
- "DataSource": {}
701
+ "DataSource": {},
702
+ "OrigPayAmount": latestStorageAmount,
703
+ "OrigTradeNo": outTradeNo
601
704
  }];
602
705
  } else {
603
706
  params.StorageMutiSettleDetails = storageInfos.map(function (item) {
@@ -616,55 +719,58 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
616
719
  });
617
720
  }
618
721
 
619
- _context4.next = 11;
722
+ _context7.next = 15;
620
723
  return this.setState({
621
724
  refundBtnDisabled: true
622
725
  });
623
726
 
624
- case 11:
625
- _context4.prev = 11;
626
- _context4.next = 14;
727
+ case 15:
728
+ _context7.prev = 15;
729
+ _context7.next = 18;
627
730
  return this.api.ReturnedStorage(params);
628
731
 
629
- case 14:
630
- ret = _context4.sent;
631
- _ref12 = ret.data || {}, isSuccess = _ref12.isSuccess, ex = _ref12.ex;
732
+ case 18:
733
+ ret = _context7.sent;
734
+ _ref17 = ret.data || {}, isSuccess = _ref17.isSuccess, ex = _ref17.ex;
632
735
 
633
736
  if (isSuccess === true || isSuccess === 'true') {
737
+ if (!!isSelectedMember && dtMember.ID === ID) {
738
+ loadUserInfo(ID);
739
+ }
634
740
  getCardList && getCardList(cardList && cardList.length > 1 ? cardList[0].MemberMobile : StorageCardNo);
635
741
  _tplusComponentsTouch.Message.success('退储值成功!');
636
742
  } else {
637
- this.returnedCash('\u53EA\u80FD\u9000\u73B0\u91D1\uFF0C\u662F\u5426\u7EE7\u7EED', storageAmount);
743
+ this.returnedCash('\u53EA\u80FD\u9000\u73B0\u91D1\uFF0C\u662F\u5426\u7EE7\u7EED', storageAmount, lastesStorageResult);
638
744
  }
639
745
 
640
- _context4.next = 19;
746
+ _context7.next = 23;
641
747
  return this.setState({
642
748
  refundBtnDisabled: false,
643
749
  refundShow: false
644
750
  });
645
751
 
646
- case 19:
647
- _context4.next = 25;
752
+ case 23:
753
+ _context7.next = 29;
648
754
  break;
649
755
 
650
- case 21:
651
- _context4.prev = 21;
652
- _context4.t0 = _context4['catch'](11);
653
- _context4.next = 25;
756
+ case 25:
757
+ _context7.prev = 25;
758
+ _context7.t0 = _context7['catch'](15);
759
+ _context7.next = 29;
654
760
  return this.setState({
655
761
  refundBtnDisabled: false
656
762
  });
657
763
 
658
- case 25:
764
+ case 29:
659
765
  case 'end':
660
- return _context4.stop();
766
+ return _context7.stop();
661
767
  }
662
768
  }
663
- }, _callee4, this, [[11, 21]]);
769
+ }, _callee7, this, [[15, 25]]);
664
770
  }));
665
771
 
666
772
  function submitRefundStorage() {
667
- return _ref9.apply(this, arguments);
773
+ return _ref13.apply(this, arguments);
668
774
  }
669
775
 
670
776
  return submitRefundStorage;
@@ -673,7 +779,7 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
673
779
 
674
780
  }, {
675
781
  key: 'returnedCash',
676
- value: function returnedCash(content, storageAmount) {
782
+ value: function returnedCash(content, storageAmount, lastesStorageResult) {
677
783
  var that = this;
678
784
  _tplusComponentsTouch.ModalWraper.confirm({
679
785
  title: '提示',
@@ -688,7 +794,7 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
688
794
  that.setState({
689
795
  refundShow: false
690
796
  });
691
- that.submitRefundStorage(cardList[selected], storageAmount, true);
797
+ that.submitRefundStorage(cardList[selected], storageAmount, lastesStorageResult);
692
798
  }
693
799
  });
694
800
  }
@@ -715,8 +821,8 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
715
821
  });
716
822
  }
717
823
  if (ret === true) {
718
- var _ref13 = _mutantsUtil.platform || {},
719
- isHorizontalSunMi = _ref13.isHorizontalSunMi;
824
+ var _ref18 = _mutantsUtil.platform || {},
825
+ isHorizontalSunMi = _ref18.isHorizontalSunMi;
720
826
 
721
827
  switch (key) {
722
828
  case 'storage':
@@ -756,27 +862,27 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
756
862
  refundShow = _state.refundShow,
757
863
  refundBtnDisabled = _state.refundBtnDisabled,
758
864
  menuKey = _state.menuKey;
759
- var _props10 = this.props,
760
- _props10$member = _props10.member,
761
- member = _props10$member === undefined ? {} : _props10$member,
762
- authProcess = _props10.authProcess,
763
- getCardList = _props10.getCardList,
764
- _props10$selected = _props10.selected,
765
- selected = _props10$selected === undefined ? 0 : _props10$selected,
766
- modifyMember = _props10.modifyMember,
767
- _props10$cardList = _props10.cardList,
768
- cardList = _props10$cardList === undefined ? [] : _props10$cardList;
769
-
770
- var _ref14 = cardList.length && cardList[selected] || {},
771
- Id = _ref14.Id,
772
- _ref14$BalanceStorage = _ref14.BalanceStorage,
773
- BalanceStorage = _ref14$BalanceStorage === undefined ? 0 : _ref14$BalanceStorage,
774
- _ref14$PresentAmount = _ref14.PresentAmount,
775
- PresentAmount = _ref14$PresentAmount === undefined ? 0 : _ref14$PresentAmount,
776
- WalletEnabled = _ref14.WalletEnabled,
777
- CardTypeEnum = _ref14.CardTypeEnum,
778
- CardStatusEnum = _ref14.CardStatusEnum,
779
- StorageCardNo = _ref14.StorageCardNo;
865
+ var _props11 = this.props,
866
+ _props11$member = _props11.member,
867
+ member = _props11$member === undefined ? {} : _props11$member,
868
+ authProcess = _props11.authProcess,
869
+ getCardList = _props11.getCardList,
870
+ _props11$selected = _props11.selected,
871
+ selected = _props11$selected === undefined ? 0 : _props11$selected,
872
+ modifyMember = _props11.modifyMember,
873
+ _props11$cardList = _props11.cardList,
874
+ cardList = _props11$cardList === undefined ? [] : _props11$cardList;
875
+
876
+ var _ref19 = cardList.length && cardList[selected] || {},
877
+ Id = _ref19.Id,
878
+ _ref19$BalanceStorage = _ref19.BalanceStorage,
879
+ BalanceStorage = _ref19$BalanceStorage === undefined ? 0 : _ref19$BalanceStorage,
880
+ _ref19$PresentAmount = _ref19.PresentAmount,
881
+ PresentAmount = _ref19$PresentAmount === undefined ? 0 : _ref19$PresentAmount,
882
+ WalletEnabled = _ref19.WalletEnabled,
883
+ CardTypeEnum = _ref19.CardTypeEnum,
884
+ CardStatusEnum = _ref19.CardStatusEnum,
885
+ StorageCardNo = _ref19.StorageCardNo;
780
886
 
781
887
  return _react2.default.createElement(
782
888
  'div',
@@ -785,7 +891,7 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
785
891
  var status = authProcess.execute(menu.auth);
786
892
  if (status) {
787
893
  if (menu.auth === 'BindStorageCard') {
788
- if (menu.key === 'memberBindCard' && CardTypeEnum !== 'BALANCE_CARD' && CardStatusEnum && CardStatusEnum !== 'BINDING') {
894
+ if (menu.key === 'memberBindCard' && CardTypeEnum !== 'BALANCE_CARD' && CardStatusEnum && CardStatusEnum === 'UNBINDING') {
789
895
  return _this4.getMenuItem(index, menu);
790
896
  }
791
897
  if (menu.key === 'memberUnBindCard' && CardTypeEnum !== 'BALANCE_CARD' && CardStatusEnum && CardStatusEnum === 'BINDING') {
@@ -817,10 +923,10 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
817
923
  cancel: this.changePasswordCancel,
818
924
  btnDissabled: btnDissabled
819
925
  },
820
- passwordTitle === '换卡' ? _react2.default.createElement(_changeMemberCard2.default, { cardList: cardList && cardList.length && cardList[selected], modifyMember: modifyMember, member: member, ref: function ref(_ref15) {
821
- return _this4.modifyPass = _ref15;
822
- }, 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) {
823
- return _this4.modifyPass = _ref16;
926
+ passwordTitle === '换卡' ? _react2.default.createElement(_changeMemberCard2.default, { cardList: cardList && cardList.length && cardList[selected], modifyMember: modifyMember, member: member, ref: function ref(_ref20) {
927
+ return _this4.modifyPass = _ref20;
928
+ }, cancelModal: this.changePasswordCancel }) : _react2.default.createElement(_modifyPass2.default, { menuKey: menuKey, cardListCopy: cardList, cardList: cardList && cardList.length && cardList[selected], changeBtnDisabled: this.changeBtnDisabled, getCardList: getCardList, selected: selected, storageInit: this.storageInit, passwordTitle: CardTypeEnum === 'BALANCE_CARD' && !WalletEnabled ? '设置密码' : passwordTitle, modifyMember: modifyMember, ref: function ref(_ref21) {
929
+ return _this4.modifyPass = _ref21;
824
930
  }, member: member, cancelModal: this.changePasswordCancel })
825
931
  ),
826
932
  _react2.default.createElement(
@@ -835,8 +941,8 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
835
941
  btnDissabled: bindCardBtnDisabled
836
942
  },
837
943
  _react2.default.createElement(_bindCard2.default, {
838
- ref: function ref(_ref17) {
839
- return _this4.bindCardRef = _ref17;
944
+ ref: function ref(_ref22) {
945
+ return _this4.bindCardRef = _ref22;
840
946
  },
841
947
  bindCardClick: this.bindCardClick,
842
948
  changeBindCardBtnDisabled: this.changeBindCardBtnDisabled
@@ -936,9 +1042,9 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
936
1042
  var _this5 = this;
937
1043
 
938
1044
  this.filterMenus = function (tags) {
939
- var _props11 = _this5.props,
940
- title = _props11.title,
941
- storeKey = _props11.storeKey;
1045
+ var _props12 = _this5.props,
1046
+ title = _props12.title,
1047
+ storeKey = _props12.storeKey;
942
1048
 
943
1049
  menus = menus1;
944
1050
  return menus.filter(function (menu) {
@@ -951,21 +1057,34 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
951
1057
  };
952
1058
 
953
1059
  this.storageInit = function () {
954
- var _props12 = _this5.props,
955
- _props12$cardList = _props12.cardList,
956
- cardList = _props12$cardList === undefined ? [] : _props12$cardList,
957
- getCardList = _props12.getCardList,
958
- _props12$selected = _props12.selected,
959
- selected = _props12$selected === undefined ? 0 : _props12$selected;
1060
+ var _props13 = _this5.props,
1061
+ _props13$cardList = _props13.cardList,
1062
+ cardList = _props13$cardList === undefined ? [] : _props13$cardList,
1063
+ getCardList = _props13.getCardList,
1064
+ _props13$selected = _props13.selected,
1065
+ selected = _props13$selected === undefined ? 0 : _props13$selected,
1066
+ loadUserInfo = _props13.loadUserInfo;
960
1067
 
961
- var _ref18 = cardList[selected] || {},
962
- StorageCardNo = _ref18.StorageCardNo;
1068
+ var _ref23 = cardList[selected] || {},
1069
+ StorageCardNo = _ref23.StorageCardNo,
1070
+ ID = _ref23.ID;
963
1071
 
1072
+ var _ref24 = _this5.context.viewModel || {},
1073
+ _ref24$data = _ref24.data;
1074
+
1075
+ _ref24$data = _ref24$data === undefined ? {} : _ref24$data;
1076
+ var _ref24$data$Member = _ref24$data.Member,
1077
+ dtMember = _ref24$data$Member === undefined ? {} : _ref24$data$Member;
1078
+
1079
+ var isSelectedMember = !!dtMember.ID;
964
1080
  _mutantsMicrofx.stores.memberStore.init({
965
1081
  cardInfo: cardList[selected],
966
1082
  settlementControlEvent: {
967
1083
  onSettleSuccess: function onSettleSuccess() {
968
1084
  _mutantsMicrofx.stores.modalRouter.hide('/memberstore');
1085
+ if (!!isSelectedMember && dtMember.ID === ID) {
1086
+ loadUserInfo(ID);
1087
+ }
969
1088
  getCardList(cardList && cardList.length > 1 ? cardList[0].MemberMobile : StorageCardNo);
970
1089
  }
971
1090
  },
@@ -993,19 +1112,19 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
993
1112
  };
994
1113
 
995
1114
  this.reportLoss = function () {
996
- var _props13 = _this5.props,
997
- member = _props13.member,
998
- handleChange = _props13.handleChange,
999
- memberEnumState = _props13.memberEnumState;
1115
+ var _props14 = _this5.props,
1116
+ member = _props14.member,
1117
+ handleChange = _props14.handleChange,
1118
+ memberEnumState = _props14.memberEnumState;
1000
1119
 
1001
1120
  _tplusComponentsTouch.ModalWraper.confirm({
1002
1121
  title: '提示',
1003
1122
  content: '确定要挂失该会员卡吗?',
1004
1123
  onOk: function () {
1005
- var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
1006
- return _regenerator2.default.wrap(function _callee5$(_context5) {
1124
+ var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
1125
+ return _regenerator2.default.wrap(function _callee8$(_context8) {
1007
1126
  while (1) {
1008
- switch (_context5.prev = _context5.next) {
1127
+ switch (_context8.prev = _context8.next) {
1009
1128
  case 0:
1010
1129
  _this5.api.RecordLoss(member).then(function (ret) {
1011
1130
  var Success = ret.Success,
@@ -1027,14 +1146,14 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
1027
1146
 
1028
1147
  case 1:
1029
1148
  case 'end':
1030
- return _context5.stop();
1149
+ return _context8.stop();
1031
1150
  }
1032
1151
  }
1033
- }, _callee5, _this5);
1152
+ }, _callee8, _this5);
1034
1153
  }));
1035
1154
 
1036
1155
  return function onOk() {
1037
- return _ref19.apply(this, arguments);
1156
+ return _ref25.apply(this, arguments);
1038
1157
  };
1039
1158
  }(),
1040
1159
  onCancel: function onCancel() {},
@@ -1045,19 +1164,19 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
1045
1164
 
1046
1165
  this.cancelLoss = function () {
1047
1166
  if (!_this5.api) return;
1048
- var _props14 = _this5.props,
1049
- member = _props14.member,
1050
- handleChange = _props14.handleChange,
1051
- memberEnumState = _props14.memberEnumState;
1167
+ var _props15 = _this5.props,
1168
+ member = _props15.member,
1169
+ handleChange = _props15.handleChange,
1170
+ memberEnumState = _props15.memberEnumState;
1052
1171
 
1053
1172
  _tplusComponentsTouch.ModalWraper.confirm({
1054
1173
  title: '提示',
1055
1174
  content: '确定要取消挂失该会员卡吗?',
1056
1175
  onOk: function () {
1057
- var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
1058
- return _regenerator2.default.wrap(function _callee6$(_context6) {
1176
+ var _ref26 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9() {
1177
+ return _regenerator2.default.wrap(function _callee9$(_context9) {
1059
1178
  while (1) {
1060
- switch (_context6.prev = _context6.next) {
1179
+ switch (_context9.prev = _context9.next) {
1061
1180
  case 0:
1062
1181
  _this5.api.UnRecordLoss(member).then(function (ret) {
1063
1182
  var Success = ret.Success,
@@ -1079,14 +1198,14 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
1079
1198
 
1080
1199
  case 1:
1081
1200
  case 'end':
1082
- return _context6.stop();
1201
+ return _context9.stop();
1083
1202
  }
1084
1203
  }
1085
- }, _callee6, _this5);
1204
+ }, _callee9, _this5);
1086
1205
  }));
1087
1206
 
1088
1207
  return function onOk() {
1089
- return _ref20.apply(this, arguments);
1208
+ return _ref26.apply(this, arguments);
1090
1209
  };
1091
1210
  }(),
1092
1211
  onCancel: function onCancel() {},
@@ -1096,19 +1215,18 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
1096
1215
  };
1097
1216
 
1098
1217
  this.openCard = function () {
1099
- var _props15 = _this5.props,
1100
- member = _props15.member,
1101
- loadUserInfo = _props15.loadUserInfo,
1102
- _props15$selected = _props15.selected,
1103
- selected = _props15$selected === undefined ? 0 : _props15$selected,
1104
- memberEnumState = _props15.memberEnumState;
1218
+ var _props16 = _this5.props,
1219
+ member = _props16.member,
1220
+ _props16$selected = _props16.selected,
1221
+ selected = _props16$selected === undefined ? 0 : _props16$selected,
1222
+ memberEnumState = _props16.memberEnumState;
1105
1223
 
1106
- var _ref21 = member || {},
1107
- ID = _ref21.ID,
1108
- _ref21$MemberType = _ref21.MemberType;
1224
+ var _ref27 = member || {},
1225
+ ID = _ref27.ID,
1226
+ _ref27$MemberType = _ref27.MemberType;
1109
1227
 
1110
- _ref21$MemberType = _ref21$MemberType === undefined ? {} : _ref21$MemberType;
1111
- var IsStorage = _ref21$MemberType.IsStorage;
1228
+ _ref27$MemberType = _ref27$MemberType === undefined ? {} : _ref27$MemberType;
1229
+ var IsStorage = _ref27$MemberType.IsStorage;
1112
1230
 
1113
1231
  memberStore.GetMemberDTO(ID, false).then(function (ret) {
1114
1232
  _mutantsMicrofx.stores.selectMemberStore.setCurMemberInfo(ret);
@@ -1123,6 +1241,7 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
1123
1241
  closeCk: function closeCk() {
1124
1242
  member.MemberState.Id = memberEnumState.using;
1125
1243
  }
1244
+
1126
1245
  });
1127
1246
  _tplusComponentsTouch.Loading.hide();
1128
1247
  });
@@ -1142,29 +1261,80 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
1142
1261
  _tplusComponentsTouch.Loading.hide();
1143
1262
  };
1144
1263
 
1145
- this.bindCard = function () {
1146
- var _props16 = _this5.props,
1147
- _props16$cardList = _props16.cardList,
1148
- cardList = _props16$cardList === undefined ? [] : _props16$cardList,
1149
- _props16$selected = _props16.selected,
1150
- selected = _props16$selected === undefined ? 0 : _props16$selected;
1264
+ this.bindCard = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10() {
1265
+ var data, _props17, _props17$cardList, cardList, _props17$selected, selected, _ref29, ID;
1266
+
1267
+ return _regenerator2.default.wrap(function _callee10$(_context10) {
1268
+ while (1) {
1269
+ switch (_context10.prev = _context10.next) {
1270
+ case 0:
1271
+ _context10.next = 2;
1272
+ return _this5.justifyAuthority();
1151
1273
 
1152
- var _ref22 = cardList[selected] || {},
1153
- ID = _ref22.ID;
1274
+ case 2:
1275
+ data = _context10.sent;
1154
1276
 
1155
- if (!!ID) {
1156
- _tplusComponentsTouch.Message.error('该储值卡已经绑定,不能再次进行绑定');
1157
- return;
1158
- }
1159
- _this5.setState({ bindCardShow: true });
1160
- };
1277
+ if (!(data === false)) {
1278
+ _context10.next = 5;
1279
+ break;
1280
+ }
1161
1281
 
1162
- this.changeBindCardCancel = function () {
1163
- _this5.setState({
1164
- bindCardShow: false,
1165
- bindCardBtnDisabled: true
1166
- });
1167
- };
1282
+ return _context10.abrupt('return');
1283
+
1284
+ case 5:
1285
+ _props17 = _this5.props, _props17$cardList = _props17.cardList, cardList = _props17$cardList === undefined ? [] : _props17$cardList, _props17$selected = _props17.selected, selected = _props17$selected === undefined ? 0 : _props17$selected;
1286
+ _ref29 = cardList[selected] || {}, ID = _ref29.ID;
1287
+
1288
+ if (!ID) {
1289
+ _context10.next = 10;
1290
+ break;
1291
+ }
1292
+
1293
+ _tplusComponentsTouch.Message.error('该储值卡已经绑定,不能再次进行绑定');
1294
+ return _context10.abrupt('return');
1295
+
1296
+ case 10:
1297
+ _this5.setState({ bindCardShow: true });
1298
+
1299
+ case 11:
1300
+ case 'end':
1301
+ return _context10.stop();
1302
+ }
1303
+ }
1304
+ }, _callee10, _this5);
1305
+ }));
1306
+ this.changeBindCardCancel = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11() {
1307
+ var data;
1308
+ return _regenerator2.default.wrap(function _callee11$(_context11) {
1309
+ while (1) {
1310
+ switch (_context11.prev = _context11.next) {
1311
+ case 0:
1312
+ _context11.next = 2;
1313
+ return _this5.justifyAuthority();
1314
+
1315
+ case 2:
1316
+ data = _context11.sent;
1317
+
1318
+ if (!(data === false)) {
1319
+ _context11.next = 5;
1320
+ break;
1321
+ }
1322
+
1323
+ return _context11.abrupt('return');
1324
+
1325
+ case 5:
1326
+ _this5.setState({
1327
+ bindCardShow: false,
1328
+ bindCardBtnDisabled: true
1329
+ });
1330
+
1331
+ case 6:
1332
+ case 'end':
1333
+ return _context11.stop();
1334
+ }
1335
+ }
1336
+ }, _callee11, _this5);
1337
+ }));
1168
1338
 
1169
1339
  this.changeBindCardBtnDisabled = function (disabled) {
1170
1340
  _this5.setState({
@@ -1186,42 +1356,42 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
1186
1356
  });
1187
1357
  };
1188
1358
 
1189
- this.changeRefundOk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7() {
1190
- 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;
1359
+ this.changeRefundOk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12() {
1360
+ var _props18, _props18$cardList, cardList, _props18$selected, selected, _ref32, MeStorageCardId, _ref32$BalanceStorage, BalanceStorage, _ref32$PresentAmount, PresentAmount, StorageCardNo, ID, refundable, storageAmount, lastesStorageResult, _ref33, _ref33$isCanRefund, isCanRefund, _ref33$storageInfos, storageInfos, latestStorageAmount;
1191
1361
 
1192
- return _regenerator2.default.wrap(function _callee7$(_context7) {
1362
+ return _regenerator2.default.wrap(function _callee12$(_context12) {
1193
1363
  while (1) {
1194
- switch (_context7.prev = _context7.next) {
1364
+ switch (_context12.prev = _context12.next) {
1195
1365
  case 0:
1196
- _props17 = _this5.props, _props17$cardList = _props17.cardList, cardList = _props17$cardList === undefined ? [] : _props17$cardList, _props17$selected = _props17.selected, selected = _props17$selected === undefined ? 0 : _props17$selected;
1197
- _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;
1366
+ _props18 = _this5.props, _props18$cardList = _props18.cardList, cardList = _props18$cardList === undefined ? [] : _props18$cardList, _props18$selected = _props18.selected, selected = _props18$selected === undefined ? 0 : _props18$selected;
1367
+ _ref32 = cardList.length && cardList[selected] || {}, MeStorageCardId = _ref32.MeStorageCardId, _ref32$BalanceStorage = _ref32.BalanceStorage, BalanceStorage = _ref32$BalanceStorage === undefined ? 0 : _ref32$BalanceStorage, _ref32$PresentAmount = _ref32.PresentAmount, PresentAmount = _ref32$PresentAmount === undefined ? 0 : _ref32$PresentAmount, StorageCardNo = _ref32.StorageCardNo, ID = _ref32.ID;
1198
1368
  refundable = parseFloat((0, _utils.getFixedNumber)(BalanceStorage - PresentAmount));
1199
1369
  storageAmount = (0, _utils.getFixedNumber)(0 - (BalanceStorage - PresentAmount));
1200
- _context7.next = 6;
1370
+ _context12.next = 6;
1201
1371
  return _this5.api.getLatestStorageAmount({ cardId: MeStorageCardId, inputRefundAmount: refundable });
1202
1372
 
1203
1373
  case 6:
1204
- lastesStorageResult = _context7.sent;
1205
- _ref25 = lastesStorageResult.data || {}, _ref25$isCanRefund = _ref25.isCanRefund, isCanRefund = _ref25$isCanRefund === undefined ? false : _ref25$isCanRefund, _ref25$storageInfos = _ref25.storageInfos, storageInfos = _ref25$storageInfos === undefined ? [] : _ref25$storageInfos;
1374
+ lastesStorageResult = _context12.sent;
1375
+ _ref33 = lastesStorageResult.data || {}, _ref33$isCanRefund = _ref33.isCanRefund, isCanRefund = _ref33$isCanRefund === undefined ? false : _ref33$isCanRefund, _ref33$storageInfos = _ref33.storageInfos, storageInfos = _ref33$storageInfos === undefined ? [] : _ref33$storageInfos;
1206
1376
 
1207
1377
  // 退款金额小于等于0,不允许退款
1208
1378
 
1209
1379
  if (!(Number(refundable) <= 0)) {
1210
- _context7.next = 11;
1380
+ _context12.next = 11;
1211
1381
  break;
1212
1382
  }
1213
1383
 
1214
1384
  _tplusComponentsTouch.Message.error('无可退金额,不支持退款!');
1215
- return _context7.abrupt('return');
1385
+ return _context12.abrupt('return');
1216
1386
 
1217
1387
  case 11:
1218
1388
  if (isCanRefund) {
1219
- _context7.next = 14;
1389
+ _context12.next = 14;
1220
1390
  break;
1221
1391
  }
1222
1392
 
1223
- _this5.returnedCash('\u53EA\u80FD\u9000\u73B0\u91D1\uFF0C\u662F\u5426\u7EE7\u7EED', storageAmount);
1224
- return _context7.abrupt('return');
1393
+ _this5.returnedCash('\u53EA\u80FD\u9000\u73B0\u91D1\uFF0C\u662F\u5426\u7EE7\u7EED', storageAmount, lastesStorageResult.data);
1394
+ return _context12.abrupt('return');
1225
1395
 
1226
1396
  case 14:
1227
1397
 
@@ -1232,12 +1402,12 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
1232
1402
  // 退款只支持退最后一次储值的金额,如果最后一次储值的金额小于可退金额,弹出提示。
1233
1403
 
1234
1404
  if (!(latestStorageAmount && latestStorageAmount < refundable)) {
1235
- _context7.next = 18;
1405
+ _context12.next = 18;
1236
1406
  break;
1237
1407
  }
1238
1408
 
1239
- _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);
1240
- return _context7.abrupt('return');
1409
+ _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);
1410
+ return _context12.abrupt('return');
1241
1411
 
1242
1412
  case 18:
1243
1413
 
@@ -1245,93 +1415,135 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
1245
1415
 
1246
1416
  case 19:
1247
1417
  case 'end':
1248
- return _context7.stop();
1418
+ return _context12.stop();
1249
1419
  }
1250
1420
  }
1251
- }, _callee7, _this5);
1421
+ }, _callee12, _this5);
1252
1422
  }));
1423
+ this.returnedStorage = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13() {
1424
+ var data, _props19, _props19$cardList, cardList, _props19$selected, selected, _ref35, Id;
1253
1425
 
1254
- this.returnedStorage = function () {
1255
- var _props18 = _this5.props,
1256
- _props18$cardList = _props18.cardList,
1257
- cardList = _props18$cardList === undefined ? [] : _props18$cardList,
1258
- _props18$selected = _props18.selected,
1259
- selected = _props18$selected === undefined ? 0 : _props18$selected;
1426
+ return _regenerator2.default.wrap(function _callee13$(_context13) {
1427
+ while (1) {
1428
+ switch (_context13.prev = _context13.next) {
1429
+ case 0:
1430
+ _context13.next = 2;
1431
+ return _this5.justifyAuthority();
1260
1432
 
1261
- var _ref26 = cardList[selected] || {},
1262
- Id = _ref26.Id;
1433
+ case 2:
1434
+ data = _context13.sent;
1263
1435
 
1264
- cardList[selected].meMemberId = Id;
1265
- cardList[selected].isRefundStorage = 1; // 自己添加参数,用来判断是储值还是退储值
1266
- _mutantsMicrofx.stores.memberStore.init({
1267
- cardInfo: cardList[selected],
1268
- settlementControlEvent: {},
1269
- callback: function callback() {
1270
- _this5.setState({
1271
- refundShow: true
1272
- });
1273
- }
1274
- });
1275
- };
1436
+ if (!(data === false)) {
1437
+ _context13.next = 5;
1438
+ break;
1439
+ }
1276
1440
 
1277
- this.memberUnBindCard = function () {
1278
- var _props19 = _this5.props,
1279
- _props19$cardList = _props19.cardList,
1280
- cardList = _props19$cardList === undefined ? [] : _props19$cardList,
1281
- _props19$selected = _props19.selected,
1282
- selected = _props19$selected === undefined ? 0 : _props19$selected;
1283
-
1284
- var _ref27 = cardList[selected] || {},
1285
- StorageCardNo = _ref27.StorageCardNo,
1286
- MemberMobile = _ref27.MemberMobile,
1287
- MemberName = _ref27.MemberName,
1288
- ID = _ref27.ID;
1289
-
1290
- if (!ID) {
1291
- _tplusComponentsTouch.Message.error('该卡未绑定会员');
1292
- return;
1293
- }
1294
- _tplusComponentsTouch.ModalWraper.confirm({
1295
- title: '提示',
1296
- content: '\u6B64\u5361\u5C5E\u4E8E' + (MemberName || MemberMobile) + '\u4F1A\u5458\uFF0C\u786E\u8BA4\u89E3\u7ED1\u5417\uFF1F',
1297
- confirmLoading: _this5.state.memberUnBindCardLoading,
1298
- onOk: function () {
1299
- var _ref28 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
1300
- return _regenerator2.default.wrap(function _callee8$(_context8) {
1301
- while (1) {
1302
- switch (_context8.prev = _context8.next) {
1303
- case 0:
1304
- _this5.setState({
1305
- memberUnBindCardLoading: true
1306
- });
1307
- _this5.api.MeStorageCardUnbind({ StorageCardNo: StorageCardNo }).then(function (res) {
1308
- var getCardList = _this5.props.getCardList;
1309
-
1310
- _tplusComponentsTouch.Message.success('解绑成功');
1311
- getCardList(cardList && cardList.length > 1 ? cardList[0].MemberMobile : StorageCardNo);
1312
- _this5.setState({
1313
- memberUnBindCardLoading: false
1314
- });
1315
- }).catch(function () {
1316
- _this5.setState({
1317
- memberUnBindCardLoading: false
1318
- });
1319
- });
1441
+ return _context13.abrupt('return');
1320
1442
 
1321
- case 2:
1322
- case 'end':
1323
- return _context8.stop();
1443
+ case 5:
1444
+ _props19 = _this5.props, _props19$cardList = _props19.cardList, cardList = _props19$cardList === undefined ? [] : _props19$cardList, _props19$selected = _props19.selected, selected = _props19$selected === undefined ? 0 : _props19$selected;
1445
+ _ref35 = cardList[selected] || {}, Id = _ref35.Id;
1446
+
1447
+ cardList[selected].meMemberId = Id;
1448
+ cardList[selected].isRefundStorage = 1; // 自己添加参数,用来判断是储值还是退储值
1449
+ _mutantsMicrofx.stores.memberStore.init({
1450
+ cardInfo: cardList[selected],
1451
+ settlementControlEvent: {},
1452
+ callback: function callback() {
1453
+ _this5.setState({
1454
+ refundShow: true
1455
+ });
1324
1456
  }
1457
+ });
1458
+
1459
+ case 10:
1460
+ case 'end':
1461
+ return _context13.stop();
1462
+ }
1463
+ }
1464
+ }, _callee13, _this5);
1465
+ }));
1466
+ this.memberUnBindCard = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15() {
1467
+ var data, _props20, _props20$cardList, cardList, _props20$selected, selected, _ref37, StorageCardNo, MemberMobile, MemberName, ID;
1468
+
1469
+ return _regenerator2.default.wrap(function _callee15$(_context15) {
1470
+ while (1) {
1471
+ switch (_context15.prev = _context15.next) {
1472
+ case 0:
1473
+ _context15.next = 2;
1474
+ return _this5.justifyAuthority();
1475
+
1476
+ case 2:
1477
+ data = _context15.sent;
1478
+
1479
+ if (!(data === false)) {
1480
+ _context15.next = 5;
1481
+ break;
1325
1482
  }
1326
- }, _callee8, _this5);
1327
- }));
1328
1483
 
1329
- return function onOk() {
1330
- return _ref28.apply(this, arguments);
1331
- };
1332
- }()
1333
- });
1334
- };
1484
+ return _context15.abrupt('return');
1485
+
1486
+ case 5:
1487
+ _props20 = _this5.props, _props20$cardList = _props20.cardList, cardList = _props20$cardList === undefined ? [] : _props20$cardList, _props20$selected = _props20.selected, selected = _props20$selected === undefined ? 0 : _props20$selected;
1488
+ _ref37 = cardList[selected] || {}, StorageCardNo = _ref37.StorageCardNo, MemberMobile = _ref37.MemberMobile, MemberName = _ref37.MemberName, ID = _ref37.ID;
1489
+
1490
+ if (ID) {
1491
+ _context15.next = 10;
1492
+ break;
1493
+ }
1494
+
1495
+ _tplusComponentsTouch.Message.error('该卡未绑定会员');
1496
+ return _context15.abrupt('return');
1497
+
1498
+ case 10:
1499
+ _tplusComponentsTouch.ModalWraper.confirm({
1500
+ title: '提示',
1501
+ content: '\u6B64\u5361\u5C5E\u4E8E' + (MemberName || MemberMobile) + '\u4F1A\u5458\uFF0C\u786E\u8BA4\u89E3\u7ED1\u5417\uFF1F',
1502
+ confirmLoading: _this5.state.memberUnBindCardLoading,
1503
+ onOk: function () {
1504
+ var _ref38 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
1505
+ return _regenerator2.default.wrap(function _callee14$(_context14) {
1506
+ while (1) {
1507
+ switch (_context14.prev = _context14.next) {
1508
+ case 0:
1509
+ _this5.setState({
1510
+ memberUnBindCardLoading: true
1511
+ });
1512
+ _this5.api.MeStorageCardUnbind({ StorageCardNo: StorageCardNo }).then(function (res) {
1513
+ var getCardList = _this5.props.getCardList;
1514
+
1515
+ _tplusComponentsTouch.Message.success('解绑成功');
1516
+ getCardList(cardList && cardList.length > 1 ? cardList[0].MemberMobile : StorageCardNo);
1517
+ _this5.setState({
1518
+ memberUnBindCardLoading: false
1519
+ });
1520
+ }).catch(function () {
1521
+ _this5.setState({
1522
+ memberUnBindCardLoading: false
1523
+ });
1524
+ });
1525
+
1526
+ case 2:
1527
+ case 'end':
1528
+ return _context14.stop();
1529
+ }
1530
+ }
1531
+ }, _callee14, _this5);
1532
+ }));
1533
+
1534
+ return function onOk() {
1535
+ return _ref38.apply(this, arguments);
1536
+ };
1537
+ }()
1538
+ });
1539
+
1540
+ case 11:
1541
+ case 'end':
1542
+ return _context15.stop();
1543
+ }
1544
+ }
1545
+ }, _callee15, _this5);
1546
+ }));
1335
1547
 
1336
1548
  this.changeBtnDisabled = function (value) {
1337
1549
  _this5.setState({
@@ -1340,21 +1552,21 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
1340
1552
  };
1341
1553
 
1342
1554
  this.getMenuItem = function (index, menu) {
1343
- var _props20 = _this5.props,
1344
- loadingBtn = _props20.loadingBtn,
1345
- _props20$cardList = _props20.cardList,
1346
- cardList = _props20$cardList === undefined ? [] : _props20$cardList,
1347
- _props20$selected = _props20.selected,
1348
- selected = _props20$selected === undefined ? 0 : _props20$selected;
1555
+ var _props21 = _this5.props,
1556
+ loadingBtn = _props21.loadingBtn,
1557
+ _props21$cardList = _props21.cardList,
1558
+ cardList = _props21$cardList === undefined ? [] : _props21$cardList,
1559
+ _props21$selected = _props21.selected,
1560
+ selected = _props21$selected === undefined ? 0 : _props21$selected;
1349
1561
 
1350
- var _ref29 = _this5.state || {},
1351
- setPwdShortKey = _ref29.setPwdShortKey;
1562
+ var _ref39 = _this5.state || {},
1563
+ setPwdShortKey = _ref39.setPwdShortKey;
1352
1564
 
1353
1565
  var newStyle = _mutantsUtil.localStore && _mutantsUtil.localStore.get('voucherDefaultPosMode') == 'voucher';
1354
1566
 
1355
- var _ref30 = cardList && cardList.length && cardList[selected] || {},
1356
- WalletEnabled = _ref30.WalletEnabled,
1357
- CardTypeEnum = _ref30.CardTypeEnum;
1567
+ var _ref40 = cardList && cardList.length && cardList[selected] || {},
1568
+ WalletEnabled = _ref40.WalletEnabled,
1569
+ CardTypeEnum = _ref40.CardTypeEnum;
1358
1570
  // 控制显示修改密码还是设置密码
1359
1571
 
1360
1572