tplus-components-touch 3.27.30 → 3.27.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/billSearch/index.js +157 -19
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/billSearch/index.less +6 -3
- package/dist/components/cloudPrint/api.js +85 -43
- package/dist/components/cloudPrint/api.js.map +1 -1
- package/dist/components/cloudPrint/printDispatch.js +211 -108
- package/dist/components/cloudPrint/printDispatch.js.map +1 -1
- package/dist/components/deliverySearch/index.js +1 -1
- package/dist/components/deliverySearch/index.js.map +1 -1
- package/dist/components/hotKey/localConfig.js +133 -14
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/inventorySearch/tab.js +77 -67
- package/dist/components/inventorySearch/tab.js.map +1 -1
- package/dist/components/keyboard/numberButton_input.js +4 -2
- package/dist/components/keyboard/numberButton_input.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton2.less +35 -40
- package/dist/components/loading/loadingContent.js +1 -1
- package/dist/components/loading/loadingContent.js.map +1 -1
- package/dist/components/loading/style.less +7 -7
- package/dist/components/progressState/EmptyAndErrorView.js +4 -3
- package/dist/components/progressState/EmptyAndErrorView.js.map +1 -1
- package/dist/components/progressState/ProgressState.js +2 -1
- package/dist/components/progressState/ProgressState.js.map +1 -1
- package/dist/components/settlement/moreCzkTable/index.js +156 -0
- package/dist/components/settlement/moreCzkTable/index.js.map +1 -0
- package/dist/components/settlement/moreCzkTable/style.less +7 -0
- package/dist/components/settlement/settlement.js +752 -491
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +77 -7
- package/dist/components/settlement/settlementStore.js +546 -315
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/ticon/iconfont/demo_index.html +26 -3
- package/dist/components/ticon/iconfont/iconfont.css +7 -3
- package/dist/components/ticon/iconfont/iconfont.js +6 -6
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -1
- package/dist/components/ticon/iconfont/iconfont.json +7 -0
- package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
- package/dist/components/touchScroll/index.js +6 -2
- package/dist/components/touchScroll/index.js.map +1 -1
- package/dist/components/touchTable/index.js +5 -4
- package/dist/components/touchTable/index.js.map +1 -1
- package/dist/components/touchTable/index.less +20 -13
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -41,7 +41,7 @@ var _createClass2 = require('babel-runtime/helpers/createClass');
|
|
|
41
41
|
|
|
42
42
|
var _createClass3 = _interopRequireDefault(_createClass2);
|
|
43
43
|
|
|
44
|
-
var _desc, _value, _class, _descriptor, _descriptor2,
|
|
44
|
+
var _desc, _value, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _desc2, _value2, _class3, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _desc3, _value3, _class5, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19;
|
|
45
45
|
|
|
46
46
|
var _mobx = require('mobx');
|
|
47
47
|
|
|
@@ -178,6 +178,46 @@ var SettlementStore = (_class = function () {
|
|
|
178
178
|
|
|
179
179
|
_initDefineProp(this, 'updateMemberInfo', _descriptor2, this);
|
|
180
180
|
|
|
181
|
+
_initDefineProp(this, 'updateCurrentMode', _descriptor3, this);
|
|
182
|
+
|
|
183
|
+
_initDefineProp(this, 'updateCardInfo', _descriptor4, this);
|
|
184
|
+
|
|
185
|
+
this.handleCzkData = function (m) {
|
|
186
|
+
if (!m || !m.StorageCardNo) {
|
|
187
|
+
(0, _mobx.runInAction)(function () {
|
|
188
|
+
_this2.paymode.currentMode.errinfo = "无效的会员卡号";
|
|
189
|
+
});
|
|
190
|
+
} else {
|
|
191
|
+
(0, _mobx.runInAction)(function () {
|
|
192
|
+
_this2.paymode.currentMode.errinfo = "";
|
|
193
|
+
_this2.paymode.currentMode.memberId = m.ID;
|
|
194
|
+
_this2.paymode.currentMode.value = (0, _utils.getFixedNumber)(_this2.brefund ? _this2.paymode.receivable : Math.max(_this2.paymode.receivable, 0));
|
|
195
|
+
_this2.updateEvent();
|
|
196
|
+
var message = '';
|
|
197
|
+
var sum = (0, _reduce3.default)(_this2.paymode.thePaymodes, function (total, cur) {
|
|
198
|
+
return total + cur.value;
|
|
199
|
+
}, 0);
|
|
200
|
+
// 对于卡不用判断会员的一些信息
|
|
201
|
+
// if (global.CheckMemberStorageProcessorBlock ) {
|
|
202
|
+
// message= CheckMemberStorageProcessorBlock.execute(m);
|
|
203
|
+
// }
|
|
204
|
+
if (!String.isNullOrEmpty(message)) {
|
|
205
|
+
_this2.paymode.currentMode.errinfo = message;
|
|
206
|
+
} else if (_this2.checkReceived(_this2.paymode.currentMode, "balance")) {
|
|
207
|
+
_this2.paymode.currentMode.errinfo = "余额不足";
|
|
208
|
+
} else if (_this2.paymode.amount > 0 && parseFloat(_this2.paymode.amount) !== sum && _this2.paymode.currentMode.value == 0) {
|
|
209
|
+
_this2.paymode.currentMode.errinfo = "实收金额必须录入";
|
|
210
|
+
} else {
|
|
211
|
+
// 查询成功后将焦点移入下一个输入框
|
|
212
|
+
setTimeout(function () {
|
|
213
|
+
var nextInput = document.querySelector('.czk .received .input');
|
|
214
|
+
nextInput && nextInput.select();
|
|
215
|
+
}, 300);
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
|
|
181
221
|
this.getCouponList = function (coupon_code) {
|
|
182
222
|
var _enumController$getEn = _mutantsUtil.enumController.getEnumOj(),
|
|
183
223
|
PayStyle = _enumController$getEn.PayStyle,
|
|
@@ -429,7 +469,7 @@ var SettlementStore = (_class = function () {
|
|
|
429
469
|
}
|
|
430
470
|
}, {
|
|
431
471
|
key: 'init',
|
|
432
|
-
value: function init(context, amounthandler, datasource, storeinfo, bquick, amount, type, data) {
|
|
472
|
+
value: function init(context, amounthandler, datasource, storeinfo, bquick, amount, type, data, payModeKey) {
|
|
433
473
|
var _this3 = this;
|
|
434
474
|
|
|
435
475
|
this.newStyle = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('voucherDefaultPosMode') == 'voucher';
|
|
@@ -445,9 +485,15 @@ var SettlementStore = (_class = function () {
|
|
|
445
485
|
if (global.DealSingleRowAmountSettingProcessorBlock) {
|
|
446
486
|
global.DealSingleRowAmountSettingProcessorBlock.execute(_this3.dto);
|
|
447
487
|
}
|
|
488
|
+
|
|
489
|
+
var _enumController$getEn4 = _mutantsUtil.enumController.getEnumOj(),
|
|
490
|
+
PayStyle = _enumController$getEn4.PayStyle;
|
|
491
|
+
|
|
492
|
+
var isQuickCash = bquick && payModeKey == PayStyle.xianjin;
|
|
493
|
+
|
|
448
494
|
// 成交金额抹零
|
|
449
495
|
if (global.DealAmountSettingProcessorBlock) {
|
|
450
|
-
global.DealAmountSettingProcessorBlock.execute(_this3.dto);
|
|
496
|
+
global.DealAmountSettingProcessorBlock.execute(_this3.dto, isQuickCash);
|
|
451
497
|
}
|
|
452
498
|
});
|
|
453
499
|
// this.member=context.stores && context.stores.memberStore && context.stores.memberStore.member;
|
|
@@ -535,8 +581,8 @@ var SettlementStore = (_class = function () {
|
|
|
535
581
|
value: function initByOriginReturn() {
|
|
536
582
|
var _this5 = this;
|
|
537
583
|
|
|
538
|
-
var _enumController$
|
|
539
|
-
PayStyle = _enumController$
|
|
584
|
+
var _enumController$getEn5 = _mutantsUtil.enumController.getEnumOj(),
|
|
585
|
+
PayStyle = _enumController$getEn5.PayStyle;
|
|
540
586
|
|
|
541
587
|
var _ref6 = _mutantsUtil.platform || {},
|
|
542
588
|
isNewRetailBCPos = _ref6.isNewRetailBCPos;
|
|
@@ -583,13 +629,23 @@ var SettlementStore = (_class = function () {
|
|
|
583
629
|
}
|
|
584
630
|
});
|
|
585
631
|
(0, _each3.default)(this.dto.RetailStorageDetails, function (detail) {
|
|
586
|
-
var balanceAmount =
|
|
587
|
-
|
|
632
|
+
var balanceAmount = null;
|
|
633
|
+
var storageCardNo = null;
|
|
634
|
+
var meStorageCardId = null;
|
|
635
|
+
detail.DynamicPropertyKeys.forEach(function (ele, index) {
|
|
636
|
+
if (ele === "mestoragecard") {
|
|
637
|
+
balanceAmount = detail.DynamicPropertyValues[index].BalanceStorage - detail.StoragePaymentAmount;
|
|
638
|
+
storageCardNo = detail.DynamicPropertyValues[index].StorageCardNo;
|
|
639
|
+
meStorageCardId = detail.DynamicPropertyValues[index].MeStorageCardId;
|
|
640
|
+
}
|
|
641
|
+
});
|
|
588
642
|
var newmode = (0, _extends3.default)({}, _this5.genNewMode(PayStyle.hyczk, false, detail.StoragePaymentAmount), {
|
|
589
|
-
member: new Member(detail.Member),
|
|
590
|
-
authCode: detail.Password,
|
|
643
|
+
member: new Member(detail.Member ? detail.Member : null),
|
|
644
|
+
authCode: detail.Password ? detail.Password : null,
|
|
591
645
|
balance: balanceAmount,
|
|
592
|
-
boriginReturn: true
|
|
646
|
+
boriginReturn: true,
|
|
647
|
+
meStorageCardId: meStorageCardId ? meStorageCardId : detail.MeStorageCardId,
|
|
648
|
+
storageCardNo: storageCardNo ? storageCardNo : detail.StorageCardNo
|
|
593
649
|
});
|
|
594
650
|
_this5.paymode.thePaymodes.push(newmode);
|
|
595
651
|
});
|
|
@@ -604,7 +660,7 @@ var SettlementStore = (_class = function () {
|
|
|
604
660
|
}, {
|
|
605
661
|
key: 'quickSettle',
|
|
606
662
|
value: function quickSettle(key) {
|
|
607
|
-
this.addPay(key);
|
|
663
|
+
this.addPay(key, null, true);
|
|
608
664
|
}
|
|
609
665
|
|
|
610
666
|
//outer call
|
|
@@ -615,8 +671,8 @@ var SettlementStore = (_class = function () {
|
|
|
615
671
|
value: function changeFocusAndAddPay(type, bookType) {
|
|
616
672
|
var _this6 = this;
|
|
617
673
|
|
|
618
|
-
var _enumController$
|
|
619
|
-
PayStyle = _enumController$
|
|
674
|
+
var _enumController$getEn6 = _mutantsUtil.enumController.getEnumOj(),
|
|
675
|
+
PayStyle = _enumController$getEn6.PayStyle;
|
|
620
676
|
|
|
621
677
|
this.paymode.currentFocus = type;
|
|
622
678
|
if (this.paymode.currentMode) {
|
|
@@ -633,7 +689,7 @@ var SettlementStore = (_class = function () {
|
|
|
633
689
|
|
|
634
690
|
//抵现积分
|
|
635
691
|
(0, _tplusApi.tApi)({ IntegralSteadCashParams: {
|
|
636
|
-
Idmember: this.paymode.currentMode.
|
|
692
|
+
Idmember: this.paymode.currentMode.memberId,
|
|
637
693
|
TotalTaxAmount: this.paymode.amount,
|
|
638
694
|
BalanceTaxAmount: this.paymode.currentMode.value
|
|
639
695
|
} }, 'AA.DR.newRetailMember.CalculdateIntegralSteadCash', false, false).then(function (result) {
|
|
@@ -662,7 +718,6 @@ var SettlementStore = (_class = function () {
|
|
|
662
718
|
|
|
663
719
|
if ((0, _trim3.default)(v) === "") {
|
|
664
720
|
(0, _mobx.runInAction)(function () {
|
|
665
|
-
_this7.paymode.currentMode.member = new Member(null);
|
|
666
721
|
_this7.paymode.currentMode.errinfo = "请输入储值卡";
|
|
667
722
|
});
|
|
668
723
|
return;
|
|
@@ -676,66 +731,98 @@ var SettlementStore = (_class = function () {
|
|
|
676
731
|
var address = '';
|
|
677
732
|
if (isNewRetailBCPos) {
|
|
678
733
|
// address = '/member/memberProfile/FindByStorageCode/'+v;
|
|
679
|
-
address = '/
|
|
680
|
-
return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function (
|
|
681
|
-
var
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
734
|
+
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + v + '/' + true;
|
|
735
|
+
return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function () {
|
|
736
|
+
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(result) {
|
|
737
|
+
var data, m;
|
|
738
|
+
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
739
|
+
while (1) {
|
|
740
|
+
switch (_context2.prev = _context2.next) {
|
|
741
|
+
case 0:
|
|
742
|
+
data = result.data;
|
|
743
|
+
m = data && data.length && data[0];
|
|
744
|
+
|
|
745
|
+
if (!(result && result.data.length)) {
|
|
746
|
+
_context2.next = 25;
|
|
747
|
+
break;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
if (!(result.data.length === 1)) {
|
|
751
|
+
_context2.next = 14;
|
|
752
|
+
break;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
if (!(m.CardTypeEnum === 'BALANCE_CARD')) {
|
|
756
|
+
_context2.next = 10;
|
|
757
|
+
break;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
_this7.paymode.updateCardInfo(m);
|
|
761
|
+
_this7.handleCzkData(m);
|
|
762
|
+
return _context2.abrupt('return', result.data);
|
|
763
|
+
|
|
764
|
+
case 10:
|
|
765
|
+
_context2.next = 12;
|
|
766
|
+
return (0, _tplusApi.ccApi)({ dto: _this7.dto, meStorageCardId: m.MeStorageCardId }, '/retail/RetailPos/validateRetailStorageCard', false, false).then(function (result1) {
|
|
767
|
+
var data1 = result1.data ? JSON.parse(result1.data)[0] : {};
|
|
768
|
+
if (data1.enable) {
|
|
769
|
+
_this7.paymode.updateCardInfo(m);
|
|
770
|
+
_this7.handleCzkData(m);
|
|
771
|
+
return result1.data;
|
|
772
|
+
} else {
|
|
773
|
+
_message2.default.warn(data1.disableReason);
|
|
774
|
+
}
|
|
775
|
+
});
|
|
776
|
+
|
|
777
|
+
case 12:
|
|
778
|
+
_context2.next = 25;
|
|
779
|
+
break;
|
|
780
|
+
|
|
781
|
+
case 14:
|
|
782
|
+
if (!(result.data && result.data.length === 1)) {
|
|
783
|
+
_context2.next = 19;
|
|
784
|
+
break;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
_this7.paymode.updateCardInfo(result.data[0]);
|
|
788
|
+
return _context2.abrupt('return', result.data);
|
|
789
|
+
|
|
790
|
+
case 19:
|
|
791
|
+
if (!(result.data && result.data.length > 1)) {
|
|
792
|
+
_context2.next = 23;
|
|
793
|
+
break;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
return _context2.abrupt('return', result.data);
|
|
797
|
+
|
|
798
|
+
case 23:
|
|
799
|
+
_message2.default.warn('没有可用储值卡!');
|
|
800
|
+
return _context2.abrupt('return', false);
|
|
801
|
+
|
|
802
|
+
case 25:
|
|
803
|
+
case 'end':
|
|
804
|
+
return _context2.stop();
|
|
805
|
+
}
|
|
720
806
|
}
|
|
721
|
-
});
|
|
722
|
-
}
|
|
723
|
-
|
|
807
|
+
}, _callee2, _this7);
|
|
808
|
+
}));
|
|
809
|
+
|
|
810
|
+
return function (_x2) {
|
|
811
|
+
return _ref9.apply(this, arguments);
|
|
812
|
+
};
|
|
813
|
+
}()
|
|
814
|
+
// result.data.forEach((m) => {
|
|
815
|
+
// if (m.CardTypeEnum === 'BALANCE_CARD') {
|
|
816
|
+
// // 会员概念改为卡,把这些字段都放开
|
|
817
|
+
// this.paymode.updateCardInfo(m);
|
|
818
|
+
// }
|
|
819
|
+
// })
|
|
820
|
+
);
|
|
724
821
|
} else {
|
|
725
822
|
address = 'AA.DR.newRetailMember.SearchMember';
|
|
726
823
|
return (0, _tplusApi.tApi)({ SearchParams: { Key: v, IsSingleMember: true, IdStore: IdStore, StoreCode: StoreCode } }, address, false, false).then(function (result) {
|
|
727
824
|
var data = JSON.parse(result.Data);
|
|
728
825
|
var m = data && data.length > 0 && data[0];
|
|
729
|
-
|
|
730
|
-
var _ref10 = _mutantsUtil.platform || {},
|
|
731
|
-
isNewRetailBCPos = _ref10.isNewRetailBCPos;
|
|
732
|
-
|
|
733
|
-
if (isNewRetailBCPos) {
|
|
734
|
-
_this7.paymode && _this7.paymode.currentMode.member.setMeStorageCardId(m.MeStorageCardId);
|
|
735
|
-
_this7.paymode && _this7.paymode.currentMode.member.setStorageCardNo(m.StorageCardNo);
|
|
736
|
-
_this7.paymode && (_this7.paymode.currentMode.MeStorageCardId = m.MeStorageCardId);
|
|
737
|
-
_this7.paymode && (_this7.paymode.currentMode.StorageCardNo = m.StorageCardNo);
|
|
738
|
-
}
|
|
739
826
|
if (!m || !m.ID) {
|
|
740
827
|
(0, _mobx.runInAction)(function () {
|
|
741
828
|
_this7.paymode.currentMode.errinfo = "无效的会员卡号";
|
|
@@ -797,8 +884,8 @@ var SettlementStore = (_class = function () {
|
|
|
797
884
|
}, {
|
|
798
885
|
key: 'setCurrentMode',
|
|
799
886
|
value: function setCurrentMode(id, type, append) {
|
|
800
|
-
var _enumController$
|
|
801
|
-
PayStyle = _enumController$
|
|
887
|
+
var _enumController$getEn7 = _mutantsUtil.enumController.getEnumOj(),
|
|
888
|
+
PayStyle = _enumController$getEn7.PayStyle;
|
|
802
889
|
|
|
803
890
|
var mode = (0, _find3.default)(this.paymode.thePaymodes, { paymethodId: id });
|
|
804
891
|
if (mode) {
|
|
@@ -816,8 +903,8 @@ var SettlementStore = (_class = function () {
|
|
|
816
903
|
value: function afterSetCurrentMode(type) {
|
|
817
904
|
var _this8 = this;
|
|
818
905
|
|
|
819
|
-
var _enumController$
|
|
820
|
-
PayStyle = _enumController$
|
|
906
|
+
var _enumController$getEn8 = _mutantsUtil.enumController.getEnumOj(),
|
|
907
|
+
PayStyle = _enumController$getEn8.PayStyle;
|
|
821
908
|
|
|
822
909
|
if (type == PayStyle.djq) {
|
|
823
910
|
this.paymode.calcDjqValue();
|
|
@@ -831,7 +918,7 @@ var SettlementStore = (_class = function () {
|
|
|
831
918
|
}
|
|
832
919
|
|
|
833
920
|
(0, _tplusApi.tApi)({ IntegralSteadCashParams: {
|
|
834
|
-
Idmember: this.paymode.currentMode.
|
|
921
|
+
Idmember: this.paymode.currentMode.memberId,
|
|
835
922
|
TotalTaxAmount: this.paymode.amount,
|
|
836
923
|
BalanceTaxAmount: this.paymode.amount
|
|
837
924
|
} }, 'AA.DR.newRetailMember.CalculdateIntegralSteadCash', false, false).then(function (result) {
|
|
@@ -852,12 +939,13 @@ var SettlementStore = (_class = function () {
|
|
|
852
939
|
}
|
|
853
940
|
}, {
|
|
854
941
|
key: 'genNewMode',
|
|
855
|
-
value: function genNewMode(type, notwithm, v) {
|
|
856
|
-
var _enumController$
|
|
857
|
-
PayStyle = _enumController$
|
|
942
|
+
value: function genNewMode(type, notwithm, v, isQuick) {
|
|
943
|
+
var _enumController$getEn9 = _mutantsUtil.enumController.getEnumOj(),
|
|
944
|
+
PayStyle = _enumController$getEn9.PayStyle;
|
|
858
945
|
|
|
859
946
|
var value = (0, _utils.getFixedNumber)(v || (this.brefund ? this.paymode.receivable : Math.max(this.paymode.receivable, 0)));
|
|
860
947
|
var themode = (0, _find3.default)(this.paymode.paymodes, { 'paymentType': type });
|
|
948
|
+
var memberId = this.member && this.member.ID ? this.member.ID : null;
|
|
861
949
|
var mode = (0, _mobx.observable)({
|
|
862
950
|
paymethodId: this.paymode.counter,
|
|
863
951
|
name: themode.name,
|
|
@@ -869,6 +957,8 @@ var SettlementStore = (_class = function () {
|
|
|
869
957
|
order: this.paymode.thePaymodes.length + 1,
|
|
870
958
|
paymentType: type,
|
|
871
959
|
djqs: [],
|
|
960
|
+
card: null,
|
|
961
|
+
memberId: !notwithm ? memberId : null,
|
|
872
962
|
member: new Member(!notwithm ? this.member : null),
|
|
873
963
|
authCode: '',
|
|
874
964
|
steadCashIntegral: null,
|
|
@@ -877,9 +967,9 @@ var SettlementStore = (_class = function () {
|
|
|
877
967
|
virtualPay: themode.virtualPay
|
|
878
968
|
});
|
|
879
969
|
if (type == PayStyle.hyczk) {
|
|
880
|
-
if (!mode.
|
|
970
|
+
if (!mode.storageCardNo) {
|
|
881
971
|
(0, _mobx.runInAction)(function () {
|
|
882
|
-
mode.errinfo = '
|
|
972
|
+
mode.errinfo = '未录入手机号或储值卡号';
|
|
883
973
|
});
|
|
884
974
|
} else if (this.checkReceived(mode, "balance")) {
|
|
885
975
|
(0, _mobx.runInAction)(function () {
|
|
@@ -898,8 +988,8 @@ var SettlementStore = (_class = function () {
|
|
|
898
988
|
value: function setMaxAmount(type, mode) {
|
|
899
989
|
var _this9 = this;
|
|
900
990
|
|
|
901
|
-
var _enumController$
|
|
902
|
-
PayStyle = _enumController$
|
|
991
|
+
var _enumController$getEn10 = _mutantsUtil.enumController.getEnumOj(),
|
|
992
|
+
PayStyle = _enumController$getEn10.PayStyle;
|
|
903
993
|
|
|
904
994
|
var sum = 0;
|
|
905
995
|
if (type == PayStyle.hyczk) {
|
|
@@ -975,8 +1065,8 @@ var SettlementStore = (_class = function () {
|
|
|
975
1065
|
}, {
|
|
976
1066
|
key: 'addPayDirectly',
|
|
977
1067
|
value: function addPayDirectly(pay) {
|
|
978
|
-
var _enumController$
|
|
979
|
-
PayStyle = _enumController$
|
|
1068
|
+
var _enumController$getEn11 = _mutantsUtil.enumController.getEnumOj(),
|
|
1069
|
+
PayStyle = _enumController$getEn11.PayStyle;
|
|
980
1070
|
|
|
981
1071
|
if (!(0, _find3.default)(this.paymode.thePaymodes, { paymethodId: pay.paymethodId })) {
|
|
982
1072
|
var pos = this.paymode.thePaymodes.length;
|
|
@@ -993,9 +1083,9 @@ var SettlementStore = (_class = function () {
|
|
|
993
1083
|
}
|
|
994
1084
|
}, {
|
|
995
1085
|
key: 'addPay',
|
|
996
|
-
value: function addPay(type, bookType) {
|
|
997
|
-
var _enumController$
|
|
998
|
-
PayStyle = _enumController$
|
|
1086
|
+
value: function addPay(type, bookType, isQuick) {
|
|
1087
|
+
var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
|
|
1088
|
+
PayStyle = _enumController$getEn12.PayStyle;
|
|
999
1089
|
|
|
1000
1090
|
var pos = this.paymode.thePaymodes.length;
|
|
1001
1091
|
if (type == PayStyle.hyczk) {
|
|
@@ -1005,14 +1095,15 @@ var SettlementStore = (_class = function () {
|
|
|
1005
1095
|
pos = index == -1 ? pos : index + 1;
|
|
1006
1096
|
}
|
|
1007
1097
|
// this.paymode.thePaymodes.push(this.genNewMode(type) );
|
|
1008
|
-
|
|
1098
|
+
|
|
1099
|
+
this.paymode.thePaymodes.splice(pos, 0, this.genNewMode(type, this.newStyle && type == PayStyle.hyczk, undefined, isQuick));
|
|
1009
1100
|
this.paymode.calcReserved(bookType);
|
|
1010
1101
|
}
|
|
1011
1102
|
}, {
|
|
1012
1103
|
key: 'delPay',
|
|
1013
1104
|
value: function delPay(index, bookType) {
|
|
1014
|
-
var _enumController$
|
|
1015
|
-
PayStyle = _enumController$
|
|
1105
|
+
var _enumController$getEn13 = _mutantsUtil.enumController.getEnumOj(),
|
|
1106
|
+
PayStyle = _enumController$getEn13.PayStyle;
|
|
1016
1107
|
|
|
1017
1108
|
(0, _remove3.default)(this.paymode.thePaymodes, function (mode) {
|
|
1018
1109
|
return mode.paymethodId === index;
|
|
@@ -1023,80 +1114,80 @@ var SettlementStore = (_class = function () {
|
|
|
1023
1114
|
}, {
|
|
1024
1115
|
key: 'commit',
|
|
1025
1116
|
value: function () {
|
|
1026
|
-
var
|
|
1027
|
-
var
|
|
1117
|
+
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(bTest) {
|
|
1118
|
+
var _ref11, isNewRetailBCPos;
|
|
1028
1119
|
|
|
1029
|
-
return _regenerator2.default.wrap(function
|
|
1120
|
+
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
1030
1121
|
while (1) {
|
|
1031
|
-
switch (
|
|
1122
|
+
switch (_context3.prev = _context3.next) {
|
|
1032
1123
|
case 0:
|
|
1033
1124
|
console.log('settlementStore.commit开始,参数:' + bTest);
|
|
1034
1125
|
|
|
1035
1126
|
if (!bTest) {
|
|
1036
|
-
|
|
1127
|
+
_context3.next = 3;
|
|
1037
1128
|
break;
|
|
1038
1129
|
}
|
|
1039
1130
|
|
|
1040
|
-
return
|
|
1131
|
+
return _context3.abrupt('return', _promise2.default.resolve(true));
|
|
1041
1132
|
|
|
1042
1133
|
case 3:
|
|
1043
|
-
|
|
1044
|
-
|
|
1134
|
+
_ref11 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref11.isNewRetailBCPos;
|
|
1135
|
+
_context3.prev = 4;
|
|
1045
1136
|
|
|
1046
1137
|
if (!(this.type == 1)) {
|
|
1047
|
-
|
|
1138
|
+
_context3.next = 10;
|
|
1048
1139
|
break;
|
|
1049
1140
|
}
|
|
1050
1141
|
|
|
1051
|
-
|
|
1142
|
+
_context3.next = 8;
|
|
1052
1143
|
return this.saveMember();
|
|
1053
1144
|
|
|
1054
1145
|
case 8:
|
|
1055
|
-
|
|
1146
|
+
_context3.next = 18;
|
|
1056
1147
|
break;
|
|
1057
1148
|
|
|
1058
1149
|
case 10:
|
|
1059
1150
|
if (!isNewRetailBCPos) {
|
|
1060
|
-
|
|
1151
|
+
_context3.next = 13;
|
|
1061
1152
|
break;
|
|
1062
1153
|
}
|
|
1063
1154
|
|
|
1064
|
-
|
|
1155
|
+
_context3.next = 13;
|
|
1065
1156
|
return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
|
|
1066
1157
|
|
|
1067
1158
|
case 13:
|
|
1068
|
-
|
|
1159
|
+
_context3.next = 15;
|
|
1069
1160
|
return this.save();
|
|
1070
1161
|
|
|
1071
1162
|
case 15:
|
|
1072
1163
|
if (!isNewRetailBCPos) {
|
|
1073
|
-
|
|
1164
|
+
_context3.next = 18;
|
|
1074
1165
|
break;
|
|
1075
1166
|
}
|
|
1076
1167
|
|
|
1077
|
-
|
|
1168
|
+
_context3.next = 18;
|
|
1078
1169
|
return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
|
|
1079
1170
|
|
|
1080
1171
|
case 18:
|
|
1081
|
-
return
|
|
1172
|
+
return _context3.abrupt('return', _promise2.default.resolve(true));
|
|
1082
1173
|
|
|
1083
1174
|
case 21:
|
|
1084
|
-
|
|
1085
|
-
|
|
1175
|
+
_context3.prev = 21;
|
|
1176
|
+
_context3.t0 = _context3['catch'](4);
|
|
1086
1177
|
|
|
1087
|
-
console.error('settlementStore.commit失败,错误信息:' +
|
|
1088
|
-
return
|
|
1178
|
+
console.error('settlementStore.commit失败,错误信息:' + _context3.t0);
|
|
1179
|
+
return _context3.abrupt('return', _promise2.default.resolve(_context3.t0));
|
|
1089
1180
|
|
|
1090
1181
|
case 25:
|
|
1091
1182
|
case 'end':
|
|
1092
|
-
return
|
|
1183
|
+
return _context3.stop();
|
|
1093
1184
|
}
|
|
1094
1185
|
}
|
|
1095
|
-
},
|
|
1186
|
+
}, _callee3, this, [[4, 21]]);
|
|
1096
1187
|
}));
|
|
1097
1188
|
|
|
1098
|
-
function commit(
|
|
1099
|
-
return
|
|
1189
|
+
function commit(_x3) {
|
|
1190
|
+
return _ref10.apply(this, arguments);
|
|
1100
1191
|
}
|
|
1101
1192
|
|
|
1102
1193
|
return commit;
|
|
@@ -1112,8 +1203,8 @@ var SettlementStore = (_class = function () {
|
|
|
1112
1203
|
value: function saveMember() {
|
|
1113
1204
|
var _this10 = this;
|
|
1114
1205
|
|
|
1115
|
-
var _enumController$
|
|
1116
|
-
PayStyle = _enumController$
|
|
1206
|
+
var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
|
|
1207
|
+
PayStyle = _enumController$getEn14.PayStyle;
|
|
1117
1208
|
|
|
1118
1209
|
(0, _mobx.runInAction)(function () {
|
|
1119
1210
|
_this10.dto.StorageMutiSettleDetails = [];
|
|
@@ -1154,23 +1245,22 @@ var SettlementStore = (_class = function () {
|
|
|
1154
1245
|
}, {
|
|
1155
1246
|
key: 'save',
|
|
1156
1247
|
value: function () {
|
|
1157
|
-
var
|
|
1248
|
+
var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
|
1158
1249
|
var _this11 = this;
|
|
1159
1250
|
|
|
1160
|
-
var _enumController$
|
|
1251
|
+
var _enumController$getEn15, PayStyle, _ref14, isNewRetailBCPos, IPMSG, RetailTypeEnum, _getLoginInfo2, PreSellOrBook, PercentageWhenBook, _ref15, IdbusiType, DistributionMode, prepaidAmount;
|
|
1161
1252
|
|
|
1162
|
-
return _regenerator2.default.wrap(function
|
|
1253
|
+
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
1163
1254
|
while (1) {
|
|
1164
|
-
switch (
|
|
1255
|
+
switch (_context4.prev = _context4.next) {
|
|
1165
1256
|
case 0:
|
|
1166
|
-
_enumController$
|
|
1257
|
+
_enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn15.PayStyle;
|
|
1167
1258
|
|
|
1168
1259
|
(0, _mobx.runInAction)(function () {
|
|
1169
1260
|
_this11.dto.RetailPaymentDetails = [];
|
|
1170
1261
|
_this11.dto.RetailStorageDetails = [];
|
|
1171
1262
|
_this11.dto.RetailCouponDetails = [];
|
|
1172
1263
|
var czkSum = 0;
|
|
1173
|
-
var Idmember = _this11.dto.Idmember;
|
|
1174
1264
|
var count = 0;
|
|
1175
1265
|
var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
|
|
1176
1266
|
return parseFloat(mode.value) != 0;
|
|
@@ -1178,18 +1268,14 @@ var SettlementStore = (_class = function () {
|
|
|
1178
1268
|
(0, _each3.default)(thePaymodes, function (mode, index) {
|
|
1179
1269
|
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1180
1270
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
1181
|
-
if (!Idmember) {
|
|
1182
|
-
Idmember = mode.member.id;
|
|
1183
|
-
}
|
|
1184
1271
|
czkSum = Math.Add(czkSum, mode.value);
|
|
1185
|
-
var MeStorageCardId = mode.member.MeStorageCardId ? mode.member.MeStorageCardId : _this11.member.MeStorageCardId;
|
|
1186
1272
|
_this11.dto.RetailStorageDetails.push({
|
|
1187
1273
|
Code: mode.paymethodId,
|
|
1188
|
-
MeStorageCardId:
|
|
1274
|
+
MeStorageCardId: mode.meStorageCardId,
|
|
1189
1275
|
StoragePaymentAmount: mode.value,
|
|
1190
1276
|
IsOrigReturn: false,
|
|
1191
1277
|
BalanceStorage: mode.balance,
|
|
1192
|
-
Idmember: mode.
|
|
1278
|
+
Idmember: mode.memberId,
|
|
1193
1279
|
DynamicPropertyKeys: [],
|
|
1194
1280
|
DynamicPropertyValues: [],
|
|
1195
1281
|
DataSource: { Id: _this11.dataSource },
|
|
@@ -1225,7 +1311,7 @@ var SettlementStore = (_class = function () {
|
|
|
1225
1311
|
ReductionAmount: djq.amount,
|
|
1226
1312
|
EnableAmount: djq.doorsill,
|
|
1227
1313
|
CouponTitle: djq.name,
|
|
1228
|
-
IdMember: djq.UMemberID ? mode.
|
|
1314
|
+
IdMember: djq.UMemberID ? mode.memberId : null,
|
|
1229
1315
|
LastTS: djq.LastTS,
|
|
1230
1316
|
PromotionId: djq.promoId,
|
|
1231
1317
|
PromotionRuleId: djq.promoRuleId,
|
|
@@ -1237,15 +1323,12 @@ var SettlementStore = (_class = function () {
|
|
|
1237
1323
|
}
|
|
1238
1324
|
});
|
|
1239
1325
|
|
|
1240
|
-
var
|
|
1241
|
-
isNewRetailBCPos =
|
|
1326
|
+
var _ref13 = _mutantsUtil.platform || {},
|
|
1327
|
+
isNewRetailBCPos = _ref13.isNewRetailBCPos;
|
|
1242
1328
|
|
|
1243
1329
|
if (_this11.dto.RetailStorageDetails.length > 0) {
|
|
1244
1330
|
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
|
|
1245
1331
|
if (isNewRetailBCPos) {
|
|
1246
|
-
// this.dto.RetailStorageDetails && this.dto.RetailStorageDetails.forEach((value, index) => {
|
|
1247
|
-
// value.MeStorageCardId = (mode.MeStorageCardId ? mode.MeStorageCardId : this.member.MeStorageCardId);
|
|
1248
|
-
// })
|
|
1249
1332
|
_this11.dto.RetailPaymentDetails.push({
|
|
1250
1333
|
Code: _this11.paymode.counter,
|
|
1251
1334
|
OrigAmount: czkSum,
|
|
@@ -1269,15 +1352,14 @@ var SettlementStore = (_class = function () {
|
|
|
1269
1352
|
DataSource: { Id: _this11.dataSource }
|
|
1270
1353
|
});
|
|
1271
1354
|
}
|
|
1272
|
-
_this11.dto.Idmember = Idmember;
|
|
1273
1355
|
}
|
|
1274
1356
|
});
|
|
1275
|
-
|
|
1357
|
+
_ref14 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref14.isNewRetailBCPos;
|
|
1276
1358
|
|
|
1277
1359
|
console.log('bc_pos\u73AF\u5883:' + isNewRetailBCPos + ',\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
|
|
1278
1360
|
|
|
1279
1361
|
if (!isNewRetailBCPos) {
|
|
1280
|
-
|
|
1362
|
+
_context4.next = 23;
|
|
1281
1363
|
break;
|
|
1282
1364
|
}
|
|
1283
1365
|
|
|
@@ -1289,7 +1371,7 @@ var SettlementStore = (_class = function () {
|
|
|
1289
1371
|
}
|
|
1290
1372
|
RetailTypeEnum = this.dto.IdbusiType == 36 ? "INTEGRAL_EXCHANGE" : "NORMAL";
|
|
1291
1373
|
_getLoginInfo2 = this.getLoginInfo(), PreSellOrBook = _getLoginInfo2.PreSellOrBook, PercentageWhenBook = _getLoginInfo2.PercentageWhenBook;
|
|
1292
|
-
|
|
1374
|
+
_ref15 = this.dto || {}, IdbusiType = _ref15.IdbusiType, DistributionMode = _ref15.DistributionMode;
|
|
1293
1375
|
|
|
1294
1376
|
if (IdbusiType == 38 && PreSellOrBook == 'BOOK' && PercentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
|
|
1295
1377
|
prepaidAmount = this.dto.RetailPaymentDetails.reduce(function (c, item) {
|
|
@@ -1300,61 +1382,61 @@ var SettlementStore = (_class = function () {
|
|
|
1300
1382
|
_this11.dto.PrepaidAmount = prepaidAmount;
|
|
1301
1383
|
});
|
|
1302
1384
|
}
|
|
1303
|
-
|
|
1385
|
+
_context4.t1 = this.dto.IdbusiType == 37;
|
|
1304
1386
|
|
|
1305
|
-
if (!
|
|
1306
|
-
|
|
1387
|
+
if (!_context4.t1) {
|
|
1388
|
+
_context4.next = 16;
|
|
1307
1389
|
break;
|
|
1308
1390
|
}
|
|
1309
1391
|
|
|
1310
|
-
|
|
1392
|
+
_context4.next = 15;
|
|
1311
1393
|
return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
|
|
1312
1394
|
|
|
1313
1395
|
case 15:
|
|
1314
|
-
|
|
1396
|
+
_context4.t1 = _context4.sent;
|
|
1315
1397
|
|
|
1316
1398
|
case 16:
|
|
1317
|
-
|
|
1399
|
+
_context4.t0 = _context4.t1;
|
|
1318
1400
|
|
|
1319
|
-
if (
|
|
1320
|
-
|
|
1401
|
+
if (_context4.t0) {
|
|
1402
|
+
_context4.next = 19;
|
|
1321
1403
|
break;
|
|
1322
1404
|
}
|
|
1323
1405
|
|
|
1324
|
-
|
|
1406
|
+
_context4.t0 = this.dto.IdbusiType != 37;
|
|
1325
1407
|
|
|
1326
1408
|
case 19:
|
|
1327
|
-
if (!
|
|
1328
|
-
|
|
1409
|
+
if (!_context4.t0) {
|
|
1410
|
+
_context4.next = 21;
|
|
1329
1411
|
break;
|
|
1330
1412
|
}
|
|
1331
1413
|
|
|
1332
|
-
return
|
|
1414
|
+
return _context4.abrupt('return', (0, _tplusApi.ccApi)({ dto: (0, _extends3.default)({}, this.dto.cut(), { RetailOms: { RetailTypeEnum: RetailTypeEnum } }), cip: IPMSG.query || "" }, '/retail/RetailPos/settle', false, false, { method: 'post', timeout_skip: true }).then(function (resp) {
|
|
1333
1415
|
_this11.setDtoID(resp.ID);
|
|
1334
1416
|
_this11.paymode.checkList = [];
|
|
1335
1417
|
_this11.billID = resp.ID;
|
|
1336
1418
|
}));
|
|
1337
1419
|
|
|
1338
1420
|
case 21:
|
|
1339
|
-
|
|
1421
|
+
_context4.next = 24;
|
|
1340
1422
|
break;
|
|
1341
1423
|
|
|
1342
1424
|
case 23:
|
|
1343
|
-
return
|
|
1425
|
+
return _context4.abrupt('return', (0, _tplusApi.tApi)({ dto: this.dto.cut() }, 'chanjet.RE.newRetail.Settle', false, false, { timeout_skip: true }).then(function (resp) {
|
|
1344
1426
|
_this11.setDtoID(resp.ID);
|
|
1345
1427
|
_this11.billID = resp.ID;
|
|
1346
1428
|
}));
|
|
1347
1429
|
|
|
1348
1430
|
case 24:
|
|
1349
1431
|
case 'end':
|
|
1350
|
-
return
|
|
1432
|
+
return _context4.stop();
|
|
1351
1433
|
}
|
|
1352
1434
|
}
|
|
1353
|
-
},
|
|
1435
|
+
}, _callee4, this);
|
|
1354
1436
|
}));
|
|
1355
1437
|
|
|
1356
1438
|
function save() {
|
|
1357
|
-
return
|
|
1439
|
+
return _ref12.apply(this, arguments);
|
|
1358
1440
|
}
|
|
1359
1441
|
|
|
1360
1442
|
return save;
|
|
@@ -1367,35 +1449,35 @@ var SettlementStore = (_class = function () {
|
|
|
1367
1449
|
}, {
|
|
1368
1450
|
key: 'querySettleResult',
|
|
1369
1451
|
value: function () {
|
|
1370
|
-
var
|
|
1371
|
-
return _regenerator2.default.wrap(function
|
|
1452
|
+
var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
1453
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1372
1454
|
while (1) {
|
|
1373
|
-
switch (
|
|
1455
|
+
switch (_context5.prev = _context5.next) {
|
|
1374
1456
|
case 0:
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1457
|
+
_context5.prev = 0;
|
|
1458
|
+
_context5.t0 = _promise2.default;
|
|
1459
|
+
_context5.next = 4;
|
|
1378
1460
|
return (0, _tplusApi.tApi)({ RetailCode: this.dto.Code }, 'chanjet.RE.newRetail.QuerySettleResult', false, false, { timeout_skip: true });
|
|
1379
1461
|
|
|
1380
1462
|
case 4:
|
|
1381
|
-
|
|
1382
|
-
return
|
|
1463
|
+
_context5.t1 = _context5.sent;
|
|
1464
|
+
return _context5.abrupt('return', _context5.t0.resolve.call(_context5.t0, _context5.t1));
|
|
1383
1465
|
|
|
1384
1466
|
case 8:
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
return
|
|
1467
|
+
_context5.prev = 8;
|
|
1468
|
+
_context5.t2 = _context5['catch'](0);
|
|
1469
|
+
return _context5.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
|
|
1388
1470
|
|
|
1389
1471
|
case 11:
|
|
1390
1472
|
case 'end':
|
|
1391
|
-
return
|
|
1473
|
+
return _context5.stop();
|
|
1392
1474
|
}
|
|
1393
1475
|
}
|
|
1394
|
-
},
|
|
1476
|
+
}, _callee5, this, [[0, 8]]);
|
|
1395
1477
|
}));
|
|
1396
1478
|
|
|
1397
1479
|
function querySettleResult() {
|
|
1398
|
-
return
|
|
1480
|
+
return _ref16.apply(this, arguments);
|
|
1399
1481
|
}
|
|
1400
1482
|
|
|
1401
1483
|
return querySettleResult;
|
|
@@ -1421,99 +1503,131 @@ var SettlementStore = (_class = function () {
|
|
|
1421
1503
|
}, {
|
|
1422
1504
|
key: 'validePwd',
|
|
1423
1505
|
value: function () {
|
|
1424
|
-
var
|
|
1425
|
-
var
|
|
1506
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(value) {
|
|
1507
|
+
var _ref18, isNewRetailBCPos, cook1, cook2, message, memberStorageId, _paymode$currentMode, cardTypeEnum, memberId, meStorageCardId, cardStatusEnum, result, count, _result;
|
|
1426
1508
|
|
|
1427
|
-
return _regenerator2.default.wrap(function
|
|
1509
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1428
1510
|
while (1) {
|
|
1429
|
-
switch (
|
|
1511
|
+
switch (_context6.prev = _context6.next) {
|
|
1430
1512
|
case 0:
|
|
1431
|
-
|
|
1432
|
-
|
|
1513
|
+
_ref18 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref18.isNewRetailBCPos;
|
|
1514
|
+
_context6.prev = 1;
|
|
1433
1515
|
|
|
1434
1516
|
if (!isNewRetailBCPos) {
|
|
1435
|
-
|
|
1517
|
+
_context6.next = 33;
|
|
1436
1518
|
break;
|
|
1437
1519
|
}
|
|
1438
1520
|
|
|
1439
1521
|
cook1 = this.getAllCookies()['errorPwd'];
|
|
1440
1522
|
cook2 = cook1 && JSON.parse(cook1);
|
|
1441
1523
|
message = '密码输入错误';
|
|
1442
|
-
|
|
1524
|
+
memberStorageId = this.paymode.currentMode.meStorageCardId;
|
|
1443
1525
|
|
|
1444
1526
|
if (!cook2) {
|
|
1445
|
-
|
|
1527
|
+
_context6.next = 12;
|
|
1446
1528
|
break;
|
|
1447
1529
|
}
|
|
1448
1530
|
|
|
1449
|
-
if (!cook2.hasOwnProperty(
|
|
1450
|
-
|
|
1531
|
+
if (!cook2.hasOwnProperty(memberStorageId + "")) {
|
|
1532
|
+
_context6.next = 12;
|
|
1451
1533
|
break;
|
|
1452
1534
|
}
|
|
1453
1535
|
|
|
1454
|
-
if (!(cook2[
|
|
1455
|
-
|
|
1536
|
+
if (!(cook2[memberStorageId] > 3)) {
|
|
1537
|
+
_context6.next = 12;
|
|
1456
1538
|
break;
|
|
1457
1539
|
}
|
|
1458
1540
|
|
|
1459
1541
|
message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
|
|
1460
|
-
return
|
|
1542
|
+
return _context6.abrupt('return', _promise2.default.resolve(message));
|
|
1461
1543
|
|
|
1462
1544
|
case 12:
|
|
1463
|
-
|
|
1464
|
-
|
|
1545
|
+
_paymode$currentMode = this.paymode.currentMode, cardTypeEnum = _paymode$currentMode.cardTypeEnum, memberId = _paymode$currentMode.memberId, meStorageCardId = _paymode$currentMode.meStorageCardId, cardStatusEnum = _paymode$currentMode.cardStatusEnum;
|
|
1546
|
+
result = null;
|
|
1465
1547
|
|
|
1466
|
-
|
|
1467
|
-
|
|
1548
|
+
if (!(cardTypeEnum === 'BALANCE_CARD')) {
|
|
1549
|
+
_context6.next = 20;
|
|
1550
|
+
break;
|
|
1551
|
+
}
|
|
1468
1552
|
|
|
1553
|
+
_context6.next = 17;
|
|
1554
|
+
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + memberId, false, false);
|
|
1555
|
+
|
|
1556
|
+
case 17:
|
|
1557
|
+
result = _context6.sent;
|
|
1558
|
+
_context6.next = 29;
|
|
1559
|
+
break;
|
|
1560
|
+
|
|
1561
|
+
case 20:
|
|
1562
|
+
if (!(cardStatusEnum === 'BINDING' && this.member && this.member.ID === memberId)) {
|
|
1563
|
+
_context6.next = 26;
|
|
1564
|
+
break;
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
_context6.next = 23;
|
|
1568
|
+
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1569
|
+
|
|
1570
|
+
case 23:
|
|
1571
|
+
result = _context6.sent;
|
|
1572
|
+
_context6.next = 29;
|
|
1573
|
+
break;
|
|
1574
|
+
|
|
1575
|
+
case 26:
|
|
1576
|
+
_context6.next = 28;
|
|
1577
|
+
return (0, _tplusApi.ccApi)({ password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1578
|
+
|
|
1579
|
+
case 28:
|
|
1580
|
+
result = _context6.sent;
|
|
1581
|
+
|
|
1582
|
+
case 29:
|
|
1469
1583
|
if (!result.data) {
|
|
1470
1584
|
if (cook2) {
|
|
1471
|
-
if (cook2.hasOwnProperty(
|
|
1472
|
-
count = cook2[
|
|
1585
|
+
if (cook2.hasOwnProperty(memberStorageId + "")) {
|
|
1586
|
+
count = cook2[memberStorageId];
|
|
1473
1587
|
|
|
1474
|
-
cook2[
|
|
1588
|
+
cook2[memberStorageId] = count + 1;
|
|
1475
1589
|
} else {
|
|
1476
|
-
cook2[
|
|
1590
|
+
cook2[memberStorageId] = 1;
|
|
1477
1591
|
}
|
|
1478
1592
|
} else {
|
|
1479
1593
|
cook2 = {};
|
|
1480
|
-
cook2[
|
|
1594
|
+
cook2[memberStorageId] = 1;
|
|
1481
1595
|
}
|
|
1482
1596
|
this.setCookie('errorPwd', '', -1);
|
|
1483
1597
|
this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
|
|
1484
1598
|
}
|
|
1485
|
-
return
|
|
1599
|
+
return _context6.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
|
|
1486
1600
|
|
|
1487
|
-
case
|
|
1488
|
-
|
|
1601
|
+
case 33:
|
|
1602
|
+
_context6.next = 35;
|
|
1489
1603
|
return (0, _tplusApi.tApi)({ "CheckoutParams": {
|
|
1490
1604
|
"Idmember": value.id,
|
|
1491
1605
|
"Password": value.pwd
|
|
1492
1606
|
} }, 'AA.DR.newRetailMember.CheckoutMemberPassword', false, false);
|
|
1493
1607
|
|
|
1494
|
-
case
|
|
1495
|
-
_result =
|
|
1496
|
-
return
|
|
1608
|
+
case 35:
|
|
1609
|
+
_result = _context6.sent;
|
|
1610
|
+
return _context6.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
|
|
1497
1611
|
|
|
1498
|
-
case
|
|
1499
|
-
|
|
1612
|
+
case 37:
|
|
1613
|
+
_context6.next = 42;
|
|
1500
1614
|
break;
|
|
1501
1615
|
|
|
1502
|
-
case
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
return
|
|
1616
|
+
case 39:
|
|
1617
|
+
_context6.prev = 39;
|
|
1618
|
+
_context6.t0 = _context6['catch'](1);
|
|
1619
|
+
return _context6.abrupt('return', "failed");
|
|
1506
1620
|
|
|
1507
|
-
case
|
|
1621
|
+
case 42:
|
|
1508
1622
|
case 'end':
|
|
1509
|
-
return
|
|
1623
|
+
return _context6.stop();
|
|
1510
1624
|
}
|
|
1511
1625
|
}
|
|
1512
|
-
},
|
|
1626
|
+
}, _callee6, this, [[1, 39]]);
|
|
1513
1627
|
}));
|
|
1514
1628
|
|
|
1515
|
-
function validePwd(
|
|
1516
|
-
return
|
|
1629
|
+
function validePwd(_x4) {
|
|
1630
|
+
return _ref17.apply(this, arguments);
|
|
1517
1631
|
}
|
|
1518
1632
|
|
|
1519
1633
|
return validePwd;
|
|
@@ -1535,7 +1649,7 @@ var SettlementStore = (_class = function () {
|
|
|
1535
1649
|
var idstore = (0, _tplusPoslogin.PosInitData)('storeID');
|
|
1536
1650
|
return (0, _tplusApi.ccApi)({
|
|
1537
1651
|
Idstore: idstore,
|
|
1538
|
-
meMemberId: _this12.
|
|
1652
|
+
meMemberId: _this12.paymode.currentMode.memberId,
|
|
1539
1653
|
oldPassword: null,
|
|
1540
1654
|
newPassword: _tplusApi.User.pwdEncrypt(newPassConfirm),
|
|
1541
1655
|
dataSource: "POS"
|
|
@@ -1552,37 +1666,130 @@ var SettlementStore = (_class = function () {
|
|
|
1552
1666
|
var _this13 = this;
|
|
1553
1667
|
|
|
1554
1668
|
return function () {
|
|
1555
|
-
var
|
|
1669
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(_this) {
|
|
1556
1670
|
var _getLoginInfo3, IdStore, StoreCode, resp;
|
|
1557
1671
|
|
|
1558
|
-
return _regenerator2.default.wrap(function
|
|
1672
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1559
1673
|
while (1) {
|
|
1560
|
-
switch (
|
|
1674
|
+
switch (_context7.prev = _context7.next) {
|
|
1561
1675
|
case 0:
|
|
1562
1676
|
_getLoginInfo3 = _this13.getLoginInfo(), IdStore = _getLoginInfo3.IdStore, StoreCode = _getLoginInfo3.StoreCode;
|
|
1563
|
-
|
|
1677
|
+
_context7.next = 3;
|
|
1564
1678
|
return (0, _tplusApi.tApi)({ Idmember: _this13.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
|
|
1565
1679
|
|
|
1566
1680
|
case 3:
|
|
1567
|
-
resp =
|
|
1681
|
+
resp = _context7.sent;
|
|
1568
1682
|
|
|
1569
1683
|
_this.member = resp;
|
|
1570
|
-
_this.paymode.
|
|
1571
|
-
return
|
|
1684
|
+
_this.paymode.updateMemberStorageCardNo(resp.StorageCardNo, resp.WalletEnabled);
|
|
1685
|
+
return _context7.abrupt('return', _promise2.default.resolve(resp));
|
|
1572
1686
|
|
|
1573
1687
|
case 7:
|
|
1574
1688
|
case 'end':
|
|
1575
|
-
return
|
|
1689
|
+
return _context7.stop();
|
|
1576
1690
|
}
|
|
1577
1691
|
}
|
|
1578
|
-
},
|
|
1692
|
+
}, _callee7, _this13);
|
|
1579
1693
|
}));
|
|
1580
1694
|
|
|
1581
|
-
return function (
|
|
1695
|
+
return function (_x5) {
|
|
1696
|
+
return _ref19.apply(this, arguments);
|
|
1697
|
+
};
|
|
1698
|
+
}();
|
|
1699
|
+
}
|
|
1700
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'updateCurrentMode', [_mobx.action], {
|
|
1701
|
+
enumerable: true,
|
|
1702
|
+
initializer: function initializer() {
|
|
1703
|
+
var _this14 = this;
|
|
1704
|
+
|
|
1705
|
+
return function () {
|
|
1706
|
+
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(memberId) {
|
|
1707
|
+
var result;
|
|
1708
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1709
|
+
while (1) {
|
|
1710
|
+
switch (_context8.prev = _context8.next) {
|
|
1711
|
+
case 0:
|
|
1712
|
+
_context8.next = 2;
|
|
1713
|
+
return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByMemberId/' + memberId + '/' + true, false, false, { method: 'get' });
|
|
1714
|
+
|
|
1715
|
+
case 2:
|
|
1716
|
+
result = _context8.sent;
|
|
1717
|
+
|
|
1718
|
+
if (!(result && result.data.length)) {
|
|
1719
|
+
_context8.next = 20;
|
|
1720
|
+
break;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
if (!(result.data.length === 1)) {
|
|
1724
|
+
_context8.next = 9;
|
|
1725
|
+
break;
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
_this14.paymode.updateCardInfo(result.data[0]);
|
|
1729
|
+
return _context8.abrupt('return', result.data);
|
|
1730
|
+
|
|
1731
|
+
case 9:
|
|
1732
|
+
if (!(result.data && result.data.length === 1)) {
|
|
1733
|
+
_context8.next = 14;
|
|
1734
|
+
break;
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
_this14.paymode.updateCardInfo(result.data[0]);
|
|
1738
|
+
return _context8.abrupt('return', result.data);
|
|
1739
|
+
|
|
1740
|
+
case 14:
|
|
1741
|
+
if (!(result.data && result.data.length > 1)) {
|
|
1742
|
+
_context8.next = 18;
|
|
1743
|
+
break;
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
return _context8.abrupt('return', result.data);
|
|
1747
|
+
|
|
1748
|
+
case 18:
|
|
1749
|
+
_message2.default.warn('没有可用储值卡!');
|
|
1750
|
+
return _context8.abrupt('return', false);
|
|
1751
|
+
|
|
1752
|
+
case 20:
|
|
1753
|
+
case 'end':
|
|
1754
|
+
return _context8.stop();
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
}, _callee8, _this14);
|
|
1758
|
+
}));
|
|
1759
|
+
|
|
1760
|
+
return function (_x6) {
|
|
1582
1761
|
return _ref20.apply(this, arguments);
|
|
1583
1762
|
};
|
|
1584
1763
|
}();
|
|
1585
1764
|
}
|
|
1765
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'updateCardInfo', [_mobx.action], {
|
|
1766
|
+
enumerable: true,
|
|
1767
|
+
initializer: function initializer() {
|
|
1768
|
+
var _this15 = this;
|
|
1769
|
+
|
|
1770
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9() {
|
|
1771
|
+
var address, result;
|
|
1772
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
1773
|
+
while (1) {
|
|
1774
|
+
switch (_context9.prev = _context9.next) {
|
|
1775
|
+
case 0:
|
|
1776
|
+
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + _this15.paymode.currentMode.storageCardNo;
|
|
1777
|
+
_context9.next = 3;
|
|
1778
|
+
return (0, _tplusApi.ccApi)({}, address, false, false, { method: 'get', timeout_skip: true });
|
|
1779
|
+
|
|
1780
|
+
case 3:
|
|
1781
|
+
result = _context9.sent;
|
|
1782
|
+
|
|
1783
|
+
_this15.paymode.updateCardInfo(result.data);
|
|
1784
|
+
|
|
1785
|
+
case 5:
|
|
1786
|
+
case 'end':
|
|
1787
|
+
return _context9.stop();
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
}, _callee9, _this15);
|
|
1791
|
+
}));
|
|
1792
|
+
}
|
|
1586
1793
|
}), _applyDecoratedDescriptor(_class.prototype, 'addDjq', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addDjq'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeFocusOnly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeFocusOnly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeClickFocusOnly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeClickFocusOnly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeValue'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'addPayDirectly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addPayDirectly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'addPay', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addPay'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'delPay', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'delPay'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'setDtoID', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'setDtoID'), _class.prototype)), _class);
|
|
1587
1794
|
exports.default = SettlementStore;
|
|
1588
1795
|
var PayMode = exports.PayMode = (_class3 = function () {
|
|
@@ -1597,19 +1804,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1597
1804
|
this.onlineamount = 0;
|
|
1598
1805
|
this.maxamount = 0;
|
|
1599
1806
|
|
|
1600
|
-
_initDefineProp(this, 'currentFocus',
|
|
1807
|
+
_initDefineProp(this, 'currentFocus', _descriptor5, this);
|
|
1601
1808
|
|
|
1602
|
-
_initDefineProp(this, 'received',
|
|
1809
|
+
_initDefineProp(this, 'received', _descriptor6, this);
|
|
1603
1810
|
|
|
1604
|
-
_initDefineProp(this, 'receivable',
|
|
1811
|
+
_initDefineProp(this, 'receivable', _descriptor7, this);
|
|
1605
1812
|
|
|
1606
|
-
_initDefineProp(this, 'paymodes',
|
|
1813
|
+
_initDefineProp(this, 'paymodes', _descriptor8, this);
|
|
1607
1814
|
|
|
1608
|
-
_initDefineProp(this, 'thePaymodes',
|
|
1815
|
+
_initDefineProp(this, 'thePaymodes', _descriptor9, this);
|
|
1609
1816
|
|
|
1610
1817
|
this.bookMaxValue = 0;
|
|
1611
1818
|
this.isNotFullBook = false;
|
|
1612
1819
|
this.isNotFullOnlyBook = false;
|
|
1820
|
+
|
|
1821
|
+
_initDefineProp(this, 'storageCardNo', _descriptor10, this);
|
|
1822
|
+
|
|
1823
|
+
_initDefineProp(this, 'balance', _descriptor11, this);
|
|
1824
|
+
|
|
1613
1825
|
this.currentMode = null;
|
|
1614
1826
|
this.checkList = [];
|
|
1615
1827
|
this.settle = {
|
|
@@ -1617,13 +1829,14 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1617
1829
|
hotKey: "Ctrl+M"
|
|
1618
1830
|
};
|
|
1619
1831
|
|
|
1620
|
-
_initDefineProp(this, 'calcCheckList',
|
|
1832
|
+
_initDefineProp(this, 'calcCheckList', _descriptor12, this);
|
|
1621
1833
|
|
|
1622
|
-
_initDefineProp(this, 'setCouponNum',
|
|
1834
|
+
_initDefineProp(this, 'setCouponNum', _descriptor13, this);
|
|
1623
1835
|
|
|
1624
|
-
_initDefineProp(this, 'addDjqs',
|
|
1625
|
-
}
|
|
1836
|
+
_initDefineProp(this, 'addDjqs', _descriptor14, this);
|
|
1837
|
+
}
|
|
1626
1838
|
// @observable store = null;
|
|
1839
|
+
//只是预订非全款时为true
|
|
1627
1840
|
//应收
|
|
1628
1841
|
|
|
1629
1842
|
|
|
@@ -1670,10 +1883,30 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1670
1883
|
this.receivable = (0, _utils.getFixedNumber)(this.amount - sum);
|
|
1671
1884
|
}
|
|
1672
1885
|
}
|
|
1886
|
+
}, {
|
|
1887
|
+
key: 'updateMemberStorageCardNo',
|
|
1888
|
+
value: function updateMemberStorageCardNo(storageCardNo, walletEnabled) {
|
|
1889
|
+
this.currentMode.storageCardNo = storageCardNo;
|
|
1890
|
+
this.currentMode.walletEnabled = walletEnabled;
|
|
1891
|
+
}
|
|
1892
|
+
}, {
|
|
1893
|
+
key: 'updateCardInfo',
|
|
1894
|
+
value: function updateCardInfo(m) {
|
|
1895
|
+
this.currentMode.cardStatusEnum = m.CardStatusEnum;
|
|
1896
|
+
this.currentMode.isNeedPassword = m.IsNeedPassword;
|
|
1897
|
+
this.currentMode.meStorageCardId = m.MeStorageCardId;
|
|
1898
|
+
this.currentMode.storageCardNo = m.StorageCardNo;
|
|
1899
|
+
this.currentMode.balance = m.BalanceStorage;
|
|
1900
|
+
this.currentMode.rawbalance = m.BalanceStorage;
|
|
1901
|
+
this.currentMode.cardTypeEnum = m.CardTypeEnum;
|
|
1902
|
+
this.currentMode.walletEnabled = m.WalletEnabled;
|
|
1903
|
+
this.currentMode.memberId = m.ID;
|
|
1904
|
+
this.currentMode.freePaymentPasswordStore = m.FreePaymentPasswordStore;
|
|
1905
|
+
}
|
|
1673
1906
|
}, {
|
|
1674
1907
|
key: 'calcDjqCheckValue',
|
|
1675
1908
|
value: function calcDjqCheckValue(q1, dto, params) {
|
|
1676
|
-
var
|
|
1909
|
+
var _this16 = this;
|
|
1677
1910
|
|
|
1678
1911
|
var useLimitPerOrder = (0, _tplusPoslogin.PosInitData)('UseLimitPerOrder');
|
|
1679
1912
|
var qList = (0, _filter3.default)(this.currentMode.djqs, function (djq) {
|
|
@@ -1687,12 +1920,12 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1687
1920
|
this.checkList = [];
|
|
1688
1921
|
}
|
|
1689
1922
|
|
|
1690
|
-
var
|
|
1691
|
-
isNewRetailBCPos =
|
|
1923
|
+
var _ref22 = _mutantsUtil.platform || {},
|
|
1924
|
+
isNewRetailBCPos = _ref22.isNewRetailBCPos;
|
|
1692
1925
|
|
|
1693
|
-
var _enumController$
|
|
1694
|
-
PayStyle = _enumController$
|
|
1695
|
-
Differentiate = _enumController$
|
|
1926
|
+
var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
|
|
1927
|
+
PayStyle = _enumController$getEn16.PayStyle,
|
|
1928
|
+
Differentiate = _enumController$getEn16.Differentiate;
|
|
1696
1929
|
|
|
1697
1930
|
if (q1) {
|
|
1698
1931
|
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
|
@@ -1720,7 +1953,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1720
1953
|
if (!q1.checked) {
|
|
1721
1954
|
this.checkList.forEach(function (ele, i) {
|
|
1722
1955
|
if (ele.id === q1.id) {
|
|
1723
|
-
|
|
1956
|
+
_this16.checkList.splice(i, 1);
|
|
1724
1957
|
}
|
|
1725
1958
|
});
|
|
1726
1959
|
} else {
|
|
@@ -1792,24 +2025,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1792
2025
|
if (result && result.length != 0) {
|
|
1793
2026
|
result.forEach(function (element, index) {
|
|
1794
2027
|
var djq1 = false;
|
|
1795
|
-
|
|
2028
|
+
_this16.currentMode.djqs.forEach(function (djq) {
|
|
1796
2029
|
if (element.id === djq.id) {
|
|
1797
2030
|
djq1 = true;
|
|
1798
2031
|
}
|
|
1799
2032
|
});
|
|
1800
2033
|
|
|
1801
|
-
var
|
|
1802
|
-
couponCode =
|
|
1803
|
-
name =
|
|
1804
|
-
tieredAmountResult =
|
|
1805
|
-
fromDate =
|
|
1806
|
-
dateMount =
|
|
1807
|
-
promoMethodEnum =
|
|
1808
|
-
discountPct =
|
|
1809
|
-
nominalAmount =
|
|
1810
|
-
promoId =
|
|
1811
|
-
id =
|
|
1812
|
-
doorsill =
|
|
2034
|
+
var _ref23 = element || {},
|
|
2035
|
+
couponCode = _ref23.couponCode,
|
|
2036
|
+
name = _ref23.name,
|
|
2037
|
+
tieredAmountResult = _ref23.tieredAmountResult,
|
|
2038
|
+
fromDate = _ref23.fromDate,
|
|
2039
|
+
dateMount = _ref23.dateMount,
|
|
2040
|
+
promoMethodEnum = _ref23.promoMethodEnum,
|
|
2041
|
+
discountPct = _ref23.discountPct,
|
|
2042
|
+
nominalAmount = _ref23.nominalAmount,
|
|
2043
|
+
promoId = _ref23.promoId,
|
|
2044
|
+
id = _ref23.id,
|
|
2045
|
+
doorsill = _ref23.doorsill;
|
|
1813
2046
|
|
|
1814
2047
|
var condValue = tieredAmountResult.condValue,
|
|
1815
2048
|
promoDiscount = tieredAmountResult.promoDiscount,
|
|
@@ -1837,10 +2070,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1837
2070
|
// couponCategoryEnum: tieredAmountResult.couponCategoryEnum,
|
|
1838
2071
|
// id
|
|
1839
2072
|
// })
|
|
1840
|
-
|
|
2073
|
+
_this16.addDjqs(couponCode, name, true, nominalAmount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
|
|
1841
2074
|
djq1 = false;
|
|
1842
2075
|
} else {
|
|
1843
|
-
|
|
2076
|
+
_this16.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
|
|
1844
2077
|
// this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
|
|
1845
2078
|
// djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
|
|
1846
2079
|
}
|
|
@@ -1853,11 +2086,11 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1853
2086
|
}, {
|
|
1854
2087
|
key: 'calcDjqValue',
|
|
1855
2088
|
value: function calcDjqValue(q1) {
|
|
1856
|
-
var
|
|
1857
|
-
isNewRetailBCPos =
|
|
2089
|
+
var _ref24 = _mutantsUtil.platform || {},
|
|
2090
|
+
isNewRetailBCPos = _ref24.isNewRetailBCPos;
|
|
1858
2091
|
|
|
1859
|
-
var _enumController$
|
|
1860
|
-
Differentiate = _enumController$
|
|
2092
|
+
var _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(),
|
|
2093
|
+
Differentiate = _enumController$getEn17.Differentiate;
|
|
1861
2094
|
|
|
1862
2095
|
if (q1) {
|
|
1863
2096
|
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
|
@@ -1919,8 +2152,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1919
2152
|
this.currentMode.errinfo = '';
|
|
1920
2153
|
var sum = this.amount;
|
|
1921
2154
|
|
|
1922
|
-
var _enumController$
|
|
1923
|
-
PayStyle = _enumController$
|
|
2155
|
+
var _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(),
|
|
2156
|
+
PayStyle = _enumController$getEn18.PayStyle;
|
|
1924
2157
|
|
|
1925
2158
|
this.thePaymodes && this.thePaymodes.forEach(function (mode) {
|
|
1926
2159
|
if (mode.paymentType === PayStyle.hyczk) {
|
|
@@ -1939,28 +2172,28 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1939
2172
|
}, {
|
|
1940
2173
|
key: 'calcMemberBalance',
|
|
1941
2174
|
value: function calcMemberBalance() {
|
|
1942
|
-
this.currentMode.balance = this.currentMode.
|
|
2175
|
+
this.currentMode.balance = this.currentMode.rawbalance - this.currentMode.value;
|
|
1943
2176
|
}
|
|
1944
2177
|
}, {
|
|
1945
2178
|
key: 'setPaymodes',
|
|
1946
2179
|
value: function () {
|
|
1947
|
-
var
|
|
1948
|
-
var
|
|
2180
|
+
var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(type, isIntegralExchange) {
|
|
2181
|
+
var _this17 = this;
|
|
1949
2182
|
|
|
1950
|
-
var _enumController$
|
|
2183
|
+
var _enumController$getEn19, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
|
|
1951
2184
|
|
|
1952
|
-
return _regenerator2.default.wrap(function
|
|
2185
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
1953
2186
|
while (1) {
|
|
1954
|
-
switch (
|
|
2187
|
+
switch (_context10.prev = _context10.next) {
|
|
1955
2188
|
case 0:
|
|
1956
|
-
_enumController$
|
|
2189
|
+
_enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn19.settleStyleType, PayStyle = _enumController$getEn19.PayStyle;
|
|
1957
2190
|
memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
|
|
1958
2191
|
param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
|
|
1959
|
-
|
|
2192
|
+
_context10.next = 5;
|
|
1960
2193
|
return (0, _tplusApi.tApi)({ param: param }, 'chanjet.RE.NewPos.GetNewStoreSettleStyles', false, false);
|
|
1961
2194
|
|
|
1962
2195
|
case 5:
|
|
1963
|
-
modes =
|
|
2196
|
+
modes = _context10.sent;
|
|
1964
2197
|
|
|
1965
2198
|
if (modes) {
|
|
1966
2199
|
(0, _mobx.runInAction)(function () {
|
|
@@ -1969,7 +2202,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1969
2202
|
//产品需求确认会员储值卡结算方式前端展示统一调整为“储值卡" tuzha by 2020-07-08
|
|
1970
2203
|
|
|
1971
2204
|
if (mode.Code == PayStyle.hyczk) {
|
|
1972
|
-
mode.Name = '
|
|
2205
|
+
mode.Name = '储值卡';
|
|
1973
2206
|
}
|
|
1974
2207
|
paymodes.push({
|
|
1975
2208
|
name: mode.Name,
|
|
@@ -1986,21 +2219,21 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1986
2219
|
virtualPay: mode.VirtualPay
|
|
1987
2220
|
});
|
|
1988
2221
|
});
|
|
1989
|
-
|
|
2222
|
+
_this17.paymodes = paymodes;
|
|
1990
2223
|
//modes.QuickSettleStyles
|
|
1991
2224
|
});
|
|
1992
2225
|
}
|
|
1993
2226
|
|
|
1994
2227
|
case 7:
|
|
1995
2228
|
case 'end':
|
|
1996
|
-
return
|
|
2229
|
+
return _context10.stop();
|
|
1997
2230
|
}
|
|
1998
2231
|
}
|
|
1999
|
-
},
|
|
2232
|
+
}, _callee10, this);
|
|
2000
2233
|
}));
|
|
2001
2234
|
|
|
2002
|
-
function setPaymodes(
|
|
2003
|
-
return
|
|
2235
|
+
function setPaymodes(_x7, _x8) {
|
|
2236
|
+
return _ref25.apply(this, arguments);
|
|
2004
2237
|
}
|
|
2005
2238
|
|
|
2006
2239
|
return setPaymodes;
|
|
@@ -2017,47 +2250,57 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2017
2250
|
}
|
|
2018
2251
|
}]);
|
|
2019
2252
|
return PayMode;
|
|
2020
|
-
}(), (
|
|
2253
|
+
}(), (_descriptor5 = _applyDecoratedDescriptor(_class3.prototype, 'currentFocus', [_mobx.observable], {
|
|
2021
2254
|
enumerable: true,
|
|
2022
2255
|
initializer: function initializer() {
|
|
2023
2256
|
return "";
|
|
2024
2257
|
}
|
|
2025
|
-
}),
|
|
2258
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class3.prototype, 'received', [_mobx.observable], {
|
|
2026
2259
|
enumerable: true,
|
|
2027
2260
|
initializer: function initializer() {
|
|
2028
2261
|
return 0;
|
|
2029
2262
|
}
|
|
2030
|
-
}),
|
|
2263
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class3.prototype, 'receivable', [_mobx.observable], {
|
|
2031
2264
|
enumerable: true,
|
|
2032
2265
|
initializer: function initializer() {
|
|
2033
2266
|
return 0;
|
|
2034
2267
|
}
|
|
2035
|
-
}),
|
|
2268
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class3.prototype, 'paymodes', [_mobx.observable], {
|
|
2036
2269
|
enumerable: true,
|
|
2037
2270
|
initializer: function initializer() {
|
|
2038
2271
|
return [];
|
|
2039
2272
|
}
|
|
2040
|
-
}),
|
|
2273
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class3.prototype, 'thePaymodes', [_mobx.observable], {
|
|
2041
2274
|
enumerable: true,
|
|
2042
2275
|
initializer: function initializer() {
|
|
2043
2276
|
return [];
|
|
2044
2277
|
}
|
|
2045
|
-
}),
|
|
2278
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class3.prototype, 'storageCardNo', [_mobx.observable], {
|
|
2046
2279
|
enumerable: true,
|
|
2047
2280
|
initializer: function initializer() {
|
|
2048
|
-
|
|
2281
|
+
return null;
|
|
2282
|
+
}
|
|
2283
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class3.prototype, 'balance', [_mobx.observable], {
|
|
2284
|
+
enumerable: true,
|
|
2285
|
+
initializer: function initializer() {
|
|
2286
|
+
return null;
|
|
2287
|
+
}
|
|
2288
|
+
}), _applyDecoratedDescriptor(_class3.prototype, 'clean', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clean'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'clear', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clear'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcReserved', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcReserved'), _class3.prototype), _descriptor12 = _applyDecoratedDescriptor(_class3.prototype, 'calcCheckList', [_mobx.action], {
|
|
2289
|
+
enumerable: true,
|
|
2290
|
+
initializer: function initializer() {
|
|
2291
|
+
var _this18 = this;
|
|
2049
2292
|
|
|
2050
2293
|
return function () {
|
|
2051
|
-
|
|
2294
|
+
_this18.checkList = [];
|
|
2052
2295
|
};
|
|
2053
2296
|
}
|
|
2054
|
-
}), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqCheckValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqCheckValue'), _class3.prototype),
|
|
2297
|
+
}), _applyDecoratedDescriptor(_class3.prototype, 'updateMemberStorageCardNo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'updateMemberStorageCardNo'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'updateCardInfo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'updateCardInfo'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqCheckValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqCheckValue'), _class3.prototype), _descriptor13 = _applyDecoratedDescriptor(_class3.prototype, 'setCouponNum', [_mobx.action], {
|
|
2055
2298
|
enumerable: true,
|
|
2056
2299
|
initializer: function initializer() {
|
|
2057
|
-
var
|
|
2300
|
+
var _this19 = this;
|
|
2058
2301
|
|
|
2059
2302
|
return function (id, couponNum, promoMethodEnum, nominalAmount, promoDiscount) {
|
|
2060
|
-
|
|
2303
|
+
_this19.currentMode.djqs.forEach(function (ele) {
|
|
2061
2304
|
if (ele.id === id) {
|
|
2062
2305
|
promoMethodEnum == "CASH_COUPON" ? ele.amount = nominalAmount : ele.amount = promoDiscount;
|
|
2063
2306
|
ele.couponCategoryEnum = couponNum;
|
|
@@ -2067,10 +2310,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2067
2310
|
});
|
|
2068
2311
|
};
|
|
2069
2312
|
}
|
|
2070
|
-
}),
|
|
2313
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
|
|
2071
2314
|
enumerable: true,
|
|
2072
2315
|
initializer: function initializer() {
|
|
2073
|
-
var
|
|
2316
|
+
var _this20 = this;
|
|
2074
2317
|
|
|
2075
2318
|
return function (promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
|
|
2076
2319
|
var djq = {
|
|
@@ -2092,25 +2335,25 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2092
2335
|
couponCategoryEnum: couponCategoryEnum,
|
|
2093
2336
|
id: id
|
|
2094
2337
|
};
|
|
2095
|
-
|
|
2338
|
+
_this20.currentMode.djqs.push(djq);
|
|
2096
2339
|
};
|
|
2097
2340
|
}
|
|
2098
2341
|
}), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqValue'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'reCalculationDjqs', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'reCalculationDjqs'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'clearDjqs', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clearDjqs'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'setCurrentModeValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'setCurrentModeValue'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcMemberBalance', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcMemberBalance'), _class3.prototype)), _class3);
|
|
2099
2342
|
var Member = exports.Member = (_class5 = function () {
|
|
2100
2343
|
function Member(m) {
|
|
2101
|
-
var
|
|
2344
|
+
var _this21 = this;
|
|
2102
2345
|
|
|
2103
2346
|
(0, _classCallCheck3.default)(this, Member);
|
|
2104
2347
|
|
|
2105
|
-
_initDefineProp(this, 'cardNo',
|
|
2348
|
+
_initDefineProp(this, 'cardNo', _descriptor15, this);
|
|
2106
2349
|
|
|
2107
|
-
_initDefineProp(this, 'balance',
|
|
2350
|
+
_initDefineProp(this, 'balance', _descriptor16, this);
|
|
2108
2351
|
|
|
2109
|
-
_initDefineProp(this, 'exchangable',
|
|
2352
|
+
_initDefineProp(this, 'exchangable', _descriptor17, this);
|
|
2110
2353
|
|
|
2111
|
-
_initDefineProp(this, '
|
|
2354
|
+
_initDefineProp(this, 'meStorageCardId', _descriptor18, this);
|
|
2112
2355
|
|
|
2113
|
-
_initDefineProp(this, '
|
|
2356
|
+
_initDefineProp(this, 'storageCardNo', _descriptor19, this);
|
|
2114
2357
|
|
|
2115
2358
|
if (m) {
|
|
2116
2359
|
this.id = m.ID;
|
|
@@ -2121,17 +2364,15 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
2121
2364
|
return key == 'canusedbalancestorage';
|
|
2122
2365
|
});
|
|
2123
2366
|
|
|
2124
|
-
var
|
|
2125
|
-
isNewRetailBCPos =
|
|
2367
|
+
var _ref26 = _mutantsUtil.platform || {},
|
|
2368
|
+
isNewRetailBCPos = _ref26.isNewRetailBCPos;
|
|
2126
2369
|
|
|
2127
|
-
m.StorageCardNo && (this.StorageCardNo = m.StorageCardNo);
|
|
2128
|
-
m.MeStorageCardId && (this.MeStorageCardId = m.MeStorageCardId);
|
|
2129
2370
|
(0, _mobx.runInAction)(function () {
|
|
2130
|
-
|
|
2371
|
+
_this21.cardNo = m.CardCode;
|
|
2131
2372
|
if (index >= 0) {
|
|
2132
|
-
|
|
2373
|
+
_this21.balance = parseFloat(m.DynamicPropertyValues[index]);
|
|
2133
2374
|
} else {
|
|
2134
|
-
|
|
2375
|
+
_this21.balance = _this21.rawbalance;
|
|
2135
2376
|
}
|
|
2136
2377
|
});
|
|
2137
2378
|
this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;
|
|
@@ -2151,32 +2392,22 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
2151
2392
|
this.cardNo = v;
|
|
2152
2393
|
this.id = null;
|
|
2153
2394
|
}
|
|
2154
|
-
}, {
|
|
2155
|
-
key: 'setMeStorageCardId',
|
|
2156
|
-
value: function setMeStorageCardId(v) {
|
|
2157
|
-
this.MeStorageCardId = v;
|
|
2158
|
-
}
|
|
2159
|
-
}, {
|
|
2160
|
-
key: 'setStorageCardNo',
|
|
2161
|
-
value: function setStorageCardNo(v) {
|
|
2162
|
-
this.StorageCardNo = v;
|
|
2163
|
-
}
|
|
2164
2395
|
}]);
|
|
2165
2396
|
return Member;
|
|
2166
|
-
}(), (
|
|
2397
|
+
}(), (_descriptor15 = _applyDecoratedDescriptor(_class5.prototype, 'cardNo', [_mobx.observable], {
|
|
2167
2398
|
enumerable: true,
|
|
2168
2399
|
initializer: null
|
|
2169
|
-
}),
|
|
2400
|
+
}), _descriptor16 = _applyDecoratedDescriptor(_class5.prototype, 'balance', [_mobx.observable], {
|
|
2170
2401
|
enumerable: true,
|
|
2171
2402
|
initializer: null
|
|
2172
|
-
}),
|
|
2403
|
+
}), _descriptor17 = _applyDecoratedDescriptor(_class5.prototype, 'exchangable', [_mobx.observable], {
|
|
2173
2404
|
enumerable: true,
|
|
2174
2405
|
initializer: null
|
|
2175
|
-
}),
|
|
2406
|
+
}), _descriptor18 = _applyDecoratedDescriptor(_class5.prototype, 'meStorageCardId', [_mobx.observable], {
|
|
2176
2407
|
enumerable: true,
|
|
2177
2408
|
initializer: null
|
|
2178
|
-
}),
|
|
2409
|
+
}), _descriptor19 = _applyDecoratedDescriptor(_class5.prototype, 'storageCardNo', [_mobx.observable], {
|
|
2179
2410
|
enumerable: true,
|
|
2180
2411
|
initializer: null
|
|
2181
|
-
}), _applyDecoratedDescriptor(_class5.prototype, 'setExchangable', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setExchangable'), _class5.prototype), _applyDecoratedDescriptor(_class5.prototype, 'setCardNo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setCardNo'), _class5.prototype)
|
|
2412
|
+
}), _applyDecoratedDescriptor(_class5.prototype, 'setExchangable', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setExchangable'), _class5.prototype), _applyDecoratedDescriptor(_class5.prototype, 'setCardNo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setCardNo'), _class5.prototype)), _class5);
|
|
2182
2413
|
//# sourceMappingURL=settlementStore.js.map
|