tplus-components-touch 3.47.6 → 3.49.2
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/inventorySearch/store.js +6 -2
- package/dist/components/inventorySearch/store.js.map +1 -1
- package/dist/components/message/index.js +4 -3
- package/dist/components/message/index.js.map +1 -1
- package/dist/components/modalWraper/index.js +1 -16
- package/dist/components/modalWraper/index.js.map +1 -1
- package/dist/components/modalWraper/style.less +0 -6
- package/dist/components/settlement/asyncModal.js +1 -4
- package/dist/components/settlement/asyncModal.js.map +1 -1
- package/dist/components/settlement/settlement.js +246 -279
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +0 -3
- package/dist/components/settlement/settlementStore.js +706 -714
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/ticon/iconfont/demo_index.html +3 -3
- package/dist/components/ticon/iconfont/iconfont.css +3 -3
- package/dist/components/ticon/iconfont/iconfont.eot +0 -0
- package/dist/components/ticon/iconfont/iconfont.js +1 -2
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -1
- package/dist/components/ticon/iconfont/iconfont.svg +593 -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/touchTable/index.js +16 -21
- package/dist/components/touchTable/index.js.map +1 -1
- package/dist/index.js +3 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/settlement/settlementApi.js +0 -512
- package/dist/components/settlement/settlementApi.js.map +0 -1
@@ -227,7 +227,6 @@ var hasElectron = _mutantsMicrofx.env.platform === _mutantsMicrofx.env.constant.
|
|
227
227
|
var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_React$Component) {
|
228
228
|
(0, _inherits3.default)(Settlement, _React$Component);
|
229
229
|
|
230
|
-
// 复核结算方式快捷键列表
|
231
230
|
function Settlement(props) {
|
232
231
|
var _this3 = this;
|
233
232
|
|
@@ -268,14 +267,16 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
268
267
|
couponLight: true,
|
269
268
|
storageValue: '0.00',
|
270
269
|
czkValue: null,
|
270
|
+
isInputMember: false,
|
271
271
|
selectedRowIndex: 0,
|
272
|
-
isNotAutoFocus: true
|
272
|
+
isNotAutoFocus: true
|
273
|
+
// 复核结算方式快捷键列表
|
274
|
+
};
|
273
275
|
_this2.compoundHotkeysList = (window.$.operationControl[5] ? window.$.operationControl[5].control || [] : []).map(function (key) {
|
274
276
|
return key.toLocaleUpperCase();
|
275
277
|
});
|
276
278
|
_this2.hotkeydebounced = null;
|
277
279
|
_this2.hotkeydebouncedPayMode = "";
|
278
|
-
_this2.voucherRunningFast = false;
|
279
280
|
_this2.currentInput = null;
|
280
281
|
|
281
282
|
_this2.getIsReturn = function () {
|
@@ -389,7 +390,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
389
390
|
|
390
391
|
_promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate({ isNotAutoFocus: true, fn: function fn(data) {
|
391
392
|
return _this2.isNoProductTip(data);
|
392
|
-
}
|
393
|
+
} })).then(function (result) {
|
393
394
|
if (result) {
|
394
395
|
_this2.setState({
|
395
396
|
settleDisabled: false
|
@@ -512,7 +513,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
512
513
|
// 支持异步验证过程
|
513
514
|
_promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate({ fn: function fn(data) {
|
514
515
|
return _this2.isNoProductTip(data);
|
515
|
-
}
|
516
|
+
} })).then(function (result) {
|
516
517
|
if (result) {
|
517
518
|
_this2.setState({
|
518
519
|
settleDisabled: false
|
@@ -645,32 +646,33 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
645
646
|
|
646
647
|
_this2.showCzkModal = function () {
|
647
648
|
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(id, append) {
|
648
|
-
var returnType, _enumController$getEn2, PayStyle, memberId, memberdata1;
|
649
|
+
var _ref2, isInputMember, returnType, _enumController$getEn2, PayStyle, memberId, memberdata1;
|
649
650
|
|
650
651
|
return _regenerator2.default.wrap(function _callee$(_context) {
|
651
652
|
while (1) {
|
652
653
|
switch (_context.prev = _context.next) {
|
653
654
|
case 0:
|
655
|
+
_ref2 = _this2.state || {}, isInputMember = _ref2.isInputMember;
|
654
656
|
returnType = _this2.getNotBoriginReturn();
|
655
657
|
_enumController$getEn2 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn2.PayStyle;
|
656
658
|
|
657
659
|
_this2.store.setCurrentMode(id, PayStyle.hyczk, append);
|
658
660
|
_this2.connectRfCard();
|
659
661
|
memberId = _this2.store && _this2.store.member && _this2.store.member.ID;
|
660
|
-
_context.t0 = memberId;
|
662
|
+
_context.t0 = isInputMember && memberId;
|
661
663
|
|
662
664
|
if (!_context.t0) {
|
663
|
-
_context.next =
|
665
|
+
_context.next = 11;
|
664
666
|
break;
|
665
667
|
}
|
666
668
|
|
667
|
-
_context.next =
|
669
|
+
_context.next = 10;
|
668
670
|
return _this2.store.updateCurrentMode(memberId, returnType);
|
669
671
|
|
670
|
-
case
|
672
|
+
case 10:
|
671
673
|
_context.t0 = _context.sent;
|
672
674
|
|
673
|
-
case
|
675
|
+
case 11:
|
674
676
|
memberdata1 = _context.t0;
|
675
677
|
|
676
678
|
_this2.setState({ czkVisible: true });
|
@@ -689,7 +691,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
689
691
|
}, 300);
|
690
692
|
}
|
691
693
|
|
692
|
-
case
|
694
|
+
case 14:
|
693
695
|
case 'end':
|
694
696
|
return _context.stop();
|
695
697
|
}
|
@@ -739,57 +741,61 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
739
741
|
while (1) {
|
740
742
|
switch (_context2.prev = _context2.next) {
|
741
743
|
case 0:
|
744
|
+
_this2.setState({
|
745
|
+
isInputMember: false
|
746
|
+
});
|
742
747
|
_enumController$getEn3 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn3.PayStyle;
|
743
748
|
|
744
749
|
if (_this2.store.paymode.currentMode.storageCardNo) {
|
745
|
-
_context2.next =
|
750
|
+
_context2.next = 6;
|
746
751
|
break;
|
747
752
|
}
|
748
753
|
|
749
754
|
returnType = _this2.getNotBoriginReturn();
|
750
|
-
_context2.next =
|
755
|
+
_context2.next = 6;
|
751
756
|
return _this2.store.loadCzk(_this2.czkInput.input.value, returnType);
|
752
757
|
|
753
|
-
case
|
758
|
+
case 6:
|
754
759
|
if (_this2.store.paymode.currentMode.storageCardNo) {
|
755
|
-
_context2.next =
|
760
|
+
_context2.next = 9;
|
756
761
|
break;
|
757
762
|
}
|
758
763
|
|
759
764
|
_message2.default.error("请录入储值卡!");
|
760
765
|
return _context2.abrupt('return');
|
761
766
|
|
762
|
-
case
|
767
|
+
case 9:
|
763
768
|
if (!(0, _find3.default)(_this2.store.paymode.thePaymodes, function (mode) {
|
764
769
|
return mode.paymethodId != _this2.store.paymode.currentMode.paymethodId && mode.paymentType == PayStyle.hyczk && mode.storageCardNo == _this2.store.paymode.currentMode.storageCardNo;
|
765
770
|
})) {
|
766
|
-
_context2.next =
|
771
|
+
_context2.next = 12;
|
767
772
|
break;
|
768
773
|
}
|
769
774
|
|
770
775
|
_message2.default.error("该储值卡已使用。");
|
771
776
|
return _context2.abrupt('return');
|
772
777
|
|
773
|
-
case
|
778
|
+
case 12:
|
774
779
|
if (!(_this2.store.bquick && _this2.store.paymode.amount != _this2.store.paymode.currentMode.value)) {
|
775
|
-
_context2.next =
|
780
|
+
_context2.next = 15;
|
776
781
|
break;
|
777
782
|
}
|
778
783
|
|
779
784
|
_message2.default.error("实收金额应等于应收金额。");
|
780
785
|
return _context2.abrupt('return');
|
781
786
|
|
782
|
-
case
|
787
|
+
case 15:
|
783
788
|
|
784
789
|
_this2.setState({
|
785
790
|
czkVisible: false,
|
786
791
|
storageValue: '0.00',
|
787
792
|
czkValue: null
|
788
793
|
});
|
794
|
+
_this2.closeRfCard();
|
789
795
|
_this2.store.paymode.calcMemberBalance();
|
790
796
|
_this2.handleCzk();
|
791
797
|
|
792
|
-
case
|
798
|
+
case 19:
|
793
799
|
case 'end':
|
794
800
|
return _context2.stop();
|
795
801
|
}
|
@@ -798,7 +804,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
798
804
|
}));
|
799
805
|
|
800
806
|
_this2.handleCzkOk = function () {
|
801
|
-
var
|
807
|
+
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(e) {
|
802
808
|
var _this2$store$paymode$, walletEnabled, cardTypeEnum, freePaymentPasswordStore, isNeedPassword;
|
803
809
|
|
804
810
|
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
@@ -828,7 +834,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
828
834
|
}));
|
829
835
|
|
830
836
|
return function (_x3) {
|
831
|
-
return
|
837
|
+
return _ref4.apply(this, arguments);
|
832
838
|
};
|
833
839
|
}();
|
834
840
|
|
@@ -842,6 +848,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
842
848
|
storageValue: '0.00',
|
843
849
|
czkValue: null
|
844
850
|
});
|
851
|
+
_this2.closeRfCard();
|
845
852
|
_keyboard2.default.close();
|
846
853
|
_this2.setInventoryFocus();
|
847
854
|
};
|
@@ -853,13 +860,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
853
860
|
};
|
854
861
|
|
855
862
|
_this2.handleSetModal = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
856
|
-
var _this2$state2, newPass, newPassConfirm, updataMemberInfo, result, cardTypeEnum, resp;
|
863
|
+
var _this2$state2, newPass, newPassConfirm, isInputMember, updataMemberInfo, result, cardTypeEnum, resp;
|
857
864
|
|
858
865
|
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
859
866
|
while (1) {
|
860
867
|
switch (_context4.prev = _context4.next) {
|
861
868
|
case 0:
|
862
|
-
_this2$state2 = _this2.state, newPass = _this2$state2.newPass, newPassConfirm = _this2$state2.newPassConfirm;
|
869
|
+
_this2$state2 = _this2.state, newPass = _this2$state2.newPass, newPassConfirm = _this2$state2.newPassConfirm, isInputMember = _this2$state2.isInputMember;
|
863
870
|
updataMemberInfo = _this2.props.updataMemberInfo;
|
864
871
|
_context4.next = 4;
|
865
872
|
return _this2.store.queryPwd(newPass, newPassConfirm);
|
@@ -869,7 +876,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
869
876
|
cardTypeEnum = _this2.store.paymode.currentMode.cardTypeEnum;
|
870
877
|
|
871
878
|
if (!result) {
|
872
|
-
_context4.next =
|
879
|
+
_context4.next = 18;
|
873
880
|
break;
|
874
881
|
}
|
875
882
|
|
@@ -888,7 +895,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
888
895
|
}
|
889
896
|
}, 350);
|
890
897
|
|
891
|
-
if (!_this2.store.member.ID) {
|
898
|
+
if (!(isInputMember && _this2.store.member.ID)) {
|
892
899
|
_context4.next = 16;
|
893
900
|
break;
|
894
901
|
}
|
@@ -905,8 +912,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
905
912
|
if (cardTypeEnum === 'BALANCE_CARD') {
|
906
913
|
_this2.store.paymode.updateCardInfo();
|
907
914
|
}
|
915
|
+
_this2.setState({
|
916
|
+
isInputMember: false
|
917
|
+
});
|
908
918
|
|
909
|
-
case
|
919
|
+
case 18:
|
910
920
|
case 'end':
|
911
921
|
return _context4.stop();
|
912
922
|
}
|
@@ -915,11 +925,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
915
925
|
}));
|
916
926
|
|
917
927
|
_this2.onPressEnterCzk = function (field) {
|
918
|
-
var
|
919
|
-
|
920
|
-
newPass =
|
921
|
-
|
922
|
-
newPassConfirm =
|
928
|
+
var _ref6 = _this2.state || {},
|
929
|
+
_ref6$newPass = _ref6.newPass,
|
930
|
+
newPass = _ref6$newPass === undefined ? '' : _ref6$newPass,
|
931
|
+
_ref6$newPassConfirm = _ref6.newPassConfirm,
|
932
|
+
newPassConfirm = _ref6$newPassConfirm === undefined ? '' : _ref6$newPassConfirm;
|
923
933
|
|
924
934
|
if (field === 'newPass' && newPass.length === 6) {
|
925
935
|
_this2.inputConfirmAmount.input.focus();
|
@@ -934,11 +944,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
934
944
|
return;
|
935
945
|
}
|
936
946
|
_this2.setState((0, _defineProperty3.default)({}, field, value), function () {
|
937
|
-
var
|
938
|
-
|
939
|
-
newPass =
|
940
|
-
|
941
|
-
newPassConfirm =
|
947
|
+
var _ref7 = _this2.state || {},
|
948
|
+
_ref7$newPass = _ref7.newPass,
|
949
|
+
newPass = _ref7$newPass === undefined ? '' : _ref7$newPass,
|
950
|
+
_ref7$newPassConfirm = _ref7.newPassConfirm,
|
951
|
+
newPassConfirm = _ref7$newPassConfirm === undefined ? '' : _ref7$newPassConfirm;
|
942
952
|
|
943
953
|
if (newPassConfirm.length === 6 && newPass.length === 6 && newPass === newPassConfirm) {
|
944
954
|
_this2.setState({
|
@@ -949,15 +959,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
949
959
|
};
|
950
960
|
|
951
961
|
_this2.handleBlur = function (field) {
|
952
|
-
var
|
953
|
-
|
954
|
-
newPass =
|
955
|
-
|
956
|
-
newPassConfirm =
|
962
|
+
var _ref8 = _this2.state || {},
|
963
|
+
_ref8$newPass = _ref8.newPass,
|
964
|
+
newPass = _ref8$newPass === undefined ? '' : _ref8$newPass,
|
965
|
+
_ref8$newPassConfirm = _ref8.newPassConfirm,
|
966
|
+
newPassConfirm = _ref8$newPassConfirm === undefined ? '' : _ref8$newPassConfirm;
|
957
967
|
|
958
968
|
setTimeout(function () {
|
959
|
-
var
|
960
|
-
showSetPwdModal =
|
969
|
+
var _ref9 = _this2.state || {},
|
970
|
+
showSetPwdModal = _ref9.showSetPwdModal;
|
961
971
|
|
962
972
|
if (!showSetPwdModal) return;
|
963
973
|
if (field === 'newPass' && newPass.length < 6) {
|
@@ -1095,8 +1105,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1095
1105
|
};
|
1096
1106
|
|
1097
1107
|
_this2.checkOfflineEnable = function (paymode, key) {
|
1098
|
-
var
|
1099
|
-
paymodes =
|
1108
|
+
var _ref10 = paymode || {},
|
1109
|
+
paymodes = _ref10.paymodes;
|
1100
1110
|
|
1101
1111
|
var isOffline = _mutantsMicrofx.stores.offlineSys.isOffline;
|
1102
1112
|
|
@@ -1127,7 +1137,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1127
1137
|
paymode.currentMode = null;
|
1128
1138
|
switch (key) {
|
1129
1139
|
case PayStyle.hyczk:
|
1130
|
-
_this2.
|
1140
|
+
_this2.setState({
|
1141
|
+
isInputMember: true
|
1142
|
+
}, function () {
|
1143
|
+
_this2.showCzkModal(-1);
|
1144
|
+
});
|
1131
1145
|
break;
|
1132
1146
|
case PayStyle.jfdx:
|
1133
1147
|
_this2.showJfdxModal(-1);
|
@@ -1807,7 +1821,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1807
1821
|
};
|
1808
1822
|
|
1809
1823
|
_this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
1810
|
-
var _enumController$getEn20, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, isFull, resp1;
|
1824
|
+
var _enumController$getEn20, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, _this2$store6, getSettleGift, isFull, type, resp1;
|
1811
1825
|
|
1812
1826
|
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
1813
1827
|
while (1) {
|
@@ -1867,13 +1881,31 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1867
1881
|
}
|
1868
1882
|
};
|
1869
1883
|
|
1870
|
-
|
1871
|
-
|
1872
|
-
|
1884
|
+
_this2$store6 = _this2.store, getSettleGift = _this2$store6.getSettleGift, isFull = _this2$store6.isFull;
|
1885
|
+
type = _this2.props.type;
|
1886
|
+
resp1 = false;
|
1887
|
+
|
1888
|
+
if (!(type !== 1)) {
|
1889
|
+
_context8.next = 20;
|
1890
|
+
break;
|
1891
|
+
}
|
1892
|
+
|
1893
|
+
_context8.prev = 11;
|
1894
|
+
_context8.next = 14;
|
1895
|
+
return getSettleGift();
|
1873
1896
|
|
1874
|
-
case
|
1897
|
+
case 14:
|
1875
1898
|
resp1 = _context8.sent;
|
1899
|
+
_context8.next = 20;
|
1900
|
+
break;
|
1876
1901
|
|
1902
|
+
case 17:
|
1903
|
+
_context8.prev = 17;
|
1904
|
+
_context8.t0 = _context8['catch'](11);
|
1905
|
+
|
1906
|
+
console.log("获取支付礼包getSettleGift失败");
|
1907
|
+
|
1908
|
+
case 20:
|
1877
1909
|
|
1878
1910
|
setTimeout(function () {
|
1879
1911
|
if (window.__loadingModal) {
|
@@ -1907,67 +1939,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1907
1939
|
_this2.cancelState();
|
1908
1940
|
}, 0);
|
1909
1941
|
|
1910
|
-
case
|
1942
|
+
case 21:
|
1911
1943
|
case 'end':
|
1912
1944
|
return _context8.stop();
|
1913
1945
|
}
|
1914
1946
|
}
|
1915
|
-
}, _callee8, _this3);
|
1916
|
-
}));
|
1917
|
-
_this2.settleGiftOpenedInRunningFast = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9() {
|
1918
|
-
var resp, isCheckGift, vocherPayGift, getSettleGift, type;
|
1919
|
-
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
1920
|
-
while (1) {
|
1921
|
-
switch (_context9.prev = _context9.next) {
|
1922
|
-
case 0:
|
1923
|
-
resp = false;
|
1924
|
-
isCheckGift = true;
|
1925
|
-
|
1926
|
-
if (_this2.voucherRunningFast) {
|
1927
|
-
vocherPayGift = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('vocherPayGift');
|
1928
|
-
|
1929
|
-
if (!vocherPayGift || vocherPayGift == 'false') {
|
1930
|
-
isCheckGift = false;
|
1931
|
-
}
|
1932
|
-
}
|
1933
|
-
|
1934
|
-
if (!isCheckGift) {
|
1935
|
-
_context9.next = 16;
|
1936
|
-
break;
|
1937
|
-
}
|
1938
|
-
|
1939
|
-
getSettleGift = _this2.store.getSettleGift;
|
1940
|
-
type = _this2.props.type;
|
1941
|
-
|
1942
|
-
if (!(type != 1)) {
|
1943
|
-
_context9.next = 16;
|
1944
|
-
break;
|
1945
|
-
}
|
1946
|
-
|
1947
|
-
_context9.prev = 7;
|
1948
|
-
_context9.next = 10;
|
1949
|
-
return getSettleGift();
|
1950
|
-
|
1951
|
-
case 10:
|
1952
|
-
resp = _context9.sent;
|
1953
|
-
_context9.next = 16;
|
1954
|
-
break;
|
1955
|
-
|
1956
|
-
case 13:
|
1957
|
-
_context9.prev = 13;
|
1958
|
-
_context9.t0 = _context9['catch'](7);
|
1959
|
-
|
1960
|
-
console.log("获取支付礼包getSettleGift失败");
|
1961
|
-
|
1962
|
-
case 16:
|
1963
|
-
return _context9.abrupt('return', resp);
|
1964
|
-
|
1965
|
-
case 17:
|
1966
|
-
case 'end':
|
1967
|
-
return _context9.stop();
|
1968
|
-
}
|
1969
|
-
}
|
1970
|
-
}, _callee9, _this3, [[7, 13]]);
|
1947
|
+
}, _callee8, _this3, [[11, 17]]);
|
1971
1948
|
}));
|
1972
1949
|
|
1973
1950
|
_this2.handleGuestShow = function (dtype, value) {
|
@@ -2015,96 +1992,96 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2015
1992
|
};
|
2016
1993
|
|
2017
1994
|
_this2.handleSettle = function () {
|
2018
|
-
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
1995
|
+
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(args) {
|
2019
1996
|
var handleUserInputs = function () {
|
2020
|
-
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
1997
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(promises) {
|
2021
1998
|
var results, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, p, _result;
|
2022
1999
|
|
2023
|
-
return _regenerator2.default.wrap(function
|
2000
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
2024
2001
|
while (1) {
|
2025
|
-
switch (
|
2002
|
+
switch (_context10.prev = _context10.next) {
|
2026
2003
|
case 0:
|
2027
2004
|
results = [];
|
2028
|
-
|
2005
|
+
_context10.prev = 1;
|
2029
2006
|
_iteratorNormalCompletion = true;
|
2030
2007
|
_didIteratorError = false;
|
2031
2008
|
_iteratorError = undefined;
|
2032
|
-
|
2009
|
+
_context10.prev = 5;
|
2033
2010
|
_iterator = (0, _getIterator3.default)(promises);
|
2034
2011
|
|
2035
2012
|
case 7:
|
2036
2013
|
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
|
2037
|
-
|
2014
|
+
_context10.next = 16;
|
2038
2015
|
break;
|
2039
2016
|
}
|
2040
2017
|
|
2041
2018
|
p = _step.value;
|
2042
|
-
|
2019
|
+
_context10.next = 11;
|
2043
2020
|
return p;
|
2044
2021
|
|
2045
2022
|
case 11:
|
2046
|
-
_result =
|
2023
|
+
_result = _context10.sent;
|
2047
2024
|
|
2048
2025
|
results.push(_result);
|
2049
2026
|
|
2050
2027
|
case 13:
|
2051
2028
|
_iteratorNormalCompletion = true;
|
2052
|
-
|
2029
|
+
_context10.next = 7;
|
2053
2030
|
break;
|
2054
2031
|
|
2055
2032
|
case 16:
|
2056
|
-
|
2033
|
+
_context10.next = 22;
|
2057
2034
|
break;
|
2058
2035
|
|
2059
2036
|
case 18:
|
2060
|
-
|
2061
|
-
|
2037
|
+
_context10.prev = 18;
|
2038
|
+
_context10.t0 = _context10['catch'](5);
|
2062
2039
|
_didIteratorError = true;
|
2063
|
-
_iteratorError =
|
2040
|
+
_iteratorError = _context10.t0;
|
2064
2041
|
|
2065
2042
|
case 22:
|
2066
|
-
|
2067
|
-
|
2043
|
+
_context10.prev = 22;
|
2044
|
+
_context10.prev = 23;
|
2068
2045
|
|
2069
2046
|
if (!_iteratorNormalCompletion && _iterator.return) {
|
2070
2047
|
_iterator.return();
|
2071
2048
|
}
|
2072
2049
|
|
2073
2050
|
case 25:
|
2074
|
-
|
2051
|
+
_context10.prev = 25;
|
2075
2052
|
|
2076
2053
|
if (!_didIteratorError) {
|
2077
|
-
|
2054
|
+
_context10.next = 28;
|
2078
2055
|
break;
|
2079
2056
|
}
|
2080
2057
|
|
2081
2058
|
throw _iteratorError;
|
2082
2059
|
|
2083
2060
|
case 28:
|
2084
|
-
return
|
2061
|
+
return _context10.finish(25);
|
2085
2062
|
|
2086
2063
|
case 29:
|
2087
|
-
return
|
2064
|
+
return _context10.finish(22);
|
2088
2065
|
|
2089
2066
|
case 30:
|
2090
2067
|
window.__loadingModal = (0, _utils.openLoadingModal)();
|
2091
|
-
|
2068
|
+
_context10.next = 33;
|
2092
2069
|
return commit(results);
|
2093
2070
|
|
2094
2071
|
case 33:
|
2095
|
-
|
2072
|
+
_context10.next = 37;
|
2096
2073
|
break;
|
2097
2074
|
|
2098
2075
|
case 35:
|
2099
|
-
|
2100
|
-
|
2076
|
+
_context10.prev = 35;
|
2077
|
+
_context10.t1 = _context10['catch'](1);
|
2101
2078
|
|
2102
2079
|
case 37:
|
2103
2080
|
case 'end':
|
2104
|
-
return
|
2081
|
+
return _context10.stop();
|
2105
2082
|
}
|
2106
2083
|
}
|
2107
|
-
},
|
2084
|
+
}, _callee10, this, [[1, 35], [5, 18, 22, 30], [23,, 25, 29]]);
|
2108
2085
|
}));
|
2109
2086
|
|
2110
2087
|
return function handleUserInputs(_x6) {
|
@@ -2112,18 +2089,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2112
2089
|
};
|
2113
2090
|
}();
|
2114
2091
|
|
2115
|
-
var _enumController$getEn21, PayStyle, _this2$
|
2092
|
+
var _enumController$getEn21, PayStyle, _this2$store7, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit;
|
2116
2093
|
|
2117
|
-
return _regenerator2.default.wrap(function
|
2094
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
2118
2095
|
while (1) {
|
2119
|
-
switch (
|
2096
|
+
switch (_context11.prev = _context11.next) {
|
2120
2097
|
case 0:
|
2121
2098
|
_this2.setState({
|
2122
2099
|
settleDisabled: true
|
2123
2100
|
});
|
2124
2101
|
console.log("settlement.handleSettle开始执行,参数:", +args);
|
2125
2102
|
_enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn21.PayStyle;
|
2126
|
-
_this2$
|
2103
|
+
_this2$store7 = _this2.store, paymode = _this2$store7.paymode, brefund = _this2$store7.brefund, boriginReturn = _this2$store7.boriginReturn, newStyle = _this2$store7.newStyle;
|
2127
2104
|
isQuickPay = args === 'quickPay';
|
2128
2105
|
that = _this2;
|
2129
2106
|
status = false;
|
@@ -2138,7 +2115,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2138
2115
|
});
|
2139
2116
|
|
2140
2117
|
if (!(that.checkCharge() && Math.abs(paymode.receivable) > that.props.initData("posChangeUpperAmount"))) {
|
2141
|
-
|
2118
|
+
_context11.next = 13;
|
2142
2119
|
break;
|
2143
2120
|
}
|
2144
2121
|
|
@@ -2146,11 +2123,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2146
2123
|
_this2.setState({
|
2147
2124
|
settleDisabled: false
|
2148
2125
|
});
|
2149
|
-
return
|
2126
|
+
return _context11.abrupt('return');
|
2150
2127
|
|
2151
2128
|
case 13:
|
2152
2129
|
if (!(args !== "zero" && !newStyle)) {
|
2153
|
-
|
2130
|
+
_context11.next = 19;
|
2154
2131
|
break;
|
2155
2132
|
}
|
2156
2133
|
|
@@ -2159,7 +2136,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2159
2136
|
});
|
2160
2137
|
|
2161
2138
|
if (!zeromode) {
|
2162
|
-
|
2139
|
+
_context11.next = 19;
|
2163
2140
|
break;
|
2164
2141
|
}
|
2165
2142
|
|
@@ -2167,7 +2144,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2167
2144
|
settleDisabled: false
|
2168
2145
|
});
|
2169
2146
|
_message2.default.error(zeromode.name + ' 的结算金额为零,不可以结算。');
|
2170
|
-
return
|
2147
|
+
return _context11.abrupt('return');
|
2171
2148
|
|
2172
2149
|
case 19:
|
2173
2150
|
promises = [];
|
@@ -2176,14 +2153,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2176
2153
|
}) : paymode.thePaymodes, 'orderBy');
|
2177
2154
|
|
2178
2155
|
if (!isQuickPay) {
|
2179
|
-
|
2156
|
+
_context11.next = 27;
|
2180
2157
|
break;
|
2181
2158
|
}
|
2182
2159
|
|
2183
2160
|
quickmode = thePaymodes[0];
|
2184
2161
|
|
2185
2162
|
if (!_this2.checkModeDisabled(quickmode.paymentType, brefund, boriginReturn)) {
|
2186
|
-
|
2163
|
+
_context11.next = 27;
|
2187
2164
|
break;
|
2188
2165
|
}
|
2189
2166
|
|
@@ -2191,7 +2168,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2191
2168
|
settleDisabled: false
|
2192
2169
|
});
|
2193
2170
|
_message2.default.error('退款不能使用' + quickmode.name + '结算,请使用其他结算方式!');
|
2194
|
-
return
|
2171
|
+
return _context11.abrupt('return');
|
2195
2172
|
|
2196
2173
|
case 27:
|
2197
2174
|
(0, _forEach3.default)(thePaymodes, function (mode) {
|
@@ -2201,27 +2178,27 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2201
2178
|
});
|
2202
2179
|
|
2203
2180
|
commit = function () {
|
2204
|
-
var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
2181
|
+
var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(values) {
|
2205
2182
|
var result;
|
2206
|
-
return _regenerator2.default.wrap(function
|
2183
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
2207
2184
|
while (1) {
|
2208
|
-
switch (
|
2185
|
+
switch (_context9.prev = _context9.next) {
|
2209
2186
|
case 0:
|
2210
|
-
|
2187
|
+
_context9.next = 2;
|
2211
2188
|
return _this2.store.commit(_this2.props.bTest);
|
2212
2189
|
|
2213
2190
|
case 2:
|
2214
|
-
result =
|
2191
|
+
result = _context9.sent;
|
2215
2192
|
|
2216
2193
|
if (!(result === true)) {
|
2217
|
-
|
2194
|
+
_context9.next = 8;
|
2218
2195
|
break;
|
2219
2196
|
}
|
2220
2197
|
|
2221
2198
|
//成功
|
2222
2199
|
that.settleSuccess();
|
2223
2200
|
_promise2.default.resolve();
|
2224
|
-
|
2201
|
+
_context9.next = 23;
|
2225
2202
|
break;
|
2226
2203
|
|
2227
2204
|
case 8:
|
@@ -2238,24 +2215,24 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2238
2215
|
}, 0);
|
2239
2216
|
|
2240
2217
|
if (!(result && (result.Code || result.code))) {
|
2241
|
-
|
2218
|
+
_context9.next = 20;
|
2242
2219
|
break;
|
2243
2220
|
}
|
2244
2221
|
|
2245
|
-
|
2246
|
-
|
2222
|
+
_context9.t0 = result.Code || result.code;
|
2223
|
+
_context9.next = _context9.t0 === 'RE_Settle_UnReturn' ? 14 : _context9.t0 === 'ECONNABORTED' ? 18 : 20;
|
2247
2224
|
break;
|
2248
2225
|
|
2249
2226
|
case 14:
|
2250
2227
|
console.log('settlement--RE_Settle_UnReturn--调用清除数据==Focus==');
|
2251
2228
|
_this2.props.clearVoucherData && _this2.props.clearVoucherData();
|
2252
2229
|
_this2.cancelState();
|
2253
|
-
return
|
2230
|
+
return _context9.abrupt('break', 20);
|
2254
2231
|
|
2255
2232
|
case 18:
|
2256
2233
|
//error.code === 'ECONNABORTED' && error.message.indexOf('timeout')
|
2257
2234
|
result.message.indexOf('timeout') > -1 && that.settleUnReturn();
|
2258
|
-
return
|
2235
|
+
return _context9.abrupt('break', 20);
|
2259
2236
|
|
2260
2237
|
case 20:
|
2261
2238
|
if (isQuickPay) {
|
@@ -2263,15 +2240,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2263
2240
|
that.cancelState();
|
2264
2241
|
}
|
2265
2242
|
|
2266
|
-
|
2243
|
+
_context9.next = 23;
|
2267
2244
|
return _promise2.default.reject();
|
2268
2245
|
|
2269
2246
|
case 23:
|
2270
2247
|
case 'end':
|
2271
|
-
return
|
2248
|
+
return _context9.stop();
|
2272
2249
|
}
|
2273
2250
|
}
|
2274
|
-
},
|
2251
|
+
}, _callee9, _this3);
|
2275
2252
|
}));
|
2276
2253
|
|
2277
2254
|
return function commit(_x5) {
|
@@ -2283,10 +2260,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2283
2260
|
|
2284
2261
|
case 30:
|
2285
2262
|
case 'end':
|
2286
|
-
return
|
2263
|
+
return _context11.stop();
|
2287
2264
|
}
|
2288
2265
|
}
|
2289
|
-
},
|
2266
|
+
}, _callee11, _this3);
|
2290
2267
|
}));
|
2291
2268
|
|
2292
2269
|
return function (_x4) {
|
@@ -2294,91 +2271,91 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2294
2271
|
};
|
2295
2272
|
}();
|
2296
2273
|
|
2297
|
-
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
2274
|
+
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
|
2298
2275
|
var handleUserInputs = function () {
|
2299
|
-
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
2276
|
+
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(promises) {
|
2300
2277
|
var results, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, p, _result2;
|
2301
2278
|
|
2302
|
-
return _regenerator2.default.wrap(function
|
2279
|
+
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
2303
2280
|
while (1) {
|
2304
|
-
switch (
|
2281
|
+
switch (_context13.prev = _context13.next) {
|
2305
2282
|
case 0:
|
2306
2283
|
results = [];
|
2307
|
-
|
2284
|
+
_context13.prev = 1;
|
2308
2285
|
_iteratorNormalCompletion2 = true;
|
2309
2286
|
_didIteratorError2 = false;
|
2310
2287
|
_iteratorError2 = undefined;
|
2311
|
-
|
2288
|
+
_context13.prev = 5;
|
2312
2289
|
_iterator2 = (0, _getIterator3.default)(promises);
|
2313
2290
|
|
2314
2291
|
case 7:
|
2315
2292
|
if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {
|
2316
|
-
|
2293
|
+
_context13.next = 16;
|
2317
2294
|
break;
|
2318
2295
|
}
|
2319
2296
|
|
2320
2297
|
p = _step2.value;
|
2321
|
-
|
2298
|
+
_context13.next = 11;
|
2322
2299
|
return p;
|
2323
2300
|
|
2324
2301
|
case 11:
|
2325
|
-
_result2 =
|
2302
|
+
_result2 = _context13.sent;
|
2326
2303
|
|
2327
2304
|
results.push(_result2);
|
2328
2305
|
|
2329
2306
|
case 13:
|
2330
2307
|
_iteratorNormalCompletion2 = true;
|
2331
|
-
|
2308
|
+
_context13.next = 7;
|
2332
2309
|
break;
|
2333
2310
|
|
2334
2311
|
case 16:
|
2335
|
-
|
2312
|
+
_context13.next = 22;
|
2336
2313
|
break;
|
2337
2314
|
|
2338
2315
|
case 18:
|
2339
|
-
|
2340
|
-
|
2316
|
+
_context13.prev = 18;
|
2317
|
+
_context13.t0 = _context13['catch'](5);
|
2341
2318
|
_didIteratorError2 = true;
|
2342
|
-
_iteratorError2 =
|
2319
|
+
_iteratorError2 = _context13.t0;
|
2343
2320
|
|
2344
2321
|
case 22:
|
2345
|
-
|
2346
|
-
|
2322
|
+
_context13.prev = 22;
|
2323
|
+
_context13.prev = 23;
|
2347
2324
|
|
2348
2325
|
if (!_iteratorNormalCompletion2 && _iterator2.return) {
|
2349
2326
|
_iterator2.return();
|
2350
2327
|
}
|
2351
2328
|
|
2352
2329
|
case 25:
|
2353
|
-
|
2330
|
+
_context13.prev = 25;
|
2354
2331
|
|
2355
2332
|
if (!_didIteratorError2) {
|
2356
|
-
|
2333
|
+
_context13.next = 28;
|
2357
2334
|
break;
|
2358
2335
|
}
|
2359
2336
|
|
2360
2337
|
throw _iteratorError2;
|
2361
2338
|
|
2362
2339
|
case 28:
|
2363
|
-
return
|
2340
|
+
return _context13.finish(25);
|
2364
2341
|
|
2365
2342
|
case 29:
|
2366
|
-
return
|
2343
|
+
return _context13.finish(22);
|
2367
2344
|
|
2368
2345
|
case 30:
|
2369
|
-
|
2346
|
+
_context13.next = 32;
|
2370
2347
|
return commit(results);
|
2371
2348
|
|
2372
2349
|
case 32:
|
2373
|
-
|
2350
|
+
_context13.next = 37;
|
2374
2351
|
break;
|
2375
2352
|
|
2376
2353
|
case 34:
|
2377
|
-
|
2378
|
-
|
2354
|
+
_context13.prev = 34;
|
2355
|
+
_context13.t1 = _context13['catch'](1);
|
2379
2356
|
|
2380
|
-
if (
|
2381
|
-
_message2.default.error(
|
2357
|
+
if (_context13.t1 != "cancelpwd") {
|
2358
|
+
_message2.default.error(_context13.t1);
|
2382
2359
|
setTimeout(function () {
|
2383
2360
|
that.handleCzk();
|
2384
2361
|
}, 500);
|
@@ -2386,10 +2363,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2386
2363
|
|
2387
2364
|
case 37:
|
2388
2365
|
case 'end':
|
2389
|
-
return
|
2366
|
+
return _context13.stop();
|
2390
2367
|
}
|
2391
2368
|
}
|
2392
|
-
},
|
2369
|
+
}, _callee13, this, [[1, 34], [5, 18, 22, 30], [23,, 25, 29]]);
|
2393
2370
|
}));
|
2394
2371
|
|
2395
2372
|
return function handleUserInputs(_x8) {
|
@@ -2399,9 +2376,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2399
2376
|
|
2400
2377
|
var that, curmode, promises, _enumController$getEn22, PayStyle, commit;
|
2401
2378
|
|
2402
|
-
return _regenerator2.default.wrap(function
|
2379
|
+
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
2403
2380
|
while (1) {
|
2404
|
-
switch (
|
2381
|
+
switch (_context14.prev = _context14.next) {
|
2405
2382
|
case 0:
|
2406
2383
|
that = _this2;
|
2407
2384
|
curmode = _this2.store.paymode.currentMode;
|
@@ -2420,33 +2397,33 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2420
2397
|
}
|
2421
2398
|
|
2422
2399
|
commit = function () {
|
2423
|
-
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
2400
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(values) {
|
2424
2401
|
var result;
|
2425
|
-
return _regenerator2.default.wrap(function
|
2402
|
+
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
2426
2403
|
while (1) {
|
2427
|
-
switch (
|
2404
|
+
switch (_context12.prev = _context12.next) {
|
2428
2405
|
case 0:
|
2429
2406
|
if (!(values.length > 0)) {
|
2430
|
-
|
2407
|
+
_context12.next = 6;
|
2431
2408
|
break;
|
2432
2409
|
}
|
2433
2410
|
|
2434
|
-
|
2411
|
+
_context12.next = 3;
|
2435
2412
|
return that.store.validePwd(values[0]);
|
2436
2413
|
|
2437
2414
|
case 3:
|
2438
|
-
|
2439
|
-
|
2415
|
+
_context12.t0 = _context12.sent;
|
2416
|
+
_context12.next = 7;
|
2440
2417
|
break;
|
2441
2418
|
|
2442
2419
|
case 6:
|
2443
|
-
|
2420
|
+
_context12.t0 = "";
|
2444
2421
|
|
2445
2422
|
case 7:
|
2446
|
-
result =
|
2423
|
+
result = _context12.t0;
|
2447
2424
|
|
2448
2425
|
if (!(result == "")) {
|
2449
|
-
|
2426
|
+
_context12.next = 13;
|
2450
2427
|
break;
|
2451
2428
|
}
|
2452
2429
|
|
@@ -2454,19 +2431,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2454
2431
|
//返回
|
2455
2432
|
that.setCurrentFocusAndAddPay(curmode.paymentType, null, curmode.paymethodId);
|
2456
2433
|
_promise2.default.resolve();
|
2457
|
-
|
2434
|
+
_context12.next = 15;
|
2458
2435
|
break;
|
2459
2436
|
|
2460
2437
|
case 13:
|
2461
|
-
|
2438
|
+
_context12.next = 15;
|
2462
2439
|
return _promise2.default.reject(result);
|
2463
2440
|
|
2464
2441
|
case 15:
|
2465
2442
|
case 'end':
|
2466
|
-
return
|
2443
|
+
return _context12.stop();
|
2467
2444
|
}
|
2468
2445
|
}
|
2469
|
-
},
|
2446
|
+
}, _callee12, _this3);
|
2470
2447
|
}));
|
2471
2448
|
|
2472
2449
|
return function commit(_x7) {
|
@@ -2478,10 +2455,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2478
2455
|
|
2479
2456
|
case 6:
|
2480
2457
|
case 'end':
|
2481
|
-
return
|
2458
|
+
return _context14.stop();
|
2482
2459
|
}
|
2483
2460
|
}
|
2484
|
-
},
|
2461
|
+
}, _callee14, _this3);
|
2485
2462
|
}));
|
2486
2463
|
|
2487
2464
|
_this2.fKeyboardOnOk = function (paymethodeId) {
|
@@ -2521,15 +2498,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2521
2498
|
};
|
2522
2499
|
|
2523
2500
|
_this2.inputPwd = function () {
|
2524
|
-
var _ref21 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
2501
|
+
var _ref21 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(paymode) {
|
2525
2502
|
var that, confirmPwd;
|
2526
|
-
return _regenerator2.default.wrap(function
|
2503
|
+
return _regenerator2.default.wrap(function _callee15$(_context15) {
|
2527
2504
|
while (1) {
|
2528
|
-
switch (
|
2505
|
+
switch (_context15.prev = _context15.next) {
|
2529
2506
|
case 0:
|
2530
2507
|
that = _this2;
|
2531
2508
|
confirmPwd = _this2.state.confirmPwd;
|
2532
|
-
return
|
2509
|
+
return _context15.abrupt('return', new _promise2.default(function (resolve, reject) {
|
2533
2510
|
var modal = (0, _asyncModal2.default)({
|
2534
2511
|
onPressEnter: function onPressEnter() {
|
2535
2512
|
_keyboard2.default.close();
|
@@ -2664,10 +2641,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2664
2641
|
|
2665
2642
|
case 3:
|
2666
2643
|
case 'end':
|
2667
|
-
return
|
2644
|
+
return _context15.stop();
|
2668
2645
|
}
|
2669
2646
|
}
|
2670
|
-
},
|
2647
|
+
}, _callee15, _this3);
|
2671
2648
|
}));
|
2672
2649
|
|
2673
2650
|
return function (_x9) {
|
@@ -2676,12 +2653,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2676
2653
|
}();
|
2677
2654
|
|
2678
2655
|
_this2.btnDebounced = function () {
|
2679
|
-
var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
2680
|
-
var IdbusiType, CustomerPhone, DistributionMode, Address, isEnableSerialNumber, resultObj, title,
|
2656
|
+
var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(type, bquick) {
|
2657
|
+
var IdbusiType, CustomerPhone, DistributionMode, Address, isEnableSerialNumber, resultObj, title, _enumController$getEn23, PayStyle, _this2$store8, paymode, brefund, boriginReturn, newStyle, status;
|
2681
2658
|
|
2682
|
-
return _regenerator2.default.wrap(function
|
2659
|
+
return _regenerator2.default.wrap(function _callee16$(_context16) {
|
2683
2660
|
while (1) {
|
2684
|
-
switch (
|
2661
|
+
switch (_context16.prev = _context16.next) {
|
2685
2662
|
case 0:
|
2686
2663
|
IdbusiType = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.IdbusiType;
|
2687
2664
|
CustomerPhone = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.CustomerPhone;
|
@@ -2690,7 +2667,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2690
2667
|
//预订时,若没录入买家手机号,或配送方式为快递时,弹框买家信息确认框
|
2691
2668
|
|
2692
2669
|
if (!(IdbusiType == 38)) {
|
2693
|
-
|
2670
|
+
_context16.next = 14;
|
2694
2671
|
break;
|
2695
2672
|
}
|
2696
2673
|
|
@@ -2701,11 +2678,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2701
2678
|
});
|
2702
2679
|
|
2703
2680
|
if (!(isEnableSerialNumber && resultObj && (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE'))) {
|
2704
|
-
|
2681
|
+
_context16.next = 9;
|
2705
2682
|
break;
|
2706
2683
|
}
|
2707
2684
|
|
2708
|
-
return
|
2685
|
+
return _context16.abrupt('return', _message2.default.error('启用了序列号管理和批号/有效期管理的商品,不支持快递和同城配送'));
|
2709
2686
|
|
2710
2687
|
case 9:
|
2711
2688
|
|
@@ -2714,48 +2691,31 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2714
2691
|
}
|
2715
2692
|
|
2716
2693
|
if (!(!CustomerPhone && !_this2.context.viewModel.data.Member.Mobilephone || DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE')) {
|
2717
|
-
|
2694
|
+
_context16.next = 14;
|
2718
2695
|
break;
|
2719
2696
|
}
|
2720
2697
|
|
2721
2698
|
title = (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && Address ? '收货地址确认' : '收货人';
|
2722
|
-
|
2699
|
+
_context16.next = 14;
|
2723
2700
|
return _this2.props.openBuyerModal(title);
|
2724
2701
|
|
2725
2702
|
case 14:
|
2726
2703
|
|
2727
|
-
// 极速模式错误校验
|
2728
|
-
|
2729
|
-
productStore = _mutantsMicrofx.stores.productStore;
|
2730
|
-
_context17.next = 17;
|
2731
|
-
return productStore.checkShouldSettlement();
|
2732
|
-
|
2733
|
-
case 17:
|
2734
|
-
checkResult = _context17.sent;
|
2735
|
-
|
2736
|
-
if (checkResult) {
|
2737
|
-
_context17.next = 20;
|
2738
|
-
break;
|
2739
|
-
}
|
2740
|
-
|
2741
|
-
return _context17.abrupt('return', false);
|
2742
|
-
|
2743
|
-
case 20:
|
2744
|
-
|
2745
2704
|
_this2.setState({
|
2746
|
-
bquick: bquick
|
2705
|
+
bquick: bquick,
|
2706
|
+
isInputMember: true
|
2747
2707
|
});
|
2748
2708
|
_enumController$getEn23 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn23.PayStyle;
|
2749
|
-
_this2$
|
2709
|
+
_this2$store8 = _this2.store, paymode = _this2$store8.paymode, brefund = _this2$store8.brefund, boriginReturn = _this2$store8.boriginReturn, newStyle = _this2$store8.newStyle;
|
2750
2710
|
|
2751
2711
|
if (!(bquick && !_mutantsMicrofx.stores.offlineSys.shouldSettlement(type))) {
|
2752
|
-
|
2712
|
+
_context16.next = 19;
|
2753
2713
|
break;
|
2754
2714
|
}
|
2755
2715
|
|
2756
|
-
return
|
2716
|
+
return _context16.abrupt('return', false);
|
2757
2717
|
|
2758
|
-
case
|
2718
|
+
case 19:
|
2759
2719
|
status = false;
|
2760
2720
|
|
2761
2721
|
paymode.thePaymodes.forEach(function (v) {
|
@@ -2768,13 +2728,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2768
2728
|
});
|
2769
2729
|
|
2770
2730
|
if (!_this2.btndebounced) {
|
2771
|
-
|
2731
|
+
_context16.next = 24;
|
2772
2732
|
break;
|
2773
2733
|
}
|
2774
2734
|
|
2775
|
-
return
|
2735
|
+
return _context16.abrupt('return');
|
2776
2736
|
|
2777
|
-
case
|
2737
|
+
case 24:
|
2778
2738
|
_this2.btndebounced = (0, _debounce3.default)(function () {
|
2779
2739
|
if (bquick) {
|
2780
2740
|
_this2.quickSettle(type);
|
@@ -2791,12 +2751,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2791
2751
|
_this2.btndebounced = null;
|
2792
2752
|
}, 2000);
|
2793
2753
|
|
2794
|
-
case
|
2754
|
+
case 27:
|
2795
2755
|
case 'end':
|
2796
|
-
return
|
2756
|
+
return _context16.stop();
|
2797
2757
|
}
|
2798
2758
|
}
|
2799
|
-
},
|
2759
|
+
}, _callee16, _this3);
|
2800
2760
|
}));
|
2801
2761
|
|
2802
2762
|
return function (_x10, _x11) {
|
@@ -3229,9 +3189,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3229
3189
|
};
|
3230
3190
|
|
3231
3191
|
_this2.checkCurrentModeHaveMutex = function (type) {
|
3232
|
-
var _this2$
|
3233
|
-
paymode = _this2$
|
3234
|
-
newStyle = _this2$
|
3192
|
+
var _this2$store9 = _this2.store,
|
3193
|
+
paymode = _this2$store9.paymode,
|
3194
|
+
newStyle = _this2$store9.newStyle;
|
3235
3195
|
|
3236
3196
|
var _enumController$getEn28 = _mutantsUtil.enumController.getEnumOj(),
|
3237
3197
|
PayStyle = _enumController$getEn28.PayStyle;
|
@@ -3432,7 +3392,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3432
3392
|
_this2.setTimer = null;
|
3433
3393
|
_this2.keypressStime = null;
|
3434
3394
|
_this2.store = !(props.type == 1) ? _mutantsMicrofx.stores.settlementVoucherStore : _mutantsMicrofx.stores.settlementMemberStore;
|
3435
|
-
_this2.voucherRunningFast = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('vocherRunningFast') == '1';
|
3436
3395
|
return _this2;
|
3437
3396
|
}
|
3438
3397
|
|
@@ -3529,6 +3488,16 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3529
3488
|
}
|
3530
3489
|
}
|
3531
3490
|
|
3491
|
+
//IC卡关闭
|
3492
|
+
|
3493
|
+
}, {
|
3494
|
+
key: 'closeRfCard',
|
3495
|
+
value: function closeRfCard() {
|
3496
|
+
if (this.hasElectron === true && this.iCCardServer === 1) {
|
3497
|
+
_mutantsMicrofx.nativeMs.setIpcRendererMethod('CloseRfCard');
|
3498
|
+
}
|
3499
|
+
}
|
3500
|
+
|
3532
3501
|
//czk
|
3533
3502
|
|
3534
3503
|
|
@@ -3562,8 +3531,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3562
3531
|
* @param {*} symbol 从当前currenIndex开始 还是从当前currenIndex截止
|
3563
3532
|
*/
|
3564
3533
|
|
3565
|
-
// 极速模式下是否开启了支付有礼功能
|
3566
|
-
|
3567
3534
|
// 处理客显显示功能
|
3568
3535
|
|
3569
3536
|
|
@@ -4040,7 +4007,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4040
4007
|
onClose: this.handleCancel,
|
4041
4008
|
visible: this.state.visible,
|
4042
4009
|
destroyOnClose: true,
|
4043
|
-
className: 'settlement-wraper
|
4010
|
+
className: 'settlement-wraper',
|
4044
4011
|
style: { 'zIndex': 1006 }
|
4045
4012
|
},
|
4046
4013
|
_react2.default.createElement(
|
@@ -4311,7 +4278,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4311
4278
|
onClose: this.handleCancel,
|
4312
4279
|
visible: this.state.visible,
|
4313
4280
|
destroyOnClose: true,
|
4314
|
-
className: 'settlement-wraper
|
4281
|
+
className: 'settlement-wraper',
|
4315
4282
|
style: { 'zIndex': 1006 }
|
4316
4283
|
},
|
4317
4284
|
_react2.default.createElement(
|
@@ -4621,7 +4588,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4621
4588
|
_react2.default.createElement(
|
4622
4589
|
_modal2.default,
|
4623
4590
|
{
|
4624
|
-
wrapClassName: 'czk ' + (this.
|
4591
|
+
wrapClassName: 'czk ' + (this.isHorizontalPad ? 'extraHeight' : ''),
|
4625
4592
|
width: '400px',
|
4626
4593
|
visible: this.state.czkVisible,
|
4627
4594
|
maskClosable: false,
|
@@ -4733,22 +4700,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4733
4700
|
return _this8.czkInput = input;
|
4734
4701
|
},
|
4735
4702
|
onKeyDown: function () {
|
4736
|
-
var _ref30 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
4703
|
+
var _ref30 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee17(e) {
|
4737
4704
|
var time, _paymode;
|
4738
4705
|
|
4739
|
-
return _regenerator2.default.wrap(function
|
4706
|
+
return _regenerator2.default.wrap(function _callee17$(_context17) {
|
4740
4707
|
while (1) {
|
4741
|
-
switch (
|
4708
|
+
switch (_context17.prev = _context17.next) {
|
4742
4709
|
case 0:
|
4743
4710
|
if (!(e.keyCode == 13)) {
|
4744
|
-
|
4711
|
+
_context17.next = 14;
|
4745
4712
|
break;
|
4746
4713
|
}
|
4747
4714
|
|
4748
4715
|
time = Date.parse(new Date());
|
4749
4716
|
|
4750
4717
|
if (!(_this8.isStorageCardInputType && time - _this8.keypressStime > 350)) {
|
4751
|
-
|
4718
|
+
_context17.next = 7;
|
4752
4719
|
break;
|
4753
4720
|
}
|
4754
4721
|
|
@@ -4757,11 +4724,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4757
4724
|
_this8.setState({
|
4758
4725
|
czkValue: null
|
4759
4726
|
});
|
4760
|
-
return
|
4727
|
+
return _context17.abrupt('return');
|
4761
4728
|
|
4762
4729
|
case 7:
|
4763
4730
|
_this8.keypressStime = null;
|
4764
|
-
|
4731
|
+
_context17.next = 10;
|
4765
4732
|
return _this8.loadCzk(e.target.value);
|
4766
4733
|
|
4767
4734
|
case 10:
|
@@ -4772,7 +4739,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4772
4739
|
czkvalue: null
|
4773
4740
|
});
|
4774
4741
|
}
|
4775
|
-
|
4742
|
+
_context17.next = 15;
|
4776
4743
|
break;
|
4777
4744
|
|
4778
4745
|
case 14:
|
@@ -4782,10 +4749,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4782
4749
|
|
4783
4750
|
case 15:
|
4784
4751
|
case 'end':
|
4785
|
-
return
|
4752
|
+
return _context17.stop();
|
4786
4753
|
}
|
4787
4754
|
}
|
4788
|
-
},
|
4755
|
+
}, _callee17, _this8);
|
4789
4756
|
}));
|
4790
4757
|
|
4791
4758
|
return function (_x13) {
|
@@ -4899,7 +4866,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4899
4866
|
_react2.default.createElement(
|
4900
4867
|
_modal2.default,
|
4901
4868
|
{
|
4902
|
-
wrapClassName: _index.hotKey.hotKeyBindClass('5', 'moreCzkModal') + ' ' + (this.
|
4869
|
+
wrapClassName: _index.hotKey.hotKeyBindClass('5', 'moreCzkModal') + ' ' + (this.isHorizontalPad ? 'extraHeight' : ''),
|
4903
4870
|
width: '400px',
|
4904
4871
|
visible: this.state.moreCzkVisible,
|
4905
4872
|
maskClosable: false,
|
@@ -4941,7 +4908,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4941
4908
|
_react2.default.createElement(
|
4942
4909
|
_modal2.default,
|
4943
4910
|
(0, _defineProperty3.default)({
|
4944
|
-
wrapClassName: 'djq ' + (this.
|
4911
|
+
wrapClassName: 'djq ' + (this.isHorizontalPad ? 'extraHeight' : '') + ' passwordContainer',
|
4945
4912
|
width: '400px',
|
4946
4913
|
visible: this.state.showSetPwdModal,
|
4947
4914
|
backdropClosable: false,
|
@@ -5038,7 +5005,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
5038
5005
|
_react2.default.createElement(
|
5039
5006
|
_modal2.default,
|
5040
5007
|
{
|
5041
|
-
wrapClassName: 'djq ' + (this.
|
5008
|
+
wrapClassName: 'djq ' + (this.isHorizontalPad ? 'extraHeight' : ''),
|
5042
5009
|
width: '810px',
|
5043
5010
|
visible: this.state.djqVisible,
|
5044
5011
|
maskClosable: false,
|
@@ -5362,7 +5329,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
5362
5329
|
_react2.default.createElement(
|
5363
5330
|
_modal2.default,
|
5364
5331
|
{
|
5365
|
-
wrapClassName: 'czk ' + (this.
|
5332
|
+
wrapClassName: 'czk ' + (this.isHorizontalPad ? 'extraHeight' : ''),
|
5366
5333
|
width: '420px',
|
5367
5334
|
visible: this.state.jfdxVisible,
|
5368
5335
|
maskClosable: false,
|