tplus-components-touch 3.54.6 → 3.55.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/hotKey/localConfig.js +0 -39
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/settlement/settlement.js +651 -663
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +0 -27
- package/dist/components/settlement/settlementApi.js +2 -2
- package/dist/components/settlement/settlementApi.js.map +1 -1
- package/dist/components/settlement/settlementStore.js +395 -578
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/ticon/iconfont/demo_index.html +3 -72
- package/dist/components/ticon/iconfont/iconfont.css +3 -15
- package/dist/components/ticon/iconfont/iconfont.js +1 -1
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -1
- package/dist/components/ticon/iconfont/iconfont.json +0 -21
- 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/index.js +1 -22
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/collection/api.js +0 -105
- package/dist/components/collection/api.js.map +0 -1
- package/dist/components/collection/index.js +0 -484
- package/dist/components/collection/index.js.map +0 -1
- package/dist/components/collection/searchView/index.js +0 -296
- package/dist/components/collection/searchView/index.js.map +0 -1
- package/dist/components/collection/searchView/index.less +0 -134
- package/dist/components/password/ModifyPass.js +0 -426
- package/dist/components/password/ModifyPass.js.map +0 -1
- package/dist/components/password/api.js +0 -100
- package/dist/components/password/api.js.map +0 -1
- package/dist/components/password/confirmPwd.js +0 -212
- package/dist/components/password/confirmPwd.js.map +0 -1
- package/dist/components/password/store.js +0 -282
- package/dist/components/password/store.js.map +0 -1
- package/dist/components/password/style.less +0 -95
@@ -36,10 +36,6 @@ var _button = require('antd/es/button');
|
|
36
36
|
|
37
37
|
var _button2 = _interopRequireDefault(_button);
|
38
38
|
|
39
|
-
var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
|
40
|
-
|
41
|
-
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
|
42
|
-
|
43
39
|
var _getIterator2 = require('babel-runtime/core-js/get-iterator');
|
44
40
|
|
45
41
|
var _getIterator3 = _interopRequireDefault(_getIterator2);
|
@@ -52,6 +48,10 @@ var _toConsumableArray2 = require('babel-runtime/helpers/toConsumableArray');
|
|
52
48
|
|
53
49
|
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
|
54
50
|
|
51
|
+
var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
|
52
|
+
|
53
|
+
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
|
54
|
+
|
55
55
|
var _regenerator = require('babel-runtime/regenerator');
|
56
56
|
|
57
57
|
var _regenerator2 = _interopRequireDefault(_regenerator);
|
@@ -182,6 +182,10 @@ var _numKeyboardScan = require('../keyboard/numKeyboardScan');
|
|
182
182
|
|
183
183
|
var _numKeyboardScan2 = _interopRequireDefault(_numKeyboardScan);
|
184
184
|
|
185
|
+
var _numkeyboardPassword = require('../keyboard/numkeyboardPassword');
|
186
|
+
|
187
|
+
var _numkeyboardPassword2 = _interopRequireDefault(_numkeyboardPassword);
|
188
|
+
|
185
189
|
var _ticon = require('../ticon');
|
186
190
|
|
187
191
|
var _ticon2 = _interopRequireDefault(_ticon);
|
@@ -216,14 +220,6 @@ var _moreCzkTable = require('./moreCzkTable');
|
|
216
220
|
|
217
221
|
var _moreCzkTable2 = _interopRequireDefault(_moreCzkTable);
|
218
222
|
|
219
|
-
var _ModifyPass = require('../password/ModifyPass');
|
220
|
-
|
221
|
-
var _ModifyPass2 = _interopRequireDefault(_ModifyPass);
|
222
|
-
|
223
|
-
var _confirmPwd = require('../password/confirmPwd');
|
224
|
-
|
225
|
-
var _confirmPwd2 = _interopRequireDefault(_confirmPwd);
|
226
|
-
|
227
223
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
228
224
|
|
229
225
|
var hasElectron = _mutantsMicrofx.env.platform === _mutantsMicrofx.env.constant.platform.electron;
|
@@ -273,10 +269,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
273
269
|
storageValue: '0.00',
|
274
270
|
czkValue: null,
|
275
271
|
selectedRowIndex: 0,
|
276
|
-
isNotAutoFocus: true
|
277
|
-
returnAmount: 0, // 赊销退款金额
|
278
|
-
confirmStatus: false //确认密码弹框
|
279
|
-
};
|
272
|
+
isNotAutoFocus: true };
|
280
273
|
_this2.compoundHotkeysList = (window.$.operationControl[5] ? window.$.operationControl[5].control || [] : []).map(function (key) {
|
281
274
|
return key.toLocaleUpperCase();
|
282
275
|
});
|
@@ -359,30 +352,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
359
352
|
};
|
360
353
|
|
361
354
|
_this2.payQuick = function () {
|
362
|
-
var
|
363
|
-
currentKey = _this2$state.currentKey,
|
364
|
-
returnAmount = _this2$state.returnAmount;
|
355
|
+
var currentKey = _this2.state.currentKey;
|
365
356
|
|
366
357
|
var _enumController$getEn = _mutantsUtil.enumController.getEnumOj(),
|
367
358
|
PayStyle = _enumController$getEn.PayStyle;
|
368
359
|
|
369
|
-
|
370
|
-
if (_this2.props.type != 1) {
|
371
|
-
var IdbusiType = _this2.context.viewModel.data.IdbusiType;
|
372
|
-
|
373
|
-
if (IdbusiType === 42) newAmount = -returnAmount;
|
374
|
-
}
|
375
|
-
_this2.store.init({
|
376
|
-
context: _this2.props.type == 1 ? null : _this2.context,
|
377
|
-
amounthandler: _this2.props.onHandleAmount,
|
378
|
-
datasource: _this2.props.dataSource.Code_02,
|
379
|
-
storeinfo: _this2.props.storeInfo,
|
380
|
-
bquick: true,
|
381
|
-
amount: newAmount,
|
382
|
-
type: _this2.props.type,
|
383
|
-
data: _this2.props.dto,
|
384
|
-
payModeKey: currentKey
|
385
|
-
});
|
360
|
+
_this2.store.init(_this2.props.type == 1 ? null : _this2.context, _this2.props.onHandleAmount, _this2.props.dataSource.Code_02, _this2.props.storeInfo, true, _this2.props.amount, _this2.props.type, _this2.props.dto, currentKey);
|
386
361
|
var amount = _this2.store.paymode.amount;
|
387
362
|
if (amount == 0) {
|
388
363
|
_this2.settleZero();
|
@@ -419,7 +394,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
419
394
|
_this2.setState({
|
420
395
|
settleDisabled: false
|
421
396
|
});
|
422
|
-
if (
|
397
|
+
if (type !== 1) {
|
423
398
|
var count = _this2.handleShowPrototype();
|
424
399
|
if (!isReturn && isAutoShowCouponWhenCash && count > 0) {
|
425
400
|
_this2.setState({
|
@@ -443,26 +418,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
443
418
|
};
|
444
419
|
|
445
420
|
_this2.payFun = function () {
|
446
|
-
|
447
|
-
|
448
|
-
var newAmount = _this2.props.amount;
|
449
|
-
if (_this2.props.type != 1) {
|
450
|
-
var IdbusiType = _this2.context.viewModel.data.IdbusiType;
|
451
|
-
|
452
|
-
if (IdbusiType === 42) newAmount = -returnAmount;
|
453
|
-
}
|
454
|
-
_this2.store.init({
|
455
|
-
context: _this2.props.type == 1 ? null : _this2.context,
|
456
|
-
amounthandler: _this2.props.onHandleAmount,
|
457
|
-
datasource: _this2.props.dataSource.Code_02,
|
458
|
-
storeinfo: _this2.props.storeInfo,
|
459
|
-
bquick: false,
|
460
|
-
amount: newAmount,
|
461
|
-
type: _this2.props.type,
|
462
|
-
data: _this2.props.dto,
|
463
|
-
creditSalesVoucher: _this2.props.creditSalesVoucher,
|
464
|
-
custVendorId: _this2.props.custVendorId
|
465
|
-
});
|
421
|
+
_this2.store.init(_this2.props.type == 1 ? null : _this2.context, _this2.props.onHandleAmount, _this2.props.dataSource.Code_02, _this2.props.storeInfo, false, _this2.props.amount, _this2.props.type, _this2.props.dto);
|
466
422
|
var amount = _this2.store.paymode.amount;
|
467
423
|
if (amount == 0) {
|
468
424
|
_this2.settleZero();
|
@@ -561,7 +517,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
561
517
|
_this2.setState({
|
562
518
|
settleDisabled: false
|
563
519
|
});
|
564
|
-
if (
|
520
|
+
if (type !== 1) {
|
565
521
|
var count = _this2.handleShowPrototype();
|
566
522
|
if (!isReturn && isAutoShowCouponWhenCash && count > 0) {
|
567
523
|
_this2.setState({
|
@@ -763,9 +719,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
763
719
|
};
|
764
720
|
|
765
721
|
_this2.handleMoreCzkOk = function () {
|
766
|
-
var _this2$
|
767
|
-
memberdata1 = _this2$
|
768
|
-
selectedRowIndex = _this2$
|
722
|
+
var _this2$state = _this2.state,
|
723
|
+
memberdata1 = _this2$state.memberdata1,
|
724
|
+
selectedRowIndex = _this2$state.selectedRowIndex;
|
769
725
|
|
770
726
|
_this2.store.paymode.updateCardInfo(memberdata1[selectedRowIndex]);
|
771
727
|
_this2.handleCzkMoreData();
|
@@ -897,99 +853,73 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
897
853
|
};
|
898
854
|
|
899
855
|
_this2.handleSetModal = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
856
|
+
var _this2$state2, newPass, newPassConfirm, updataMemberInfo, result, cardTypeEnum, resp;
|
857
|
+
|
900
858
|
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
901
859
|
while (1) {
|
902
860
|
switch (_context4.prev = _context4.next) {
|
903
861
|
case 0:
|
904
|
-
|
862
|
+
_this2$state2 = _this2.state, newPass = _this2$state2.newPass, newPassConfirm = _this2$state2.newPassConfirm;
|
863
|
+
updataMemberInfo = _this2.props.updataMemberInfo;
|
864
|
+
_context4.next = 4;
|
865
|
+
return _this2.store.queryPwd(newPass, newPassConfirm);
|
866
|
+
|
867
|
+
case 4:
|
868
|
+
result = _context4.sent;
|
869
|
+
cardTypeEnum = _this2.store.paymode.currentMode.cardTypeEnum;
|
905
870
|
|
906
|
-
if (!
|
907
|
-
_context4.next =
|
871
|
+
if (!result) {
|
872
|
+
_context4.next = 17;
|
908
873
|
break;
|
909
874
|
}
|
910
875
|
|
911
|
-
_context4.next = 4;
|
912
|
-
return _this2.modifyPass.handleOk(_this2.handleCzkData, _this2.store, _this2.props.updateMemberInfo);
|
913
|
-
|
914
|
-
case 4:
|
915
|
-
case 'end':
|
916
|
-
return _context4.stop();
|
917
|
-
}
|
918
|
-
}
|
919
|
-
}, _callee4, _this3);
|
920
|
-
}));
|
921
|
-
_this2.handleConfirmPwdModal = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
922
|
-
var curmode, result;
|
923
|
-
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
924
|
-
while (1) {
|
925
|
-
switch (_context5.prev = _context5.next) {
|
926
|
-
case 0:
|
927
876
|
_this2.setState({
|
928
|
-
|
877
|
+
showSetPwdModal: false,
|
878
|
+
czkVisible: true,
|
879
|
+
newPass: '',
|
880
|
+
newPassConfirm: ''
|
929
881
|
});
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
case 4:
|
939
|
-
result = _context5.sent;
|
882
|
+
_message2.default.warn('设置成功');
|
883
|
+
_this2.handleCzkData();
|
884
|
+
setTimeout(function () {
|
885
|
+
if (_this2.inputCzkAmount && _this2.inputCzkAmount.input) {
|
886
|
+
_this2.inputCzkAmount.input.focus();
|
887
|
+
_this2.inputCzkAmount.input.setSelectionRange(0, _this2.inputCzkAmount.input.value.length);
|
888
|
+
}
|
889
|
+
}, 350);
|
940
890
|
|
941
|
-
if (!
|
942
|
-
|
891
|
+
if (!_this2.store.member.ID) {
|
892
|
+
_context4.next = 16;
|
943
893
|
break;
|
944
894
|
}
|
945
895
|
|
946
|
-
|
947
|
-
|
948
|
-
_this2.setCurrentFocusAndAddPay(curmode.paymentType, null, curmode.paymethodId);
|
949
|
-
_promise2.default.resolve();
|
950
|
-
_context5.next = 13;
|
951
|
-
break;
|
896
|
+
_context4.next = 14;
|
897
|
+
return _this2.store.updateMemberInfo(_this2.store);
|
952
898
|
|
953
|
-
case
|
954
|
-
|
955
|
-
confirmStatus: true
|
956
|
-
});
|
957
|
-
//Message.info("密码不正确");
|
958
|
-
_context5.next = 13;
|
959
|
-
return _promise2.default.reject(result);
|
899
|
+
case 14:
|
900
|
+
resp = _context4.sent;
|
960
901
|
|
961
|
-
|
902
|
+
updataMemberInfo(resp);
|
903
|
+
|
904
|
+
case 16:
|
905
|
+
if (cardTypeEnum === 'BALANCE_CARD') {
|
906
|
+
_this2.store.paymode.updateCardInfo();
|
907
|
+
}
|
908
|
+
|
909
|
+
case 17:
|
962
910
|
case 'end':
|
963
|
-
return
|
911
|
+
return _context4.stop();
|
964
912
|
}
|
965
913
|
}
|
966
|
-
},
|
914
|
+
}, _callee4, _this3);
|
967
915
|
}));
|
968
916
|
|
969
|
-
_this2.handleConfirmPwdCancel = function () {
|
970
|
-
_this2.setState({
|
971
|
-
confirmStatus: false
|
972
|
-
});
|
973
|
-
};
|
974
|
-
|
975
|
-
_this2.getConfirmPwd = function (value) {
|
976
|
-
_this2.setState({
|
977
|
-
confirmPwd: value
|
978
|
-
});
|
979
|
-
};
|
980
|
-
|
981
|
-
_this2.changeBtnDisabled = function (value) {
|
982
|
-
_this2.setState({
|
983
|
-
btnDissabled: value
|
984
|
-
});
|
985
|
-
};
|
986
|
-
|
987
917
|
_this2.onPressEnterCzk = function (field) {
|
988
|
-
var
|
989
|
-
|
990
|
-
newPass =
|
991
|
-
|
992
|
-
newPassConfirm =
|
918
|
+
var _ref5 = _this2.state || {},
|
919
|
+
_ref5$newPass = _ref5.newPass,
|
920
|
+
newPass = _ref5$newPass === undefined ? '' : _ref5$newPass,
|
921
|
+
_ref5$newPassConfirm = _ref5.newPassConfirm,
|
922
|
+
newPassConfirm = _ref5$newPassConfirm === undefined ? '' : _ref5$newPassConfirm;
|
993
923
|
|
994
924
|
if (field === 'newPass' && newPass.length === 6) {
|
995
925
|
_this2.inputConfirmAmount.input.focus();
|
@@ -999,6 +929,60 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
999
929
|
}
|
1000
930
|
};
|
1001
931
|
|
932
|
+
_this2.setPwdValue = function (field, value) {
|
933
|
+
if (!/^[0-9]*$/.test(value)) {
|
934
|
+
return;
|
935
|
+
}
|
936
|
+
_this2.setState((0, _defineProperty3.default)({}, field, value), function () {
|
937
|
+
var _ref6 = _this2.state || {},
|
938
|
+
_ref6$newPass = _ref6.newPass,
|
939
|
+
newPass = _ref6$newPass === undefined ? '' : _ref6$newPass,
|
940
|
+
_ref6$newPassConfirm = _ref6.newPassConfirm,
|
941
|
+
newPassConfirm = _ref6$newPassConfirm === undefined ? '' : _ref6$newPassConfirm;
|
942
|
+
|
943
|
+
if (newPassConfirm.length === 6 && newPass.length === 6 && newPass === newPassConfirm) {
|
944
|
+
_this2.setState({
|
945
|
+
btnDissabled: false
|
946
|
+
});
|
947
|
+
}
|
948
|
+
});
|
949
|
+
};
|
950
|
+
|
951
|
+
_this2.handleBlur = function (field) {
|
952
|
+
var _ref7 = _this2.state || {},
|
953
|
+
_ref7$newPass = _ref7.newPass,
|
954
|
+
newPass = _ref7$newPass === undefined ? '' : _ref7$newPass,
|
955
|
+
_ref7$newPassConfirm = _ref7.newPassConfirm,
|
956
|
+
newPassConfirm = _ref7$newPassConfirm === undefined ? '' : _ref7$newPassConfirm;
|
957
|
+
|
958
|
+
setTimeout(function () {
|
959
|
+
var _ref8 = _this2.state || {},
|
960
|
+
showSetPwdModal = _ref8.showSetPwdModal;
|
961
|
+
|
962
|
+
if (!showSetPwdModal) return;
|
963
|
+
if (field === 'newPass' && newPass.length < 6) {
|
964
|
+
_this2.setState({
|
965
|
+
btnDissabled: true
|
966
|
+
});
|
967
|
+
_message2.default.warn('请输入6位新密码!');
|
968
|
+
} else {
|
969
|
+
if (field === 'newPassConfirm') {
|
970
|
+
if (newPass !== newPassConfirm) {
|
971
|
+
_this2.setState({
|
972
|
+
btnDissabled: true
|
973
|
+
});
|
974
|
+
_message2.default.warn('密码输入不一致,请重新输入!');
|
975
|
+
}
|
976
|
+
}
|
977
|
+
}
|
978
|
+
if (newPassConfirm.length === 6 && newPass.length === 6 && newPass === newPassConfirm) {
|
979
|
+
_this2.setState({
|
980
|
+
btnDissabled: false
|
981
|
+
});
|
982
|
+
}
|
983
|
+
}, 80);
|
984
|
+
};
|
985
|
+
|
1002
986
|
_this2.setInventoryFocus = function () {
|
1003
987
|
if (!!_this2.isHorizontalPad) return;
|
1004
988
|
var doms = document.getElementsByClassName('app hot-key-focus-container');
|
@@ -1111,8 +1095,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1111
1095
|
};
|
1112
1096
|
|
1113
1097
|
_this2.checkOfflineEnable = function (paymode, key) {
|
1114
|
-
var
|
1115
|
-
paymodes =
|
1098
|
+
var _ref9 = paymode || {},
|
1099
|
+
paymodes = _ref9.paymodes;
|
1116
1100
|
|
1117
1101
|
var isOffline = _mutantsMicrofx.stores.offlineSys.isOffline;
|
1118
1102
|
|
@@ -1344,7 +1328,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1344
1328
|
|
1345
1329
|
var storeType = _this2.props.type;
|
1346
1330
|
|
1347
|
-
if (
|
1331
|
+
if (storeType != 1 && boriginReturn && (type == PayStyle.hyczk || type == PayStyle.djq || type == PayStyle.jfdx)) {
|
1348
1332
|
_message2.default.info('原单退货时,该结算方式不可以删除。');
|
1349
1333
|
} else {
|
1350
1334
|
_this2.store.delPay(index, bookType);
|
@@ -1490,18 +1474,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1490
1474
|
if (_this2.czkdebounced) {
|
1491
1475
|
return;
|
1492
1476
|
}
|
1493
|
-
_this2.czkdebounced = (0, _debounce3.default)((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
1477
|
+
_this2.czkdebounced = (0, _debounce3.default)((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
1494
1478
|
var returnType, memberdata1;
|
1495
|
-
return _regenerator2.default.wrap(function
|
1479
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
1496
1480
|
while (1) {
|
1497
|
-
switch (
|
1481
|
+
switch (_context5.prev = _context5.next) {
|
1498
1482
|
case 0:
|
1499
1483
|
returnType = _this2.getNotBoriginReturn();
|
1500
|
-
|
1484
|
+
_context5.next = 3;
|
1501
1485
|
return _this2.store.loadCzk(v, returnType);
|
1502
1486
|
|
1503
1487
|
case 3:
|
1504
|
-
memberdata1 =
|
1488
|
+
memberdata1 = _context5.sent;
|
1505
1489
|
|
1506
1490
|
if (memberdata1 && memberdata1.length === 1) {
|
1507
1491
|
if (_this2.store.paymode.currentMode.storageCardNo) {
|
@@ -1519,10 +1503,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1519
1503
|
|
1520
1504
|
case 5:
|
1521
1505
|
case 'end':
|
1522
|
-
return
|
1506
|
+
return _context5.stop();
|
1523
1507
|
}
|
1524
1508
|
}
|
1525
|
-
},
|
1509
|
+
}, _callee5, _this3);
|
1526
1510
|
})), 1000, {
|
1527
1511
|
'leading': true,
|
1528
1512
|
'trailing': false
|
@@ -1726,11 +1710,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1726
1710
|
}
|
1727
1711
|
};
|
1728
1712
|
|
1729
|
-
_this2.settleUnReturn = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
1713
|
+
_this2.settleUnReturn = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7() {
|
1730
1714
|
var that;
|
1731
|
-
return _regenerator2.default.wrap(function
|
1715
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
1732
1716
|
while (1) {
|
1733
|
-
switch (
|
1717
|
+
switch (_context7.prev = _context7.next) {
|
1734
1718
|
case 0:
|
1735
1719
|
that = _this2;
|
1736
1720
|
|
@@ -1754,18 +1738,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1754
1738
|
onOk: function onOk() {
|
1755
1739
|
var _this4 = this;
|
1756
1740
|
|
1757
|
-
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
1741
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
|
1758
1742
|
var result;
|
1759
|
-
return _regenerator2.default.wrap(function
|
1743
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
1760
1744
|
while (1) {
|
1761
|
-
switch (
|
1745
|
+
switch (_context6.prev = _context6.next) {
|
1762
1746
|
case 0:
|
1763
1747
|
window.__queryingModal = (0, _utils.openQueryingModal)();
|
1764
|
-
|
1748
|
+
_context6.next = 3;
|
1765
1749
|
return that.store.querySettleResult();
|
1766
1750
|
|
1767
1751
|
case 3:
|
1768
|
-
result =
|
1752
|
+
result = _context6.sent;
|
1769
1753
|
|
1770
1754
|
setTimeout(function () {
|
1771
1755
|
if (window.__queryingModal) {
|
@@ -1773,34 +1757,34 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1773
1757
|
window.__queryingModal = null;
|
1774
1758
|
}
|
1775
1759
|
}, 0);
|
1776
|
-
|
1777
|
-
|
1760
|
+
_context6.t0 = result.Flag;
|
1761
|
+
_context6.next = _context6.t0 === "0" ? 8 : _context6.t0 === "1" ? 11 : _context6.t0 === "2" ? 13 : 15;
|
1778
1762
|
break;
|
1779
1763
|
|
1780
1764
|
case 8:
|
1781
1765
|
//成功
|
1782
1766
|
that.store.setDtoID(result.ID);
|
1783
1767
|
that.settleSuccess();
|
1784
|
-
return
|
1768
|
+
return _context6.abrupt('break', 15);
|
1785
1769
|
|
1786
1770
|
case 11:
|
1787
1771
|
//处理中
|
1788
1772
|
that.settleUnReturn();
|
1789
1773
|
// Message.info("结算正在处理中,请稍后再次查询。");
|
1790
|
-
return
|
1774
|
+
return _context6.abrupt('break', 15);
|
1791
1775
|
|
1792
1776
|
case 13:
|
1793
1777
|
//失败
|
1794
1778
|
_message2.default.info('\u7ED3\u7B97\u5931\u8D25\uFF0C\u539F\u56E0:' + result.Message + '\u3002');
|
1795
1779
|
// that.settleCanceled();
|
1796
|
-
return
|
1780
|
+
return _context6.abrupt('break', 15);
|
1797
1781
|
|
1798
1782
|
case 15:
|
1799
1783
|
case 'end':
|
1800
|
-
return
|
1784
|
+
return _context6.stop();
|
1801
1785
|
}
|
1802
1786
|
}
|
1803
|
-
},
|
1787
|
+
}, _callee6, _this4);
|
1804
1788
|
}))();
|
1805
1789
|
},
|
1806
1790
|
onCancel: function onCancel() {
|
@@ -1810,10 +1794,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1810
1794
|
|
1811
1795
|
case 2:
|
1812
1796
|
case 'end':
|
1813
|
-
return
|
1797
|
+
return _context7.stop();
|
1814
1798
|
}
|
1815
1799
|
}
|
1816
|
-
},
|
1800
|
+
}, _callee7, _this3);
|
1817
1801
|
}));
|
1818
1802
|
|
1819
1803
|
_this2.settleCanceled = function () {
|
@@ -1822,131 +1806,119 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1822
1806
|
_this2.cancelState();
|
1823
1807
|
};
|
1824
1808
|
|
1825
|
-
_this2.settleSuccess = function () {
|
1826
|
-
var
|
1827
|
-
var _enumController$getEn20, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, isFull, resp1;
|
1809
|
+
_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;
|
1828
1811
|
|
1829
|
-
|
1830
|
-
|
1831
|
-
|
1832
|
-
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
1836
|
-
|
1837
|
-
|
1838
|
-
|
1839
|
-
|
1840
|
-
|
1841
|
-
|
1812
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
1813
|
+
while (1) {
|
1814
|
+
switch (_context8.prev = _context8.next) {
|
1815
|
+
case 0:
|
1816
|
+
//提示成功
|
1817
|
+
_enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn20.PayStyle;
|
1818
|
+
_this2$store$paymode = _this2.store.paymode, amount = _this2$store$paymode.amount, received = _this2$store$paymode.received, thePaymodes = _this2$store$paymode.thePaymodes;
|
1819
|
+
IdbusiType = _this2.store.dto.IdbusiType;
|
1820
|
+
charge = _this2.store.paymode.charge;
|
1821
|
+
openCashBox = !!(0, _find3.default)(thePaymodes, function (mode) {
|
1822
|
+
return mode.paymentType == PayStyle.xianjin;
|
1823
|
+
});
|
1824
|
+
// 判断双屏显示。
|
1842
1825
|
|
1843
|
-
|
1826
|
+
_this = _this2;
|
1844
1827
|
|
1845
|
-
|
1846
|
-
|
1847
|
-
|
1848
|
-
|
1849
|
-
|
1850
|
-
|
1851
|
-
|
1852
|
-
|
1853
|
-
|
1854
|
-
|
1855
|
-
|
1856
|
-
}
|
1857
|
-
}
|
1858
|
-
return flag;
|
1859
|
-
};
|
1860
|
-
var params = {
|
1861
|
-
step: 3,
|
1862
|
-
data: {
|
1863
|
-
amount: amount,
|
1864
|
-
received: received,
|
1865
|
-
charge: charge
|
1866
|
-
}
|
1867
|
-
};
|
1868
|
-
var screenType = getScreenType();
|
1869
|
-
if (screenType === true) {
|
1870
|
-
//副屏-第二屏幕
|
1871
|
-
if (_this.isHorizontalSunMi) {
|
1872
|
-
window.sunMi_PresentationManager.sendMessageToSecondScreen(params);
|
1873
|
-
setTimeout(function () {
|
1874
|
-
window.sunMi_PresentationManager.sendMessageToSecondScreen({ step: 1 });
|
1875
|
-
}, 3000);
|
1876
|
-
} else {
|
1877
|
-
_mutantsMicrofx.nativeMs && _mutantsMicrofx.nativeMs.setIpcRendererMethod('ReplyScreen', params);
|
1828
|
+
showTwoScreen = function showTwoScreen(amount, received, charge) {
|
1829
|
+
var getScreenType = function getScreenType() {
|
1830
|
+
var flag = false;
|
1831
|
+
if (_this.hasElectron === true || _this.isHorizontalSunMi) {
|
1832
|
+
var data = _mutantsMicrofx.localStore.get('setting_setData') || [];
|
1833
|
+
data = data.filter(function (item) {
|
1834
|
+
return item.Name === 'EnableDoubleScreen';
|
1835
|
+
});
|
1836
|
+
data = data && data.length > 0 ? data.shift() : null;
|
1837
|
+
if (data && data.Value === '1') {
|
1838
|
+
flag = true;
|
1878
1839
|
}
|
1840
|
+
}
|
1841
|
+
return flag;
|
1842
|
+
};
|
1843
|
+
var params = {
|
1844
|
+
step: 3,
|
1845
|
+
data: {
|
1846
|
+
amount: amount,
|
1847
|
+
received: received,
|
1848
|
+
charge: charge
|
1849
|
+
}
|
1850
|
+
};
|
1851
|
+
var screenType = getScreenType();
|
1852
|
+
if (screenType === true) {
|
1853
|
+
//副屏-第二屏幕
|
1854
|
+
if (_this.isHorizontalSunMi) {
|
1855
|
+
window.sunMi_PresentationManager.sendMessageToSecondScreen(params);
|
1879
1856
|
setTimeout(function () {
|
1880
|
-
|
1881
|
-
},
|
1857
|
+
window.sunMi_PresentationManager.sendMessageToSecondScreen({ step: 1 });
|
1858
|
+
}, 3000);
|
1882
1859
|
} else {
|
1883
|
-
|
1860
|
+
_mutantsMicrofx.nativeMs && _mutantsMicrofx.nativeMs.setIpcRendererMethod('ReplyScreen', params);
|
1884
1861
|
}
|
1885
|
-
|
1862
|
+
setTimeout(function () {
|
1863
|
+
_this.props.onSettleSuccess && _this.props.onSettleSuccess({ openCashBox: openCashBox });
|
1864
|
+
}, 1500);
|
1865
|
+
} else {
|
1866
|
+
_this.props.onSettleSuccess && _this.props.onSettleSuccess({ openCashBox: openCashBox });
|
1867
|
+
}
|
1868
|
+
};
|
1886
1869
|
|
1887
|
-
|
1888
|
-
|
1889
|
-
|
1870
|
+
isFull = _this2.store.isFull;
|
1871
|
+
_context8.next = 10;
|
1872
|
+
return _this2.settleGiftOpenedInRunningFast();
|
1890
1873
|
|
1891
|
-
|
1892
|
-
|
1874
|
+
case 10:
|
1875
|
+
resp1 = _context8.sent;
|
1893
1876
|
|
1894
1877
|
|
1895
|
-
|
1896
|
-
|
1897
|
-
|
1898
|
-
|
1899
|
-
|
1900
|
-
|
1901
|
-
|
1902
|
-
|
1903
|
-
|
1904
|
-
|
1905
|
-
|
1878
|
+
setTimeout(function () {
|
1879
|
+
if (window.__loadingModal) {
|
1880
|
+
window.__loadingModal.destroy();
|
1881
|
+
window.__loadingModal = null;
|
1882
|
+
}
|
1883
|
+
var isXianjin = _this.state.isXianjin;
|
1884
|
+
showTwoScreen(amount, received, charge);
|
1885
|
+
if (isXianjin) _this2.handleGuestShow(4, charge);
|
1886
|
+
_this.setState({
|
1887
|
+
noAlreadyWarn: true
|
1888
|
+
});
|
1906
1889
|
|
1907
|
-
|
1908
|
-
|
1909
|
-
|
1910
|
-
|
1911
|
-
|
1912
|
-
|
1913
|
-
|
1914
|
-
|
1915
|
-
|
1916
|
-
|
1917
|
-
|
1918
|
-
|
1919
|
-
|
1920
|
-
|
1921
|
-
|
1922
|
-
|
1923
|
-
|
1924
|
-
|
1925
|
-
|
1926
|
-
});
|
1927
|
-
}
|
1928
|
-
_this2.setState({ isXianjin: false });
|
1929
|
-
_this2.cancelState();
|
1930
|
-
}, 0);
|
1890
|
+
var _this$props = _this.props,
|
1891
|
+
MemberPoints = _this$props.MemberPoints,
|
1892
|
+
isMemberPointsReturn = _this$props.isMemberPointsReturn,
|
1893
|
+
isReturn = _this$props.isReturn;
|
1894
|
+
|
1895
|
+
var message = "支付成功";
|
1896
|
+
if ((isReturn || isMemberPointsReturn) && Number(amount) == Number(0)) {
|
1897
|
+
message = "退货成功";
|
1898
|
+
} else if (MemberPoints && Number(amount) == Number(0)) {
|
1899
|
+
message = "兑换成功";
|
1900
|
+
} else if (IdbusiType == 39 && received == 0) {
|
1901
|
+
message = "取货成功";
|
1902
|
+
}
|
1903
|
+
window.__successModal = (0, _utils.showSuccessModal)(amount, received, charge, _this.props.onModalClose, isXianjin, message, resp1 && resp1.data, _mutantsMicrofx.stores, IdbusiType, isFull, function () {
|
1904
|
+
_this.handleGuestShow(5);
|
1905
|
+
});
|
1906
|
+
_this2.setState({ isXianjin: false });
|
1907
|
+
_this2.cancelState();
|
1908
|
+
}, 0);
|
1931
1909
|
|
1932
|
-
|
1933
|
-
|
1934
|
-
|
1935
|
-
}
|
1910
|
+
case 12:
|
1911
|
+
case 'end':
|
1912
|
+
return _context8.stop();
|
1936
1913
|
}
|
1937
|
-
}
|
1938
|
-
})
|
1939
|
-
|
1940
|
-
|
1941
|
-
return _ref10.apply(this, arguments);
|
1942
|
-
};
|
1943
|
-
}();
|
1944
|
-
|
1945
|
-
_this2.settleGiftOpenedInRunningFast = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10() {
|
1914
|
+
}
|
1915
|
+
}, _callee8, _this3);
|
1916
|
+
}));
|
1917
|
+
_this2.settleGiftOpenedInRunningFast = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9() {
|
1946
1918
|
var resp, isCheckGift, vocherPayGift, getSettleGift, type;
|
1947
|
-
return _regenerator2.default.wrap(function
|
1919
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
1948
1920
|
while (1) {
|
1949
|
-
switch (
|
1921
|
+
switch (_context9.prev = _context9.next) {
|
1950
1922
|
case 0:
|
1951
1923
|
resp = false;
|
1952
1924
|
isCheckGift = true;
|
@@ -1960,55 +1932,55 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1960
1932
|
}
|
1961
1933
|
|
1962
1934
|
if (!isCheckGift) {
|
1963
|
-
|
1935
|
+
_context9.next = 16;
|
1964
1936
|
break;
|
1965
1937
|
}
|
1966
1938
|
|
1967
1939
|
getSettleGift = _this2.store.getSettleGift;
|
1968
1940
|
type = _this2.props.type;
|
1969
1941
|
|
1970
|
-
if (type) {
|
1971
|
-
|
1942
|
+
if (!(type != 1)) {
|
1943
|
+
_context9.next = 16;
|
1972
1944
|
break;
|
1973
1945
|
}
|
1974
1946
|
|
1975
|
-
|
1976
|
-
|
1947
|
+
_context9.prev = 7;
|
1948
|
+
_context9.next = 10;
|
1977
1949
|
return getSettleGift();
|
1978
1950
|
|
1979
1951
|
case 10:
|
1980
|
-
resp =
|
1981
|
-
|
1952
|
+
resp = _context9.sent;
|
1953
|
+
_context9.next = 16;
|
1982
1954
|
break;
|
1983
1955
|
|
1984
1956
|
case 13:
|
1985
|
-
|
1986
|
-
|
1957
|
+
_context9.prev = 13;
|
1958
|
+
_context9.t0 = _context9['catch'](7);
|
1987
1959
|
|
1988
1960
|
console.log("获取支付礼包getSettleGift失败");
|
1989
1961
|
|
1990
1962
|
case 16:
|
1991
|
-
return
|
1963
|
+
return _context9.abrupt('return', resp);
|
1992
1964
|
|
1993
1965
|
case 17:
|
1994
1966
|
case 'end':
|
1995
|
-
return
|
1967
|
+
return _context9.stop();
|
1996
1968
|
}
|
1997
1969
|
}
|
1998
|
-
},
|
1970
|
+
}, _callee9, _this3, [[7, 13]]);
|
1999
1971
|
}));
|
2000
1972
|
|
2001
1973
|
_this2.handleGuestShow = function (dtype, value) {
|
2002
1974
|
if (_this2.hasElectron === false) return;
|
2003
1975
|
var dt = _mutantsMicrofx.localStore.get('portsetting_hardSet') || [];
|
2004
1976
|
|
2005
|
-
var
|
2006
|
-
guestshow_enable =
|
2007
|
-
guestshow_clear =
|
2008
|
-
guestshow_welcome =
|
2009
|
-
guestshow_collect =
|
2010
|
-
guestshow_refund =
|
2011
|
-
guestshow_change =
|
1977
|
+
var _ref14 = dt || {},
|
1978
|
+
guestshow_enable = _ref14.guestshow_enable,
|
1979
|
+
guestshow_clear = _ref14.guestshow_clear,
|
1980
|
+
guestshow_welcome = _ref14.guestshow_welcome,
|
1981
|
+
guestshow_collect = _ref14.guestshow_collect,
|
1982
|
+
guestshow_refund = _ref14.guestshow_refund,
|
1983
|
+
guestshow_change = _ref14.guestshow_change;
|
2012
1984
|
|
2013
1985
|
var hasSuccess = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('portsetting_hardSet_isSuccess');
|
2014
1986
|
if (!guestshow_enable || !!guestshow_enable && hasSuccess == '0') return;
|
@@ -2043,108 +2015,108 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2043
2015
|
};
|
2044
2016
|
|
2045
2017
|
_this2.handleSettle = function () {
|
2046
|
-
var
|
2018
|
+
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(args) {
|
2047
2019
|
var handleUserInputs = function () {
|
2048
|
-
var
|
2020
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(promises) {
|
2049
2021
|
var results, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, p, _result;
|
2050
2022
|
|
2051
|
-
return _regenerator2.default.wrap(function
|
2023
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
2052
2024
|
while (1) {
|
2053
|
-
switch (
|
2025
|
+
switch (_context11.prev = _context11.next) {
|
2054
2026
|
case 0:
|
2055
2027
|
results = [];
|
2056
|
-
|
2028
|
+
_context11.prev = 1;
|
2057
2029
|
_iteratorNormalCompletion = true;
|
2058
2030
|
_didIteratorError = false;
|
2059
2031
|
_iteratorError = undefined;
|
2060
|
-
|
2032
|
+
_context11.prev = 5;
|
2061
2033
|
_iterator = (0, _getIterator3.default)(promises);
|
2062
2034
|
|
2063
2035
|
case 7:
|
2064
2036
|
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
|
2065
|
-
|
2037
|
+
_context11.next = 16;
|
2066
2038
|
break;
|
2067
2039
|
}
|
2068
2040
|
|
2069
2041
|
p = _step.value;
|
2070
|
-
|
2042
|
+
_context11.next = 11;
|
2071
2043
|
return p;
|
2072
2044
|
|
2073
2045
|
case 11:
|
2074
|
-
_result =
|
2046
|
+
_result = _context11.sent;
|
2075
2047
|
|
2076
2048
|
results.push(_result);
|
2077
2049
|
|
2078
2050
|
case 13:
|
2079
2051
|
_iteratorNormalCompletion = true;
|
2080
|
-
|
2052
|
+
_context11.next = 7;
|
2081
2053
|
break;
|
2082
2054
|
|
2083
2055
|
case 16:
|
2084
|
-
|
2056
|
+
_context11.next = 22;
|
2085
2057
|
break;
|
2086
2058
|
|
2087
2059
|
case 18:
|
2088
|
-
|
2089
|
-
|
2060
|
+
_context11.prev = 18;
|
2061
|
+
_context11.t0 = _context11['catch'](5);
|
2090
2062
|
_didIteratorError = true;
|
2091
|
-
_iteratorError =
|
2063
|
+
_iteratorError = _context11.t0;
|
2092
2064
|
|
2093
2065
|
case 22:
|
2094
|
-
|
2095
|
-
|
2066
|
+
_context11.prev = 22;
|
2067
|
+
_context11.prev = 23;
|
2096
2068
|
|
2097
2069
|
if (!_iteratorNormalCompletion && _iterator.return) {
|
2098
2070
|
_iterator.return();
|
2099
2071
|
}
|
2100
2072
|
|
2101
2073
|
case 25:
|
2102
|
-
|
2074
|
+
_context11.prev = 25;
|
2103
2075
|
|
2104
2076
|
if (!_didIteratorError) {
|
2105
|
-
|
2077
|
+
_context11.next = 28;
|
2106
2078
|
break;
|
2107
2079
|
}
|
2108
2080
|
|
2109
2081
|
throw _iteratorError;
|
2110
2082
|
|
2111
2083
|
case 28:
|
2112
|
-
return
|
2084
|
+
return _context11.finish(25);
|
2113
2085
|
|
2114
2086
|
case 29:
|
2115
|
-
return
|
2087
|
+
return _context11.finish(22);
|
2116
2088
|
|
2117
2089
|
case 30:
|
2118
2090
|
window.__loadingModal = (0, _utils.openLoadingModal)();
|
2119
|
-
|
2091
|
+
_context11.next = 33;
|
2120
2092
|
return commit(results);
|
2121
2093
|
|
2122
2094
|
case 33:
|
2123
|
-
|
2095
|
+
_context11.next = 37;
|
2124
2096
|
break;
|
2125
2097
|
|
2126
2098
|
case 35:
|
2127
|
-
|
2128
|
-
|
2099
|
+
_context11.prev = 35;
|
2100
|
+
_context11.t1 = _context11['catch'](1);
|
2129
2101
|
|
2130
2102
|
case 37:
|
2131
2103
|
case 'end':
|
2132
|
-
return
|
2104
|
+
return _context11.stop();
|
2133
2105
|
}
|
2134
2106
|
}
|
2135
|
-
},
|
2107
|
+
}, _callee11, this, [[1, 35], [5, 18, 22, 30], [23,, 25, 29]]);
|
2136
2108
|
}));
|
2137
2109
|
|
2138
|
-
return function handleUserInputs(
|
2139
|
-
return
|
2110
|
+
return function handleUserInputs(_x6) {
|
2111
|
+
return _ref17.apply(this, arguments);
|
2140
2112
|
};
|
2141
2113
|
}();
|
2142
2114
|
|
2143
2115
|
var _enumController$getEn21, PayStyle, _this2$store6, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit;
|
2144
2116
|
|
2145
|
-
return _regenerator2.default.wrap(function
|
2117
|
+
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
2146
2118
|
while (1) {
|
2147
|
-
switch (
|
2119
|
+
switch (_context12.prev = _context12.next) {
|
2148
2120
|
case 0:
|
2149
2121
|
_this2.setState({
|
2150
2122
|
settleDisabled: true
|
@@ -2166,7 +2138,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2166
2138
|
});
|
2167
2139
|
|
2168
2140
|
if (!(that.checkCharge() && Math.abs(paymode.receivable) > that.props.initData("posChangeUpperAmount"))) {
|
2169
|
-
|
2141
|
+
_context12.next = 13;
|
2170
2142
|
break;
|
2171
2143
|
}
|
2172
2144
|
|
@@ -2174,11 +2146,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2174
2146
|
_this2.setState({
|
2175
2147
|
settleDisabled: false
|
2176
2148
|
});
|
2177
|
-
return
|
2149
|
+
return _context12.abrupt('return');
|
2178
2150
|
|
2179
2151
|
case 13:
|
2180
2152
|
if (!(args !== "zero" && !newStyle)) {
|
2181
|
-
|
2153
|
+
_context12.next = 19;
|
2182
2154
|
break;
|
2183
2155
|
}
|
2184
2156
|
|
@@ -2187,7 +2159,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2187
2159
|
});
|
2188
2160
|
|
2189
2161
|
if (!zeromode) {
|
2190
|
-
|
2162
|
+
_context12.next = 19;
|
2191
2163
|
break;
|
2192
2164
|
}
|
2193
2165
|
|
@@ -2195,7 +2167,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2195
2167
|
settleDisabled: false
|
2196
2168
|
});
|
2197
2169
|
_message2.default.error(zeromode.name + ' 的结算金额为零,不可以结算。');
|
2198
|
-
return
|
2170
|
+
return _context12.abrupt('return');
|
2199
2171
|
|
2200
2172
|
case 19:
|
2201
2173
|
promises = [];
|
@@ -2204,14 +2176,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2204
2176
|
}) : paymode.thePaymodes, 'orderBy');
|
2205
2177
|
|
2206
2178
|
if (!isQuickPay) {
|
2207
|
-
|
2179
|
+
_context12.next = 27;
|
2208
2180
|
break;
|
2209
2181
|
}
|
2210
2182
|
|
2211
2183
|
quickmode = thePaymodes[0];
|
2212
2184
|
|
2213
2185
|
if (!_this2.checkModeDisabled(quickmode.paymentType, brefund, boriginReturn)) {
|
2214
|
-
|
2186
|
+
_context12.next = 27;
|
2215
2187
|
break;
|
2216
2188
|
}
|
2217
2189
|
|
@@ -2219,7 +2191,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2219
2191
|
settleDisabled: false
|
2220
2192
|
});
|
2221
2193
|
_message2.default.error('退款不能使用' + quickmode.name + '结算,请使用其他结算方式!');
|
2222
|
-
return
|
2194
|
+
return _context12.abrupt('return');
|
2223
2195
|
|
2224
2196
|
case 27:
|
2225
2197
|
(0, _forEach3.default)(thePaymodes, function (mode) {
|
@@ -2229,27 +2201,27 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2229
2201
|
});
|
2230
2202
|
|
2231
2203
|
commit = function () {
|
2232
|
-
var
|
2204
|
+
var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(values) {
|
2233
2205
|
var result;
|
2234
|
-
return _regenerator2.default.wrap(function
|
2206
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
2235
2207
|
while (1) {
|
2236
|
-
switch (
|
2208
|
+
switch (_context10.prev = _context10.next) {
|
2237
2209
|
case 0:
|
2238
|
-
|
2210
|
+
_context10.next = 2;
|
2239
2211
|
return _this2.store.commit(_this2.props.bTest);
|
2240
2212
|
|
2241
2213
|
case 2:
|
2242
|
-
result =
|
2214
|
+
result = _context10.sent;
|
2243
2215
|
|
2244
2216
|
if (!(result === true)) {
|
2245
|
-
|
2217
|
+
_context10.next = 8;
|
2246
2218
|
break;
|
2247
2219
|
}
|
2248
2220
|
|
2249
2221
|
//成功
|
2250
2222
|
that.settleSuccess();
|
2251
2223
|
_promise2.default.resolve();
|
2252
|
-
|
2224
|
+
_context10.next = 23;
|
2253
2225
|
break;
|
2254
2226
|
|
2255
2227
|
case 8:
|
@@ -2266,24 +2238,24 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2266
2238
|
}, 0);
|
2267
2239
|
|
2268
2240
|
if (!(result && (result.Code || result.code))) {
|
2269
|
-
|
2241
|
+
_context10.next = 20;
|
2270
2242
|
break;
|
2271
2243
|
}
|
2272
2244
|
|
2273
|
-
|
2274
|
-
|
2245
|
+
_context10.t0 = result.Code || result.code;
|
2246
|
+
_context10.next = _context10.t0 === 'RE_Settle_UnReturn' ? 14 : _context10.t0 === 'ECONNABORTED' ? 18 : 20;
|
2275
2247
|
break;
|
2276
2248
|
|
2277
2249
|
case 14:
|
2278
2250
|
console.log('settlement--RE_Settle_UnReturn--调用清除数据==Focus==');
|
2279
2251
|
_this2.props.clearVoucherData && _this2.props.clearVoucherData();
|
2280
2252
|
_this2.cancelState();
|
2281
|
-
return
|
2253
|
+
return _context10.abrupt('break', 20);
|
2282
2254
|
|
2283
2255
|
case 18:
|
2284
2256
|
//error.code === 'ECONNABORTED' && error.message.indexOf('timeout')
|
2285
2257
|
result.message.indexOf('timeout') > -1 && that.settleUnReturn();
|
2286
|
-
return
|
2258
|
+
return _context10.abrupt('break', 20);
|
2287
2259
|
|
2288
2260
|
case 20:
|
2289
2261
|
if (isQuickPay) {
|
@@ -2291,19 +2263,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2291
2263
|
that.cancelState();
|
2292
2264
|
}
|
2293
2265
|
|
2294
|
-
|
2266
|
+
_context10.next = 23;
|
2295
2267
|
return _promise2.default.reject();
|
2296
2268
|
|
2297
2269
|
case 23:
|
2298
2270
|
case 'end':
|
2299
|
-
return
|
2271
|
+
return _context10.stop();
|
2300
2272
|
}
|
2301
2273
|
}
|
2302
|
-
},
|
2274
|
+
}, _callee10, _this3);
|
2303
2275
|
}));
|
2304
2276
|
|
2305
|
-
return function commit(
|
2306
|
-
return
|
2277
|
+
return function commit(_x5) {
|
2278
|
+
return _ref16.apply(this, arguments);
|
2307
2279
|
};
|
2308
2280
|
}();
|
2309
2281
|
|
@@ -2311,102 +2283,102 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2311
2283
|
|
2312
2284
|
case 30:
|
2313
2285
|
case 'end':
|
2314
|
-
return
|
2286
|
+
return _context12.stop();
|
2315
2287
|
}
|
2316
2288
|
}
|
2317
|
-
},
|
2289
|
+
}, _callee12, _this3);
|
2318
2290
|
}));
|
2319
2291
|
|
2320
|
-
return function (
|
2321
|
-
return
|
2292
|
+
return function (_x4) {
|
2293
|
+
return _ref15.apply(this, arguments);
|
2322
2294
|
};
|
2323
2295
|
}();
|
2324
2296
|
|
2325
|
-
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
2297
|
+
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15() {
|
2326
2298
|
var handleUserInputs = function () {
|
2327
|
-
var
|
2299
|
+
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(promises) {
|
2328
2300
|
var results, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, p, _result2;
|
2329
2301
|
|
2330
|
-
return _regenerator2.default.wrap(function
|
2302
|
+
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
2331
2303
|
while (1) {
|
2332
|
-
switch (
|
2304
|
+
switch (_context14.prev = _context14.next) {
|
2333
2305
|
case 0:
|
2334
2306
|
results = [];
|
2335
|
-
|
2307
|
+
_context14.prev = 1;
|
2336
2308
|
_iteratorNormalCompletion2 = true;
|
2337
2309
|
_didIteratorError2 = false;
|
2338
2310
|
_iteratorError2 = undefined;
|
2339
|
-
|
2311
|
+
_context14.prev = 5;
|
2340
2312
|
_iterator2 = (0, _getIterator3.default)(promises);
|
2341
2313
|
|
2342
2314
|
case 7:
|
2343
2315
|
if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {
|
2344
|
-
|
2316
|
+
_context14.next = 16;
|
2345
2317
|
break;
|
2346
2318
|
}
|
2347
2319
|
|
2348
2320
|
p = _step2.value;
|
2349
|
-
|
2321
|
+
_context14.next = 11;
|
2350
2322
|
return p;
|
2351
2323
|
|
2352
2324
|
case 11:
|
2353
|
-
_result2 =
|
2325
|
+
_result2 = _context14.sent;
|
2354
2326
|
|
2355
2327
|
results.push(_result2);
|
2356
2328
|
|
2357
2329
|
case 13:
|
2358
2330
|
_iteratorNormalCompletion2 = true;
|
2359
|
-
|
2331
|
+
_context14.next = 7;
|
2360
2332
|
break;
|
2361
2333
|
|
2362
2334
|
case 16:
|
2363
|
-
|
2335
|
+
_context14.next = 22;
|
2364
2336
|
break;
|
2365
2337
|
|
2366
2338
|
case 18:
|
2367
|
-
|
2368
|
-
|
2339
|
+
_context14.prev = 18;
|
2340
|
+
_context14.t0 = _context14['catch'](5);
|
2369
2341
|
_didIteratorError2 = true;
|
2370
|
-
_iteratorError2 =
|
2342
|
+
_iteratorError2 = _context14.t0;
|
2371
2343
|
|
2372
2344
|
case 22:
|
2373
|
-
|
2374
|
-
|
2345
|
+
_context14.prev = 22;
|
2346
|
+
_context14.prev = 23;
|
2375
2347
|
|
2376
2348
|
if (!_iteratorNormalCompletion2 && _iterator2.return) {
|
2377
2349
|
_iterator2.return();
|
2378
2350
|
}
|
2379
2351
|
|
2380
2352
|
case 25:
|
2381
|
-
|
2353
|
+
_context14.prev = 25;
|
2382
2354
|
|
2383
2355
|
if (!_didIteratorError2) {
|
2384
|
-
|
2356
|
+
_context14.next = 28;
|
2385
2357
|
break;
|
2386
2358
|
}
|
2387
2359
|
|
2388
2360
|
throw _iteratorError2;
|
2389
2361
|
|
2390
2362
|
case 28:
|
2391
|
-
return
|
2363
|
+
return _context14.finish(25);
|
2392
2364
|
|
2393
2365
|
case 29:
|
2394
|
-
return
|
2366
|
+
return _context14.finish(22);
|
2395
2367
|
|
2396
2368
|
case 30:
|
2397
|
-
|
2369
|
+
_context14.next = 32;
|
2398
2370
|
return commit(results);
|
2399
2371
|
|
2400
2372
|
case 32:
|
2401
|
-
|
2373
|
+
_context14.next = 37;
|
2402
2374
|
break;
|
2403
2375
|
|
2404
2376
|
case 34:
|
2405
|
-
|
2406
|
-
|
2377
|
+
_context14.prev = 34;
|
2378
|
+
_context14.t1 = _context14['catch'](1);
|
2407
2379
|
|
2408
|
-
if (
|
2409
|
-
_message2.default.error(
|
2380
|
+
if (_context14.t1 != "cancelpwd") {
|
2381
|
+
_message2.default.error(_context14.t1);
|
2410
2382
|
setTimeout(function () {
|
2411
2383
|
that.handleCzk();
|
2412
2384
|
}, 500);
|
@@ -2414,22 +2386,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2414
2386
|
|
2415
2387
|
case 37:
|
2416
2388
|
case 'end':
|
2417
|
-
return
|
2389
|
+
return _context14.stop();
|
2418
2390
|
}
|
2419
2391
|
}
|
2420
|
-
},
|
2392
|
+
}, _callee14, this, [[1, 34], [5, 18, 22, 30], [23,, 25, 29]]);
|
2421
2393
|
}));
|
2422
2394
|
|
2423
|
-
return function handleUserInputs(
|
2424
|
-
return
|
2395
|
+
return function handleUserInputs(_x8) {
|
2396
|
+
return _ref20.apply(this, arguments);
|
2425
2397
|
};
|
2426
2398
|
}();
|
2427
2399
|
|
2428
2400
|
var that, curmode, promises, _enumController$getEn22, PayStyle, commit;
|
2429
2401
|
|
2430
|
-
return _regenerator2.default.wrap(function
|
2402
|
+
return _regenerator2.default.wrap(function _callee15$(_context15) {
|
2431
2403
|
while (1) {
|
2432
|
-
switch (
|
2404
|
+
switch (_context15.prev = _context15.next) {
|
2433
2405
|
case 0:
|
2434
2406
|
that = _this2;
|
2435
2407
|
curmode = _this2.store.paymode.currentMode;
|
@@ -2440,45 +2412,41 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2440
2412
|
|
2441
2413
|
if (curmode.paymentType === PayStyle.hyczk) {
|
2442
2414
|
if (curmode.cardTypeEnum === 'BALANCE_CARD') {
|
2443
|
-
!curmode.freePaymentPasswordStore &&
|
2444
|
-
confirmStatus: true
|
2445
|
-
});
|
2415
|
+
!curmode.freePaymentPasswordStore && promises.push(that.inputPwd(curmode));
|
2446
2416
|
} else {
|
2447
|
-
curmode.isNeedPassword &&
|
2448
|
-
confirmStatus: true
|
2449
|
-
});
|
2417
|
+
curmode.isNeedPassword && promises.push(that.inputPwd(curmode));
|
2450
2418
|
}
|
2451
2419
|
}
|
2452
2420
|
}
|
2453
2421
|
|
2454
2422
|
commit = function () {
|
2455
|
-
var
|
2423
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(values) {
|
2456
2424
|
var result;
|
2457
|
-
return _regenerator2.default.wrap(function
|
2425
|
+
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
2458
2426
|
while (1) {
|
2459
|
-
switch (
|
2427
|
+
switch (_context13.prev = _context13.next) {
|
2460
2428
|
case 0:
|
2461
2429
|
if (!(values.length > 0)) {
|
2462
|
-
|
2430
|
+
_context13.next = 6;
|
2463
2431
|
break;
|
2464
2432
|
}
|
2465
2433
|
|
2466
|
-
|
2434
|
+
_context13.next = 3;
|
2467
2435
|
return that.store.validePwd(values[0]);
|
2468
2436
|
|
2469
2437
|
case 3:
|
2470
|
-
|
2471
|
-
|
2438
|
+
_context13.t0 = _context13.sent;
|
2439
|
+
_context13.next = 7;
|
2472
2440
|
break;
|
2473
2441
|
|
2474
2442
|
case 6:
|
2475
|
-
|
2443
|
+
_context13.t0 = "";
|
2476
2444
|
|
2477
2445
|
case 7:
|
2478
|
-
result =
|
2446
|
+
result = _context13.t0;
|
2479
2447
|
|
2480
2448
|
if (!(result == "")) {
|
2481
|
-
|
2449
|
+
_context13.next = 13;
|
2482
2450
|
break;
|
2483
2451
|
}
|
2484
2452
|
|
@@ -2486,23 +2454,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2486
2454
|
//返回
|
2487
2455
|
that.setCurrentFocusAndAddPay(curmode.paymentType, null, curmode.paymethodId);
|
2488
2456
|
_promise2.default.resolve();
|
2489
|
-
|
2457
|
+
_context13.next = 15;
|
2490
2458
|
break;
|
2491
2459
|
|
2492
2460
|
case 13:
|
2493
|
-
|
2461
|
+
_context13.next = 15;
|
2494
2462
|
return _promise2.default.reject(result);
|
2495
2463
|
|
2496
2464
|
case 15:
|
2497
2465
|
case 'end':
|
2498
|
-
return
|
2466
|
+
return _context13.stop();
|
2499
2467
|
}
|
2500
2468
|
}
|
2501
|
-
},
|
2469
|
+
}, _callee13, _this3);
|
2502
2470
|
}));
|
2503
2471
|
|
2504
|
-
return function commit(
|
2505
|
-
return
|
2472
|
+
return function commit(_x7) {
|
2473
|
+
return _ref19.apply(this, arguments);
|
2506
2474
|
};
|
2507
2475
|
}();
|
2508
2476
|
|
@@ -2510,10 +2478,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2510
2478
|
|
2511
2479
|
case 6:
|
2512
2480
|
case 'end':
|
2513
|
-
return
|
2481
|
+
return _context15.stop();
|
2514
2482
|
}
|
2515
2483
|
}
|
2516
|
-
},
|
2484
|
+
}, _callee15, _this3);
|
2517
2485
|
}));
|
2518
2486
|
|
2519
2487
|
_this2.fKeyboardOnOk = function (paymethodeId) {
|
@@ -2552,8 +2520,163 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2552
2520
|
});
|
2553
2521
|
};
|
2554
2522
|
|
2555
|
-
_this2.
|
2556
|
-
var
|
2523
|
+
_this2.inputPwd = function () {
|
2524
|
+
var _ref21 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(paymode) {
|
2525
|
+
var that, confirmPwd;
|
2526
|
+
return _regenerator2.default.wrap(function _callee16$(_context16) {
|
2527
|
+
while (1) {
|
2528
|
+
switch (_context16.prev = _context16.next) {
|
2529
|
+
case 0:
|
2530
|
+
that = _this2;
|
2531
|
+
confirmPwd = _this2.state.confirmPwd;
|
2532
|
+
return _context16.abrupt('return', new _promise2.default(function (resolve, reject) {
|
2533
|
+
var modal = (0, _asyncModal2.default)({
|
2534
|
+
onPressEnter: function onPressEnter() {
|
2535
|
+
_keyboard2.default.close();
|
2536
|
+
var v = (0, _trim3.default)(that['inputAmount']['input']['value']);
|
2537
|
+
// if (v !== '') {
|
2538
|
+
modal.destroy();
|
2539
|
+
|
2540
|
+
var _ref22 = that.state || {},
|
2541
|
+
confirmPwd = _ref22.confirmPwd;
|
2542
|
+
|
2543
|
+
setTimeout(function () {
|
2544
|
+
paymode.authCode = v;
|
2545
|
+
resolve({
|
2546
|
+
id: paymode.member.id,
|
2547
|
+
pwd: confirmPwd
|
2548
|
+
});
|
2549
|
+
}, 100);
|
2550
|
+
// } else {
|
2551
|
+
// Message.info('请输入密码');
|
2552
|
+
// throw "error";
|
2553
|
+
// }
|
2554
|
+
},
|
2555
|
+
onPressEsc: function onPressEsc() {
|
2556
|
+
_keyboard2.default.close();
|
2557
|
+
reject('cancelpwd');
|
2558
|
+
},
|
2559
|
+
maskClosable: false,
|
2560
|
+
keyboard: false,
|
2561
|
+
closable: true,
|
2562
|
+
title: paymode.name,
|
2563
|
+
width: 450,
|
2564
|
+
className: that.isHorizontalSunMi || !that.isMobileEnvironment ? 'pwdModal' : 'pwdModal extraHeight',
|
2565
|
+
// 储值卡结账时显示为密码框
|
2566
|
+
content: _react2.default.createElement(
|
2567
|
+
'div',
|
2568
|
+
{ className: 'scanInput' },
|
2569
|
+
_react2.default.createElement(
|
2570
|
+
'div',
|
2571
|
+
null,
|
2572
|
+
_react2.default.createElement(
|
2573
|
+
'span',
|
2574
|
+
{ className: 'label' },
|
2575
|
+
'\u5E94\u6536\u91D1\u989D\uFF1A'
|
2576
|
+
),
|
2577
|
+
_react2.default.createElement(
|
2578
|
+
'span',
|
2579
|
+
{ className: 'yfje' },
|
2580
|
+
(0, _utils.getFixedNumber)(paymode.value)
|
2581
|
+
)
|
2582
|
+
),
|
2583
|
+
_react2.default.createElement(
|
2584
|
+
'div',
|
2585
|
+
{ className: 'pwd' },
|
2586
|
+
_react2.default.createElement(
|
2587
|
+
'span',
|
2588
|
+
{ className: 'label' },
|
2589
|
+
'\u50A8\u503C\u4F59\u989D\u5BC6\u7801\uFF1A'
|
2590
|
+
),
|
2591
|
+
_react2.default.createElement(
|
2592
|
+
'span',
|
2593
|
+
null,
|
2594
|
+
_react2.default.createElement(_numkeyboardPassword2.default, {
|
2595
|
+
className: 'content',
|
2596
|
+
placement: 'rightBottom',
|
2597
|
+
newType: 'positive',
|
2598
|
+
bordered: true,
|
2599
|
+
placeholder: '\u8BF7\u8F93\u51656\u4F4D\u6570\u5B57\u5BC6\u7801',
|
2600
|
+
style: { width: 266, height: 32 },
|
2601
|
+
maxLength: 6,
|
2602
|
+
ref: function ref(input) {
|
2603
|
+
return that.inputAmount = input;
|
2604
|
+
},
|
2605
|
+
onChange: function onChange(value) {
|
2606
|
+
return that.setConfirmPwdValue(value);
|
2607
|
+
}
|
2608
|
+
// onBlur={value => that.handleConfirmBlur}
|
2609
|
+
})
|
2610
|
+
)
|
2611
|
+
),
|
2612
|
+
_react2.default.createElement(
|
2613
|
+
'div',
|
2614
|
+
{ className: 'buttonRegion' },
|
2615
|
+
_react2.default.createElement(
|
2616
|
+
'div',
|
2617
|
+
{ className: 'fr' },
|
2618
|
+
_react2.default.createElement(
|
2619
|
+
_button2.default,
|
2620
|
+
{ size: 'large', onClick: function onClick() {
|
2621
|
+
modal.destroy();
|
2622
|
+
reject('cancelpwd'); //
|
2623
|
+
} },
|
2624
|
+
'\u53D6\u6D88'
|
2625
|
+
),
|
2626
|
+
_react2.default.createElement(
|
2627
|
+
_button2.default,
|
2628
|
+
{
|
2629
|
+
type: 'primary', size: 'large', onClick: function onClick() {
|
2630
|
+
var v = (0, _trim3.default)(that['inputAmount']['input']['value']);
|
2631
|
+
|
2632
|
+
var _ref23 = that.state || {},
|
2633
|
+
confirmPwd = _ref23.confirmPwd;
|
2634
|
+
// if (v !== '') {
|
2635
|
+
|
2636
|
+
|
2637
|
+
modal.destroy();
|
2638
|
+
// if (isQuickPay) {
|
2639
|
+
// window.__loadingModal = openLoadingModal()
|
2640
|
+
// }
|
2641
|
+
setTimeout(function () {
|
2642
|
+
paymode.authCode = v;
|
2643
|
+
resolve({
|
2644
|
+
id: paymode.member.id,
|
2645
|
+
pwd: confirmPwd
|
2646
|
+
});
|
2647
|
+
}, 100);
|
2648
|
+
// } else {
|
2649
|
+
// Message.info('请输入密码');
|
2650
|
+
// }
|
2651
|
+
} },
|
2652
|
+
'\u786E\u5B9A'
|
2653
|
+
)
|
2654
|
+
)
|
2655
|
+
)
|
2656
|
+
)
|
2657
|
+
});
|
2658
|
+
// 扫码框自动聚焦
|
2659
|
+
setTimeout(function () {
|
2660
|
+
that['inputS' + paymode.paymethodId] && that['inputS' + paymode.paymethodId].input.focus();
|
2661
|
+
that.inputAmount && that.inputAmount.input.focus();
|
2662
|
+
}, 300);
|
2663
|
+
}));
|
2664
|
+
|
2665
|
+
case 3:
|
2666
|
+
case 'end':
|
2667
|
+
return _context16.stop();
|
2668
|
+
}
|
2669
|
+
}
|
2670
|
+
}, _callee16, _this3);
|
2671
|
+
}));
|
2672
|
+
|
2673
|
+
return function (_x9) {
|
2674
|
+
return _ref21.apply(this, arguments);
|
2675
|
+
};
|
2676
|
+
}();
|
2677
|
+
|
2678
|
+
_this2.btnDebounced = function () {
|
2679
|
+
var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee17(type, bquick) {
|
2557
2680
|
var IdbusiType, CustomerPhone, DistributionMode, Address, isEnableSerialNumber, resultObj, title, productStore, checkResult, _enumController$getEn23, PayStyle, _this2$store7, paymode, brefund, boriginReturn, newStyle, status;
|
2558
2681
|
|
2559
2682
|
return _regenerator2.default.wrap(function _callee17$(_context17) {
|
@@ -2677,165 +2800,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2677
2800
|
}));
|
2678
2801
|
|
2679
2802
|
return function (_x10, _x11) {
|
2680
|
-
return
|
2681
|
-
};
|
2682
|
-
}();
|
2683
|
-
|
2684
|
-
_this2.btnDebounced = function () {
|
2685
|
-
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee18(type, bquick) {
|
2686
|
-
var _this2$props3, settlementType, _this2$props3$creditS, creditSalesVoucher, amount, notSelectableVoucherList, _this2$context$viewMo2, IdbusiType, _this2$context$viewMo3, TotalTaxAmount, _this2$context$viewMo4, ArrearsAmount, returnAmount1, _result3;
|
2687
|
-
|
2688
|
-
return _regenerator2.default.wrap(function _callee18$(_context18) {
|
2689
|
-
while (1) {
|
2690
|
-
switch (_context18.prev = _context18.next) {
|
2691
|
-
case 0:
|
2692
|
-
_this2$props3 = _this2.props, settlementType = _this2$props3.type, _this2$props3$creditS = _this2$props3.creditSalesVoucher, creditSalesVoucher = _this2$props3$creditS === undefined ? [] : _this2$props3$creditS, amount = _this2$props3.amount;
|
2693
|
-
notSelectableVoucherList = [];
|
2694
|
-
//赊销-未生成零售结算单的单据不能进行收款
|
2695
|
-
|
2696
|
-
if (!(settlementType == 2)) {
|
2697
|
-
_context18.next = 9;
|
2698
|
-
break;
|
2699
|
-
}
|
2700
|
-
|
2701
|
-
if (!(Number(amount) < 0)) {
|
2702
|
-
_context18.next = 5;
|
2703
|
-
break;
|
2704
|
-
}
|
2705
|
-
|
2706
|
-
return _context18.abrupt('return', _message2.default.warn('所勾选零售单的欠款合计须大于等于0!'));
|
2707
|
-
|
2708
|
-
case 5:
|
2709
|
-
notSelectableVoucherList = creditSalesVoucher.filter(function (o) {
|
2710
|
-
return o.SettleStatusEnum != 'SETTLED';
|
2711
|
-
});
|
2712
|
-
|
2713
|
-
if (!(notSelectableVoucherList.length > 0)) {
|
2714
|
-
_context18.next = 9;
|
2715
|
-
break;
|
2716
|
-
}
|
2717
|
-
|
2718
|
-
_modalWraper2.default.confirm({
|
2719
|
-
className: 'not-selectable-voucher',
|
2720
|
-
title: '提示',
|
2721
|
-
icon: false,
|
2722
|
-
content: _react2.default.createElement(
|
2723
|
-
'div',
|
2724
|
-
null,
|
2725
|
-
_react2.default.createElement(
|
2726
|
-
'div',
|
2727
|
-
{ className: 'content-title' },
|
2728
|
-
'\u4EE5\u4E0B\u96F6\u552E\u5355\u5C1A\u672A\u751F\u6210\u96F6\u552E\u7ED3\u7B97\u5355\uFF0C\u4E0D\u80FD\u8FDB\u884C\u6536\u6B3E'
|
2729
|
-
),
|
2730
|
-
_react2.default.createElement(
|
2731
|
-
'ul',
|
2732
|
-
null,
|
2733
|
-
notSelectableVoucherList.map(function (o) {
|
2734
|
-
return _react2.default.createElement(
|
2735
|
-
'li',
|
2736
|
-
null,
|
2737
|
-
o.Code
|
2738
|
-
);
|
2739
|
-
})
|
2740
|
-
)
|
2741
|
-
)
|
2742
|
-
});
|
2743
|
-
return _context18.abrupt('return');
|
2744
|
-
|
2745
|
-
case 9:
|
2746
|
-
if (!(_this2.props.type != 1)) {
|
2747
|
-
_context18.next = 28;
|
2748
|
-
break;
|
2749
|
-
}
|
2750
|
-
|
2751
|
-
_this2$context$viewMo2 = _this2.context.viewModel.data, IdbusiType = _this2$context$viewMo2.IdbusiType, _this2$context$viewMo3 = _this2$context$viewMo2.TotalTaxAmount, TotalTaxAmount = _this2$context$viewMo3 === undefined ? 0 : _this2$context$viewMo3, _this2$context$viewMo4 = _this2$context$viewMo2.ArrearsAmount, ArrearsAmount = _this2$context$viewMo4 === undefined ? 0 : _this2$context$viewMo4;
|
2752
|
-
//赊销原单退货
|
2753
|
-
|
2754
|
-
if (!(IdbusiType === 42)) {
|
2755
|
-
_context18.next = 25;
|
2756
|
-
break;
|
2757
|
-
}
|
2758
|
-
|
2759
|
-
//实际退款金额
|
2760
|
-
returnAmount1 = Math.abs(TotalTaxAmount) - ArrearsAmount;
|
2761
|
-
|
2762
|
-
_this2.setState({
|
2763
|
-
returnAmount: returnAmount1
|
2764
|
-
});
|
2765
|
-
//判断欠款金额
|
2766
|
-
|
2767
|
-
if (!(returnAmount1 > 0)) {
|
2768
|
-
_context18.next = 18;
|
2769
|
-
break;
|
2770
|
-
}
|
2771
|
-
|
2772
|
-
_modalWraper2.default.confirm({
|
2773
|
-
className: 'tplus-confirm-modal',
|
2774
|
-
title: '退款',
|
2775
|
-
content: '\u672C\u5355\u987B\u9000\u6B3E\uFF1A' + returnAmount1 + '\u5143\uFF0C\u672C\u6B21\u9000\u6B3E\u91D1\u989D=\u672C\u6B21\u9000\u8D27\u91D1\u989D-\u8BE5\u5BA2\u6237\u672A\u6536\u6B3E\u91D1\u989D',
|
2776
|
-
onOk: function onOk() {
|
2777
|
-
_this2.handleBtnDebounced(type, bquick);
|
2778
|
-
},
|
2779
|
-
onCancel: function onCancel() {}
|
2780
|
-
});
|
2781
|
-
_context18.next = 23;
|
2782
|
-
break;
|
2783
|
-
|
2784
|
-
case 18:
|
2785
|
-
returnAmount1 = 0;
|
2786
|
-
_context18.next = 21;
|
2787
|
-
return _this2.store.commit(_this2.props.bTest, _this2.context.viewModel.data);
|
2788
|
-
|
2789
|
-
case 21:
|
2790
|
-
_result3 = _context18.sent;
|
2791
|
-
|
2792
|
-
if (_result3 === true) {
|
2793
|
-
//成功
|
2794
|
-
_this2.settleSuccess('onCreditReturn');
|
2795
|
-
_promise2.default.resolve();
|
2796
|
-
} else {
|
2797
|
-
_this2.setState({
|
2798
|
-
settleDisabled: false
|
2799
|
-
});
|
2800
|
-
//提示失败
|
2801
|
-
setTimeout(function () {
|
2802
|
-
if (window.__loadingModal) {
|
2803
|
-
window.__loadingModal.destroy();
|
2804
|
-
window.__loadingModal = null;
|
2805
|
-
}
|
2806
|
-
}, 0);
|
2807
|
-
}
|
2808
|
-
|
2809
|
-
case 23:
|
2810
|
-
_context18.next = 26;
|
2811
|
-
break;
|
2812
|
-
|
2813
|
-
case 25:
|
2814
|
-
_this2.handleBtnDebounced(type, bquick);
|
2815
|
-
|
2816
|
-
case 26:
|
2817
|
-
_context18.next = 29;
|
2818
|
-
break;
|
2819
|
-
|
2820
|
-
case 28:
|
2821
|
-
_this2.handleBtnDebounced(type, bquick);
|
2822
|
-
|
2823
|
-
case 29:
|
2824
|
-
case 'end':
|
2825
|
-
return _context18.stop();
|
2826
|
-
}
|
2827
|
-
}
|
2828
|
-
}, _callee18, _this3);
|
2829
|
-
}));
|
2830
|
-
|
2831
|
-
return function (_x12, _x13) {
|
2832
|
-
return _ref20.apply(this, arguments);
|
2803
|
+
return _ref24.apply(this, arguments);
|
2833
2804
|
};
|
2834
2805
|
}();
|
2835
2806
|
|
2836
2807
|
_this2.onCzkChange = function (v) {
|
2837
|
-
var
|
2838
|
-
isNewRetailBCPos =
|
2808
|
+
var _ref25 = _mutantsUtil.platform || {},
|
2809
|
+
isNewRetailBCPos = _ref25.isNewRetailBCPos;
|
2839
2810
|
|
2840
2811
|
if (!isNewRetailBCPos) {
|
2841
2812
|
_this2.store.paymode.currentMode.member.setCardNo(v);
|
@@ -2972,9 +2943,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2972
2943
|
var that = _this2;
|
2973
2944
|
var isStoredValueCard = false;
|
2974
2945
|
var discountPrototypeTotalAmount = _this2.state.discountPrototypeTotalAmount;
|
2975
|
-
var _this2$
|
2976
|
-
isReturn = _this2$
|
2977
|
-
type = _this2$
|
2946
|
+
var _this2$props3 = _this2.props,
|
2947
|
+
isReturn = _this2$props3.isReturn,
|
2948
|
+
type = _this2$props3.type;
|
2978
2949
|
|
2979
2950
|
var isManualIntoAmount = void 0;
|
2980
2951
|
var BuyerPayFreight = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.BuyerPayFreight;
|
@@ -3131,7 +3102,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3131
3102
|
that.getXianjinBalance(paymode.paymentType, paymode.value)
|
3132
3103
|
)
|
3133
3104
|
),
|
3134
|
-
!isReturn &&
|
3105
|
+
!isReturn && type !== 1 && _react2.default.createElement(
|
3135
3106
|
'div',
|
3136
3107
|
{ className: 'zlje prototype' },
|
3137
3108
|
_react2.default.createElement(
|
@@ -3294,27 +3265,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3294
3265
|
var _enumController$getEn30 = _mutantsUtil.enumController.getEnumOj(),
|
3295
3266
|
PayStyle = _enumController$getEn30.PayStyle;
|
3296
3267
|
|
3297
|
-
var type = _this2.props.type;
|
3298
|
-
|
3299
3268
|
console.log("settlement.checkSettleDisabled开始执行,参数:", { paymode: paymode, thePaymodes: thePaymodes });
|
3300
3269
|
if (paymode.amount == 0 && paymode.received == 0) {
|
3301
3270
|
console.log("settlement.checkSettleDisabled返回结果:", false);
|
3302
3271
|
return false;
|
3303
3272
|
}
|
3304
3273
|
if (_this2.store.brefund) {
|
3305
|
-
var
|
3306
|
-
console.log("settlement.checkSettleDisabled返回结果:",
|
3307
|
-
return
|
3274
|
+
var _result3 = !(paymode.receivable == 0 && thePaymodes.length > 0);
|
3275
|
+
console.log("settlement.checkSettleDisabled返回结果:", _result3);
|
3276
|
+
return _result3;
|
3308
3277
|
}
|
3309
3278
|
var xj = (0, _find3.default)(thePaymodes, function (mode) {
|
3310
3279
|
return mode.paymentType == PayStyle.xianjin;
|
3311
3280
|
});
|
3312
|
-
|
3313
|
-
var receivable = Number(paymode.receivable);
|
3314
|
-
var amount = Number(paymode.amount);
|
3315
|
-
var enabled = (receivable == 0 || type == 2 && 0 < receivable && receivable < amount) && thePaymodes.length > 0;
|
3281
|
+
var enabled = paymode.receivable == 0 && thePaymodes.length > 0;
|
3316
3282
|
if (xj && xj.value != 0) {
|
3317
|
-
enabled = receivable <= 0 && thePaymodes.length > 0 && Math.abs(receivable) < xj.value
|
3283
|
+
enabled = paymode.receivable <= 0 && thePaymodes.length > 0 && Math.abs(paymode.receivable) < xj.value;
|
3318
3284
|
}
|
3319
3285
|
console.log("settlement.checkSettleDisabled返回结果:", !enabled);
|
3320
3286
|
var settleDisabled = _this2.state.settleDisabled;
|
@@ -3390,7 +3356,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3390
3356
|
'div',
|
3391
3357
|
null,
|
3392
3358
|
(0, _map3.default)(modeList, function (mode, modeIndex) {
|
3393
|
-
return _this2.renderToolbtn(mode, index * carouselStart + modeIndex,
|
3359
|
+
return _this2.renderToolbtn(mode, index * carouselStart + modeIndex, type !== 1 ? 'bookPay' : '');
|
3394
3360
|
})
|
3395
3361
|
);
|
3396
3362
|
})
|
@@ -3441,12 +3407,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3441
3407
|
|
3442
3408
|
_this2.hasElectron = hasElectron;
|
3443
3409
|
|
3444
|
-
var
|
3445
|
-
MemberMeStorageCardInputByKeyBoard =
|
3446
|
-
ICCardServer =
|
3447
|
-
ICCardPassword =
|
3448
|
-
PreSellOrBook =
|
3449
|
-
PercentageWhenBook =
|
3410
|
+
var _ref26 = _mutantsMicrofx.stores.user.options.get('loginInfo') || {},
|
3411
|
+
MemberMeStorageCardInputByKeyBoard = _ref26.MemberMeStorageCardInputByKeyBoard,
|
3412
|
+
ICCardServer = _ref26.ICCardServer,
|
3413
|
+
ICCardPassword = _ref26.ICCardPassword,
|
3414
|
+
PreSellOrBook = _ref26.PreSellOrBook,
|
3415
|
+
PercentageWhenBook = _ref26.PercentageWhenBook;
|
3450
3416
|
|
3451
3417
|
_this2.isStorageCardInputType = MemberMeStorageCardInputByKeyBoard; // 仅储值卡是否禁用键盘输入,'0'为不禁用 '1'为禁用
|
3452
3418
|
_this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
|
@@ -3455,9 +3421,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3455
3421
|
_this2.percentageWhenBook = PercentageWhenBook;
|
3456
3422
|
//移动端环境下,没有读取IC卡的方式。
|
3457
3423
|
|
3458
|
-
var
|
3459
|
-
isHorizontalPad =
|
3460
|
-
isHorizontalSunMi =
|
3424
|
+
var _ref27 = _mutantsUtil.platform || {},
|
3425
|
+
isHorizontalPad = _ref27.isHorizontalPad,
|
3426
|
+
isHorizontalSunMi = _ref27.isHorizontalSunMi;
|
3461
3427
|
|
3462
3428
|
_this2.isHorizontalPad = !!isHorizontalPad;
|
3463
3429
|
_this2.isHorizontalSunMi = !!isHorizontalSunMi;
|
@@ -3465,7 +3431,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3465
3431
|
_this2.handleReadICard = _this2.handleReadICard.bind(_this2);
|
3466
3432
|
_this2.setTimer = null;
|
3467
3433
|
_this2.keypressStime = null;
|
3468
|
-
_this2.store = !props.type ? _mutantsMicrofx.stores.settlementVoucherStore : _mutantsMicrofx.stores.settlementMemberStore;
|
3434
|
+
_this2.store = !(props.type == 1) ? _mutantsMicrofx.stores.settlementVoucherStore : _mutantsMicrofx.stores.settlementMemberStore;
|
3469
3435
|
_this2.voucherRunningFast = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('vocherRunningFast') == '1';
|
3470
3436
|
return _this2;
|
3471
3437
|
}
|
@@ -3606,8 +3572,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3606
3572
|
}, {
|
3607
3573
|
key: 'isNoProductTip',
|
3608
3574
|
value: function isNoProductTip(nonProductMap) {
|
3609
|
-
var
|
3610
|
-
RetailDetails =
|
3575
|
+
var _ref28 = this.context.viewModel.data || {},
|
3576
|
+
RetailDetails = _ref28.RetailDetails;
|
3611
3577
|
|
3612
3578
|
var temphtml = [];
|
3613
3579
|
if ((0, _keys2.default)(nonProductMap).length > 0) {
|
@@ -3806,9 +3772,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3806
3772
|
isReturn = _props.isReturn,
|
3807
3773
|
quantityDetail = _props.quantityDetail,
|
3808
3774
|
memberDisabled = _props.memberDisabled,
|
3809
|
-
noIsMinAmount = _props.noIsMinAmount
|
3810
|
-
_props$creditSalesVou = _props.creditSalesVoucher,
|
3811
|
-
creditSalesVoucher = _props$creditSalesVou === undefined ? [] : _props$creditSalesVou;
|
3775
|
+
noIsMinAmount = _props.noIsMinAmount;
|
3812
3776
|
// 原单退货
|
3813
3777
|
|
3814
3778
|
var boriginReturn = this.getBoriginReturn();
|
@@ -3862,7 +3826,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3862
3826
|
return paymode.isQuick;
|
3863
3827
|
}
|
3864
3828
|
});
|
3865
|
-
var productsIsEmpty =
|
3829
|
+
var productsIsEmpty = type != 1 && this.context.viewModel.data.RetailDetails.length == 0 || type == 1 && parseFloat(amount || 0) <= 0 || memberDisabled || noIsMinAmount;
|
3866
3830
|
var moreToolbtns = [];
|
3867
3831
|
var params = {
|
3868
3832
|
pagination: {
|
@@ -3880,11 +3844,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3880
3844
|
quantity4 = 0;
|
3881
3845
|
var sumQuantity = 0; //数量总和的值,包括称重的。
|
3882
3846
|
|
3883
|
-
var
|
3884
|
-
|
3885
|
-
buyQuantity =
|
3886
|
-
|
3887
|
-
returnQuantity =
|
3847
|
+
var _ref29 = quantityDetail || {},
|
3848
|
+
_ref29$buyQuantity = _ref29.buyQuantity,
|
3849
|
+
buyQuantity = _ref29$buyQuantity === undefined ? 0 : _ref29$buyQuantity,
|
3850
|
+
_ref29$returnQuantity = _ref29.returnQuantity,
|
3851
|
+
returnQuantity = _ref29$returnQuantity === undefined ? 0 : _ref29$returnQuantity;
|
3888
3852
|
|
3889
3853
|
var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
|
3890
3854
|
quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
|
@@ -4031,7 +3995,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4031
3995
|
_react2.default.createElement(
|
4032
3996
|
'div',
|
4033
3997
|
{ className: 'btns' },
|
4034
|
-
!this.isHorizontalPad && !this.props.MemberPoints &&
|
3998
|
+
!this.isHorizontalPad && !this.props.MemberPoints && (0, _map3.default)(quickPay, function (p, i) {
|
4035
3999
|
var _classnames2;
|
4036
4000
|
|
4037
4001
|
var iconclass = PayIcon2[p.paymentType] ? 'color' + p.paymentType : "primary-color";
|
@@ -4043,7 +4007,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4043
4007
|
onClick: function onClick() {
|
4044
4008
|
_this8.btnDebounced(p.paymentType, true);
|
4045
4009
|
},
|
4046
|
-
disabled: productsIsEmpty ||
|
4010
|
+
disabled: productsIsEmpty || type != 1 && _this8.checkModeDisabled(p.paymentType, (_this8.context.viewModel.data.TotalTaxAmount || 0 - _this8.context.viewModel.data.OnlinePaymentAmount || 0) < 0, boriginReturn)
|
4047
4011
|
},
|
4048
4012
|
_react2.default.createElement(
|
4049
4013
|
'div',
|
@@ -4059,13 +4023,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4059
4023
|
}),
|
4060
4024
|
_react2.default.createElement(
|
4061
4025
|
_button2.default,
|
4062
|
-
{ key: 'settle',
|
4063
|
-
className: (0, _classnames4.default)({ "settle": true, "settle2": type == 1, "settleStorage": true, 'primary-btn': true }),
|
4064
|
-
onClick: function onClick() {
|
4026
|
+
{ key: 'settle', className: (0, _classnames4.default)({ "settle": true, "settle2": type == 1, "settleStorage": true, 'primary-btn': true }), onClick: function onClick() {
|
4065
4027
|
_this8.btnDebounced();
|
4066
|
-
},
|
4067
|
-
|
4068
|
-
this.props.isMemberPoints ? '立即兑换' : this.props.isMemberPointsReturn ? '退货' : IdbusiType == 39 && _mutantsMicrofx.stores.drawerStore.thisWaitPaidAmount == 0 ? '取货' : type == 2 ? '收款' : settle.name
|
4028
|
+
}, disabled: productsIsEmpty },
|
4029
|
+
this.props.isMemberPoints ? '立即兑换' : this.props.isMemberPointsReturn ? '退货' : IdbusiType == 39 && _mutantsMicrofx.stores.drawerStore.thisWaitPaidAmount == 0 ? '取货' : settle.name
|
4069
4030
|
)
|
4070
4031
|
),
|
4071
4032
|
!newStyle && _react2.default.createElement(
|
@@ -4129,7 +4090,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4129
4090
|
mode.paymentType == PayStyle.hyczk || mode.paymentType == PayStyle.jfdx || mode.paymentType == PayStyle.djq ? _react2.default.createElement('input', { id: 'inputS' + index,
|
4130
4091
|
className: _index.hotKey.hotKeyNotFilter(),
|
4131
4092
|
onClick: function onClick() {
|
4132
|
-
_this8.editModal(index, mode.paymentType,
|
4093
|
+
_this8.editModal(index, mode.paymentType, type != 1 ? boriginReturn : null);
|
4133
4094
|
}, value: (0, _utils.getFixedNumber)(mode.value) }) : _react2.default.createElement('input', { id: 'inputS' + index,
|
4134
4095
|
className: _index.hotKey.hotKeyNotFilter(),
|
4135
4096
|
value: mode.exchangeRate != 1 ? mode.value2 : mode.value,
|
@@ -4193,7 +4154,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4193
4154
|
(0, _utils.getFixedNumber)(mode.balance)
|
4194
4155
|
),
|
4195
4156
|
_react2.default.createElement('br', null),
|
4196
|
-
|
4157
|
+
type != 1 && themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === mode.paymethodId && !isReturn && _react2.default.createElement(
|
4197
4158
|
_button2.default,
|
4198
4159
|
{ onClick: function onClick() {
|
4199
4160
|
_this8.appendCzkmode(boriginReturn, 'noPlaySetPwd');
|
@@ -4300,7 +4261,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4300
4261
|
)
|
4301
4262
|
)
|
4302
4263
|
),
|
4303
|
-
|
4264
|
+
type != 1 && !isReturn && _react2.default.createElement(
|
4304
4265
|
'div',
|
4305
4266
|
{ onClick: this.prototypeDetailedClick, className: 'prototypeDetailed primary-color' },
|
4306
4267
|
'\u4F18\u60E0\u660E\u7EC6',
|
@@ -4450,7 +4411,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4450
4411
|
)
|
4451
4412
|
)
|
4452
4413
|
),
|
4453
|
-
|
4414
|
+
type != 1 && !isReturn && _react2.default.createElement(
|
4454
4415
|
'div',
|
4455
4416
|
{ onClick: this.prototypeDetailedClick, className: 'prototypeDetailed primary-color' },
|
4456
4417
|
'\u4F18\u60E0\u660E\u7EC6',
|
@@ -4537,7 +4498,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4537
4498
|
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" + _this8.compoundHotkeysList[hotkeyIndex]),
|
4538
4499
|
disabled: _this8.checkModeDisabled(mode.paymentType, brefund, boriginReturn),
|
4539
4500
|
onClick: function onClick() {
|
4540
|
-
if (
|
4501
|
+
if (type != 1 && mode.paymentType == PayStyle.hyczk) {
|
4541
4502
|
if (themodeHyczk && themodeHyczk.length === 0) {
|
4542
4503
|
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
4543
4504
|
}
|
@@ -4593,7 +4554,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4593
4554
|
null,
|
4594
4555
|
'\u5361\u53F7\uFF1A'
|
4595
4556
|
),
|
4596
|
-
|
4557
|
+
type != 1 ? _react2.default.createElement(
|
4597
4558
|
'span',
|
4598
4559
|
null,
|
4599
4560
|
m && m.storageCardNo
|
@@ -4613,7 +4574,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4613
4574
|
'\u652F\u4ED8\u91D1\u989D\uFF1A'
|
4614
4575
|
),
|
4615
4576
|
_react2.default.createElement('br', null),
|
4616
|
-
|
4577
|
+
type != 1 && themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === m.paymethodId && _react2.default.createElement(
|
4617
4578
|
_button2.default,
|
4618
4579
|
{ onClick: function onClick() {
|
4619
4580
|
return _this8.onHotKeyClick1(mode, index, boriginReturn);
|
@@ -4772,22 +4733,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4772
4733
|
return _this8.czkInput = input;
|
4773
4734
|
},
|
4774
4735
|
onKeyDown: function () {
|
4775
|
-
var
|
4736
|
+
var _ref30 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee18(e) {
|
4776
4737
|
var time, _paymode;
|
4777
4738
|
|
4778
|
-
return _regenerator2.default.wrap(function
|
4739
|
+
return _regenerator2.default.wrap(function _callee18$(_context18) {
|
4779
4740
|
while (1) {
|
4780
|
-
switch (
|
4741
|
+
switch (_context18.prev = _context18.next) {
|
4781
4742
|
case 0:
|
4782
4743
|
if (!(e.keyCode == 13)) {
|
4783
|
-
|
4744
|
+
_context18.next = 14;
|
4784
4745
|
break;
|
4785
4746
|
}
|
4786
4747
|
|
4787
4748
|
time = Date.parse(new Date());
|
4788
4749
|
|
4789
4750
|
if (!(_this8.isStorageCardInputType && time - _this8.keypressStime > 350)) {
|
4790
|
-
|
4751
|
+
_context18.next = 7;
|
4791
4752
|
break;
|
4792
4753
|
}
|
4793
4754
|
|
@@ -4796,11 +4757,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4796
4757
|
_this8.setState({
|
4797
4758
|
czkValue: null
|
4798
4759
|
});
|
4799
|
-
return
|
4760
|
+
return _context18.abrupt('return');
|
4800
4761
|
|
4801
4762
|
case 7:
|
4802
4763
|
_this8.keypressStime = null;
|
4803
|
-
|
4764
|
+
_context18.next = 10;
|
4804
4765
|
return _this8.loadCzk(e.target.value);
|
4805
4766
|
|
4806
4767
|
case 10:
|
@@ -4811,7 +4772,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4811
4772
|
czkvalue: null
|
4812
4773
|
});
|
4813
4774
|
}
|
4814
|
-
|
4775
|
+
_context18.next = 15;
|
4815
4776
|
break;
|
4816
4777
|
|
4817
4778
|
case 14:
|
@@ -4821,14 +4782,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4821
4782
|
|
4822
4783
|
case 15:
|
4823
4784
|
case 'end':
|
4824
|
-
return
|
4785
|
+
return _context18.stop();
|
4825
4786
|
}
|
4826
4787
|
}
|
4827
|
-
},
|
4788
|
+
}, _callee18, _this8);
|
4828
4789
|
}));
|
4829
4790
|
|
4830
|
-
return function (
|
4831
|
-
return
|
4791
|
+
return function (_x13) {
|
4792
|
+
return _ref30.apply(this, arguments);
|
4832
4793
|
};
|
4833
4794
|
}(),
|
4834
4795
|
onFocus: function onFocus(e) {
|
@@ -4885,8 +4846,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4885
4846
|
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.balance));
|
4886
4847
|
},
|
4887
4848
|
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)),
|
4888
|
-
ref: function ref(
|
4889
|
-
return _this8["inputCzkAmount"] =
|
4849
|
+
ref: function ref(_ref31) {
|
4850
|
+
return _this8["inputCzkAmount"] = _ref31;
|
4890
4851
|
},
|
4891
4852
|
onFocus: function onFocus(e) {
|
4892
4853
|
_this8.inputkey = "inputCzkAmount";
|
@@ -4980,7 +4941,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4980
4941
|
_react2.default.createElement(
|
4981
4942
|
_modal2.default,
|
4982
4943
|
(0, _defineProperty3.default)({
|
4983
|
-
wrapClassName: 'djq ' + (this.voucherRunningFast ? 'no-zoom' : '') + ' ' + (this.isHorizontalPad ? 'extraHeight' : '') + '
|
4944
|
+
wrapClassName: 'djq ' + (this.voucherRunningFast ? 'no-zoom' : '') + ' ' + (this.isHorizontalPad ? 'extraHeight' : '') + ' passwordContainer',
|
4984
4945
|
width: '400px',
|
4985
4946
|
visible: this.state.showSetPwdModal,
|
4986
4947
|
backdropClosable: false,
|
@@ -5005,47 +4966,74 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
5005
4966
|
'\u786E\u5B9A'
|
5006
4967
|
)
|
5007
4968
|
)),
|
5008
|
-
_react2.default.createElement(
|
5009
|
-
return _this8.modifyPass = _ref28;
|
5010
|
-
}, cardList: this.store.paymode.currentMode, cancelModal: this.handleSetPwdCancel })
|
5011
|
-
),
|
5012
|
-
_react2.default.createElement(
|
5013
|
-
_modal2.default,
|
5014
|
-
(0, _defineProperty3.default)({
|
5015
|
-
wrapClassName: 'djq ' + (this.isHorizontalPad ? 'extraHeight' : '') + ' confirmPwdWraper',
|
5016
|
-
width: '400px',
|
5017
|
-
visible: this.state.confirmStatus,
|
5018
|
-
backdropClosable: false,
|
5019
|
-
destroyOnClose: true,
|
5020
|
-
footer: null,
|
5021
|
-
onCancel: this.handleConfirmPwdCancel,
|
5022
|
-
keyboard: false,
|
5023
|
-
centered: !this.isHorizontalPad ? true : false,
|
5024
|
-
title: '\u50A8\u503C\u5361',
|
5025
|
-
zIndex: 1007
|
5026
|
-
}, 'footer', _react2.default.createElement(
|
4969
|
+
_react2.default.createElement(
|
5027
4970
|
'div',
|
5028
|
-
{ className: '
|
4971
|
+
{ className: 'setPwdContainer' },
|
5029
4972
|
_react2.default.createElement(
|
5030
|
-
|
5031
|
-
{
|
5032
|
-
|
4973
|
+
'div',
|
4974
|
+
{ className: 'setPwdDiv' },
|
4975
|
+
_react2.default.createElement(
|
4976
|
+
'div',
|
4977
|
+
{ className: 'one' },
|
4978
|
+
'\u65B0\u5BC6\u7801'
|
4979
|
+
),
|
4980
|
+
_react2.default.createElement(
|
4981
|
+
'div',
|
4982
|
+
{ className: 'two' },
|
4983
|
+
_react2.default.createElement(_input2.default.Password, {
|
4984
|
+
className: 'content',
|
4985
|
+
placeholder: '\u8BF7\u8F93\u51656\u4F4D\u6570\u5B57\u5BC6\u7801',
|
4986
|
+
style: { width: 266, height: 32 },
|
4987
|
+
maxLength: 6,
|
4988
|
+
value: newPass,
|
4989
|
+
ref: function ref(input) {
|
4990
|
+
return _this8.inputNewAmount = input;
|
4991
|
+
},
|
4992
|
+
onChange: function onChange(value) {
|
4993
|
+
return _this8.setPwdValue('newPass', value.target.value);
|
4994
|
+
},
|
4995
|
+
onBlur: function onBlur(value) {
|
4996
|
+
return _this8.handleBlur('newPass');
|
4997
|
+
},
|
4998
|
+
onPressEnter: function onPressEnter() {
|
4999
|
+
return _this8.onPressEnterCzk('newPass');
|
5000
|
+
}
|
5001
|
+
})
|
5002
|
+
)
|
5033
5003
|
),
|
5034
5004
|
_react2.default.createElement(
|
5035
|
-
|
5036
|
-
{
|
5037
|
-
|
5005
|
+
'div',
|
5006
|
+
{ className: 'setPwdDiv' },
|
5007
|
+
_react2.default.createElement(
|
5008
|
+
'div',
|
5009
|
+
{ className: 'one' },
|
5010
|
+
'\u786E\u8BA4\u65B0\u5BC6\u7801'
|
5011
|
+
),
|
5012
|
+
_react2.default.createElement(
|
5013
|
+
'div',
|
5014
|
+
{ className: 'two' },
|
5015
|
+
_react2.default.createElement(_input2.default.Password, {
|
5016
|
+
className: 'content',
|
5017
|
+
placeholder: '\u8BF7\u786E\u8BA46\u4F4D\u6570\u5B57\u5BC6\u7801',
|
5018
|
+
style: { width: 266, height: 32 },
|
5019
|
+
maxLength: 6,
|
5020
|
+
value: newPassConfirm,
|
5021
|
+
ref: function ref(input) {
|
5022
|
+
return _this8.inputConfirmAmount = input;
|
5023
|
+
},
|
5024
|
+
onChange: function onChange(value) {
|
5025
|
+
return _this8.setPwdValue('newPassConfirm', value.target.value);
|
5026
|
+
},
|
5027
|
+
onBlur: function onBlur(value) {
|
5028
|
+
return _this8.handleBlur('newPassConfirm');
|
5029
|
+
},
|
5030
|
+
onPressEnter: function onPressEnter() {
|
5031
|
+
return _this8.onPressEnterCzk('newPassConfirm');
|
5032
|
+
}
|
5033
|
+
})
|
5034
|
+
)
|
5038
5035
|
)
|
5039
|
-
)
|
5040
|
-
_react2.default.createElement(_confirmPwd2.default, {
|
5041
|
-
isLimit: 'yes',
|
5042
|
-
placeholder: '',
|
5043
|
-
maxLength: 6,
|
5044
|
-
labelName: '\u50A8\u503C\u4F59\u989D\u5BC6\u7801',
|
5045
|
-
getConfirmPwd: this.getConfirmPwd,
|
5046
|
-
params: 'pay',
|
5047
|
-
amount: this.store.paymode.currentMode && (0, _utils.getFixedNumber)(this.store.paymode.currentMode.value)
|
5048
|
-
})
|
5036
|
+
)
|
5049
5037
|
),
|
5050
5038
|
_react2.default.createElement(
|
5051
5039
|
_modal2.default,
|
@@ -5529,8 +5517,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
5529
5517
|
_this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
5530
5518
|
},
|
5531
5519
|
defaultValue: currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
5532
|
-
ref: function ref(
|
5533
|
-
return _this8["inputJfdxAmount"] =
|
5520
|
+
ref: function ref(_ref32) {
|
5521
|
+
return _this8["inputJfdxAmount"] = _ref32;
|
5534
5522
|
},
|
5535
5523
|
onFocus: function onFocus(e) {
|
5536
5524
|
_this8.inputkey = "inputJfdxAmount";
|